RTEMS 4.11Annotated Report
Sun Nov 28 15:58:50 2010
ffc09a3c <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
ffc09a3c: 94 21 ff f0 stwu r1,-16(r1)
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
ffc09a40: 3d 20 00 00 lis r9,0
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
ffc09a44: 7c 08 02 a6 mflr r0
ffc09a48: 93 c1 00 08 stw r30,8(r1)
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
ffc09a4c: 3b c9 2d 00 addi r30,r9,11520
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
ffc09a50: 3b de 00 04 addi r30,r30,4
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
ffc09a54: 93 e1 00 0c stw r31,12(r1)
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
ffc09a58: 83 e9 2d 00 lwz r31,11520(r9)
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
ffc09a5c: 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 );
ffc09a60: 7f 9f f0 00 cmpw cr7,r31,r30
ffc09a64: 41 9e 00 1c beq- cr7,ffc09a80 <_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)();
ffc09a68: 80 1f 00 08 lwz r0,8(r31)
ffc09a6c: 7c 09 03 a6 mtctr r0
ffc09a70: 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 ) {
ffc09a74: 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 );
ffc09a78: 7f 9f f0 00 cmpw cr7,r31,r30
ffc09a7c: 40 9e ff ec bne+ cr7,ffc09a68 <_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)();
}
}
ffc09a80: 80 01 00 14 lwz r0,20(r1)
ffc09a84: 83 c1 00 08 lwz r30,8(r1)
ffc09a88: 7c 08 03 a6 mtlr r0
ffc09a8c: 83 e1 00 0c lwz r31,12(r1)
ffc09a90: 38 21 00 10 addi r1,r1,16
ffc09a94: 4e 80 00 20 blr
ffc09a98 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
ffc09a98: 94 21 ff e8 stwu r1,-24(r1)
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
ffc09a9c: 3d 20 00 00 lis r9,0
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
ffc09aa0: 7c 08 02 a6 mflr r0
ffc09aa4: 93 c1 00 10 stw r30,16(r1)
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
ffc09aa8: 3b c9 2d 00 addi r30,r9,11520
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
ffc09aac: 3b de 00 04 addi r30,r30,4
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
ffc09ab0: 93 e1 00 14 stw r31,20(r1)
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
ffc09ab4: 83 e9 2d 00 lwz r31,11520(r9)
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
ffc09ab8: 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 );
ffc09abc: 7f 9f f0 00 cmpw cr7,r31,r30
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
ffc09ac0: 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 );
ffc09ac4: 41 9e 00 28 beq- cr7,ffc09aec <_API_extensions_Run_postswitch+0x54><== NEVER TAKEN
ffc09ac8: 3f a0 00 00 lis r29,0
ffc09acc: 3b bd 2d 38 addi r29,r29,11576
!_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 );
ffc09ad0: 80 1f 00 0c lwz r0,12(r31)
ffc09ad4: 80 7d 00 0c lwz r3,12(r29)
ffc09ad8: 7c 09 03 a6 mtctr r0
ffc09adc: 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 ) {
ffc09ae0: 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 );
ffc09ae4: 7f 9f f0 00 cmpw cr7,r31,r30
ffc09ae8: 40 9e ff e8 bne+ cr7,ffc09ad0 <_API_extensions_Run_postswitch+0x38><== NEVER TAKEN
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
ffc09aec: 80 01 00 1c lwz r0,28(r1)
ffc09af0: 83 a1 00 0c lwz r29,12(r1)
ffc09af4: 7c 08 03 a6 mtlr r0
ffc09af8: 83 c1 00 10 lwz r30,16(r1)
ffc09afc: 83 e1 00 14 lwz r31,20(r1)
ffc09b00: 38 21 00 18 addi r1,r1,24
ffc09b04: 4e 80 00 20 blr
ffc1c99c <_CORE_message_queue_Broadcast>:
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
ffc1c99c: 94 21 ff e0 stwu r1,-32(r1)
ffc1c9a0: 7c 08 02 a6 mflr r0
ffc1c9a4: 90 01 00 24 stw r0,36(r1)
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
ffc1c9a8: 80 03 00 4c lwz r0,76(r3)
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
ffc1c9ac: 93 41 00 08 stw r26,8(r1)
ffc1c9b0: 7d 1a 43 78 mr r26,r8
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
ffc1c9b4: 7f 80 28 40 cmplw cr7,r0,r5
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
ffc1c9b8: 93 a1 00 14 stw r29,20(r1)
ffc1c9bc: 7c 9d 23 78 mr r29,r4
ffc1c9c0: 93 c1 00 18 stw r30,24(r1)
ffc1c9c4: 7c 7e 1b 78 mr r30,r3
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
ffc1c9c8: 38 60 00 01 li r3,1
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
ffc1c9cc: 93 e1 00 1c stw r31,28(r1)
ffc1c9d0: 7c bf 2b 78 mr r31,r5
ffc1c9d4: 93 61 00 0c stw r27,12(r1)
ffc1c9d8: 93 81 00 10 stw r28,16(r1)
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
ffc1c9dc: 41 9c 00 20 blt- cr7,ffc1c9fc <_CORE_message_queue_Broadcast+0x60><== NEVER TAKEN
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
ffc1c9e0: 80 1e 00 48 lwz r0,72(r30)
ffc1c9e4: 3b 60 00 00 li r27,0
ffc1c9e8: 2f 80 00 00 cmpwi cr7,r0,0
ffc1c9ec: 41 be 00 4c beq+ cr7,ffc1ca38 <_CORE_message_queue_Broadcast+0x9c>
*count = 0;
ffc1c9f0: 38 00 00 00 li r0,0
ffc1c9f4: 90 08 00 00 stw r0,0(r8)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
ffc1c9f8: 38 60 00 00 li r3,0
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
ffc1c9fc: 80 01 00 24 lwz r0,36(r1)
ffc1ca00: 83 41 00 08 lwz r26,8(r1)
ffc1ca04: 7c 08 03 a6 mtlr r0
ffc1ca08: 83 61 00 0c lwz r27,12(r1)
ffc1ca0c: 83 81 00 10 lwz r28,16(r1)
ffc1ca10: 83 a1 00 14 lwz r29,20(r1)
ffc1ca14: 83 c1 00 18 lwz r30,24(r1)
ffc1ca18: 83 e1 00 1c lwz r31,28(r1)
ffc1ca1c: 38 21 00 20 addi r1,r1,32
ffc1ca20: 4e 80 00 20 blr
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
ffc1ca24: 80 7c 00 2c lwz r3,44(r28)
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
ffc1ca28: 3b 7b 00 01 addi r27,r27,1
ffc1ca2c: 48 00 a3 bd bl ffc26de8 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
ffc1ca30: 81 3c 00 28 lwz r9,40(r28)
ffc1ca34: 93 e9 00 00 stw r31,0(r9)
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
ffc1ca38: 7f c3 f3 78 mr r3,r30
ffc1ca3c: 48 00 35 29 bl ffc1ff64 <_Thread_queue_Dequeue>
ffc1ca40: 7f a4 eb 78 mr r4,r29
ffc1ca44: 7c 7c 1b 79 mr. r28,r3
ffc1ca48: 7f e5 fb 78 mr r5,r31
ffc1ca4c: 40 82 ff d8 bne+ ffc1ca24 <_CORE_message_queue_Broadcast+0x88>
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
ffc1ca50: 80 01 00 24 lwz r0,36(r1)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
ffc1ca54: 93 7a 00 00 stw r27,0(r26)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
ffc1ca58: 7c 08 03 a6 mtlr r0
ffc1ca5c: 83 41 00 08 lwz r26,8(r1)
ffc1ca60: 83 61 00 0c lwz r27,12(r1)
ffc1ca64: 83 81 00 10 lwz r28,16(r1)
ffc1ca68: 83 a1 00 14 lwz r29,20(r1)
ffc1ca6c: 83 c1 00 18 lwz r30,24(r1)
ffc1ca70: 83 e1 00 1c lwz r31,28(r1)
ffc1ca74: 38 21 00 20 addi r1,r1,32
ffc1ca78: 4e 80 00 20 blr
ffc15330 <_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
)
{
ffc15330: 94 21 ff e0 stwu r1,-32(r1)
ffc15334: 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)) {
ffc15338: 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
)
{
ffc1533c: 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)) {
ffc15340: 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;
ffc15344: 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
)
{
ffc15348: 93 a1 00 14 stw r29,20(r1)
ffc1534c: 7c 9d 23 78 mr r29,r4
ffc15350: 93 e1 00 1c stw r31,28(r1)
ffc15354: 7c 7f 1b 78 mr r31,r3
ffc15358: 93 81 00 10 stw r28,16(r1)
ffc1535c: 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;
ffc15360: 90 a3 00 44 stw r5,68(r3)
the_message_queue->number_of_pending_messages = 0;
ffc15364: 90 03 00 48 stw r0,72(r3)
the_message_queue->maximum_message_size = maximum_message_size;
ffc15368: 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)) {
ffc1536c: 41 82 00 3c beq- ffc153a8 <_CORE_message_queue_Initialize+0x78>
allocated_message_size += sizeof(uint32_t);
ffc15370: 39 26 00 04 addi r9,r6,4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
ffc15374: 55 29 00 3a rlwinm r9,r9,0,0,29
}
if (allocated_message_size < maximum_message_size)
ffc15378: 7f 86 48 40 cmplw cr7,r6,r9
return false;
ffc1537c: 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)
ffc15380: 40 9d 00 28 ble- cr7,ffc153a8 <_CORE_message_queue_Initialize+0x78><== ALWAYS TAKEN
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
ffc15384: 80 01 00 24 lwz r0,36(r1)
ffc15388: 7f c3 f3 78 mr r3,r30
ffc1538c: 83 81 00 10 lwz r28,16(r1)
ffc15390: 7c 08 03 a6 mtlr r0
ffc15394: 83 a1 00 14 lwz r29,20(r1)
ffc15398: 83 c1 00 18 lwz r30,24(r1)
ffc1539c: 83 e1 00 1c lwz r31,28(r1)
ffc153a0: 38 21 00 20 addi r1,r1,32
ffc153a4: 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));
ffc153a8: 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 *
ffc153ac: 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;
ffc153b0: 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)
ffc153b4: 7f 83 48 40 cmplw cr7,r3,r9
ffc153b8: 41 9c ff cc blt+ cr7,ffc15384 <_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 );
ffc153bc: 90 a1 00 08 stw r5,8(r1)
ffc153c0: 48 00 3c 81 bl ffc19040 <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
ffc153c4: 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 );
ffc153c8: 7c 64 1b 78 mr r4,r3
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
ffc153cc: 90 7f 00 5c stw r3,92(r31)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
ffc153d0: 80 a1 00 08 lwz r5,8(r1)
ffc153d4: 41 be ff b0 beq- cr7,ffc15384 <_CORE_message_queue_Initialize+0x54>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
ffc153d8: 38 7f 00 60 addi r3,r31,96
ffc153dc: 7f 86 e3 78 mr r6,r28
ffc153e0: 48 00 60 19 bl ffc1b3f8 <_Chain_Initialize>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
ffc153e4: 38 1f 00 50 addi r0,r31,80
Chain_Node *tail = _Chain_Tail( the_chain );
ffc153e8: 39 3f 00 54 addi r9,r31,84
head->next = tail;
head->previous = NULL;
ffc153ec: 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(
ffc153f0: 7f e3 fb 78 mr r3,r31
tail->previous = head;
ffc153f4: 90 1f 00 58 stw r0,88(r31)
ffc153f8: 38 a0 00 80 li r5,128
ffc153fc: 38 c0 00 06 li r6,6
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc15400: 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;
ffc15404: 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(
ffc15408: 80 9d 00 00 lwz r4,0(r29)
ffc1540c: 68 84 00 01 xori r4,r4,1
ffc15410: 7c 84 00 34 cntlzw r4,r4
ffc15414: 54 84 d9 7e rlwinm r4,r4,27,5,31
ffc15418: 48 00 2d 15 bl ffc1812c <_Thread_queue_Initialize>
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
ffc1541c: 80 01 00 24 lwz r0,36(r1)
ffc15420: 7f c3 f3 78 mr r3,r30
ffc15424: 83 81 00 10 lwz r28,16(r1)
ffc15428: 7c 08 03 a6 mtlr r0
ffc1542c: 83 a1 00 14 lwz r29,20(r1)
ffc15430: 83 c1 00 18 lwz r30,24(r1)
ffc15434: 83 e1 00 1c lwz r31,28(r1)
ffc15438: 38 21 00 20 addi r1,r1,32
ffc1543c: 4e 80 00 20 blr
ffc09eb8 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
ffc09eb8: 94 21 ff d8 stwu r1,-40(r1)
ffc09ebc: 7c 08 02 a6 mflr r0
ffc09ec0: 93 c1 00 20 stw r30,32(r1)
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc09ec4: 3f c0 00 00 lis r30,0
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
ffc09ec8: 90 01 00 2c stw r0,44(r1)
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc09ecc: 80 1e 27 28 lwz r0,10024(r30)
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
ffc09ed0: 93 61 00 14 stw r27,20(r1)
ffc09ed4: 7c db 33 78 mr r27,r6
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc09ed8: 2f 80 00 00 cmpwi cr7,r0,0
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
ffc09edc: 93 81 00 18 stw r28,24(r1)
ffc09ee0: 7c bc 2b 78 mr r28,r5
ffc09ee4: 93 a1 00 1c stw r29,28(r1)
ffc09ee8: 7c 9d 23 78 mr r29,r4
ffc09eec: 93 e1 00 24 stw r31,36(r1)
ffc09ef0: 7c 7f 1b 78 mr r31,r3
ffc09ef4: 90 e1 00 08 stw r7,8(r1)
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc09ef8: 41 9e 00 0c beq- cr7,ffc09f04 <_CORE_mutex_Seize+0x4c>
ffc09efc: 2f 85 00 00 cmpwi cr7,r5,0
ffc09f00: 40 9e 00 5c bne- cr7,ffc09f5c <_CORE_mutex_Seize+0xa4> <== ALWAYS TAKEN
ffc09f04: 7f e3 fb 78 mr r3,r31
ffc09f08: 38 81 00 08 addi r4,r1,8
ffc09f0c: 48 00 5a d1 bl ffc0f9dc <_CORE_mutex_Seize_interrupt_trylock>
ffc09f10: 2f 83 00 00 cmpwi cr7,r3,0
ffc09f14: 41 9e 00 24 beq- cr7,ffc09f38 <_CORE_mutex_Seize+0x80>
ffc09f18: 2f 9c 00 00 cmpwi cr7,r28,0
ffc09f1c: 40 9e 00 60 bne- cr7,ffc09f7c <_CORE_mutex_Seize+0xc4>
ffc09f20: 80 01 00 08 lwz r0,8(r1)
ffc09f24: 7c 00 01 24 mtmsr r0
ffc09f28: 3d 20 00 00 lis r9,0
ffc09f2c: 81 29 2d 44 lwz r9,11588(r9)
ffc09f30: 38 00 00 01 li r0,1
ffc09f34: 90 09 00 34 stw r0,52(r9)
}
ffc09f38: 80 01 00 2c lwz r0,44(r1)
ffc09f3c: 83 61 00 14 lwz r27,20(r1)
ffc09f40: 7c 08 03 a6 mtlr r0
ffc09f44: 83 81 00 18 lwz r28,24(r1)
ffc09f48: 83 a1 00 1c lwz r29,28(r1)
ffc09f4c: 83 c1 00 20 lwz r30,32(r1)
ffc09f50: 83 e1 00 24 lwz r31,36(r1)
ffc09f54: 38 21 00 28 addi r1,r1,40
ffc09f58: 4e 80 00 20 blr
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc09f5c: 3d 20 00 00 lis r9,0
ffc09f60: 80 09 27 6c lwz r0,10092(r9)
ffc09f64: 2b 80 00 01 cmplwi cr7,r0,1
ffc09f68: 40 9d ff 9c ble+ cr7,ffc09f04 <_CORE_mutex_Seize+0x4c>
ffc09f6c: 38 60 00 00 li r3,0
ffc09f70: 38 80 00 00 li r4,0
ffc09f74: 38 a0 00 12 li r5,18
ffc09f78: 48 00 08 a1 bl ffc0a818 <_Internal_error_Occurred>
ffc09f7c: 3d 20 00 00 lis r9,0
ffc09f80: 81 7e 27 28 lwz r11,10024(r30)
ffc09f84: 81 29 2d 44 lwz r9,11588(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;
ffc09f88: 38 00 00 01 li r0,1
ffc09f8c: 90 1f 00 30 stw r0,48(r31)
ffc09f90: 38 0b 00 01 addi r0,r11,1
ffc09f94: 93 e9 00 44 stw r31,68(r9)
ffc09f98: 93 a9 00 20 stw r29,32(r9)
ffc09f9c: 90 1e 27 28 stw r0,10024(r30)
ffc09fa0: 80 01 00 08 lwz r0,8(r1)
ffc09fa4: 7c 00 01 24 mtmsr r0
ffc09fa8: 7f e3 fb 78 mr r3,r31
ffc09fac: 7f 64 db 78 mr r4,r27
ffc09fb0: 4b ff fe 45 bl ffc09df4 <_CORE_mutex_Seize_interrupt_blocking>
}
ffc09fb4: 80 01 00 2c lwz r0,44(r1)
ffc09fb8: 83 61 00 14 lwz r27,20(r1)
ffc09fbc: 7c 08 03 a6 mtlr r0
ffc09fc0: 83 81 00 18 lwz r28,24(r1)
ffc09fc4: 83 a1 00 1c lwz r29,28(r1)
ffc09fc8: 83 c1 00 20 lwz r30,32(r1)
ffc09fcc: 83 e1 00 24 lwz r31,36(r1)
ffc09fd0: 38 21 00 28 addi r1,r1,40
ffc09fd4: 4e 80 00 20 blr
ffc0f9dc <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
ffc0f9dc: 94 21 ff f8 stwu r1,-8(r1)
ffc0f9e0: 7c 08 02 a6 mflr r0
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
ffc0f9e4: 3d 60 00 00 lis r11,0
ffc0f9e8: 90 01 00 0c stw r0,12(r1)
ffc0f9ec: 7c 69 1b 78 mr r9,r3
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
ffc0f9f0: 80 03 00 50 lwz r0,80(r3)
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
ffc0f9f4: 81 6b 2d 44 lwz r11,11588(r11)
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
ffc0f9f8: 2f 80 00 00 cmpwi cr7,r0,0
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
ffc0f9fc: 38 00 00 00 li r0,0
ffc0fa00: 90 0b 00 34 stw r0,52(r11)
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
ffc0fa04: 41 9e 00 4c beq- cr7,ffc0fa50 <_CORE_mutex_Seize_interrupt_trylock+0x74>
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
ffc0fa08: 81 43 00 48 lwz r10,72(r3)
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
ffc0fa0c: 39 00 00 01 li r8,1
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
ffc0fa10: 80 eb 00 08 lwz r7,8(r11)
the_mutex->nest_count = 1;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
ffc0fa14: 2f 8a 00 02 cmpwi cr7,r10,2
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
ffc0fa18: 90 03 00 50 stw r0,80(r3)
the_mutex->holder = executing;
ffc0fa1c: 91 63 00 5c stw r11,92(r3)
the_mutex->holder_id = executing->Object.id;
ffc0fa20: 90 e3 00 60 stw r7,96(r3)
the_mutex->nest_count = 1;
ffc0fa24: 91 03 00 54 stw r8,84(r3)
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
ffc0fa28: 41 9e 00 60 beq- cr7,ffc0fa88 <_CORE_mutex_Seize_interrupt_trylock+0xac>
ffc0fa2c: 2f 8a 00 03 cmpwi cr7,r10,3
ffc0fa30: 41 9e 00 68 beq- cr7,ffc0fa98 <_CORE_mutex_Seize_interrupt_trylock+0xbc>
ffc0fa34: 80 04 00 00 lwz r0,0(r4)
ffc0fa38: 7c 00 01 24 mtmsr r0
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
return 0;
ffc0fa3c: 38 60 00 00 li r3,0
ffc0fa40: 80 01 00 0c lwz r0,12(r1)
ffc0fa44: 38 21 00 08 addi r1,r1,8
ffc0fa48: 7c 08 03 a6 mtlr r0
ffc0fa4c: 4e 80 00 20 blr
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
ffc0fa50: 80 03 00 5c lwz r0,92(r3)
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
ffc0fa54: 38 60 00 01 li r3,1
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
ffc0fa58: 7f 8b 00 00 cmpw cr7,r11,r0
ffc0fa5c: 40 9e ff e4 bne+ cr7,ffc0fa40 <_CORE_mutex_Seize_interrupt_trylock+0x64>
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
ffc0fa60: 80 09 00 40 lwz r0,64(r9)
ffc0fa64: 2f 80 00 00 cmpwi cr7,r0,0
ffc0fa68: 40 9e 00 84 bne- cr7,ffc0faec <_CORE_mutex_Seize_interrupt_trylock+0x110>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
ffc0fa6c: 81 69 00 54 lwz r11,84(r9)
ffc0fa70: 38 0b 00 01 addi r0,r11,1
ffc0fa74: 90 09 00 54 stw r0,84(r9)
ffc0fa78: 80 04 00 00 lwz r0,0(r4)
ffc0fa7c: 7c 00 01 24 mtmsr r0
_ISR_Enable( *level_p );
return 0;
ffc0fa80: 38 60 00 00 li r3,0
ffc0fa84: 4b ff ff bc b ffc0fa40 <_CORE_mutex_Seize_interrupt_trylock+0x64>
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
ffc0fa88: 81 2b 00 1c lwz r9,28(r11)
ffc0fa8c: 38 09 00 01 addi r0,r9,1
ffc0fa90: 90 0b 00 1c stw r0,28(r11)
ffc0fa94: 4b ff ff a0 b ffc0fa34 <_CORE_mutex_Seize_interrupt_trylock+0x58>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
ffc0fa98: 80 e3 00 4c lwz r7,76(r3)
current = executing->current_priority;
ffc0fa9c: 81 4b 00 14 lwz r10,20(r11)
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
ffc0faa0: 80 cb 00 1c lwz r6,28(r11)
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
ffc0faa4: 7f 87 50 00 cmpw cr7,r7,r10
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
ffc0faa8: 38 a6 00 01 addi r5,r6,1
ffc0faac: 90 ab 00 1c stw r5,28(r11)
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
ffc0fab0: 41 9e 00 90 beq- cr7,ffc0fb40 <_CORE_mutex_Seize_interrupt_trylock+0x164>
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
ffc0fab4: 7f 87 50 40 cmplw cr7,r7,r10
ffc0fab8: 41 9c 00 54 blt- cr7,ffc0fb0c <_CORE_mutex_Seize_interrupt_trylock+0x130>
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
ffc0fabc: 39 40 00 06 li r10,6
ffc0fac0: 91 4b 00 34 stw r10,52(r11)
the_mutex->lock = CORE_MUTEX_UNLOCKED;
ffc0fac4: 91 03 00 50 stw r8,80(r3)
the_mutex->nest_count = 0; /* undo locking above */
ffc0fac8: 90 03 00 54 stw r0,84(r3)
executing->resource_count--; /* undo locking above */
ffc0facc: 90 cb 00 1c stw r6,28(r11)
ffc0fad0: 80 04 00 00 lwz r0,0(r4)
ffc0fad4: 7c 00 01 24 mtmsr r0
ffc0fad8: 80 01 00 0c lwz r0,12(r1)
_ISR_Enable( *level_p );
return 0;
ffc0fadc: 38 60 00 00 li r3,0
ffc0fae0: 38 21 00 08 addi r1,r1,8
ffc0fae4: 7c 08 03 a6 mtlr r0
ffc0fae8: 4e 80 00 20 blr
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
ffc0faec: 2f 80 00 01 cmpwi cr7,r0,1
ffc0faf0: 40 9e ff 50 bne+ cr7,ffc0fa40 <_CORE_mutex_Seize_interrupt_trylock+0x64><== ALWAYS TAKEN
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
ffc0faf4: 38 00 00 02 li r0,2 <== NOT EXECUTED
ffc0faf8: 90 0b 00 34 stw r0,52(r11) <== NOT EXECUTED
ffc0fafc: 80 04 00 00 lwz r0,0(r4) <== NOT EXECUTED
ffc0fb00: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED
_ISR_Enable( *level_p );
return 0;
ffc0fb04: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc0fb08: 4b ff ff 38 b ffc0fa40 <_CORE_mutex_Seize_interrupt_trylock+0x64><== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc0fb0c: 3d 60 00 00 lis r11,0
ffc0fb10: 81 4b 27 28 lwz r10,10024(r11)
ffc0fb14: 38 0a 00 01 addi r0,r10,1
ffc0fb18: 90 0b 27 28 stw r0,10024(r11)
ffc0fb1c: 80 04 00 00 lwz r0,0(r4)
ffc0fb20: 7c 00 01 24 mtmsr r0
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
_Thread_Change_priority(
ffc0fb24: 80 63 00 5c lwz r3,92(r3)
ffc0fb28: 38 a0 00 00 li r5,0
ffc0fb2c: 80 89 00 4c lwz r4,76(r9)
ffc0fb30: 4b ff bb 65 bl ffc0b694 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
ffc0fb34: 4b ff c2 1d bl ffc0bd50 <_Thread_Enable_dispatch>
return 0;
ffc0fb38: 38 60 00 00 li r3,0
ffc0fb3c: 4b ff ff 04 b ffc0fa40 <_CORE_mutex_Seize_interrupt_trylock+0x64>
ffc0fb40: 80 04 00 00 lwz r0,0(r4)
ffc0fb44: 7c 00 01 24 mtmsr r0
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( *level_p );
return 0;
ffc0fb48: 38 60 00 00 li r3,0
ffc0fb4c: 4b ff fe f4 b ffc0fa40 <_CORE_mutex_Seize_interrupt_trylock+0x64>
ffc0a198 <_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
)
{
ffc0a198: 94 21 ff f0 stwu r1,-16(r1)
ffc0a19c: 7c 08 02 a6 mflr r0
ffc0a1a0: 93 e1 00 0c stw r31,12(r1)
ffc0a1a4: 7c 7f 1b 78 mr r31,r3
ffc0a1a8: 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)) ) {
ffc0a1ac: 48 00 1f e9 bl ffc0c194 <_Thread_queue_Dequeue>
ffc0a1b0: 2f 83 00 00 cmpwi cr7,r3,0
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
ffc0a1b4: 38 60 00 00 li r3,0
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
ffc0a1b8: 41 9e 00 18 beq- cr7,ffc0a1d0 <_CORE_semaphore_Surrender+0x38>
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
ffc0a1bc: 80 01 00 14 lwz r0,20(r1)
ffc0a1c0: 83 e1 00 0c lwz r31,12(r1)
ffc0a1c4: 38 21 00 10 addi r1,r1,16
ffc0a1c8: 7c 08 03 a6 mtlr r0
ffc0a1cc: 4e 80 00 20 blr
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0a1d0: 7c 00 00 a6 mfmsr r0
ffc0a1d4: 7d 30 42 a6 mfsprg r9,0
ffc0a1d8: 7c 09 48 78 andc r9,r0,r9
ffc0a1dc: 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 )
ffc0a1e0: 81 3f 00 48 lwz r9,72(r31)
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
ffc0a1e4: 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 )
ffc0a1e8: 81 7f 00 40 lwz r11,64(r31)
ffc0a1ec: 7f 89 58 40 cmplw cr7,r9,r11
ffc0a1f0: 40 9c 00 10 bge- cr7,ffc0a200 <_CORE_semaphore_Surrender+0x68><== NEVER TAKEN
the_semaphore->count += 1;
ffc0a1f4: 39 29 00 01 addi r9,r9,1
ffc0a1f8: 91 3f 00 48 stw r9,72(r31)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
ffc0a1fc: 38 60 00 00 li r3,0
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0a200: 7c 00 01 24 mtmsr r0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
ffc0a204: 80 01 00 14 lwz r0,20(r1)
ffc0a208: 83 e1 00 0c lwz r31,12(r1)
ffc0a20c: 38 21 00 10 addi r1,r1,16
ffc0a210: 7c 08 03 a6 mtlr r0
ffc0a214: 4e 80 00 20 blr
ffc0f984 <_Chain_Initialize>:
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
ffc0f984: 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;
ffc0f988: 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 );
ffc0f98c: 39 43 00 04 addi r10,r3,4
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
ffc0f990: 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;
ffc0f994: 7c 69 1b 78 mr r9,r3
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
ffc0f998: 41 82 00 38 beq- ffc0f9d0 <_Chain_Initialize+0x4c> <== NEVER TAKEN
ffc0f99c: 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;
ffc0f9a0: 7c a9 03 a6 mtctr r5
Chain_Node *next = starting_address;
ffc0f9a4: 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;
ffc0f9a8: 7c 6b 1b 78 mr r11,r3
ffc0f9ac: 48 00 00 0c b ffc0f9b8 <_Chain_Initialize+0x34>
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
ffc0f9b0: 7d 2b 4b 78 mr r11,r9
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
ffc0f9b4: 7c 09 03 78 mr r9,r0
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
current->next = next;
ffc0f9b8: 91 2b 00 00 stw r9,0(r11)
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
ffc0f9bc: 7c 09 32 14 add r0,r9,r6
head->previous = NULL;
while ( count-- ) {
current->next = next;
next->previous = current;
ffc0f9c0: 91 69 00 04 stw r11,4(r9)
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
ffc0f9c4: 42 00 ff ec bdnz+ ffc0f9b0 <_Chain_Initialize+0x2c>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
ffc0f9c8: 7c c6 41 d6 mullw r6,r6,r8
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
ffc0f9cc: 7d 24 32 14 add r9,r4,r6
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
ffc0f9d0: 91 49 00 00 stw r10,0(r9)
tail->previous = current;
ffc0f9d4: 91 23 00 08 stw r9,8(r3)
}
ffc0f9d8: 4e 80 00 20 blr
ffc0896c <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
ffc0896c: 94 21 ff f0 stwu r1,-16(r1)
ffc08970: 7c 08 02 a6 mflr r0
ffc08974: 90 01 00 14 stw r0,20(r1)
ffc08978: 93 e1 00 0c stw r31,12(r1)
ffc0897c: 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 ];
ffc08980: 81 63 01 2c lwz r11,300(r3)
option_set = (rtems_option) the_thread->Wait.option;
ffc08984: 80 c3 00 30 lwz r6,48(r3)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc08988: 7d 40 00 a6 mfmsr r10
ffc0898c: 7c 10 42 a6 mfsprg r0,0
ffc08990: 7d 40 00 78 andc r0,r10,r0
ffc08994: 7c 00 01 24 mtmsr r0
_ISR_Disable( level );
pending_events = api->pending_events;
ffc08998: 81 2b 00 00 lwz r9,0(r11)
event_condition = (rtems_event_set) the_thread->Wait.count;
ffc0899c: 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 ) ) {
ffc089a0: 7c 08 48 39 and. r8,r0,r9
ffc089a4: 41 82 00 b0 beq- ffc08a54 <_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() &&
ffc089a8: 3c e0 00 00 lis r7,0
ffc089ac: 38 e7 2d 38 addi r7,r7,11576
ffc089b0: 80 a7 00 08 lwz r5,8(r7)
ffc089b4: 2f 85 00 00 cmpwi cr7,r5,0
ffc089b8: 41 9e 00 10 beq- cr7,ffc089c8 <_Event_Surrender+0x5c>
ffc089bc: 80 e7 00 0c lwz r7,12(r7)
ffc089c0: 7f 83 38 00 cmpw cr7,r3,r7
ffc089c4: 41 9e 00 d0 beq- cr7,ffc08a94 <_Event_Surrender+0x128>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
ffc089c8: 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 ) ) {
ffc089cc: 70 e5 01 00 andi. r5,r7,256
ffc089d0: 41 82 00 6c beq- ffc08a3c <_Event_Surrender+0xd0>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
ffc089d4: 7f 80 40 00 cmpw cr7,r0,r8
ffc089d8: 41 9e 00 0c beq- cr7,ffc089e4 <_Event_Surrender+0x78>
ffc089dc: 70 c0 00 02 andi. r0,r6,2
ffc089e0: 41 82 00 5c beq- ffc08a3c <_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;
ffc089e4: 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) );
ffc089e8: 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;
ffc089ec: 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 );
ffc089f0: 91 2b 00 00 stw r9,0(r11)
the_thread->Wait.count = 0;
ffc089f4: 90 1f 00 24 stw r0,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc089f8: 91 07 00 00 stw r8,0(r7)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc089fc: 7c 00 00 a6 mfmsr r0
ffc08a00: 7d 40 01 24 mtmsr r10
ffc08a04: 7c 00 01 24 mtmsr r0
_ISR_Flash( level );
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
ffc08a08: 80 1f 00 50 lwz r0,80(r31)
ffc08a0c: 2f 80 00 02 cmpwi cr7,r0,2
ffc08a10: 41 9e 00 5c beq- cr7,ffc08a6c <_Event_Surrender+0x100>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc08a14: 7d 40 01 24 mtmsr r10
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc08a18: 3c 80 10 03 lis r4,4099
ffc08a1c: 7f e3 fb 78 mr r3,r31
ffc08a20: 60 84 ff f8 ori r4,r4,65528
ffc08a24: 48 00 2e 75 bl ffc0b898 <_Thread_Clear_state>
}
return;
}
}
_ISR_Enable( level );
}
ffc08a28: 80 01 00 14 lwz r0,20(r1)
ffc08a2c: 83 e1 00 0c lwz r31,12(r1)
ffc08a30: 38 21 00 10 addi r1,r1,16
ffc08a34: 7c 08 03 a6 mtlr r0
ffc08a38: 4e 80 00 20 blr
ffc08a3c: 7d 40 01 24 mtmsr r10
ffc08a40: 80 01 00 14 lwz r0,20(r1)
ffc08a44: 83 e1 00 0c lwz r31,12(r1)
ffc08a48: 38 21 00 10 addi r1,r1,16
ffc08a4c: 7c 08 03 a6 mtlr r0
ffc08a50: 4e 80 00 20 blr
ffc08a54: 7d 40 01 24 mtmsr r10
ffc08a58: 80 01 00 14 lwz r0,20(r1)
ffc08a5c: 83 e1 00 0c lwz r31,12(r1)
ffc08a60: 38 21 00 10 addi r1,r1,16
ffc08a64: 7c 08 03 a6 mtlr r0
ffc08a68: 4e 80 00 20 blr
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
ffc08a6c: 38 00 00 03 li r0,3
ffc08a70: 90 1f 00 50 stw r0,80(r31)
ffc08a74: 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 );
ffc08a78: 38 7f 00 48 addi r3,r31,72
ffc08a7c: 48 00 49 49 bl ffc0d3c4 <_Watchdog_Remove>
ffc08a80: 3c 80 10 03 lis r4,4099
ffc08a84: 7f e3 fb 78 mr r3,r31
ffc08a88: 60 84 ff f8 ori r4,r4,65528
ffc08a8c: 48 00 2e 0d bl ffc0b898 <_Thread_Clear_state>
ffc08a90: 4b ff ff b0 b ffc08a40 <_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) ||
ffc08a94: 3c e0 00 00 lis r7,0
ffc08a98: 80 a7 27 78 lwz r5,10104(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 ) &&
ffc08a9c: 2f 85 00 02 cmpwi cr7,r5,2
ffc08aa0: 41 9e 00 10 beq- cr7,ffc08ab0 <_Event_Surrender+0x144> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
ffc08aa4: 80 a7 27 78 lwz r5,10104(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) ||
ffc08aa8: 2f 85 00 01 cmpwi cr7,r5,1
ffc08aac: 40 9e ff 1c bne+ cr7,ffc089c8 <_Event_Surrender+0x5c>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
ffc08ab0: 7f 80 40 00 cmpw cr7,r0,r8
ffc08ab4: 41 9e 00 0c beq- cr7,ffc08ac0 <_Event_Surrender+0x154>
ffc08ab8: 70 c0 00 02 andi. r0,r6,2
ffc08abc: 41 82 00 24 beq- ffc08ae0 <_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;
ffc08ac0: 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;
ffc08ac4: 38 00 00 00 li r0,0
ffc08ac8: 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 );
ffc08acc: 91 2b 00 00 stw r9,0(r11)
the_thread->Wait.count = 0;
ffc08ad0: 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;
ffc08ad4: 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;
ffc08ad8: 91 06 00 00 stw r8,0(r6)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
ffc08adc: 90 07 27 78 stw r0,10104(r7)
ffc08ae0: 7d 40 01 24 mtmsr r10
ffc08ae4: 4b ff ff 5c b ffc08a40 <_Event_Surrender+0xd4>
ffc08ae8 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
ffc08ae8: 94 21 ff e8 stwu r1,-24(r1)
ffc08aec: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
ffc08af0: 38 81 00 08 addi r4,r1,8
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
ffc08af4: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
ffc08af8: 48 00 32 79 bl ffc0bd70 <_Thread_Get>
switch ( location ) {
ffc08afc: 80 01 00 08 lwz r0,8(r1)
ffc08b00: 2f 80 00 00 cmpwi cr7,r0,0
ffc08b04: 40 9e 00 50 bne- cr7,ffc08b54 <_Event_Timeout+0x6c> <== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc08b08: 7d 20 00 a6 mfmsr r9
ffc08b0c: 7d 70 42 a6 mfsprg r11,0
ffc08b10: 7d 2b 58 78 andc r11,r9,r11
ffc08b14: 7d 60 01 24 mtmsr r11
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc08b18: 3d 60 00 00 lis r11,0
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
ffc08b1c: 90 03 00 24 stw r0,36(r3)
if ( _Thread_Is_executing( the_thread ) ) {
ffc08b20: 81 6b 2d 44 lwz r11,11588(r11)
ffc08b24: 7f 83 58 00 cmpw cr7,r3,r11
ffc08b28: 41 9e 00 3c beq- cr7,ffc08b64 <_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;
ffc08b2c: 38 00 00 06 li r0,6
ffc08b30: 90 03 00 34 stw r0,52(r3)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc08b34: 7d 20 01 24 mtmsr r9
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc08b38: 3c 80 10 03 lis r4,4099
ffc08b3c: 60 84 ff f8 ori r4,r4,65528
ffc08b40: 48 00 2d 59 bl ffc0b898 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
ffc08b44: 3d 20 00 00 lis r9,0
ffc08b48: 81 69 27 28 lwz r11,10024(r9)
ffc08b4c: 38 0b ff ff addi r0,r11,-1
ffc08b50: 90 09 27 28 stw r0,10024(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc08b54: 80 01 00 1c lwz r0,28(r1)
ffc08b58: 38 21 00 18 addi r1,r1,24
ffc08b5c: 7c 08 03 a6 mtlr r0
ffc08b60: 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 )
ffc08b64: 3d 60 00 00 lis r11,0
ffc08b68: 80 0b 27 78 lwz r0,10104(r11)
ffc08b6c: 2f 80 00 01 cmpwi cr7,r0,1
ffc08b70: 40 9e ff bc bne+ cr7,ffc08b2c <_Event_Timeout+0x44>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
ffc08b74: 38 00 00 02 li r0,2
ffc08b78: 90 0b 27 78 stw r0,10104(r11)
ffc08b7c: 4b ff ff b0 b ffc08b2c <_Event_Timeout+0x44>
ffc0fbf4 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc0fbf4: 94 21 ff e0 stwu r1,-32(r1)
ffc0fbf8: 7c 08 02 a6 mflr r0
ffc0fbfc: 7d 80 00 26 mfcr r12
ffc0fc00: 7c 89 23 78 mr r9,r4
ffc0fc04: 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
ffc0fc08: 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 ) {
ffc0fc0c: 7f 84 00 40 cmplw cr7,r4,r0
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc0fc10: 93 a1 00 14 stw r29,20(r1)
ffc0fc14: 7c 7d 1b 78 mr r29,r3
ffc0fc18: 91 81 00 08 stw r12,8(r1)
ffc0fc1c: 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;
ffc0fc20: 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;
ffc0fc24: 38 60 00 00 li r3,0
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc0fc28: 93 81 00 10 stw r28,16(r1)
ffc0fc2c: 93 c1 00 18 stw r30,24(r1)
ffc0fc30: 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 ) {
ffc0fc34: 41 9d 01 60 bgt- cr7,ffc0fd94 <_Heap_Allocate_aligned_with_boundary+0x1a0>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
ffc0fc38: 2e 06 00 00 cmpwi cr4,r6,0
ffc0fc3c: 40 92 01 8c bne- cr4,ffc0fdc8 <_Heap_Allocate_aligned_with_boundary+0x1d4>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
ffc0fc40: 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 ) {
ffc0fc44: 38 60 00 00 li r3,0
ffc0fc48: 7f 9d 20 00 cmpw cr7,r29,r4
ffc0fc4c: 41 9e 01 48 beq- cr7,ffc0fd94 <_Heap_Allocate_aligned_with_boundary+0x1a0>
ffc0fc50: 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 ) {
ffc0fc54: 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
ffc0fc58: 3b 6c 00 07 addi r27,r12,7
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
ffc0fc5c: 23 89 00 04 subfic r28,r9,4
ffc0fc60: 48 00 00 24 b ffc0fc84 <_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;
ffc0fc64: 3b e4 00 08 addi r31,r4,8
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
ffc0fc68: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0fc6c: 40 9e 00 ec bne- cr7,ffc0fd58 <_Heap_Allocate_aligned_with_boundary+0x164><== ALWAYS TAKEN
break;
}
block = block->next;
ffc0fc70: 80 84 00 08 lwz r4,8(r4)
ffc0fc74: 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 ) {
ffc0fc78: 7f 9d 20 00 cmpw cr7,r29,r4
ffc0fc7c: 41 9e 01 44 beq- cr7,ffc0fdc0 <_Heap_Allocate_aligned_with_boundary+0x1cc>
ffc0fc80: 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 ) {
ffc0fc84: 81 64 00 04 lwz r11,4(r4)
ffc0fc88: 7f 80 58 40 cmplw cr7,r0,r11
ffc0fc8c: 40 bc ff e4 bge- cr7,ffc0fc70 <_Heap_Allocate_aligned_with_boundary+0x7c>
if ( alignment == 0 ) {
ffc0fc90: 41 a2 ff d4 beq- ffc0fc64 <_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;
ffc0fc94: 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;
}
ffc0fc98: 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;
ffc0fc9c: 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;
ffc0fca0: 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);
ffc0fca4: 7f ff 2b 96 divwu r31,r31,r5
ffc0fca8: 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;
ffc0fcac: 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
ffc0fcb0: 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 ) {
ffc0fcb4: 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;
ffc0fcb8: 38 64 00 08 addi r3,r4,8
ffc0fcbc: 40 9c 00 0c bge- cr7,ffc0fcc8 <_Heap_Allocate_aligned_with_boundary+0xd4>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc0fcc0: 7d 6b 2b 96 divwu r11,r11,r5
ffc0fcc4: 7f eb 29 d6 mullw r31,r11,r5
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
ffc0fcc8: 41 92 00 60 beq- cr4,ffc0fd28 <_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;
ffc0fccc: 7d 5f 4a 14 add r10,r31,r9
ffc0fcd0: 7d 6a 33 96 divwu r11,r10,r6
ffc0fcd4: 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 ) {
ffc0fcd8: 7f 9f 58 40 cmplw cr7,r31,r11
ffc0fcdc: 40 9c 00 4c bge- cr7,ffc0fd28 <_Heap_Allocate_aligned_with_boundary+0x134>
ffc0fce0: 7f 8a 58 40 cmplw cr7,r10,r11
ffc0fce4: 40 9d 00 44 ble- cr7,ffc0fd28 <_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;
ffc0fce8: 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 ) {
ffc0fcec: 7f 88 58 40 cmplw cr7,r8,r11
ffc0fcf0: 40 bd 00 10 ble+ cr7,ffc0fd00 <_Heap_Allocate_aligned_with_boundary+0x10c>
ffc0fcf4: 4b ff ff 7c b ffc0fc70 <_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 ) {
ffc0fcf8: 40 99 00 30 ble- cr6,ffc0fd28 <_Heap_Allocate_aligned_with_boundary+0x134>
if ( boundary_line < boundary_floor ) {
ffc0fcfc: 41 a5 ff 74 bgt- cr1,ffc0fc70 <_Heap_Allocate_aligned_with_boundary+0x7c><== NEVER TAKEN
return 0;
}
alloc_begin = boundary_line - alloc_size;
ffc0fd00: 7f e9 58 50 subf r31,r9,r11
ffc0fd04: 7f ff 2b 96 divwu r31,r31,r5
ffc0fd08: 7f ff 29 d6 mullw r31,r31,r5
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
ffc0fd0c: 7d 5f 4a 14 add r10,r31,r9
ffc0fd10: 7d 6a 33 96 divwu r11,r10,r6
ffc0fd14: 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 ) {
ffc0fd18: 7f 9f 58 40 cmplw cr7,r31,r11
ffc0fd1c: 7f 0a 58 40 cmplw cr6,r10,r11
if ( boundary_line < boundary_floor ) {
ffc0fd20: 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 ) {
ffc0fd24: 41 9c ff d4 blt+ cr7,ffc0fcf8 <_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 ) {
ffc0fd28: 7f 83 f8 40 cmplw cr7,r3,r31
ffc0fd2c: 41 bd ff 44 bgt- cr7,ffc0fc70 <_Heap_Allocate_aligned_with_boundary+0x7c>
ffc0fd30: 7d 7f 63 96 divwu r11,r31,r12
ffc0fd34: 7d 6b 61 d6 mullw r11,r11,r12
ffc0fd38: 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;
ffc0fd3c: 7d 6a 5a 14 add r11,r10,r11
if ( free_size >= min_block_size || free_size == 0 ) {
ffc0fd40: 7f 87 58 40 cmplw cr7,r7,r11
ffc0fd44: 40 bd ff 24 ble- cr7,ffc0fc68 <_Heap_Allocate_aligned_with_boundary+0x74>
ffc0fd48: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0fd4c: 40 be ff 24 bne- cr7,ffc0fc70 <_Heap_Allocate_aligned_with_boundary+0x7c>
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
ffc0fd50: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0fd54: 41 9e ff 1c beq+ cr7,ffc0fc70 <_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;
ffc0fd58: 81 7d 00 48 lwz r11,72(r29)
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ffc0fd5c: 7f a3 eb 78 mr r3,r29
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
stats->searches += search_count;
ffc0fd60: 80 1d 00 4c lwz r0,76(r29)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ffc0fd64: 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;
ffc0fd68: 39 6b 00 01 addi r11,r11,1
stats->searches += search_count;
ffc0fd6c: 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;
ffc0fd70: 91 7d 00 48 stw r11,72(r29)
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ffc0fd74: 7d 26 4b 78 mr r6,r9
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
stats->searches += search_count;
ffc0fd78: 90 1d 00 4c stw r0,76(r29)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ffc0fd7c: 4b ff a9 41 bl ffc0a6bc <_Heap_Block_allocate>
ffc0fd80: 7f e3 fb 78 mr r3,r31
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
ffc0fd84: 80 1d 00 44 lwz r0,68(r29)
ffc0fd88: 7f 80 f0 40 cmplw cr7,r0,r30
ffc0fd8c: 40 9c 00 08 bge- cr7,ffc0fd94 <_Heap_Allocate_aligned_with_boundary+0x1a0>
stats->max_search = search_count;
ffc0fd90: 93 dd 00 44 stw r30,68(r29)
}
return (void *) alloc_begin;
}
ffc0fd94: 80 01 00 24 lwz r0,36(r1)
ffc0fd98: 81 81 00 08 lwz r12,8(r1)
ffc0fd9c: 7c 08 03 a6 mtlr r0
ffc0fda0: 83 61 00 0c lwz r27,12(r1)
ffc0fda4: 83 81 00 10 lwz r28,16(r1)
ffc0fda8: 7d 80 81 20 mtcrf 8,r12
ffc0fdac: 83 a1 00 14 lwz r29,20(r1)
ffc0fdb0: 83 c1 00 18 lwz r30,24(r1)
ffc0fdb4: 83 e1 00 1c lwz r31,28(r1)
ffc0fdb8: 38 21 00 20 addi r1,r1,32
ffc0fdbc: 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 ) {
ffc0fdc0: 38 60 00 00 li r3,0
ffc0fdc4: 4b ff ff c0 b ffc0fd84 <_Heap_Allocate_aligned_with_boundary+0x190>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
ffc0fdc8: 7f 84 30 40 cmplw cr7,r4,r6
ffc0fdcc: 41 bd ff c8 bgt- cr7,ffc0fd94 <_Heap_Allocate_aligned_with_boundary+0x1a0>
return NULL;
}
if ( alignment == 0 ) {
ffc0fdd0: 2f 85 00 00 cmpwi cr7,r5,0
ffc0fdd4: 40 be fe 6c bne- cr7,ffc0fc40 <_Heap_Allocate_aligned_with_boundary+0x4c>
alignment = page_size;
ffc0fdd8: 7d 85 63 78 mr r5,r12
ffc0fddc: 4b ff fe 64 b ffc0fc40 <_Heap_Allocate_aligned_with_boundary+0x4c>
ffc102d0 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
ffc102d0: 94 21 ff c0 stwu r1,-64(r1)
ffc102d4: 7d 80 00 26 mfcr r12
ffc102d8: 7c 08 02 a6 mflr r0
ffc102dc: 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;
ffc102e0: 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 ) {
ffc102e4: 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
)
{
ffc102e8: 90 01 00 44 stw r0,68(r1)
ffc102ec: 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;
ffc102f0: 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
)
{
ffc102f4: 93 c1 00 38 stw r30,56(r1)
ffc102f8: 7c 7e 1b 78 mr r30,r3
ffc102fc: 93 01 00 20 stw r24,32(r1)
ffc10300: 93 21 00 24 stw r25,36(r1)
ffc10304: 7c d9 33 78 mr r25,r6
ffc10308: 93 61 00 2c stw r27,44(r1)
ffc1030c: 93 81 00 30 stw r28,48(r1)
ffc10310: 93 e1 00 3c stw r31,60(r1)
ffc10314: 7c 9f 23 78 mr r31,r4
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
ffc10318: 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;
ffc1031c: 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
)
{
ffc10320: 92 e1 00 1c stw r23,28(r1)
ffc10324: 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;
ffc10328: 93 41 00 08 stw r26,8(r1)
Heap_Block *extend_last_block = NULL;
ffc1032c: 93 41 00 0c stw r26,12(r1)
uintptr_t const page_size = heap->page_size;
ffc10330: 83 9e 00 10 lwz r28,16(r30)
uintptr_t const min_block_size = heap->min_block_size;
ffc10334: 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;
ffc10338: 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 ) {
ffc1033c: 40 9d 00 40 ble- cr7,ffc1037c <_Heap_Extend+0xac>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
ffc10340: 80 01 00 44 lwz r0,68(r1)
ffc10344: 81 81 00 18 lwz r12,24(r1)
ffc10348: 7c 08 03 a6 mtlr r0
ffc1034c: 82 e1 00 1c lwz r23,28(r1)
ffc10350: 83 01 00 20 lwz r24,32(r1)
ffc10354: 7d 81 81 20 mtcrf 24,r12
ffc10358: 83 21 00 24 lwz r25,36(r1)
ffc1035c: 83 41 00 28 lwz r26,40(r1)
ffc10360: 83 61 00 2c lwz r27,44(r1)
ffc10364: 83 81 00 30 lwz r28,48(r1)
ffc10368: 83 a1 00 34 lwz r29,52(r1)
ffc1036c: 83 c1 00 38 lwz r30,56(r1)
ffc10370: 83 e1 00 3c lwz r31,60(r1)
ffc10374: 38 21 00 40 addi r1,r1,64
ffc10378: 4e 80 00 20 blr
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
ffc1037c: 7c 83 23 78 mr r3,r4
ffc10380: 38 e1 00 08 addi r7,r1,8
ffc10384: 7c a4 2b 78 mr r4,r5
ffc10388: 39 01 00 0c addi r8,r1,12
ffc1038c: 7f 85 e3 78 mr r5,r28
ffc10390: 4b ff a5 65 bl ffc0a8f4 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
ffc10394: 2f 83 00 00 cmpwi cr7,r3,0
/* For simplicity we reject extend areas that are too small */
return false;
ffc10398: 7f 43 d3 78 mr r3,r26
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
ffc1039c: 41 be ff a4 beq- cr7,ffc10340 <_Heap_Extend+0x70>
ffc103a0: 7f 69 db 78 mr r9,r27
ffc103a4: 3a e0 00 00 li r23,0
ffc103a8: 38 00 00 00 li r0,0
ffc103ac: 39 00 00 00 li r8,0
ffc103b0: 48 00 00 44 b ffc103f4 <_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 ) {
ffc103b4: 7f 9d 58 40 cmplw cr7,r29,r11
ffc103b8: 40 9c 00 08 bge- cr7,ffc103c0 <_Heap_Extend+0xf0>
ffc103bc: 7d 20 4b 78 mr r0,r9
ffc103c0: 7d 4b e3 96 divwu r10,r11,r28
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
ffc103c4: 7f 8b f8 00 cmpw cr7,r11,r31
ffc103c8: 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);
ffc103cc: 39 4a ff f8 addi r10,r10,-8
ffc103d0: 41 9e 00 64 beq- cr7,ffc10434 <_Heap_Extend+0x164>
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
ffc103d4: 7f 9f 58 40 cmplw cr7,r31,r11
ffc103d8: 40 9d 00 08 ble- cr7,ffc103e0 <_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 )
ffc103dc: 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;
ffc103e0: 81 2a 00 04 lwz r9,4(r10)
ffc103e4: 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);
ffc103e8: 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 );
ffc103ec: 7f 9b 48 00 cmpw cr7,r27,r9
ffc103f0: 41 9e 00 60 beq- cr7,ffc10450 <_Heap_Extend+0x180>
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
ffc103f4: 7f 89 d8 00 cmpw cr7,r9,r27
ffc103f8: 7d 2a 4b 78 mr r10,r9
ffc103fc: 41 9e 01 b8 beq- cr7,ffc105b4 <_Heap_Extend+0x2e4>
uintptr_t const sub_area_end = start_block->prev_size;
ffc10400: 81 69 00 00 lwz r11,0(r9)
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
ffc10404: 7f 9f 58 40 cmplw cr7,r31,r11
ffc10408: 40 9c 00 0c bge- cr7,ffc10414 <_Heap_Extend+0x144>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
ffc1040c: 7f 8a e8 40 cmplw cr7,r10,r29
ffc10410: 41 9c 02 28 blt- cr7,ffc10638 <_Heap_Extend+0x368>
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
ffc10414: 7f 8a e8 00 cmpw cr7,r10,r29
ffc10418: 40 9e ff 9c bne+ cr7,ffc103b4 <_Heap_Extend+0xe4>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc1041c: 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 ) {
ffc10420: 7f 8b f8 00 cmpw cr7,r11,r31
ffc10424: 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 ) {
ffc10428: 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);
ffc1042c: 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 ) {
ffc10430: 40 9e ff a4 bne+ cr7,ffc103d4 <_Heap_Extend+0x104> <== ALWAYS TAKEN
start_block->prev_size = extend_area_end;
ffc10434: 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 )
ffc10438: 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;
ffc1043c: 81 2a 00 04 lwz r9,4(r10)
ffc10440: 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);
ffc10444: 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 );
ffc10448: 7f 9b 48 00 cmpw cr7,r27,r9
ffc1044c: 40 9e ff a8 bne+ cr7,ffc103f4 <_Heap_Extend+0x124> <== NEVER TAKEN
if ( extend_area_begin < heap->area_begin ) {
ffc10450: 81 3e 00 18 lwz r9,24(r30)
ffc10454: 7f 9f 48 40 cmplw cr7,r31,r9
ffc10458: 41 9c 01 64 blt- cr7,ffc105bc <_Heap_Extend+0x2ec>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
ffc1045c: 81 3e 00 1c lwz r9,28(r30)
ffc10460: 7f 9d 48 40 cmplw cr7,r29,r9
ffc10464: 40 9d 00 08 ble- cr7,ffc1046c <_Heap_Extend+0x19c>
heap->area_end = extend_area_end;
ffc10468: 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 ) {
ffc1046c: 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;
ffc10470: 81 21 00 08 lwz r9,8(r1)
ffc10474: 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 ) {
ffc10478: 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;
ffc1047c: 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 =
ffc10480: 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;
ffc10484: 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;
ffc10488: 91 4b 00 00 stw r10,0(r11)
extend_last_block->size_and_flag = 0;
ffc1048c: 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 =
ffc10490: 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;
ffc10494: 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 ) {
ffc10498: 40 9d 01 58 ble- cr7,ffc105f0 <_Heap_Extend+0x320> <== ALWAYS TAKEN
heap->first_block = extend_first_block;
ffc1049c: 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 ) {
ffc104a0: 2e 08 00 00 cmpwi cr4,r8,0
ffc104a4: 41 92 01 b0 beq- cr4,ffc10654 <_Heap_Extend+0x384>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
ffc104a8: 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 );
ffc104ac: 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;
ffc104b0: 7d 3f 03 96 divwu r9,r31,r0
ffc104b4: 7d 29 01 d6 mullw r9,r9,r0
if ( remainder != 0 ) {
ffc104b8: 7d 29 f8 51 subf. r9,r9,r31
ffc104bc: 41 82 00 0c beq- ffc104c8 <_Heap_Extend+0x1f8> <== ALWAYS TAKEN
return value - remainder + alignment;
ffc104c0: 7f ff 02 14 add r31,r31,r0 <== NOT EXECUTED
ffc104c4: 7f e9 f8 50 subf r31,r9,r31 <== NOT EXECUTED
uintptr_t const new_first_block_begin =
ffc104c8: 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;
ffc104cc: 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 =
ffc104d0: 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;
ffc104d4: 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;
ffc104d8: 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 );
ffc104dc: 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;
ffc104e0: 90 04 00 04 stw r0,4(r4)
_Heap_Free_block( heap, new_first_block );
ffc104e4: 4b ff fd b1 bl ffc10294 <_Heap_Free_block>
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
ffc104e8: 2d 9a 00 00 cmpwi cr3,r26,0
ffc104ec: 41 8e 01 18 beq- cr3,ffc10604 <_Heap_Extend+0x334>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc104f0: 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,
ffc104f4: 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(
ffc104f8: 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)
ffc104fc: 81 7a 00 04 lwz r11,4(r26)
ffc10500: 7c 00 4b 96 divwu r0,r0,r9
ffc10504: 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 );
ffc10508: 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)
ffc1050c: 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 =
ffc10510: 7d 20 d2 14 add r9,r0,r26
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
ffc10514: 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 =
ffc10518: 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 );
ffc1051c: 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;
ffc10520: 81 3a 00 04 lwz r9,4(r26)
ffc10524: 55 29 07 fe clrlwi r9,r9,31
block->size_and_flag = size | flag;
ffc10528: 7c 00 4b 78 or r0,r0,r9
ffc1052c: 90 1a 00 04 stw r0,4(r26)
ffc10530: 4b ff fd 65 bl ffc10294 <_Heap_Free_block>
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
ffc10534: 41 92 01 0c beq- cr4,ffc10640 <_Heap_Extend+0x370>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
ffc10538: 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 )
ffc1053c: 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(
ffc10540: 81 5e 00 20 lwz r10,32(r30)
*extended_size_ptr = extended_size;
return true;
ffc10544: 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;
ffc10548: 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;
ffc1054c: 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(
ffc10550: 7d 49 50 50 subf r10,r9,r10
/* Statistics */
stats->size += extended_size;
ffc10554: 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;
ffc10558: 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;
ffc1055c: 7f 18 40 50 subf r24,r24,r8
block->size_and_flag = size | flag;
ffc10560: 7d 4b 5b 78 or r11,r10,r11
/* Statistics */
stats->size += extended_size;
ffc10564: 7c 00 c2 14 add r0,r0,r24
ffc10568: 91 69 00 04 stw r11,4(r9)
ffc1056c: 90 1e 00 2c stw r0,44(r30)
if ( extended_size_ptr != NULL )
ffc10570: 41 be fd d0 beq- cr7,ffc10340 <_Heap_Extend+0x70> <== NEVER TAKEN
*extended_size_ptr = extended_size;
return true;
}
ffc10574: 80 01 00 44 lwz r0,68(r1)
ffc10578: 81 81 00 18 lwz r12,24(r1)
ffc1057c: 7c 08 03 a6 mtlr r0
/* Statistics */
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
ffc10580: 93 19 00 00 stw r24,0(r25)
return true;
}
ffc10584: 7d 81 81 20 mtcrf 24,r12
ffc10588: 82 e1 00 1c lwz r23,28(r1)
ffc1058c: 83 01 00 20 lwz r24,32(r1)
ffc10590: 83 21 00 24 lwz r25,36(r1)
ffc10594: 83 41 00 28 lwz r26,40(r1)
ffc10598: 83 61 00 2c lwz r27,44(r1)
ffc1059c: 83 81 00 30 lwz r28,48(r1)
ffc105a0: 83 a1 00 34 lwz r29,52(r1)
ffc105a4: 83 c1 00 38 lwz r30,56(r1)
ffc105a8: 83 e1 00 3c lwz r31,60(r1)
ffc105ac: 38 21 00 40 addi r1,r1,64
ffc105b0: 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;
ffc105b4: 81 5e 00 18 lwz r10,24(r30)
ffc105b8: 4b ff fe 48 b ffc10400 <_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 ) {
ffc105bc: 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;
ffc105c0: 81 21 00 08 lwz r9,8(r1)
ffc105c4: 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 ) {
ffc105c8: 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;
ffc105cc: 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 =
ffc105d0: 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;
ffc105d4: 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;
ffc105d8: 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;
ffc105dc: 91 4b 00 00 stw r10,0(r11)
extend_last_block->size_and_flag = 0;
ffc105e0: 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 =
ffc105e4: 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;
ffc105e8: 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 ) {
ffc105ec: 41 bd fe b0 bgt- cr7,ffc1049c <_Heap_Extend+0x1cc> <== ALWAYS TAKEN
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
ffc105f0: 81 3e 00 24 lwz r9,36(r30)
ffc105f4: 7f 89 58 40 cmplw cr7,r9,r11
ffc105f8: 40 bc fe a8 bge- cr7,ffc104a0 <_Heap_Extend+0x1d0>
heap->last_block = extend_last_block;
ffc105fc: 91 7e 00 24 stw r11,36(r30)
ffc10600: 4b ff fe a0 b ffc104a0 <_Heap_Extend+0x1d0>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
ffc10604: 2f 97 00 00 cmpwi cr7,r23,0
ffc10608: 41 be ff 2c beq- cr7,ffc10534 <_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;
ffc1060c: 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 );
ffc10610: 80 01 00 08 lwz r0,8(r1)
ffc10614: 55 29 07 fe clrlwi r9,r9,31
ffc10618: 7c 17 00 50 subf r0,r23,r0
block->size_and_flag = size | flag;
ffc1061c: 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(
ffc10620: 81 21 00 0c lwz r9,12(r1)
ffc10624: 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;
ffc10628: 80 09 00 04 lwz r0,4(r9)
ffc1062c: 60 00 00 01 ori r0,r0,1
ffc10630: 90 09 00 04 stw r0,4(r9)
ffc10634: 4b ff ff 00 b ffc10534 <_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;
ffc10638: 38 60 00 00 li r3,0
ffc1063c: 4b ff fd 04 b ffc10340 <_Heap_Extend+0x70>
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
ffc10640: 40 8e fe f8 bne+ cr3,ffc10538 <_Heap_Extend+0x268>
_Heap_Free_block( heap, extend_first_block );
ffc10644: 80 81 00 08 lwz r4,8(r1)
ffc10648: 7f c3 f3 78 mr r3,r30
ffc1064c: 4b ff fc 49 bl ffc10294 <_Heap_Free_block>
ffc10650: 4b ff fe e8 b ffc10538 <_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 ) {
ffc10654: 2f 80 00 00 cmpwi cr7,r0,0
ffc10658: 41 be fe 90 beq- cr7,ffc104e8 <_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;
ffc1065c: 7c 0b 00 50 subf r0,r11,r0
ffc10660: 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 =
ffc10664: 90 0b 00 04 stw r0,4(r11)
ffc10668: 4b ff fe 80 b ffc104e8 <_Heap_Extend+0x218>
ffc0fde0 <_Heap_Free>:
ffc0fde0: 80 03 00 10 lwz r0,16(r3)
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
ffc0fde4: 7c 69 1b 78 mr r9,r3
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
ffc0fde8: 81 63 00 20 lwz r11,32(r3)
bool next_is_free = false;
_Heap_Protection_block_check( heap, block );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
ffc0fdec: 38 60 00 00 li r3,0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc0fdf0: 7d 44 03 96 divwu r10,r4,r0
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
ffc0fdf4: 94 21 ff f0 stwu r1,-16(r1)
ffc0fdf8: 93 e1 00 0c stw r31,12(r1)
ffc0fdfc: 7d 4a 01 d6 mullw r10,r10,r0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc0fe00: 39 4a ff f8 addi r10,r10,-8
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
ffc0fe04: 7f 8a 58 40 cmplw cr7,r10,r11
ffc0fe08: 41 9c 01 24 blt- cr7,ffc0ff2c <_Heap_Free+0x14c>
ffc0fe0c: 80 09 00 24 lwz r0,36(r9)
ffc0fe10: 7f 8a 00 40 cmplw cr7,r10,r0
ffc0fe14: 41 9d 01 18 bgt- cr7,ffc0ff2c <_Heap_Free+0x14c>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0fe18: 80 ea 00 04 lwz r7,4(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;
ffc0fe1c: 54 e6 00 3c rlwinm r6,r7,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);
ffc0fe20: 7d 0a 32 14 add r8,r10,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;
ffc0fe24: 7f 8b 40 40 cmplw cr7,r11,r8
ffc0fe28: 41 9d 01 04 bgt- cr7,ffc0ff2c <_Heap_Free+0x14c> <== NEVER TAKEN
ffc0fe2c: 7f 80 40 40 cmplw cr7,r0,r8
ffc0fe30: 41 9c 00 fc blt- cr7,ffc0ff2c <_Heap_Free+0x14c> <== NEVER TAKEN
ffc0fe34: 80 a8 00 04 lwz r5,4(r8)
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc0fe38: 70 a4 00 01 andi. r4,r5,1
ffc0fe3c: 41 82 00 f0 beq- ffc0ff2c <_Heap_Free+0x14c>
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 ));
ffc0fe40: 7f 80 40 00 cmpw cr7,r0,r8
- 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;
ffc0fe44: 54 a4 00 3c rlwinm r4,r5,0,0,30
ffc0fe48: 38 a0 00 00 li r5,0
ffc0fe4c: 41 9e 00 18 beq- cr7,ffc0fe64 <_Heap_Free+0x84>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0fe50: 7c a8 22 14 add r5,r8,r4
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;
ffc0fe54: 80 a5 00 04 lwz r5,4(r5)
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
ffc0fe58: 70 a3 00 01 andi. r3,r5,1
ffc0fe5c: 7c a0 00 26 mfcr r5
ffc0fe60: 54 a5 1f fe rlwinm r5,r5,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 ) ) {
ffc0fe64: 70 e7 00 01 andi. r7,r7,1
ffc0fe68: 40 82 00 6c bne- ffc0fed4 <_Heap_Free+0xf4>
uintptr_t const prev_size = block->prev_size;
ffc0fe6c: 83 ea 00 00 lwz r31,0(r10)
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
_HAssert( false );
return( false );
ffc0fe70: 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);
ffc0fe74: 7d 9f 50 50 subf r12,r31,r10
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
ffc0fe78: 7f 8b 60 40 cmplw cr7,r11,r12
ffc0fe7c: 41 9d 00 b0 bgt- cr7,ffc0ff2c <_Heap_Free+0x14c> <== NEVER TAKEN
ffc0fe80: 7f 80 60 40 cmplw cr7,r0,r12
ffc0fe84: 7c e3 3b 78 mr r3,r7
ffc0fe88: 41 9c 00 a4 blt- cr7,ffc0ff2c <_Heap_Free+0x14c> <== 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;
ffc0fe8c: 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) ) {
ffc0fe90: 70 0b 00 01 andi. r11,r0,1
ffc0fe94: 41 82 00 98 beq- ffc0ff2c <_Heap_Free+0x14c> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
ffc0fe98: 2f 85 00 00 cmpwi cr7,r5,0
ffc0fe9c: 41 9e 00 e8 beq- cr7,ffc0ff84 <_Heap_Free+0x1a4>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
ffc0fea0: 80 e9 00 38 lwz r7,56(r9)
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
ffc0fea4: 7c 86 22 14 add r4,r6,r4
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0fea8: 81 68 00 08 lwz r11,8(r8)
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
ffc0feac: 7f e4 fa 14 add r31,r4,r31
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0feb0: 81 48 00 0c lwz r10,12(r8)
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0feb4: 63 e0 00 01 ori r0,r31,1
}
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;
ffc0feb8: 39 07 ff ff addi r8,r7,-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;
ffc0febc: 91 6a 00 08 stw r11,8(r10)
next->prev = prev;
ffc0fec0: 91 4b 00 0c stw r10,12(r11)
ffc0fec4: 91 09 00 38 stw r8,56(r9)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0fec8: 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;
ffc0fecc: 7f ec f9 2e stwx r31,r12,r31
ffc0fed0: 48 00 00 34 b ffc0ff04 <_Heap_Free+0x124>
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 */
ffc0fed4: 2f 85 00 00 cmpwi cr7,r5,0
ffc0fed8: 41 9e 00 60 beq- cr7,ffc0ff38 <_Heap_Free+0x158>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0fedc: 81 68 00 08 lwz r11,8(r8)
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;
ffc0fee0: 7c 84 32 14 add r4,r4,r6
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0fee4: 81 08 00 0c lwz r8,12(r8)
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;
ffc0fee8: 60 80 00 01 ori r0,r4,1
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
ffc0feec: 91 6a 00 08 stw r11,8(r10)
new_block->prev = prev;
ffc0fef0: 91 0a 00 0c stw r8,12(r10)
next->prev = new_block;
prev->next = new_block;
ffc0fef4: 91 48 00 08 stw r10,8(r8)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
ffc0fef8: 91 4b 00 0c stw r10,12(r11)
ffc0fefc: 90 0a 00 04 stw r0,4(r10)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
ffc0ff00: 7c 8a 21 2e stwx r4,r10,r4
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc0ff04: 81 69 00 40 lwz r11,64(r9)
++stats->frees;
stats->free_size += block_size;
return( true );
ffc0ff08: 38 60 00 01 li r3,1
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
ffc0ff0c: 81 09 00 50 lwz r8,80(r9)
stats->free_size += block_size;
ffc0ff10: 81 49 00 30 lwz r10,48(r9)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc0ff14: 39 6b ff ff addi r11,r11,-1
++stats->frees;
ffc0ff18: 38 08 00 01 addi r0,r8,1
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc0ff1c: 91 69 00 40 stw r11,64(r9)
++stats->frees;
stats->free_size += block_size;
ffc0ff20: 7c ca 32 14 add r6,r10,r6
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
ffc0ff24: 90 09 00 50 stw r0,80(r9)
stats->free_size += block_size;
ffc0ff28: 90 c9 00 30 stw r6,48(r9)
return( true );
}
ffc0ff2c: 83 e1 00 0c lwz r31,12(r1)
ffc0ff30: 38 21 00 10 addi r1,r1,16
ffc0ff34: 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;
ffc0ff38: 80 e9 00 38 lwz r7,56(r9)
if ( stats->max_free_blocks < stats->free_blocks ) {
ffc0ff3c: 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;
ffc0ff40: 38 07 00 01 addi r0,r7,1
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
ffc0ff44: 91 2a 00 0c stw r9,12(r10)
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;
ffc0ff48: 60 c7 00 01 ori r7,r6,1
ffc0ff4c: 90 ea 00 04 stw r7,4(r10)
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 ) {
ffc0ff50: 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;
ffc0ff54: 80 e8 00 04 lwz r7,4(r8)
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
ffc0ff58: 81 69 00 08 lwz r11,8(r9)
ffc0ff5c: 54 e7 00 3c rlwinm r7,r7,0,0,30
next_block->prev_size = block_size;
ffc0ff60: 7c ca 31 2e stwx r6,r10,r6
new_block->next = next;
ffc0ff64: 91 6a 00 08 stw r11,8(r10)
} 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;
ffc0ff68: 90 e8 00 04 stw r7,4(r8)
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
ffc0ff6c: 91 4b 00 0c stw r10,12(r11)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
ffc0ff70: 91 49 00 08 stw r10,8(r9)
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
ffc0ff74: 90 09 00 38 stw r0,56(r9)
if ( stats->max_free_blocks < stats->free_blocks ) {
ffc0ff78: 40 bd ff 8c ble- cr7,ffc0ff04 <_Heap_Free+0x124>
stats->max_free_blocks = stats->free_blocks;
ffc0ff7c: 90 09 00 3c stw r0,60(r9)
ffc0ff80: 4b ff ff 84 b ffc0ff04 <_Heap_Free+0x124>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
ffc0ff84: 7f e6 fa 14 add r31,r6,r31
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0ff88: 63 e0 00 01 ori r0,r31,1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
ffc0ff8c: 7f ea 31 2e stwx r31,r10,r6
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;
ffc0ff90: 90 0c 00 04 stw r0,4(r12)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc0ff94: 80 08 00 04 lwz r0,4(r8)
ffc0ff98: 54 00 00 3c rlwinm r0,r0,0,0,30
ffc0ff9c: 90 08 00 04 stw r0,4(r8)
ffc0ffa0: 4b ff ff 64 b ffc0ff04 <_Heap_Free+0x124>
ffc0b500 <_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;
ffc0b500: 2f 85 00 00 cmpwi cr7,r5,0
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
ffc0b504: 94 21 ff 98 stwu r1,-104(r1)
ffc0b508: 7c 08 02 a6 mflr r0
ffc0b50c: 92 e1 00 44 stw r23,68(r1)
ffc0b510: 90 01 00 6c stw r0,108(r1)
ffc0b514: 93 01 00 48 stw r24,72(r1)
ffc0b518: 93 21 00 4c stw r25,76(r1)
ffc0b51c: 7c 99 23 78 mr r25,r4
ffc0b520: 93 41 00 50 stw r26,80(r1)
ffc0b524: 93 61 00 54 stw r27,84(r1)
ffc0b528: 93 e1 00 64 stw r31,100(r1)
ffc0b52c: 7c 7f 1b 78 mr r31,r3
ffc0b530: 91 c1 00 20 stw r14,32(r1)
ffc0b534: 91 e1 00 24 stw r15,36(r1)
ffc0b538: 92 01 00 28 stw r16,40(r1)
ffc0b53c: 92 21 00 2c stw r17,44(r1)
ffc0b540: 92 41 00 30 stw r18,48(r1)
ffc0b544: 92 61 00 34 stw r19,52(r1)
ffc0b548: 92 81 00 38 stw r20,56(r1)
ffc0b54c: 92 a1 00 3c stw r21,60(r1)
ffc0b550: 92 c1 00 40 stw r22,64(r1)
ffc0b554: 93 81 00 58 stw r28,88(r1)
ffc0b558: 93 a1 00 5c stw r29,92(r1)
ffc0b55c: 93 c1 00 60 stw r30,96(r1)
uintptr_t const page_size = heap->page_size;
ffc0b560: 83 63 00 10 lwz r27,16(r3)
uintptr_t const min_block_size = heap->min_block_size;
ffc0b564: 83 03 00 14 lwz r24,20(r3)
Heap_Block *const first_block = heap->first_block;
ffc0b568: 83 43 00 20 lwz r26,32(r3)
Heap_Block *const last_block = heap->last_block;
ffc0b56c: 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;
ffc0b570: 41 9e 00 7c beq- cr7,ffc0b5ec <_Heap_Walk+0xec>
ffc0b574: 3d 20 ff c1 lis r9,-63
ffc0b578: 39 29 b4 00 addi r9,r9,-19456
ffc0b57c: 91 21 00 18 stw r9,24(r1)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc0b580: 3d 20 00 00 lis r9,0
return true;
ffc0b584: 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() ) ) {
ffc0b588: 80 09 27 6c lwz r0,10092(r9)
ffc0b58c: 2f 80 00 03 cmpwi cr7,r0,3
ffc0b590: 41 9e 00 7c beq- cr7,ffc0b60c <_Heap_Walk+0x10c> <== ALWAYS TAKEN
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b594: 80 01 00 6c lwz r0,108(r1)
ffc0b598: 81 c1 00 20 lwz r14,32(r1)
ffc0b59c: 7c 08 03 a6 mtlr r0
ffc0b5a0: 81 e1 00 24 lwz r15,36(r1)
ffc0b5a4: 82 01 00 28 lwz r16,40(r1)
ffc0b5a8: 82 21 00 2c lwz r17,44(r1)
ffc0b5ac: 82 41 00 30 lwz r18,48(r1)
ffc0b5b0: 82 61 00 34 lwz r19,52(r1)
ffc0b5b4: 82 81 00 38 lwz r20,56(r1)
ffc0b5b8: 82 a1 00 3c lwz r21,60(r1)
ffc0b5bc: 82 c1 00 40 lwz r22,64(r1)
ffc0b5c0: 82 e1 00 44 lwz r23,68(r1)
ffc0b5c4: 83 01 00 48 lwz r24,72(r1)
ffc0b5c8: 83 21 00 4c lwz r25,76(r1)
ffc0b5cc: 83 41 00 50 lwz r26,80(r1)
ffc0b5d0: 83 61 00 54 lwz r27,84(r1)
ffc0b5d4: 83 81 00 58 lwz r28,88(r1)
ffc0b5d8: 83 a1 00 5c lwz r29,92(r1)
ffc0b5dc: 83 c1 00 60 lwz r30,96(r1)
ffc0b5e0: 83 e1 00 64 lwz r31,100(r1)
ffc0b5e4: 38 21 00 68 addi r1,r1,104
ffc0b5e8: 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;
ffc0b5ec: 3d 20 ff c1 lis r9,-63
ffc0b5f0: 39 29 b3 fc addi r9,r9,-19460
ffc0b5f4: 91 21 00 18 stw r9,24(r1)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc0b5f8: 3d 20 00 00 lis r9,0
return true;
ffc0b5fc: 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() ) ) {
ffc0b600: 80 09 27 6c lwz r0,10092(r9)
ffc0b604: 2f 80 00 03 cmpwi cr7,r0,3
ffc0b608: 40 9e ff 8c bne+ cr7,ffc0b594 <_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)(
ffc0b60c: 80 1f 00 0c lwz r0,12(r31)
ffc0b610: 3c a0 ff c2 lis r5,-62
ffc0b614: 81 1f 00 18 lwz r8,24(r31)
ffc0b618: 7f 23 cb 78 mr r3,r25
ffc0b61c: 81 3f 00 1c lwz r9,28(r31)
ffc0b620: 38 80 00 00 li r4,0
ffc0b624: 81 7f 00 08 lwz r11,8(r31)
ffc0b628: 38 a5 a5 7c addi r5,r5,-23172
ffc0b62c: 90 01 00 10 stw r0,16(r1)
ffc0b630: 7f 66 db 78 mr r6,r27
ffc0b634: 7f 07 c3 78 mr r7,r24
ffc0b638: 80 01 00 18 lwz r0,24(r1)
ffc0b63c: 7f 4a d3 78 mr r10,r26
ffc0b640: 92 e1 00 08 stw r23,8(r1)
ffc0b644: 7c 09 03 a6 mtctr r0
ffc0b648: 91 61 00 0c stw r11,12(r1)
ffc0b64c: 4c c6 31 82 crclr 4*cr1+eq
ffc0b650: 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 ) {
ffc0b654: 2f 9b 00 00 cmpwi cr7,r27,0
ffc0b658: 41 9e 00 ac beq- cr7,ffc0b704 <_Heap_Walk+0x204>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
ffc0b65c: 73 67 00 07 andi. r7,r27,7
ffc0b660: 40 82 00 cc bne- ffc0b72c <_Heap_Walk+0x22c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0b664: 7c 18 db 96 divwu r0,r24,r27
ffc0b668: 7c 00 d9 d6 mullw r0,r0,r27
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
ffc0b66c: 7f 98 00 00 cmpw cr7,r24,r0
ffc0b670: 40 9e 00 e8 bne- cr7,ffc0b758 <_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;
ffc0b674: 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;
ffc0b678: 7d 20 db 96 divwu r9,r0,r27
ffc0b67c: 7d 29 d9 d6 mullw r9,r9,r27
);
return false;
}
if (
ffc0b680: 7f 80 48 00 cmpw cr7,r0,r9
ffc0b684: 40 9e 01 00 bne- cr7,ffc0b784 <_Heap_Walk+0x284>
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b688: 82 da 00 04 lwz r22,4(r26)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
ffc0b68c: 72 c7 00 01 andi. r7,r22,1
ffc0b690: 41 82 01 64 beq- ffc0b7f4 <_Heap_Walk+0x2f4>
- 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;
ffc0b694: 81 37 00 04 lwz r9,4(r23)
ffc0b698: 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);
ffc0b69c: 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;
ffc0b6a0: 80 09 00 04 lwz r0,4(r9)
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
ffc0b6a4: 70 07 00 01 andi. r7,r0,1
ffc0b6a8: 41 82 00 34 beq- ffc0b6dc <_Heap_Walk+0x1dc>
);
return false;
}
if (
ffc0b6ac: 7f 9a 48 00 cmpw cr7,r26,r9
ffc0b6b0: 41 9e 01 00 beq- cr7,ffc0b7b0 <_Heap_Walk+0x2b0> <== ALWAYS TAKEN
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
ffc0b6b4: 80 01 00 18 lwz r0,24(r1) <== NOT EXECUTED
ffc0b6b8: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED
ffc0b6bc: 7f 23 cb 78 mr r3,r25 <== NOT EXECUTED
ffc0b6c0: 38 80 00 01 li r4,1 <== NOT EXECUTED
ffc0b6c4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc0b6c8: 38 a5 a6 e4 addi r5,r5,-22812 <== NOT EXECUTED
ffc0b6cc: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc0b6d0: 4e 80 04 21 bctrl <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
ffc0b6d4: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc0b6d8: 4b ff fe bc b ffc0b594 <_Heap_Walk+0x94> <== NOT EXECUTED
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
ffc0b6dc: 80 01 00 18 lwz r0,24(r1)
ffc0b6e0: 3c a0 ff c2 lis r5,-62
ffc0b6e4: 7f 23 cb 78 mr r3,r25
ffc0b6e8: 38 80 00 01 li r4,1
ffc0b6ec: 7c 09 03 a6 mtctr r0
ffc0b6f0: 38 a5 a6 cc addi r5,r5,-22836
ffc0b6f4: 4c c6 31 82 crclr 4*cr1+eq
ffc0b6f8: 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;
ffc0b6fc: 38 60 00 00 li r3,0
ffc0b700: 4b ff fe 94 b ffc0b594 <_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" );
ffc0b704: 80 01 00 18 lwz r0,24(r1)
ffc0b708: 3c a0 ff c2 lis r5,-62
ffc0b70c: 7f 23 cb 78 mr r3,r25
ffc0b710: 38 80 00 01 li r4,1
ffc0b714: 7c 09 03 a6 mtctr r0
ffc0b718: 38 a5 a6 10 addi r5,r5,-23024
ffc0b71c: 4c c6 31 82 crclr 4*cr1+eq
ffc0b720: 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;
ffc0b724: 38 60 00 00 li r3,0
ffc0b728: 4b ff fe 6c b ffc0b594 <_Heap_Walk+0x94>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
ffc0b72c: 80 01 00 18 lwz r0,24(r1)
ffc0b730: 3c a0 ff c2 lis r5,-62
ffc0b734: 7f 23 cb 78 mr r3,r25
ffc0b738: 38 80 00 01 li r4,1
ffc0b73c: 7c 09 03 a6 mtctr r0
ffc0b740: 38 a5 a6 24 addi r5,r5,-23004
ffc0b744: 7f 66 db 78 mr r6,r27
ffc0b748: 4c c6 31 82 crclr 4*cr1+eq
ffc0b74c: 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;
ffc0b750: 38 60 00 00 li r3,0
ffc0b754: 4b ff fe 40 b ffc0b594 <_Heap_Walk+0x94>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
ffc0b758: 80 01 00 18 lwz r0,24(r1)
ffc0b75c: 3c a0 ff c2 lis r5,-62
ffc0b760: 7f 23 cb 78 mr r3,r25
ffc0b764: 38 80 00 01 li r4,1
ffc0b768: 7c 09 03 a6 mtctr r0
ffc0b76c: 38 a5 a6 44 addi r5,r5,-22972
ffc0b770: 7f 06 c3 78 mr r6,r24
ffc0b774: 4c c6 31 82 crclr 4*cr1+eq
ffc0b778: 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;
ffc0b77c: 38 60 00 00 li r3,0
ffc0b780: 4b ff fe 14 b ffc0b594 <_Heap_Walk+0x94>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
ffc0b784: 80 01 00 18 lwz r0,24(r1)
ffc0b788: 3c a0 ff c2 lis r5,-62
ffc0b78c: 7f 23 cb 78 mr r3,r25
ffc0b790: 38 80 00 01 li r4,1
ffc0b794: 7c 09 03 a6 mtctr r0
ffc0b798: 38 a5 a6 68 addi r5,r5,-22936
ffc0b79c: 7f 46 d3 78 mr r6,r26
ffc0b7a0: 4c c6 31 82 crclr 4*cr1+eq
ffc0b7a4: 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;
ffc0b7a8: 38 60 00 00 li r3,0
ffc0b7ac: 4b ff fd e8 b ffc0b594 <_Heap_Walk+0x94>
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b7b0: 80 df 00 08 lwz r6,8(r31)
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
ffc0b7b4: 81 1f 00 10 lwz r8,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 ) {
ffc0b7b8: 7f 9f 30 00 cmpw cr7,r31,r6
ffc0b7bc: 41 9e 01 28 beq- cr7,ffc0b8e4 <_Heap_Walk+0x3e4>
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b7c0: 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;
ffc0b7c4: 7f 80 30 40 cmplw cr7,r0,r6
ffc0b7c8: 40 9d 00 54 ble- cr7,ffc0b81c <_Heap_Walk+0x31c> <== 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)(
ffc0b7cc: 80 01 00 18 lwz r0,24(r1)
ffc0b7d0: 3c a0 ff c2 lis r5,-62
ffc0b7d4: 7f 23 cb 78 mr r3,r25
ffc0b7d8: 38 80 00 01 li r4,1
ffc0b7dc: 7c 09 03 a6 mtctr r0
ffc0b7e0: 38 a5 a7 14 addi r5,r5,-22764
ffc0b7e4: 4c c6 31 82 crclr 4*cr1+eq
ffc0b7e8: 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;
ffc0b7ec: 38 60 00 00 li r3,0
ffc0b7f0: 4b ff fd a4 b ffc0b594 <_Heap_Walk+0x94>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
ffc0b7f4: 80 01 00 18 lwz r0,24(r1)
ffc0b7f8: 3c a0 ff c2 lis r5,-62
ffc0b7fc: 7f 23 cb 78 mr r3,r25
ffc0b800: 38 80 00 01 li r4,1
ffc0b804: 7c 09 03 a6 mtctr r0
ffc0b808: 38 a5 a6 9c addi r5,r5,-22884
ffc0b80c: 4c c6 31 82 crclr 4*cr1+eq
ffc0b810: 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;
ffc0b814: 38 60 00 00 li r3,0
ffc0b818: 4b ff fd 7c b ffc0b594 <_Heap_Walk+0x94>
ffc0b81c: 81 5f 00 24 lwz r10,36(r31)
ffc0b820: 7f 8a 30 40 cmplw cr7,r10,r6
ffc0b824: 41 bc ff a8 blt- cr7,ffc0b7cc <_Heap_Walk+0x2cc> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc0b828: 39 26 00 08 addi r9,r6,8
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0b82c: 7d 69 43 96 divwu r11,r9,r8
ffc0b830: 7d 6b 41 d6 mullw r11,r11,r8
);
return false;
}
if (
ffc0b834: 7f 89 58 00 cmpw cr7,r9,r11
ffc0b838: 40 9e 03 a8 bne- cr7,ffc0bbe0 <_Heap_Walk+0x6e0> <== 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;
ffc0b83c: 81 26 00 04 lwz r9,4(r6)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0b840: 7f eb fb 78 mr r11,r31
ffc0b844: 7c c5 33 78 mr r5,r6
ffc0b848: 55 29 00 3c rlwinm r9,r9,0,0,30
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b84c: 7d 26 4a 14 add r9,r6,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;
ffc0b850: 81 29 00 04 lwz r9,4(r9)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0b854: 71 27 00 01 andi. r7,r9,1
ffc0b858: 41 a2 00 58 beq+ ffc0b8b0 <_Heap_Walk+0x3b0> <== ALWAYS TAKEN
ffc0b85c: 48 00 03 ac b ffc0bc08 <_Heap_Walk+0x708> <== NOT EXECUTED
return false;
}
prev_block = free_block;
free_block = free_block->next;
ffc0b860: 80 c6 00 08 lwz r6,8(r6)
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
ffc0b864: 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;
ffc0b868: 7f 00 30 40 cmplw cr6,r0,r6
ffc0b86c: 7c 86 50 40 cmplw cr1,r6,r10
ffc0b870: 41 9e 00 78 beq- cr7,ffc0b8e8 <_Heap_Walk+0x3e8>
ffc0b874: 41 b9 ff 58 bgt- cr6,ffc0b7cc <_Heap_Walk+0x2cc>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc0b878: 39 26 00 08 addi r9,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;
ffc0b87c: 41 a5 ff 50 bgt- cr1,ffc0b7cc <_Heap_Walk+0x2cc> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0b880: 7c e9 43 96 divwu r7,r9,r8
ffc0b884: 7c e7 41 d6 mullw r7,r7,r8
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0b888: 7c ab 2b 78 mr r11,r5
);
return false;
}
if (
ffc0b88c: 7f 89 38 00 cmpw cr7,r9,r7
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0b890: 7c c5 33 78 mr r5,r6
);
return false;
}
if (
ffc0b894: 40 9e 03 4c bne- cr7,ffc0bbe0 <_Heap_Walk+0x6e0>
- 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;
ffc0b898: 81 26 00 04 lwz r9,4(r6)
ffc0b89c: 55 29 00 3c rlwinm r9,r9,0,0,30
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b8a0: 7d 29 32 14 add r9,r9,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;
ffc0b8a4: 81 29 00 04 lwz r9,4(r9)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0b8a8: 71 27 00 01 andi. r7,r9,1
ffc0b8ac: 40 82 03 5c bne- ffc0bc08 <_Heap_Walk+0x708>
);
return false;
}
if ( free_block->prev != prev_block ) {
ffc0b8b0: 80 e6 00 0c lwz r7,12(r6)
ffc0b8b4: 7f 87 58 00 cmpw cr7,r7,r11
ffc0b8b8: 41 9e ff a8 beq+ cr7,ffc0b860 <_Heap_Walk+0x360>
(*printer)(
ffc0b8bc: 80 01 00 18 lwz r0,24(r1)
ffc0b8c0: 3c a0 ff c2 lis r5,-62
ffc0b8c4: 7f 23 cb 78 mr r3,r25
ffc0b8c8: 38 80 00 01 li r4,1
ffc0b8cc: 7c 09 03 a6 mtctr r0
ffc0b8d0: 38 a5 a7 80 addi r5,r5,-22656
ffc0b8d4: 4c c6 31 82 crclr 4*cr1+eq
ffc0b8d8: 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;
ffc0b8dc: 38 60 00 00 li r3,0
ffc0b8e0: 4b ff fc b4 b ffc0b594 <_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 ) {
ffc0b8e4: 80 1f 00 20 lwz r0,32(r31)
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0b8e8: 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)(
ffc0b8ec: 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)(
ffc0b8f0: 3e 40 ff c2 lis r18,-62
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0b8f4: 7f 5d d3 78 mr r29,r26
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0b8f8: 3a 73 a9 30 addi r19,r19,-22224
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
ffc0b8fc: 3a 94 a9 18 addi r20,r20,-22248
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)(
ffc0b900: 3a 52 a8 74 addi r18,r18,-22412
ffc0b904: 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)" : "")
ffc0b908: 3e a0 ff c2 lis r21,-62
ffc0b90c: 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)(
ffc0b910: 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)" : ""),
ffc0b914: 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;
ffc0b918: 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);
ffc0b91c: 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;
ffc0b920: 7f 80 f0 40 cmplw cr7,r0,r30
ffc0b924: 40 9d 00 34 ble- cr7,ffc0b958 <_Heap_Walk+0x458> <== 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)(
ffc0b928: 3c a0 ff c2 lis r5,-62
ffc0b92c: 7f 23 cb 78 mr r3,r25
ffc0b930: 38 80 00 01 li r4,1
ffc0b934: 38 a5 a7 b4 addi r5,r5,-22604
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
ffc0b938: 80 01 00 18 lwz r0,24(r1)
ffc0b93c: 7f a6 eb 78 mr r6,r29
ffc0b940: 7f c7 f3 78 mr r7,r30
ffc0b944: 7c 09 03 a6 mtctr r0
ffc0b948: 4c c6 31 82 crclr 4*cr1+eq
ffc0b94c: 4e 80 04 21 bctrl
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
ffc0b950: 38 60 00 00 li r3,0
ffc0b954: 4b ff fc 40 b ffc0b594 <_Heap_Walk+0x94>
ffc0b958: 80 1f 00 24 lwz r0,36(r31)
ffc0b95c: 7f 80 f0 40 cmplw cr7,r0,r30
ffc0b960: 41 bc ff c8 blt- cr7,ffc0b928 <_Heap_Walk+0x428>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0b964: 7d 3c db 96 divwu r9,r28,r27
ffc0b968: 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;
ffc0b96c: 7f a0 ba 78 xor r0,r29,r23
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
ffc0b970: 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;
ffc0b974: 7c 00 00 34 cntlzw r0,r0
ffc0b978: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc0b97c: 68 00 00 01 xori r0,r0,1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
ffc0b980: 41 9e 00 0c beq- cr7,ffc0b98c <_Heap_Walk+0x48c>
ffc0b984: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b988: 40 9e 01 e0 bne- cr7,ffc0bb68 <_Heap_Walk+0x668>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
ffc0b98c: 7f 98 e0 40 cmplw cr7,r24,r28
ffc0b990: 40 9d 00 0c ble- cr7,ffc0b99c <_Heap_Walk+0x49c>
ffc0b994: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b998: 40 9e 02 00 bne- cr7,ffc0bb98 <_Heap_Walk+0x698> <== ALWAYS TAKEN
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
ffc0b99c: 7f 9d f0 40 cmplw cr7,r29,r30
ffc0b9a0: 41 9c 00 0c blt- cr7,ffc0b9ac <_Heap_Walk+0x4ac>
ffc0b9a4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b9a8: 40 9e 02 24 bne- cr7,ffc0bbcc <_Heap_Walk+0x6cc>
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;
ffc0b9ac: 80 1e 00 04 lwz r0,4(r30)
ffc0b9b0: 56 d6 07 fe clrlwi r22,r22,31
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc0b9b4: 70 07 00 01 andi. r7,r0,1
ffc0b9b8: 41 82 00 74 beq- ffc0ba2c <_Heap_Walk+0x52c>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
ffc0b9bc: 2f 96 00 00 cmpwi cr7,r22,0
ffc0b9c0: 41 9e 00 40 beq- cr7,ffc0ba00 <_Heap_Walk+0x500>
(*printer)(
ffc0b9c4: 80 01 00 18 lwz r0,24(r1)
ffc0b9c8: 7f 23 cb 78 mr r3,r25
ffc0b9cc: 38 80 00 00 li r4,0
ffc0b9d0: 7e 85 a3 78 mr r5,r20
ffc0b9d4: 7c 09 03 a6 mtctr r0
ffc0b9d8: 7f a6 eb 78 mr r6,r29
ffc0b9dc: 7f 87 e3 78 mr r7,r28
ffc0b9e0: 4c c6 31 82 crclr 4*cr1+eq
ffc0b9e4: 4e 80 04 21 bctrl
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
ffc0b9e8: 7f 9a f0 00 cmpw cr7,r26,r30
ffc0b9ec: 41 9e 01 0c beq- cr7,ffc0baf8 <_Heap_Walk+0x5f8>
ffc0b9f0: 82 de 00 04 lwz r22,4(r30)
ffc0b9f4: 7f dd f3 78 mr r29,r30
ffc0b9f8: 80 1f 00 20 lwz r0,32(r31)
ffc0b9fc: 4b ff ff 1c b ffc0b918 <_Heap_Walk+0x418>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0ba00: 80 01 00 18 lwz r0,24(r1)
ffc0ba04: 7f a6 eb 78 mr r6,r29
ffc0ba08: 7f 23 cb 78 mr r3,r25
ffc0ba0c: 81 1d 00 00 lwz r8,0(r29)
ffc0ba10: 38 80 00 00 li r4,0
ffc0ba14: 7c 09 03 a6 mtctr r0
ffc0ba18: 7e 65 9b 78 mr r5,r19
ffc0ba1c: 7f 87 e3 78 mr r7,r28
ffc0ba20: 4c c6 31 82 crclr 4*cr1+eq
ffc0ba24: 4e 80 04 21 bctrl
ffc0ba28: 4b ff ff c0 b ffc0b9e8 <_Heap_Walk+0x4e8>
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 ?
ffc0ba2c: 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)(
ffc0ba30: 81 3f 00 08 lwz r9,8(r31)
block = next_block;
} while ( block != first_block );
return true;
}
ffc0ba34: 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)(
ffc0ba38: 7f 89 40 00 cmpw cr7,r9,r8
ffc0ba3c: 41 9e 01 00 beq- cr7,ffc0bb3c <_Heap_Walk+0x63c>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0ba40: 7f 9f 40 00 cmpw cr7,r31,r8
ffc0ba44: 41 9e 01 08 beq- cr7,ffc0bb4c <_Heap_Walk+0x64c>
ffc0ba48: 39 35 a8 e4 addi r9,r21,-22300
block->next,
block->next == last_free_block ?
ffc0ba4c: 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)(
ffc0ba50: 7f 80 50 00 cmpw cr7,r0,r10
ffc0ba54: 41 9e 00 e0 beq- cr7,ffc0bb34 <_Heap_Walk+0x634>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0ba58: 7f 9f 50 00 cmpw cr7,r31,r10
ffc0ba5c: 41 9e 00 e8 beq- cr7,ffc0bb44 <_Heap_Walk+0x644>
ffc0ba60: 38 15 a8 e4 addi r0,r21,-22300
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)(
ffc0ba64: 90 01 00 08 stw r0,8(r1)
ffc0ba68: 7f 23 cb 78 mr r3,r25
ffc0ba6c: 38 80 00 00 li r4,0
ffc0ba70: 80 01 00 18 lwz r0,24(r1)
ffc0ba74: 7e 45 93 78 mr r5,r18
ffc0ba78: 7f a6 eb 78 mr r6,r29
ffc0ba7c: 7f 87 e3 78 mr r7,r28
ffc0ba80: 7c 09 03 a6 mtctr r0
ffc0ba84: 4c c6 31 82 crclr 4*cr1+eq
ffc0ba88: 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 ) {
ffc0ba8c: 81 1e 00 00 lwz r8,0(r30)
ffc0ba90: 7f 9c 40 00 cmpw cr7,r28,r8
ffc0ba94: 40 9e 00 6c bne- cr7,ffc0bb00 <_Heap_Walk+0x600>
);
return false;
}
if ( !prev_used ) {
ffc0ba98: 2f 96 00 00 cmpwi cr7,r22,0
ffc0ba9c: 41 9e 00 b8 beq- cr7,ffc0bb54 <_Heap_Walk+0x654>
block = next_block;
} while ( block != first_block );
return true;
}
ffc0baa0: 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 ) {
ffc0baa4: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0baa8: 41 9e 00 24 beq- cr7,ffc0bacc <_Heap_Walk+0x5cc> <== NEVER TAKEN
if ( free_block == block ) {
ffc0baac: 7f 9d 48 00 cmpw cr7,r29,r9
ffc0bab0: 40 be 00 0c bne+ cr7,ffc0babc <_Heap_Walk+0x5bc>
ffc0bab4: 4b ff ff 34 b ffc0b9e8 <_Heap_Walk+0x4e8>
ffc0bab8: 41 ba ff 30 beq- cr6,ffc0b9e8 <_Heap_Walk+0x4e8>
return true;
}
free_block = free_block->next;
ffc0babc: 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 ) {
ffc0bac0: 7f 9f 48 00 cmpw cr7,r31,r9
if ( free_block == block ) {
ffc0bac4: 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 ) {
ffc0bac8: 40 9e ff f0 bne+ cr7,ffc0bab8 <_Heap_Walk+0x5b8>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
ffc0bacc: 3c a0 ff c2 lis r5,-62
ffc0bad0: 7f 23 cb 78 mr r3,r25
ffc0bad4: 38 80 00 01 li r4,1
ffc0bad8: 38 a5 a9 58 addi r5,r5,-22184
ffc0badc: 80 01 00 18 lwz r0,24(r1)
ffc0bae0: 7f a6 eb 78 mr r6,r29
ffc0bae4: 7c 09 03 a6 mtctr r0
ffc0bae8: 4c c6 31 82 crclr 4*cr1+eq
ffc0baec: 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;
ffc0baf0: 38 60 00 00 li r3,0
ffc0baf4: 4b ff fa a0 b ffc0b594 <_Heap_Walk+0x94>
}
block = next_block;
} while ( block != first_block );
return true;
ffc0baf8: 38 60 00 01 li r3,1
ffc0bafc: 4b ff fa 98 b ffc0b594 <_Heap_Walk+0x94>
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
ffc0bb00: 80 01 00 18 lwz r0,24(r1)
ffc0bb04: 3c a0 ff c2 lis r5,-62
ffc0bb08: 7f 23 cb 78 mr r3,r25
ffc0bb0c: 38 80 00 01 li r4,1
ffc0bb10: 7c 09 03 a6 mtctr r0
ffc0bb14: 38 a5 a8 ac addi r5,r5,-22356
ffc0bb18: 7f a6 eb 78 mr r6,r29
ffc0bb1c: 7f 87 e3 78 mr r7,r28
ffc0bb20: 7f c9 f3 78 mr r9,r30
ffc0bb24: 4c c6 31 82 crclr 4*cr1+eq
ffc0bb28: 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;
ffc0bb2c: 38 60 00 00 li r3,0
ffc0bb30: 4b ff fa 64 b ffc0b594 <_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)(
ffc0bb34: 38 11 a5 60 addi r0,r17,-23200
ffc0bb38: 4b ff ff 2c b ffc0ba64 <_Heap_Walk+0x564>
ffc0bb3c: 39 30 a5 44 addi r9,r16,-23228
ffc0bb40: 4b ff ff 0c b ffc0ba4c <_Heap_Walk+0x54c>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0bb44: 38 0f a5 70 addi r0,r15,-23184
ffc0bb48: 4b ff ff 1c b ffc0ba64 <_Heap_Walk+0x564>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0bb4c: 39 2e a5 54 addi r9,r14,-23212
ffc0bb50: 4b ff fe fc b ffc0ba4c <_Heap_Walk+0x54c>
return false;
}
if ( !prev_used ) {
(*printer)(
ffc0bb54: 3c a0 ff c2 lis r5,-62
ffc0bb58: 7f 23 cb 78 mr r3,r25
ffc0bb5c: 38 80 00 01 li r4,1
ffc0bb60: 38 a5 a8 e8 addi r5,r5,-22296
ffc0bb64: 4b ff ff 78 b ffc0badc <_Heap_Walk+0x5dc>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
ffc0bb68: 80 01 00 18 lwz r0,24(r1)
ffc0bb6c: 3c a0 ff c2 lis r5,-62
ffc0bb70: 7f 23 cb 78 mr r3,r25
ffc0bb74: 38 80 00 01 li r4,1
ffc0bb78: 7c 09 03 a6 mtctr r0
ffc0bb7c: 38 a5 a7 e4 addi r5,r5,-22556
ffc0bb80: 7f a6 eb 78 mr r6,r29
ffc0bb84: 7f 87 e3 78 mr r7,r28
ffc0bb88: 4c c6 31 82 crclr 4*cr1+eq
ffc0bb8c: 4e 80 04 21 bctrl
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
ffc0bb90: 38 60 00 00 li r3,0
ffc0bb94: 4b ff fa 00 b ffc0b594 <_Heap_Walk+0x94>
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
ffc0bb98: 80 01 00 18 lwz r0,24(r1)
ffc0bb9c: 3c a0 ff c2 lis r5,-62
ffc0bba0: 7f 23 cb 78 mr r3,r25
ffc0bba4: 38 80 00 01 li r4,1
ffc0bba8: 7c 09 03 a6 mtctr r0
ffc0bbac: 38 a5 a8 14 addi r5,r5,-22508
ffc0bbb0: 7f a6 eb 78 mr r6,r29
ffc0bbb4: 7f 87 e3 78 mr r7,r28
ffc0bbb8: 7f 08 c3 78 mr r8,r24
ffc0bbbc: 4c c6 31 82 crclr 4*cr1+eq
ffc0bbc0: 4e 80 04 21 bctrl
block,
block_size,
min_block_size
);
return false;
ffc0bbc4: 38 60 00 00 li r3,0
ffc0bbc8: 4b ff f9 cc b ffc0b594 <_Heap_Walk+0x94>
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
ffc0bbcc: 3c a0 ff c2 lis r5,-62
ffc0bbd0: 7f 23 cb 78 mr r3,r25
ffc0bbd4: 38 80 00 01 li r4,1
ffc0bbd8: 38 a5 a8 40 addi r5,r5,-22464
ffc0bbdc: 4b ff fd 5c b ffc0b938 <_Heap_Walk+0x438>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
ffc0bbe0: 80 01 00 18 lwz r0,24(r1)
ffc0bbe4: 3c a0 ff c2 lis r5,-62
ffc0bbe8: 7f 23 cb 78 mr r3,r25
ffc0bbec: 38 80 00 01 li r4,1
ffc0bbf0: 7c 09 03 a6 mtctr r0
ffc0bbf4: 38 a5 a7 34 addi r5,r5,-22732
ffc0bbf8: 4c c6 31 82 crclr 4*cr1+eq
ffc0bbfc: 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;
ffc0bc00: 38 60 00 00 li r3,0
ffc0bc04: 4b ff f9 90 b ffc0b594 <_Heap_Walk+0x94>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
ffc0bc08: 80 01 00 18 lwz r0,24(r1)
ffc0bc0c: 3c a0 ff c2 lis r5,-62
ffc0bc10: 7f 23 cb 78 mr r3,r25
ffc0bc14: 38 80 00 01 li r4,1
ffc0bc18: 7c 09 03 a6 mtctr r0
ffc0bc1c: 38 a5 a7 64 addi r5,r5,-22684
ffc0bc20: 4c c6 31 82 crclr 4*cr1+eq
ffc0bc24: 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;
ffc0bc28: 38 60 00 00 li r3,0
ffc0bc2c: 4b ff f9 68 b ffc0b594 <_Heap_Walk+0x94>
ffc0b400 <_Heap_Walk_print>:
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc0b400: 94 21 ff 88 stwu r1,-120(r1)
ffc0b404: 7c 08 02 a6 mflr r0
ffc0b408: 93 e1 00 74 stw r31,116(r1)
ffc0b40c: 90 01 00 7c stw r0,124(r1)
ffc0b410: 7c 60 1b 78 mr r0,r3
ffc0b414: 90 c1 00 1c stw r6,28(r1)
ffc0b418: 90 e1 00 20 stw r7,32(r1)
ffc0b41c: 91 01 00 24 stw r8,36(r1)
ffc0b420: 91 21 00 28 stw r9,40(r1)
ffc0b424: 91 41 00 2c stw r10,44(r1)
ffc0b428: 40 86 00 24 bne- cr1,ffc0b44c <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN
ffc0b42c: d8 21 00 30 stfd f1,48(r1)
ffc0b430: d8 41 00 38 stfd f2,56(r1)
ffc0b434: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc0b438: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc0b43c: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc0b440: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc0b444: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc0b448: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list ap;
if ( error ) {
ffc0b44c: 2f 84 00 00 cmpwi cr7,r4,0
{
/* Do nothing */
}
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc0b450: 7c bf 2b 78 mr r31,r5
va_list ap;
if ( error ) {
ffc0b454: 40 9e 00 58 bne- cr7,ffc0b4ac <_Heap_Walk_print+0xac>
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
ffc0b458: 3c 60 ff c2 lis r3,-62
ffc0b45c: 7c 04 03 78 mr r4,r0
ffc0b460: 38 63 a5 38 addi r3,r3,-23240
ffc0b464: 4c c6 31 82 crclr 4*cr1+eq
ffc0b468: 4b ff b1 89 bl ffc065f0 <printk>
}
va_start( ap, fmt );
ffc0b46c: 38 00 00 03 li r0,3
ffc0b470: 98 01 00 08 stb r0,8(r1)
ffc0b474: 38 00 00 00 li r0,0
vprintk( fmt, ap );
ffc0b478: 7f e3 fb 78 mr r3,r31
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b47c: 98 01 00 09 stb r0,9(r1)
ffc0b480: 38 01 00 80 addi r0,r1,128
vprintk( fmt, ap );
ffc0b484: 38 81 00 08 addi r4,r1,8
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b488: 90 01 00 0c stw r0,12(r1)
ffc0b48c: 38 01 00 10 addi r0,r1,16
ffc0b490: 90 01 00 10 stw r0,16(r1)
vprintk( fmt, ap );
ffc0b494: 4b ff d5 59 bl ffc089ec <vprintk>
va_end( ap );
}
ffc0b498: 80 01 00 7c lwz r0,124(r1)
ffc0b49c: 83 e1 00 74 lwz r31,116(r1)
ffc0b4a0: 38 21 00 78 addi r1,r1,120
ffc0b4a4: 7c 08 03 a6 mtlr r0
ffc0b4a8: 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 );
ffc0b4ac: 3c 60 ff c2 lis r3,-62
ffc0b4b0: 7c 04 03 78 mr r4,r0
ffc0b4b4: 38 63 a5 2c addi r3,r3,-23252
ffc0b4b8: 4c c6 31 82 crclr 4*cr1+eq
ffc0b4bc: 4b ff b1 35 bl ffc065f0 <printk>
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b4c0: 38 00 00 03 li r0,3
ffc0b4c4: 98 01 00 08 stb r0,8(r1)
ffc0b4c8: 38 00 00 00 li r0,0
vprintk( fmt, ap );
ffc0b4cc: 7f e3 fb 78 mr r3,r31
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b4d0: 98 01 00 09 stb r0,9(r1)
ffc0b4d4: 38 01 00 80 addi r0,r1,128
vprintk( fmt, ap );
ffc0b4d8: 38 81 00 08 addi r4,r1,8
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b4dc: 90 01 00 0c stw r0,12(r1)
ffc0b4e0: 38 01 00 10 addi r0,r1,16
ffc0b4e4: 90 01 00 10 stw r0,16(r1)
vprintk( fmt, ap );
ffc0b4e8: 4b ff d5 05 bl ffc089ec <vprintk>
va_end( ap );
}
ffc0b4ec: 80 01 00 7c lwz r0,124(r1)
ffc0b4f0: 83 e1 00 74 lwz r31,116(r1)
ffc0b4f4: 38 21 00 78 addi r1,r1,120
ffc0b4f8: 7c 08 03 a6 mtlr r0
ffc0b4fc: 4e 80 00 20 blr
ffc09934 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
ffc09934: 94 21 ff f0 stwu r1,-16(r1)
ffc09938: 7c 08 02 a6 mflr r0
ffc0993c: 93 c1 00 08 stw r30,8(r1)
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
ffc09940: 3f c0 00 00 lis r30,0
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
ffc09944: 90 01 00 14 stw r0,20(r1)
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
ffc09948: 80 1e 27 7c lwz r0,10108(r30)
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
ffc0994c: 93 e1 00 0c stw r31,12(r1)
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
ffc09950: 2f 80 00 00 cmpwi cr7,r0,0
ffc09954: 41 9e 00 2c beq- cr7,ffc09980 <_IO_Initialize_all_drivers+0x4c><== NEVER TAKEN
ffc09958: 3b e0 00 00 li r31,0
ffc0995c: 3b de 27 7c addi r30,r30,10108
(void) rtems_io_initialize( major, 0, NULL );
ffc09960: 7f e3 fb 78 mr r3,r31
ffc09964: 38 80 00 00 li r4,0
ffc09968: 38 a0 00 00 li r5,0
ffc0996c: 48 00 5f bd bl ffc0f928 <rtems_io_initialize>
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
ffc09970: 80 1e 00 00 lwz r0,0(r30)
ffc09974: 3b ff 00 01 addi r31,r31,1
ffc09978: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0997c: 41 9d ff e4 bgt+ cr7,ffc09960 <_IO_Initialize_all_drivers+0x2c>
(void) rtems_io_initialize( major, 0, NULL );
}
ffc09980: 80 01 00 14 lwz r0,20(r1)
ffc09984: 83 c1 00 08 lwz r30,8(r1)
ffc09988: 7c 08 03 a6 mtlr r0
ffc0998c: 83 e1 00 0c lwz r31,12(r1)
ffc09990: 38 21 00 10 addi r1,r1,16
ffc09994: 4e 80 00 20 blr
ffc09824 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc09824: 94 21 ff e0 stwu r1,-32(r1)
ffc09828: 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;
ffc0982c: 3d 20 00 00 lis r9,0
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc09830: 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;
ffc09834: 39 29 20 a0 addi r9,r9,8352
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc09838: 93 a1 00 14 stw r29,20(r1)
ffc0983c: 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;
ffc09840: 83 a9 00 30 lwz r29,48(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;
ffc09844: 83 c9 00 34 lwz r30,52(r9)
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc09848: 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 )
ffc0984c: 7f 9e e8 40 cmplw cr7,r30,r29
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc09850: 93 61 00 0c stw r27,12(r1)
ffc09854: 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;
ffc09858: 83 e9 00 38 lwz r31,56(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 )
ffc0985c: 40 9c 00 a4 bge- cr7,ffc09900 <_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 )
ffc09860: 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(
ffc09864: 7f 63 db 78 mr r3,r27
ffc09868: 48 00 3d ed bl ffc0d654 <_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 *)
ffc0986c: 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;
ffc09870: 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 *)
ffc09874: 90 7c 27 80 stw r3,10112(r28)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
ffc09878: 38 80 00 00 li r4,0
ffc0987c: 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;
ffc09880: 93 a9 27 7c stw r29,10108(r9)
memset(
ffc09884: 48 00 98 19 bl ffc1309c <memset>
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
ffc09888: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0988c: 41 9e 00 50 beq- cr7,ffc098dc <_IO_Manager_initialization+0xb8><== NEVER TAKEN
ffc09890: 7f c9 03 a6 mtctr r30
ffc09894: 81 1c 27 80 lwz r8,10112(r28)
ffc09898: 39 40 00 00 li r10,0
_IO_Driver_address_table[index] = driver_table[index];
ffc0989c: 7f e9 fb 78 mr r9,r31
ffc098a0: 7c a9 50 6e lwzux r5,r9,r10
ffc098a4: 7d 68 52 14 add r11,r8,r10
ffc098a8: 80 e9 00 08 lwz r7,8(r9)
ffc098ac: 80 09 00 0c lwz r0,12(r9)
ffc098b0: 80 c9 00 04 lwz r6,4(r9)
ffc098b4: 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++ )
ffc098b8: 39 4a 00 18 addi r10,r10,24
_IO_Driver_address_table[index] = driver_table[index];
ffc098bc: 90 cb 00 04 stw r6,4(r11)
ffc098c0: 90 eb 00 08 stw r7,8(r11)
ffc098c4: 90 0b 00 0c stw r0,12(r11)
ffc098c8: 80 e9 00 10 lwz r7,16(r9)
ffc098cc: 80 09 00 14 lwz r0,20(r9)
ffc098d0: 90 eb 00 10 stw r7,16(r11)
ffc098d4: 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++ )
ffc098d8: 42 00 ff c4 bdnz+ ffc0989c <_IO_Manager_initialization+0x78>
_IO_Driver_address_table[index] = driver_table[index];
}
ffc098dc: 80 01 00 24 lwz r0,36(r1)
ffc098e0: 83 61 00 0c lwz r27,12(r1)
ffc098e4: 7c 08 03 a6 mtlr r0
ffc098e8: 83 81 00 10 lwz r28,16(r1)
ffc098ec: 83 a1 00 14 lwz r29,20(r1)
ffc098f0: 83 c1 00 18 lwz r30,24(r1)
ffc098f4: 83 e1 00 1c lwz r31,28(r1)
ffc098f8: 38 21 00 20 addi r1,r1,32
ffc098fc: 4e 80 00 20 blr
ffc09900: 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;
ffc09904: 3d 20 00 00 lis r9,0
ffc09908: 93 e9 27 80 stw r31,10112(r9)
_IO_Number_of_drivers = number_of_drivers;
ffc0990c: 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];
}
ffc09910: 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;
ffc09914: 93 c9 27 7c stw r30,10108(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];
}
ffc09918: 83 61 00 0c lwz r27,12(r1)
ffc0991c: 83 81 00 10 lwz r28,16(r1)
ffc09920: 83 a1 00 14 lwz r29,20(r1)
ffc09924: 83 c1 00 18 lwz r30,24(r1)
ffc09928: 83 e1 00 1c lwz r31,28(r1)
ffc0992c: 38 21 00 20 addi r1,r1,32
ffc09930: 4e 80 00 20 blr
ffc0a818 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0a818: 94 21 ff f0 stwu r1,-16(r1)
ffc0a81c: 7c 08 02 a6 mflr r0
_Internal_errors_What_happened.the_source = the_source;
ffc0a820: 3d 60 00 00 lis r11,0
ffc0a824: 39 2b 2c 50 addi r9,r11,11344
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0a828: 90 01 00 14 stw r0,20(r1)
ffc0a82c: 93 e1 00 0c stw r31,12(r1)
ffc0a830: 7c bf 2b 78 mr r31,r5
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
ffc0a834: 98 89 00 04 stb r4,4(r9)
_Internal_errors_What_happened.the_error = the_error;
ffc0a838: 90 a9 00 08 stw r5,8(r9)
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
ffc0a83c: 90 6b 2c 50 stw r3,11344(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 );
ffc0a840: 48 00 26 e9 bl ffc0cf28 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
ffc0a844: 38 00 00 05 li r0,5
ffc0a848: 3d 20 00 00 lis r9,0
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
ffc0a84c: 7f e3 fb 78 mr r3,r31
ffc0a850: 90 09 27 6c stw r0,10092(r9)
ffc0a854: 4b ff 92 f5 bl ffc03b48 <_BSP_Fatal_error>
ffc0a858: 48 00 00 00 b ffc0a858 <_Internal_error_Occurred+0x40><== NOT EXECUTED
ffc0a870 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc0a870: 94 21 ff f0 stwu r1,-16(r1)
ffc0a874: 7c 08 02 a6 mflr r0
ffc0a878: 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 )
ffc0a87c: 80 03 00 18 lwz r0,24(r3)
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc0a880: 93 e1 00 0c stw r31,12(r1)
ffc0a884: 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 )
ffc0a888: 2f 80 00 00 cmpwi cr7,r0,0
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc0a88c: 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;
ffc0a890: 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 )
ffc0a894: 40 9e 00 1c bne- cr7,ffc0a8b0 <_Objects_Allocate+0x40> <== ALWAYS TAKEN
);
}
#endif
return the_object;
}
ffc0a898: 80 01 00 14 lwz r0,20(r1)
ffc0a89c: 83 c1 00 08 lwz r30,8(r1)
ffc0a8a0: 7c 08 03 a6 mtlr r0
ffc0a8a4: 83 e1 00 0c lwz r31,12(r1)
ffc0a8a8: 38 21 00 10 addi r1,r1,16
ffc0a8ac: 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 );
ffc0a8b0: 3b df 00 20 addi r30,r31,32
ffc0a8b4: 7f c3 f3 78 mr r3,r30
ffc0a8b8: 4b ff f4 09 bl ffc09cc0 <_Chain_Get>
if ( information->auto_extend ) {
ffc0a8bc: 88 1f 00 12 lbz r0,18(r31)
ffc0a8c0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a8c4: 41 be ff d4 beq- cr7,ffc0a898 <_Objects_Allocate+0x28>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
ffc0a8c8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a8cc: 41 9e 00 50 beq- cr7,ffc0a91c <_Objects_Allocate+0xac>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
ffc0a8d0: a1 63 00 0a lhz r11,10(r3)
ffc0a8d4: a0 1f 00 0a lhz r0,10(r31)
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
ffc0a8d8: a1 3f 00 14 lhz r9,20(r31)
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
ffc0a8dc: 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--;
ffc0a8e0: 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;
ffc0a8e4: 7c 00 4b 96 divwu r0,r0,r9
information->inactive_per_block[ block ]--;
ffc0a8e8: 81 3f 00 30 lwz r9,48(r31)
);
}
#endif
return the_object;
}
ffc0a8ec: 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 ]--;
ffc0a8f0: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0a8f4: 7d 49 00 2e lwzx r10,r9,r0
information->inactive--;
ffc0a8f8: 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 ]--;
ffc0a8fc: 39 4a ff ff addi r10,r10,-1
ffc0a900: 7d 49 01 2e stwx r10,r9,r0
);
}
#endif
return the_object;
}
ffc0a904: 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--;
ffc0a908: b1 7f 00 2c sth r11,44(r31)
);
}
#endif
return the_object;
}
ffc0a90c: 7c 08 03 a6 mtlr r0
ffc0a910: 83 e1 00 0c lwz r31,12(r1)
ffc0a914: 38 21 00 10 addi r1,r1,16
ffc0a918: 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 );
ffc0a91c: 7f e3 fb 78 mr r3,r31
ffc0a920: 48 00 00 4d bl ffc0a96c <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
ffc0a924: 7f c3 f3 78 mr r3,r30
ffc0a928: 4b ff f3 99 bl ffc09cc0 <_Chain_Get>
}
if ( the_object ) {
ffc0a92c: 2c 03 00 00 cmpwi r3,0
ffc0a930: 41 82 ff 68 beq+ ffc0a898 <_Objects_Allocate+0x28>
ffc0a934: 4b ff ff 9c b ffc0a8d0 <_Objects_Allocate+0x60>
ffc0a96c <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc0a96c: 94 21 ff c0 stwu r1,-64(r1)
ffc0a970: 7c 08 02 a6 mflr r0
ffc0a974: 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 )
ffc0a978: 81 23 00 34 lwz r9,52(r3)
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc0a97c: 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 )
ffc0a980: 2f 89 00 00 cmpwi cr7,r9,0
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc0a984: 93 e1 00 3c stw r31,60(r1)
ffc0a988: 7c 7f 1b 78 mr r31,r3
ffc0a98c: 92 c1 00 18 stw r22,24(r1)
ffc0a990: 92 e1 00 1c stw r23,28(r1)
ffc0a994: 93 01 00 20 stw r24,32(r1)
ffc0a998: 93 21 00 24 stw r25,36(r1)
ffc0a99c: 93 41 00 28 stw r26,40(r1)
ffc0a9a0: 93 61 00 2c stw r27,44(r1)
ffc0a9a4: 93 81 00 30 stw r28,48(r1)
ffc0a9a8: 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 );
ffc0a9ac: a3 a3 00 0a lhz r29,10(r3)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc0a9b0: 41 9e 02 8c beq- cr7,ffc0ac3c <_Objects_Extend_information+0x2d0>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc0a9b4: a3 43 00 10 lhz r26,16(r3)
ffc0a9b8: a1 63 00 14 lhz r11,20(r3)
ffc0a9bc: 7e da 5b 96 divwu r22,r26,r11
for ( ; block < block_count; block++ ) {
ffc0a9c0: 2f 96 00 00 cmpwi cr7,r22,0
ffc0a9c4: 41 9e 02 94 beq- cr7,ffc0ac58 <_Objects_Extend_information+0x2ec><== NEVER TAKEN
if ( information->object_blocks[ block ] == NULL ) {
ffc0a9c8: 80 09 00 00 lwz r0,0(r9)
ffc0a9cc: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a9d0: 41 9e 02 9c beq- cr7,ffc0ac6c <_Objects_Extend_information+0x300><== NEVER TAKEN
ffc0a9d4: 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;
ffc0a9d8: 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 );
ffc0a9dc: 7f be eb 78 mr r30,r29
index_base = minimum_index;
block = 0;
ffc0a9e0: 3b 60 00 00 li r27,0
ffc0a9e4: 48 00 00 10 b ffc0a9f4 <_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 ) {
ffc0a9e8: 84 09 00 04 lwzu r0,4(r9)
ffc0a9ec: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a9f0: 41 9e 01 fc beq- cr7,ffc0abec <_Objects_Extend_information+0x280>
do_extend = false;
break;
} else
index_base += information->allocation_size;
ffc0a9f4: 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++ ) {
ffc0a9f8: 3b 7b 00 01 addi r27,r27,1
ffc0a9fc: 42 00 ff ec bdnz+ ffc0a9e8 <_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;
ffc0aa00: 3b 20 00 01 li r25,1
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
ffc0aa04: 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 ) {
ffc0aa08: 2b 9a ff ff cmplwi cr7,r26,65535
ffc0aa0c: 41 9d 01 a8 bgt- cr7,ffc0abb4 <_Objects_Extend_information+0x248>
/*
* 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 ) {
ffc0aa10: 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;
ffc0aa14: 80 7f 00 18 lwz r3,24(r31)
if ( information->auto_extend ) {
ffc0aa18: 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;
ffc0aa1c: 7c 6a 19 d6 mullw r3,r10,r3
if ( information->auto_extend ) {
ffc0aa20: 41 9e 01 d4 beq- cr7,ffc0abf4 <_Objects_Extend_information+0x288>
new_object_block = _Workspace_Allocate( block_size );
ffc0aa24: 48 00 2b d1 bl ffc0d5f4 <_Workspace_Allocate>
if ( !new_object_block )
ffc0aa28: 7c 7c 1b 79 mr. r28,r3
ffc0aa2c: 41 82 01 88 beq- ffc0abb4 <_Objects_Extend_information+0x248>
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
ffc0aa30: 2f 99 00 00 cmpwi cr7,r25,0
ffc0aa34: 41 9e 00 fc beq- cr7,ffc0ab30 <_Objects_Extend_information+0x1c4>
*/
/*
* Up the block count and maximum
*/
block_count++;
ffc0aa38: 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 *)) +
ffc0aa3c: 1c 77 00 03 mulli r3,r23,3
((maximum + minimum_index) * sizeof(Objects_Control *));
ffc0aa40: 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 *)) +
ffc0aa44: 7c 63 ea 14 add r3,r3,r29
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
ffc0aa48: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc0aa4c: 48 00 2b a9 bl ffc0d5f4 <_Workspace_Allocate>
if ( !object_blocks ) {
ffc0aa50: 7c 78 1b 79 mr. r24,r3
ffc0aa54: 41 82 02 2c beq- ffc0ac80 <_Objects_Extend_information+0x314>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc0aa58: a0 1f 00 10 lhz r0,16(r31)
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
ffc0aa5c: 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);
ffc0aa60: 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 ) {
ffc0aa64: 7f 9d 00 40 cmplw cr7,r29,r0
ffc0aa68: 7e f9 ba 14 add r23,r25,r23
ffc0aa6c: 41 9c 01 94 blt- cr7,ffc0ac00 <_Objects_Extend_information+0x294>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc0aa70: 2f 9d 00 00 cmpwi cr7,r29,0
local_table[ index ] = NULL;
ffc0aa74: 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,
ffc0aa78: 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;
ffc0aa7c: 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++ ) {
ffc0aa80: 41 9e 00 0c beq- cr7,ffc0aa8c <_Objects_Extend_information+0x120><== NEVER TAKEN
local_table[ index ] = NULL;
ffc0aa84: 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++ ) {
ffc0aa88: 42 00 ff fc bdnz+ ffc0aa84 <_Objects_Extend_information+0x118>
ffc0aa8c: 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 );
ffc0aa90: a1 7f 00 14 lhz r11,20(r31)
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
ffc0aa94: 38 00 00 00 li r0,0
ffc0aa98: 7c 18 b1 2e stwx r0,r24,r22
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
ffc0aa9c: 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 ;
ffc0aaa0: 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;
ffc0aaa4: 7c 19 b1 2e stwx r0,r25,r22
for ( index=index_base ;
ffc0aaa8: 40 9c 00 30 bge- cr7,ffc0aad8 <_Objects_Extend_information+0x16c><== NEVER TAKEN
ffc0aaac: 38 1e 00 01 addi r0,r30,1
ffc0aab0: 7f 80 58 40 cmplw cr7,r0,r11
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc0aab4: 57 c9 10 3a rlwinm r9,r30,2,0,29
ffc0aab8: 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;
ffc0aabc: 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 ;
ffc0aac0: 7d 29 ba 14 add r9,r9,r23
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc0aac4: 7d 69 03 a6 mtctr r11
ffc0aac8: 38 00 00 00 li r0,0
ffc0aacc: 41 9d 01 c0 bgt- cr7,ffc0ac8c <_Objects_Extend_information+0x320><== NEVER TAKEN
ffc0aad0: 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 ;
ffc0aad4: 42 00 ff fc bdnz+ ffc0aad0 <_Objects_Extend_information+0x164>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0aad8: 7c 00 00 a6 mfmsr r0
ffc0aadc: 7d 30 42 a6 mfsprg r9,0
ffc0aae0: 7c 09 48 78 andc r9,r0,r9
ffc0aae4: 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) |
ffc0aae8: 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;
ffc0aaec: 57 5a 04 3e clrlwi r26,r26,16
information->maximum_id = _Objects_Build_id(
ffc0aaf0: a1 3f 00 04 lhz r9,4(r31)
ffc0aaf4: 55 6b c0 0e rlwinm r11,r11,24,0,7
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
ffc0aaf8: 80 7f 00 34 lwz r3,52(r31)
ffc0aafc: 65 6b 00 01 oris r11,r11,1
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
ffc0ab00: 93 3f 00 30 stw r25,48(r31)
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc0ab04: 55 29 d8 08 rlwinm r9,r9,27,0,4
ffc0ab08: 7d 69 4b 78 or r9,r11,r9
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
ffc0ab0c: 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) |
ffc0ab10: 7d 29 d3 78 or r9,r9,r26
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
ffc0ab14: 92 ff 00 1c stw r23,28(r31)
information->maximum = (Objects_Maximum) maximum;
ffc0ab18: b3 5f 00 10 sth r26,16(r31)
information->maximum_id = _Objects_Build_id(
ffc0ab1c: 91 3f 00 0c stw r9,12(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0ab20: 7c 00 01 24 mtmsr r0
information->maximum
);
_ISR_Enable( level );
if ( old_tables )
ffc0ab24: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ab28: 41 9e 00 08 beq- cr7,ffc0ab30 <_Objects_Extend_information+0x1c4>
_Workspace_Free( old_tables );
ffc0ab2c: 48 00 2a fd bl ffc0d628 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
ffc0ab30: 81 3f 00 34 lwz r9,52(r31)
ffc0ab34: 57 7b 10 3a rlwinm r27,r27,2,0,29
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0ab38: 3b a1 00 08 addi r29,r1,8
ffc0ab3c: 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;
ffc0ab40: 7f 89 d9 2e stwx r28,r9,r27
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0ab44: 7f 84 e3 78 mr r4,r28
ffc0ab48: 7f a3 eb 78 mr r3,r29
ffc0ab4c: 80 df 00 18 lwz r6,24(r31)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0ab50: 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(
ffc0ab54: 48 00 4e 31 bl ffc0f984 <_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 ) {
ffc0ab58: 48 00 00 2c b ffc0ab84 <_Objects_Extend_information+0x218>
ffc0ab5c: 81 7f 00 00 lwz r11,0(r31)
the_object->id = _Objects_Build_id(
ffc0ab60: a0 1f 00 04 lhz r0,4(r31)
ffc0ab64: 55 6b c0 0e rlwinm r11,r11,24,0,7
ffc0ab68: 65 6b 00 01 oris r11,r11,1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc0ab6c: 54 00 d8 08 rlwinm r0,r0,27,0,4
ffc0ab70: 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) |
ffc0ab74: 7c 00 f3 78 or r0,r0,r30
ffc0ab78: 90 09 00 08 stw r0,8(r9)
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
ffc0ab7c: 3b de 00 01 addi r30,r30,1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0ab80: 4b ff f0 e9 bl ffc09c68 <_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 ) {
ffc0ab84: 7f a3 eb 78 mr r3,r29
ffc0ab88: 4b ff f1 39 bl ffc09cc0 <_Chain_Get>
ffc0ab8c: 7c 69 1b 79 mr. r9,r3
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0ab90: 7f 83 e3 78 mr r3,r28
ffc0ab94: 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 ) {
ffc0ab98: 40 82 ff c4 bne+ ffc0ab5c <_Objects_Extend_information+0x1f0>
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
ffc0ab9c: a1 3f 00 2c lhz r9,44(r31)
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc0aba0: a0 1f 00 14 lhz r0,20(r31)
ffc0aba4: 81 7f 00 30 lwz r11,48(r31)
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
ffc0aba8: 7d 20 4a 14 add r9,r0,r9
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc0abac: 7c 0b d9 2e stwx r0,r11,r27
information->inactive =
ffc0abb0: b1 3f 00 2c sth r9,44(r31)
(Objects_Maximum)(information->inactive + information->allocation_size);
}
ffc0abb4: 80 01 00 44 lwz r0,68(r1)
ffc0abb8: 82 c1 00 18 lwz r22,24(r1)
ffc0abbc: 7c 08 03 a6 mtlr r0
ffc0abc0: 82 e1 00 1c lwz r23,28(r1)
ffc0abc4: 83 01 00 20 lwz r24,32(r1)
ffc0abc8: 83 21 00 24 lwz r25,36(r1)
ffc0abcc: 83 41 00 28 lwz r26,40(r1)
ffc0abd0: 83 61 00 2c lwz r27,44(r1)
ffc0abd4: 83 81 00 30 lwz r28,48(r1)
ffc0abd8: 83 a1 00 34 lwz r29,52(r1)
ffc0abdc: 83 c1 00 38 lwz r30,56(r1)
ffc0abe0: 83 e1 00 3c lwz r31,60(r1)
ffc0abe4: 38 21 00 40 addi r1,r1,64
ffc0abe8: 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;
ffc0abec: 3b 20 00 00 li r25,0
ffc0abf0: 4b ff fe 14 b ffc0aa04 <_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 );
ffc0abf4: 48 00 2a 61 bl ffc0d654 <_Workspace_Allocate_or_fatal_error>
ffc0abf8: 7c 7c 1b 78 mr r28,r3
ffc0abfc: 4b ff fe 34 b ffc0aa30 <_Objects_Extend_information+0xc4>
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
information->object_blocks,
block_count * sizeof(void*) );
ffc0ac00: 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,
ffc0ac04: 80 9f 00 34 lwz r4,52(r31)
ffc0ac08: 7e c5 b3 78 mr r5,r22
ffc0ac0c: 48 00 83 b1 bl ffc12fbc <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
ffc0ac10: 80 9f 00 30 lwz r4,48(r31)
ffc0ac14: 7e c5 b3 78 mr r5,r22
ffc0ac18: 7f 23 cb 78 mr r3,r25
ffc0ac1c: 48 00 83 a1 bl ffc12fbc <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
ffc0ac20: 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,
ffc0ac24: 80 9f 00 1c lwz r4,28(r31)
ffc0ac28: 7e e3 bb 78 mr r3,r23
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
ffc0ac2c: 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,
ffc0ac30: 54 a5 10 3a rlwinm r5,r5,2,0,29
ffc0ac34: 48 00 83 89 bl ffc12fbc <memcpy>
ffc0ac38: 4b ff fe 58 b ffc0aa90 <_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 )
ffc0ac3c: 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 );
ffc0ac40: 7f be eb 78 mr r30,r29
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc0ac44: 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;
ffc0ac48: 3b 20 00 01 li r25,1
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
ffc0ac4c: 3b 60 00 00 li r27,0
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
ffc0ac50: 3a c0 00 00 li r22,0
ffc0ac54: 4b ff fd b0 b ffc0aa04 <_Objects_Extend_information+0x98>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc0ac58: 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 );
ffc0ac5c: 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;
ffc0ac60: 3b 20 00 01 li r25,1 <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
ffc0ac64: 3b 60 00 00 li r27,0 <== NOT EXECUTED
ffc0ac68: 4b ff fd 9c b ffc0aa04 <_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 ) {
ffc0ac6c: 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 );
ffc0ac70: 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;
ffc0ac74: 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;
ffc0ac78: 3b 60 00 00 li r27,0 <== NOT EXECUTED
ffc0ac7c: 4b ff fd 88 b ffc0aa04 <_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 );
ffc0ac80: 7f 83 e3 78 mr r3,r28
ffc0ac84: 48 00 29 a5 bl ffc0d628 <_Workspace_Free>
return;
ffc0ac88: 4b ff ff 2c b ffc0abb4 <_Objects_Extend_information+0x248>
ffc0ac8c: 39 60 00 01 li r11,1 <== NOT EXECUTED
ffc0ac90: 7d 69 03 a6 mtctr r11 <== NOT EXECUTED
ffc0ac94: 4b ff fe 3c b ffc0aad0 <_Objects_Extend_information+0x164><== NOT EXECUTED
ffc0ad84 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc0ad84: 94 21 ff e8 stwu r1,-24(r1)
ffc0ad88: 7c 08 02 a6 mflr r0
ffc0ad8c: 93 c1 00 10 stw r30,16(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc0ad90: 7c 9e 23 79 mr. r30,r4
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc0ad94: 93 a1 00 0c stw r29,12(r1)
ffc0ad98: 7c 7d 1b 78 mr r29,r3
ffc0ad9c: 93 e1 00 14 stw r31,20(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
return NULL;
ffc0ada0: 3b e0 00 00 li r31,0
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc0ada4: 90 01 00 1c stw r0,28(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc0ada8: 40 82 00 24 bne- ffc0adcc <_Objects_Get_information+0x48>
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
ffc0adac: 80 01 00 1c lwz r0,28(r1)
ffc0adb0: 7f e3 fb 78 mr r3,r31
ffc0adb4: 83 a1 00 0c lwz r29,12(r1)
ffc0adb8: 7c 08 03 a6 mtlr r0
ffc0adbc: 83 c1 00 10 lwz r30,16(r1)
ffc0adc0: 83 e1 00 14 lwz r31,20(r1)
ffc0adc4: 38 21 00 18 addi r1,r1,24
ffc0adc8: 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 );
ffc0adcc: 48 00 51 d9 bl ffc0ffa4 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
ffc0add0: 2c 03 00 00 cmpwi r3,0
ffc0add4: 41 82 ff d8 beq+ ffc0adac <_Objects_Get_information+0x28>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
ffc0add8: 7f 83 f0 40 cmplw cr7,r3,r30
ffc0addc: 41 9c ff d0 blt+ cr7,ffc0adac <_Objects_Get_information+0x28>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
ffc0ade0: 3d 20 00 00 lis r9,0
ffc0ade4: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc0ade8: 39 29 2b 40 addi r9,r9,11072
ffc0adec: 7d 29 e8 2e lwzx r9,r9,r29
ffc0adf0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0adf4: 41 9e ff b8 beq+ cr7,ffc0adac <_Objects_Get_information+0x28><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
ffc0adf8: 57 de 10 3a rlwinm r30,r30,2,0,29
ffc0adfc: 7f e9 f0 2e lwzx r31,r9,r30
if ( !info )
ffc0ae00: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0ae04: 41 9e ff a8 beq+ cr7,ffc0adac <_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 )
ffc0ae08: a0 1f 00 10 lhz r0,16(r31)
ffc0ae0c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ae10: 40 9e ff 9c bne+ cr7,ffc0adac <_Objects_Get_information+0x28>
return NULL;
ffc0ae14: 3b e0 00 00 li r31,0
ffc0ae18: 4b ff ff 94 b ffc0adac <_Objects_Get_information+0x28>
ffc0d060 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
ffc0d060: 94 21 ff d8 stwu r1,-40(r1)
ffc0d064: 7c 08 02 a6 mflr r0
ffc0d068: 93 c1 00 20 stw r30,32(r1)
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
ffc0d06c: 7c 9e 23 79 mr. r30,r4
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
ffc0d070: 93 e1 00 24 stw r31,36(r1)
ffc0d074: 7c bf 2b 78 mr r31,r5
ffc0d078: 90 01 00 2c stw r0,44(r1)
ffc0d07c: 93 a1 00 1c stw r29,28(r1)
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
ffc0d080: 40 82 00 28 bne- ffc0d0a8 <_Objects_Get_name_as_string+0x48>
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
ffc0d084: 3b e0 00 00 li r31,0
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
ffc0d088: 80 01 00 2c lwz r0,44(r1)
ffc0d08c: 7f e3 fb 78 mr r3,r31
ffc0d090: 83 a1 00 1c lwz r29,28(r1)
ffc0d094: 7c 08 03 a6 mtlr r0
ffc0d098: 83 c1 00 20 lwz r30,32(r1)
ffc0d09c: 83 e1 00 24 lwz r31,36(r1)
ffc0d0a0: 38 21 00 28 addi r1,r1,40
ffc0d0a4: 4e 80 00 20 blr
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
ffc0d0a8: 2f 85 00 00 cmpwi cr7,r5,0
ffc0d0ac: 41 9e ff dc beq+ cr7,ffc0d088 <_Objects_Get_name_as_string+0x28>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
ffc0d0b0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0d0b4: 7c 7d 1b 78 mr r29,r3
ffc0d0b8: 40 9e 00 10 bne- cr7,ffc0d0c8 <_Objects_Get_name_as_string+0x68>
ffc0d0bc: 3d 20 00 01 lis r9,1
ffc0d0c0: 81 29 ab c4 lwz r9,-21564(r9)
ffc0d0c4: 83 a9 00 08 lwz r29,8(r9)
information = _Objects_Get_information_id( tmpId );
ffc0d0c8: 7f a3 eb 78 mr r3,r29
ffc0d0cc: 4b ff fe 61 bl ffc0cf2c <_Objects_Get_information_id>
if ( !information )
ffc0d0d0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0d0d4: 41 9e ff b0 beq+ cr7,ffc0d084 <_Objects_Get_name_as_string+0x24>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
ffc0d0d8: 7f a4 eb 78 mr r4,r29
ffc0d0dc: 38 a1 00 08 addi r5,r1,8
ffc0d0e0: 48 00 00 a5 bl ffc0d184 <_Objects_Get>
switch ( location ) {
ffc0d0e4: 80 01 00 08 lwz r0,8(r1)
ffc0d0e8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d0ec: 40 be ff 98 bne- cr7,ffc0d084 <_Objects_Get_name_as_string+0x24>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
ffc0d0f0: 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;
ffc0d0f4: 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';
ffc0d0f8: 98 01 00 10 stb r0,16(r1)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
ffc0d0fc: 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;
ffc0d100: 55 60 46 3e rlwinm r0,r11,8,24,31
lname[ 1 ] = (u32_name >> 16) & 0xff;
ffc0d104: 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;
ffc0d108: 98 01 00 0c stb r0,12(r1)
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
ffc0d10c: 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;
ffc0d110: 99 01 00 0d stb r8,13(r1)
lname[ 2 ] = (u32_name >> 8) & 0xff;
ffc0d114: 99 41 00 0e stb r10,14(r1)
lname[ 3 ] = (u32_name >> 0) & 0xff;
ffc0d118: 99 61 00 0f stb r11,15(r1)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
ffc0d11c: 41 82 00 58 beq- ffc0d174 <_Objects_Get_name_as_string+0x114><== NEVER TAKEN
ffc0d120: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d124: 41 9e 00 50 beq- cr7,ffc0d174 <_Objects_Get_name_as_string+0x114>
ffc0d128: 3d 00 00 00 lis r8,0
*d = (isprint((unsigned char)*s)) ? *s : '*';
ffc0d12c: 7f c9 03 a6 mtctr r30
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
ffc0d130: 39 60 00 00 li r11,0
ffc0d134: 39 08 27 50 addi r8,r8,10064
ffc0d138: 48 00 00 14 b ffc0d14c <_Objects_Get_name_as_string+0xec>
ffc0d13c: 39 41 00 0c addi r10,r1,12
ffc0d140: 7c 0a 58 ae lbzx r0,r10,r11
ffc0d144: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d148: 41 9e 00 2c beq- cr7,ffc0d174 <_Objects_Get_name_as_string+0x114>
*d = (isprint((unsigned char)*s)) ? *s : '*';
ffc0d14c: 81 48 00 00 lwz r10,0(r8)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
ffc0d150: 39 6b 00 01 addi r11,r11,1
*d = (isprint((unsigned char)*s)) ? *s : '*';
ffc0d154: 7d 4a 02 14 add r10,r10,r0
ffc0d158: 89 4a 00 01 lbz r10,1(r10)
ffc0d15c: 71 47 00 97 andi. r7,r10,151
ffc0d160: 40 82 00 08 bne- ffc0d168 <_Objects_Get_name_as_string+0x108>
ffc0d164: 38 00 00 2a li r0,42
ffc0d168: 98 09 00 00 stb r0,0(r9)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
ffc0d16c: 39 29 00 01 addi r9,r9,1
ffc0d170: 42 00 ff cc bdnz+ ffc0d13c <_Objects_Get_name_as_string+0xdc>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
ffc0d174: 38 00 00 00 li r0,0
ffc0d178: 98 09 00 00 stb r0,0(r9)
_Thread_Enable_dispatch();
ffc0d17c: 48 00 0e cd bl ffc0e048 <_Thread_Enable_dispatch>
return name;
ffc0d180: 4b ff ff 08 b ffc0d088 <_Objects_Get_name_as_string+0x28>
ffc1ec14 <_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;
ffc1ec14: 81 23 00 08 lwz r9,8(r3)
if ( information->maximum >= index ) {
ffc1ec18: 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;
ffc1ec1c: 21 29 00 01 subfic r9,r9,1
ffc1ec20: 7d 29 22 14 add r9,r9,r4
if ( information->maximum >= index ) {
ffc1ec24: 7f 89 00 40 cmplw cr7,r9,r0
ffc1ec28: 41 9d 00 24 bgt- cr7,ffc1ec4c <_Objects_Get_no_protection+0x38>
if ( (the_object = information->local_table[ index ]) != NULL ) {
ffc1ec2c: 81 63 00 1c lwz r11,28(r3)
ffc1ec30: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc1ec34: 7c 6b 48 2e lwzx r3,r11,r9
ffc1ec38: 2f 83 00 00 cmpwi cr7,r3,0
ffc1ec3c: 41 9e 00 10 beq- cr7,ffc1ec4c <_Objects_Get_no_protection+0x38><== NEVER TAKEN
*location = OBJECTS_LOCAL;
ffc1ec40: 38 00 00 00 li r0,0
ffc1ec44: 90 05 00 00 stw r0,0(r5)
return the_object;
ffc1ec48: 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;
ffc1ec4c: 38 00 00 01 li r0,1
ffc1ec50: 90 05 00 00 stw r0,0(r5)
return NULL;
ffc1ec54: 38 60 00 00 li r3,0
}
ffc1ec58: 4e 80 00 20 blr
ffc0ca38 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
ffc0ca38: 94 21 ff e0 stwu r1,-32(r1)
ffc0ca3c: 7c 08 02 a6 mflr r0
ffc0ca40: 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;
ffc0ca44: 7c 60 1b 79 mr. r0,r3
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
ffc0ca48: 93 c1 00 18 stw r30,24(r1)
ffc0ca4c: 7c 9e 23 78 mr r30,r4
ffc0ca50: 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;
ffc0ca54: 40 82 00 10 bne- ffc0ca64 <_Objects_Id_to_name+0x2c>
ffc0ca58: 3d 20 00 00 lis r9,0
ffc0ca5c: 81 29 2d c4 lwz r9,11716(r9)
ffc0ca60: 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);
ffc0ca64: 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 )
ffc0ca68: 39 69 ff ff addi r11,r9,-1
ffc0ca6c: 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;
ffc0ca70: 3b e0 00 03 li r31,3
ffc0ca74: 41 9d 00 50 bgt- cr7,ffc0cac4 <_Objects_Id_to_name+0x8c>
if ( !_Objects_Information_table[ the_api ] )
ffc0ca78: 3d 60 00 00 lis r11,0
ffc0ca7c: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0ca80: 39 6b 2b c0 addi r11,r11,11200
ffc0ca84: 7d 2b 48 2e lwzx r9,r11,r9
ffc0ca88: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ca8c: 41 9e 00 38 beq- cr7,ffc0cac4 <_Objects_Id_to_name+0x8c>
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
ffc0ca90: 54 0b 3e 7a rlwinm r11,r0,7,25,29
ffc0ca94: 7c 69 58 2e lwzx r3,r9,r11
if ( !information )
ffc0ca98: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ca9c: 41 9e 00 28 beq- cr7,ffc0cac4 <_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 );
ffc0caa0: 7c 04 03 78 mr r4,r0
ffc0caa4: 38 a1 00 08 addi r5,r1,8
ffc0caa8: 4b ff fe f5 bl ffc0c99c <_Objects_Get>
if ( !the_object )
ffc0caac: 2c 03 00 00 cmpwi r3,0
ffc0cab0: 41 82 00 14 beq- ffc0cac4 <_Objects_Id_to_name+0x8c>
return OBJECTS_INVALID_ID;
*name = the_object->name;
ffc0cab4: 80 03 00 0c lwz r0,12(r3)
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
ffc0cab8: 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;
ffc0cabc: 90 1e 00 00 stw r0,0(r30)
_Thread_Enable_dispatch();
ffc0cac0: 48 00 0e 49 bl ffc0d908 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
ffc0cac4: 80 01 00 24 lwz r0,36(r1)
ffc0cac8: 7f e3 fb 78 mr r3,r31
ffc0cacc: 83 c1 00 18 lwz r30,24(r1)
ffc0cad0: 7c 08 03 a6 mtlr r0
ffc0cad4: 83 e1 00 1c lwz r31,28(r1)
ffc0cad8: 38 21 00 20 addi r1,r1,32
ffc0cadc: 4e 80 00 20 blr
ffc0af28 <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
ffc0af28: 94 21 ff f8 stwu r1,-8(r1)
ffc0af2c: 7c 08 02 a6 mflr r0
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
ffc0af30: 3d 40 00 00 lis r10,0
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
ffc0af34: 90 01 00 0c stw r0,12(r1)
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
ffc0af38: 54 c0 0f fe rlwinm r0,r6,1,31,31
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
ffc0af3c: 2f 80 00 00 cmpwi cr7,r0,0
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
ffc0af40: 39 4a 2b 40 addi r10,r10,11072
ffc0af44: 54 8b 10 3a rlwinm r11,r4,2,0,29
ffc0af48: 7d 6a 58 2e lwzx r11,r10,r11
ffc0af4c: 54 a8 10 3a rlwinm r8,r5,2,0,29
#endif
information->the_api = the_api;
information->the_class = the_class;
information->size = size;
information->local_table = 0;
ffc0af50: 39 40 00 00 li r10,0
uint32_t maximum_per_allocation;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
ffc0af54: 90 83 00 00 stw r4,0(r3)
ffc0af58: 54 c6 00 7f clrlwi. r6,r6,1
information->the_class = the_class;
ffc0af5c: b0 a3 00 04 sth r5,4(r3)
information->size = size;
ffc0af60: 90 e3 00 18 stw r7,24(r3)
information->local_table = 0;
ffc0af64: 91 43 00 1c stw r10,28(r3)
information->inactive_per_block = 0;
ffc0af68: 91 43 00 30 stw r10,48(r3)
information->object_blocks = 0;
ffc0af6c: 91 43 00 34 stw r10,52(r3)
information->inactive = 0;
ffc0af70: b1 43 00 2c sth r10,44(r3)
/*
* Set the maximum value to 0. It will be updated when objects are
* added to the inactive set from _Objects_Extend_information()
*/
information->maximum = 0;
ffc0af74: b1 43 00 10 sth r10,16(r3)
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
ffc0af78: 7c 6b 41 2e stwx r3,r11,r8
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
ffc0af7c: 98 03 00 12 stb r0,18(r3)
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
ffc0af80: 41 9e 00 08 beq- cr7,ffc0af88 <_Objects_Initialize_information+0x60>
ffc0af84: 41 82 00 84 beq- ffc0b008 <_Objects_Initialize_information+0xe0>
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
ffc0af88: 55 20 07 be clrlwi r0,r9,30
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
ffc0af8c: b0 c3 00 14 sth r6,20(r3)
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
ffc0af90: 2f 80 00 00 cmpwi cr7,r0,0
information->local_table = &null_local_table;
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
ffc0af94: 7c 00 00 26 mfcr r0
ffc0af98: 54 00 1f fe rlwinm r0,r0,3,31,31
ffc0af9c: 54 84 c0 0e rlwinm r4,r4,24,0,7
ffc0afa0: 64 84 00 01 oris r4,r4,1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc0afa4: 54 a5 d8 08 rlwinm r5,r5,27,0,4
ffc0afa8: 68 00 00 01 xori r0,r0,1
ffc0afac: 7c 85 2b 78 or r5,r4,r5
information->allocation_size = maximum_per_allocation;
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
ffc0afb0: 3d 60 00 00 lis r11,0
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc0afb4: 7c a5 03 78 or r5,r5,r0
ffc0afb8: 38 0b 28 d8 addi r0,r11,10456
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
ffc0afbc: 90 a3 00 08 stw r5,8(r3)
information->allocation_size = maximum_per_allocation;
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
ffc0afc0: 90 03 00 1c stw r0,28(r3)
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
ffc0afc4: 40 9e 00 38 bne- cr7,ffc0affc <_Objects_Initialize_information+0xd4><== NEVER TAKEN
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 );
ffc0afc8: 39 63 00 24 addi r11,r3,36
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
ffc0afcc: b1 23 00 38 sth r9,56(r3)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
ffc0afd0: 38 03 00 20 addi r0,r3,32
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
ffc0afd4: 39 20 00 00 li r9,0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0afd8: 91 63 00 20 stw r11,32(r3)
head->previous = NULL;
ffc0afdc: 91 23 00 24 stw r9,36(r3)
tail->previous = head;
ffc0afe0: 90 03 00 28 stw r0,40(r3)
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
ffc0afe4: 41 a2 00 08 beq+ ffc0afec <_Objects_Initialize_information+0xc4>
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
ffc0afe8: 4b ff f9 85 bl ffc0a96c <_Objects_Extend_information>
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
ffc0afec: 80 01 00 0c lwz r0,12(r1)
ffc0aff0: 38 21 00 08 addi r1,r1,8
ffc0aff4: 7c 08 03 a6 mtlr r0
ffc0aff8: 4e 80 00 20 blr
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
ffc0affc: 39 29 00 04 addi r9,r9,4 <== NOT EXECUTED
ffc0b000: 55 29 00 3a rlwinm r9,r9,0,0,29 <== NOT EXECUTED
ffc0b004: 4b ff ff c4 b ffc0afc8 <_Objects_Initialize_information+0xa0><== NOT EXECUTED
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
_Internal_error_Occurred(
ffc0b008: 38 60 00 00 li r3,0
ffc0b00c: 38 80 00 01 li r4,1
ffc0b010: 38 a0 00 13 li r5,19
ffc0b014: 4b ff f8 05 bl ffc0a818 <_Internal_error_Occurred>
ffc0b0b0 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc0b0b0: 94 21 ff e8 stwu r1,-24(r1)
ffc0b0b4: 7c 08 02 a6 mflr r0
ffc0b0b8: 90 01 00 1c stw r0,28(r1)
ffc0b0bc: 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) /
ffc0b0c0: 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 );
ffc0b0c4: a3 e3 00 0a lhz r31,10(r3)
block_count = (information->maximum - index_base) /
ffc0b0c8: a0 03 00 14 lhz r0,20(r3)
ffc0b0cc: 7d 5f 50 50 subf r10,r31,r10
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc0b0d0: 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) /
ffc0b0d4: 7d 4a 03 96 divwu r10,r10,r0
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc0b0d8: 93 a1 00 0c stw r29,12(r1)
ffc0b0dc: 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++ ) {
ffc0b0e0: 2f 8a 00 00 cmpwi cr7,r10,0
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc0b0e4: 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++ ) {
ffc0b0e8: 41 9e 00 3c beq- cr7,ffc0b124 <_Objects_Shrink_information+0x74><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
ffc0b0ec: 81 63 00 30 lwz r11,48(r3)
ffc0b0f0: 81 2b 00 00 lwz r9,0(r11)
ffc0b0f4: 7f 80 48 00 cmpw cr7,r0,r9
ffc0b0f8: 41 9e 00 4c beq- cr7,ffc0b144 <_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++ ) {
ffc0b0fc: 39 20 00 00 li r9,0
ffc0b100: 7d 49 03 a6 mtctr r10
ffc0b104: 48 00 00 18 b ffc0b11c <_Objects_Shrink_information+0x6c>
if ( information->inactive_per_block[ block ] ==
ffc0b108: 85 4b 00 04 lwzu r10,4(r11)
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
ffc0b10c: 7f ff 02 14 add r31,r31,r0
ffc0b110: 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 ] ==
ffc0b114: 7f 80 50 00 cmpw cr7,r0,r10
ffc0b118: 41 9e 00 30 beq- cr7,ffc0b148 <_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++ ) {
ffc0b11c: 39 29 00 01 addi r9,r9,1
ffc0b120: 42 00 ff e8 bdnz+ ffc0b108 <_Objects_Shrink_information+0x58>
return;
}
index_base += information->allocation_size;
}
}
ffc0b124: 80 01 00 1c lwz r0,28(r1)
ffc0b128: 83 81 00 08 lwz r28,8(r1)
ffc0b12c: 7c 08 03 a6 mtlr r0
ffc0b130: 83 a1 00 0c lwz r29,12(r1)
ffc0b134: 83 c1 00 10 lwz r30,16(r1)
ffc0b138: 83 e1 00 14 lwz r31,20(r1)
ffc0b13c: 38 21 00 18 addi r1,r1,24
ffc0b140: 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 ] ==
ffc0b144: 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 );
ffc0b148: 80 7c 00 20 lwz r3,32(r28)
ffc0b14c: 48 00 00 10 b ffc0b15c <_Objects_Shrink_information+0xac>
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
ffc0b150: 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;
ffc0b154: 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 );
ffc0b158: 41 9e 00 34 beq- cr7,ffc0b18c <_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 );
ffc0b15c: 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;
ffc0b160: 83 c3 00 00 lwz r30,0(r3)
if ((index >= index_base) &&
ffc0b164: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0b168: 41 bc ff e8 blt- cr7,ffc0b150 <_Objects_Shrink_information+0xa0>
(index < (index_base + information->allocation_size))) {
ffc0b16c: a1 3c 00 14 lhz r9,20(r28)
ffc0b170: 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) &&
ffc0b174: 7f 80 48 40 cmplw cr7,r0,r9
ffc0b178: 40 9c ff d8 bge+ cr7,ffc0b150 <_Objects_Shrink_information+0xa0>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
ffc0b17c: 4b ff eb 1d bl ffc09c98 <_Chain_Extract>
}
}
while ( the_object );
ffc0b180: 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;
ffc0b184: 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 );
ffc0b188: 40 9e ff d4 bne+ cr7,ffc0b15c <_Objects_Shrink_information+0xac><== ALWAYS TAKEN
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
ffc0b18c: 81 3c 00 34 lwz r9,52(r28)
ffc0b190: 7c 69 e8 2e lwzx r3,r9,r29
ffc0b194: 48 00 24 95 bl ffc0d628 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
ffc0b198: a1 5c 00 2c lhz r10,44(r28)
ffc0b19c: 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;
ffc0b1a0: 81 7c 00 34 lwz r11,52(r28)
information->inactive_per_block[ block ] = 0;
ffc0b1a4: 81 3c 00 30 lwz r9,48(r28)
information->inactive -= information->allocation_size;
ffc0b1a8: 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;
ffc0b1ac: 7f cb e9 2e stwx r30,r11,r29
information->inactive_per_block[ block ] = 0;
ffc0b1b0: 7f c9 e9 2e stwx r30,r9,r29
information->inactive -= information->allocation_size;
ffc0b1b4: b0 1c 00 2c sth r0,44(r28)
return;
}
index_base += information->allocation_size;
}
}
ffc0b1b8: 80 01 00 1c lwz r0,28(r1)
ffc0b1bc: 83 81 00 08 lwz r28,8(r1)
ffc0b1c0: 7c 08 03 a6 mtlr r0
ffc0b1c4: 83 a1 00 0c lwz r29,12(r1)
ffc0b1c8: 83 c1 00 10 lwz r30,16(r1)
ffc0b1cc: 83 e1 00 14 lwz r31,20(r1)
ffc0b1d0: 38 21 00 18 addi r1,r1,24
ffc0b1d4: 4e 80 00 20 blr
ffc093e8 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
ffc093e8: 94 21 ff d8 stwu r1,-40(r1)
ffc093ec: 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;
ffc093f0: 3d 20 00 00 lis r9,0
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
ffc093f4: 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;
ffc093f8: 39 29 20 70 addi r9,r9,8304
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
ffc093fc: 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;
ffc09400: 83 e9 00 2c lwz r31,44(r9)
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
ffc09404: 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 )
ffc09408: 2f 9f 00 00 cmpwi cr7,r31,0
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
ffc0940c: 93 81 00 18 stw r28,24(r1)
ffc09410: 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;
ffc09414: 83 a9 00 28 lwz r29,40(r9)
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
ffc09418: 41 9e 00 60 beq- cr7,ffc09478 <_RTEMS_tasks_Initialize_user_tasks_body+0x90>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
ffc0941c: 2f 9d 00 00 cmpwi cr7,r29,0
ffc09420: 41 9e 00 58 beq- cr7,ffc09478 <_RTEMS_tasks_Initialize_user_tasks_body+0x90><== NEVER TAKEN
ffc09424: 3b c0 00 00 li r30,0
ffc09428: 3b 81 00 08 addi r28,r1,8
return_value = rtems_task_create(
ffc0942c: 80 bf 00 04 lwz r5,4(r31)
ffc09430: 7f 88 e3 78 mr r8,r28
ffc09434: 80 7f 00 00 lwz r3,0(r31)
ffc09438: 80 9f 00 08 lwz r4,8(r31)
ffc0943c: 80 df 00 14 lwz r6,20(r31)
ffc09440: 80 ff 00 0c lwz r7,12(r31)
ffc09444: 4b ff fc b1 bl ffc090f4 <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 ) )
ffc09448: 7c 65 1b 79 mr. r5,r3
ffc0944c: 40 82 00 4c bne- ffc09498 <_RTEMS_tasks_Initialize_user_tasks_body+0xb0>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
ffc09450: 80 bf 00 18 lwz r5,24(r31)
ffc09454: 80 61 00 08 lwz r3,8(r1)
ffc09458: 80 9f 00 10 lwz r4,16(r31)
ffc0945c: 48 00 00 49 bl ffc094a4 <rtems_task_start>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
ffc09460: 7c 65 1b 79 mr. r5,r3
ffc09464: 40 82 00 34 bne- ffc09498 <_RTEMS_tasks_Initialize_user_tasks_body+0xb0>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
ffc09468: 3b de 00 01 addi r30,r30,1
ffc0946c: 7f 9d f0 40 cmplw cr7,r29,r30
ffc09470: 3b ff 00 1c addi r31,r31,28
ffc09474: 41 9d ff b8 bgt+ cr7,ffc0942c <_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 );
}
}
ffc09478: 80 01 00 2c lwz r0,44(r1)
ffc0947c: 83 81 00 18 lwz r28,24(r1)
ffc09480: 7c 08 03 a6 mtlr r0
ffc09484: 83 a1 00 1c lwz r29,28(r1)
ffc09488: 83 c1 00 20 lwz r30,32(r1)
ffc0948c: 83 e1 00 24 lwz r31,36(r1)
ffc09490: 38 21 00 28 addi r1,r1,40
ffc09494: 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 );
ffc09498: 38 60 00 01 li r3,1
ffc0949c: 38 80 00 01 li r4,1
ffc094a0: 48 00 13 79 bl ffc0a818 <_Internal_error_Occurred>
ffc0f62c <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
ffc0f62c: 94 21 ff d8 stwu r1,-40(r1)
ffc0f630: 7c 08 02 a6 mflr r0
ffc0f634: 90 01 00 2c stw r0,44(r1)
ffc0f638: 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 ];
ffc0f63c: 83 e3 01 2c lwz r31,300(r3)
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
ffc0f640: 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 )
ffc0f644: 2f 9f 00 00 cmpwi cr7,r31,0
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
ffc0f648: 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 )
ffc0f64c: 41 9e 00 80 beq- cr7,ffc0f6cc <_RTEMS_tasks_Post_switch_extension+0xa0><== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0f650: 7c 00 00 a6 mfmsr r0
ffc0f654: 7d 30 42 a6 mfsprg r9,0
ffc0f658: 7c 09 48 78 andc r9,r0,r9
ffc0f65c: 7d 20 01 24 mtmsr r9
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
asr->signals_posted = 0;
ffc0f660: 39 20 00 00 li r9,0
*/
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
ffc0f664: 83 df 00 14 lwz r30,20(r31)
asr->signals_posted = 0;
ffc0f668: 91 3f 00 14 stw r9,20(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0f66c: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
ffc0f670: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0f674: 41 be 00 58 beq+ cr7,ffc0f6cc <_RTEMS_tasks_Post_switch_extension+0xa0>
return;
asr->nest_level += 1;
ffc0f678: 81 3f 00 1c lwz r9,28(r31)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0f67c: 3b a1 00 08 addi r29,r1,8
ffc0f680: 38 80 00 00 li r4,0
ffc0f684: 80 7f 00 10 lwz r3,16(r31)
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
ffc0f688: 38 09 00 01 addi r0,r9,1
ffc0f68c: 90 1f 00 1c stw r0,28(r31)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0f690: 60 84 ff ff ori r4,r4,65535
ffc0f694: 7f a5 eb 78 mr r5,r29
ffc0f698: 48 00 26 f5 bl ffc11d8c <rtems_task_mode>
(*asr->handler)( signal_set );
ffc0f69c: 80 1f 00 0c lwz r0,12(r31)
ffc0f6a0: 7f c3 f3 78 mr r3,r30
ffc0f6a4: 7c 09 03 a6 mtctr r0
ffc0f6a8: 4e 80 04 21 bctrl
asr->nest_level -= 1;
ffc0f6ac: 81 3f 00 1c lwz r9,28(r31)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0f6b0: 38 80 00 00 li r4,0
ffc0f6b4: 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;
ffc0f6b8: 38 09 ff ff addi r0,r9,-1
ffc0f6bc: 90 1f 00 1c stw r0,28(r31)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0f6c0: 60 84 ff ff ori r4,r4,65535
ffc0f6c4: 7f a5 eb 78 mr r5,r29
ffc0f6c8: 48 00 26 c5 bl ffc11d8c <rtems_task_mode>
}
ffc0f6cc: 80 01 00 2c lwz r0,44(r1)
ffc0f6d0: 83 a1 00 1c lwz r29,28(r1)
ffc0f6d4: 7c 08 03 a6 mtlr r0
ffc0f6d8: 83 c1 00 20 lwz r30,32(r1)
ffc0f6dc: 83 e1 00 24 lwz r31,36(r1)
ffc0f6e0: 38 21 00 28 addi r1,r1,40
ffc0f6e4: 4e 80 00 20 blr
ffc0f59c <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
ffc0f59c: 81 23 01 38 lwz r9,312(r3)
while (tvp) {
ffc0f5a0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f5a4: 41 9e 00 24 beq- cr7,ffc0f5c8 <_RTEMS_tasks_Switch_extension+0x2c>
tvp->tval = *tvp->ptr;
ffc0f5a8: 81 69 00 04 lwz r11,4(r9)
*tvp->ptr = tvp->gval;
ffc0f5ac: 80 09 00 08 lwz r0,8(r9)
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
ffc0f5b0: 81 4b 00 00 lwz r10,0(r11)
ffc0f5b4: 91 49 00 0c stw r10,12(r9)
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
ffc0f5b8: 81 29 00 00 lwz r9,0(r9)
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
ffc0f5bc: 90 0b 00 00 stw r0,0(r11)
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
ffc0f5c0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f5c4: 40 9e ff e4 bne+ cr7,ffc0f5a8 <_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;
ffc0f5c8: 81 24 01 38 lwz r9,312(r4)
while (tvp) {
ffc0f5cc: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f5d0: 4d 9e 00 20 beqlr cr7
tvp->gval = *tvp->ptr;
ffc0f5d4: 81 69 00 04 lwz r11,4(r9)
*tvp->ptr = tvp->tval;
ffc0f5d8: 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;
ffc0f5dc: 81 4b 00 00 lwz r10,0(r11)
ffc0f5e0: 91 49 00 08 stw r10,8(r9)
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
ffc0f5e4: 81 29 00 00 lwz r9,0(r9)
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
ffc0f5e8: 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) {
ffc0f5ec: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f5f0: 40 9e ff e4 bne+ cr7,ffc0f5d4 <_RTEMS_tasks_Switch_extension+0x38><== NEVER TAKEN
ffc0f5f4: 4e 80 00 20 blr
ffc0a9b8 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
ffc0a9b8: 94 21 ff e0 stwu r1,-32(r1)
ffc0a9bc: 7c 08 02 a6 mflr r0
ffc0a9c0: 7c 64 1b 78 mr r4,r3
ffc0a9c4: 3c 60 00 00 lis r3,0
ffc0a9c8: 90 01 00 24 stw r0,36(r1)
ffc0a9cc: 38 63 2b a0 addi r3,r3,11168
ffc0a9d0: 38 a1 00 08 addi r5,r1,8
ffc0a9d4: 93 e1 00 1c stw r31,28(r1)
ffc0a9d8: 48 00 27 e9 bl ffc0d1c0 <_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 ) {
ffc0a9dc: 80 01 00 08 lwz r0,8(r1)
ffc0a9e0: 7c 7f 1b 78 mr r31,r3
ffc0a9e4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a9e8: 40 9e 00 48 bne- cr7,ffc0aa30 <_Rate_monotonic_Timeout+0x78><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
ffc0a9ec: 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);
ffc0a9f0: 80 03 00 10 lwz r0,16(r3)
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
ffc0a9f4: 70 09 40 00 andi. r9,r0,16384
ffc0a9f8: 41 82 00 14 beq- ffc0aa0c <_Rate_monotonic_Timeout+0x54>
ffc0a9fc: 81 23 00 20 lwz r9,32(r3)
ffc0aa00: 80 1f 00 08 lwz r0,8(r31)
ffc0aa04: 7f 89 00 00 cmpw cr7,r9,r0
ffc0aa08: 41 9e 00 68 beq- cr7,ffc0aa70 <_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 ) {
ffc0aa0c: 80 1f 00 38 lwz r0,56(r31)
ffc0aa10: 2f 80 00 01 cmpwi cr7,r0,1
ffc0aa14: 41 9e 00 30 beq- cr7,ffc0aa44 <_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;
ffc0aa18: 38 00 00 04 li r0,4
ffc0aa1c: 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;
ffc0aa20: 3d 20 00 00 lis r9,0
ffc0aa24: 81 69 27 ac lwz r11,10156(r9)
ffc0aa28: 38 0b ff ff addi r0,r11,-1
ffc0aa2c: 90 09 27 ac stw r0,10156(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc0aa30: 80 01 00 24 lwz r0,36(r1)
ffc0aa34: 83 e1 00 1c lwz r31,28(r1)
ffc0aa38: 38 21 00 20 addi r1,r1,32
ffc0aa3c: 7c 08 03 a6 mtlr r0
ffc0aa40: 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;
ffc0aa44: 38 00 00 03 li r0,3
ffc0aa48: 90 1f 00 38 stw r0,56(r31)
_Rate_monotonic_Initiate_statistics( the_period );
ffc0aa4c: 7f e3 fb 78 mr r3,r31
ffc0aa50: 4b ff f7 55 bl ffc0a1a4 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc0aa54: 80 1f 00 3c lwz r0,60(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0aa58: 3c 60 00 00 lis r3,0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc0aa5c: 90 1f 00 1c stw r0,28(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0aa60: 38 63 2d 88 addi r3,r3,11656
ffc0aa64: 38 9f 00 10 addi r4,r31,16
ffc0aa68: 48 00 4b ed bl ffc0f654 <_Watchdog_Insert>
ffc0aa6c: 4b ff ff b4 b ffc0aa20 <_Rate_monotonic_Timeout+0x68>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc0aa70: 3c 80 10 03 lis r4,4099
ffc0aa74: 60 84 ff f8 ori r4,r4,65528
ffc0aa78: 48 00 31 55 bl ffc0dbcc <_Thread_Clear_state>
ffc0aa7c: 4b ff ff d0 b ffc0aa4c <_Rate_monotonic_Timeout+0x94>
ffc0ffc8 <_Scheduler_priority_Block>:
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_extract(
Thread_Control *the_thread
)
{
Chain_Control *ready = the_thread->scheduler.priority->ready_chain;
ffc0ffc8: 81 24 00 8c lwz r9,140(r4)
ffc0ffcc: 81 29 00 00 lwz r9,0(r9)
if ( _Chain_Has_only_one_node( ready ) ) {
ffc0ffd0: 81 69 00 00 lwz r11,0(r9)
ffc0ffd4: 80 09 00 08 lwz r0,8(r9)
ffc0ffd8: 7f 8b 00 00 cmpw cr7,r11,r0
ffc0ffdc: 41 9e 00 a8 beq- cr7,ffc10084 <_Scheduler_priority_Block+0xbc>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0ffe0: 81 64 00 00 lwz r11,0(r4)
previous = the_node->previous;
ffc0ffe4: 81 24 00 04 lwz r9,4(r4)
next->previous = previous;
ffc0ffe8: 91 2b 00 04 stw r9,4(r11)
previous->next = next;
ffc0ffec: 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 );
ffc0fff0: 3d 20 00 00 lis r9,0
ffc0fff4: 39 29 2d 38 addi r9,r9,11576
{
_Scheduler_priority_Ready_queue_extract(the_thread);
/* TODO: flash critical section */
if ( _Thread_Is_heir( the_thread ) )
ffc0fff8: 80 09 00 10 lwz r0,16(r9)
ffc0fffc: 7f 84 00 00 cmpw cr7,r4,r0
ffc10000: 41 9e 00 1c beq- cr7,ffc1001c <_Scheduler_priority_Block+0x54>
_Scheduler_priority_Schedule_body(the_scheduler);
if ( _Thread_Is_executing( the_thread ) )
ffc10004: 80 09 00 0c lwz r0,12(r9)
ffc10008: 7f 84 00 00 cmpw cr7,r4,r0
ffc1000c: 4c be 00 20 bnelr+ cr7
_Thread_Dispatch_necessary = true;
ffc10010: 38 00 00 01 li r0,1
ffc10014: 98 09 00 18 stb r0,24(r9)
ffc10018: 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 );
ffc1001c: 3c a0 00 00 lis r5,0
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
_Scheduler_priority_Block_body(the_scheduler, the_thread);
}
ffc10020: 81 43 00 00 lwz r10,0(r3)
ffc10024: 81 65 27 74 lwz r11,10100(r5)
ffc10028: 7d 66 00 34 cntlzw r6,r11
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc1002c: 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 );
ffc10030: 91 65 27 74 stw r11,10100(r5)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc10034: 38 e7 2d 60 addi r7,r7,11616
ffc10038: 54 c8 10 3a rlwinm r8,r6,2,0,29
ffc1003c: 7c 07 40 2e lwzx r0,r7,r8
ffc10040: 7c 0b 00 34 cntlzw r11,r0
return (_Priority_Bits_index( major ) << 4) +
ffc10044: 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 );
ffc10048: 7c 07 41 2e stwx r0,r7,r8
return (_Priority_Bits_index( major ) << 4) +
ffc1004c: 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 ] ) )
ffc10050: 1d 6b 00 0c mulli r11,r11,12
ffc10054: 7d 0a 5a 14 add r8,r10,r11
ffc10058: 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 );
ffc1005c: 38 08 00 04 addi r0,r8,4
ffc10060: 7f 8b 00 00 cmpw cr7,r11,r0
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
ffc10064: 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 ] ) )
ffc10068: 41 9e 00 08 beq- cr7,ffc10070 <_Scheduler_priority_Block+0xa8><== NEVER TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
ffc1006c: 7d 60 5b 78 mr r0,r11
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(
Scheduler_Control *the_scheduler
)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
ffc10070: 90 09 00 10 stw r0,16(r9)
/* TODO: flash critical section */
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body(the_scheduler);
if ( _Thread_Is_executing( the_thread ) )
ffc10074: 80 09 00 0c lwz r0,12(r9)
ffc10078: 7f 84 00 00 cmpw cr7,r4,r0
ffc1007c: 4c be 00 20 bnelr+ cr7
ffc10080: 4b ff ff 90 b ffc10010 <_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 );
ffc10084: 38 09 00 04 addi r0,r9,4
head->next = tail;
head->previous = NULL;
tail->previous = head;
ffc10088: 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;
ffc1008c: 90 09 00 00 stw r0,0(r9)
head->previous = NULL;
ffc10090: 38 00 00 00 li r0,0
ffc10094: 90 09 00 04 stw r0,4(r9)
{
Chain_Control *ready = the_thread->scheduler.priority->ready_chain;
if ( _Chain_Has_only_one_node( ready ) ) {
_Chain_Initialize_empty( ready );
_Priority_bit_map_Remove( &the_thread->scheduler.priority->Priority_map );
ffc10098: 81 24 00 8c lwz r9,140(r4)
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
ffc1009c: 81 69 00 04 lwz r11,4(r9)
ffc100a0: 80 09 00 14 lwz r0,20(r9)
ffc100a4: 81 4b 00 00 lwz r10,0(r11)
ffc100a8: 7d 40 00 38 and r0,r10,r0
if ( *the_priority_map->minor == 0 )
ffc100ac: 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;
ffc100b0: 90 0b 00 00 stw r0,0(r11)
if ( *the_priority_map->minor == 0 )
ffc100b4: 40 be ff 3c bne- cr7,ffc0fff0 <_Scheduler_priority_Block+0x28>
_Priority_Major_bit_map &= the_priority_map->block_major;
ffc100b8: 3d 60 00 00 lis r11,0
ffc100bc: 80 09 00 10 lwz r0,16(r9)
ffc100c0: 81 4b 27 74 lwz r10,10100(r11)
ffc100c4: 7d 40 00 38 and r0,r10,r0
ffc100c8: 90 0b 27 74 stw r0,10100(r11)
ffc100cc: 4b ff ff 24 b ffc0fff0 <_Scheduler_priority_Block+0x28>
ffc0b3dc <_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 );
ffc0b3dc: 3d 20 00 00 lis r9,0
void _Scheduler_priority_Schedule(
Scheduler_Control *the_scheduler
)
{
_Scheduler_priority_Schedule_body( the_scheduler );
}
ffc0b3e0: 81 63 00 00 lwz r11,0(r3)
ffc0b3e4: 80 09 27 74 lwz r0,10100(r9)
ffc0b3e8: 7c 07 00 34 cntlzw r7,r0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0b3ec: 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 );
ffc0b3f0: 90 09 27 74 stw r0,10100(r9)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0b3f4: 39 08 2d 60 addi r8,r8,11616
ffc0b3f8: 54 ea 10 3a rlwinm r10,r7,2,0,29
ffc0b3fc: 7c c8 50 2e lwzx r6,r8,r10
ffc0b400: 7c c0 33 78 mr r0,r6
ffc0b404: 7c 06 00 34 cntlzw r6,r0
return (_Priority_Bits_index( major ) << 4) +
ffc0b408: 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 );
ffc0b40c: 7c 08 51 2e stwx r0,r8,r10
return (_Priority_Bits_index( major ) << 4) +
ffc0b410: 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 ] ) )
ffc0b414: 1d 29 00 0c mulli r9,r9,12
ffc0b418: 7d 4b 4a 14 add r10,r11,r9
ffc0b41c: 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 );
ffc0b420: 38 0a 00 04 addi r0,r10,4
ffc0b424: 7f 89 00 00 cmpw cr7,r9,r0
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
ffc0b428: 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 ] ) )
ffc0b42c: 41 9e 00 08 beq- cr7,ffc0b434 <_Scheduler_priority_Schedule+0x58><== NEVER TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
ffc0b430: 7d 20 4b 78 mr r0,r9
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(
Scheduler_Control *the_scheduler
)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
ffc0b434: 3d 20 00 00 lis r9,0
ffc0b438: 90 09 2d 48 stw r0,11592(r9)
ffc0b43c: 4e 80 00 20 blr
ffc0b590 <_Scheduler_priority_Yield>:
{
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ffc0b590: 3d 40 00 00 lis r10,0
ffc0b594: 39 4a 2d 38 addi r10,r10,11576
ffc0b598: 81 2a 00 0c lwz r9,12(r10)
ready = executing->scheduler.priority->ready_chain;
ffc0b59c: 81 69 00 8c lwz r11,140(r9)
ffc0b5a0: 81 6b 00 00 lwz r11,0(r11)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0b5a4: 7c 00 00 a6 mfmsr r0
ffc0b5a8: 7d 10 42 a6 mfsprg r8,0
ffc0b5ac: 7c 08 40 78 andc r8,r0,r8
ffc0b5b0: 7d 00 01 24 mtmsr r8
_ISR_Disable( level );
if ( !_Chain_Has_only_one_node( ready ) ) {
ffc0b5b4: 80 eb 00 00 lwz r7,0(r11)
ffc0b5b8: 81 0b 00 08 lwz r8,8(r11)
ffc0b5bc: 7f 87 40 00 cmpw cr7,r7,r8
ffc0b5c0: 41 9e 00 60 beq- cr7,ffc0b620 <_Scheduler_priority_Yield+0x90>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0b5c4: 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 );
ffc0b5c8: 38 ab 00 04 addi r5,r11,4
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
ffc0b5cc: 80 e9 00 04 lwz r7,4(r9)
next->previous = previous;
ffc0b5d0: 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;
ffc0b5d4: 81 0b 00 08 lwz r8,8(r11)
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
ffc0b5d8: 90 c7 00 00 stw r6,0(r7)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
ffc0b5dc: 91 2b 00 08 stw r9,8(r11)
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
ffc0b5e0: 90 a9 00 00 stw r5,0(r9)
tail->previous = the_node;
old_last->next = the_node;
the_node->previous = old_last;
ffc0b5e4: 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;
tail->previous = the_node;
old_last->next = the_node;
ffc0b5e8: 91 28 00 00 stw r9,0(r8)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0b5ec: 7d 00 00 a6 mfmsr r8
ffc0b5f0: 7c 00 01 24 mtmsr r0
ffc0b5f4: 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 ) )
ffc0b5f8: 81 0a 00 10 lwz r8,16(r10)
ffc0b5fc: 7f 89 40 00 cmpw cr7,r9,r8
ffc0b600: 41 9e 00 14 beq- cr7,ffc0b614 <_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;
ffc0b604: 39 20 00 01 li r9,1
ffc0b608: 99 2a 00 18 stb r9,24(r10)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0b60c: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
}
ffc0b610: 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 );
ffc0b614: 81 2b 00 00 lwz r9,0(r11)
ffc0b618: 91 2a 00 10 stw r9,16(r10)
ffc0b61c: 4b ff ff e8 b ffc0b604 <_Scheduler_priority_Yield+0x74>
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
ffc0b620: 81 6a 00 10 lwz r11,16(r10)
ffc0b624: 7f 89 58 00 cmpw cr7,r9,r11
ffc0b628: 40 9e ff dc bne+ cr7,ffc0b604 <_Scheduler_priority_Yield+0x74><== NEVER TAKEN
ffc0b62c: 4b ff ff e0 b ffc0b60c <_Scheduler_priority_Yield+0x7c>
ffc0a2f4 <_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() );
ffc0a2f4: 3d 20 00 00 lis r9,0
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
ffc0a2f8: 94 21 ff d8 stwu r1,-40(r1)
ffc0a2fc: 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 );
ffc0a300: 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() );
ffc0a304: 81 69 20 ac lwz r11,8364(r9)
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
ffc0a308: 3d 20 00 00 lis r9,0
ffc0a30c: 81 49 27 64 lwz r10,10084(r9)
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
ffc0a310: 38 63 27 30 addi r3,r3,10032
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
ffc0a314: 1d 6b 03 e8 mulli r11,r11,1000
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
ffc0a318: 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 );
ffc0a31c: 3b e1 00 08 addi r31,r1,8
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
ffc0a320: 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 );
ffc0a324: 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;
ffc0a328: 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() );
ffc0a32c: 91 61 00 0c stw r11,12(r1)
ffc0a330: 39 40 00 00 li r10,0
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
ffc0a334: 90 09 27 64 stw r0,10084(r9)
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
ffc0a338: 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 );
ffc0a33c: 48 00 29 49 bl ffc0cc84 <_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 );
ffc0a340: 3c 60 00 00 lis r3,0
ffc0a344: 38 63 27 40 addi r3,r3,10048
ffc0a348: 7f e4 fb 78 mr r4,r31
ffc0a34c: 48 00 29 39 bl ffc0cc84 <_Timespec_Add_to>
while ( seconds ) {
ffc0a350: 7c 60 1b 79 mr. r0,r3
ffc0a354: 90 01 00 18 stw r0,24(r1)
ffc0a358: 41 82 00 24 beq- ffc0a37c <_TOD_Tickle_ticks+0x88>
ffc0a35c: 3f e0 00 00 lis r31,0
ffc0a360: 3b ff 2c 5c addi r31,r31,11356
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
ffc0a364: 7f e3 fb 78 mr r3,r31
ffc0a368: 48 00 31 2d bl ffc0d494 <_Watchdog_Tickle>
ffc0a36c: 80 01 00 18 lwz r0,24(r1)
ffc0a370: 35 20 ff ff addic. r9,r0,-1
ffc0a374: 91 21 00 18 stw r9,24(r1)
ffc0a378: 40 82 ff ec bne+ ffc0a364 <_TOD_Tickle_ticks+0x70> <== NEVER TAKEN
_Watchdog_Tickle_seconds();
seconds--;
}
}
ffc0a37c: 80 01 00 2c lwz r0,44(r1)
ffc0a380: 83 e1 00 24 lwz r31,36(r1)
ffc0a384: 38 21 00 28 addi r1,r1,40
ffc0a388: 7c 08 03 a6 mtlr r0
ffc0a38c: 4e 80 00 20 blr
ffc0b694 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
ffc0b694: 94 21 ff e8 stwu r1,-24(r1)
ffc0b698: 7c 08 02 a6 mflr r0
ffc0b69c: 90 01 00 1c stw r0,28(r1)
ffc0b6a0: 93 e1 00 14 stw r31,20(r1)
ffc0b6a4: 7c 7f 1b 78 mr r31,r3
ffc0b6a8: 93 81 00 08 stw r28,8(r1)
ffc0b6ac: 7c bc 2b 78 mr r28,r5
ffc0b6b0: 93 a1 00 0c stw r29,12(r1)
ffc0b6b4: 93 c1 00 10 stw r30,16(r1)
ffc0b6b8: 7c 9e 23 78 mr r30,r4
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
ffc0b6bc: 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 );
ffc0b6c0: 48 00 12 4d bl ffc0c90c <_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 )
ffc0b6c4: 80 1f 00 14 lwz r0,20(r31)
ffc0b6c8: 7f 80 f0 00 cmpw cr7,r0,r30
ffc0b6cc: 41 9e 00 10 beq- cr7,ffc0b6dc <_Thread_Change_priority+0x48>
_Thread_Set_priority( the_thread, new_priority );
ffc0b6d0: 7f e3 fb 78 mr r3,r31
ffc0b6d4: 7f c4 f3 78 mr r4,r30
ffc0b6d8: 48 00 11 6d bl ffc0c844 <_Thread_Set_priority>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0b6dc: 7f c0 00 a6 mfmsr r30
ffc0b6e0: 7c 10 42 a6 mfsprg r0,0
ffc0b6e4: 7f c0 00 78 andc r0,r30,r0
ffc0b6e8: 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;
ffc0b6ec: 80 1f 00 10 lwz r0,16(r31)
if ( state != STATES_TRANSIENT ) {
ffc0b6f0: 2f 80 00 04 cmpwi cr7,r0,4
ffc0b6f4: 41 9e 00 88 beq- cr7,ffc0b77c <_Thread_Change_priority+0xe8>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
ffc0b6f8: 73 a9 00 04 andi. r9,r29,4
ffc0b6fc: 41 82 00 38 beq- ffc0b734 <_Thread_Change_priority+0xa0><== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0b700: 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);
ffc0b704: 3d 20 00 03 lis r9,3 <== NOT EXECUTED
ffc0b708: 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 ) ) {
ffc0b70c: 7c 0b 48 39 and. r11,r0,r9 <== NOT EXECUTED
ffc0b710: 40 82 00 40 bne- ffc0b750 <_Thread_Change_priority+0xbc><== NOT EXECUTED
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
ffc0b714: 80 01 00 1c lwz r0,28(r1)
ffc0b718: 83 81 00 08 lwz r28,8(r1)
ffc0b71c: 7c 08 03 a6 mtlr r0
ffc0b720: 83 a1 00 0c lwz r29,12(r1)
ffc0b724: 83 c1 00 10 lwz r30,16(r1)
ffc0b728: 83 e1 00 14 lwz r31,20(r1)
ffc0b72c: 38 21 00 18 addi r1,r1,24
ffc0b730: 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);
ffc0b734: 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 );
ffc0b738: 91 3f 00 10 stw r9,16(r31)
ffc0b73c: 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);
ffc0b740: 3d 20 00 03 lis r9,3
ffc0b744: 61 29 be e0 ori r9,r9,48864
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
ffc0b748: 7c 0b 48 39 and. r11,r0,r9
ffc0b74c: 41 82 ff c8 beq+ ffc0b714 <_Thread_Change_priority+0x80>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
ffc0b750: 80 7f 00 44 lwz r3,68(r31)
ffc0b754: 7f e4 fb 78 mr r4,r31
ffc0b758: 48 00 0f f5 bl ffc0c74c <_Thread_queue_Requeue>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
ffc0b75c: 80 01 00 1c lwz r0,28(r1)
ffc0b760: 83 81 00 08 lwz r28,8(r1)
ffc0b764: 7c 08 03 a6 mtlr r0
ffc0b768: 83 a1 00 0c lwz r29,12(r1)
ffc0b76c: 83 c1 00 10 lwz r30,16(r1)
ffc0b770: 83 e1 00 14 lwz r31,20(r1)
ffc0b774: 38 21 00 18 addi r1,r1,24
ffc0b778: 4e 80 00 20 blr
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
ffc0b77c: 73 bd 00 04 andi. r29,r29,4
ffc0b780: 40 82 00 58 bne- ffc0b7d8 <_Thread_Change_priority+0x144><== NEVER TAKEN
* FIXME: hard-coded for priority scheduling. Might be ok since this
* function is specific to priority scheduling?
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
if ( prepend_it )
ffc0b784: 2f 9c 00 00 cmpwi cr7,r28,0
* Ready Queue with interrupts off.
*
* FIXME: hard-coded for priority scheduling. Might be ok since this
* function is specific to priority scheduling?
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
ffc0b788: 93 bf 00 10 stw r29,16(r31)
if ( prepend_it )
ffc0b78c: 41 9e 00 bc beq- cr7,ffc0b848 <_Thread_Change_priority+0x1b4>
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue_first(
Thread_Control *the_thread
)
{
_Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map );
ffc0b790: 81 3f 00 8c lwz r9,140(r31)
ffc0b794: 3d 40 00 00 lis r10,0
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
ffc0b798: 81 69 00 04 lwz r11,4(r9)
ffc0b79c: 80 09 00 0c lwz r0,12(r9)
ffc0b7a0: 81 0b 00 00 lwz r8,0(r11)
ffc0b7a4: 7d 00 03 78 or r0,r8,r0
ffc0b7a8: 90 0b 00 00 stw r0,0(r11)
_Chain_Prepend_unprotected( the_thread->scheduler.priority->ready_chain,
ffc0b7ac: 81 7f 00 8c lwz r11,140(r31)
_Priority_Major_bit_map |= the_priority_map->ready_major;
ffc0b7b0: 80 09 00 08 lwz r0,8(r9)
ffc0b7b4: 81 2b 00 00 lwz r9,0(r11)
ffc0b7b8: 81 0a 27 74 lwz r8,10100(r10)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc0b7bc: 81 69 00 00 lwz r11,0(r9)
ffc0b7c0: 7d 00 03 78 or r0,r8,r0
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc0b7c4: 91 3f 00 04 stw r9,4(r31)
ffc0b7c8: 90 0a 27 74 stw r0,10100(r10)
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
before_node->previous = the_node;
ffc0b7cc: 93 eb 00 04 stw r31,4(r11)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
ffc0b7d0: 93 e9 00 00 stw r31,0(r9)
the_node->next = before_node;
ffc0b7d4: 91 7f 00 00 stw r11,0(r31)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0b7d8: 7c 00 00 a6 mfmsr r0
ffc0b7dc: 7f c0 01 24 mtmsr r30
ffc0b7e0: 7c 00 01 24 mtmsr r0
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule(
Scheduler_Control *the_scheduler
)
{
the_scheduler->Operations.schedule( the_scheduler );
ffc0b7e4: 3c 60 00 00 lis r3,0
ffc0b7e8: 38 63 2c 20 addi r3,r3,11296
ffc0b7ec: 80 03 00 04 lwz r0,4(r3)
ffc0b7f0: 7c 09 03 a6 mtctr r0
ffc0b7f4: 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 );
ffc0b7f8: 3d 20 00 00 lis r9,0
ffc0b7fc: 39 29 2d 38 addi r9,r9,11576
ffc0b800: 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(&_Scheduler);
if ( !_Thread_Is_executing_also_the_heir() &&
ffc0b804: 80 09 00 10 lwz r0,16(r9)
ffc0b808: 7f 8b 00 00 cmpw cr7,r11,r0
ffc0b80c: 41 9e 00 18 beq- cr7,ffc0b824 <_Thread_Change_priority+0x190>
ffc0b810: 88 0b 00 74 lbz r0,116(r11)
ffc0b814: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b818: 41 9e 00 0c beq- cr7,ffc0b824 <_Thread_Change_priority+0x190>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
ffc0b81c: 38 00 00 01 li r0,1
ffc0b820: 98 09 00 18 stb r0,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0b824: 7f c0 01 24 mtmsr r30
_ISR_Enable( level );
}
ffc0b828: 80 01 00 1c lwz r0,28(r1)
ffc0b82c: 83 81 00 08 lwz r28,8(r1)
ffc0b830: 7c 08 03 a6 mtlr r0
ffc0b834: 83 a1 00 0c lwz r29,12(r1)
ffc0b838: 83 c1 00 10 lwz r30,16(r1)
ffc0b83c: 83 e1 00 14 lwz r31,20(r1)
ffc0b840: 38 21 00 18 addi r1,r1,24
ffc0b844: 4e 80 00 20 blr
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue(
Thread_Control *the_thread
)
{
_Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map );
ffc0b848: 81 3f 00 8c lwz r9,140(r31)
ffc0b84c: 3d 40 00 00 lis r10,0
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
ffc0b850: 81 69 00 04 lwz r11,4(r9)
ffc0b854: 80 09 00 0c lwz r0,12(r9)
ffc0b858: 81 0b 00 00 lwz r8,0(r11)
ffc0b85c: 7d 00 03 78 or r0,r8,r0
ffc0b860: 90 0b 00 00 stw r0,0(r11)
_Chain_Append_unprotected( the_thread->scheduler.priority->ready_chain,
ffc0b864: 81 7f 00 8c lwz r11,140(r31)
_Priority_Major_bit_map |= the_priority_map->ready_major;
ffc0b868: 80 09 00 08 lwz r0,8(r9)
ffc0b86c: 81 2b 00 00 lwz r9,0(r11)
ffc0b870: 81 0a 27 74 lwz r8,10100(r10)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc0b874: 81 69 00 08 lwz r11,8(r9)
ffc0b878: 7d 08 03 78 or r8,r8,r0
the_node->next = tail;
tail->previous = the_node;
ffc0b87c: 93 e9 00 08 stw r31,8(r9)
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
ffc0b880: 38 09 00 04 addi r0,r9,4
ffc0b884: 91 0a 27 74 stw r8,10100(r10)
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
old_last->next = the_node;
the_node->previous = old_last;
ffc0b888: 91 7f 00 04 stw r11,4(r31)
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
ffc0b88c: 90 1f 00 00 stw r0,0(r31)
tail->previous = the_node;
old_last->next = the_node;
ffc0b890: 93 eb 00 00 stw r31,0(r11)
ffc0b894: 4b ff ff 44 b ffc0b7d8 <_Thread_Change_priority+0x144>
ffc0b920 <_Thread_Close>:
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
ffc0b920: 94 21 ff e8 stwu r1,-24(r1)
ffc0b924: 7c 08 02 a6 mflr r0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc0b928: 39 60 00 00 li r11,0
ffc0b92c: 90 01 00 1c stw r0,28(r1)
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
ffc0b930: a0 04 00 0a lhz r0,10(r4)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc0b934: 81 23 00 1c lwz r9,28(r3)
ffc0b938: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0b93c: 93 c1 00 10 stw r30,16(r1)
ffc0b940: 7c 7e 1b 78 mr r30,r3
ffc0b944: 93 e1 00 14 stw r31,20(r1)
ffc0b948: 7c 9f 23 78 mr r31,r4
ffc0b94c: 93 a1 00 0c stw r29,12(r1)
ffc0b950: 7d 69 01 2e stwx r11,r9,r0
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
ffc0b954: 3f a0 00 00 lis r29,0
ffc0b958: 81 3d 27 28 lwz r9,10024(r29)
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
ffc0b95c: 7c 83 23 78 mr r3,r4
ffc0b960: 38 09 ff ff addi r0,r9,-1
ffc0b964: 90 1d 27 28 stw r0,10024(r29)
ffc0b968: 48 00 17 0d bl ffc0d074 <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc0b96c: 81 3d 27 28 lwz r9,10024(r29)
ffc0b970: 38 09 00 01 addi r0,r9,1
ffc0b974: 90 1d 27 28 stw r0,10024(r29)
/*
* Now we are in a dispatching critical section again and we
* can take the thread OUT of the published set. It is invalid
* to use this thread's Id OR name after this call.
*/
_Objects_Close( information, &the_thread->Object );
ffc0b978: 7f e4 fb 78 mr r4,r31
ffc0b97c: 7f c3 f3 78 mr r3,r30
ffc0b980: 4b ff ef b9 bl ffc0a938 <_Objects_Close>
/*
* By setting the dormant state, the thread will not be considered
* for scheduling when we remove any blocking states.
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
ffc0b984: 7f e3 fb 78 mr r3,r31
ffc0b988: 38 80 00 01 li r4,1
ffc0b98c: 48 00 0e f9 bl ffc0c884 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
ffc0b990: 7f e3 fb 78 mr r3,r31
ffc0b994: 48 00 0c bd bl ffc0c650 <_Thread_queue_Extract_with_proxy>
ffc0b998: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b99c: 40 9e 00 10 bne- cr7,ffc0b9ac <_Thread_Close+0x8c>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
ffc0b9a0: 80 1f 00 50 lwz r0,80(r31)
ffc0b9a4: 2f 80 00 02 cmpwi cr7,r0,2
ffc0b9a8: 41 9e 00 78 beq- cr7,ffc0ba20 <_Thread_Close+0x100>
RTEMS_INLINE_ROUTINE void _Scheduler_Thread_scheduler_free(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
return the_scheduler->Operations.scheduler_free( the_scheduler, the_thread );
ffc0b9ac: 3c 60 00 00 lis r3,0
ffc0b9b0: 38 63 2c 20 addi r3,r3,11296
ffc0b9b4: 80 03 00 18 lwz r0,24(r3)
ffc0b9b8: 7f e4 fb 78 mr r4,r31
ffc0b9bc: 7c 09 03 a6 mtctr r0
ffc0b9c0: 4e 80 04 21 bctrl
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
if ( the_thread->Start.fp_context )
ffc0b9c4: 80 7f 00 bc lwz r3,188(r31)
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
ffc0b9c8: 38 00 00 00 li r0,0
if ( the_thread->Start.fp_context )
ffc0b9cc: 2f 83 00 00 cmpwi cr7,r3,0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
ffc0b9d0: 90 1f 01 24 stw r0,292(r31)
if ( the_thread->Start.fp_context )
ffc0b9d4: 41 9e 00 08 beq- cr7,ffc0b9dc <_Thread_Close+0xbc> <== NEVER TAKEN
(void) _Workspace_Free( the_thread->Start.fp_context );
ffc0b9d8: 48 00 1c 51 bl ffc0d628 <_Workspace_Free>
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
ffc0b9dc: 7f e3 fb 78 mr r3,r31
ffc0b9e0: 48 00 10 71 bl ffc0ca50 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
if ( the_thread->extensions )
ffc0b9e4: 80 7f 01 34 lwz r3,308(r31)
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
ffc0b9e8: 38 00 00 00 li r0,0
if ( the_thread->extensions )
ffc0b9ec: 2f 83 00 00 cmpwi cr7,r3,0
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
ffc0b9f0: 90 1f 00 c0 stw r0,192(r31)
if ( the_thread->extensions )
ffc0b9f4: 41 9e 00 08 beq- cr7,ffc0b9fc <_Thread_Close+0xdc>
(void) _Workspace_Free( the_thread->extensions );
ffc0b9f8: 48 00 1c 31 bl ffc0d628 <_Workspace_Free>
the_thread->extensions = NULL;
ffc0b9fc: 38 00 00 00 li r0,0
}
ffc0ba00: 83 a1 00 0c lwz r29,12(r1)
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
if ( the_thread->extensions )
(void) _Workspace_Free( the_thread->extensions );
the_thread->extensions = NULL;
ffc0ba04: 90 1f 01 34 stw r0,308(r31)
}
ffc0ba08: 80 01 00 1c lwz r0,28(r1)
ffc0ba0c: 83 c1 00 10 lwz r30,16(r1)
ffc0ba10: 7c 08 03 a6 mtlr r0
ffc0ba14: 83 e1 00 14 lwz r31,20(r1)
ffc0ba18: 38 21 00 18 addi r1,r1,24
ffc0ba1c: 4e 80 00 20 blr
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
ffc0ba20: 38 7f 00 48 addi r3,r31,72
ffc0ba24: 48 00 19 a1 bl ffc0d3c4 <_Watchdog_Remove>
ffc0ba28: 4b ff ff 84 b ffc0b9ac <_Thread_Close+0x8c>
ffc0bb28 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0bb28: 94 21 ff e8 stwu r1,-24(r1)
ffc0bb2c: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0bb30: 38 81 00 08 addi r4,r1,8
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0bb34: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0bb38: 48 00 02 39 bl ffc0bd70 <_Thread_Get>
switch ( location ) {
ffc0bb3c: 80 01 00 08 lwz r0,8(r1)
ffc0bb40: 2f 80 00 00 cmpwi cr7,r0,0
ffc0bb44: 40 9e 00 20 bne- cr7,ffc0bb64 <_Thread_Delay_ended+0x3c><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
ffc0bb48: 3c 80 10 00 lis r4,4096
ffc0bb4c: 60 84 00 18 ori r4,r4,24
ffc0bb50: 4b ff fd 49 bl ffc0b898 <_Thread_Clear_state>
ffc0bb54: 3d 20 00 00 lis r9,0
ffc0bb58: 81 69 27 28 lwz r11,10024(r9)
ffc0bb5c: 38 0b ff ff addi r0,r11,-1
ffc0bb60: 90 09 27 28 stw r0,10024(r9)
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
ffc0bb64: 80 01 00 1c lwz r0,28(r1)
ffc0bb68: 38 21 00 18 addi r1,r1,24
ffc0bb6c: 7c 08 03 a6 mtlr r0
ffc0bb70: 4e 80 00 20 blr
ffc0bb74 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
ffc0bb74: 94 21 ff b8 stwu r1,-72(r1)
ffc0bb78: 7c 08 02 a6 mflr r0
ffc0bb7c: 93 a1 00 3c stw r29,60(r1)
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
ffc0bb80: 3f a0 00 00 lis r29,0
ffc0bb84: 3b bd 2d 38 addi r29,r29,11576
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
ffc0bb88: 93 e1 00 44 stw r31,68(r1)
ffc0bb8c: 90 01 00 4c stw r0,76(r1)
ffc0bb90: 92 a1 00 1c stw r21,28(r1)
ffc0bb94: 92 c1 00 20 stw r22,32(r1)
ffc0bb98: 92 e1 00 24 stw r23,36(r1)
ffc0bb9c: 93 01 00 28 stw r24,40(r1)
ffc0bba0: 93 21 00 2c stw r25,44(r1)
ffc0bba4: 93 41 00 30 stw r26,48(r1)
ffc0bba8: 93 61 00 34 stw r27,52(r1)
ffc0bbac: 93 81 00 38 stw r28,56(r1)
ffc0bbb0: 93 c1 00 40 stw r30,64(r1)
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
ffc0bbb4: 83 fd 00 0c lwz r31,12(r29)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0bbb8: 7c 00 00 a6 mfmsr r0
ffc0bbbc: 7d 30 42 a6 mfsprg r9,0
ffc0bbc0: 7c 09 48 78 andc r9,r0,r9
ffc0bbc4: 7d 20 01 24 mtmsr r9
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
ffc0bbc8: 89 3d 00 18 lbz r9,24(r29)
ffc0bbcc: 3f 20 00 00 lis r25,0
ffc0bbd0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0bbd4: 41 9e 01 30 beq- cr7,ffc0bd04 <_Thread_Dispatch+0x190>
heir = _Thread_Heir;
ffc0bbd8: 83 dd 00 10 lwz r30,16(r29)
_Thread_Dispatch_disable_level = 1;
ffc0bbdc: 39 20 00 01 li r9,1
ffc0bbe0: 91 39 27 28 stw r9,10024(r25)
_Thread_Dispatch_necessary = false;
ffc0bbe4: 39 20 00 00 li r9,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 )
ffc0bbe8: 7f 9f f0 00 cmpw cr7,r31,r30
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Thread_Dispatch_necessary = false;
_Thread_Executing = heir;
ffc0bbec: 93 dd 00 0c stw r30,12(r29)
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Thread_Dispatch_necessary = false;
ffc0bbf0: 99 3d 00 18 stb r9,24(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 )
ffc0bbf4: 41 9e 01 10 beq- cr7,ffc0bd04 <_Thread_Dispatch+0x190>
ffc0bbf8: 3f 60 00 00 lis r27,0
ffc0bbfc: 3f 00 00 00 lis r24,0
ffc0bc00: 3b 41 00 08 addi r26,r1,8
ffc0bc04: 3b 7b 27 58 addi r27,r27,10072
ffc0bc08: 3b 81 00 10 addi r28,r1,16
ffc0bc0c: 3b 18 27 3c addi r24,r24,10044
#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;
ffc0bc10: 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;
ffc0bc14: 3a c0 00 01 li r22,1
_Thread_Dispatch_necessary = false;
ffc0bc18: 3a e0 00 00 li r23,0
ffc0bc1c: 48 00 00 d0 b ffc0bcec <_Thread_Dispatch+0x178>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0bc20: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
ffc0bc24: 7f 43 d3 78 mr r3,r26
ffc0bc28: 48 00 3f 29 bl ffc0fb50 <_TOD_Get_uptime>
_Timestamp_Subtract(
ffc0bc2c: 7f 63 db 78 mr r3,r27
ffc0bc30: 7f 44 d3 78 mr r4,r26
ffc0bc34: 7f 85 e3 78 mr r5,r28
ffc0bc38: 48 00 10 a9 bl ffc0cce0 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
ffc0bc3c: 7f 84 e3 78 mr r4,r28
ffc0bc40: 38 7f 00 84 addi r3,r31,132
ffc0bc44: 48 00 10 41 bl ffc0cc84 <_Timespec_Add_to>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0bc48: 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;
ffc0bc4c: 81 21 00 08 lwz r9,8(r1)
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
ffc0bc50: 7f e3 fb 78 mr r3,r31
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0bc54: 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;
ffc0bc58: 81 41 00 0c lwz r10,12(r1)
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
ffc0bc5c: 7f c4 f3 78 mr r4,r30
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
ffc0bc60: 91 3b 00 00 stw r9,0(r27)
ffc0bc64: 91 5b 00 04 stw r10,4(r27)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0bc68: 41 9e 00 14 beq- cr7,ffc0bc7c <_Thread_Dispatch+0x108> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
ffc0bc6c: 80 0b 00 00 lwz r0,0(r11)
ffc0bc70: 90 1f 01 28 stw r0,296(r31)
*_Thread_libc_reent = heir->libc_reent;
ffc0bc74: 80 1e 01 28 lwz r0,296(r30)
ffc0bc78: 90 0b 00 00 stw r0,0(r11)
}
_User_extensions_Thread_switch( executing, heir );
ffc0bc7c: 48 00 15 05 bl ffc0d180 <_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 )
ffc0bc80: 80 1f 01 24 lwz r0,292(r31)
_Context_Save_fp( &executing->fp_context );
ffc0bc84: 38 7f 01 24 addi r3,r31,292
* operations.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE )
if ( executing->fp_context != NULL )
ffc0bc88: 2f 80 00 00 cmpwi cr7,r0,0
ffc0bc8c: 41 9e 00 08 beq- cr7,ffc0bc94 <_Thread_Dispatch+0x120>
_Context_Save_fp( &executing->fp_context );
ffc0bc90: 48 00 b5 d1 bl ffc17260 <_CPU_Context_save_fp>
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
ffc0bc94: 38 7f 00 c4 addi r3,r31,196
ffc0bc98: 38 9e 00 c4 addi r4,r30,196
ffc0bc9c: 48 00 b7 45 bl ffc173e0 <_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 )
ffc0bca0: 80 1f 01 24 lwz r0,292(r31)
_Context_Restore_fp( &executing->fp_context );
ffc0bca4: 38 7f 01 24 addi r3,r31,292
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
_Context_Restore_fp( &executing->fp_context );
_Thread_Allocated_fp = executing;
}
#else
if ( executing->fp_context != NULL )
ffc0bca8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0bcac: 41 9e 00 08 beq- cr7,ffc0bcb4 <_Thread_Dispatch+0x140>
_Context_Restore_fp( &executing->fp_context );
ffc0bcb0: 48 00 b6 71 bl ffc17320 <_CPU_Context_restore_fp>
#endif
#endif
executing = _Thread_Executing;
ffc0bcb4: 83 fd 00 0c lwz r31,12(r29)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0bcb8: 7c 00 00 a6 mfmsr r0
ffc0bcbc: 7d 30 42 a6 mfsprg r9,0
ffc0bcc0: 7c 09 48 78 andc r9,r0,r9
ffc0bcc4: 7d 20 01 24 mtmsr r9
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
ffc0bcc8: 89 3d 00 18 lbz r9,24(r29)
ffc0bccc: 2f 89 00 00 cmpwi cr7,r9,0
ffc0bcd0: 41 9e 00 34 beq- cr7,ffc0bd04 <_Thread_Dispatch+0x190>
heir = _Thread_Heir;
ffc0bcd4: 83 dd 00 10 lwz r30,16(r29)
_Thread_Dispatch_disable_level = 1;
ffc0bcd8: 92 d9 27 28 stw r22,10024(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 )
ffc0bcdc: 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;
ffc0bce0: 9a fd 00 18 stb r23,24(r29)
_Thread_Executing = heir;
ffc0bce4: 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 )
ffc0bce8: 41 9e 00 1c beq- cr7,ffc0bd04 <_Thread_Dispatch+0x190> <== 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 )
ffc0bcec: 81 3e 00 7c lwz r9,124(r30)
ffc0bcf0: 2f 89 00 01 cmpwi cr7,r9,1
ffc0bcf4: 40 9e ff 2c bne+ cr7,ffc0bc20 <_Thread_Dispatch+0xac>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0bcf8: 81 35 27 24 lwz r9,10020(r21)
ffc0bcfc: 91 3e 00 78 stw r9,120(r30)
ffc0bd00: 4b ff ff 20 b ffc0bc20 <_Thread_Dispatch+0xac>
_ISR_Disable( level );
}
post_switch:
_Thread_Dispatch_disable_level = 0;
ffc0bd04: 39 20 00 00 li r9,0
ffc0bd08: 91 39 27 28 stw r9,10024(r25)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0bd0c: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
_API_extensions_Run_postswitch();
ffc0bd10: 4b ff dd 89 bl ffc09a98 <_API_extensions_Run_postswitch>
}
ffc0bd14: 80 01 00 4c lwz r0,76(r1)
ffc0bd18: 82 a1 00 1c lwz r21,28(r1)
ffc0bd1c: 7c 08 03 a6 mtlr r0
ffc0bd20: 82 c1 00 20 lwz r22,32(r1)
ffc0bd24: 82 e1 00 24 lwz r23,36(r1)
ffc0bd28: 83 01 00 28 lwz r24,40(r1)
ffc0bd2c: 83 21 00 2c lwz r25,44(r1)
ffc0bd30: 83 41 00 30 lwz r26,48(r1)
ffc0bd34: 83 61 00 34 lwz r27,52(r1)
ffc0bd38: 83 81 00 38 lwz r28,56(r1)
ffc0bd3c: 83 a1 00 3c lwz r29,60(r1)
ffc0bd40: 83 c1 00 40 lwz r30,64(r1)
ffc0bd44: 83 e1 00 44 lwz r31,68(r1)
ffc0bd48: 38 21 00 48 addi r1,r1,72
ffc0bd4c: 4e 80 00 20 blr
ffc0bd70 <_Thread_Get>:
*/
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
ffc0bd70: 7c 08 02 a6 mflr r0
ffc0bd74: 94 21 ff f8 stwu r1,-8(r1)
ffc0bd78: 7c 85 23 78 mr r5,r4
ffc0bd7c: 90 01 00 0c stw r0,12(r1)
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
ffc0bd80: 7c 60 1b 79 mr. r0,r3
ffc0bd84: 41 82 00 78 beq- ffc0bdfc <_Thread_Get+0x8c>
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
ffc0bd88: 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 )
ffc0bd8c: 39 69 ff ff addi r11,r9,-1
ffc0bd90: 2b 8b 00 02 cmplwi cr7,r11,2
ffc0bd94: 41 9d 00 4c bgt- cr7,ffc0bde0 <_Thread_Get+0x70>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
ffc0bd98: 54 0a 2e fe rlwinm r10,r0,5,27,31
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
ffc0bd9c: 2f 8a 00 01 cmpwi cr7,r10,1
ffc0bda0: 40 9e 00 40 bne- cr7,ffc0bde0 <_Thread_Get+0x70>
*location = OBJECTS_ERROR;
goto done;
}
api_information = _Objects_Information_table[ the_api ];
ffc0bda4: 3d 60 00 00 lis r11,0
ffc0bda8: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0bdac: 39 6b 2b 40 addi r11,r11,11072
ffc0bdb0: 7d 2b 48 2e lwzx r9,r11,r9
/*
* There is no way for this to happen if POSIX is enabled.
*/
#if !defined(RTEMS_POSIX_API)
if ( !api_information ) {
ffc0bdb4: 2f 89 00 00 cmpwi cr7,r9,0
ffc0bdb8: 41 9e 00 78 beq- cr7,ffc0be30 <_Thread_Get+0xc0> <== NEVER TAKEN
*location = OBJECTS_ERROR;
goto done;
}
#endif
information = api_information[ the_class ];
ffc0bdbc: 80 69 00 04 lwz r3,4(r9)
if ( !information ) {
ffc0bdc0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0bdc4: 41 9e 00 64 beq- cr7,ffc0be28 <_Thread_Get+0xb8>
*location = OBJECTS_ERROR;
goto done;
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
ffc0bdc8: 7c 04 03 78 mr r4,r0
ffc0bdcc: 4b ff f0 c1 bl ffc0ae8c <_Objects_Get>
done:
return tp;
}
ffc0bdd0: 80 01 00 0c lwz r0,12(r1)
ffc0bdd4: 38 21 00 08 addi r1,r1,8
ffc0bdd8: 7c 08 03 a6 mtlr r0
ffc0bddc: 4e 80 00 20 blr
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR;
ffc0bde0: 38 00 00 01 li r0,1
ffc0bde4: 90 05 00 00 stw r0,0(r5)
{
uint32_t the_api;
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
ffc0bde8: 38 60 00 00 li r3,0
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
ffc0bdec: 80 01 00 0c lwz r0,12(r1)
ffc0bdf0: 38 21 00 08 addi r1,r1,8
ffc0bdf4: 7c 08 03 a6 mtlr r0
ffc0bdf8: 4e 80 00 20 blr
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc0bdfc: 3d 20 00 00 lis r9,0
ffc0be00: 81 69 27 28 lwz r11,10024(r9)
ffc0be04: 39 6b 00 01 addi r11,r11,1
ffc0be08: 91 69 27 28 stw r11,10024(r9)
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
ffc0be0c: 90 04 00 00 stw r0,0(r4)
tp = _Thread_Executing;
ffc0be10: 3d 20 00 00 lis r9,0
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
ffc0be14: 80 01 00 0c lwz r0,12(r1)
ffc0be18: 38 21 00 08 addi r1,r1,8
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
tp = _Thread_Executing;
ffc0be1c: 80 69 2d 44 lwz r3,11588(r9)
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
ffc0be20: 7c 08 03 a6 mtlr r0
ffc0be24: 4e 80 00 20 blr
}
#endif
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
ffc0be28: 91 45 00 00 stw r10,0(r5)
goto done;
ffc0be2c: 4b ff ff c0 b ffc0bdec <_Thread_Get+0x7c>
/*
* There is no way for this to happen if POSIX is enabled.
*/
#if !defined(RTEMS_POSIX_API)
if ( !api_information ) {
*location = OBJECTS_ERROR;
ffc0be30: 91 45 00 00 stw r10,0(r5) <== NOT EXECUTED
{
uint32_t the_api;
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
ffc0be34: 38 60 00 00 li r3,0 <== NOT EXECUTED
* There is no way for this to happen if POSIX is enabled.
*/
#if !defined(RTEMS_POSIX_API)
if ( !api_information ) {
*location = OBJECTS_ERROR;
goto done;
ffc0be38: 4b ff ff b4 b ffc0bdec <_Thread_Get+0x7c> <== NOT EXECUTED
ffc12178 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc12178: 94 21 ff f0 stwu r1,-16(r1)
ffc1217c: 7c 08 02 a6 mflr r0
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
ffc12180: 3d 20 00 00 lis r9,0
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc12184: 90 01 00 14 stw r0,20(r1)
ffc12188: 93 e1 00 0c stw r31,12(r1)
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
ffc1218c: 83 e9 2d 44 lwz r31,11588(r9)
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc12190: 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;
ffc12194: 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);
ffc12198: 38 00 00 00 li r0,0
ffc1219c: 7c 00 00 a6 mfmsr r0
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc121a0: 71 2b 00 01 andi. r11,r9,1
ffc121a4: 40 82 00 58 bne- ffc121fc <_Thread_Handler+0x84>
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
asm volatile (
ffc121a8: 7d 30 42 a6 mfsprg r9,0
msr |= ppc_interrupt_get_disable_mask();
ffc121ac: 7d 20 03 78 or r0,r9,r0
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
}
_CPU_MSR_SET(msr);
ffc121b0: 7c 00 01 24 mtmsr r0
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
ffc121b4: 3d 20 00 00 lis r9,0
ffc121b8: 8b c9 28 dc lbz r30,10460(r9)
doneConstructors = 1;
ffc121bc: 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 );
ffc121c0: 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;
ffc121c4: 98 09 28 dc stb r0,10460(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 );
ffc121c8: 4b ff ac 7d bl ffc0ce44 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
ffc121cc: 4b ff 9b 85 bl ffc0bd50 <_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) */ {
ffc121d0: 2f 9e 00 00 cmpwi cr7,r30,0
ffc121d4: 41 9e 00 58 beq- cr7,ffc1222c <_Thread_Handler+0xb4>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
ffc121d8: 80 1f 00 94 lwz r0,148(r31)
ffc121dc: 2f 80 00 00 cmpwi cr7,r0,0
ffc121e0: 41 9e 00 5c beq- cr7,ffc1223c <_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 );
ffc121e4: 7f e3 fb 78 mr r3,r31
ffc121e8: 4b ff ac d1 bl ffc0ceb8 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
ffc121ec: 38 60 00 00 li r3,0
ffc121f0: 38 80 00 01 li r4,1
ffc121f4: 38 a0 00 05 li r5,5
ffc121f8: 4b ff 86 21 bl ffc0a818 <_Internal_error_Occurred>
ffc121fc: 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();
ffc12200: 7c 00 48 78 andc r0,r0,r9
}
_CPU_MSR_SET(msr);
ffc12204: 7c 00 01 24 mtmsr r0
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
ffc12208: 3d 20 00 00 lis r9,0
ffc1220c: 8b c9 28 dc lbz r30,10460(r9)
doneConstructors = 1;
ffc12210: 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 );
ffc12214: 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;
ffc12218: 98 09 28 dc stb r0,10460(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 );
ffc1221c: 4b ff ac 29 bl ffc0ce44 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
ffc12220: 4b ff 9b 31 bl ffc0bd50 <_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) */ {
ffc12224: 2f 9e 00 00 cmpwi cr7,r30,0
ffc12228: 40 9e ff b0 bne+ cr7,ffc121d8 <_Thread_Handler+0x60> <== ALWAYS TAKEN
INIT_NAME ();
ffc1222c: 48 00 60 f1 bl ffc1831c <_init>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
ffc12230: 80 1f 00 94 lwz r0,148(r31)
ffc12234: 2f 80 00 00 cmpwi cr7,r0,0
ffc12238: 40 9e ff ac bne+ cr7,ffc121e4 <_Thread_Handler+0x6c> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
ffc1223c: 80 1f 00 90 lwz r0,144(r31)
ffc12240: 80 7f 00 9c lwz r3,156(r31)
ffc12244: 7c 09 03 a6 mtctr r0
ffc12248: 4e 80 04 21 bctrl
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
ffc1224c: 90 7f 00 28 stw r3,40(r31)
ffc12250: 4b ff ff 94 b ffc121e4 <_Thread_Handler+0x6c>
ffc0be3c <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0be3c: 94 21 ff d0 stwu r1,-48(r1)
ffc0be40: 7c 08 02 a6 mflr r0
ffc0be44: 7d 80 00 26 mfcr r12
ffc0be48: 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;
ffc0be4c: 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
)
{
ffc0be50: 90 01 00 34 stw r0,52(r1)
ffc0be54: 92 e1 00 0c stw r23,12(r1)
ffc0be58: 93 01 00 10 stw r24,16(r1)
ffc0be5c: 7d 58 53 78 mr r24,r10
ffc0be60: 93 21 00 14 stw r25,20(r1)
ffc0be64: 7d 39 4b 78 mr r25,r9
ffc0be68: 93 41 00 18 stw r26,24(r1)
ffc0be6c: 7d 1a 43 78 mr r26,r8
ffc0be70: 93 61 00 1c stw r27,28(r1)
ffc0be74: 7c fb 3b 78 mr r27,r7
ffc0be78: 93 81 00 20 stw r28,32(r1)
ffc0be7c: 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 );
ffc0be80: 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
)
{
ffc0be84: 93 a1 00 24 stw r29,36(r1)
ffc0be88: 7c dd 33 78 mr r29,r6
ffc0be8c: 93 e1 00 2c stw r31,44(r1)
ffc0be90: 7c 9f 23 78 mr r31,r4
ffc0be94: 81 61 00 40 lwz r11,64(r1)
ffc0be98: 91 81 00 08 stw r12,8(r1)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0be9c: 93 c4 01 2c stw r30,300(r4)
ffc0bea0: 93 c4 01 30 stw r30,304(r4)
extensions_area = NULL;
the_thread->libc_reent = NULL;
ffc0bea4: 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 );
ffc0bea8: 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
)
{
ffc0beac: 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 );
ffc0beb0: 48 00 0a f9 bl ffc0c9a8 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
ffc0beb4: 7c 60 1b 79 mr. r0,r3
return false; /* stack allocation failed */
ffc0beb8: 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 )
ffc0bebc: 41 82 01 5c beq- ffc0c018 <_Thread_Initialize+0x1dc>
ffc0bec0: 7f 9d 00 40 cmplw cr7,r29,r0
ffc0bec4: 41 9d 01 54 bgt- cr7,ffc0c018 <_Thread_Initialize+0x1dc><== NEVER TAKEN
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
ffc0bec8: 2f 9b 00 00 cmpwi cr7,r27,0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
ffc0becc: 81 7f 00 c0 lwz r11,192(r31)
the_stack->size = size;
ffc0bed0: 90 1f 00 b4 stw r0,180(r31)
ffc0bed4: 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;
ffc0bed8: 3b 60 00 00 li r27,0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
ffc0bedc: 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 ) {
ffc0bee0: 40 9e 01 74 bne- cr7,ffc0c054 <_Thread_Initialize+0x218>
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0bee4: 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;
ffc0bee8: 91 3f 01 24 stw r9,292(r31)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0beec: 38 00 00 00 li r0,0
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0bef0: 81 7d 27 48 lwz r11,10056(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;
ffc0bef4: 91 3f 00 bc stw r9,188(r31)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0bef8: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0befc: 90 1f 00 50 stw r0,80(r31)
the_watchdog->routine = routine;
ffc0bf00: 90 1f 00 64 stw r0,100(r31)
the_watchdog->id = id;
ffc0bf04: 90 1f 00 68 stw r0,104(r31)
the_watchdog->user_data = user_data;
ffc0bf08: 90 1f 00 6c stw r0,108(r31)
ffc0bf0c: 40 9e 01 64 bne- cr7,ffc0c070 <_Thread_Initialize+0x234>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
ffc0bf10: 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;
ffc0bf14: 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;
ffc0bf18: 80 01 00 38 lwz r0,56(r1)
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
return
the_scheduler->Operations.scheduler_allocate( the_scheduler, the_thread );
ffc0bf1c: 3d 20 00 00 lis r9,0
ffc0bf20: 39 29 2c 20 addi r9,r9,11296
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
ffc0bf24: 9b 3f 00 a0 stb r25,160(r31)
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
ffc0bf28: 3b a0 00 00 li r29,0
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
ffc0bf2c: 90 1f 00 a8 stw r0,168(r31)
RTEMS_INLINE_ROUTINE void* _Scheduler_Thread_scheduler_allocate(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
return
ffc0bf30: 7d 23 4b 78 mr r3,r9
ffc0bf34: 7f e4 fb 78 mr r4,r31
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0bf38: 80 01 00 3c lwz r0,60(r1)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
ffc0bf3c: 93 1f 00 a4 stw r24,164(r31)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0bf40: 90 1f 00 ac stw r0,172(r31)
the_thread->current_state = STATES_DORMANT;
ffc0bf44: 38 00 00 01 li r0,1
ffc0bf48: 90 1f 00 10 stw r0,16(r31)
ffc0bf4c: 80 09 00 14 lwz r0,20(r9)
the_thread->Wait.queue = NULL;
ffc0bf50: 93 bf 00 44 stw r29,68(r31)
ffc0bf54: 7c 09 03 a6 mtctr r0
the_thread->resource_count = 0;
ffc0bf58: 93 bf 00 1c stw r29,28(r31)
the_thread->real_priority = priority;
ffc0bf5c: 93 5f 00 18 stw r26,24(r31)
the_thread->Start.initial_priority = priority;
ffc0bf60: 93 5f 00 b0 stw r26,176(r31)
ffc0bf64: 4e 80 04 21 bctrl
sched =_Scheduler_Thread_scheduler_allocate( &_Scheduler, the_thread );
if ( !sched )
ffc0bf68: 2e 03 00 00 cmpwi cr4,r3,0
ffc0bf6c: 7c 79 1b 78 mr r25,r3
ffc0bf70: 41 92 00 40 beq- cr4,ffc0bfb0 <_Thread_Initialize+0x174>
goto failed;
_Thread_Set_priority( the_thread, priority );
ffc0bf74: 7f e3 fb 78 mr r3,r31
ffc0bf78: 7f 44 d3 78 mr r4,r26
ffc0bf7c: 48 00 08 c9 bl ffc0c844 <_Thread_Set_priority>
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
ffc0bf80: a0 1f 00 0a lhz r0,10(r31)
_Thread_Stack_Free( the_thread );
return false;
}
ffc0bf84: 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 );
ffc0bf88: 7f e3 fb 78 mr r3,r31
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc0bf8c: 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 );
ffc0bf90: 93 bf 00 84 stw r29,132(r31)
ffc0bf94: 93 bf 00 88 stw r29,136(r31)
ffc0bf98: 7f e9 01 2e stwx r31,r9,r0
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc0bf9c: 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 );
ffc0bfa0: 48 00 10 19 bl ffc0cfb8 <_User_extensions_Thread_create>
if ( extension_status )
ffc0bfa4: 2f 83 00 00 cmpwi cr7,r3,0
return true;
ffc0bfa8: 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 )
ffc0bfac: 40 9e 00 6c bne- cr7,ffc0c018 <_Thread_Initialize+0x1dc>
ffc0bfb0: 2d 9b 00 00 cmpwi cr3,r27,0
ffc0bfb4: 2d 1e 00 00 cmpwi cr2,r30,0
return true;
failed:
if ( the_thread->libc_reent )
ffc0bfb8: 80 7f 01 28 lwz r3,296(r31)
ffc0bfbc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0bfc0: 41 9e 00 08 beq- cr7,ffc0bfc8 <_Thread_Initialize+0x18c>
_Workspace_Free( the_thread->libc_reent );
ffc0bfc4: 48 00 16 65 bl ffc0d628 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
ffc0bfc8: 80 7f 01 2c lwz r3,300(r31)
ffc0bfcc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0bfd0: 41 9e 00 08 beq- cr7,ffc0bfd8 <_Thread_Initialize+0x19c>
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0bfd4: 48 00 16 55 bl ffc0d628 <_Workspace_Free>
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
ffc0bfd8: 80 7f 01 30 lwz r3,304(r31)
ffc0bfdc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0bfe0: 41 9e 00 08 beq- cr7,ffc0bfe8 <_Thread_Initialize+0x1ac><== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0bfe4: 48 00 16 45 bl ffc0d628 <_Workspace_Free> <== NOT EXECUTED
if ( extensions_area )
ffc0bfe8: 41 8a 00 0c beq- cr2,ffc0bff4 <_Thread_Initialize+0x1b8>
(void) _Workspace_Free( extensions_area );
ffc0bfec: 7f c3 f3 78 mr r3,r30
ffc0bff0: 48 00 16 39 bl ffc0d628 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
ffc0bff4: 41 8e 00 0c beq- cr3,ffc0c000 <_Thread_Initialize+0x1c4>
(void) _Workspace_Free( fp_area );
ffc0bff8: 7f 63 db 78 mr r3,r27
ffc0bffc: 48 00 16 2d bl ffc0d628 <_Workspace_Free>
#endif
if ( sched )
ffc0c000: 41 92 00 0c beq- cr4,ffc0c00c <_Thread_Initialize+0x1d0>
(void) _Workspace_Free( sched );
ffc0c004: 7f 23 cb 78 mr r3,r25
ffc0c008: 48 00 16 21 bl ffc0d628 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
ffc0c00c: 7f e3 fb 78 mr r3,r31
ffc0c010: 48 00 0a 41 bl ffc0ca50 <_Thread_Stack_Free>
return false;
ffc0c014: 38 60 00 00 li r3,0
}
ffc0c018: 80 01 00 34 lwz r0,52(r1)
ffc0c01c: 81 81 00 08 lwz r12,8(r1)
ffc0c020: 7c 08 03 a6 mtlr r0
ffc0c024: 82 e1 00 0c lwz r23,12(r1)
ffc0c028: 83 01 00 10 lwz r24,16(r1)
ffc0c02c: 7d 83 81 20 mtcrf 56,r12
ffc0c030: 83 21 00 14 lwz r25,20(r1)
ffc0c034: 83 41 00 18 lwz r26,24(r1)
ffc0c038: 83 61 00 1c lwz r27,28(r1)
ffc0c03c: 83 81 00 20 lwz r28,32(r1)
ffc0c040: 83 a1 00 24 lwz r29,36(r1)
ffc0c044: 83 c1 00 28 lwz r30,40(r1)
ffc0c048: 83 e1 00 2c lwz r31,44(r1)
ffc0c04c: 38 21 00 30 addi r1,r1,48
ffc0c050: 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 );
ffc0c054: 38 60 01 08 li r3,264
ffc0c058: 48 00 15 9d bl ffc0d5f4 <_Workspace_Allocate>
if ( !fp_area )
ffc0c05c: 2d 83 00 00 cmpwi cr3,r3,0
ffc0c060: 7c 7b 1b 78 mr r27,r3
ffc0c064: 41 8e 00 54 beq- cr3,ffc0c0b8 <_Thread_Initialize+0x27c>
ffc0c068: 7c 69 1b 78 mr r9,r3
ffc0c06c: 4b ff fe 78 b ffc0bee4 <_Thread_Initialize+0xa8>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
ffc0c070: 39 6b 00 01 addi r11,r11,1
ffc0c074: 55 63 10 3a rlwinm r3,r11,2,0,29
ffc0c078: 48 00 15 7d bl ffc0d5f4 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
ffc0c07c: 2d 03 00 00 cmpwi cr2,r3,0
ffc0c080: 7c 7e 1b 78 mr r30,r3
ffc0c084: 41 8a 00 48 beq- cr2,ffc0c0cc <_Thread_Initialize+0x290>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
ffc0c088: 90 7f 01 34 stw r3,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++ )
ffc0c08c: 38 00 00 00 li r0,0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
ffc0c090: 39 20 00 00 li r9,0
ffc0c094: 81 5d 27 48 lwz r10,10056(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;
ffc0c098: 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++ )
ffc0c09c: 39 29 00 01 addi r9,r9,1
ffc0c0a0: 7f 8a 48 40 cmplw cr7,r10,r9
the_thread->extensions[i] = NULL;
ffc0c0a4: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0c0a8: 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++ )
ffc0c0ac: 7d 20 4b 78 mr r0,r9
ffc0c0b0: 40 9c ff ec bge+ cr7,ffc0c09c <_Thread_Initialize+0x260>
ffc0c0b4: 4b ff fe 64 b ffc0bf18 <_Thread_Initialize+0xdc>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
ffc0c0b8: 3b c0 00 00 li r30,0
ffc0c0bc: 4d 0c 00 00 mcrf cr2,cr3
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;
ffc0c0c0: 3b 20 00 00 li r25,0
ffc0c0c4: 4e 0c 00 00 mcrf cr4,cr3
ffc0c0c8: 4b ff fe f0 b ffc0bfb8 <_Thread_Initialize+0x17c>
ffc0c0cc: 2d 9b 00 00 cmpwi cr3,r27,0
ffc0c0d0: 4e 08 00 00 mcrf cr4,cr2
ffc0c0d4: 3b 20 00 00 li r25,0
ffc0c0d8: 4b ff fe e0 b ffc0bfb8 <_Thread_Initialize+0x17c>
ffc0d8f4 <_Thread_Restart>:
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
ffc0d8f4: 94 21 ff e8 stwu r1,-24(r1)
ffc0d8f8: 7c 08 02 a6 mflr r0
ffc0d8fc: 90 01 00 1c stw r0,28(r1)
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
ffc0d900: 80 03 00 10 lwz r0,16(r3)
ffc0d904: 93 e1 00 14 stw r31,20(r1)
ffc0d908: 7c 7f 1b 78 mr r31,r3
if ( !_States_Is_dormant( the_thread->current_state ) ) {
ffc0d90c: 70 09 00 01 andi. r9,r0,1
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
ffc0d910: 93 c1 00 10 stw r30,16(r1)
_Thread_Restart_self();
return true;
}
return false;
ffc0d914: 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 ) ) {
ffc0d918: 41 82 00 20 beq- ffc0d938 <_Thread_Restart+0x44>
return true;
}
return false;
}
ffc0d91c: 7c 03 03 78 mr r3,r0
ffc0d920: 80 01 00 1c lwz r0,28(r1)
ffc0d924: 83 c1 00 10 lwz r30,16(r1)
ffc0d928: 7c 08 03 a6 mtlr r0
ffc0d92c: 83 e1 00 14 lwz r31,20(r1)
ffc0d930: 38 21 00 18 addi r1,r1,24
ffc0d934: 4e 80 00 20 blr
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread );
ffc0d938: 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 );
ffc0d93c: 3f c0 00 00 lis r30,0
ffc0d940: 3b de 2d b8 addi r30,r30,11704
ffc0d944: 90 a1 00 0c stw r5,12(r1)
ffc0d948: 48 00 01 25 bl ffc0da6c <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
ffc0d94c: 7f e3 fb 78 mr r3,r31
ffc0d950: 80 81 00 08 lwz r4,8(r1)
ffc0d954: 80 a1 00 0c lwz r5,12(r1)
ffc0d958: 48 00 3e 51 bl ffc117a8 <_Thread_Reset>
_Thread_Load_environment( the_thread );
ffc0d95c: 7f e3 fb 78 mr r3,r31
ffc0d960: 48 00 3a 85 bl ffc113e4 <_Thread_Load_environment>
_Thread_Ready( the_thread );
ffc0d964: 7f e3 fb 78 mr r3,r31
ffc0d968: 48 00 3d e5 bl ffc1174c <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
ffc0d96c: 7f e3 fb 78 mr r3,r31
ffc0d970: 48 00 08 e9 bl ffc0e258 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
ffc0d974: 81 3e 00 0c lwz r9,12(r30)
_Thread_Restart_self();
return true;
ffc0d978: 38 00 00 01 li r0,1
_Thread_Ready( the_thread );
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
ffc0d97c: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0d980: 40 9e ff 9c bne+ cr7,ffc0d91c <_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 )
ffc0d984: 80 1f 01 24 lwz r0,292(r31)
ffc0d988: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d98c: 41 9e 00 0c beq- cr7,ffc0d998 <_Thread_Restart+0xa4> <== NEVER TAKEN
_Context_Restore_fp( &_Thread_Executing->fp_context );
ffc0d990: 38 7f 01 24 addi r3,r31,292
ffc0d994: 48 01 01 ed bl ffc1db80 <_CPU_Context_restore_fp>
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
ffc0d998: 80 7e 00 0c lwz r3,12(r30)
ffc0d99c: 38 63 00 c4 addi r3,r3,196
ffc0d9a0: 48 01 03 a1 bl ffc1dd40 <_CPU_Context_restore>
ffc109e4 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
ffc109e4: 94 21 ff f0 stwu r1,-16(r1)
ffc109e8: 7c 08 02 a6 mflr r0
ffc109ec: 7c 64 1b 78 mr r4,r3
ffc109f0: 90 01 00 14 stw r0,20(r1)
ffc109f4: 93 e1 00 0c stw r31,12(r1)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc109f8: 7f e0 00 a6 mfmsr r31
ffc109fc: 7c 10 42 a6 mfsprg r0,0
ffc10a00: 7f e0 00 78 andc r0,r31,r0
ffc10a04: 7c 00 01 24 mtmsr r0
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
current_state = the_thread->current_state;
ffc10a08: 80 03 00 10 lwz r0,16(r3)
if ( current_state & STATES_SUSPENDED ) {
ffc10a0c: 70 09 00 02 andi. r9,r0,2
ffc10a10: 41 82 00 14 beq- ffc10a24 <_Thread_Resume+0x40> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
ffc10a14: 54 00 07 fa rlwinm r0,r0,0,31,29
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
ffc10a18: 2f 80 00 00 cmpwi cr7,r0,0
_ISR_Disable( level );
current_state = the_thread->current_state;
if ( current_state & STATES_SUSPENDED ) {
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
ffc10a1c: 90 03 00 10 stw r0,16(r3)
if ( _States_Is_ready( current_state ) ) {
ffc10a20: 41 9e 00 1c beq- cr7,ffc10a3c <_Thread_Resume+0x58>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc10a24: 7f e0 01 24 mtmsr r31
_Scheduler_Unblock( &_Scheduler, the_thread );
}
}
_ISR_Enable( level );
}
ffc10a28: 80 01 00 14 lwz r0,20(r1)
ffc10a2c: 83 e1 00 0c lwz r31,12(r1)
ffc10a30: 38 21 00 10 addi r1,r1,16
ffc10a34: 7c 08 03 a6 mtlr r0
ffc10a38: 4e 80 00 20 blr
RTEMS_INLINE_ROUTINE void _Scheduler_Unblock(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
the_scheduler->Operations.unblock( the_scheduler, the_thread );
ffc10a3c: 3c 60 00 00 lis r3,0
ffc10a40: 38 63 2d 00 addi r3,r3,11520
ffc10a44: 80 03 00 10 lwz r0,16(r3)
ffc10a48: 7c 09 03 a6 mtctr r0
ffc10a4c: 4e 80 04 21 bctrl
ffc10a50: 7f e0 01 24 mtmsr r31
ffc10a54: 80 01 00 14 lwz r0,20(r1)
ffc10a58: 83 e1 00 0c lwz r31,12(r1)
ffc10a5c: 38 21 00 10 addi r1,r1,16
ffc10a60: 7c 08 03 a6 mtlr r0
ffc10a64: 4e 80 00 20 blr
ffc0c464 <_Thread_queue_Enqueue_priority>:
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
ffc0c464: 80 04 00 14 lwz r0,20(r4)
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 );
ffc0c468: 39 44 00 3c addi r10,r4,60
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
ffc0c46c: 94 21 ff f0 stwu r1,-16(r1)
ffc0c470: 7c 69 1b 78 mr r9,r3
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
ffc0c474: 70 0b 00 20 andi. r11,r0,32
head->next = tail;
ffc0c478: 91 44 00 38 stw r10,56(r4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
ffc0c47c: 39 64 00 38 addi r11,r4,56
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
ffc0c480: 39 40 00 00 li r10,0
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
ffc0c484: 93 c1 00 08 stw r30,8(r1)
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
ffc0c488: 54 03 d1 be rlwinm r3,r0,26,6,31
ffc0c48c: 93 e1 00 0c stw r31,12(r1)
ffc0c490: 91 44 00 3c stw r10,60(r4)
tail->previous = head;
ffc0c494: 91 64 00 40 stw r11,64(r4)
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
ffc0c498: 81 09 00 38 lwz r8,56(r9)
if ( _Thread_queue_Is_reverse_search( priority ) )
ffc0c49c: 40 82 00 84 bne- ffc0c520 <_Thread_queue_Enqueue_priority+0xbc>
ffc0c4a0: 1c 63 00 0c mulli r3,r3,12
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
ffc0c4a4: 7c 69 1a 14 add r3,r9,r3
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
ffc0c4a8: 39 83 00 04 addi r12,r3,4
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0c4ac: 7c c0 00 a6 mfmsr r6
ffc0c4b0: 7d 70 42 a6 mfsprg r11,0
ffc0c4b4: 7c cb 58 78 andc r11,r6,r11
ffc0c4b8: 7d 60 01 24 mtmsr r11
ffc0c4bc: 7c df 33 78 mr r31,r6
ffc0c4c0: 81 63 00 00 lwz r11,0(r3)
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
ffc0c4c4: 7f 8b 60 00 cmpw cr7,r11,r12
ffc0c4c8: 40 be 00 2c bne+ cr7,ffc0c4f4 <_Thread_queue_Enqueue_priority+0x90>
ffc0c4cc: 48 00 01 7c b ffc0c648 <_Thread_queue_Enqueue_priority+0x1e4>
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0c4d0: 7c e0 00 a6 mfmsr r7
ffc0c4d4: 7c c0 01 24 mtmsr r6
ffc0c4d8: 7c e0 01 24 mtmsr r7
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
ffc0c4dc: 80 eb 00 10 lwz r7,16(r11)
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
ffc0c4e0: 7d 1e 38 39 and. r30,r8,r7
ffc0c4e4: 41 82 00 f8 beq- ffc0c5dc <_Thread_queue_Enqueue_priority+0x178>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
ffc0c4e8: 81 6b 00 00 lwz r11,0(r11)
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
ffc0c4ec: 7f 8b 60 00 cmpw cr7,r11,r12
ffc0c4f0: 41 9e 00 10 beq- cr7,ffc0c500 <_Thread_queue_Enqueue_priority+0x9c>
search_priority = search_thread->current_priority;
ffc0c4f4: 81 4b 00 14 lwz r10,20(r11)
if ( priority <= search_priority )
ffc0c4f8: 7f 80 50 40 cmplw cr7,r0,r10
ffc0c4fc: 41 9d ff d4 bgt+ cr7,ffc0c4d0 <_Thread_queue_Enqueue_priority+0x6c>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
ffc0c500: 80 69 00 30 lwz r3,48(r9)
ffc0c504: 2f 83 00 01 cmpwi cr7,r3,1
ffc0c508: 41 9e 00 dc beq- cr7,ffc0c5e4 <_Thread_queue_Enqueue_priority+0x180>
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
ffc0c50c: 93 e5 00 00 stw r31,0(r5)
return the_thread_queue->sync_state;
}
ffc0c510: 83 c1 00 08 lwz r30,8(r1)
ffc0c514: 83 e1 00 0c lwz r31,12(r1)
ffc0c518: 38 21 00 10 addi r1,r1,16
ffc0c51c: 4e 80 00 20 blr
ffc0c520: 1c 63 00 0c mulli r3,r3,12
ffc0c524: 3d 80 00 00 lis r12,0
ffc0c528: 39 8c 26 6c addi r12,r12,9836
ffc0c52c: 7c 69 1a 14 add r3,r9,r3
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
ffc0c530: 89 4c 00 00 lbz r10,0(r12)
ffc0c534: 39 4a 00 01 addi r10,r10,1
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0c538: 7c c0 00 a6 mfmsr r6
ffc0c53c: 7d 70 42 a6 mfsprg r11,0
ffc0c540: 7c cb 58 78 andc r11,r6,r11
ffc0c544: 7d 60 01 24 mtmsr r11
ffc0c548: 7c df 33 78 mr r31,r6
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
ffc0c54c: 81 63 00 08 lwz r11,8(r3)
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
ffc0c550: 7f 8b 18 00 cmpw cr7,r11,r3
ffc0c554: 40 be 00 2c bne+ cr7,ffc0c580 <_Thread_queue_Enqueue_priority+0x11c>
ffc0c558: 48 00 00 34 b ffc0c58c <_Thread_queue_Enqueue_priority+0x128>
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0c55c: 7c e0 00 a6 mfmsr r7
ffc0c560: 7c c0 01 24 mtmsr r6
ffc0c564: 7c e0 01 24 mtmsr r7
ffc0c568: 80 eb 00 10 lwz r7,16(r11)
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
ffc0c56c: 7d 1e 38 39 and. r30,r8,r7
ffc0c570: 41 82 00 64 beq- ffc0c5d4 <_Thread_queue_Enqueue_priority+0x170><== NEVER TAKEN
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
ffc0c574: 81 6b 00 04 lwz r11,4(r11)
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
ffc0c578: 7f 8b 18 00 cmpw cr7,r11,r3
ffc0c57c: 41 9e 00 10 beq- cr7,ffc0c58c <_Thread_queue_Enqueue_priority+0x128>
search_priority = search_thread->current_priority;
ffc0c580: 81 4b 00 14 lwz r10,20(r11)
if ( priority >= search_priority )
ffc0c584: 7f 80 50 40 cmplw cr7,r0,r10
ffc0c588: 41 9c ff d4 blt+ cr7,ffc0c55c <_Thread_queue_Enqueue_priority+0xf8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
ffc0c58c: 80 69 00 30 lwz r3,48(r9)
ffc0c590: 2f 83 00 01 cmpwi cr7,r3,1
ffc0c594: 40 9e ff 78 bne+ cr7,ffc0c50c <_Thread_queue_Enqueue_priority+0xa8>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
ffc0c598: 7f 80 50 00 cmpw cr7,r0,r10
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
ffc0c59c: 38 00 00 00 li r0,0
ffc0c5a0: 90 09 00 30 stw r0,48(r9)
if ( priority == search_priority )
ffc0c5a4: 41 9e 00 7c beq- cr7,ffc0c620 <_Thread_queue_Enqueue_priority+0x1bc>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
ffc0c5a8: 81 4b 00 00 lwz r10,0(r11)
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
ffc0c5ac: 91 64 00 04 stw r11,4(r4)
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
ffc0c5b0: 91 44 00 00 stw r10,0(r4)
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
ffc0c5b4: 90 8a 00 04 stw r4,4(r10)
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
ffc0c5b8: 90 8b 00 00 stw r4,0(r11)
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
ffc0c5bc: 91 24 00 44 stw r9,68(r4)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0c5c0: 7c c0 01 24 mtmsr r6
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
ffc0c5c4: 83 c1 00 08 lwz r30,8(r1)
ffc0c5c8: 83 e1 00 0c lwz r31,12(r1)
ffc0c5cc: 38 21 00 10 addi r1,r1,16
ffc0c5d0: 4e 80 00 20 blr
ffc0c5d4: 7c c0 01 24 mtmsr r6 <== NOT EXECUTED
ffc0c5d8: 4b ff ff 58 b ffc0c530 <_Thread_queue_Enqueue_priority+0xcc><== NOT EXECUTED
ffc0c5dc: 7c c0 01 24 mtmsr r6
ffc0c5e0: 4b ff fe cc b ffc0c4ac <_Thread_queue_Enqueue_priority+0x48>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
ffc0c5e4: 7f 80 50 00 cmpw cr7,r0,r10
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
ffc0c5e8: 38 00 00 00 li r0,0
ffc0c5ec: 90 09 00 30 stw r0,48(r9)
if ( priority == search_priority )
ffc0c5f0: 41 9e 00 30 beq- cr7,ffc0c620 <_Thread_queue_Enqueue_priority+0x1bc>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
ffc0c5f4: 81 4b 00 04 lwz r10,4(r11)
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
ffc0c5f8: 91 64 00 00 stw r11,0(r4)
the_node->previous = previous_node;
ffc0c5fc: 91 44 00 04 stw r10,4(r4)
previous_node->next = the_node;
ffc0c600: 90 8a 00 00 stw r4,0(r10)
search_node->previous = the_node;
ffc0c604: 90 8b 00 04 stw r4,4(r11)
the_thread->Wait.queue = the_thread_queue;
ffc0c608: 91 24 00 44 stw r9,68(r4)
ffc0c60c: 7c c0 01 24 mtmsr r6
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
ffc0c610: 83 c1 00 08 lwz r30,8(r1)
ffc0c614: 83 e1 00 0c lwz r31,12(r1)
ffc0c618: 38 21 00 10 addi r1,r1,16
ffc0c61c: 4e 80 00 20 blr
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
ffc0c620: 81 4b 00 40 lwz r10,64(r11)
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
ffc0c624: 38 0b 00 3c addi r0,r11,60
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
ffc0c628: 90 04 00 00 stw r0,0(r4)
the_node->previous = previous_node;
ffc0c62c: 91 44 00 04 stw r10,4(r4)
previous_node->next = the_node;
ffc0c630: 90 8a 00 00 stw r4,0(r10)
search_node->previous = the_node;
ffc0c634: 90 8b 00 40 stw r4,64(r11)
the_thread->Wait.queue = the_thread_queue;
ffc0c638: 91 24 00 44 stw r9,68(r4)
ffc0c63c: 7f e0 01 24 mtmsr r31
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
ffc0c640: 38 60 00 01 li r3,1
ffc0c644: 4b ff fe cc b ffc0c510 <_Thread_queue_Enqueue_priority+0xac>
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
ffc0c648: 39 40 ff ff li r10,-1
ffc0c64c: 4b ff fe b4 b ffc0c500 <_Thread_queue_Enqueue_priority+0x9c>
ffc0c74c <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0c74c: 94 21 ff d8 stwu r1,-40(r1)
ffc0c750: 7c 08 02 a6 mflr r0
ffc0c754: 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 )
ffc0c758: 7c 7f 1b 79 mr. r31,r3
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0c75c: 93 c1 00 20 stw r30,32(r1)
ffc0c760: 7c 9e 23 78 mr r30,r4
ffc0c764: 90 01 00 2c stw r0,44(r1)
ffc0c768: 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 )
ffc0c76c: 41 82 00 10 beq- ffc0c77c <_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 ) {
ffc0c770: 80 1f 00 34 lwz r0,52(r31)
ffc0c774: 2f 80 00 01 cmpwi cr7,r0,1
ffc0c778: 41 9e 00 20 beq- cr7,ffc0c798 <_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 );
}
}
ffc0c77c: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED
ffc0c780: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED
ffc0c784: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0c788: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED
ffc0c78c: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED
ffc0c790: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED
ffc0c794: 4e 80 00 20 blr <== NOT EXECUTED
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0c798: 7f a0 00 a6 mfmsr r29
ffc0c79c: 7d 30 42 a6 mfsprg r9,0
ffc0c7a0: 7f a9 48 78 andc r9,r29,r9
ffc0c7a4: 7d 20 01 24 mtmsr r9
ffc0c7a8: 3d 60 00 03 lis r11,3
ffc0c7ac: 81 24 00 10 lwz r9,16(r4)
ffc0c7b0: 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 ) ) {
ffc0c7b4: 7d 6a 48 39 and. r10,r11,r9
ffc0c7b8: 40 82 00 24 bne- ffc0c7dc <_Thread_queue_Requeue+0x90> <== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0c7bc: 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 );
}
}
ffc0c7c0: 80 01 00 2c lwz r0,44(r1)
ffc0c7c4: 83 a1 00 1c lwz r29,28(r1)
ffc0c7c8: 7c 08 03 a6 mtlr r0
ffc0c7cc: 83 c1 00 20 lwz r30,32(r1)
ffc0c7d0: 83 e1 00 24 lwz r31,36(r1)
ffc0c7d4: 38 21 00 28 addi r1,r1,40
ffc0c7d8: 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;
ffc0c7dc: 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 );
ffc0c7e0: 38 a0 00 01 li r5,1
ffc0c7e4: 48 00 3a d9 bl ffc102bc <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
ffc0c7e8: 7f e3 fb 78 mr r3,r31
ffc0c7ec: 7f c4 f3 78 mr r4,r30
ffc0c7f0: 38 a1 00 08 addi r5,r1,8
ffc0c7f4: 4b ff fc 71 bl ffc0c464 <_Thread_queue_Enqueue_priority>
ffc0c7f8: 7f a0 01 24 mtmsr r29
ffc0c7fc: 4b ff ff c4 b ffc0c7c0 <_Thread_queue_Requeue+0x74>
ffc0c800 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0c800: 94 21 ff e8 stwu r1,-24(r1)
ffc0c804: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0c808: 38 81 00 08 addi r4,r1,8
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0c80c: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0c810: 4b ff f5 61 bl ffc0bd70 <_Thread_Get>
switch ( location ) {
ffc0c814: 80 01 00 08 lwz r0,8(r1)
ffc0c818: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c81c: 40 9e 00 18 bne- cr7,ffc0c834 <_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 );
ffc0c820: 48 00 3b b1 bl ffc103d0 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
ffc0c824: 3d 20 00 00 lis r9,0
ffc0c828: 81 69 27 28 lwz r11,10024(r9)
ffc0c82c: 38 0b ff ff addi r0,r11,-1
ffc0c830: 90 09 27 28 stw r0,10024(r9)
_Thread_Unnest_dispatch();
break;
}
}
ffc0c834: 80 01 00 1c lwz r0,28(r1)
ffc0c838: 38 21 00 18 addi r1,r1,24
ffc0c83c: 7c 08 03 a6 mtlr r0
ffc0c840: 4e 80 00 20 blr
ffc1babc <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1babc: 94 21 ff 98 stwu r1,-104(r1)
ffc1bac0: 7c 08 02 a6 mflr r0
ffc1bac4: 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;
ffc1bac8: 3a a1 00 08 addi r21,r1,8
ffc1bacc: 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;
ffc1bad0: 38 00 00 00 li r0,0
ffc1bad4: 93 21 00 4c stw r25,76(r1)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc1bad8: 3b 21 00 0c addi r25,r1,12
ffc1badc: 93 41 00 50 stw r26,80(r1)
ffc1bae0: 3b 41 00 18 addi r26,r1,24
ffc1bae4: 93 81 00 58 stw r28,88(r1)
ffc1bae8: 3b 81 00 14 addi r28,r1,20
ffc1baec: 92 81 00 38 stw r20,56(r1)
ffc1baf0: 3e 80 00 00 lis r20,0
ffc1baf4: 3a 94 28 40 addi r20,r20,10304
ffc1baf8: 92 e1 00 44 stw r23,68(r1)
ffc1bafc: 3e e0 00 00 lis r23,0
ffc1bb00: 3a f7 28 7c addi r23,r23,10364
ffc1bb04: 93 01 00 48 stw r24,72(r1)
ffc1bb08: 3f 00 00 00 lis r24,0
ffc1bb0c: 3b 18 28 58 addi r24,r24,10328
ffc1bb10: 93 c1 00 60 stw r30,96(r1)
ffc1bb14: 93 21 00 08 stw r25,8(r1)
head->previous = NULL;
ffc1bb18: 90 01 00 0c stw r0,12(r1)
tail->previous = head;
ffc1bb1c: 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;
ffc1bb20: 93 41 00 14 stw r26,20(r1)
head->previous = NULL;
ffc1bb24: 90 01 00 18 stw r0,24(r1)
tail->previous = head;
ffc1bb28: 93 81 00 1c stw r28,28(r1)
ffc1bb2c: 92 21 00 2c stw r17,44(r1)
ffc1bb30: 3a 23 00 08 addi r17,r3,8
ffc1bb34: 92 41 00 30 stw r18,48(r1)
ffc1bb38: 3a 43 00 40 addi r18,r3,64
ffc1bb3c: 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;
ffc1bb40: 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
)
{
ffc1bb44: 92 c1 00 40 stw r22,64(r1)
_ISR_Disable( level );
tmp = ts->insert_chain;
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
do_loop = false;
ffc1bb48: 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
)
{
ffc1bb4c: 93 61 00 54 stw r27,84(r1)
ffc1bb50: 3b 63 00 68 addi r27,r3,104
ffc1bb54: 93 a1 00 5c stw r29,92(r1)
ffc1bb58: 3b a3 00 30 addi r29,r3,48
ffc1bb5c: 93 e1 00 64 stw r31,100(r1)
ffc1bb60: 7c 7f 1b 78 mr r31,r3
Chain_Control *tmp;
/*
* 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;
ffc1bb64: 92 bf 00 78 stw r21,120(r31)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc1bb68: 80 17 00 00 lwz r0,0(r23)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1bb6c: 7f 85 e3 78 mr r5,r28
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
ffc1bb70: 80 9f 00 3c lwz r4,60(r31)
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1bb74: 7f a3 eb 78 mr r3,r29
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
ffc1bb78: 90 1f 00 3c stw r0,60(r31)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1bb7c: 7c 84 00 50 subf r4,r4,r0
ffc1bb80: 48 00 57 a1 bl ffc21320 <_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();
ffc1bb84: 83 d8 00 00 lwz r30,0(r24)
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
ffc1bb88: 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 ) {
ffc1bb8c: 7f 9e 28 40 cmplw cr7,r30,r5
ffc1bb90: 41 9d 00 fc bgt- cr7,ffc1bc8c <_Timer_server_Body+0x1d0>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
ffc1bb94: 41 9c 00 d4 blt- cr7,ffc1bc68 <_Timer_server_Body+0x1ac>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
ffc1bb98: 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 );
ffc1bb9c: 80 7f 00 78 lwz r3,120(r31)
ffc1bba0: 48 00 0d 61 bl ffc1c900 <_Chain_Get>
if ( timer == NULL ) {
ffc1bba4: 7c 64 1b 79 mr. r4,r3
ffc1bba8: 41 82 00 34 beq- ffc1bbdc <_Timer_server_Body+0x120>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc1bbac: 80 04 00 38 lwz r0,56(r4)
ffc1bbb0: 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 ) {
ffc1bbb4: 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 ) {
ffc1bbb8: 41 9e 00 c4 beq- cr7,ffc1bc7c <_Timer_server_Body+0x1c0>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc1bbbc: 40 9a ff e0 bne+ cr6,ffc1bb9c <_Timer_server_Body+0xe0> <== NEVER TAKEN
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc1bbc0: 38 84 00 10 addi r4,r4,16
ffc1bbc4: 7f 63 db 78 mr r3,r27
ffc1bbc8: 48 00 58 11 bl ffc213d8 <_Watchdog_Insert>
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
ffc1bbcc: 80 7f 00 78 lwz r3,120(r31)
ffc1bbd0: 48 00 0d 31 bl ffc1c900 <_Chain_Get>
if ( timer == NULL ) {
ffc1bbd4: 7c 64 1b 79 mr. r4,r3
ffc1bbd8: 40 82 ff d4 bne+ ffc1bbac <_Timer_server_Body+0xf0> <== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc1bbdc: 7d 20 00 a6 mfmsr r9
ffc1bbe0: 7c 10 42 a6 mfsprg r0,0
ffc1bbe4: 7d 20 00 78 andc r0,r9,r0
ffc1bbe8: 7c 00 01 24 mtmsr r0
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
tmp = ts->insert_chain;
ffc1bbec: 80 1f 00 78 lwz r0,120(r31)
if ( _Chain_Is_empty( insert_chain ) ) {
ffc1bbf0: 80 01 00 08 lwz r0,8(r1)
ffc1bbf4: 7f 80 c8 00 cmpw cr7,r0,r25
ffc1bbf8: 38 00 00 01 li r0,1
ffc1bbfc: 41 9e 00 a4 beq- cr7,ffc1bca0 <_Timer_server_Body+0x1e4><== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc1bc00: 7d 20 01 24 mtmsr r9
* 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;
while ( do_loop ) {
ffc1bc04: 2f 80 00 00 cmpwi cr7,r0,0
ffc1bc08: 40 9e ff 60 bne+ cr7,ffc1bb68 <_Timer_server_Body+0xac> <== NEVER TAKEN
_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 ) ) {
ffc1bc0c: 81 21 00 14 lwz r9,20(r1)
ffc1bc10: 7f 89 d0 00 cmpw cr7,r9,r26
ffc1bc14: 40 be 00 30 bne+ cr7,ffc1bc44 <_Timer_server_Body+0x188>
ffc1bc18: 48 00 00 94 b ffc1bcac <_Timer_server_Body+0x1f0>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
ffc1bc1c: 81 69 00 00 lwz r11,0(r9)
head->next = new_first;
new_first->previous = head;
ffc1bc20: 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;
ffc1bc24: 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;
ffc1bc28: 92 c9 00 08 stw r22,8(r9)
ffc1bc2c: 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 );
ffc1bc30: 80 09 00 1c lwz r0,28(r9)
ffc1bc34: 80 69 00 20 lwz r3,32(r9)
ffc1bc38: 80 89 00 24 lwz r4,36(r9)
ffc1bc3c: 7c 09 03 a6 mtctr r0
ffc1bc40: 4e 80 04 21 bctrl
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc1bc44: 7c 00 00 a6 mfmsr r0
ffc1bc48: 7d 30 42 a6 mfsprg r9,0
ffc1bc4c: 7c 09 48 78 andc r9,r0,r9
ffc1bc50: 7d 20 01 24 mtmsr r9
initialized = false;
}
#endif
return status;
}
ffc1bc54: 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))
ffc1bc58: 7f 89 d0 00 cmpw cr7,r9,r26
ffc1bc5c: 40 9e ff c0 bne+ cr7,ffc1bc1c <_Timer_server_Body+0x160>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc1bc60: 7c 00 01 24 mtmsr r0
ffc1bc64: 4b ff ff 00 b ffc1bb64 <_Timer_server_Body+0xa8>
/*
* 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 );
ffc1bc68: 7f 63 db 78 mr r3,r27
ffc1bc6c: 38 80 00 01 li r4,1
ffc1bc70: 7c be 28 50 subf r5,r30,r5
ffc1bc74: 48 00 55 8d bl ffc21200 <_Watchdog_Adjust>
ffc1bc78: 4b ff ff 20 b ffc1bb98 <_Timer_server_Body+0xdc>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
ffc1bc7c: 7f a3 eb 78 mr r3,r29
ffc1bc80: 38 84 00 10 addi r4,r4,16
ffc1bc84: 48 00 57 55 bl ffc213d8 <_Watchdog_Insert>
ffc1bc88: 4b ff ff 14 b ffc1bb9c <_Timer_server_Body+0xe0>
/*
* 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 );
ffc1bc8c: 7c 85 f0 50 subf r4,r5,r30
ffc1bc90: 7f 63 db 78 mr r3,r27
ffc1bc94: 7f 85 e3 78 mr r5,r28
ffc1bc98: 48 00 56 89 bl ffc21320 <_Watchdog_Adjust_to_chain>
ffc1bc9c: 4b ff fe fc b ffc1bb98 <_Timer_server_Body+0xdc>
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
tmp = ts->insert_chain;
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
ffc1bca0: 90 9f 00 78 stw r4,120(r31)
do_loop = false;
ffc1bca4: 38 00 00 00 li r0,0
ffc1bca8: 4b ff ff 58 b ffc1bc00 <_Timer_server_Body+0x144>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
ffc1bcac: 98 1f 00 7c stb r0,124(r31)
ffc1bcb0: 80 14 00 00 lwz r0,0(r20)
ffc1bcb4: 30 00 00 01 addic r0,r0,1
ffc1bcb8: 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 );
ffc1bcbc: 80 7f 00 00 lwz r3,0(r31)
ffc1bcc0: 38 80 00 08 li r4,8
ffc1bcc4: 48 00 4a c5 bl ffc20788 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc1bcc8: 7f e3 fb 78 mr r3,r31
ffc1bccc: 4b ff fc c9 bl ffc1b994 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
ffc1bcd0: 7f e3 fb 78 mr r3,r31
ffc1bcd4: 4b ff fd 55 bl ffc1ba28 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
ffc1bcd8: 48 00 3e 49 bl ffc1fb20 <_Thread_Enable_dispatch>
ts->active = true;
ffc1bcdc: 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 );
ffc1bce0: 7e 23 8b 78 mr r3,r17
ffc1bce4: 48 00 58 bd bl ffc215a0 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc1bce8: 7e 43 93 78 mr r3,r18
ffc1bcec: 48 00 58 b5 bl ffc215a0 <_Watchdog_Remove>
ffc1bcf0: 4b ff fe 74 b ffc1bb64 <_Timer_server_Body+0xa8>
ffc1bcf4 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
ffc1bcf4: 94 21 ff f0 stwu r1,-16(r1)
ffc1bcf8: 7c 08 02 a6 mflr r0
ffc1bcfc: 7c 89 23 78 mr r9,r4
ffc1bd00: 90 01 00 14 stw r0,20(r1)
if ( ts->insert_chain == NULL ) {
ffc1bd04: 80 03 00 78 lwz r0,120(r3)
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
ffc1bd08: 93 e1 00 0c stw r31,12(r1)
ffc1bd0c: 7c 7f 1b 78 mr r31,r3
if ( ts->insert_chain == NULL ) {
ffc1bd10: 2f 80 00 00 cmpwi cr7,r0,0
ffc1bd14: 41 9e 00 20 beq- cr7,ffc1bd34 <_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 );
ffc1bd18: 80 63 00 78 lwz r3,120(r3)
ffc1bd1c: 48 00 0b 8d bl ffc1c8a8 <_Chain_Append>
}
}
ffc1bd20: 80 01 00 14 lwz r0,20(r1)
ffc1bd24: 83 e1 00 0c lwz r31,12(r1)
ffc1bd28: 38 21 00 10 addi r1,r1,16
ffc1bd2c: 7c 08 03 a6 mtlr r0
ffc1bd30: 4e 80 00 20 blr
ffc1bd34: 3d 60 00 00 lis r11,0
ffc1bd38: 81 4b 28 40 lwz r10,10304(r11)
ffc1bd3c: 38 0a 00 01 addi r0,r10,1
ffc1bd40: 90 0b 28 40 stw r0,10304(r11)
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc1bd44: 80 04 00 38 lwz r0,56(r4)
ffc1bd48: 2f 80 00 01 cmpwi cr7,r0,1
ffc1bd4c: 41 9e 00 ac beq- cr7,ffc1bdf8 <_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 ) {
ffc1bd50: 2f 80 00 03 cmpwi cr7,r0,3
ffc1bd54: 41 9e 00 1c beq- cr7,ffc1bd70 <_Timer_server_Schedule_operation_method+0x7c>
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
ffc1bd58: 48 00 3d c9 bl ffc1fb20 <_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 );
}
}
ffc1bd5c: 80 01 00 14 lwz r0,20(r1)
ffc1bd60: 83 e1 00 0c lwz r31,12(r1)
ffc1bd64: 38 21 00 10 addi r1,r1,16
ffc1bd68: 7c 08 03 a6 mtlr r0
ffc1bd6c: 4e 80 00 20 blr
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc1bd70: 7c c0 00 a6 mfmsr r6
ffc1bd74: 7c 10 42 a6 mfsprg r0,0
ffc1bd78: 7c c0 00 78 andc r0,r6,r0
ffc1bd7c: 7c 00 01 24 mtmsr r0
initialized = false;
}
#endif
return status;
}
ffc1bd80: 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 );
ffc1bd84: 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();
ffc1bd88: 3d 40 00 00 lis r10,0
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
ffc1bd8c: 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();
ffc1bd90: 80 0a 28 58 lwz r0,10328(r10)
last_snapshot = ts->TOD_watchdogs.last_snapshot;
ffc1bd94: 81 43 00 74 lwz r10,116(r3)
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
ffc1bd98: 41 9e 00 30 beq- cr7,ffc1bdc8 <_Timer_server_Schedule_operation_method+0xd4>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
ffc1bd9c: 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;
ffc1bda0: 80 eb 00 10 lwz r7,16(r11)
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
ffc1bda4: 7d 07 52 14 add r8,r7,r10
delta_interval += delta;
ffc1bda8: 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 ) {
ffc1bdac: 40 9d 00 18 ble- cr7,ffc1bdc4 <_Timer_server_Schedule_operation_method+0xd0>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
ffc1bdb0: 7d 4a 00 50 subf r10,r10,r0
if (delta_interval > delta) {
ffc1bdb4: 7f 87 50 40 cmplw cr7,r7,r10
delta_interval -= delta;
} else {
delta_interval = 0;
ffc1bdb8: 39 00 00 00 li r8,0
if ( snapshot > last_snapshot ) {
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
ffc1bdbc: 40 9d 00 08 ble- cr7,ffc1bdc4 <_Timer_server_Schedule_operation_method+0xd0><== NEVER TAKEN
delta_interval -= delta;
ffc1bdc0: 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;
ffc1bdc4: 91 0b 00 10 stw r8,16(r11)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
ffc1bdc8: 90 1f 00 74 stw r0,116(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc1bdcc: 7c c0 01 24 mtmsr r6
_ISR_Enable( level );
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc1bdd0: 38 7f 00 68 addi r3,r31,104
ffc1bdd4: 38 89 00 10 addi r4,r9,16
ffc1bdd8: 48 00 56 01 bl ffc213d8 <_Watchdog_Insert>
if ( !ts->active ) {
ffc1bddc: 88 1f 00 7c lbz r0,124(r31)
ffc1bde0: 2f 80 00 00 cmpwi cr7,r0,0
ffc1bde4: 40 9e ff 74 bne+ cr7,ffc1bd58 <_Timer_server_Schedule_operation_method+0x64>
_Timer_server_Reset_tod_system_watchdog( ts );
ffc1bde8: 7f e3 fb 78 mr r3,r31
ffc1bdec: 4b ff fc 3d bl ffc1ba28 <_Timer_server_Reset_tod_system_watchdog>
}
}
_Thread_Enable_dispatch();
ffc1bdf0: 48 00 3d 31 bl ffc1fb20 <_Thread_Enable_dispatch>
ffc1bdf4: 4b ff ff 68 b ffc1bd5c <_Timer_server_Schedule_operation_method+0x68>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc1bdf8: 7c c0 00 a6 mfmsr r6
ffc1bdfc: 7c 10 42 a6 mfsprg r0,0
ffc1be00: 7c c0 00 78 andc r0,r6,r0
ffc1be04: 7c 00 01 24 mtmsr r0
initialized = false;
}
#endif
return status;
}
ffc1be08: 81 63 00 30 lwz r11,48(r3)
ffc1be0c: 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;
ffc1be10: 3d 40 00 00 lis r10,0
last_snapshot = ts->Interval_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
ffc1be14: 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;
ffc1be18: 80 0a 28 7c lwz r0,10364(r10)
last_snapshot = ts->Interval_watchdogs.last_snapshot;
ffc1be1c: 81 03 00 3c lwz r8,60(r3)
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
ffc1be20: 41 9e 00 20 beq- cr7,ffc1be40 <_Timer_server_Schedule_operation_method+0x14c>
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
ffc1be24: 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;
ffc1be28: 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;
ffc1be2c: 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) {
ffc1be30: 7f 88 38 40 cmplw cr7,r8,r7
ffc1be34: 40 9c 00 08 bge- cr7,ffc1be3c <_Timer_server_Schedule_operation_method+0x148>
delta_interval -= delta;
ffc1be38: 7d 48 38 50 subf r10,r8,r7
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
ffc1be3c: 91 4b 00 10 stw r10,16(r11)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
ffc1be40: 90 1f 00 3c stw r0,60(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc1be44: 7c c0 01 24 mtmsr r6
_ISR_Enable( level );
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
ffc1be48: 38 7f 00 30 addi r3,r31,48
ffc1be4c: 38 89 00 10 addi r4,r9,16
ffc1be50: 48 00 55 89 bl ffc213d8 <_Watchdog_Insert>
if ( !ts->active ) {
ffc1be54: 88 1f 00 7c lbz r0,124(r31)
ffc1be58: 2f 80 00 00 cmpwi cr7,r0,0
ffc1be5c: 40 9e fe fc bne+ cr7,ffc1bd58 <_Timer_server_Schedule_operation_method+0x64>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc1be60: 7f e3 fb 78 mr r3,r31
ffc1be64: 4b ff fb 31 bl ffc1b994 <_Timer_server_Reset_interval_system_watchdog>
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
ffc1be68: 48 00 3c b9 bl ffc1fb20 <_Thread_Enable_dispatch>
ffc1be6c: 4b ff fe f0 b ffc1bd5c <_Timer_server_Schedule_operation_method+0x68>
ffc0cc84 <_Timespec_Add_to>:
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
ffc0cc84: 80 03 00 04 lwz r0,4(r3)
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
ffc0cc88: 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;
ffc0cc8c: 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;
ffc0cc90: 80 64 00 00 lwz r3,0(r4)
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
ffc0cc94: 7d 08 02 14 add r8,r8,r0
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
ffc0cc98: 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 ) {
ffc0cc9c: 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;
ffc0cca0: 91 09 00 04 stw r8,4(r9)
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ffc0cca4: 60 00 c9 ff ori r0,r0,51711
ffc0cca8: 7f 88 00 40 cmplw cr7,r8,r0
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
ffc0ccac: 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 ) {
ffc0ccb0: 7d 0b 43 78 mr r11,r8
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
ffc0ccb4: 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 ) {
ffc0ccb8: 4c 9d 00 20 blelr cr7
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ffc0ccbc: 3d 6b c4 65 addis r11,r11,-15259
ffc0ccc0: 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 ) {
ffc0ccc4: 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(
ffc0ccc8: 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++;
ffc0cccc: 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 ) {
ffc0ccd0: 41 9d ff ec bgt+ cr7,ffc0ccbc <_Timespec_Add_to+0x38> <== NEVER TAKEN
ffc0ccd4: 91 69 00 04 stw r11,4(r9)
ffc0ccd8: 91 49 00 00 stw r10,0(r9)
time->tv_sec++;
seconds++;
}
return seconds;
}
ffc0ccdc: 4e 80 00 20 blr
ffc0f0fc <_Timespec_Less_than>:
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
ffc0f0fc: 81 63 00 00 lwz r11,0(r3)
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
ffc0f100: 7c 69 1b 78 mr r9,r3
if ( lhs->tv_sec < rhs->tv_sec )
ffc0f104: 80 04 00 00 lwz r0,0(r4)
return true;
ffc0f108: 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 )
ffc0f10c: 7f 8b 00 00 cmpw cr7,r11,r0
ffc0f110: 4d 9c 00 20 bltlr cr7
return true;
if ( lhs->tv_sec > rhs->tv_sec )
ffc0f114: 41 9d 00 1c bgt- cr7,ffc0f130 <_Timespec_Less_than+0x34><== NEVER TAKEN
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Less_than(
ffc0f118: 81 29 00 04 lwz r9,4(r9)
ffc0f11c: 80 04 00 04 lwz r0,4(r4)
ffc0f120: 7f 89 00 00 cmpw cr7,r9,r0
ffc0f124: 7c 60 00 26 mfcr r3
ffc0f128: 54 63 ef fe rlwinm r3,r3,29,31,31
ffc0f12c: 4e 80 00 20 blr
{
if ( lhs->tv_sec < rhs->tv_sec )
return true;
if ( lhs->tv_sec > rhs->tv_sec )
return false;
ffc0f130: 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;
}
ffc0f134: 4e 80 00 20 blr <== NOT EXECUTED
ffc0cf28 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0cf28: 94 21 ff e0 stwu r1,-32(r1)
ffc0cf2c: 7c 08 02 a6 mflr r0
ffc0cf30: 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 );
}
}
ffc0cf34: 3f c0 00 00 lis r30,0
ffc0cf38: 3b de 2c f4 addi r30,r30,11508
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0cf3c: 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 );
}
}
ffc0cf40: 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
)
{
ffc0cf44: 93 61 00 0c stw r27,12(r1)
ffc0cf48: 7c 7b 1b 78 mr r27,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0cf4c: 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
)
{
ffc0cf50: 93 81 00 10 stw r28,16(r1)
ffc0cf54: 7c 9c 23 78 mr r28,r4
ffc0cf58: 93 a1 00 14 stw r29,20(r1)
ffc0cf5c: 7c bd 2b 78 mr r29,r5
ffc0cf60: 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 );
ffc0cf64: 41 9e 00 30 beq- cr7,ffc0cf94 <_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 )
ffc0cf68: 80 1f 00 30 lwz r0,48(r31)
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
ffc0cf6c: 7f 63 db 78 mr r3,r27
ffc0cf70: 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 )
ffc0cf74: 2f 80 00 00 cmpwi cr7,r0,0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
ffc0cf78: 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 )
ffc0cf7c: 41 9e 00 0c beq- cr7,ffc0cf88 <_User_extensions_Fatal+0x60>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
ffc0cf80: 7c 09 03 a6 mtctr r0
ffc0cf84: 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 ) {
ffc0cf88: 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 );
ffc0cf8c: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0cf90: 40 9e ff d8 bne+ cr7,ffc0cf68 <_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 );
}
}
ffc0cf94: 80 01 00 24 lwz r0,36(r1)
ffc0cf98: 83 61 00 0c lwz r27,12(r1)
ffc0cf9c: 7c 08 03 a6 mtlr r0
ffc0cfa0: 83 81 00 10 lwz r28,16(r1)
ffc0cfa4: 83 a1 00 14 lwz r29,20(r1)
ffc0cfa8: 83 c1 00 18 lwz r30,24(r1)
ffc0cfac: 83 e1 00 1c lwz r31,28(r1)
ffc0cfb0: 38 21 00 20 addi r1,r1,32
ffc0cfb4: 4e 80 00 20 blr
ffc0cd34 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0cd34: 94 21 ff e8 stwu r1,-24(r1)
ffc0cd38: 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;
ffc0cd3c: 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)
{
ffc0cd40: 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;
ffc0cd44: 38 e7 20 a0 addi r7,r7,8352
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0cd48: 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)
{
ffc0cd4c: 93 a1 00 0c stw r29,12(r1)
ffc0cd50: 3d 40 00 00 lis r10,0
ffc0cd54: 39 68 2c f4 addi r11,r8,11508
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;
ffc0cd58: 83 a7 00 40 lwz r29,64(r7)
ffc0cd5c: 39 2a 2b b0 addi r9,r10,11184
head->previous = NULL;
ffc0cd60: 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)
{
ffc0cd64: 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 ) {
ffc0cd68: 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;
ffc0cd6c: 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)
{
ffc0cd70: 93 81 00 08 stw r28,8(r1)
ffc0cd74: 38 c9 00 04 addi r6,r9,4
ffc0cd78: 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;
ffc0cd7c: 83 c7 00 3c lwz r30,60(r7)
ffc0cd80: 90 a8 2c f4 stw r5,11508(r8)
head->previous = NULL;
ffc0cd84: 90 0b 00 04 stw r0,4(r11)
tail->previous = head;
ffc0cd88: 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;
ffc0cd8c: 90 ca 2b b0 stw r6,11184(r10)
head->previous = NULL;
ffc0cd90: 90 09 00 04 stw r0,4(r9)
tail->previous = head;
ffc0cd94: 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 ) {
ffc0cd98: 41 9e 00 8c beq- cr7,ffc0ce24 <_User_extensions_Handler_initialization+0xf0><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
ffc0cd9c: 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(
ffc0cda0: 7f 83 e3 78 mr r3,r28
ffc0cda4: 48 00 08 b1 bl ffc0d654 <_Workspace_Allocate_or_fatal_error>
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
ffc0cda8: 38 80 00 00 li r4,0
ffc0cdac: 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(
ffc0cdb0: 7c 7f 1b 78 mr r31,r3
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
ffc0cdb4: 48 00 62 e9 bl ffc1309c <memset>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
ffc0cdb8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0cdbc: 41 9e 00 68 beq- cr7,ffc0ce24 <_User_extensions_Handler_initialization+0xf0><== NEVER TAKEN
ffc0cdc0: 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;
ffc0cdc4: 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)
ffc0cdc8: 57 80 28 34 rlwinm r0,r28,5,0,26
ffc0cdcc: 7d 09 00 6e lwzux r8,r9,r0
_User_extensions_Add_set( extension );
ffc0cdd0: 7f e3 fb 78 mr r3,r31
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
ffc0cdd4: 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;
ffc0cdd8: 81 49 00 04 lwz r10,4(r9)
ffc0cddc: 81 69 00 08 lwz r11,8(r9)
ffc0cde0: 80 09 00 0c lwz r0,12(r9)
ffc0cde4: 91 1f 00 14 stw r8,20(r31)
ffc0cde8: 91 5f 00 18 stw r10,24(r31)
ffc0cdec: 91 7f 00 1c stw r11,28(r31)
ffc0cdf0: 90 1f 00 20 stw r0,32(r31)
ffc0cdf4: 81 09 00 10 lwz r8,16(r9)
ffc0cdf8: 81 49 00 14 lwz r10,20(r9)
ffc0cdfc: 81 69 00 18 lwz r11,24(r9)
ffc0ce00: 80 09 00 1c lwz r0,28(r9)
ffc0ce04: 91 1f 00 24 stw r8,36(r31)
ffc0ce08: 91 5f 00 28 stw r10,40(r31)
ffc0ce0c: 91 7f 00 2c stw r11,44(r31)
ffc0ce10: 90 1f 00 30 stw r0,48(r31)
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
ffc0ce14: 3b ff 00 34 addi r31,r31,52
_User_extensions_Add_set( extension );
ffc0ce18: 48 00 36 7d bl ffc10494 <_User_extensions_Add_set>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
ffc0ce1c: 7f 9e e0 40 cmplw cr7,r30,r28
ffc0ce20: 41 9d ff a4 bgt+ cr7,ffc0cdc4 <_User_extensions_Handler_initialization+0x90>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
ffc0ce24: 80 01 00 1c lwz r0,28(r1)
ffc0ce28: 83 81 00 08 lwz r28,8(r1)
ffc0ce2c: 7c 08 03 a6 mtlr r0
ffc0ce30: 83 a1 00 0c lwz r29,12(r1)
ffc0ce34: 83 c1 00 10 lwz r30,16(r1)
ffc0ce38: 83 e1 00 14 lwz r31,20(r1)
ffc0ce3c: 38 21 00 18 addi r1,r1,24
ffc0ce40: 4e 80 00 20 blr
ffc0ce44 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
ffc0ce44: 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 );
}
}
ffc0ce48: 3d 20 00 00 lis r9,0
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
ffc0ce4c: 7c 08 02 a6 mflr r0
ffc0ce50: 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 );
}
}
ffc0ce54: 3b c9 2c f4 addi r30,r9,11508
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0ce58: 3b de 00 04 addi r30,r30,4
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
ffc0ce5c: 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 );
}
}
ffc0ce60: 83 e9 2c f4 lwz r31,11508(r9)
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
ffc0ce64: 93 a1 00 0c stw r29,12(r1)
ffc0ce68: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0ce6c: 7f 9f f0 00 cmpw cr7,r31,r30
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
ffc0ce70: 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 );
ffc0ce74: 41 9e 00 28 beq- cr7,ffc0ce9c <_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 )
ffc0ce78: 80 1f 00 28 lwz r0,40(r31)
(*the_extension->Callouts.thread_begin)( executing );
ffc0ce7c: 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 )
ffc0ce80: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ce84: 41 9e 00 0c beq- cr7,ffc0ce90 <_User_extensions_Thread_begin+0x4c>
(*the_extension->Callouts.thread_begin)( executing );
ffc0ce88: 7c 09 03 a6 mtctr r0
ffc0ce8c: 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 ) {
ffc0ce90: 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 );
ffc0ce94: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0ce98: 40 9e ff e0 bne+ cr7,ffc0ce78 <_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 );
}
}
ffc0ce9c: 80 01 00 1c lwz r0,28(r1)
ffc0cea0: 83 a1 00 0c lwz r29,12(r1)
ffc0cea4: 7c 08 03 a6 mtlr r0
ffc0cea8: 83 c1 00 10 lwz r30,16(r1)
ffc0ceac: 83 e1 00 14 lwz r31,20(r1)
ffc0ceb0: 38 21 00 18 addi r1,r1,24
ffc0ceb4: 4e 80 00 20 blr
ffc0cfb8 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
ffc0cfb8: 94 21 ff e8 stwu r1,-24(r1)
return false;
}
}
return true;
}
ffc0cfbc: 3d 20 00 00 lis r9,0
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
ffc0cfc0: 7c 08 02 a6 mflr r0
ffc0cfc4: 93 c1 00 10 stw r30,16(r1)
return false;
}
}
return true;
}
ffc0cfc8: 3b c9 2c f4 addi r30,r9,11508
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0cfcc: 3b de 00 04 addi r30,r30,4
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
ffc0cfd0: 93 e1 00 14 stw r31,20(r1)
return false;
}
}
return true;
}
ffc0cfd4: 83 e9 2c f4 lwz r31,11508(r9)
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
ffc0cfd8: 93 a1 00 0c stw r29,12(r1)
ffc0cfdc: 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 );
ffc0cfe0: 7f 9f f0 00 cmpw cr7,r31,r30
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
ffc0cfe4: 90 01 00 1c stw r0,28(r1)
if ( !status )
return false;
}
}
return true;
ffc0cfe8: 38 60 00 01 li r3,1
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
ffc0cfec: 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 );
ffc0cff0: 41 9e 00 40 beq- cr7,ffc0d030 <_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)(
ffc0cff4: 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 ) {
ffc0cff8: 80 1f 00 14 lwz r0,20(r31)
status = (*the_extension->Callouts.thread_create)(
ffc0cffc: 39 3c 2d 38 addi r9,r28,11576
ffc0d000: 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 ) {
ffc0d004: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d008: 41 9e 00 18 beq- cr7,ffc0d020 <_User_extensions_Thread_create+0x68>
status = (*the_extension->Callouts.thread_create)(
ffc0d00c: 80 69 00 0c lwz r3,12(r9)
ffc0d010: 7c 09 03 a6 mtctr r0
ffc0d014: 4e 80 04 21 bctrl
_Thread_Executing,
the_thread
);
if ( !status )
ffc0d018: 2f 83 00 00 cmpwi cr7,r3,0
ffc0d01c: 41 9e 00 34 beq- cr7,ffc0d050 <_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 ) {
ffc0d020: 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 );
ffc0d024: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0d028: 40 9e ff d0 bne+ cr7,ffc0cff8 <_User_extensions_Thread_create+0x40>
if ( !status )
return false;
}
}
return true;
ffc0d02c: 38 60 00 01 li r3,1
}
ffc0d030: 80 01 00 1c lwz r0,28(r1)
ffc0d034: 83 81 00 08 lwz r28,8(r1)
ffc0d038: 7c 08 03 a6 mtlr r0
ffc0d03c: 83 a1 00 0c lwz r29,12(r1)
ffc0d040: 83 c1 00 10 lwz r30,16(r1)
ffc0d044: 83 e1 00 14 lwz r31,20(r1)
ffc0d048: 38 21 00 18 addi r1,r1,24
ffc0d04c: 4e 80 00 20 blr
ffc0d050: 80 01 00 1c lwz r0,28(r1)
status = (*the_extension->Callouts.thread_create)(
_Thread_Executing,
the_thread
);
if ( !status )
return false;
ffc0d054: 38 60 00 00 li r3,0
}
}
return true;
}
ffc0d058: 83 81 00 08 lwz r28,8(r1)
ffc0d05c: 7c 08 03 a6 mtlr r0
ffc0d060: 83 a1 00 0c lwz r29,12(r1)
ffc0d064: 83 c1 00 10 lwz r30,16(r1)
ffc0d068: 83 e1 00 14 lwz r31,20(r1)
ffc0d06c: 38 21 00 18 addi r1,r1,24
ffc0d070: 4e 80 00 20 blr
ffc0d074 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
ffc0d074: 94 21 ff e8 stwu r1,-24(r1)
ffc0d078: 7c 08 02 a6 mflr r0
ffc0d07c: 93 c1 00 10 stw r30,16(r1)
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
ffc0d080: 3f c0 00 00 lis r30,0
ffc0d084: 3b de 2c f4 addi r30,r30,11508
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
ffc0d088: 93 e1 00 14 stw r31,20(r1)
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
ffc0d08c: 83 fe 00 08 lwz r31,8(r30)
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
ffc0d090: 93 a1 00 0c stw r29,12(r1)
ffc0d094: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0d098: 7f 9f f0 00 cmpw cr7,r31,r30
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
ffc0d09c: 90 01 00 1c stw r0,28(r1)
ffc0d0a0: 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 );
ffc0d0a4: 41 9e 00 34 beq- cr7,ffc0d0d8 <_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)(
ffc0d0a8: 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 )
ffc0d0ac: 80 1f 00 20 lwz r0,32(r31)
(*the_extension->Callouts.thread_delete)(
ffc0d0b0: 39 3c 2d 38 addi r9,r28,11576
ffc0d0b4: 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 )
ffc0d0b8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d0bc: 41 9e 00 10 beq- cr7,ffc0d0cc <_User_extensions_Thread_delete+0x58>
(*the_extension->Callouts.thread_delete)(
ffc0d0c0: 80 69 00 0c lwz r3,12(r9)
ffc0d0c4: 7c 09 03 a6 mtctr r0
ffc0d0c8: 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 ) {
ffc0d0cc: 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 );
ffc0d0d0: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0d0d4: 40 9e ff d8 bne+ cr7,ffc0d0ac <_User_extensions_Thread_delete+0x38>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
ffc0d0d8: 80 01 00 1c lwz r0,28(r1)
ffc0d0dc: 83 81 00 08 lwz r28,8(r1)
ffc0d0e0: 7c 08 03 a6 mtlr r0
ffc0d0e4: 83 a1 00 0c lwz r29,12(r1)
ffc0d0e8: 83 c1 00 10 lwz r30,16(r1)
ffc0d0ec: 83 e1 00 14 lwz r31,20(r1)
ffc0d0f0: 38 21 00 18 addi r1,r1,24
ffc0d0f4: 4e 80 00 20 blr
ffc0ceb8 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
ffc0ceb8: 94 21 ff e8 stwu r1,-24(r1)
ffc0cebc: 7c 08 02 a6 mflr r0
ffc0cec0: 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 );
}
}
ffc0cec4: 3f c0 00 00 lis r30,0
ffc0cec8: 3b de 2c f4 addi r30,r30,11508
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
ffc0cecc: 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 );
}
}
ffc0ced0: 83 fe 00 08 lwz r31,8(r30)
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
ffc0ced4: 93 a1 00 0c stw r29,12(r1)
ffc0ced8: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0cedc: 7f 9f f0 00 cmpw cr7,r31,r30
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
ffc0cee0: 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 );
ffc0cee4: 41 9e 00 28 beq- cr7,ffc0cf0c <_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 )
ffc0cee8: 80 1f 00 2c lwz r0,44(r31)
(*the_extension->Callouts.thread_exitted)( executing );
ffc0ceec: 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 )
ffc0cef0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0cef4: 41 9e 00 0c beq- cr7,ffc0cf00 <_User_extensions_Thread_exitted+0x48>
(*the_extension->Callouts.thread_exitted)( executing );
ffc0cef8: 7c 09 03 a6 mtctr r0
ffc0cefc: 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 ) {
ffc0cf00: 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 );
ffc0cf04: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0cf08: 40 9e ff e0 bne+ cr7,ffc0cee8 <_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 );
}
}
ffc0cf0c: 80 01 00 1c lwz r0,28(r1)
ffc0cf10: 83 a1 00 0c lwz r29,12(r1)
ffc0cf14: 7c 08 03 a6 mtlr r0
ffc0cf18: 83 c1 00 10 lwz r30,16(r1)
ffc0cf1c: 83 e1 00 14 lwz r31,20(r1)
ffc0cf20: 38 21 00 18 addi r1,r1,24
ffc0cf24: 4e 80 00 20 blr
ffc0e258 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
ffc0e258: 94 21 ff e8 stwu r1,-24(r1)
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
ffc0e25c: 3d 20 00 00 lis r9,0
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
ffc0e260: 7c 08 02 a6 mflr r0
ffc0e264: 93 c1 00 10 stw r30,16(r1)
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
ffc0e268: 3b c9 2d 74 addi r30,r9,11636
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0e26c: 3b de 00 04 addi r30,r30,4
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
ffc0e270: 93 e1 00 14 stw r31,20(r1)
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
ffc0e274: 83 e9 2d 74 lwz r31,11636(r9)
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
ffc0e278: 93 a1 00 0c stw r29,12(r1)
ffc0e27c: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0e280: 7f 9f f0 00 cmpw cr7,r31,r30
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
ffc0e284: 90 01 00 1c stw r0,28(r1)
ffc0e288: 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 );
ffc0e28c: 41 9e 00 34 beq- cr7,ffc0e2c0 <_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)(
ffc0e290: 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 )
ffc0e294: 80 1f 00 1c lwz r0,28(r31)
(*the_extension->Callouts.thread_restart)(
ffc0e298: 39 3c 2d b8 addi r9,r28,11704
ffc0e29c: 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 )
ffc0e2a0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e2a4: 41 9e 00 10 beq- cr7,ffc0e2b4 <_User_extensions_Thread_restart+0x5c>
(*the_extension->Callouts.thread_restart)(
ffc0e2a8: 80 69 00 0c lwz r3,12(r9)
ffc0e2ac: 7c 09 03 a6 mtctr r0
ffc0e2b0: 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 ) {
ffc0e2b4: 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 );
ffc0e2b8: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0e2bc: 40 9e ff d8 bne+ cr7,ffc0e294 <_User_extensions_Thread_restart+0x3c>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
ffc0e2c0: 80 01 00 1c lwz r0,28(r1)
ffc0e2c4: 83 81 00 08 lwz r28,8(r1)
ffc0e2c8: 7c 08 03 a6 mtlr r0
ffc0e2cc: 83 a1 00 0c lwz r29,12(r1)
ffc0e2d0: 83 c1 00 10 lwz r30,16(r1)
ffc0e2d4: 83 e1 00 14 lwz r31,20(r1)
ffc0e2d8: 38 21 00 18 addi r1,r1,24
ffc0e2dc: 4e 80 00 20 blr
ffc0d0f8 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
ffc0d0f8: 94 21 ff e8 stwu r1,-24(r1)
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
ffc0d0fc: 3d 20 00 00 lis r9,0
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
ffc0d100: 7c 08 02 a6 mflr r0
ffc0d104: 93 c1 00 10 stw r30,16(r1)
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
ffc0d108: 3b c9 2c f4 addi r30,r9,11508
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0d10c: 3b de 00 04 addi r30,r30,4
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
ffc0d110: 93 e1 00 14 stw r31,20(r1)
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
ffc0d114: 83 e9 2c f4 lwz r31,11508(r9)
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
ffc0d118: 93 a1 00 0c stw r29,12(r1)
ffc0d11c: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0d120: 7f 9f f0 00 cmpw cr7,r31,r30
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
ffc0d124: 90 01 00 1c stw r0,28(r1)
ffc0d128: 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 );
ffc0d12c: 41 9e 00 34 beq- cr7,ffc0d160 <_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)(
ffc0d130: 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 )
ffc0d134: 80 1f 00 18 lwz r0,24(r31)
(*the_extension->Callouts.thread_start)(
ffc0d138: 39 3c 2d 38 addi r9,r28,11576
ffc0d13c: 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 )
ffc0d140: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d144: 41 9e 00 10 beq- cr7,ffc0d154 <_User_extensions_Thread_start+0x5c>
(*the_extension->Callouts.thread_start)(
ffc0d148: 80 69 00 0c lwz r3,12(r9)
ffc0d14c: 7c 09 03 a6 mtctr r0
ffc0d150: 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 ) {
ffc0d154: 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 );
ffc0d158: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0d15c: 40 9e ff d8 bne+ cr7,ffc0d134 <_User_extensions_Thread_start+0x3c>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
ffc0d160: 80 01 00 1c lwz r0,28(r1)
ffc0d164: 83 81 00 08 lwz r28,8(r1)
ffc0d168: 7c 08 03 a6 mtlr r0
ffc0d16c: 83 a1 00 0c lwz r29,12(r1)
ffc0d170: 83 c1 00 10 lwz r30,16(r1)
ffc0d174: 83 e1 00 14 lwz r31,20(r1)
ffc0d178: 38 21 00 18 addi r1,r1,24
ffc0d17c: 4e 80 00 20 blr
ffc0d180 <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
ffc0d180: 94 21 ff e8 stwu r1,-24(r1)
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
ffc0d184: 3d 20 00 00 lis r9,0
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
ffc0d188: 7c 08 02 a6 mflr r0
ffc0d18c: 93 c1 00 10 stw r30,16(r1)
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
ffc0d190: 3b c9 2b b0 addi r30,r9,11184
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
ffc0d194: 3b de 00 04 addi r30,r30,4
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
ffc0d198: 93 e1 00 14 stw r31,20(r1)
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
ffc0d19c: 83 e9 2b b0 lwz r31,11184(r9)
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
ffc0d1a0: 93 81 00 08 stw r28,8(r1)
ffc0d1a4: 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 );
ffc0d1a8: 7f 9f f0 00 cmpw cr7,r31,r30
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
ffc0d1ac: 93 a1 00 0c stw r29,12(r1)
ffc0d1b0: 7c 9d 23 78 mr r29,r4
ffc0d1b4: 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 );
ffc0d1b8: 41 9e 00 24 beq- cr7,ffc0d1dc <_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 );
ffc0d1bc: 80 1f 00 08 lwz r0,8(r31)
ffc0d1c0: 7f 83 e3 78 mr r3,r28
ffc0d1c4: 7f a4 eb 78 mr r4,r29
ffc0d1c8: 7c 09 03 a6 mtctr r0
ffc0d1cc: 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 ) {
ffc0d1d0: 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 );
ffc0d1d4: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0d1d8: 40 9e ff e4 bne+ cr7,ffc0d1bc <_User_extensions_Thread_switch+0x3c>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
ffc0d1dc: 80 01 00 1c lwz r0,28(r1)
ffc0d1e0: 83 81 00 08 lwz r28,8(r1)
ffc0d1e4: 7c 08 03 a6 mtlr r0
ffc0d1e8: 83 a1 00 0c lwz r29,12(r1)
ffc0d1ec: 83 c1 00 10 lwz r30,16(r1)
ffc0d1f0: 83 e1 00 14 lwz r31,20(r1)
ffc0d1f4: 38 21 00 18 addi r1,r1,24
ffc0d1f8: 4e 80 00 20 blr
ffc0f6dc <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
ffc0f6dc: 94 21 ff e0 stwu r1,-32(r1)
ffc0f6e0: 7c 08 02 a6 mflr r0
ffc0f6e4: 93 c1 00 18 stw r30,24(r1)
ffc0f6e8: 7c be 2b 78 mr r30,r5
ffc0f6ec: 93 e1 00 1c stw r31,28(r1)
ffc0f6f0: 7c 7f 1b 78 mr r31,r3
ffc0f6f4: 90 01 00 24 stw r0,36(r1)
ffc0f6f8: 93 61 00 0c stw r27,12(r1)
ffc0f6fc: 93 81 00 10 stw r28,16(r1)
ffc0f700: 93 a1 00 14 stw r29,20(r1)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0f704: 7c 00 00 a6 mfmsr r0
ffc0f708: 7d 30 42 a6 mfsprg r9,0
ffc0f70c: 7c 09 48 78 andc r9,r0,r9
ffc0f710: 7d 20 01 24 mtmsr r9
}
}
_ISR_Enable( level );
}
ffc0f714: 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 );
ffc0f718: 3b 83 00 04 addi r28,r3,4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
ffc0f71c: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0f720: 41 9e 00 6c beq- cr7,ffc0f78c <_Watchdog_Adjust+0xb0>
switch ( direction ) {
ffc0f724: 2f 84 00 00 cmpwi cr7,r4,0
ffc0f728: 40 9e 00 8c bne- cr7,ffc0f7b4 <_Watchdog_Adjust+0xd8>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
ffc0f72c: 2f 85 00 00 cmpwi cr7,r5,0
ffc0f730: 41 9e 00 5c beq- cr7,ffc0f78c <_Watchdog_Adjust+0xb0> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
ffc0f734: 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;
ffc0f738: 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 ) {
ffc0f73c: 7f 85 e8 40 cmplw cr7,r5,r29
ffc0f740: 40 bc 00 18 bge+ cr7,ffc0f758 <_Watchdog_Adjust+0x7c> <== ALWAYS TAKEN
ffc0f744: 48 00 00 ac b ffc0f7f0 <_Watchdog_Adjust+0x114> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
ffc0f748: 41 82 00 44 beq- ffc0f78c <_Watchdog_Adjust+0xb0> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
ffc0f74c: 83 a9 00 10 lwz r29,16(r9)
ffc0f750: 7f 9d f0 40 cmplw cr7,r29,r30
ffc0f754: 41 9d 00 9c bgt- cr7,ffc0f7f0 <_Watchdog_Adjust+0x114>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
ffc0f758: 93 69 00 10 stw r27,16(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0f75c: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
_Watchdog_Tickle( header );
ffc0f760: 7f e3 fb 78 mr r3,r31
ffc0f764: 48 00 03 31 bl ffc0fa94 <_Watchdog_Tickle>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0f768: 7c 00 00 a6 mfmsr r0
ffc0f76c: 7d 30 42 a6 mfsprg r9,0
ffc0f770: 7c 09 48 78 andc r9,r0,r9
ffc0f774: 7d 20 01 24 mtmsr r9
}
}
_ISR_Enable( level );
}
ffc0f778: 81 7f 00 00 lwz r11,0(r31)
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
ffc0f77c: 7f dd f0 51 subf. r30,r29,r30
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
ffc0f780: 7f 9c 58 00 cmpw cr7,r28,r11
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
ffc0f784: 7d 69 5b 78 mr r9,r11
ffc0f788: 40 9e ff c0 bne+ cr7,ffc0f748 <_Watchdog_Adjust+0x6c>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0f78c: 7c 00 01 24 mtmsr r0
}
}
_ISR_Enable( level );
}
ffc0f790: 80 01 00 24 lwz r0,36(r1)
ffc0f794: 83 61 00 0c lwz r27,12(r1)
ffc0f798: 7c 08 03 a6 mtlr r0
ffc0f79c: 83 81 00 10 lwz r28,16(r1)
ffc0f7a0: 83 a1 00 14 lwz r29,20(r1)
ffc0f7a4: 83 c1 00 18 lwz r30,24(r1)
ffc0f7a8: 83 e1 00 1c lwz r31,28(r1)
ffc0f7ac: 38 21 00 20 addi r1,r1,32
ffc0f7b0: 4e 80 00 20 blr
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
ffc0f7b4: 2f 84 00 01 cmpwi cr7,r4,1
ffc0f7b8: 40 9e ff d4 bne+ cr7,ffc0f78c <_Watchdog_Adjust+0xb0> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
ffc0f7bc: 81 69 00 10 lwz r11,16(r9)
ffc0f7c0: 7f cb 2a 14 add r30,r11,r5
ffc0f7c4: 93 c9 00 10 stw r30,16(r9)
ffc0f7c8: 7c 00 01 24 mtmsr r0
}
}
_ISR_Enable( level );
}
ffc0f7cc: 80 01 00 24 lwz r0,36(r1)
ffc0f7d0: 83 61 00 0c lwz r27,12(r1)
ffc0f7d4: 7c 08 03 a6 mtlr r0
ffc0f7d8: 83 81 00 10 lwz r28,16(r1)
ffc0f7dc: 83 a1 00 14 lwz r29,20(r1)
ffc0f7e0: 83 c1 00 18 lwz r30,24(r1)
ffc0f7e4: 83 e1 00 1c lwz r31,28(r1)
ffc0f7e8: 38 21 00 20 addi r1,r1,32
ffc0f7ec: 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;
ffc0f7f0: 7f de e8 50 subf r30,r30,r29
ffc0f7f4: 93 c9 00 10 stw r30,16(r9)
break;
ffc0f7f8: 4b ff ff 94 b ffc0f78c <_Watchdog_Adjust+0xb0>
ffc21320 <_Watchdog_Adjust_to_chain>:
{
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
ffc21320: 2c 04 00 00 cmpwi r4,0
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
ffc21324: 94 21 ff f0 stwu r1,-16(r1)
ffc21328: 93 e1 00 0c stw r31,12(r1)
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
ffc2132c: 41 82 00 94 beq- ffc213c0 <_Watchdog_Adjust_to_chain+0xa0>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc21330: 7c c0 00 a6 mfmsr r6
ffc21334: 7c 10 42 a6 mfsprg r0,0
ffc21338: 7c c0 00 78 andc r0,r6,r0
ffc2133c: 7c 00 01 24 mtmsr r0
return;
}
_ISR_Disable( level );
ffc21340: 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;
ffc21344: 3b e0 00 00 li r31,0
ffc21348: 38 e3 00 04 addi r7,r3,4
ffc2134c: 39 85 00 04 addi r12,r5,4
while ( 1 ) {
if ( units <= 0 ) {
break;
}
if ( _Chain_Is_empty( header ) ) {
ffc21350: 7f 89 38 00 cmpw cr7,r9,r7
ffc21354: 41 9e 00 68 beq- cr7,ffc213bc <_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 ) {
ffc21358: 80 09 00 10 lwz r0,16(r9)
ffc2135c: 7f 80 20 40 cmplw cr7,r0,r4
ffc21360: 41 9d 00 6c bgt- cr7,ffc213cc <_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;
ffc21364: 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;
ffc21368: 7c 80 20 50 subf r4,r0,r4
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc2136c: 81 09 00 00 lwz r8,0(r9)
previous = the_node->previous;
ffc21370: 81 49 00 04 lwz r10,4(r9)
next->previous = previous;
ffc21374: 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;
ffc21378: 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;
ffc2137c: 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;
ffc21380: 91 89 00 00 stw r12,0(r9)
tail->previous = the_node;
old_last->next = the_node;
ffc21384: 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;
ffc21388: 91 25 00 08 stw r9,8(r5)
old_last->next = the_node;
the_node->previous = old_last;
ffc2138c: 91 69 00 04 stw r11,4(r9)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc21390: 7c 00 00 a6 mfmsr r0
ffc21394: 7c c0 01 24 mtmsr r6
ffc21398: 7c 00 01 24 mtmsr r0
break;
}
}
_ISR_Enable( level );
}
ffc2139c: 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 ) )
ffc213a0: 7f 87 48 00 cmpw cr7,r7,r9
ffc213a4: 41 9e 00 10 beq- cr7,ffc213b4 <_Watchdog_Adjust_to_chain+0x94>
break;
first = _Watchdog_First( header );
if ( first->delta_interval != 0 )
ffc213a8: 80 09 00 10 lwz r0,16(r9)
ffc213ac: 2f 80 00 00 cmpwi cr7,r0,0
ffc213b0: 41 9e ff bc beq+ cr7,ffc2136c <_Watchdog_Adjust_to_chain+0x4c><== NEVER TAKEN
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
ffc213b4: 2f 84 00 00 cmpwi cr7,r4,0
ffc213b8: 40 9e ff 98 bne+ cr7,ffc21350 <_Watchdog_Adjust_to_chain+0x30>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc213bc: 7c c0 01 24 mtmsr r6
break;
}
}
_ISR_Enable( level );
}
ffc213c0: 83 e1 00 0c lwz r31,12(r1)
ffc213c4: 38 21 00 10 addi r1,r1,16
ffc213c8: 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;
ffc213cc: 7c 04 00 50 subf r0,r4,r0
ffc213d0: 90 09 00 10 stw r0,16(r9)
break;
ffc213d4: 4b ff ff e8 b ffc213bc <_Watchdog_Adjust_to_chain+0x9c>
ffc0d1fc <_Watchdog_Insert>:
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
ffc0d1fc: 3d 20 00 00 lis r9,0
ffc0d200: 80 09 2d 40 lwz r0,11584(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0d204: 7c e0 00 a6 mfmsr r7
ffc0d208: 7d 30 42 a6 mfsprg r9,0
ffc0d20c: 7c e9 48 78 andc r9,r7,r9
ffc0d210: 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 ) {
ffc0d214: 81 24 00 08 lwz r9,8(r4)
ffc0d218: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d21c: 40 9e 01 0c bne- cr7,ffc0d328 <_Watchdog_Insert+0x12c>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
ffc0d220: 3c a0 00 00 lis r5,0
ffc0d224: 81 25 27 60 lwz r9,10080(r5)
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
ffc0d228: 39 60 00 01 li r11,1
ffc0d22c: 91 64 00 08 stw r11,8(r4)
ffc0d230: 3d 80 00 00 lis r12,0
_Watchdog_Sync_count++;
ffc0d234: 39 29 00 01 addi r9,r9,1
ffc0d238: 91 25 27 60 stw r9,10080(r5)
restart:
delta_interval = the_watchdog->initial;
ffc0d23c: 81 24 00 0c lwz r9,12(r4)
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
ffc0d240: 81 63 00 00 lwz r11,0(r3)
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
ffc0d244: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d248: 41 9e 00 98 beq- cr7,ffc0d2e0 <_Watchdog_Insert+0xe4>
ffc0d24c: 81 4b 00 00 lwz r10,0(r11)
ffc0d250: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0d254: 41 9e 00 8c beq- cr7,ffc0d2e0 <_Watchdog_Insert+0xe4>
break;
if ( delta_interval < after->delta_interval ) {
ffc0d258: 81 4b 00 10 lwz r10,16(r11)
ffc0d25c: 7f 89 50 40 cmplw cr7,r9,r10
ffc0d260: 41 9c 00 d0 blt- cr7,ffc0d330 <_Watchdog_Insert+0x134>
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0d264: 7d 00 00 a6 mfmsr r8
ffc0d268: 7c e0 01 24 mtmsr r7
ffc0d26c: 7d 00 01 24 mtmsr r8
delta_interval -= after->delta_interval;
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
ffc0d270: 81 04 00 08 lwz r8,8(r4)
ffc0d274: 2f 88 00 01 cmpwi cr7,r8,1
ffc0d278: 40 9e 00 98 bne- cr7,ffc0d310 <_Watchdog_Insert+0x114>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
ffc0d27c: 81 0c 27 50 lwz r8,10064(r12)
ffc0d280: 38 cc 27 50 addi r6,r12,10064
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
ffc0d284: 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 ) {
ffc0d288: 7f 80 40 40 cmplw cr7,r0,r8
ffc0d28c: 40 bc 00 48 bge+ cr7,ffc0d2d4 <_Watchdog_Insert+0xd8>
ffc0d290: 48 00 00 dc b ffc0d36c <_Watchdog_Insert+0x170>
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
ffc0d294: 81 4b 00 00 lwz r10,0(r11)
ffc0d298: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0d29c: 41 9e 00 44 beq- cr7,ffc0d2e0 <_Watchdog_Insert+0xe4>
break;
if ( delta_interval < after->delta_interval ) {
ffc0d2a0: 81 4b 00 10 lwz r10,16(r11)
ffc0d2a4: 7f 8a 48 40 cmplw cr7,r10,r9
ffc0d2a8: 41 9d 00 88 bgt- cr7,ffc0d330 <_Watchdog_Insert+0x134>
ffc0d2ac: 7d 00 00 a6 mfmsr r8
ffc0d2b0: 7c e0 01 24 mtmsr r7
ffc0d2b4: 7d 00 01 24 mtmsr r8
delta_interval -= after->delta_interval;
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
ffc0d2b8: 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;
ffc0d2bc: 7d 2a 48 50 subf r9,r10,r9
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
ffc0d2c0: 2f 88 00 01 cmpwi cr7,r8,1
ffc0d2c4: 40 9e 00 4c bne- cr7,ffc0d310 <_Watchdog_Insert+0x114> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
ffc0d2c8: 81 46 00 00 lwz r10,0(r6)
ffc0d2cc: 7f 80 50 40 cmplw cr7,r0,r10
ffc0d2d0: 41 9c 00 9c blt- cr7,ffc0d36c <_Watchdog_Insert+0x170> <== NEVER TAKEN
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
ffc0d2d4: 2f 89 00 00 cmpwi cr7,r9,0
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
ffc0d2d8: 81 6b 00 00 lwz r11,0(r11)
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
ffc0d2dc: 40 9e ff b8 bne+ cr7,ffc0d294 <_Watchdog_Insert+0x98>
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
ffc0d2e0: 81 6b 00 04 lwz r11,4(r11)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
ffc0d2e4: 3d 00 00 00 lis r8,0
ffc0d2e8: 81 08 27 64 lwz r8,10084(r8)
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
ffc0d2ec: 38 c0 00 02 li r6,2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc0d2f0: 81 4b 00 00 lwz r10,0(r11)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc0d2f4: 91 64 00 04 stw r11,4(r4)
ffc0d2f8: 90 c4 00 08 stw r6,8(r4)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
ffc0d2fc: 91 24 00 10 stw r9,16(r4)
before_node = after_node->next;
after_node->next = the_node;
ffc0d300: 90 8b 00 00 stw r4,0(r11)
the_node->next = before_node;
before_node->previous = the_node;
ffc0d304: 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;
ffc0d308: 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;
ffc0d30c: 91 04 00 14 stw r8,20(r4)
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
ffc0d310: 90 0c 27 50 stw r0,10064(r12)
_Watchdog_Sync_count--;
ffc0d314: 81 25 27 60 lwz r9,10080(r5)
ffc0d318: 38 09 ff ff addi r0,r9,-1
ffc0d31c: 90 05 27 60 stw r0,10080(r5)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0d320: 7c e0 01 24 mtmsr r7
ffc0d324: 4e 80 00 20 blr
ffc0d328: 7c e0 01 24 mtmsr r7
ffc0d32c: 4e 80 00 20 blr
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
ffc0d330: 7d 49 50 50 subf r10,r9,r10
ffc0d334: 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;
ffc0d338: 3d 00 00 00 lis r8,0
ffc0d33c: 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 );
ffc0d340: 81 6b 00 04 lwz r11,4(r11)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
ffc0d344: 81 08 27 64 lwz r8,10084(r8)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc0d348: 81 4b 00 00 lwz r10,0(r11)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc0d34c: 91 64 00 04 stw r11,4(r4)
ffc0d350: 90 c4 00 08 stw r6,8(r4)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
ffc0d354: 91 24 00 10 stw r9,16(r4)
before_node = after_node->next;
after_node->next = the_node;
ffc0d358: 90 8b 00 00 stw r4,0(r11)
the_node->next = before_node;
before_node->previous = the_node;
ffc0d35c: 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;
ffc0d360: 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;
ffc0d364: 91 04 00 14 stw r8,20(r4)
ffc0d368: 4b ff ff a8 b ffc0d310 <_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;
ffc0d36c: 90 0c 27 50 stw r0,10064(r12)
goto restart;
ffc0d370: 4b ff fe cc b ffc0d23c <_Watchdog_Insert+0x40>
ffc0d3c4 <_Watchdog_Remove>:
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0d3c4: 7d 20 00 a6 mfmsr r9
ffc0d3c8: 7c 10 42 a6 mfsprg r0,0
ffc0d3cc: 7d 20 00 78 andc r0,r9,r0
ffc0d3d0: 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;
ffc0d3d4: 80 03 00 08 lwz r0,8(r3)
switch ( previous_state ) {
ffc0d3d8: 2f 80 00 01 cmpwi cr7,r0,1
ffc0d3dc: 41 9e 00 98 beq- cr7,ffc0d474 <_Watchdog_Remove+0xb0>
ffc0d3e0: 2b 80 00 01 cmplwi cr7,r0,1
ffc0d3e4: 40 9c 00 1c bge- cr7,ffc0d400 <_Watchdog_Remove+0x3c>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
ffc0d3e8: 3d 60 00 00 lis r11,0
ffc0d3ec: 81 6b 27 64 lwz r11,10084(r11)
ffc0d3f0: 91 63 00 18 stw r11,24(r3)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0d3f4: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
return( previous_state );
}
ffc0d3f8: 7c 03 03 78 mr r3,r0
ffc0d3fc: 4e 80 00 20 blr
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
ffc0d400: 2b 80 00 03 cmplwi cr7,r0,3
ffc0d404: 41 bd ff e4 bgt- cr7,ffc0d3e8 <_Watchdog_Remove+0x24> <== NEVER TAKEN
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
ffc0d408: 81 63 00 00 lwz r11,0(r3)
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0d40c: 39 00 00 00 li r8,0
ffc0d410: 91 03 00 08 stw r8,8(r3)
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
ffc0d414: 81 4b 00 00 lwz r10,0(r11)
ffc0d418: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0d41c: 41 9e 00 14 beq- cr7,ffc0d430 <_Watchdog_Remove+0x6c>
next_watchdog->delta_interval += the_watchdog->delta_interval;
ffc0d420: 81 0b 00 10 lwz r8,16(r11)
ffc0d424: 81 43 00 10 lwz r10,16(r3)
ffc0d428: 7d 48 52 14 add r10,r8,r10
ffc0d42c: 91 4b 00 10 stw r10,16(r11)
if ( _Watchdog_Sync_count )
ffc0d430: 3d 40 00 00 lis r10,0
ffc0d434: 81 4a 27 60 lwz r10,10080(r10)
ffc0d438: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0d43c: 41 9e 00 14 beq- cr7,ffc0d450 <_Watchdog_Remove+0x8c>
_Watchdog_Sync_level = _ISR_Nest_level;
ffc0d440: 3d 40 00 00 lis r10,0
ffc0d444: 81 0a 2d 40 lwz r8,11584(r10)
ffc0d448: 3d 40 00 00 lis r10,0
ffc0d44c: 91 0a 27 50 stw r8,10064(r10)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
ffc0d450: 81 43 00 04 lwz r10,4(r3)
next->previous = previous;
ffc0d454: 91 4b 00 04 stw r10,4(r11)
previous->next = next;
ffc0d458: 91 6a 00 00 stw r11,0(r10)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
ffc0d45c: 3d 60 00 00 lis r11,0
ffc0d460: 81 6b 27 64 lwz r11,10084(r11)
ffc0d464: 91 63 00 18 stw r11,24(r3)
ffc0d468: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
return( previous_state );
}
ffc0d46c: 7c 03 03 78 mr r3,r0
ffc0d470: 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;
ffc0d474: 39 60 00 00 li r11,0
ffc0d478: 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;
ffc0d47c: 3d 60 00 00 lis r11,0
ffc0d480: 81 6b 27 64 lwz r11,10084(r11)
ffc0d484: 91 63 00 18 stw r11,24(r3)
ffc0d488: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
return( previous_state );
}
ffc0d48c: 7c 03 03 78 mr r3,r0
ffc0d490: 4e 80 00 20 blr
ffc0ee38 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
ffc0ee38: 94 21 ff e8 stwu r1,-24(r1)
ffc0ee3c: 7c 08 02 a6 mflr r0
ffc0ee40: 93 c1 00 10 stw r30,16(r1)
ffc0ee44: 7c 7e 1b 78 mr r30,r3
ffc0ee48: 93 e1 00 14 stw r31,20(r1)
ffc0ee4c: 7c 9f 23 78 mr r31,r4
ffc0ee50: 90 01 00 1c stw r0,28(r1)
ffc0ee54: 93 81 00 08 stw r28,8(r1)
ffc0ee58: 93 a1 00 0c stw r29,12(r1)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0ee5c: 7f a0 00 a6 mfmsr r29
ffc0ee60: 7c 10 42 a6 mfsprg r0,0
ffc0ee64: 7f a0 00 78 andc r0,r29,r0
ffc0ee68: 7c 00 01 24 mtmsr r0
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
ffc0ee6c: 3c 60 ff c2 lis r3,-62
ffc0ee70: 7f e5 fb 78 mr r5,r31
ffc0ee74: 38 63 10 ac addi r3,r3,4268
ffc0ee78: 7f c4 f3 78 mr r4,r30
ffc0ee7c: 4c c6 31 82 crclr 4*cr1+eq
ffc0ee80: 4b ff 7f 61 bl ffc06de0 <printk>
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
ffc0ee84: 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 );
ffc0ee88: 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 ) ) {
ffc0ee8c: 7f 9c f8 00 cmpw cr7,r28,r31
ffc0ee90: 41 9e 00 54 beq- cr7,ffc0eee4 <_Watchdog_Report_chain+0xac>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
ffc0ee94: 7f 84 e3 78 mr r4,r28
ffc0ee98: 38 60 00 00 li r3,0
ffc0ee9c: 48 00 00 5d bl ffc0eef8 <_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 )
ffc0eea0: 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 ) ;
ffc0eea4: 7f 9c f8 00 cmpw cr7,r28,r31
ffc0eea8: 40 9e ff ec bne+ cr7,ffc0ee94 <_Watchdog_Report_chain+0x5c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
ffc0eeac: 3c 60 ff c2 lis r3,-62
ffc0eeb0: 38 63 10 c4 addi r3,r3,4292
ffc0eeb4: 7f c4 f3 78 mr r4,r30
ffc0eeb8: 4c c6 31 82 crclr 4*cr1+eq
ffc0eebc: 4b ff 7f 25 bl ffc06de0 <printk>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0eec0: 7f a0 01 24 mtmsr r29
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
ffc0eec4: 80 01 00 1c lwz r0,28(r1)
ffc0eec8: 83 81 00 08 lwz r28,8(r1)
ffc0eecc: 7c 08 03 a6 mtlr r0
ffc0eed0: 83 a1 00 0c lwz r29,12(r1)
ffc0eed4: 83 c1 00 10 lwz r30,16(r1)
ffc0eed8: 83 e1 00 14 lwz r31,20(r1)
ffc0eedc: 38 21 00 18 addi r1,r1,24
ffc0eee0: 4e 80 00 20 blr
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
ffc0eee4: 3c 60 ff c2 lis r3,-62
ffc0eee8: 38 63 10 d4 addi r3,r3,4308
ffc0eeec: 4c c6 31 82 crclr 4*cr1+eq
ffc0eef0: 4b ff 7e f1 bl ffc06de0 <printk>
ffc0eef4: 4b ff ff cc b ffc0eec0 <_Watchdog_Report_chain+0x88>
ffc12dfc <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
ffc12dfc: 94 21 ff d0 stwu r1,-48(r1)
ffc12e00: 7c 08 02 a6 mflr r0
ffc12e04: 93 e1 00 2c stw r31,44(r1)
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
ffc12e08: 7c 7f 1b 79 mr. r31,r3
return RTEMS_INVALID_NAME;
ffc12e0c: 38 60 00 03 li r3,3
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
ffc12e10: 93 a1 00 24 stw r29,36(r1)
ffc12e14: 7c dd 33 78 mr r29,r6
ffc12e18: 90 01 00 34 stw r0,52(r1)
ffc12e1c: 93 81 00 20 stw r28,32(r1)
ffc12e20: 93 c1 00 28 stw r30,40(r1)
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
ffc12e24: 41 82 00 90 beq- ffc12eb4 <rtems_barrier_create+0xb8>
return RTEMS_INVALID_NAME;
if ( !id )
ffc12e28: 2f 86 00 00 cmpwi cr7,r6,0
return RTEMS_INVALID_ADDRESS;
ffc12e2c: 38 60 00 09 li r3,9
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
ffc12e30: 41 9e 00 84 beq- cr7,ffc12eb4 <rtems_barrier_create+0xb8>
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
ffc12e34: 70 80 00 10 andi. r0,r4,16
ffc12e38: 41 82 00 9c beq- ffc12ed4 <rtems_barrier_create+0xd8>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
ffc12e3c: 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;
ffc12e40: 38 00 00 00 li r0,0
ffc12e44: 90 01 00 08 stw r0,8(r1)
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
ffc12e48: 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 )
ffc12e4c: 41 9e 00 68 beq- cr7,ffc12eb4 <rtems_barrier_create+0xb8>
ffc12e50: 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;
ffc12e54: 90 a1 00 0c stw r5,12(r1)
ffc12e58: 81 69 27 48 lwz r11,10056(r9)
ffc12e5c: 38 0b 00 01 addi r0,r11,1
ffc12e60: 90 09 27 48 stw r0,10056(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 );
ffc12e64: 3f 80 00 00 lis r28,0
ffc12e68: 90 81 00 18 stw r4,24(r1)
ffc12e6c: 3b 9c 2d c0 addi r28,r28,11712
ffc12e70: 7f 83 e3 78 mr r3,r28
ffc12e74: 4b ff a4 51 bl ffc0d2c4 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
ffc12e78: 80 81 00 18 lwz r4,24(r1)
ffc12e7c: 7c 7e 1b 79 mr. r30,r3
ffc12e80: 41 82 00 90 beq- ffc12f10 <rtems_barrier_create+0x114> <== NEVER TAKEN
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
ffc12e84: 90 9e 00 10 stw r4,16(r30)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
ffc12e88: 38 7e 00 14 addi r3,r30,20
ffc12e8c: 38 81 00 08 addi r4,r1,8
ffc12e90: 48 00 0a d1 bl ffc13960 <_CORE_barrier_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc12e94: 80 1e 00 08 lwz r0,8(r30)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc12e98: 81 7c 00 1c lwz r11,28(r28)
ffc12e9c: 54 09 13 ba rlwinm r9,r0,2,14,29
ffc12ea0: 7f cb 49 2e stwx r30,r11,r9
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc12ea4: 93 fe 00 0c stw r31,12(r30)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
ffc12ea8: 90 1d 00 00 stw r0,0(r29)
_Thread_Enable_dispatch();
ffc12eac: 4b ff b9 51 bl ffc0e7fc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc12eb0: 38 60 00 00 li r3,0
}
ffc12eb4: 80 01 00 34 lwz r0,52(r1)
ffc12eb8: 83 81 00 20 lwz r28,32(r1)
ffc12ebc: 7c 08 03 a6 mtlr r0
ffc12ec0: 83 a1 00 24 lwz r29,36(r1)
ffc12ec4: 83 c1 00 28 lwz r30,40(r1)
ffc12ec8: 83 e1 00 2c lwz r31,44(r1)
ffc12ecc: 38 21 00 30 addi r1,r1,48
ffc12ed0: 4e 80 00 20 blr
ffc12ed4: 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;
ffc12ed8: 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;
ffc12edc: 38 00 00 01 li r0,1
ffc12ee0: 81 69 27 48 lwz r11,10056(r9)
ffc12ee4: 90 01 00 08 stw r0,8(r1)
ffc12ee8: 38 0b 00 01 addi r0,r11,1
ffc12eec: 90 09 27 48 stw r0,10056(r9)
ffc12ef0: 3f 80 00 00 lis r28,0
ffc12ef4: 90 81 00 18 stw r4,24(r1)
ffc12ef8: 3b 9c 2d c0 addi r28,r28,11712
ffc12efc: 7f 83 e3 78 mr r3,r28
ffc12f00: 4b ff a3 c5 bl ffc0d2c4 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
ffc12f04: 80 81 00 18 lwz r4,24(r1)
ffc12f08: 7c 7e 1b 79 mr. r30,r3
ffc12f0c: 40 82 ff 78 bne+ ffc12e84 <rtems_barrier_create+0x88>
_Thread_Enable_dispatch();
ffc12f10: 4b ff b8 ed bl ffc0e7fc <_Thread_Enable_dispatch>
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
ffc12f14: 80 01 00 34 lwz r0,52(r1)
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
ffc12f18: 38 60 00 05 li r3,5
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
ffc12f1c: 83 81 00 20 lwz r28,32(r1)
ffc12f20: 7c 08 03 a6 mtlr r0
ffc12f24: 83 a1 00 24 lwz r29,36(r1)
ffc12f28: 83 c1 00 28 lwz r30,40(r1)
ffc12f2c: 83 e1 00 2c lwz r31,44(r1)
ffc12f30: 38 21 00 30 addi r1,r1,48
ffc12f34: 4e 80 00 20 blr
ffc09f04 <rtems_chain_append_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
ffc09f04: 94 21 ff f0 stwu r1,-16(r1)
ffc09f08: 7c 08 02 a6 mflr r0
ffc09f0c: 93 c1 00 08 stw r30,8(r1)
ffc09f10: 7c de 33 78 mr r30,r6
ffc09f14: 93 e1 00 0c stw r31,12(r1)
ffc09f18: 7c bf 2b 78 mr r31,r5
ffc09f1c: 90 01 00 14 stw r0,20(r1)
RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Append_with_empty_check( chain, node );
ffc09f20: 48 00 07 5d bl ffc0a67c <_Chain_Append_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
ffc09f24: 2f 83 00 00 cmpwi cr7,r3,0
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
ffc09f28: 38 60 00 00 li r3,0
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
ffc09f2c: 41 be 00 10 beq+ cr7,ffc09f3c <rtems_chain_append_with_notification+0x38><== NEVER TAKEN
sc = rtems_event_send( task, events );
ffc09f30: 7f e3 fb 78 mr r3,r31
ffc09f34: 7f c4 f3 78 mr r4,r30
ffc09f38: 4b ff f2 01 bl ffc09138 <rtems_event_send>
}
return sc;
}
ffc09f3c: 80 01 00 14 lwz r0,20(r1)
ffc09f40: 83 c1 00 08 lwz r30,8(r1)
ffc09f44: 7c 08 03 a6 mtlr r0
ffc09f48: 83 e1 00 0c lwz r31,12(r1)
ffc09f4c: 38 21 00 10 addi r1,r1,16
ffc09f50: 4e 80 00 20 blr
ffc09fa8 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
ffc09fa8: 94 21 ff d0 stwu r1,-48(r1)
ffc09fac: 7c 08 02 a6 mflr r0
ffc09fb0: 93 e1 00 2c stw r31,44(r1)
ffc09fb4: 90 01 00 34 stw r0,52(r1)
ffc09fb8: 93 41 00 18 stw r26,24(r1)
ffc09fbc: 7c da 33 78 mr r26,r6
ffc09fc0: 93 61 00 1c stw r27,28(r1)
ffc09fc4: 7c 7b 1b 78 mr r27,r3
ffc09fc8: 93 81 00 20 stw r28,32(r1)
ffc09fcc: 7c 9c 23 78 mr r28,r4
ffc09fd0: 93 a1 00 24 stw r29,36(r1)
ffc09fd4: 7c bd 2b 78 mr r29,r5
ffc09fd8: 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(
ffc09fdc: 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 );
ffc09fe0: 7f 63 db 78 mr r3,r27
ffc09fe4: 48 00 07 91 bl ffc0a774 <_Chain_Get>
ffc09fe8: 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
ffc09fec: 7c 7f 1b 79 mr. r31,r3
) {
rtems_event_set out;
sc = rtems_event_receive(
ffc09ff0: 7f a5 eb 78 mr r5,r29
ffc09ff4: 7f c6 f3 78 mr r6,r30
ffc09ff8: 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
ffc09ffc: 40 82 00 3c bne- ffc0a038 <rtems_chain_get_with_wait+0x90>
) {
rtems_event_set out;
sc = rtems_event_receive(
ffc0a000: 4b ff ef 35 bl ffc08f34 <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
ffc0a004: 2c 03 00 00 cmpwi r3,0
ffc0a008: 41 82 ff d8 beq+ ffc09fe0 <rtems_chain_get_with_wait+0x38><== NEVER TAKEN
}
*node_ptr = node;
return sc;
}
ffc0a00c: 80 01 00 34 lwz r0,52(r1)
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
ffc0a038: 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
ffc0a03c: 38 60 00 00 li r3,0
timeout,
&out
);
}
*node_ptr = node;
ffc0a040: 93 fa 00 00 stw r31,0(r26)
return sc;
}
ffc0a044: 7c 08 03 a6 mtlr r0
ffc0a048: 83 41 00 18 lwz r26,24(r1)
ffc0a04c: 83 61 00 1c lwz r27,28(r1)
ffc0a050: 83 81 00 20 lwz r28,32(r1)
ffc0a054: 83 a1 00 24 lwz r29,36(r1)
ffc0a058: 83 c1 00 28 lwz r30,40(r1)
ffc0a05c: 83 e1 00 2c lwz r31,44(r1)
ffc0a060: 38 21 00 30 addi r1,r1,48
ffc0a064: 4e 80 00 20 blr
ffc0a068 <rtems_chain_prepend_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
ffc0a068: 94 21 ff f0 stwu r1,-16(r1)
ffc0a06c: 7c 08 02 a6 mflr r0
ffc0a070: 93 c1 00 08 stw r30,8(r1)
ffc0a074: 7c de 33 78 mr r30,r6
ffc0a078: 93 e1 00 0c stw r31,12(r1)
ffc0a07c: 7c bf 2b 78 mr r31,r5
ffc0a080: 90 01 00 14 stw r0,20(r1)
RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Prepend_with_empty_check( chain, node );
ffc0a084: 48 00 07 61 bl ffc0a7e4 <_Chain_Prepend_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
ffc0a088: 2f 83 00 00 cmpwi cr7,r3,0
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
ffc0a08c: 38 60 00 00 li r3,0
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
ffc0a090: 41 be 00 10 beq+ cr7,ffc0a0a0 <rtems_chain_prepend_with_notification+0x38><== NEVER TAKEN
sc = rtems_event_send( task, events );
ffc0a094: 7f e3 fb 78 mr r3,r31
ffc0a098: 7f c4 f3 78 mr r4,r30
ffc0a09c: 4b ff f0 9d bl ffc09138 <rtems_event_send>
}
return sc;
}
ffc0a0a0: 80 01 00 14 lwz r0,20(r1)
ffc0a0a4: 83 c1 00 08 lwz r30,8(r1)
ffc0a0a8: 7c 08 03 a6 mtlr r0
ffc0a0ac: 83 e1 00 0c lwz r31,12(r1)
ffc0a0b0: 38 21 00 10 addi r1,r1,16
ffc0a0b4: 4e 80 00 20 blr
ffc0ae68 <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
)
{
ffc0ae68: 94 21 ff f0 stwu r1,-16(r1)
ffc0ae6c: 7c 08 02 a6 mflr r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
ffc0ae70: 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
)
{
ffc0ae74: 90 01 00 14 stw r0,20(r1)
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
ffc0ae78: 80 09 2e 00 lwz r0,11776(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;
ffc0ae7c: 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
)
{
ffc0ae80: 93 e1 00 0c stw r31,12(r1)
ffc0ae84: 7c 7f 1b 78 mr r31,r3
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
ffc0ae88: 2f 80 00 00 cmpwi cr7,r0,0
return RTEMS_CALLED_FROM_ISR;
ffc0ae8c: 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;
ffc0ae90: 80 09 27 98 lwz r0,10136(r9)
if ( rtems_interrupt_is_in_progress() )
ffc0ae94: 40 9e 00 ec bne- cr7,ffc0af80 <rtems_io_register_driver+0x118>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
ffc0ae98: 2f 85 00 00 cmpwi cr7,r5,0
return RTEMS_INVALID_ADDRESS;
ffc0ae9c: 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 )
ffc0aea0: 41 9e 00 e0 beq- cr7,ffc0af80 <rtems_io_register_driver+0x118>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
ffc0aea4: 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;
ffc0aea8: 90 05 00 00 stw r0,0(r5)
if ( driver_table == NULL )
ffc0aeac: 41 9e 00 d4 beq- cr7,ffc0af80 <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;
ffc0aeb0: 81 64 00 00 lwz r11,0(r4)
ffc0aeb4: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0aeb8: 41 9e 01 14 beq- cr7,ffc0afcc <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 )
ffc0aebc: 7f 80 f8 40 cmplw cr7,r0,r31
return RTEMS_INVALID_NUMBER;
ffc0aec0: 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 )
ffc0aec4: 40 9d 00 bc ble- cr7,ffc0af80 <rtems_io_register_driver+0x118>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc0aec8: 3d 60 00 00 lis r11,0
ffc0aecc: 81 4b 27 44 lwz r10,10052(r11)
ffc0aed0: 38 0a 00 01 addi r0,r10,1
ffc0aed4: 90 0b 27 44 stw r0,10052(r11)
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
ffc0aed8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0aedc: 40 9e 00 b8 bne- cr7,ffc0af94 <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;
ffc0aee0: 81 49 27 98 lwz r10,10136(r9)
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
ffc0aee4: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0aee8: 41 9e 00 f4 beq- cr7,ffc0afdc <rtems_io_register_driver+0x174><== NEVER TAKEN
ffc0aeec: 3d 60 00 00 lis r11,0
ffc0aef0: 7d 49 03 a6 mtctr r10
ffc0aef4: 81 2b 27 9c lwz r9,10140(r11)
ffc0aef8: 40 be 00 14 bne+ cr7,ffc0af0c <rtems_io_register_driver+0xa4><== ALWAYS TAKEN
ffc0aefc: 48 00 01 04 b ffc0b000 <rtems_io_register_driver+0x198><== NOT EXECUTED
ffc0af00: 3b ff 00 01 addi r31,r31,1
ffc0af04: 39 29 00 18 addi r9,r9,24
ffc0af08: 42 40 00 1c bdz- ffc0af24 <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;
ffc0af0c: 80 09 00 00 lwz r0,0(r9)
ffc0af10: 2f 80 00 00 cmpwi cr7,r0,0
ffc0af14: 40 9e ff ec bne+ cr7,ffc0af00 <rtems_io_register_driver+0x98>
ffc0af18: 80 09 00 04 lwz r0,4(r9)
ffc0af1c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0af20: 40 9e ff e0 bne+ cr7,ffc0af00 <rtems_io_register_driver+0x98>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
ffc0af24: 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;
ffc0af28: 93 e5 00 00 stw r31,0(r5)
if ( m != n )
ffc0af2c: 1c 1f 00 18 mulli r0,r31,24
ffc0af30: 41 9e 00 b0 beq- cr7,ffc0afe0 <rtems_io_register_driver+0x178>
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
ffc0af34: 81 6b 27 9c lwz r11,10140(r11)
ffc0af38: 80 c4 00 00 lwz r6,0(r4)
ffc0af3c: 80 e4 00 04 lwz r7,4(r4)
ffc0af40: 7d 2b 02 14 add r9,r11,r0
ffc0af44: 81 04 00 08 lwz r8,8(r4)
ffc0af48: 81 44 00 0c lwz r10,12(r4)
ffc0af4c: 7c cb 01 2e stwx r6,r11,r0
ffc0af50: 90 e9 00 04 stw r7,4(r9)
ffc0af54: 91 09 00 08 stw r8,8(r9)
ffc0af58: 91 49 00 0c stw r10,12(r9)
ffc0af5c: 81 64 00 10 lwz r11,16(r4)
ffc0af60: 80 04 00 14 lwz r0,20(r4)
ffc0af64: 91 69 00 10 stw r11,16(r9)
ffc0af68: 90 09 00 14 stw r0,20(r9)
_Thread_Enable_dispatch();
ffc0af6c: 48 00 25 2d bl ffc0d498 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
ffc0af70: 7f e3 fb 78 mr r3,r31
ffc0af74: 38 80 00 00 li r4,0
ffc0af78: 38 a0 00 00 li r5,0
ffc0af7c: 48 00 9a 25 bl ffc149a0 <rtems_io_initialize>
}
ffc0af80: 80 01 00 14 lwz r0,20(r1)
ffc0af84: 83 e1 00 0c lwz r31,12(r1)
ffc0af88: 38 21 00 10 addi r1,r1,16
ffc0af8c: 7c 08 03 a6 mtlr r0
ffc0af90: 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;
ffc0af94: 3d 60 00 00 lis r11,0
ffc0af98: 1c 1f 00 18 mulli r0,r31,24
ffc0af9c: 81 2b 27 9c lwz r9,10140(r11)
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0afa0: 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;
ffc0afa4: 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;
ffc0afa8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0afac: 41 9e 00 40 beq- cr7,ffc0afec <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();
ffc0afb0: 48 00 24 e9 bl ffc0d498 <_Thread_Enable_dispatch>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
ffc0afb4: 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;
ffc0afb8: 38 60 00 0c li r3,12
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
ffc0afbc: 83 e1 00 0c lwz r31,12(r1)
ffc0afc0: 7c 08 03 a6 mtlr r0
ffc0afc4: 38 21 00 10 addi r1,r1,16
ffc0afc8: 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;
ffc0afcc: 81 64 00 04 lwz r11,4(r4)
ffc0afd0: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0afd4: 40 9e fe e8 bne+ cr7,ffc0aebc <rtems_io_register_driver+0x54>
ffc0afd8: 4b ff ff a8 b ffc0af80 <rtems_io_register_driver+0x118>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
ffc0afdc: 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();
ffc0afe0: 48 00 24 b9 bl ffc0d498 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
ffc0afe4: 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;
ffc0afe8: 4b ff ff 98 b ffc0af80 <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;
ffc0afec: 81 29 00 04 lwz r9,4(r9)
ffc0aff0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0aff4: 40 9e ff bc bne+ cr7,ffc0afb0 <rtems_io_register_driver+0x148>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
ffc0aff8: 93 e5 00 00 stw r31,0(r5)
ffc0affc: 4b ff ff 38 b ffc0af34 <rtems_io_register_driver+0xcc>
ffc0b000: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc0b004: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc0b008: 4b ff ff 04 b ffc0af0c <rtems_io_register_driver+0xa4><== NOT EXECUTED
ffc0c98c <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)
{
ffc0c98c: 94 21 ff e0 stwu r1,-32(r1)
ffc0c990: 7c 08 02 a6 mflr r0
ffc0c994: 90 01 00 24 stw r0,36(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0c998: 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)
{
ffc0c99c: 93 81 00 10 stw r28,16(r1)
ffc0c9a0: 93 a1 00 14 stw r29,20(r1)
ffc0c9a4: 93 c1 00 18 stw r30,24(r1)
ffc0c9a8: 93 e1 00 1c stw r31,28(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0c9ac: 90 01 00 08 stw r0,8(r1)
ffc0c9b0: 41 82 00 74 beq- ffc0ca24 <rtems_iterate_over_all_threads+0x98><== NEVER TAKEN
ffc0c9b4: 3f a0 00 01 lis r29,1
ffc0c9b8: 3b bd a9 80 addi r29,r29,-22144
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
ffc0c9bc: 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 ] )
ffc0c9c0: 85 3d 00 04 lwzu r9,4(r29)
ffc0c9c4: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c9c8: 41 9e 00 54 beq- cr7,ffc0ca1c <rtems_iterate_over_all_threads+0x90>
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
ffc0c9cc: 83 c9 00 04 lwz r30,4(r9)
if ( !information )
ffc0c9d0: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0c9d4: 41 9e 00 48 beq- cr7,ffc0ca1c <rtems_iterate_over_all_threads+0x90>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc0c9d8: a0 1e 00 10 lhz r0,16(r30)
ffc0c9dc: 70 09 ff ff andi. r9,r0,65535
ffc0c9e0: 41 82 00 3c beq- ffc0ca1c <rtems_iterate_over_all_threads+0x90><== NEVER TAKEN
ffc0c9e4: 3b e0 00 01 li r31,1
the_thread = (Thread_Control *)information->local_table[ i ];
ffc0c9e8: 81 7e 00 1c lwz r11,28(r30)
ffc0c9ec: 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++ ) {
ffc0c9f0: 3b ff 00 01 addi r31,r31,1
the_thread = (Thread_Control *)information->local_table[ i ];
ffc0c9f4: 7c 6b 48 2e lwzx r3,r11,r9
if ( !the_thread )
ffc0c9f8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c9fc: 41 9e 00 14 beq- cr7,ffc0ca10 <rtems_iterate_over_all_threads+0x84>
continue;
(*routine)(the_thread);
ffc0ca00: 80 01 00 08 lwz r0,8(r1)
ffc0ca04: 7c 09 03 a6 mtctr r0
ffc0ca08: 4e 80 04 21 bctrl
ffc0ca0c: 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++ ) {
ffc0ca10: 54 09 04 3e clrlwi r9,r0,16
ffc0ca14: 7f 89 f8 40 cmplw cr7,r9,r31
ffc0ca18: 40 9c ff d0 bge+ cr7,ffc0c9e8 <rtems_iterate_over_all_threads+0x5c>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
ffc0ca1c: 7f 9d e0 00 cmpw cr7,r29,r28
ffc0ca20: 40 9e ff a0 bne+ cr7,ffc0c9c0 <rtems_iterate_over_all_threads+0x34>
(*routine)(the_thread);
}
}
}
ffc0ca24: 80 01 00 24 lwz r0,36(r1)
ffc0ca28: 83 81 00 10 lwz r28,16(r1)
ffc0ca2c: 7c 08 03 a6 mtlr r0
ffc0ca30: 83 a1 00 14 lwz r29,20(r1)
ffc0ca34: 83 c1 00 18 lwz r30,24(r1)
ffc0ca38: 83 e1 00 1c lwz r31,28(r1)
ffc0ca3c: 38 21 00 20 addi r1,r1,32
ffc0ca40: 4e 80 00 20 blr
ffc0af54 <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
)
{
ffc0af54: 94 21 ff f0 stwu r1,-16(r1)
ffc0af58: 7c 08 02 a6 mflr r0
ffc0af5c: 93 e1 00 0c stw r31,12(r1)
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
ffc0af60: 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
)
{
ffc0af64: 90 01 00 14 stw r0,20(r1)
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
ffc0af68: 38 00 00 09 li r0,9
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
ffc0af6c: 41 82 00 7c beq- ffc0afe8 <rtems_object_get_class_information+0x94>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
ffc0af70: 54 84 04 3e clrlwi r4,r4,16
ffc0af74: 48 00 24 f5 bl ffc0d468 <_Objects_Get_information>
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
ffc0af78: 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 )
ffc0af7c: 2c 03 00 00 cmpwi r3,0
ffc0af80: 41 82 00 68 beq- ffc0afe8 <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;
ffc0af84: 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;
ffc0af88: 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++ )
ffc0af8c: 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;
ffc0af90: 81 63 00 0c lwz r11,12(r3)
info->auto_extend = obj_info->auto_extend;
ffc0af94: 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;
ffc0af98: 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++ )
ffc0af9c: 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;
ffc0afa0: 91 7f 00 04 stw r11,4(r31)
info->auto_extend = obj_info->auto_extend;
ffc0afa4: 99 3f 00 0c stb r9,12(r31)
info->maximum = obj_info->maximum;
ffc0afa8: 91 1f 00 08 stw r8,8(r31)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
ffc0afac: 41 9e 00 34 beq- cr7,ffc0afe0 <rtems_object_get_class_information+0x8c><== NEVER TAKEN
ffc0afb0: 80 e3 00 1c lwz r7,28(r3)
ffc0afb4: 39 60 00 01 li r11,1
ffc0afb8: 39 20 00 01 li r9,1
ffc0afbc: 39 29 00 01 addi r9,r9,1
ffc0afc0: 7f 88 48 40 cmplw cr7,r8,r9
if ( !obj_info->local_table[i] )
ffc0afc4: 55 6b 10 3a rlwinm r11,r11,2,0,29
ffc0afc8: 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++ )
ffc0afcc: 7d 2b 4b 78 mr r11,r9
if ( !obj_info->local_table[i] )
unallocated++;
ffc0afd0: 20 ca 00 00 subfic r6,r10,0
ffc0afd4: 7c c0 01 94 addze r6,r0
ffc0afd8: 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++ )
ffc0afdc: 40 9c ff e0 bge+ cr7,ffc0afbc <rtems_object_get_class_information+0x68>
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
ffc0afe0: 90 1f 00 10 stw r0,16(r31)
return RTEMS_SUCCESSFUL;
ffc0afe4: 38 00 00 00 li r0,0
}
ffc0afe8: 7c 03 03 78 mr r3,r0
ffc0afec: 80 01 00 14 lwz r0,20(r1)
ffc0aff0: 83 e1 00 0c lwz r31,12(r1)
ffc0aff4: 38 21 00 10 addi r1,r1,16
ffc0aff8: 7c 08 03 a6 mtlr r0
ffc0affc: 4e 80 00 20 blr
ffc18650 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc18650: 94 21 ff d0 stwu r1,-48(r1)
ffc18654: 7c 08 02 a6 mflr r0
ffc18658: 93 e1 00 2c stw r31,44(r1)
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc1865c: 7c 7f 1b 79 mr. r31,r3
return RTEMS_INVALID_NAME;
ffc18660: 38 60 00 03 li r3,3
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc18664: 93 c1 00 28 stw r30,40(r1)
ffc18668: 7c be 2b 78 mr r30,r5
ffc1866c: 90 01 00 34 stw r0,52(r1)
ffc18670: 93 61 00 1c stw r27,28(r1)
ffc18674: 93 81 00 20 stw r28,32(r1)
ffc18678: 93 a1 00 24 stw r29,36(r1)
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc1867c: 41 82 00 48 beq- ffc186c4 <rtems_partition_create+0x74>
return RTEMS_INVALID_NAME;
if ( !starting_address )
ffc18680: 2f 84 00 00 cmpwi cr7,r4,0
return RTEMS_INVALID_ADDRESS;
ffc18684: 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 )
ffc18688: 41 9e 00 3c beq- cr7,ffc186c4 <rtems_partition_create+0x74>
return RTEMS_INVALID_ADDRESS;
if ( !id )
ffc1868c: 2f 88 00 00 cmpwi cr7,r8,0
ffc18690: 41 9e 00 34 beq- cr7,ffc186c4 <rtems_partition_create+0x74><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
ffc18694: 2f 85 00 00 cmpwi cr7,r5,0
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
ffc18698: 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 ||
ffc1869c: 41 9e 00 28 beq- cr7,ffc186c4 <rtems_partition_create+0x74>
ffc186a0: 2f 86 00 00 cmpwi cr7,r6,0
ffc186a4: 41 9e 00 20 beq- cr7,ffc186c4 <rtems_partition_create+0x74>
ffc186a8: 7f 85 30 40 cmplw cr7,r5,r6
ffc186ac: 41 9c 00 18 blt- cr7,ffc186c4 <rtems_partition_create+0x74>
ffc186b0: 70 c0 00 07 andi. r0,r6,7
ffc186b4: 40 82 00 10 bne- ffc186c4 <rtems_partition_create+0x74>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
ffc186b8: 70 9b 00 07 andi. r27,r4,7
return RTEMS_INVALID_ADDRESS;
ffc186bc: 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 ) )
ffc186c0: 41 82 00 28 beq- ffc186e8 <rtems_partition_create+0x98>
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
ffc186c4: 80 01 00 34 lwz r0,52(r1)
ffc186c8: 83 61 00 1c lwz r27,28(r1)
ffc186cc: 7c 08 03 a6 mtlr r0
ffc186d0: 83 81 00 20 lwz r28,32(r1)
ffc186d4: 83 a1 00 24 lwz r29,36(r1)
ffc186d8: 83 c1 00 28 lwz r30,40(r1)
ffc186dc: 83 e1 00 2c lwz r31,44(r1)
ffc186e0: 38 21 00 30 addi r1,r1,48
ffc186e4: 4e 80 00 20 blr
ffc186e8: 3d 20 00 00 lis r9,0
ffc186ec: 81 69 28 40 lwz r11,10304(r9)
ffc186f0: 38 0b 00 01 addi r0,r11,1
ffc186f4: 90 09 28 40 stw r0,10304(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 );
ffc186f8: 3f 80 00 00 lis r28,0
ffc186fc: 90 81 00 08 stw r4,8(r1)
ffc18700: 3b 9c 6e 60 addi r28,r28,28256
ffc18704: 7f 83 e3 78 mr r3,r28
ffc18708: 90 c1 00 0c stw r6,12(r1)
ffc1870c: 90 e1 00 10 stw r7,16(r1)
ffc18710: 91 01 00 14 stw r8,20(r1)
ffc18714: 48 00 5e e5 bl ffc1e5f8 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
ffc18718: 7c 7d 1b 79 mr. r29,r3
ffc1871c: 80 81 00 08 lwz r4,8(r1)
ffc18720: 80 c1 00 0c lwz r6,12(r1)
ffc18724: 80 e1 00 10 lwz r7,16(r1)
ffc18728: 81 01 00 14 lwz r8,20(r1)
ffc1872c: 41 82 00 50 beq- ffc1877c <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,
ffc18730: 7c be 33 96 divwu r5,r30,r6
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
ffc18734: 90 9d 00 10 stw r4,16(r29)
the_partition->length = length;
the_partition->buffer_size = buffer_size;
ffc18738: 90 dd 00 18 stw r6,24(r29)
the_partition->attribute_set = attribute_set;
ffc1873c: 90 fd 00 1c stw r7,28(r29)
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
ffc18740: 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;
ffc18744: 93 7d 00 20 stw r27,32(r29)
_Chain_Initialize( &the_partition->Memory, starting_address,
ffc18748: 91 01 00 14 stw r8,20(r1)
ffc1874c: 38 7d 00 24 addi r3,r29,36
ffc18750: 48 00 41 f5 bl ffc1c944 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc18754: 80 1d 00 08 lwz r0,8(r29)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc18758: 81 7c 00 1c lwz r11,28(r28)
ffc1875c: 54 09 13 ba rlwinm r9,r0,2,14,29
ffc18760: 7f ab 49 2e stwx r29,r11,r9
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc18764: 93 fd 00 0c stw r31,12(r29)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
ffc18768: 81 01 00 14 lwz r8,20(r1)
ffc1876c: 90 08 00 00 stw r0,0(r8)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
ffc18770: 48 00 73 b1 bl ffc1fb20 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc18774: 38 60 00 00 li r3,0
ffc18778: 4b ff ff 4c b ffc186c4 <rtems_partition_create+0x74>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
ffc1877c: 48 00 73 a5 bl ffc1fb20 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
ffc18780: 38 60 00 05 li r3,5
ffc18784: 4b ff ff 40 b ffc186c4 <rtems_partition_create+0x74>
ffc18914 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
ffc18914: 94 21 ff e0 stwu r1,-32(r1)
ffc18918: 7c 08 02 a6 mflr r0
ffc1891c: 90 01 00 24 stw r0,36(r1)
ffc18920: 7c 60 1b 78 mr r0,r3
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
ffc18924: 3c 60 00 00 lis r3,0
ffc18928: 93 e1 00 1c stw r31,28(r1)
ffc1892c: 38 63 6e 60 addi r3,r3,28256
ffc18930: 7c 9f 23 78 mr r31,r4
ffc18934: 38 a1 00 08 addi r5,r1,8
ffc18938: 93 c1 00 18 stw r30,24(r1)
ffc1893c: 7c 04 03 78 mr r4,r0
ffc18940: 48 00 63 1d bl ffc1ec5c <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
ffc18944: 80 01 00 08 lwz r0,8(r1)
ffc18948: 7c 7e 1b 78 mr r30,r3
ffc1894c: 2f 80 00 00 cmpwi cr7,r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc18950: 38 60 00 04 li r3,4
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
ffc18954: 40 9e 00 58 bne- cr7,ffc189ac <rtems_partition_return_buffer+0x98>
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
ffc18958: 80 1e 00 10 lwz r0,16(r30)
ending = _Addresses_Add_offset( starting, the_partition->length );
ffc1895c: 81 3e 00 14 lwz r9,20(r30)
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
ffc18960: 7f 9f 00 40 cmplw cr7,r31,r0
ffc18964: 41 9c 00 60 blt- cr7,ffc189c4 <rtems_partition_return_buffer+0xb0>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
ffc18968: 7d 20 4a 14 add r9,r0,r9
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
ffc1896c: 7f 9f 48 40 cmplw cr7,r31,r9
ffc18970: 41 9d 00 54 bgt- cr7,ffc189c4 <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);
ffc18974: 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);
ffc18978: 7c 00 f8 50 subf r0,r0,r31
ffc1897c: 7d 60 4b 96 divwu r11,r0,r9
ffc18980: 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 ) &&
ffc18984: 7f 80 48 00 cmpw cr7,r0,r9
ffc18988: 40 9e 00 3c bne- cr7,ffc189c4 <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 );
ffc1898c: 38 7e 00 24 addi r3,r30,36
ffc18990: 7f e4 fb 78 mr r4,r31
ffc18994: 48 00 3f 15 bl ffc1c8a8 <_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;
ffc18998: 81 3e 00 20 lwz r9,32(r30)
ffc1899c: 38 09 ff ff addi r0,r9,-1
ffc189a0: 90 1e 00 20 stw r0,32(r30)
_Thread_Enable_dispatch();
ffc189a4: 48 00 71 7d bl ffc1fb20 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc189a8: 38 60 00 00 li r3,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc189ac: 80 01 00 24 lwz r0,36(r1)
ffc189b0: 83 c1 00 18 lwz r30,24(r1)
ffc189b4: 7c 08 03 a6 mtlr r0
ffc189b8: 83 e1 00 1c lwz r31,28(r1)
ffc189bc: 38 21 00 20 addi r1,r1,32
ffc189c0: 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();
ffc189c4: 48 00 71 5d bl ffc1fb20 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc189c8: 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;
ffc189cc: 38 60 00 09 li r3,9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc189d0: 83 c1 00 18 lwz r30,24(r1)
ffc189d4: 7c 08 03 a6 mtlr r0
ffc189d8: 83 e1 00 1c lwz r31,28(r1)
ffc189dc: 38 21 00 20 addi r1,r1,32
ffc189e0: 4e 80 00 20 blr
ffc0a3a4 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
ffc0a3a4: 94 21 ff d0 stwu r1,-48(r1)
ffc0a3a8: 7c 08 02 a6 mflr r0
ffc0a3ac: 93 e1 00 2c stw r31,44(r1)
ffc0a3b0: 7c 7f 1b 78 mr r31,r3
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
ffc0a3b4: 3c 60 00 00 lis r3,0
ffc0a3b8: 93 c1 00 28 stw r30,40(r1)
ffc0a3bc: 38 63 2b a0 addi r3,r3,11168
ffc0a3c0: 7c 9e 23 78 mr r30,r4
ffc0a3c4: 38 a1 00 08 addi r5,r1,8
ffc0a3c8: 90 01 00 34 stw r0,52(r1)
ffc0a3cc: 7f e4 fb 78 mr r4,r31
ffc0a3d0: 93 a1 00 24 stw r29,36(r1)
ffc0a3d4: 93 61 00 1c stw r27,28(r1)
ffc0a3d8: 93 81 00 20 stw r28,32(r1)
ffc0a3dc: 48 00 2d e5 bl ffc0d1c0 <_Objects_Get>
ffc0a3e0: 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 ) {
ffc0a3e4: 80 01 00 08 lwz r0,8(r1)
ffc0a3e8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a3ec: 41 9e 00 30 beq- cr7,ffc0a41c <rtems_rate_monotonic_period+0x78>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0a3f0: 3b e0 00 04 li r31,4
}
ffc0a3f4: 80 01 00 34 lwz r0,52(r1)
ffc0a3f8: 7f e3 fb 78 mr r3,r31
ffc0a3fc: 83 61 00 1c lwz r27,28(r1)
ffc0a400: 7c 08 03 a6 mtlr r0
ffc0a404: 83 81 00 20 lwz r28,32(r1)
ffc0a408: 83 a1 00 24 lwz r29,36(r1)
ffc0a40c: 83 c1 00 28 lwz r30,40(r1)
ffc0a410: 83 e1 00 2c lwz r31,44(r1)
ffc0a414: 38 21 00 30 addi r1,r1,48
ffc0a418: 4e 80 00 20 blr
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc0a41c: 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 ) ) {
ffc0a420: 81 23 00 40 lwz r9,64(r3)
ffc0a424: 3b 9c 2e 58 addi r28,r28,11864
ffc0a428: 80 1c 00 0c lwz r0,12(r28)
ffc0a42c: 7f 89 00 00 cmpw cr7,r9,r0
ffc0a430: 41 9e 00 34 beq- cr7,ffc0a464 <rtems_rate_monotonic_period+0xc0>
_Thread_Enable_dispatch();
ffc0a434: 48 00 3c 51 bl ffc0e084 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0a438: 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;
ffc0a43c: 3b e0 00 17 li r31,23
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0a440: 83 61 00 1c lwz r27,28(r1)
ffc0a444: 7c 08 03 a6 mtlr r0
ffc0a448: 7f e3 fb 78 mr r3,r31
ffc0a44c: 83 81 00 20 lwz r28,32(r1)
ffc0a450: 83 a1 00 24 lwz r29,36(r1)
ffc0a454: 83 c1 00 28 lwz r30,40(r1)
ffc0a458: 83 e1 00 2c lwz r31,44(r1)
ffc0a45c: 38 21 00 30 addi r1,r1,48
ffc0a460: 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 ) {
ffc0a464: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0a468: 40 9e 00 1c bne- cr7,ffc0a484 <rtems_rate_monotonic_period+0xe0>
switch ( the_period->state ) {
ffc0a46c: 80 03 00 38 lwz r0,56(r3)
ffc0a470: 3b e0 00 00 li r31,0
ffc0a474: 2b 80 00 04 cmplwi cr7,r0,4
ffc0a478: 40 9d 00 70 ble- cr7,ffc0a4e8 <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();
ffc0a47c: 48 00 3c 09 bl ffc0e084 <_Thread_Enable_dispatch> <== NOT EXECUTED
return( return_value );
ffc0a480: 4b ff ff 74 b ffc0a3f4 <rtems_rate_monotonic_period+0x50><== NOT EXECUTED
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0a484: 7f 60 00 a6 mfmsr r27
ffc0a488: 7c 10 42 a6 mfsprg r0,0
ffc0a48c: 7f 60 00 78 andc r0,r27,r0
ffc0a490: 7c 00 01 24 mtmsr r0
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
ffc0a494: 80 03 00 38 lwz r0,56(r3)
ffc0a498: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a49c: 41 9e 00 64 beq- cr7,ffc0a500 <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 ) {
ffc0a4a0: 2f 80 00 02 cmpwi cr7,r0,2
ffc0a4a4: 41 9e 00 ac beq- cr7,ffc0a550 <rtems_rate_monotonic_period+0x1ac>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
ffc0a4a8: 2f 80 00 04 cmpwi cr7,r0,4
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0a4ac: 3b e0 00 04 li r31,4
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
ffc0a4b0: 40 9e ff 44 bne+ cr7,ffc0a3f4 <rtems_rate_monotonic_period+0x50><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
ffc0a4b4: 4b ff fd a9 bl ffc0a25c <_Rate_monotonic_Update_statistics>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0a4b8: 7f 60 01 24 mtmsr r27
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc0a4bc: 38 00 00 02 li r0,2
the_period->next_length = length;
ffc0a4c0: 93 dd 00 3c stw r30,60(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a4c4: 3c 60 00 00 lis r3,0
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc0a4c8: 90 1d 00 38 stw r0,56(r29)
ffc0a4cc: 38 63 2d 88 addi r3,r3,11656
ffc0a4d0: 38 9d 00 10 addi r4,r29,16
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc0a4d4: 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;
ffc0a4d8: 3b e0 00 06 li r31,6
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a4dc: 48 00 51 79 bl ffc0f654 <_Watchdog_Insert>
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
ffc0a4e0: 48 00 3b a5 bl ffc0e084 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
ffc0a4e4: 4b ff ff 10 b ffc0a3f4 <rtems_rate_monotonic_period+0x50>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
ffc0a4e8: 3d 20 ff c2 lis r9,-62
ffc0a4ec: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0a4f0: 39 29 0e e4 addi r9,r9,3812
ffc0a4f4: 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();
ffc0a4f8: 48 00 3b 8d bl ffc0e084 <_Thread_Enable_dispatch>
ffc0a4fc: 4b ff fe f8 b ffc0a3f4 <rtems_rate_monotonic_period+0x50>
ffc0a500: 7f 60 01 24 mtmsr r27
_ISR_Enable( level );
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
ffc0a504: 4b ff fc a1 bl ffc0a1a4 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc0a508: 39 20 00 02 li r9,2
ffc0a50c: 91 3d 00 38 stw r9,56(r29)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc0a510: 3d 20 ff c1 lis r9,-63
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0a514: 38 00 00 00 li r0,0
the_watchdog->routine = routine;
ffc0a518: 39 29 a9 b8 addi r9,r9,-22088
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0a51c: 90 1d 00 18 stw r0,24(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a520: 3c 60 00 00 lis r3,0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc0a524: 91 3d 00 2c stw r9,44(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a528: 38 63 2d 88 addi r3,r3,11656
ffc0a52c: 38 9d 00 10 addi r4,r29,16
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
ffc0a530: 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;
ffc0a534: 3b e0 00 00 li r31,0
the_watchdog->user_data = user_data;
ffc0a538: 90 1d 00 34 stw r0,52(r29)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
ffc0a53c: 93 dd 00 3c stw r30,60(r29)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc0a540: 93 dd 00 1c stw r30,28(r29)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a544: 48 00 51 11 bl ffc0f654 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
ffc0a548: 48 00 3b 3d bl ffc0e084 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0a54c: 4b ff fe a8 b ffc0a3f4 <rtems_rate_monotonic_period+0x50>
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
ffc0a550: 4b ff fd 0d bl ffc0a25c <_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;
ffc0a554: 38 00 00 01 li r0,1
ffc0a558: 90 1d 00 38 stw r0,56(r29)
the_period->next_length = length;
ffc0a55c: 93 dd 00 3c stw r30,60(r29)
ffc0a560: 7f 60 01 24 mtmsr r27
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
ffc0a564: 81 3c 00 0c lwz r9,12(r28)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc0a568: 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;
ffc0a56c: 80 1d 00 08 lwz r0,8(r29)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc0a570: 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;
ffc0a574: 90 09 00 20 stw r0,32(r9)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc0a578: 48 00 46 41 bl ffc0ebb8 <_Thread_Set_state>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0a57c: 7d 20 00 a6 mfmsr r9
ffc0a580: 7c 10 42 a6 mfsprg r0,0
ffc0a584: 7d 20 00 78 andc r0,r9,r0
ffc0a588: 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;
ffc0a58c: 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;
ffc0a590: 80 1d 00 38 lwz r0,56(r29)
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc0a594: 91 7d 00 38 stw r11,56(r29)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0a598: 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 )
ffc0a59c: 2f 80 00 03 cmpwi cr7,r0,3
ffc0a5a0: 41 9e 00 10 beq- cr7,ffc0a5b0 <rtems_rate_monotonic_period+0x20c><== NEVER TAKEN
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
ffc0a5a4: 48 00 3a e1 bl ffc0e084 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0a5a8: 3b e0 00 00 li r31,0
ffc0a5ac: 4b ff fe 48 b ffc0a3f4 <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 );
ffc0a5b0: 80 7c 00 0c lwz r3,12(r28) <== NOT EXECUTED
ffc0a5b4: 38 80 40 00 li r4,16384 <== NOT EXECUTED
ffc0a5b8: 48 00 36 15 bl ffc0dbcc <_Thread_Clear_state> <== NOT EXECUTED
ffc0a5bc: 4b ff ff e8 b ffc0a5a4 <rtems_rate_monotonic_period+0x200><== NOT EXECUTED
ffc0a5c0 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc0a5c0: 94 21 ff 58 stwu r1,-168(r1)
ffc0a5c4: 7c 08 02 a6 mflr r0
ffc0a5c8: 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 )
ffc0a5cc: 7c 80 23 79 mr. r0,r4
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc0a5d0: 93 a1 00 9c stw r29,156(r1)
ffc0a5d4: 7c 7d 1b 78 mr r29,r3
ffc0a5d8: 92 41 00 70 stw r18,112(r1)
ffc0a5dc: 92 61 00 74 stw r19,116(r1)
ffc0a5e0: 92 81 00 78 stw r20,120(r1)
ffc0a5e4: 92 a1 00 7c stw r21,124(r1)
ffc0a5e8: 92 c1 00 80 stw r22,128(r1)
ffc0a5ec: 92 e1 00 84 stw r23,132(r1)
ffc0a5f0: 93 01 00 88 stw r24,136(r1)
ffc0a5f4: 93 21 00 8c stw r25,140(r1)
ffc0a5f8: 93 41 00 90 stw r26,144(r1)
ffc0a5fc: 93 61 00 94 stw r27,148(r1)
ffc0a600: 93 81 00 98 stw r28,152(r1)
ffc0a604: 93 c1 00 a0 stw r30,160(r1)
ffc0a608: 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 )
ffc0a60c: 90 01 00 68 stw r0,104(r1)
ffc0a610: 41 82 01 88 beq- ffc0a798 <rtems_rate_monotonic_report_statistics_with_plugin+0x1d8><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
ffc0a614: 3c 80 ff c2 lis r4,-62
ffc0a618: 7c 09 03 a6 mtctr r0
ffc0a61c: 38 84 0e f8 addi r4,r4,3832
/*
* 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 ;
ffc0a620: 3f c0 00 00 lis r30,0
ffc0a624: 3b de 2b a0 addi r30,r30,11168
char name[5];
if ( !print )
return;
(*print)( context, "Period information by period\n" );
ffc0a628: 4c c6 31 82 crclr 4*cr1+eq
ffc0a62c: 4e 80 04 21 bctrl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
ffc0a630: 80 01 00 68 lwz r0,104(r1)
ffc0a634: 3c 80 ff c2 lis r4,-62
ffc0a638: 7c 09 03 a6 mtctr r0
ffc0a63c: 38 84 0f 18 addi r4,r4,3864
ffc0a640: 7f a3 eb 78 mr r3,r29
ffc0a644: 4c c6 31 82 crclr 4*cr1+eq
ffc0a648: 4e 80 04 21 bctrl
(*print)( context, "--- Wall times are in seconds ---\n" );
ffc0a64c: 80 01 00 68 lwz r0,104(r1)
ffc0a650: 3c 80 ff c2 lis r4,-62
ffc0a654: 7c 09 03 a6 mtctr r0
ffc0a658: 38 84 0f 3c addi r4,r4,3900
ffc0a65c: 7f a3 eb 78 mr r3,r29
ffc0a660: 4c c6 31 82 crclr 4*cr1+eq
ffc0a664: 4e 80 04 21 bctrl
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
ffc0a668: 80 01 00 68 lwz r0,104(r1)
ffc0a66c: 3c 80 ff c2 lis r4,-62
ffc0a670: 7c 09 03 a6 mtctr r0
ffc0a674: 38 84 0f 60 addi r4,r4,3936
ffc0a678: 7f a3 eb 78 mr r3,r29
ffc0a67c: 4c c6 31 82 crclr 4*cr1+eq
ffc0a680: 4e 80 04 21 bctrl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
ffc0a684: 80 01 00 68 lwz r0,104(r1)
ffc0a688: 3c 80 ff c2 lis r4,-62
ffc0a68c: 7c 09 03 a6 mtctr r0
ffc0a690: 7f a3 eb 78 mr r3,r29
ffc0a694: 38 84 0f ac addi r4,r4,4012
ffc0a698: 4c c6 31 82 crclr 4*cr1+eq
ffc0a69c: 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 ;
ffc0a6a0: 83 fe 00 08 lwz r31,8(r30)
ffc0a6a4: 80 1e 00 0c lwz r0,12(r30)
ffc0a6a8: 7f 9f 00 40 cmplw cr7,r31,r0
ffc0a6ac: 41 9d 00 ec bgt- cr7,ffc0a798 <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,
ffc0a6b0: 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,
ffc0a6b4: 3e 60 ff c2 lis r19,-62
ffc0a6b8: 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,
ffc0a6bc: 3e 40 ff c2 lis r18,-62
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc0a6c0: 3f 00 ff c2 lis r24,-62
ffc0a6c4: 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 );
ffc0a6c8: 3a a1 00 18 addi r21,r1,24
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
ffc0a6cc: 3b 41 00 08 addi r26,r1,8
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc0a6d0: 3a d6 0f f8 addi r22,r22,4088
{
#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;
ffc0a6d4: 3a e1 00 48 addi r23,r1,72
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
ffc0a6d8: 3b 21 00 10 addi r25,r1,16
(*print)( context,
ffc0a6dc: 3a 73 10 10 addi r19,r19,4112
ffc0a6e0: 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;
ffc0a6e4: 3a 81 00 60 addi r20,r1,96
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
(*print)( context,
ffc0a6e8: 3a 52 10 30 addi r18,r18,4144
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc0a6ec: 3b 18 fc 00 addi r24,r24,-1024
ffc0a6f0: 48 00 00 14 b ffc0a704 <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 ;
ffc0a6f4: 80 1e 00 0c lwz r0,12(r30)
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
ffc0a6f8: 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 ;
ffc0a6fc: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0a700: 41 9c 00 98 blt- cr7,ffc0a798 <rtems_rate_monotonic_report_statistics_with_plugin+0x1d8>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
ffc0a704: 7f e3 fb 78 mr r3,r31
ffc0a708: 7f 84 e3 78 mr r4,r28
ffc0a70c: 48 00 73 6d bl ffc11a78 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
ffc0a710: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a714: 40 9e ff e0 bne+ cr7,ffc0a6f4 <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 );
ffc0a718: 7e a4 ab 78 mr r4,r21
ffc0a71c: 7f e3 fb 78 mr r3,r31
ffc0a720: 48 00 74 69 bl ffc11b88 <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
ffc0a724: 80 61 00 18 lwz r3,24(r1)
ffc0a728: 7f 45 d3 78 mr r5,r26
ffc0a72c: 38 80 00 05 li r4,5
ffc0a730: 48 00 03 51 bl ffc0aa80 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc0a734: 80 01 00 68 lwz r0,104(r1)
ffc0a738: 7e c4 b3 78 mr r4,r22
ffc0a73c: 80 e1 00 30 lwz r7,48(r1)
ffc0a740: 7f e5 fb 78 mr r5,r31
ffc0a744: 7c 09 03 a6 mtctr r0
ffc0a748: 7f a3 eb 78 mr r3,r29
ffc0a74c: 81 01 00 34 lwz r8,52(r1)
ffc0a750: 7f 46 d3 78 mr r6,r26
ffc0a754: 4c c6 31 82 crclr 4*cr1+eq
ffc0a758: 4e 80 04 21 bctrl
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc0a75c: 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 );
ffc0a760: 7e e3 bb 78 mr r3,r23
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc0a764: 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 );
ffc0a768: 7f 25 cb 78 mr r5,r25
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc0a76c: 7f 04 c3 78 mr r4,r24
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc0a770: 40 9e 00 70 bne- cr7,ffc0a7e0 <rtems_rate_monotonic_report_statistics_with_plugin+0x220>
(*print)( context, "\n" );
ffc0a774: 80 01 00 68 lwz r0,104(r1)
ffc0a778: 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++ ) {
ffc0a77c: 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" );
ffc0a780: 7c 09 03 a6 mtctr r0
ffc0a784: 4c c6 31 82 crclr 4*cr1+eq
ffc0a788: 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 ;
ffc0a78c: 80 1e 00 0c lwz r0,12(r30)
ffc0a790: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0a794: 40 9c ff 70 bge+ cr7,ffc0a704 <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
}
}
}
ffc0a798: 80 01 00 ac lwz r0,172(r1)
ffc0a79c: 82 41 00 70 lwz r18,112(r1)
ffc0a7a0: 7c 08 03 a6 mtlr r0
ffc0a7a4: 82 61 00 74 lwz r19,116(r1)
ffc0a7a8: 82 81 00 78 lwz r20,120(r1)
ffc0a7ac: 82 a1 00 7c lwz r21,124(r1)
ffc0a7b0: 82 c1 00 80 lwz r22,128(r1)
ffc0a7b4: 82 e1 00 84 lwz r23,132(r1)
ffc0a7b8: 83 01 00 88 lwz r24,136(r1)
ffc0a7bc: 83 21 00 8c lwz r25,140(r1)
ffc0a7c0: 83 41 00 90 lwz r26,144(r1)
ffc0a7c4: 83 61 00 94 lwz r27,148(r1)
ffc0a7c8: 83 81 00 98 lwz r28,152(r1)
ffc0a7cc: 83 a1 00 9c lwz r29,156(r1)
ffc0a7d0: 83 c1 00 a0 lwz r30,160(r1)
ffc0a7d4: 83 e1 00 a4 lwz r31,164(r1)
ffc0a7d8: 38 21 00 a8 addi r1,r1,168
ffc0a7dc: 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 );
ffc0a7e0: 7c 04 03 78 mr r4,r0
ffc0a7e4: 48 00 48 31 bl ffc0f014 <_Timespec_Divide_by_integer>
(*print)( context,
ffc0a7e8: 80 01 00 14 lwz r0,20(r1)
ffc0a7ec: 80 81 00 3c lwz r4,60(r1)
ffc0a7f0: 7f a3 eb 78 mr r3,r29
ffc0a7f4: 81 61 00 44 lwz r11,68(r1)
ffc0a7f8: 7d 40 d8 96 mulhw r10,r0,r27
ffc0a7fc: 80 e1 00 40 lwz r7,64(r1)
ffc0a800: 7c c4 d8 96 mulhw r6,r4,r27
ffc0a804: 81 21 00 10 lwz r9,16(r1)
ffc0a808: 80 a1 00 38 lwz r5,56(r1)
ffc0a80c: 7d 0b d8 96 mulhw r8,r11,r27
ffc0a810: 7c 00 fe 70 srawi r0,r0,31
ffc0a814: 7d 4a 36 70 srawi r10,r10,6
ffc0a818: 7d 40 50 50 subf r10,r0,r10
ffc0a81c: 80 01 00 68 lwz r0,104(r1)
ffc0a820: 7d 6b fe 70 srawi r11,r11,31
ffc0a824: 7c 84 fe 70 srawi r4,r4,31
ffc0a828: 7c 09 03 a6 mtctr r0
ffc0a82c: 7c c6 36 70 srawi r6,r6,6
ffc0a830: 7d 08 36 70 srawi r8,r8,6
ffc0a834: 7c c4 30 50 subf r6,r4,r6
ffc0a838: 7d 0b 40 50 subf r8,r11,r8
ffc0a83c: 7e 64 9b 78 mr r4,r19
ffc0a840: 4c c6 31 82 crclr 4*cr1+eq
ffc0a844: 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);
ffc0a848: 80 81 00 30 lwz r4,48(r1)
ffc0a84c: 7e 83 a3 78 mr r3,r20
ffc0a850: 7f 25 cb 78 mr r5,r25
ffc0a854: 48 00 47 c1 bl ffc0f014 <_Timespec_Divide_by_integer>
(*print)( context,
ffc0a858: 80 01 00 14 lwz r0,20(r1)
ffc0a85c: 80 c1 00 54 lwz r6,84(r1)
ffc0a860: 7f a3 eb 78 mr r3,r29
ffc0a864: 81 61 00 5c lwz r11,92(r1)
ffc0a868: 7d 40 d8 96 mulhw r10,r0,r27
ffc0a86c: 80 a1 00 50 lwz r5,80(r1)
ffc0a870: 7d 86 d8 96 mulhw r12,r6,r27
ffc0a874: 80 e1 00 58 lwz r7,88(r1)
ffc0a878: 81 21 00 10 lwz r9,16(r1)
ffc0a87c: 7d 0b d8 96 mulhw r8,r11,r27
ffc0a880: 7c 00 fe 70 srawi r0,r0,31
ffc0a884: 7d 4a 36 70 srawi r10,r10,6
ffc0a888: 7d 40 50 50 subf r10,r0,r10
ffc0a88c: 80 01 00 68 lwz r0,104(r1)
ffc0a890: 7d 8c 36 70 srawi r12,r12,6
ffc0a894: 7d 6b fe 70 srawi r11,r11,31
ffc0a898: 7c 09 03 a6 mtctr r0
ffc0a89c: 7c c6 fe 70 srawi r6,r6,31
ffc0a8a0: 7d 08 36 70 srawi r8,r8,6
ffc0a8a4: 7e 44 93 78 mr r4,r18
ffc0a8a8: 7c c6 60 50 subf r6,r6,r12
ffc0a8ac: 7d 0b 40 50 subf r8,r11,r8
ffc0a8b0: 4c c6 31 82 crclr 4*cr1+eq
ffc0a8b4: 4e 80 04 21 bctrl
ffc0a8b8: 4b ff fe 3c b ffc0a6f4 <rtems_rate_monotonic_report_statistics_with_plugin+0x134>
ffc0a8cc <rtems_rate_monotonic_reset_all_statistics>:
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc0a8cc: 3d 20 00 00 lis r9,0
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
ffc0a8d0: 94 21 ff f0 stwu r1,-16(r1)
ffc0a8d4: 7c 08 02 a6 mflr r0
ffc0a8d8: 81 69 27 ac lwz r11,10156(r9)
ffc0a8dc: 90 01 00 14 stw r0,20(r1)
ffc0a8e0: 38 0b 00 01 addi r0,r11,1
ffc0a8e4: 93 c1 00 08 stw r30,8(r1)
ffc0a8e8: 93 e1 00 0c stw r31,12(r1)
ffc0a8ec: 90 09 27 ac stw r0,10156(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 ;
ffc0a8f0: 3f c0 00 00 lis r30,0
ffc0a8f4: 3b de 2b a0 addi r30,r30,11168
ffc0a8f8: 83 fe 00 08 lwz r31,8(r30)
ffc0a8fc: 80 1e 00 0c lwz r0,12(r30)
ffc0a900: 7f 9f 00 40 cmplw cr7,r31,r0
ffc0a904: 41 9d 00 1c bgt- cr7,ffc0a920 <rtems_rate_monotonic_reset_all_statistics+0x54><== NEVER TAKEN
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
ffc0a908: 7f e3 fb 78 mr r3,r31
ffc0a90c: 48 00 00 31 bl ffc0a93c <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 ;
ffc0a910: 80 1e 00 0c lwz r0,12(r30)
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
ffc0a914: 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 ;
ffc0a918: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0a91c: 40 9c ff ec bge+ cr7,ffc0a908 <rtems_rate_monotonic_reset_all_statistics+0x3c>
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
ffc0a920: 48 00 37 65 bl ffc0e084 <_Thread_Enable_dispatch>
}
ffc0a924: 80 01 00 14 lwz r0,20(r1)
ffc0a928: 83 c1 00 08 lwz r30,8(r1)
ffc0a92c: 7c 08 03 a6 mtlr r0
ffc0a930: 83 e1 00 0c lwz r31,12(r1)
ffc0a934: 38 21 00 10 addi r1,r1,16
ffc0a938: 4e 80 00 20 blr
ffc1a370 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc1a370: 94 21 ff e0 stwu r1,-32(r1)
ffc1a374: 7c 08 02 a6 mflr r0
ffc1a378: 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 )
ffc1a37c: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc1a380: 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;
ffc1a384: 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 )
ffc1a388: 40 82 00 1c bne- ffc1a3a4 <rtems_signal_send+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1a38c: 7c 03 03 78 mr r3,r0
ffc1a390: 80 01 00 24 lwz r0,36(r1)
ffc1a394: 83 e1 00 1c lwz r31,28(r1)
ffc1a398: 38 21 00 20 addi r1,r1,32
ffc1a39c: 7c 08 03 a6 mtlr r0
ffc1a3a0: 4e 80 00 20 blr
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
ffc1a3a4: 38 81 00 08 addi r4,r1,8
ffc1a3a8: 48 00 57 99 bl ffc1fb40 <_Thread_Get>
switch ( location ) {
ffc1a3ac: 80 01 00 08 lwz r0,8(r1)
ffc1a3b0: 2f 80 00 00 cmpwi cr7,r0,0
ffc1a3b4: 41 9e 00 20 beq- cr7,ffc1a3d4 <rtems_signal_send+0x64>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc1a3b8: 38 00 00 04 li r0,4
}
ffc1a3bc: 83 e1 00 1c lwz r31,28(r1)
ffc1a3c0: 7c 03 03 78 mr r3,r0
ffc1a3c4: 80 01 00 24 lwz r0,36(r1)
ffc1a3c8: 38 21 00 20 addi r1,r1,32
ffc1a3cc: 7c 08 03 a6 mtlr r0
ffc1a3d0: 4e 80 00 20 blr
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
ffc1a3d4: 81 23 01 2c lwz r9,300(r3)
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
ffc1a3d8: 80 09 00 0c lwz r0,12(r9)
ffc1a3dc: 2f 80 00 00 cmpwi cr7,r0,0
ffc1a3e0: 41 9e 00 9c beq- cr7,ffc1a47c <rtems_signal_send+0x10c>
if ( asr->is_enabled ) {
ffc1a3e4: 88 09 00 08 lbz r0,8(r9)
ffc1a3e8: 2f 80 00 00 cmpwi cr7,r0,0
ffc1a3ec: 41 9e 00 50 beq- cr7,ffc1a43c <rtems_signal_send+0xcc>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc1a3f0: 7c 00 00 a6 mfmsr r0
ffc1a3f4: 7d 70 42 a6 mfsprg r11,0
ffc1a3f8: 7c 0b 58 78 andc r11,r0,r11
ffc1a3fc: 7d 60 01 24 mtmsr r11
)
{
ISR_Level _level;
_ISR_Disable( _level );
*signal_set |= signals;
ffc1a400: 81 69 00 14 lwz r11,20(r9)
ffc1a404: 7d 7f fb 78 or r31,r11,r31
ffc1a408: 93 e9 00 14 stw r31,20(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc1a40c: 7c 00 01 24 mtmsr r0
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
ffc1a410: 3d 20 00 00 lis r9,0
ffc1a414: 39 29 71 98 addi r9,r9,29080
ffc1a418: 80 09 00 08 lwz r0,8(r9)
ffc1a41c: 2f 80 00 00 cmpwi cr7,r0,0
ffc1a420: 41 9e 00 3c beq- cr7,ffc1a45c <rtems_signal_send+0xec>
ffc1a424: 80 09 00 0c lwz r0,12(r9)
ffc1a428: 7f 83 00 00 cmpw cr7,r3,r0
ffc1a42c: 40 be 00 30 bne+ cr7,ffc1a45c <rtems_signal_send+0xec> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
ffc1a430: 38 00 00 01 li r0,1
ffc1a434: 98 09 00 18 stb r0,24(r9)
ffc1a438: 48 00 00 24 b ffc1a45c <rtems_signal_send+0xec>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc1a43c: 7c 00 00 a6 mfmsr r0
ffc1a440: 7d 70 42 a6 mfsprg r11,0
ffc1a444: 7c 0b 58 78 andc r11,r0,r11
ffc1a448: 7d 60 01 24 mtmsr r11
ffc1a44c: 81 69 00 18 lwz r11,24(r9)
ffc1a450: 7d 7f fb 78 or r31,r11,r31
ffc1a454: 93 e9 00 18 stw r31,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc1a458: 7c 00 01 24 mtmsr r0
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
ffc1a45c: 48 00 56 c5 bl ffc1fb20 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc1a460: 38 00 00 00 li r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1a464: 7c 03 03 78 mr r3,r0
ffc1a468: 80 01 00 24 lwz r0,36(r1)
ffc1a46c: 83 e1 00 1c lwz r31,28(r1)
ffc1a470: 38 21 00 20 addi r1,r1,32
ffc1a474: 7c 08 03 a6 mtlr r0
ffc1a478: 4e 80 00 20 blr
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
ffc1a47c: 48 00 56 a5 bl ffc1fb20 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
ffc1a480: 38 00 00 0b li r0,11
ffc1a484: 4b ff ff 08 b ffc1a38c <rtems_signal_send+0x1c>
ffc11d8c <rtems_task_mode>:
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
ffc11d8c: 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
)
{
ffc11d90: 7c 08 02 a6 mflr r0
ffc11d94: 94 21 ff f8 stwu r1,-8(r1)
ffc11d98: 90 01 00 0c stw r0,12(r1)
ffc11d9c: 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;
ffc11da0: 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 )
ffc11da4: 41 82 01 34 beq- ffc11ed8 <rtems_task_mode+0x14c>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
ffc11da8: 3c c0 00 00 lis r6,0
ffc11dac: 38 c6 2d 38 addi r6,r6,11576
ffc11db0: 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 )
ffc11db4: 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;
ffc11db8: 89 09 00 74 lbz r8,116(r9)
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc11dbc: 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 ];
ffc11dc0: 81 69 01 2c lwz r11,300(r9)
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
ffc11dc4: 7d 08 00 34 cntlzw r8,r8
ffc11dc8: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc11dcc: 55 07 40 2e rlwinm r7,r8,8,0,23
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc11dd0: 40 9e 01 18 bne- cr7,ffc11ee8 <rtems_task_mode+0x15c>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
ffc11dd4: 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);
ffc11dd8: 39 40 00 00 li r10,0
ffc11ddc: 7d 08 00 34 cntlzw r8,r8
ffc11de0: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc11de4: 55 08 50 2a rlwinm r8,r8,10,0,21
ffc11de8: 7d 07 3b 78 or r7,r8,r7
ffc11dec: 7d 40 00 a6 mfmsr r10
if (msr & MSR_EE) return 0;
ffc11df0: 55 48 8f fe rlwinm r8,r10,17,31,31
ffc11df4: 2f 88 00 00 cmpwi cr7,r8,0
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc11df8: 70 8a 01 00 andi. r10,r4,256
ffc11dfc: 7d 40 00 26 mfcr r10
ffc11e00: 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();
ffc11e04: 7c e7 53 78 or r7,r7,r10
*previous_mode_set = old_mode;
ffc11e08: 90 e5 00 00 stw r7,0(r5)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc11e0c: 41 82 00 14 beq- ffc11e20 <rtems_task_mode+0x94>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
ffc11e10: 70 08 01 00 andi. r8,r0,256
ffc11e14: 7d 40 00 26 mfcr r10
ffc11e18: 55 4a 1f fe rlwinm r10,r10,3,31,31
ffc11e1c: 99 49 00 74 stb r10,116(r9)
if ( mask & RTEMS_TIMESLICE_MASK ) {
ffc11e20: 70 8a 02 00 andi. r10,r4,512
ffc11e24: 41 82 00 20 beq- ffc11e44 <rtems_task_mode+0xb8>
if ( _Modes_Is_timeslice(mode_set) ) {
ffc11e28: 70 0a 02 00 andi. r10,r0,512
ffc11e2c: 41 82 01 54 beq- ffc11f80 <rtems_task_mode+0x1f4>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc11e30: 3d 40 00 00 lis r10,0
ffc11e34: 81 4a 27 24 lwz r10,10020(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;
ffc11e38: 39 00 00 01 li r8,1
ffc11e3c: 91 09 00 7c stw r8,124(r9)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc11e40: 91 49 00 78 stw r10,120(r9)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
ffc11e44: 70 88 00 01 andi. r8,r4,1
ffc11e48: 41 82 00 20 beq- ffc11e68 <rtems_task_mode+0xdc>
}
static inline void _CPU_ISR_Set_level( uint32_t level )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc11e4c: 39 20 00 00 li r9,0
ffc11e50: 7d 20 00 a6 mfmsr r9
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc11e54: 70 0a 00 01 andi. r10,r0,1
ffc11e58: 40 82 01 18 bne- ffc11f70 <rtems_task_mode+0x1e4>
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
asm volatile (
ffc11e5c: 7d 50 42 a6 mfsprg r10,0
msr |= ppc_interrupt_get_disable_mask();
ffc11e60: 7d 49 4b 78 or r9,r10,r9
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
}
_CPU_MSR_SET(msr);
ffc11e64: 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 ) {
ffc11e68: 70 88 04 00 andi. r8,r4,1024
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
ffc11e6c: 39 40 00 00 li r10,0
if ( mask & RTEMS_ASR_MASK ) {
ffc11e70: 41 82 00 54 beq- ffc11ec4 <rtems_task_mode+0x138>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
ffc11e74: 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 ) {
ffc11e78: 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(
ffc11e7c: 7c 00 00 26 mfcr r0
ffc11e80: 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 ) {
ffc11e84: 7f 89 00 00 cmpw cr7,r9,r0
ffc11e88: 41 9e 00 3c beq- cr7,ffc11ec4 <rtems_task_mode+0x138>
asr->is_enabled = is_asr_enabled;
ffc11e8c: 98 0b 00 08 stb r0,8(r11)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc11e90: 7c 00 00 a6 mfmsr r0
ffc11e94: 7d 30 42 a6 mfsprg r9,0
ffc11e98: 7c 09 48 78 andc r9,r0,r9
ffc11e9c: 7d 20 01 24 mtmsr r9
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
ffc11ea0: 81 4b 00 18 lwz r10,24(r11)
information->signals_pending = information->signals_posted;
ffc11ea4: 81 2b 00 14 lwz r9,20(r11)
information->signals_posted = _signals;
ffc11ea8: 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;
ffc11eac: 91 2b 00 18 stw r9,24(r11)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc11eb0: 7c 00 01 24 mtmsr r0
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
ffc11eb4: 80 0b 00 14 lwz r0,20(r11)
needs_asr_dispatching = true;
ffc11eb8: 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 ) ) {
ffc11ebc: 2f 80 00 00 cmpwi cr7,r0,0
ffc11ec0: 41 9e 00 d0 beq- cr7,ffc11f90 <rtems_task_mode+0x204>
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
ffc11ec4: 3d 20 00 00 lis r9,0
ffc11ec8: 80 09 27 6c lwz r0,10092(r9)
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
ffc11ecc: 38 60 00 00 li r3,0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
ffc11ed0: 2f 80 00 03 cmpwi cr7,r0,3
ffc11ed4: 41 9e 00 58 beq- cr7,ffc11f2c <rtems_task_mode+0x1a0> <== ALWAYS TAKEN
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
ffc11ed8: 80 01 00 0c lwz r0,12(r1)
ffc11edc: 38 21 00 08 addi r1,r1,8
ffc11ee0: 7c 08 03 a6 mtlr r0
ffc11ee4: 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;
ffc11ee8: 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;
ffc11eec: 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);
ffc11ef0: 39 40 00 00 li r10,0
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
ffc11ef4: 7d 08 00 34 cntlzw r8,r8
ffc11ef8: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc11efc: 55 08 50 2a rlwinm r8,r8,10,0,21
ffc11f00: 7d 07 3b 78 or r7,r8,r7
ffc11f04: 7d 40 00 a6 mfmsr r10
if (msr & MSR_EE) return 0;
ffc11f08: 55 48 8f fe rlwinm r8,r10,17,31,31
ffc11f0c: 2f 88 00 00 cmpwi cr7,r8,0
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc11f10: 70 8a 01 00 andi. r10,r4,256
ffc11f14: 7d 40 00 26 mfcr r10
ffc11f18: 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();
ffc11f1c: 7c e7 53 78 or r7,r7,r10
*previous_mode_set = old_mode;
ffc11f20: 90 e5 00 00 stw r7,0(r5)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc11f24: 41 a2 fe fc beq- ffc11e20 <rtems_task_mode+0x94>
ffc11f28: 4b ff fe e8 b ffc11e10 <rtems_task_mode+0x84>
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( are_signals_pending ||
ffc11f2c: 2f 8a 00 00 cmpwi cr7,r10,0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
ffc11f30: 81 26 00 0c lwz r9,12(r6)
if ( are_signals_pending ||
ffc11f34: 40 9e 00 1c bne- cr7,ffc11f50 <rtems_task_mode+0x1c4>
ffc11f38: 80 06 00 10 lwz r0,16(r6)
ffc11f3c: 7f 89 00 00 cmpw cr7,r9,r0
ffc11f40: 41 be ff 98 beq- cr7,ffc11ed8 <rtems_task_mode+0x14c>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
ffc11f44: 88 09 00 74 lbz r0,116(r9)
ffc11f48: 2f 80 00 00 cmpwi cr7,r0,0
ffc11f4c: 41 be ff 8c beq- cr7,ffc11ed8 <rtems_task_mode+0x14c> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
ffc11f50: 38 00 00 01 li r0,1
ffc11f54: 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();
ffc11f58: 4b ff 9c 1d bl ffc0bb74 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
}
ffc11f5c: 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;
ffc11f60: 38 60 00 00 li r3,0
}
ffc11f64: 7c 08 03 a6 mtlr r0
ffc11f68: 38 21 00 08 addi r1,r1,8
ffc11f6c: 4e 80 00 20 blr
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
asm volatile (
ffc11f70: 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();
ffc11f74: 7d 29 50 78 andc r9,r9,r10
}
_CPU_MSR_SET(msr);
ffc11f78: 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 ) );
ffc11f7c: 4b ff fe ec b ffc11e68 <rtems_task_mode+0xdc>
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
ffc11f80: 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;
ffc11f84: 91 49 00 7c stw r10,124(r9)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
ffc11f88: 41 a2 fe e0 beq- ffc11e68 <rtems_task_mode+0xdc>
ffc11f8c: 4b ff fe c0 b ffc11e4c <rtems_task_mode+0xc0>
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
ffc11f90: 39 40 00 00 li r10,0
ffc11f94: 4b ff ff 30 b ffc11ec4 <rtems_task_mode+0x138>
ffc0eb24 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0eb24: 7d 80 00 26 mfcr r12
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0eb28: 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
)
{
ffc0eb2c: 94 21 ff d8 stwu r1,-40(r1)
ffc0eb30: 7c 08 02 a6 mflr r0
ffc0eb34: 93 c1 00 20 stw r30,32(r1)
ffc0eb38: 7c be 2b 78 mr r30,r5
ffc0eb3c: 93 e1 00 24 stw r31,36(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0eb40: 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
)
{
ffc0eb44: 90 01 00 2c stw r0,44(r1)
ffc0eb48: 91 81 00 1c stw r12,28(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0eb4c: 41 92 00 18 beq- cr4,ffc0eb64 <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 ) );
ffc0eb50: 3d 20 00 00 lis r9,0
ffc0eb54: 89 29 26 ac lbz r9,9900(r9)
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
ffc0eb58: 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 ) &&
ffc0eb5c: 7f 84 48 40 cmplw cr7,r4,r9
ffc0eb60: 41 9d 00 60 bgt- cr7,ffc0ebc0 <rtems_task_set_priority+0x9c>
if ( !old_priority )
ffc0eb64: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
ffc0eb68: 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 )
ffc0eb6c: 41 9e 00 54 beq- cr7,ffc0ebc0 <rtems_task_set_priority+0x9c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
ffc0eb70: 38 81 00 08 addi r4,r1,8
ffc0eb74: 48 00 2c 09 bl ffc1177c <_Thread_Get>
switch ( location ) {
ffc0eb78: 80 01 00 08 lwz r0,8(r1)
ffc0eb7c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0eb80: 40 9e 00 64 bne- cr7,ffc0ebe4 <rtems_task_set_priority+0xc0>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
ffc0eb84: 80 03 00 14 lwz r0,20(r3)
ffc0eb88: 90 1e 00 00 stw r0,0(r30)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
ffc0eb8c: 41 92 00 2c beq- cr4,ffc0ebb8 <rtems_task_set_priority+0x94>
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
ffc0eb90: 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;
ffc0eb94: 93 e3 00 18 stw r31,24(r3)
if ( the_thread->resource_count == 0 ||
ffc0eb98: 2f 80 00 00 cmpwi cr7,r0,0
ffc0eb9c: 41 9e 00 10 beq- cr7,ffc0ebac <rtems_task_set_priority+0x88>
ffc0eba0: 80 03 00 14 lwz r0,20(r3)
ffc0eba4: 7f 9f 00 40 cmplw cr7,r31,r0
ffc0eba8: 40 9c 00 10 bge- cr7,ffc0ebb8 <rtems_task_set_priority+0x94><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
ffc0ebac: 7f e4 fb 78 mr r4,r31
ffc0ebb0: 38 a0 00 00 li r5,0
ffc0ebb4: 48 00 24 ed bl ffc110a0 <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
ffc0ebb8: 48 00 2b a5 bl ffc1175c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0ebbc: 38 00 00 00 li r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0ebc0: 7c 03 03 78 mr r3,r0
ffc0ebc4: 80 01 00 2c lwz r0,44(r1)
ffc0ebc8: 81 81 00 1c lwz r12,28(r1)
ffc0ebcc: 7c 08 03 a6 mtlr r0
ffc0ebd0: 83 c1 00 20 lwz r30,32(r1)
ffc0ebd4: 83 e1 00 24 lwz r31,36(r1)
ffc0ebd8: 7d 80 81 20 mtcrf 8,r12
ffc0ebdc: 38 21 00 28 addi r1,r1,40
ffc0ebe0: 4e 80 00 20 blr
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0ebe4: 38 00 00 04 li r0,4
}
ffc0ebe8: 81 81 00 1c lwz r12,28(r1)
ffc0ebec: 7c 03 03 78 mr r3,r0
ffc0ebf0: 80 01 00 2c lwz r0,44(r1)
ffc0ebf4: 83 c1 00 20 lwz r30,32(r1)
ffc0ebf8: 7d 80 81 20 mtcrf 8,r12
ffc0ebfc: 7c 08 03 a6 mtlr r0
ffc0ec00: 83 e1 00 24 lwz r31,36(r1)
ffc0ec04: 38 21 00 28 addi r1,r1,40
ffc0ec08: 4e 80 00 20 blr
ffc0a820 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
ffc0a820: 94 21 ff e0 stwu r1,-32(r1)
ffc0a824: 7c 08 02 a6 mflr r0
ffc0a828: 93 e1 00 1c stw r31,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
ffc0a82c: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
ffc0a830: 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;
ffc0a834: 38 00 00 09 li r0,9
{
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
ffc0a838: 41 82 00 58 beq- ffc0a890 <rtems_task_variable_delete+0x70>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
ffc0a83c: 38 81 00 08 addi r4,r1,8
ffc0a840: 48 00 29 a1 bl ffc0d1e0 <_Thread_Get>
switch (location) {
ffc0a844: 80 01 00 08 lwz r0,8(r1)
ffc0a848: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a84c: 40 9e 00 5c bne- cr7,ffc0a8a8 <rtems_task_variable_delete+0x88>
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
ffc0a850: 81 23 01 38 lwz r9,312(r3)
while (tvp) {
ffc0a854: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a858: 41 9e 00 30 beq- cr7,ffc0a888 <rtems_task_variable_delete+0x68>
if (tvp->ptr == ptr) {
ffc0a85c: 80 09 00 04 lwz r0,4(r9)
ffc0a860: 7f 80 f8 00 cmpw cr7,r0,r31
ffc0a864: 40 be 00 18 bne+ cr7,ffc0a87c <rtems_task_variable_delete+0x5c>
ffc0a868: 48 00 00 88 b ffc0a8f0 <rtems_task_variable_delete+0xd0>
ffc0a86c: 80 04 00 04 lwz r0,4(r4)
ffc0a870: 7f 80 f8 00 cmpw cr7,r0,r31
ffc0a874: 41 9e 00 50 beq- cr7,ffc0a8c4 <rtems_task_variable_delete+0xa4>
ffc0a878: 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;
ffc0a87c: 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) {
ffc0a880: 2f 84 00 00 cmpwi cr7,r4,0
ffc0a884: 40 9e ff e8 bne+ cr7,ffc0a86c <rtems_task_variable_delete+0x4c><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
ffc0a888: 48 00 29 39 bl ffc0d1c0 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
ffc0a88c: 38 00 00 09 li r0,9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0a890: 7c 03 03 78 mr r3,r0
ffc0a894: 80 01 00 24 lwz r0,36(r1)
ffc0a898: 83 e1 00 1c lwz r31,28(r1)
ffc0a89c: 38 21 00 20 addi r1,r1,32
ffc0a8a0: 7c 08 03 a6 mtlr r0
ffc0a8a4: 4e 80 00 20 blr
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0a8a8: 38 00 00 04 li r0,4
}
ffc0a8ac: 83 e1 00 1c lwz r31,28(r1)
ffc0a8b0: 7c 03 03 78 mr r3,r0
ffc0a8b4: 80 01 00 24 lwz r0,36(r1)
ffc0a8b8: 38 21 00 20 addi r1,r1,32
ffc0a8bc: 7c 08 03 a6 mtlr r0
ffc0a8c0: 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;
ffc0a8c4: 80 04 00 00 lwz r0,0(r4)
ffc0a8c8: 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 );
ffc0a8cc: 48 00 01 0d bl ffc0a9d8 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
ffc0a8d0: 48 00 28 f1 bl ffc0d1c0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0a8d4: 38 00 00 00 li r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0a8d8: 7c 03 03 78 mr r3,r0
ffc0a8dc: 80 01 00 24 lwz r0,36(r1)
ffc0a8e0: 83 e1 00 1c lwz r31,28(r1)
ffc0a8e4: 38 21 00 20 addi r1,r1,32
ffc0a8e8: 7c 08 03 a6 mtlr r0
ffc0a8ec: 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;
ffc0a8f0: 80 09 00 00 lwz r0,0(r9)
ffc0a8f4: 7d 24 4b 78 mr r4,r9
ffc0a8f8: 90 03 01 38 stw r0,312(r3)
ffc0a8fc: 4b ff ff d0 b ffc0a8cc <rtems_task_variable_delete+0xac>
ffc0a900 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
ffc0a900: 94 21 ff e0 stwu r1,-32(r1)
ffc0a904: 7c 08 02 a6 mflr r0
ffc0a908: 93 e1 00 1c stw r31,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
ffc0a90c: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
ffc0a910: 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;
ffc0a914: 38 00 00 09 li r0,9
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
ffc0a918: 93 c1 00 18 stw r30,24(r1)
ffc0a91c: 7c be 2b 78 mr r30,r5
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
ffc0a920: 41 82 00 58 beq- ffc0a978 <rtems_task_variable_get+0x78>
return RTEMS_INVALID_ADDRESS;
if ( !result )
ffc0a924: 2f 85 00 00 cmpwi cr7,r5,0
ffc0a928: 41 9e 00 50 beq- cr7,ffc0a978 <rtems_task_variable_get+0x78>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
ffc0a92c: 38 81 00 08 addi r4,r1,8
ffc0a930: 48 00 28 b1 bl ffc0d1e0 <_Thread_Get>
switch (location) {
ffc0a934: 80 01 00 08 lwz r0,8(r1)
ffc0a938: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a93c: 40 9e 00 58 bne- cr7,ffc0a994 <rtems_task_variable_get+0x94>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
ffc0a940: 81 23 01 38 lwz r9,312(r3)
while (tvp) {
ffc0a944: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a948: 40 be 00 14 bne+ cr7,ffc0a95c <rtems_task_variable_get+0x5c>
ffc0a94c: 48 00 00 68 b ffc0a9b4 <rtems_task_variable_get+0xb4>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
ffc0a950: 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) {
ffc0a954: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a958: 41 9e 00 5c beq- cr7,ffc0a9b4 <rtems_task_variable_get+0xb4><== NEVER TAKEN
if (tvp->ptr == ptr) {
ffc0a95c: 80 09 00 04 lwz r0,4(r9)
ffc0a960: 7f 80 f8 00 cmpw cr7,r0,r31
ffc0a964: 40 9e ff ec bne+ cr7,ffc0a950 <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;
ffc0a968: 80 09 00 0c lwz r0,12(r9)
ffc0a96c: 90 1e 00 00 stw r0,0(r30)
_Thread_Enable_dispatch();
ffc0a970: 48 00 28 51 bl ffc0d1c0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0a974: 38 00 00 00 li r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0a978: 7c 03 03 78 mr r3,r0
ffc0a97c: 80 01 00 24 lwz r0,36(r1)
ffc0a980: 83 c1 00 18 lwz r30,24(r1)
ffc0a984: 7c 08 03 a6 mtlr r0
ffc0a988: 83 e1 00 1c lwz r31,28(r1)
ffc0a98c: 38 21 00 20 addi r1,r1,32
ffc0a990: 4e 80 00 20 blr
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0a994: 38 00 00 04 li r0,4
}
ffc0a998: 83 c1 00 18 lwz r30,24(r1)
ffc0a99c: 7c 03 03 78 mr r3,r0
ffc0a9a0: 80 01 00 24 lwz r0,36(r1)
ffc0a9a4: 83 e1 00 1c lwz r31,28(r1)
ffc0a9a8: 38 21 00 20 addi r1,r1,32
ffc0a9ac: 7c 08 03 a6 mtlr r0
ffc0a9b0: 4e 80 00 20 blr
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
ffc0a9b4: 48 00 28 0d bl ffc0d1c0 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
ffc0a9b8: 38 00 00 09 li r0,9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0a9bc: 7c 03 03 78 mr r3,r0
ffc0a9c0: 80 01 00 24 lwz r0,36(r1)
ffc0a9c4: 83 c1 00 18 lwz r30,24(r1)
ffc0a9c8: 7c 08 03 a6 mtlr r0
ffc0a9cc: 83 e1 00 1c lwz r31,28(r1)
ffc0a9d0: 38 21 00 20 addi r1,r1,32
ffc0a9d4: 4e 80 00 20 blr
ffc1b17c <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
ffc1b17c: 94 21 ff e8 stwu r1,-24(r1)
ffc1b180: 7c 08 02 a6 mflr r0
ffc1b184: 7c 64 1b 78 mr r4,r3
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
ffc1b188: 3c 60 00 00 lis r3,0
ffc1b18c: 90 01 00 1c stw r0,28(r1)
ffc1b190: 38 63 72 40 addi r3,r3,29248
ffc1b194: 38 a1 00 08 addi r5,r1,8
ffc1b198: 48 00 3a c5 bl ffc1ec5c <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc1b19c: 80 01 00 08 lwz r0,8(r1)
ffc1b1a0: 2f 80 00 00 cmpwi cr7,r0,0
ffc1b1a4: 41 9e 00 18 beq- cr7,ffc1b1bc <rtems_timer_cancel+0x40>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1b1a8: 80 01 00 1c lwz r0,28(r1)
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc1b1ac: 38 60 00 04 li r3,4
}
ffc1b1b0: 38 21 00 18 addi r1,r1,24
ffc1b1b4: 7c 08 03 a6 mtlr r0
ffc1b1b8: 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 ) )
ffc1b1bc: 80 03 00 38 lwz r0,56(r3)
ffc1b1c0: 2f 80 00 04 cmpwi cr7,r0,4
ffc1b1c4: 41 9e 00 0c beq- cr7,ffc1b1d0 <rtems_timer_cancel+0x54> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc1b1c8: 38 63 00 10 addi r3,r3,16
ffc1b1cc: 48 00 63 d5 bl ffc215a0 <_Watchdog_Remove>
_Thread_Enable_dispatch();
ffc1b1d0: 48 00 49 51 bl ffc1fb20 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1b1d4: 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;
ffc1b1d8: 38 60 00 00 li r3,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1b1dc: 7c 08 03 a6 mtlr r0
ffc1b1e0: 38 21 00 18 addi r1,r1,24
ffc1b1e4: 4e 80 00 20 blr
ffc1b848 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc1b848: 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;
ffc1b84c: 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
)
{
ffc1b850: 7c 08 02 a6 mflr r0
ffc1b854: 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;
ffc1b858: 83 e9 28 9c lwz r31,10396(r9)
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc1b85c: 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;
ffc1b860: 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 )
ffc1b864: 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
)
{
ffc1b868: 93 61 00 24 stw r27,36(r1)
ffc1b86c: 7c db 33 78 mr r27,r6
ffc1b870: 93 81 00 28 stw r28,40(r1)
ffc1b874: 7c 9c 23 78 mr r28,r4
ffc1b878: 93 a1 00 2c stw r29,44(r1)
ffc1b87c: 7c 7d 1b 78 mr r29,r3
ffc1b880: 93 c1 00 30 stw r30,48(r1)
ffc1b884: 7c be 2b 78 mr r30,r5
ffc1b888: 90 01 00 3c stw r0,60(r1)
ffc1b88c: 93 01 00 18 stw r24,24(r1)
ffc1b890: 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 )
ffc1b894: 41 9e 00 38 beq- cr7,ffc1b8cc <rtems_timer_server_fire_when+0x84>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
ffc1b898: 3d 20 00 00 lis r9,0
ffc1b89c: 88 09 28 44 lbz r0,10308(r9)
return RTEMS_NOT_DEFINED;
ffc1b8a0: 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 )
ffc1b8a4: 2f 80 00 00 cmpwi cr7,r0,0
ffc1b8a8: 41 9e 00 24 beq- cr7,ffc1b8cc <rtems_timer_server_fire_when+0x84><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
ffc1b8ac: 2f 85 00 00 cmpwi cr7,r5,0
return RTEMS_INVALID_ADDRESS;
ffc1b8b0: 3b 20 00 09 li r25,9
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
ffc1b8b4: 41 9e 00 18 beq- cr7,ffc1b8cc <rtems_timer_server_fire_when+0x84>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
ffc1b8b8: 7c 83 23 78 mr r3,r4
ffc1b8bc: 4b ff bf 59 bl ffc17814 <_TOD_Validate>
return RTEMS_INVALID_CLOCK;
ffc1b8c0: 3b 20 00 14 li r25,20
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
ffc1b8c4: 2f 83 00 00 cmpwi cr7,r3,0
ffc1b8c8: 40 9e 00 38 bne- cr7,ffc1b900 <rtems_timer_server_fire_when+0xb8>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1b8cc: 80 01 00 3c lwz r0,60(r1)
ffc1b8d0: 7f 23 cb 78 mr r3,r25
ffc1b8d4: 83 01 00 18 lwz r24,24(r1)
ffc1b8d8: 7c 08 03 a6 mtlr r0
ffc1b8dc: 83 21 00 1c lwz r25,28(r1)
ffc1b8e0: 83 41 00 20 lwz r26,32(r1)
ffc1b8e4: 83 61 00 24 lwz r27,36(r1)
ffc1b8e8: 83 81 00 28 lwz r28,40(r1)
ffc1b8ec: 83 a1 00 2c lwz r29,44(r1)
ffc1b8f0: 83 c1 00 30 lwz r30,48(r1)
ffc1b8f4: 83 e1 00 34 lwz r31,52(r1)
ffc1b8f8: 38 21 00 38 addi r1,r1,56
ffc1b8fc: 4e 80 00 20 blr
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc1b900: 7f 83 e3 78 mr r3,r28
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc1b904: 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 );
ffc1b908: 4b ff be 69 bl ffc17770 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc1b90c: 80 1a 28 58 lwz r0,10328(r26)
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc1b910: 7c 7c 1b 78 mr r28,r3
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc1b914: 7f 83 00 40 cmplw cr7,r3,r0
ffc1b918: 40 bd ff b4 ble- cr7,ffc1b8cc <rtems_timer_server_fire_when+0x84>
ffc1b91c: 3c 60 00 00 lis r3,0
ffc1b920: 38 63 72 40 addi r3,r3,29248
ffc1b924: 7f a4 eb 78 mr r4,r29
ffc1b928: 38 a1 00 08 addi r5,r1,8
ffc1b92c: 48 00 33 31 bl ffc1ec5c <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc1b930: 83 01 00 08 lwz r24,8(r1)
ffc1b934: 7c 79 1b 78 mr r25,r3
ffc1b938: 2f 98 00 00 cmpwi cr7,r24,0
ffc1b93c: 40 9e 00 50 bne- cr7,ffc1b98c <rtems_timer_server_fire_when+0x144>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc1b940: 38 63 00 10 addi r3,r3,16
ffc1b944: 48 00 5c 5d bl ffc215a0 <_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();
ffc1b948: 80 1a 28 58 lwz r0,10328(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;
ffc1b94c: 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();
ffc1b950: 7f 80 e0 50 subf r28,r0,r28
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc1b954: 80 1f 00 04 lwz r0,4(r31)
ffc1b958: 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;
ffc1b95c: 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 );
ffc1b960: 7f e3 fb 78 mr r3,r31
ffc1b964: 7c 09 03 a6 mtctr r0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc1b968: 93 19 00 18 stw r24,24(r25)
the_watchdog->routine = routine;
ffc1b96c: 93 d9 00 2c stw r30,44(r25)
the_watchdog->id = id;
ffc1b970: 93 b9 00 30 stw r29,48(r25)
the_watchdog->user_data = user_data;
ffc1b974: 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();
ffc1b978: 93 99 00 1c stw r28,28(r25)
(*timer_server->schedule_operation)( timer_server, the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
ffc1b97c: 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 );
ffc1b980: 4e 80 04 21 bctrl
_Thread_Enable_dispatch();
ffc1b984: 48 00 41 9d bl ffc1fb20 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc1b988: 4b ff ff 44 b ffc1b8cc <rtems_timer_server_fire_when+0x84>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc1b98c: 3b 20 00 04 li r25,4
ffc1b990: 4b ff ff 3c b ffc1b8cc <rtems_timer_server_fire_when+0x84>