RTEMS 4.10Annotated Report
Sat May 22 06:40:06 2010
ffc1a9b4 <_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
)
{
ffc1a9b4: 94 21 ff e0 stwu r1,-32(r1)
ffc1a9b8: 7c 08 02 a6 mflr r0
ffc1a9bc: 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 ) {
ffc1a9c0: 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
)
{
ffc1a9c4: 93 61 00 0c stw r27,12(r1)
ffc1a9c8: 7d 1b 43 78 mr r27,r8
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
ffc1a9cc: 7f 85 00 40 cmplw cr7,r5,r0
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
ffc1a9d0: 93 a1 00 14 stw r29,20(r1)
ffc1a9d4: 7c 9d 23 78 mr r29,r4
ffc1a9d8: 93 c1 00 18 stw r30,24(r1)
ffc1a9dc: 7c be 2b 78 mr r30,r5
ffc1a9e0: 93 e1 00 1c stw r31,28(r1)
ffc1a9e4: 7c 7f 1b 78 mr r31,r3
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
ffc1a9e8: 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
)
{
ffc1a9ec: 93 41 00 08 stw r26,8(r1)
ffc1a9f0: 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 ) {
ffc1a9f4: 41 9d 00 54 bgt- cr7,ffc1aa48 <_CORE_message_queue_Broadcast+0x94><== 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 ) {
ffc1a9f8: 80 1f 00 48 lwz r0,72(r31)
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
ffc1a9fc: 3b 80 00 00 li r28,0
* 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 ) {
ffc1aa00: 2f 80 00 00 cmpwi cr7,r0,0
ffc1aa04: 41 be 00 28 beq+ cr7,ffc1aa2c <_CORE_message_queue_Broadcast+0x78>
*count = 0;
ffc1aa08: 38 00 00 00 li r0,0
ffc1aa0c: 90 08 00 00 stw r0,0(r8)
ffc1aa10: 38 60 00 00 li r3,0
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
ffc1aa14: 48 00 00 34 b ffc1aa48 <_CORE_message_queue_Broadcast+0x94>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
ffc1aa18: 80 7a 00 2c lwz r3,44(r26)
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
ffc1aa1c: 3b 9c 00 01 addi r28,r28,1
ffc1aa20: 48 00 95 05 bl ffc23f24 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
ffc1aa24: 81 3a 00 28 lwz r9,40(r26)
ffc1aa28: 93 c9 00 00 stw r30,0(r9)
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
ffc1aa2c: 7f e3 fb 78 mr r3,r31
ffc1aa30: 48 00 2c c9 bl ffc1d6f8 <_Thread_queue_Dequeue>
ffc1aa34: 7f a4 eb 78 mr r4,r29
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
ffc1aa38: 7c 7a 1b 79 mr. r26,r3
ffc1aa3c: 7f c5 f3 78 mr r5,r30
ffc1aa40: 40 82 ff d8 bne+ ffc1aa18 <_CORE_message_queue_Broadcast+0x64>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
ffc1aa44: 93 9b 00 00 stw r28,0(r27)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
ffc1aa48: 80 01 00 24 lwz r0,36(r1)
ffc1aa4c: 83 41 00 08 lwz r26,8(r1)
ffc1aa50: 7c 08 03 a6 mtlr r0
ffc1aa54: 83 61 00 0c lwz r27,12(r1)
ffc1aa58: 83 81 00 10 lwz r28,16(r1)
ffc1aa5c: 83 a1 00 14 lwz r29,20(r1)
ffc1aa60: 83 c1 00 18 lwz r30,24(r1)
ffc1aa64: 83 e1 00 1c lwz r31,28(r1)
ffc1aa68: 38 21 00 20 addi r1,r1,32
ffc1aa6c: 4e 80 00 20 blr
ffc12f50 <_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
)
{
ffc12f50: 94 21 ff e0 stwu r1,-32(r1)
ffc12f54: 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)) {
ffc12f58: 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
)
{
ffc12f5c: 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)) {
ffc12f60: 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;
ffc12f64: 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
)
{
ffc12f68: 93 c1 00 18 stw r30,24(r1)
ffc12f6c: 7c 9e 23 78 mr r30,r4
ffc12f70: 93 e1 00 1c stw r31,28(r1)
ffc12f74: 7c 7f 1b 78 mr r31,r3
ffc12f78: 93 a1 00 14 stw r29,20(r1)
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
ffc12f7c: 90 03 00 48 stw r0,72(r3)
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
ffc12f80: 90 a3 00 44 stw r5,68(r3)
the_message_queue->number_of_pending_messages = 0;
the_message_queue->maximum_message_size = maximum_message_size;
ffc12f84: 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)) {
ffc12f88: 41 82 00 14 beq- ffc12f9c <_CORE_message_queue_Initialize+0x4c>
allocated_message_size += sizeof(uint32_t);
ffc12f8c: 39 26 00 04 addi r9,r6,4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
ffc12f90: 55 29 00 3a rlwinm r9,r9,0,0,29
}
if (allocated_message_size < maximum_message_size)
ffc12f94: 7f 89 30 40 cmplw cr7,r9,r6
ffc12f98: 41 bc 00 7c blt+ cr7,ffc13014 <_CORE_message_queue_Initialize+0xc4><== NEVER TAKEN
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
ffc12f9c: 3b a9 00 10 addi r29,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 *
ffc12fa0: 7c 7d 29 d6 mullw r3,r29,r5
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
ffc12fa4: 7f 83 48 40 cmplw cr7,r3,r9
ffc12fa8: 41 bc 00 6c blt+ cr7,ffc13014 <_CORE_message_queue_Initialize+0xc4><== NEVER TAKEN
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
ffc12fac: 90 a1 00 08 stw r5,8(r1)
ffc12fb0: 48 00 35 d1 bl ffc16580 <_Workspace_Allocate>
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
ffc12fb4: 2f 83 00 00 cmpwi cr7,r3,0
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
ffc12fb8: 7c 64 1b 78 mr r4,r3
ffc12fbc: 90 7f 00 5c stw r3,92(r31)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
ffc12fc0: 80 a1 00 08 lwz r5,8(r1)
ffc12fc4: 41 9e 00 50 beq- cr7,ffc13014 <_CORE_message_queue_Initialize+0xc4>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
ffc12fc8: 7f a6 eb 78 mr r6,r29
ffc12fcc: 38 7f 00 60 addi r3,r31,96
ffc12fd0: 48 00 54 5d bl ffc1842c <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
ffc12fd4: 80 9e 00 00 lwz r4,0(r30)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
ffc12fd8: 39 3f 00 54 addi r9,r31,84
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
ffc12fdc: 38 1f 00 50 addi r0,r31,80
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
ffc12fe0: 91 3f 00 50 stw r9,80(r31)
ffc12fe4: 68 84 00 01 xori r4,r4,1
the_chain->permanent_null = NULL;
ffc12fe8: 39 20 00 00 li r9,0
the_chain->last = _Chain_Head(the_chain);
ffc12fec: 90 1f 00 58 stw r0,88(r31)
ffc12ff0: 7c 84 00 34 cntlzw r4,r4
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
ffc12ff4: 91 3f 00 54 stw r9,84(r31)
ffc12ff8: 7f e3 fb 78 mr r3,r31
ffc12ffc: 54 84 d9 7e rlwinm r4,r4,27,5,31
ffc13000: 38 a0 00 80 li r5,128
ffc13004: 38 c0 00 06 li r6,6
ffc13008: 48 00 26 3d bl ffc15644 <_Thread_queue_Initialize>
ffc1300c: 38 60 00 01 li r3,1
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
ffc13010: 48 00 00 08 b ffc13018 <_CORE_message_queue_Initialize+0xc8>
ffc13014: 38 60 00 00 li r3,0
}
ffc13018: 80 01 00 24 lwz r0,36(r1)
ffc1301c: 83 a1 00 14 lwz r29,20(r1)
ffc13020: 7c 08 03 a6 mtlr r0
ffc13024: 83 c1 00 18 lwz r30,24(r1)
ffc13028: 83 e1 00 1c lwz r31,28(r1)
ffc1302c: 38 21 00 20 addi r1,r1,32
ffc13030: 4e 80 00 20 blr
ffc13034 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
ffc13034: 94 21 ff f0 stwu r1,-16(r1)
ffc13038: 7c 08 02 a6 mflr r0
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
ffc1303c: 3d 20 00 00 lis r9,0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
ffc13040: 90 01 00 14 stw r0,20(r1)
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
ffc13044: 38 00 00 00 li r0,0
{
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
ffc13048: 81 29 28 2c lwz r9,10284(r9)
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
ffc1304c: 93 e1 00 0c stw r31,12(r1)
ffc13050: 7c 7f 1b 78 mr r31,r3
ffc13054: 7c a3 2b 78 mr r3,r5
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
ffc13058: 90 09 00 34 stw r0,52(r9)
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
ffc1305c: 7c 80 23 78 mr r0,r4
ffc13060: 93 c1 00 08 stw r30,8(r1)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc13064: 7d 60 00 a6 mfmsr r11
ffc13068: 7d 50 42 a6 mfsprg r10,0
ffc1306c: 7d 6a 50 78 andc r10,r11,r10
ffc13070: 7d 40 01 24 mtmsr r10
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
ffc13074: 83 df 00 50 lwz r30,80(r31)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
ffc13078: 39 5f 00 54 addi r10,r31,84
ffc1307c: 7f 9e 50 00 cmpw cr7,r30,r10
ffc13080: 41 9e 00 5c beq- cr7,ffc130dc <_CORE_message_queue_Seize+0xa8>
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
ffc13084: 2f 9e 00 00 cmpwi cr7,r30,0
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
ffc13088: 80 be 00 00 lwz r5,0(r30)
the_chain->first = new_first;
ffc1308c: 7f ea fb 78 mr r10,r31
ffc13090: 94 aa 00 50 stwu r5,80(r10)
new_first->previous = _Chain_Head(the_chain);
ffc13094: 91 45 00 04 stw r10,4(r5)
ffc13098: 41 9e 00 44 beq- cr7,ffc130dc <_CORE_message_queue_Seize+0xa8><== NEVER TAKEN
the_message_queue->number_of_pending_messages -= 1;
ffc1309c: 81 3f 00 48 lwz r9,72(r31)
ffc130a0: 38 09 ff ff addi r0,r9,-1
ffc130a4: 90 1f 00 48 stw r0,72(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc130a8: 7d 60 01 24 mtmsr r11
_ISR_Enable( level );
*size_p = the_message->Contents.size;
_Thread_Executing->Wait.count =
ffc130ac: 3d 20 00 00 lis r9,0
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
_ISR_Enable( level );
*size_p = the_message->Contents.size;
ffc130b0: 80 be 00 08 lwz r5,8(r30)
_Thread_Executing->Wait.count =
ffc130b4: 81 29 28 2c lwz r9,10284(r9)
ffc130b8: 38 00 00 00 li r0,0
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
_ISR_Enable( level );
*size_p = the_message->Contents.size;
ffc130bc: 90 a6 00 00 stw r5,0(r6)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
ffc130c0: 38 9e 00 0c addi r4,r30,12
_Thread_Executing->Wait.count =
ffc130c4: 90 09 00 24 stw r0,36(r9)
ffc130c8: 48 00 85 d5 bl ffc1b69c <memcpy>
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
ffc130cc: 38 7f 00 60 addi r3,r31,96
ffc130d0: 7f c4 f3 78 mr r4,r30
ffc130d4: 4b ff fd b9 bl ffc12e8c <_Chain_Append>
/*
* There is not an API with blocking sends enabled.
* So return immediately.
*/
_CORE_message_queue_Free_message_buffer(the_message_queue, the_message);
return;
ffc130d8: 48 00 00 4c b ffc13124 <_CORE_message_queue_Seize+0xf0>
return;
}
#endif
}
if ( !wait ) {
ffc130dc: 2f 87 00 00 cmpwi cr7,r7,0
ffc130e0: 40 9e 00 14 bne- cr7,ffc130f4 <_CORE_message_queue_Seize+0xc0>
ffc130e4: 7d 60 01 24 mtmsr r11
_ISR_Enable( level );
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
ffc130e8: 38 00 00 04 li r0,4
ffc130ec: 90 09 00 34 stw r0,52(r9)
return;
ffc130f0: 48 00 00 34 b ffc13124 <_CORE_message_queue_Seize+0xf0>
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;
ffc130f4: 39 40 00 01 li r10,1
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
ffc130f8: 90 c9 00 28 stw r6,40(r9)
ffc130fc: 91 5f 00 30 stw r10,48(r31)
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
ffc13100: 90 09 00 20 stw r0,32(r9)
executing->Wait.return_argument_second.mutable_object = buffer;
ffc13104: 90 69 00 2c stw r3,44(r9)
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
ffc13108: 93 e9 00 44 stw r31,68(r9)
ffc1310c: 7d 60 01 24 mtmsr r11
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
ffc13110: 3c a0 ff c1 lis r5,-63
ffc13114: 7f e3 fb 78 mr r3,r31
ffc13118: 7d 04 43 78 mr r4,r8
ffc1311c: 38 a5 57 28 addi r5,r5,22312
ffc13120: 48 00 22 11 bl ffc15330 <_Thread_queue_Enqueue_with_handler>
}
ffc13124: 80 01 00 14 lwz r0,20(r1)
ffc13128: 83 c1 00 08 lwz r30,8(r1)
ffc1312c: 7c 08 03 a6 mtlr r0
ffc13130: 83 e1 00 0c lwz r31,12(r1)
ffc13134: 38 21 00 10 addi r1,r1,16
ffc13138: 4e 80 00 20 blr
ffc08c00 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
ffc08c00: 94 21 ff e0 stwu r1,-32(r1)
ffc08c04: 7c 08 02 a6 mflr r0
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc08c08: 3d 20 00 00 lis r9,0
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
ffc08c0c: 90 01 00 24 stw r0,36(r1)
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc08c10: 80 09 27 2c lwz r0,10028(r9)
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
ffc08c14: 93 81 00 10 stw r28,16(r1)
ffc08c18: 7c dc 33 78 mr r28,r6
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc08c1c: 2f 80 00 00 cmpwi cr7,r0,0
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
ffc08c20: 93 a1 00 14 stw r29,20(r1)
ffc08c24: 7c bd 2b 78 mr r29,r5
ffc08c28: 93 c1 00 18 stw r30,24(r1)
ffc08c2c: 7c 9e 23 78 mr r30,r4
ffc08c30: 93 e1 00 1c stw r31,28(r1)
ffc08c34: 7c 7f 1b 78 mr r31,r3
ffc08c38: 90 e1 00 08 stw r7,8(r1)
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc08c3c: 41 9e 00 2c beq- cr7,ffc08c68 <_CORE_mutex_Seize+0x68>
ffc08c40: 2f 85 00 00 cmpwi cr7,r5,0
ffc08c44: 41 9e 00 24 beq- cr7,ffc08c68 <_CORE_mutex_Seize+0x68> <== NEVER TAKEN
ffc08c48: 3d 20 00 00 lis r9,0
ffc08c4c: 80 09 27 90 lwz r0,10128(r9)
ffc08c50: 2b 80 00 01 cmplwi cr7,r0,1
ffc08c54: 40 bd 00 14 ble+ cr7,ffc08c68 <_CORE_mutex_Seize+0x68>
ffc08c58: 38 60 00 00 li r3,0
ffc08c5c: 38 80 00 00 li r4,0
ffc08c60: 38 a0 00 13 li r5,19
ffc08c64: 48 00 07 5d bl ffc093c0 <_Internal_error_Occurred>
ffc08c68: 7f e3 fb 78 mr r3,r31
ffc08c6c: 38 81 00 08 addi r4,r1,8
ffc08c70: 48 00 4f b1 bl ffc0dc20 <_CORE_mutex_Seize_interrupt_trylock>
ffc08c74: 2f 83 00 00 cmpwi cr7,r3,0
ffc08c78: 41 9e 00 60 beq- cr7,ffc08cd8 <_CORE_mutex_Seize+0xd8>
ffc08c7c: 2f 9d 00 00 cmpwi cr7,r29,0
ffc08c80: 3d 60 00 00 lis r11,0
ffc08c84: 40 9e 00 1c bne- cr7,ffc08ca0 <_CORE_mutex_Seize+0xa0>
ffc08c88: 80 01 00 08 lwz r0,8(r1)
ffc08c8c: 7c 00 01 24 mtmsr r0
ffc08c90: 81 2b 27 6c lwz r9,10092(r11)
ffc08c94: 38 00 00 01 li r0,1
ffc08c98: 90 09 00 34 stw r0,52(r9)
ffc08c9c: 48 00 00 3c b ffc08cd8 <_CORE_mutex_Seize+0xd8>
ffc08ca0: 3d 20 00 00 lis r9,0
ffc08ca4: 81 6b 27 6c lwz r11,10092(r11)
ffc08ca8: 81 49 27 2c lwz r10,10028(r9)
ffc08cac: 93 cb 00 20 stw r30,32(r11)
ffc08cb0: 38 0a 00 01 addi r0,r10,1
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;
ffc08cb4: 39 40 00 01 li r10,1
ffc08cb8: 93 eb 00 44 stw r31,68(r11)
ffc08cbc: 91 5f 00 30 stw r10,48(r31)
ffc08cc0: 90 09 27 2c stw r0,10028(r9)
ffc08cc4: 80 01 00 08 lwz r0,8(r1)
ffc08cc8: 7c 00 01 24 mtmsr r0
ffc08ccc: 7f e3 fb 78 mr r3,r31
ffc08cd0: 7f 84 e3 78 mr r4,r28
ffc08cd4: 4b ff fe a5 bl ffc08b78 <_CORE_mutex_Seize_interrupt_blocking>
}
ffc08cd8: 80 01 00 24 lwz r0,36(r1)
ffc08cdc: 83 81 00 10 lwz r28,16(r1)
ffc08ce0: 7c 08 03 a6 mtlr r0
ffc08ce4: 83 a1 00 14 lwz r29,20(r1)
ffc08ce8: 83 c1 00 18 lwz r30,24(r1)
ffc08cec: 83 e1 00 1c lwz r31,28(r1)
ffc08cf0: 38 21 00 20 addi r1,r1,32
ffc08cf4: 4e 80 00 20 blr
ffc0dc20 <_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
)
{
ffc0dc20: 7c 08 02 a6 mflr r0
ffc0dc24: 94 21 ff f8 stwu r1,-8(r1)
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
ffc0dc28: 3d 20 00 00 lis r9,0
ffc0dc2c: 81 29 27 6c lwz r9,10092(r9)
ffc0dc30: 90 01 00 0c stw r0,12(r1)
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
ffc0dc34: 38 00 00 00 li r0,0
ffc0dc38: 90 09 00 34 stw r0,52(r9)
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
ffc0dc3c: 81 63 00 50 lwz r11,80(r3)
ffc0dc40: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0dc44: 41 9e 00 bc beq- cr7,ffc0dd00 <_CORE_mutex_Seize_interrupt_trylock+0xe0>
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
ffc0dc48: 81 63 00 48 lwz r11,72(r3)
/* 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;
ffc0dc4c: 90 03 00 50 stw r0,80(r3)
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
ffc0dc50: 2f 8b 00 02 cmpwi cr7,r11,2
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;
ffc0dc54: 80 09 00 08 lwz r0,8(r9)
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;
ffc0dc58: 91 23 00 5c stw r9,92(r3)
the_mutex->holder_id = executing->Object.id;
ffc0dc5c: 90 03 00 60 stw r0,96(r3)
the_mutex->nest_count = 1;
ffc0dc60: 38 00 00 01 li r0,1
ffc0dc64: 90 03 00 54 stw r0,84(r3)
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
ffc0dc68: 41 9e 00 0c beq- cr7,ffc0dc74 <_CORE_mutex_Seize_interrupt_trylock+0x54>
ffc0dc6c: 2f 8b 00 03 cmpwi cr7,r11,3
ffc0dc70: 40 be 00 18 bne+ cr7,ffc0dc88 <_CORE_mutex_Seize_interrupt_trylock+0x68>
#endif
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
ffc0dc74: 2f 8b 00 03 cmpwi cr7,r11,3
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
ffc0dc78: 81 69 00 1c lwz r11,28(r9)
ffc0dc7c: 38 0b 00 01 addi r0,r11,1
ffc0dc80: 90 09 00 1c stw r0,28(r9)
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
ffc0dc84: 41 be 00 08 beq+ cr7,ffc0dc8c <_CORE_mutex_Seize_interrupt_trylock+0x6c>
_ISR_Enable( *level_p );
ffc0dc88: 48 00 00 a8 b ffc0dd30 <_CORE_mutex_Seize_interrupt_trylock+0x110>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
ffc0dc8c: 80 03 00 4c lwz r0,76(r3)
current = executing->current_priority;
ffc0dc90: 81 69 00 14 lwz r11,20(r9)
if ( current == ceiling ) {
ffc0dc94: 7f 8b 00 00 cmpw cr7,r11,r0
ffc0dc98: 40 be 00 08 bne+ cr7,ffc0dca0 <_CORE_mutex_Seize_interrupt_trylock+0x80>
_ISR_Enable( *level_p );
ffc0dc9c: 48 00 00 94 b ffc0dd30 <_CORE_mutex_Seize_interrupt_trylock+0x110>
return 0;
}
if ( current > ceiling ) {
ffc0dca0: 7f 8b 00 40 cmplw cr7,r11,r0
ffc0dca4: 40 bd 00 34 ble+ cr7,ffc0dcd8 <_CORE_mutex_Seize_interrupt_trylock+0xb8>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc0dca8: 3d 20 00 00 lis r9,0
ffc0dcac: 81 69 27 2c lwz r11,10028(r9)
ffc0dcb0: 38 0b 00 01 addi r0,r11,1
ffc0dcb4: 90 09 27 2c stw r0,10028(r9)
ffc0dcb8: 80 04 00 00 lwz r0,0(r4)
ffc0dcbc: 7c 00 01 24 mtmsr r0
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
_Thread_Change_priority(
ffc0dcc0: 80 83 00 4c lwz r4,76(r3)
ffc0dcc4: 38 a0 00 00 li r5,0
ffc0dcc8: 80 63 00 5c lwz r3,92(r3)
ffc0dccc: 4b ff c1 45 bl ffc09e10 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
ffc0dcd0: 4b ff c7 c9 bl ffc0a498 <_Thread_Enable_dispatch>
ffc0dcd4: 48 00 00 64 b ffc0dd38 <_CORE_mutex_Seize_interrupt_trylock+0x118>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
ffc0dcd8: 38 00 00 06 li r0,6
ffc0dcdc: 90 09 00 34 stw r0,52(r9)
the_mutex->lock = CORE_MUTEX_UNLOCKED;
the_mutex->nest_count = 0; /* undo locking above */
ffc0dce0: 38 00 00 00 li r0,0
ffc0dce4: 90 03 00 54 stw r0,84(r3)
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
ffc0dce8: 38 00 00 01 li r0,1
ffc0dcec: 90 03 00 50 stw r0,80(r3)
the_mutex->nest_count = 0; /* undo locking above */
executing->resource_count--; /* undo locking above */
ffc0dcf0: 81 69 00 1c lwz r11,28(r9)
ffc0dcf4: 38 0b ff ff addi r0,r11,-1
ffc0dcf8: 90 09 00 1c stw r0,28(r9)
_ISR_Enable( *level_p );
ffc0dcfc: 48 00 00 34 b ffc0dd30 <_CORE_mutex_Seize_interrupt_trylock+0x110>
/*
* 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 ) ) {
ffc0dd00: 81 63 00 5c lwz r11,92(r3)
ffc0dd04: 7f 8b 48 00 cmpw cr7,r11,r9
ffc0dd08: 40 be 00 44 bne+ cr7,ffc0dd4c <_CORE_mutex_Seize_interrupt_trylock+0x12c>
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
ffc0dd0c: 80 03 00 40 lwz r0,64(r3)
ffc0dd10: 2f 80 00 00 cmpwi cr7,r0,0
ffc0dd14: 41 9e 00 10 beq- cr7,ffc0dd24 <_CORE_mutex_Seize_interrupt_trylock+0x104>
ffc0dd18: 2f 80 00 01 cmpwi cr7,r0,1
ffc0dd1c: 40 be 00 30 bne+ cr7,ffc0dd4c <_CORE_mutex_Seize_interrupt_trylock+0x12c><== ALWAYS TAKEN
ffc0dd20: 48 00 00 20 b ffc0dd40 <_CORE_mutex_Seize_interrupt_trylock+0x120><== NOT EXECUTED
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
ffc0dd24: 81 23 00 54 lwz r9,84(r3)
ffc0dd28: 38 09 00 01 addi r0,r9,1
ffc0dd2c: 90 03 00 54 stw r0,84(r3)
ffc0dd30: 80 04 00 00 lwz r0,0(r4)
ffc0dd34: 7c 00 01 24 mtmsr r0
ffc0dd38: 38 60 00 00 li r3,0
ffc0dd3c: 48 00 00 14 b ffc0dd50 <_CORE_mutex_Seize_interrupt_trylock+0x130>
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
ffc0dd40: 38 00 00 02 li r0,2 <== NOT EXECUTED
ffc0dd44: 90 0b 00 34 stw r0,52(r11) <== NOT EXECUTED
_ISR_Enable( *level_p );
ffc0dd48: 4b ff ff e8 b ffc0dd30 <_CORE_mutex_Seize_interrupt_trylock+0x110><== NOT EXECUTED
ffc0dd4c: 38 60 00 01 li r3,1
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
ffc0dd50: 80 01 00 0c lwz r0,12(r1)
ffc0dd54: 38 21 00 08 addi r1,r1,8
ffc0dd58: 7c 08 03 a6 mtlr r0
ffc0dd5c: 4e 80 00 20 blr
ffc08eb8 <_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
)
{
ffc08eb8: 94 21 ff f0 stwu r1,-16(r1)
ffc08ebc: 7c 08 02 a6 mflr r0
ffc08ec0: 93 e1 00 0c stw r31,12(r1)
ffc08ec4: 7c 7f 1b 78 mr r31,r3
ffc08ec8: 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)) ) {
ffc08ecc: 48 00 19 e9 bl ffc0a8b4 <_Thread_queue_Dequeue>
ffc08ed0: 2f 83 00 00 cmpwi cr7,r3,0
ffc08ed4: 38 60 00 00 li r3,0
ffc08ed8: 40 be 00 38 bne+ cr7,ffc08f10 <_CORE_semaphore_Surrender+0x58>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc08edc: 7c 00 00 a6 mfmsr r0
ffc08ee0: 7d 30 42 a6 mfsprg r9,0
ffc08ee4: 7c 09 48 78 andc r9,r0,r9
ffc08ee8: 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 )
ffc08eec: 81 3f 00 48 lwz r9,72(r31)
ffc08ef0: 38 60 00 04 li r3,4
ffc08ef4: 81 7f 00 40 lwz r11,64(r31)
ffc08ef8: 7f 89 58 40 cmplw cr7,r9,r11
ffc08efc: 40 9c 00 10 bge- cr7,ffc08f0c <_CORE_semaphore_Surrender+0x54><== NEVER TAKEN
the_semaphore->count += 1;
ffc08f00: 39 29 00 01 addi r9,r9,1
ffc08f04: 91 3f 00 48 stw r9,72(r31)
ffc08f08: 38 60 00 00 li r3,0
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc08f0c: 7c 00 01 24 mtmsr r0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
ffc08f10: 80 01 00 14 lwz r0,20(r1)
ffc08f14: 83 e1 00 0c lwz r31,12(r1)
ffc08f18: 38 21 00 10 addi r1,r1,16
ffc08f1c: 7c 08 03 a6 mtlr r0
ffc08f20: 4e 80 00 20 blr
ffc07760 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
ffc07760: 94 21 ff f0 stwu r1,-16(r1)
ffc07764: 7c 08 02 a6 mflr r0
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
ffc07768: 3d 20 00 00 lis r9,0
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
ffc0776c: 93 e1 00 0c stw r31,12(r1)
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
ffc07770: 83 e9 27 6c lwz r31,10092(r9)
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
ffc07774: 90 01 00 14 stw r0,20(r1)
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
ffc07778: 38 00 00 00 li r0,0
ffc0777c: 90 1f 00 34 stw r0,52(r31)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc07780: 81 5f 01 40 lwz r10,320(r31)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc07784: 7d 20 00 a6 mfmsr r9
ffc07788: 7c 10 42 a6 mfsprg r0,0
ffc0778c: 7d 20 00 78 andc r0,r9,r0
ffc07790: 7c 00 01 24 mtmsr r0
_ISR_Disable( level );
pending_events = api->pending_events;
ffc07794: 81 6a 00 00 lwz r11,0(r10)
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
ffc07798: 7c 60 58 39 and. r0,r3,r11
ffc0779c: 41 82 00 24 beq- ffc077c0 <_Event_Seize+0x60>
ffc077a0: 7f 80 18 00 cmpw cr7,r0,r3
ffc077a4: 41 9e 00 0c beq- cr7,ffc077b0 <_Event_Seize+0x50>
ffc077a8: 70 88 00 02 andi. r8,r4,2
ffc077ac: 41 a2 00 14 beq+ ffc077c0 <_Event_Seize+0x60> <== NEVER TAKEN
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
ffc077b0: 7d 6b 00 78 andc r11,r11,r0
ffc077b4: 91 6a 00 00 stw r11,0(r10)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc077b8: 7d 20 01 24 mtmsr r9
ffc077bc: 48 00 00 18 b ffc077d4 <_Event_Seize+0x74>
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
ffc077c0: 70 8b 00 01 andi. r11,r4,1
ffc077c4: 41 a2 00 18 beq+ ffc077dc <_Event_Seize+0x7c>
ffc077c8: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
executing->Wait.return_code = RTEMS_UNSATISFIED;
ffc077cc: 39 20 00 0d li r9,13
ffc077d0: 91 3f 00 34 stw r9,52(r31)
*event_out = seized_events;
ffc077d4: 90 06 00 00 stw r0,0(r6)
return;
ffc077d8: 48 00 00 a0 b ffc07878 <_Event_Seize+0x118>
*/
executing->Wait.option = (uint32_t) option_set;
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
ffc077dc: 38 00 00 01 li r0,1
* set properly when we are marked as in the event critical section.
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
ffc077e0: 90 9f 00 30 stw r4,48(r31)
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
ffc077e4: 3d 60 00 00 lis r11,0
ffc077e8: 90 0b 27 a0 stw r0,10144(r11)
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
executing->Wait.count = (uint32_t) event_in;
ffc077ec: 90 7f 00 24 stw r3,36(r31)
executing->Wait.return_argument = event_out;
ffc077f0: 90 df 00 28 stw r6,40(r31)
ffc077f4: 7d 20 01 24 mtmsr r9
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
ffc077f8: 2f 85 00 00 cmpwi cr7,r5,0
ffc077fc: 41 be 00 38 beq+ cr7,ffc07834 <_Event_Seize+0xd4>
_Watchdog_Initialize(
ffc07800: 81 3f 00 08 lwz r9,8(r31)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc07804: 3d 60 ff c0 lis r11,-64
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc07808: 38 00 00 00 li r0,0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc0780c: 90 bf 00 54 stw r5,84(r31)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc07810: 39 6b 7a 48 addi r11,r11,31304
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc07814: 3c 60 00 00 lis r3,0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc07818: 91 7f 00 64 stw r11,100(r31)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0781c: 38 63 2c a8 addi r3,r3,11432
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
ffc07820: 91 3f 00 68 stw r9,104(r31)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc07824: 38 9f 00 48 addi r4,r31,72
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
ffc07828: 90 1f 00 6c stw r0,108(r31)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0782c: 90 1f 00 50 stw r0,80(r31)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc07830: 48 00 41 71 bl ffc0b9a0 <_Watchdog_Insert>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
ffc07834: 7f e3 fb 78 mr r3,r31
ffc07838: 38 80 01 00 li r4,256
ffc0783c: 48 00 36 cd bl ffc0af08 <_Thread_Set_state>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc07840: 7c a0 00 a6 mfmsr r5
ffc07844: 7c 10 42 a6 mfsprg r0,0
ffc07848: 7c a0 00 78 andc r0,r5,r0
ffc0784c: 7c 00 01 24 mtmsr r0
_ISR_Disable( level );
sync_state = _Event_Sync_state;
ffc07850: 3d 20 00 00 lis r9,0
ffc07854: 80 69 27 a0 lwz r3,10144(r9)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
ffc07858: 38 00 00 00 li r0,0
ffc0785c: 90 09 27 a0 stw r0,10144(r9)
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
ffc07860: 2f 83 00 01 cmpwi cr7,r3,1
ffc07864: 40 be 00 0c bne+ cr7,ffc07870 <_Event_Seize+0x110>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc07868: 7c a0 01 24 mtmsr r5
ffc0786c: 48 00 00 0c b ffc07878 <_Event_Seize+0x118>
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
ffc07870: 7f e4 fb 78 mr r4,r31
ffc07874: 48 00 25 35 bl ffc09da8 <_Thread_blocking_operation_Cancel>
}
ffc07878: 80 01 00 14 lwz r0,20(r1)
ffc0787c: 83 e1 00 0c lwz r31,12(r1)
ffc07880: 38 21 00 10 addi r1,r1,16
ffc07884: 7c 08 03 a6 mtlr r0
ffc07888: 4e 80 00 20 blr
ffc07900 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
ffc07900: 94 21 ff f0 stwu r1,-16(r1)
ffc07904: 7c 08 02 a6 mflr r0
ffc07908: 90 01 00 14 stw r0,20(r1)
ffc0790c: 93 e1 00 0c stw r31,12(r1)
ffc07910: 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 ];
ffc07914: 81 03 01 40 lwz r8,320(r3)
option_set = (rtems_option) the_thread->Wait.option;
ffc07918: 80 e3 00 30 lwz r7,48(r3)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0791c: 7c 00 00 a6 mfmsr r0
ffc07920: 7d 30 42 a6 mfsprg r9,0
ffc07924: 7c 09 48 78 andc r9,r0,r9
ffc07928: 7d 20 01 24 mtmsr r9
_ISR_Disable( level );
pending_events = api->pending_events;
ffc0792c: 81 68 00 00 lwz r11,0(r8)
event_condition = (rtems_event_set) the_thread->Wait.count;
ffc07930: 81 43 00 24 lwz r10,36(r3)
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
ffc07934: 7d 49 58 39 and. r9,r10,r11
ffc07938: 40 a2 00 08 bne+ ffc07940 <_Event_Surrender+0x40>
_ISR_Enable( level );
ffc0793c: 48 00 00 f4 b ffc07a30 <_Event_Surrender+0x130>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
ffc07940: 3c c0 00 00 lis r6,0
ffc07944: 80 c6 27 54 lwz r6,10068(r6)
ffc07948: 2f 86 00 00 cmpwi cr7,r6,0
ffc0794c: 41 9e 00 68 beq- cr7,ffc079b4 <_Event_Surrender+0xb4>
ffc07950: 3c c0 00 00 lis r6,0
ffc07954: 80 c6 27 6c lwz r6,10092(r6)
ffc07958: 7f 83 30 00 cmpw cr7,r3,r6
ffc0795c: 40 be 00 58 bne+ cr7,ffc079b4 <_Event_Surrender+0xb4>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
ffc07960: 3c c0 00 00 lis r6,0
ffc07964: 80 a6 27 a0 lwz r5,10144(r6)
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
ffc07968: 2f 85 00 02 cmpwi cr7,r5,2
ffc0796c: 41 9e 00 10 beq- cr7,ffc0797c <_Event_Surrender+0x7c> <== NEVER TAKEN
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
ffc07970: 80 c6 27 a0 lwz r6,10144(r6)
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
ffc07974: 2f 86 00 01 cmpwi cr7,r6,1
ffc07978: 40 be 00 3c bne+ cr7,ffc079b4 <_Event_Surrender+0xb4>
_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) ) {
ffc0797c: 7f 89 50 00 cmpw cr7,r9,r10
ffc07980: 41 9e 00 0c beq- cr7,ffc0798c <_Event_Surrender+0x8c>
ffc07984: 70 e5 00 02 andi. r5,r7,2
ffc07988: 41 82 00 28 beq- ffc079b0 <_Event_Surrender+0xb0> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
ffc0798c: 7d 6b 48 78 andc r11,r11,r9
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc07990: 81 5f 00 28 lwz r10,40(r31)
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 );
ffc07994: 91 68 00 00 stw r11,0(r8)
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
ffc07998: 3d 60 00 00 lis r11,0
ffc0799c: 39 00 00 03 li r8,3
ffc079a0: 91 0b 27 a0 stw r8,10144(r11)
_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;
ffc079a4: 39 60 00 00 li r11,0
ffc079a8: 91 7f 00 24 stw r11,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc079ac: 91 2a 00 00 stw r9,0(r10)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
}
_ISR_Enable( level );
ffc079b0: 48 00 00 80 b ffc07a30 <_Event_Surrender+0x130>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
ffc079b4: 80 df 00 10 lwz r6,16(r31)
ffc079b8: 70 c5 01 00 andi. r5,r6,256
ffc079bc: 41 82 00 74 beq- ffc07a30 <_Event_Surrender+0x130>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
ffc079c0: 7f 89 50 00 cmpw cr7,r9,r10
ffc079c4: 41 9e 00 0c beq- cr7,ffc079d0 <_Event_Surrender+0xd0>
ffc079c8: 70 ea 00 02 andi. r10,r7,2
ffc079cc: 41 82 00 64 beq- ffc07a30 <_Event_Surrender+0x130> <== 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;
ffc079d0: 81 5f 00 28 lwz r10,40(r31)
/*
* 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 );
ffc079d4: 7d 6b 48 78 andc r11,r11,r9
ffc079d8: 91 68 00 00 stw r11,0(r8)
the_thread->Wait.count = 0;
ffc079dc: 39 60 00 00 li r11,0
ffc079e0: 91 7f 00 24 stw r11,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc079e4: 91 2a 00 00 stw r9,0(r10)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc079e8: 7d 20 00 a6 mfmsr r9
ffc079ec: 7c 00 01 24 mtmsr r0
ffc079f0: 7d 20 01 24 mtmsr r9
_ISR_Flash( level );
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
ffc079f4: 81 3f 00 50 lwz r9,80(r31)
ffc079f8: 2f 89 00 02 cmpwi cr7,r9,2
ffc079fc: 41 9e 00 0c beq- cr7,ffc07a08 <_Event_Surrender+0x108>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc07a00: 7c 00 01 24 mtmsr r0
ffc07a04: 48 00 00 18 b ffc07a1c <_Event_Surrender+0x11c>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
ffc07a08: 39 20 00 03 li r9,3
ffc07a0c: 91 3f 00 50 stw r9,80(r31)
ffc07a10: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
ffc07a14: 38 7f 00 48 addi r3,r31,72
ffc07a18: 48 00 40 e1 bl ffc0baf8 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc07a1c: 3c 80 10 03 lis r4,4099
ffc07a20: 7f e3 fb 78 mr r3,r31
ffc07a24: 60 84 ff f8 ori r4,r4,65528
ffc07a28: 48 00 25 8d bl ffc09fb4 <_Thread_Clear_state>
ffc07a2c: 48 00 00 08 b ffc07a34 <_Event_Surrender+0x134>
ffc07a30: 7c 00 01 24 mtmsr r0
}
return;
}
}
_ISR_Enable( level );
}
ffc07a34: 80 01 00 14 lwz r0,20(r1)
ffc07a38: 83 e1 00 0c lwz r31,12(r1)
ffc07a3c: 38 21 00 10 addi r1,r1,16
ffc07a40: 7c 08 03 a6 mtlr r0
ffc07a44: 4e 80 00 20 blr
ffc07a48 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
ffc07a48: 94 21 ff e8 stwu r1,-24(r1)
ffc07a4c: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
ffc07a50: 38 81 00 08 addi r4,r1,8
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
ffc07a54: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
ffc07a58: 48 00 2a 61 bl ffc0a4b8 <_Thread_Get>
switch ( location ) {
ffc07a5c: 80 01 00 08 lwz r0,8(r1)
ffc07a60: 2f 80 00 00 cmpwi cr7,r0,0
ffc07a64: 40 9e 00 68 bne- cr7,ffc07acc <_Event_Timeout+0x84> <== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc07a68: 7d 60 00 a6 mfmsr r11
ffc07a6c: 7d 30 42 a6 mfsprg r9,0
ffc07a70: 7d 69 48 78 andc r9,r11,r9
ffc07a74: 7d 20 01 24 mtmsr r9
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
ffc07a78: 3d 20 00 00 lis r9,0
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
ffc07a7c: 90 03 00 24 stw r0,36(r3)
if ( _Thread_Is_executing( the_thread ) ) {
ffc07a80: 81 29 27 6c lwz r9,10092(r9)
ffc07a84: 7f 83 48 00 cmpw cr7,r3,r9
ffc07a88: 40 be 00 1c bne+ cr7,ffc07aa4 <_Event_Timeout+0x5c>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
ffc07a8c: 3d 20 00 00 lis r9,0
ffc07a90: 80 09 27 a0 lwz r0,10144(r9)
ffc07a94: 2f 80 00 01 cmpwi cr7,r0,1
ffc07a98: 40 be 00 0c bne+ cr7,ffc07aa4 <_Event_Timeout+0x5c>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
ffc07a9c: 38 00 00 02 li r0,2
ffc07aa0: 90 09 27 a0 stw r0,10144(r9)
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
ffc07aa4: 38 00 00 06 li r0,6
ffc07aa8: 90 03 00 34 stw r0,52(r3)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc07aac: 7d 60 01 24 mtmsr r11
ffc07ab0: 3c 80 10 03 lis r4,4099
ffc07ab4: 60 84 ff f8 ori r4,r4,65528
ffc07ab8: 48 00 24 fd bl ffc09fb4 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
ffc07abc: 3d 20 00 00 lis r9,0
ffc07ac0: 81 69 27 2c lwz r11,10028(r9)
ffc07ac4: 38 0b ff ff addi r0,r11,-1
ffc07ac8: 90 09 27 2c stw r0,10028(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc07acc: 80 01 00 1c lwz r0,28(r1)
ffc07ad0: 38 21 00 18 addi r1,r1,24
ffc07ad4: 7c 08 03 a6 mtlr r0
ffc07ad8: 4e 80 00 20 blr
ffc0dea8 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc0dea8: 94 21 ff d8 stwu r1,-40(r1)
ffc0deac: 7c 08 02 a6 mflr r0
ffc0deb0: 7d 80 00 26 mfcr r12
ffc0deb4: 7c 89 23 78 mr r9,r4
ffc0deb8: 90 01 00 2c stw r0,44(r1)
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
ffc0debc: 38 04 00 04 addi r0,r4,4
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
ffc0dec0: 7f 80 20 40 cmplw cr7,r0,r4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc0dec4: 93 c1 00 20 stw r30,32(r1)
ffc0dec8: 7c 7e 1b 78 mr r30,r3
ffc0decc: 93 41 00 10 stw r26,16(r1)
ffc0ded0: 93 61 00 14 stw r27,20(r1)
ffc0ded4: 93 81 00 18 stw r28,24(r1)
ffc0ded8: 93 a1 00 1c stw r29,28(r1)
ffc0dedc: 93 e1 00 24 stw r31,36(r1)
ffc0dee0: 91 81 00 0c stw r12,12(r1)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0dee4: 80 83 00 08 lwz r4,8(r3)
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
ffc0dee8: 81 43 00 10 lwz r10,16(r3)
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
ffc0deec: 41 9c 01 48 blt- cr7,ffc0e034 <_Heap_Allocate_aligned_with_boundary+0x18c>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
ffc0def0: 2f 86 00 00 cmpwi cr7,r6,0
ffc0def4: 41 be 00 18 beq+ cr7,ffc0df0c <_Heap_Allocate_aligned_with_boundary+0x64>
if ( boundary < alloc_size ) {
ffc0def8: 7f 86 48 40 cmplw cr7,r6,r9
ffc0defc: 41 9c 01 38 blt- cr7,ffc0e034 <_Heap_Allocate_aligned_with_boundary+0x18c>
return NULL;
}
if ( alignment == 0 ) {
ffc0df00: 2f 85 00 00 cmpwi cr7,r5,0
ffc0df04: 40 9e 00 08 bne- cr7,ffc0df0c <_Heap_Allocate_aligned_with_boundary+0x64>
ffc0df08: 7d 45 53 78 mr r5,r10
ffc0df0c: 3b a0 00 00 li r29,0
* 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 ) {
ffc0df10: 2f 05 00 00 cmpwi cr6,r5,0
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;
ffc0df14: 3b 8a 00 07 addi r28,r10,7
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
ffc0df18: 21 89 00 04 subfic r12,r9,4
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
ffc0df1c: 2f 86 00 00 cmpwi cr7,r6,0
ffc0df20: 48 00 00 d0 b ffc0dff0 <_Heap_Allocate_aligned_with_boundary+0x148>
/*
* 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 ) {
ffc0df24: 81 64 00 04 lwz r11,4(r4)
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
ffc0df28: 3b bd 00 01 addi r29,r29,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 ) {
ffc0df2c: 7c 8b 00 40 cmplw cr1,r11,r0
ffc0df30: 40 85 00 bc ble- cr1,ffc0dfec <_Heap_Allocate_aligned_with_boundary+0x144>
ffc0df34: 38 e4 00 08 addi r7,r4,8
if ( alignment == 0 ) {
ffc0df38: 40 9a 00 0c bne- cr6,ffc0df44 <_Heap_Allocate_aligned_with_boundary+0x9c>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc0df3c: 7c ff 3b 78 mr r31,r7
ffc0df40: 48 00 00 a4 b ffc0dfe4 <_Heap_Allocate_aligned_with_boundary+0x13c>
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;
ffc0df44: 55 6b 00 3c rlwinm r11,r11,0,0,30
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
ffc0df48: 80 7e 00 14 lwz r3,20(r30)
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;
ffc0df4c: 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_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
ffc0df50: 7f ec 5a 14 add r31,r12,r11
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc0df54: 7f ff 2b 96 divwu r31,r31,r5
ffc0df58: 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;
ffc0df5c: 7d 03 e0 50 subf r8,r3,r28
ffc0df60: 7d 68 5a 14 add r11,r8,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 ) {
ffc0df64: 7c 9f 58 40 cmplw cr1,r31,r11
ffc0df68: 40 85 00 0c ble- cr1,ffc0df74 <_Heap_Allocate_aligned_with_boundary+0xcc>
ffc0df6c: 7f eb 2b 96 divwu r31,r11,r5
ffc0df70: 7f ff 29 d6 mullw r31,r31,r5
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
ffc0df74: 41 9e 00 48 beq- cr7,ffc0dfbc <_Heap_Allocate_aligned_with_boundary+0x114>
/* 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;
ffc0df78: 7d 1f 4a 14 add r8,r31,r9
ffc0df7c: 7d 68 33 96 divwu r11,r8,r6
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
ffc0df80: 7f 67 4a 14 add r27,r7,r9
ffc0df84: 7d 6b 31 d6 mullw r11,r11,r6
ffc0df88: 48 00 00 1c b ffc0dfa4 <_Heap_Allocate_aligned_with_boundary+0xfc>
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
ffc0df8c: 41 80 00 60 blt- ffc0dfec <_Heap_Allocate_aligned_with_boundary+0x144>
ffc0df90: 7f fa 2b 96 divwu r31,r26,r5
ffc0df94: 7f ff 29 d6 mullw r31,r31,r5
return 0;
}
alloc_begin = boundary_line - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
ffc0df98: 7d 1f 4a 14 add r8,r31,r9
ffc0df9c: 7d 68 33 96 divwu r11,r8,r6
ffc0dfa0: 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 ) {
ffc0dfa4: 7e 1f 58 40 cmplw cr4,r31,r11
if ( boundary_line < boundary_floor ) {
return 0;
}
alloc_begin = boundary_line - alloc_size;
ffc0dfa8: 7f 49 58 50 subf r26,r9,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 ) {
ffc0dfac: 7c 8b 40 40 cmplw cr1,r11,r8
if ( boundary_line < boundary_floor ) {
ffc0dfb0: 7c 0b d8 40 cmplw r11,r27
/* 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 ) {
ffc0dfb4: 40 90 00 08 bge- cr4,ffc0dfbc <_Heap_Allocate_aligned_with_boundary+0x114>
ffc0dfb8: 41 84 ff d4 blt+ cr1,ffc0df8c <_Heap_Allocate_aligned_with_boundary+0xe4>
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 ) {
ffc0dfbc: 7c 9f 38 40 cmplw cr1,r31,r7
ffc0dfc0: 41 84 00 2c blt- cr1,ffc0dfec <_Heap_Allocate_aligned_with_boundary+0x144>
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;
ffc0dfc4: 7d 7f 53 96 divwu r11,r31,r10
ffc0dfc8: 7d 6b 51 d6 mullw r11,r11,r10
ffc0dfcc: 21 04 ff f8 subfic r8,r4,-8
ffc0dfd0: 7d 68 5a 14 add r11,r8,r11
if ( free_size >= min_block_size || free_size == 0 ) {
ffc0dfd4: 7c 8b 18 40 cmplw cr1,r11,r3
ffc0dfd8: 40 84 00 0c bge- cr1,ffc0dfe4 <_Heap_Allocate_aligned_with_boundary+0x13c>
ffc0dfdc: 2c 8b 00 00 cmpwi cr1,r11,0
ffc0dfe0: 40 86 00 0c bne- cr1,ffc0dfec <_Heap_Allocate_aligned_with_boundary+0x144>
boundary
);
}
}
if ( alloc_begin != 0 ) {
ffc0dfe4: 2c 9f 00 00 cmpwi cr1,r31,0
ffc0dfe8: 40 86 00 18 bne- cr1,ffc0e000 <_Heap_Allocate_aligned_with_boundary+0x158><== ALWAYS TAKEN
break;
}
block = block->next;
ffc0dfec: 80 84 00 08 lwz r4,8(r4)
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
ffc0dff0: 7c 84 f0 00 cmpw cr1,r4,r30
ffc0dff4: 40 86 ff 30 bne+ cr1,ffc0df24 <_Heap_Allocate_aligned_with_boundary+0x7c>
ffc0dff8: 3b e0 00 00 li r31,0
ffc0dffc: 48 00 00 20 b ffc0e01c <_Heap_Allocate_aligned_with_boundary+0x174>
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
ffc0e000: 80 1e 00 4c lwz r0,76(r30)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ffc0e004: 7d 26 4b 78 mr r6,r9
ffc0e008: 7f c3 f3 78 mr r3,r30
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
ffc0e00c: 7c 00 ea 14 add r0,r0,r29
ffc0e010: 90 1e 00 4c stw r0,76(r30)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ffc0e014: 7f e5 fb 78 mr r5,r31
ffc0e018: 4b ff b2 31 bl ffc09248 <_Heap_Block_allocate>
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
ffc0e01c: 80 1e 00 44 lwz r0,68(r30)
ffc0e020: 7f 80 e8 40 cmplw cr7,r0,r29
ffc0e024: 40 9c 00 08 bge- cr7,ffc0e02c <_Heap_Allocate_aligned_with_boundary+0x184>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
ffc0e028: 93 be 00 44 stw r29,68(r30)
}
return (void *) alloc_begin;
ffc0e02c: 7f e3 fb 78 mr r3,r31
ffc0e030: 48 00 00 08 b ffc0e038 <_Heap_Allocate_aligned_with_boundary+0x190>
ffc0e034: 38 60 00 00 li r3,0
}
ffc0e038: 80 01 00 2c lwz r0,44(r1)
ffc0e03c: 81 81 00 0c lwz r12,12(r1)
ffc0e040: 7c 08 03 a6 mtlr r0
ffc0e044: 83 41 00 10 lwz r26,16(r1)
ffc0e048: 83 61 00 14 lwz r27,20(r1)
ffc0e04c: 7d 80 81 20 mtcrf 8,r12
ffc0e050: 83 81 00 18 lwz r28,24(r1)
ffc0e054: 83 a1 00 1c lwz r29,28(r1)
ffc0e058: 83 c1 00 20 lwz r30,32(r1)
ffc0e05c: 83 e1 00 24 lwz r31,36(r1)
ffc0e060: 38 21 00 28 addi r1,r1,40
ffc0e064: 4e 80 00 20 blr
ffc12b18 <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
ffc12b18: 7c 08 02 a6 mflr r0
ffc12b1c: 94 21 ff f8 stwu r1,-8(r1)
ffc12b20: 7c 69 1b 78 mr r9,r3
ffc12b24: 90 01 00 0c stw r0,12(r1)
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
ffc12b28: 80 03 00 18 lwz r0,24(r3)
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
uintptr_t extend_size = 0;
Heap_Block *const last_block = heap->last_block;
ffc12b2c: 81 43 00 24 lwz r10,36(r3)
uintptr_t *amount_extended
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
ffc12b30: 7f 84 00 40 cmplw cr7,r4,r0
uintptr_t const heap_area_end = heap->area_end;
ffc12b34: 80 03 00 1c lwz r0,28(r3)
uintptr_t *amount_extended
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
ffc12b38: 41 bc 00 10 blt+ cr7,ffc12b48 <_Heap_Extend+0x30>
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
ffc12b3c: 7f 84 00 40 cmplw cr7,r4,r0
ffc12b40: 38 60 00 01 li r3,1
ffc12b44: 41 9c 00 9c blt- cr7,ffc12be0 <_Heap_Extend+0xc8>
return HEAP_EXTEND_ERROR; /* case 3 */
} else if ( area_begin != heap_area_end ) {
ffc12b48: 7f 84 00 00 cmpw cr7,r4,r0
ffc12b4c: 38 60 00 02 li r3,2
ffc12b50: 40 be 00 90 bne+ cr7,ffc12be0 <_Heap_Extend+0xc8>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc12b54: 81 69 00 10 lwz r11,16(r9)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
ffc12b58: 7c 84 2a 14 add r4,r4,r5
* block and free it.
*/
heap->area_end = new_heap_area_end;
extend_size = new_heap_area_end
ffc12b5c: 20 0a ff f8 subfic r0,r10,-8
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
heap->area_end = new_heap_area_end;
ffc12b60: 90 89 00 1c stw r4,28(r9)
extend_size = new_heap_area_end
ffc12b64: 7c 00 22 14 add r0,r0,r4
ffc12b68: 7c 00 5b 96 divwu r0,r0,r11
ffc12b6c: 7c 00 59 d6 mullw r0,r0,r11
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
if( extend_size >= heap->min_block_size ) {
ffc12b70: 38 60 00 00 li r3,0
extend_size = new_heap_area_end
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
ffc12b74: 90 06 00 00 stw r0,0(r6)
if( extend_size >= heap->min_block_size ) {
ffc12b78: 81 69 00 14 lwz r11,20(r9)
ffc12b7c: 7f 80 58 40 cmplw cr7,r0,r11
ffc12b80: 41 bc 00 60 blt+ cr7,ffc12be0 <_Heap_Extend+0xc8> <== NEVER TAKEN
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
ffc12b84: 80 ea 00 04 lwz r7,4(r10)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc12b88: 7d 60 52 14 add r11,r0,r10
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
ffc12b8c: 81 09 00 20 lwz r8,32(r9)
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
ffc12b90: 38 8a 00 08 addi r4,r10,8
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
ffc12b94: 54 e7 07 fe clrlwi r7,r7,31
new_last_block->size_and_flag =
((uintptr_t) heap->first_block - (uintptr_t) new_last_block)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
ffc12b98: 91 69 00 24 stw r11,36(r9)
if( extend_size >= heap->min_block_size ) {
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
ffc12b9c: 7d 0b 40 50 subf r8,r11,r8
ffc12ba0: 7c 07 3b 78 or r7,r0,r7
ffc12ba4: 61 08 00 01 ori r8,r8,1
ffc12ba8: 90 ea 00 04 stw r7,4(r10)
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
ffc12bac: 7d 23 4b 78 mr r3,r9
if( extend_size >= heap->min_block_size ) {
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
ffc12bb0: 91 0b 00 04 stw r8,4(r11)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
ffc12bb4: 80 e9 00 2c lwz r7,44(r9)
++stats->used_blocks;
ffc12bb8: 81 09 00 40 lwz r8,64(r9)
--stats->frees; /* Do not count subsequent call as actual free() */
ffc12bbc: 81 49 00 50 lwz r10,80(r9)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
ffc12bc0: 7c 07 02 14 add r0,r7,r0
++stats->used_blocks;
ffc12bc4: 39 08 00 01 addi r8,r8,1
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
ffc12bc8: 90 09 00 2c stw r0,44(r9)
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
ffc12bcc: 39 4a ff ff addi r10,r10,-1
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
ffc12bd0: 91 09 00 40 stw r8,64(r9)
--stats->frees; /* Do not count subsequent call as actual free() */
ffc12bd4: 91 49 00 50 stw r10,80(r9)
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
ffc12bd8: 4b ff a3 61 bl ffc0cf38 <_Heap_Free>
ffc12bdc: 38 60 00 00 li r3,0
}
return HEAP_EXTEND_SUCCESSFUL;
}
ffc12be0: 80 01 00 0c lwz r0,12(r1)
ffc12be4: 38 21 00 08 addi r1,r1,8
ffc12be8: 7c 08 03 a6 mtlr r0
ffc12bec: 4e 80 00 20 blr
ffc0e068 <_Heap_Free>:
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 )
ffc0e068: 81 63 00 10 lwz r11,16(r3)
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
ffc0e06c: 7c 69 1b 78 mr r9,r3
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;
ffc0e070: 80 03 00 20 lwz r0,32(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
ffc0e074: 39 40 00 00 li r10,0
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 )
ffc0e078: 7c 84 5b 96 divwu r4,r4,r11
ffc0e07c: 7d 64 59 d6 mullw r11,r4,r11
ffc0e080: 39 6b ff f8 addi r11,r11,-8
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
ffc0e084: 7f 8b 00 40 cmplw cr7,r11,r0
ffc0e088: 41 9c 00 14 blt- cr7,ffc0e09c <_Heap_Free+0x34>
ffc0e08c: 81 43 00 24 lwz r10,36(r3)
ffc0e090: 7d 4b 50 10 subfc r10,r11,r10
ffc0e094: 39 40 00 00 li r10,0
ffc0e098: 7d 4a 51 14 adde r10,r10,r10
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
uintptr_t next_block_size = 0;
bool next_is_free = false;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
ffc0e09c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0e0a0: 41 9e 01 a8 beq- cr7,ffc0e248 <_Heap_Free+0x1e0>
- 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;
ffc0e0a4: 80 ab 00 04 lwz r5,4(r11)
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
ffc0e0a8: 38 e0 00 00 li r7,0
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
ffc0e0ac: 54 a8 00 3c rlwinm r8,r5,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);
ffc0e0b0: 7d 4b 42 14 add r10,r11,r8
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
ffc0e0b4: 7f 8a 00 40 cmplw cr7,r10,r0
ffc0e0b8: 41 9c 00 14 blt- cr7,ffc0e0cc <_Heap_Free+0x64> <== NEVER TAKEN
ffc0e0bc: 80 e9 00 24 lwz r7,36(r9)
ffc0e0c0: 7c ea 38 10 subfc r7,r10,r7
ffc0e0c4: 38 e0 00 00 li r7,0
ffc0e0c8: 7c e7 39 14 adde r7,r7,r7
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
ffc0e0cc: 2f 87 00 00 cmpwi cr7,r7,0
ffc0e0d0: 41 9e 01 78 beq- cr7,ffc0e248 <_Heap_Free+0x1e0> <== 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;
ffc0e0d4: 80 ca 00 04 lwz r6,4(r10)
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc0e0d8: 70 c3 00 01 andi. r3,r6,1
ffc0e0dc: 41 82 01 6c beq- ffc0e248 <_Heap_Free+0x1e0> <== NEVER TAKEN
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
ffc0e0e0: 81 89 00 24 lwz r12,36(r9)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
ffc0e0e4: 54 c6 00 3c rlwinm r6,r6,0,0,30
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
ffc0e0e8: 38 80 00 00 li r4,0
ffc0e0ec: 7f 8a 60 00 cmpw cr7,r10,r12
ffc0e0f0: 41 9e 00 14 beq- cr7,ffc0e104 <_Heap_Free+0x9c>
ffc0e0f4: 7c ea 32 14 add r7,r10,r6
ffc0e0f8: 80 87 00 04 lwz r4,4(r7)
ffc0e0fc: 54 84 07 fe clrlwi r4,r4,31
ffc0e100: 68 84 00 01 xori r4,r4,1
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
ffc0e104: 70 a7 00 01 andi. r7,r5,1
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
ffc0e108: 54 84 06 3e clrlwi r4,r4,24
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
ffc0e10c: 40 82 00 94 bne- ffc0e1a0 <_Heap_Free+0x138>
uintptr_t const prev_size = block->prev_size;
ffc0e110: 80 ab 00 00 lwz r5,0(r11)
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
ffc0e114: 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);
ffc0e118: 7c e5 58 50 subf r7,r5,r11
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
ffc0e11c: 7f 87 00 40 cmplw cr7,r7,r0
ffc0e120: 41 9c 00 10 blt- cr7,ffc0e130 <_Heap_Free+0xc8> <== NEVER TAKEN
ffc0e124: 7c 67 60 10 subfc r3,r7,r12
ffc0e128: 38 60 00 00 li r3,0
ffc0e12c: 7c 63 19 14 adde r3,r3,r3
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
ffc0e130: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e134: 41 9e 01 14 beq- cr7,ffc0e248 <_Heap_Free+0x1e0> <== NEVER TAKEN
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
ffc0e138: 80 07 00 04 lwz r0,4(r7)
ffc0e13c: 70 03 00 01 andi. r3,r0,1
ffc0e140: 41 82 01 08 beq- ffc0e248 <_Heap_Free+0x1e0> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
ffc0e144: 2f 84 00 00 cmpwi cr7,r4,0
ffc0e148: 41 9e 00 38 beq- cr7,ffc0e180 <_Heap_Free+0x118>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
ffc0e14c: 80 89 00 38 lwz r4,56(r9)
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
ffc0e150: 7c c8 32 14 add r6,r8,r6
ffc0e154: 7c a6 2a 14 add r5,r6,r5
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
ffc0e158: 81 6a 00 0c lwz r11,12(r10)
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
ffc0e15c: 81 4a 00 08 lwz r10,8(r10)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
ffc0e160: 38 c4 ff ff addi r6,r4,-1
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0e164: 60 a0 00 01 ori r0,r5,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;
ffc0e168: 90 c9 00 38 stw r6,56(r9)
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
ffc0e16c: 91 6a 00 0c stw r11,12(r10)
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;
ffc0e170: 7c a7 29 2e stwx r5,r7,r5
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0e174: 90 07 00 04 stw r0,4(r7)
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
ffc0e178: 91 4b 00 08 stw r10,8(r11)
ffc0e17c: 48 00 00 a0 b ffc0e21c <_Heap_Free+0x1b4>
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;
ffc0e180: 7c a8 2a 14 add r5,r8,r5
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0e184: 60 a0 00 01 ori r0,r5,1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
ffc0e188: 7c ab 41 2e stwx r5,r11,r8
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;
ffc0e18c: 90 07 00 04 stw r0,4(r7)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc0e190: 80 0a 00 04 lwz r0,4(r10)
ffc0e194: 54 00 00 3c rlwinm r0,r0,0,0,30
ffc0e198: 90 0a 00 04 stw r0,4(r10)
ffc0e19c: 48 00 00 80 b ffc0e21c <_Heap_Free+0x1b4>
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
ffc0e1a0: 2f 84 00 00 cmpwi cr7,r4,0
ffc0e1a4: 41 9e 00 30 beq- cr7,ffc0e1d4 <_Heap_Free+0x16c>
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
ffc0e1a8: 80 aa 00 0c lwz r5,12(r10)
uintptr_t const size = block_size + next_block_size;
ffc0e1ac: 7c e6 42 14 add r7,r6,r8
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
ffc0e1b0: 81 4a 00 08 lwz r10,8(r10)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0e1b4: 60 e0 00 01 ori r0,r7,1
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
ffc0e1b8: 90 ab 00 0c stw r5,12(r11)
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
ffc0e1bc: 91 4b 00 08 stw r10,8(r11)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
ffc0e1c0: 7c eb 39 2e stwx r7,r11,r7
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0e1c4: 90 0b 00 04 stw r0,4(r11)
new_block->prev = prev;
next->prev = new_block;
prev->next = new_block;
ffc0e1c8: 91 65 00 08 stw r11,8(r5)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
ffc0e1cc: 91 6a 00 0c stw r11,12(r10)
ffc0e1d0: 48 00 00 4c b ffc0e21c <_Heap_Free+0x1b4>
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;
ffc0e1d4: 61 00 00 01 ori r0,r8,1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
ffc0e1d8: 7d 0b 41 2e stwx r8,r11,r8
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;
ffc0e1dc: 90 0b 00 04 stw r0,4(r11)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc0e1e0: 80 0a 00 04 lwz r0,4(r10)
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
ffc0e1e4: 91 2b 00 0c stw r9,12(r11)
ffc0e1e8: 54 00 00 3c rlwinm r0,r0,0,0,30
ffc0e1ec: 90 0a 00 04 stw r0,4(r10)
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
ffc0e1f0: 80 e9 00 38 lwz r7,56(r9)
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
ffc0e1f4: 81 49 00 3c lwz r10,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;
ffc0e1f8: 38 07 00 01 addi r0,r7,1
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
ffc0e1fc: 7f 8a 00 40 cmplw cr7,r10,r0
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
ffc0e200: 81 49 00 08 lwz r10,8(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;
ffc0e204: 90 09 00 38 stw r0,56(r9)
new_block->next = next;
ffc0e208: 91 4b 00 08 stw r10,8(r11)
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
ffc0e20c: 91 6a 00 0c stw r11,12(r10)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
ffc0e210: 91 69 00 08 stw r11,8(r9)
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
ffc0e214: 40 9c 00 08 bge- cr7,ffc0e21c <_Heap_Free+0x1b4>
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
ffc0e218: 90 09 00 3c stw r0,60(r9)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
ffc0e21c: 80 09 00 30 lwz r0,48(r9)
ffc0e220: 38 60 00 01 li r3,1
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc0e224: 81 69 00 40 lwz r11,64(r9)
++stats->frees;
ffc0e228: 81 49 00 50 lwz r10,80(r9)
stats->free_size += block_size;
ffc0e22c: 7d 00 42 14 add r8,r0,r8
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc0e230: 39 6b ff ff addi r11,r11,-1
++stats->frees;
stats->free_size += block_size;
ffc0e234: 91 09 00 30 stw r8,48(r9)
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
ffc0e238: 38 0a 00 01 addi r0,r10,1
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc0e23c: 91 69 00 40 stw r11,64(r9)
++stats->frees;
ffc0e240: 90 09 00 50 stw r0,80(r9)
stats->free_size += block_size;
return( true );
ffc0e244: 4e 80 00 20 blr
ffc0e248: 38 60 00 00 li r3,0
}
ffc0e24c: 4e 80 00 20 blr
ffc1b958 <_Heap_Size_of_alloc_area>:
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 )
ffc1b958: 80 03 00 10 lwz r0,16(r3)
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;
ffc1b95c: 81 23 00 20 lwz r9,32(r3)
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 )
ffc1b960: 7d 64 03 96 divwu r11,r4,r0
ffc1b964: 7d 6b 01 d6 mullw r11,r11,r0
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
ffc1b968: 38 00 00 00 li r0,0
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 )
ffc1b96c: 39 6b ff f8 addi r11,r11,-8
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
ffc1b970: 7f 8b 48 40 cmplw cr7,r11,r9
ffc1b974: 41 9c 00 14 blt- cr7,ffc1b988 <_Heap_Size_of_alloc_area+0x30><== NEVER TAKEN
ffc1b978: 80 03 00 24 lwz r0,36(r3)
ffc1b97c: 7c 0b 00 10 subfc r0,r11,r0
ffc1b980: 38 00 00 00 li r0,0
ffc1b984: 7c 00 01 14 adde r0,r0,r0
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
ffc1b988: 2f 80 00 00 cmpwi cr7,r0,0
ffc1b98c: 41 9e 00 54 beq- cr7,ffc1b9e0 <_Heap_Size_of_alloc_area+0x88>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc1b990: 80 0b 00 04 lwz r0,4(r11)
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
ffc1b994: 39 40 00 00 li r10,0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc1b998: 54 00 00 3c rlwinm r0,r0,0,0,30
ffc1b99c: 7d 6b 02 14 add r11,r11,r0
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
ffc1b9a0: 7f 8b 48 40 cmplw cr7,r11,r9
ffc1b9a4: 41 9c 00 14 blt- cr7,ffc1b9b8 <_Heap_Size_of_alloc_area+0x60><== NEVER TAKEN
ffc1b9a8: 81 43 00 24 lwz r10,36(r3)
ffc1b9ac: 7d 4b 50 10 subfc r10,r11,r10
ffc1b9b0: 39 40 00 00 li r10,0
ffc1b9b4: 7d 4a 51 14 adde r10,r10,r10
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
ffc1b9b8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc1b9bc: 41 9e 00 24 beq- cr7,ffc1b9e0 <_Heap_Size_of_alloc_area+0x88><== NEVER TAKEN
ffc1b9c0: 80 0b 00 04 lwz r0,4(r11)
ffc1b9c4: 70 09 00 01 andi. r9,r0,1
ffc1b9c8: 41 82 00 18 beq- ffc1b9e0 <_Heap_Size_of_alloc_area+0x88><== NEVER TAKEN
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
ffc1b9cc: 20 84 00 04 subfic r4,r4,4
ffc1b9d0: 7d 64 5a 14 add r11,r4,r11
ffc1b9d4: 91 65 00 00 stw r11,0(r5)
ffc1b9d8: 38 60 00 01 li r3,1
return true;
ffc1b9dc: 4e 80 00 20 blr
ffc1b9e0: 38 60 00 00 li r3,0
}
ffc1b9e4: 4e 80 00 20 blr
ffc0a044 <_Heap_Walk>:
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
ffc0a044: 2f 85 00 00 cmpwi cr7,r5,0
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
ffc0a048: 94 21 ff 98 stwu r1,-104(r1)
ffc0a04c: 7c 08 02 a6 mflr r0
ffc0a050: 93 21 00 4c stw r25,76(r1)
ffc0a054: 90 01 00 6c stw r0,108(r1)
ffc0a058: 93 61 00 54 stw r27,84(r1)
ffc0a05c: 93 81 00 58 stw r28,88(r1)
ffc0a060: 93 a1 00 5c stw r29,92(r1)
ffc0a064: 7c 7d 1b 78 mr r29,r3
ffc0a068: 93 c1 00 60 stw r30,96(r1)
ffc0a06c: 7c 9e 23 78 mr r30,r4
ffc0a070: 93 e1 00 64 stw r31,100(r1)
ffc0a074: 91 c1 00 20 stw r14,32(r1)
ffc0a078: 91 e1 00 24 stw r15,36(r1)
ffc0a07c: 92 01 00 28 stw r16,40(r1)
ffc0a080: 92 21 00 2c stw r17,44(r1)
ffc0a084: 92 41 00 30 stw r18,48(r1)
ffc0a088: 92 61 00 34 stw r19,52(r1)
ffc0a08c: 92 81 00 38 stw r20,56(r1)
ffc0a090: 92 a1 00 3c stw r21,60(r1)
ffc0a094: 92 c1 00 40 stw r22,64(r1)
ffc0a098: 92 e1 00 44 stw r23,68(r1)
ffc0a09c: 93 01 00 48 stw r24,72(r1)
ffc0a0a0: 93 41 00 50 stw r26,80(r1)
uintptr_t const page_size = heap->page_size;
ffc0a0a4: 83 83 00 10 lwz r28,16(r3)
uintptr_t const min_block_size = heap->min_block_size;
ffc0a0a8: 83 63 00 14 lwz r27,20(r3)
Heap_Block *const last_block = heap->last_block;
ffc0a0ac: 83 23 00 24 lwz r25,36(r3)
Heap_Block *block = heap->first_block;
ffc0a0b0: 83 e3 00 20 lwz r31,32(r3)
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
ffc0a0b4: 40 9e 00 10 bne- cr7,ffc0a0c4 <_Heap_Walk+0x80>
ffc0a0b8: 3d 20 ff c1 lis r9,-63
ffc0a0bc: 39 29 a0 40 addi r9,r9,-24512
ffc0a0c0: 48 00 00 0c b ffc0a0cc <_Heap_Walk+0x88>
ffc0a0c4: 3d 20 ff c1 lis r9,-63
ffc0a0c8: 39 29 a5 dc addi r9,r9,-23076
ffc0a0cc: 91 21 00 18 stw r9,24(r1)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc0a0d0: 3d 20 00 00 lis r9,0
ffc0a0d4: 80 09 27 90 lwz r0,10128(r9)
ffc0a0d8: 2f 80 00 03 cmpwi cr7,r0,3
ffc0a0dc: 40 be 04 94 bne+ cr7,ffc0a570 <_Heap_Walk+0x52c>
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)(
ffc0a0e0: 80 1d 00 0c lwz r0,12(r29)
ffc0a0e4: 3c a0 ff c2 lis r5,-62
ffc0a0e8: 81 1d 00 18 lwz r8,24(r29)
ffc0a0ec: 38 a5 dd 70 addi r5,r5,-8848
ffc0a0f0: 81 3d 00 1c lwz r9,28(r29)
ffc0a0f4: 7f c3 f3 78 mr r3,r30
ffc0a0f8: 81 7d 00 08 lwz r11,8(r29)
ffc0a0fc: 38 80 00 00 li r4,0
ffc0a100: 90 01 00 10 stw r0,16(r1)
ffc0a104: 7f 86 e3 78 mr r6,r28
ffc0a108: 7f 67 db 78 mr r7,r27
ffc0a10c: 80 01 00 18 lwz r0,24(r1)
ffc0a110: 7f ea fb 78 mr r10,r31
ffc0a114: 91 61 00 0c stw r11,12(r1)
ffc0a118: 7c 09 03 a6 mtctr r0
ffc0a11c: 93 21 00 08 stw r25,8(r1)
ffc0a120: 4c c6 31 82 crclr 4*cr1+eq
ffc0a124: 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 ) {
ffc0a128: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0a12c: 40 be 00 14 bne+ cr7,ffc0a140 <_Heap_Walk+0xfc>
(*printer)( source, true, "page size is zero\n" );
ffc0a130: 3c a0 ff c2 lis r5,-62
ffc0a134: 7f c3 f3 78 mr r3,r30
ffc0a138: 38 a5 de 01 addi r5,r5,-8703
ffc0a13c: 48 00 00 c8 b ffc0a204 <_Heap_Walk+0x1c0>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
ffc0a140: 73 89 00 07 andi. r9,r28,7
ffc0a144: 41 a2 00 18 beq+ ffc0a15c <_Heap_Walk+0x118>
(*printer)(
ffc0a148: 3c a0 ff c2 lis r5,-62
ffc0a14c: 7f c3 f3 78 mr r3,r30
ffc0a150: 38 a5 de 14 addi r5,r5,-8684
ffc0a154: 7f 86 e3 78 mr r6,r28
ffc0a158: 48 00 03 8c b ffc0a4e4 <_Heap_Walk+0x4a0>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
ffc0a15c: 7c 1b e3 96 divwu r0,r27,r28
ffc0a160: 7c 00 e1 d6 mullw r0,r0,r28
ffc0a164: 7f 9b 00 00 cmpw cr7,r27,r0
ffc0a168: 41 be 00 18 beq+ cr7,ffc0a180 <_Heap_Walk+0x13c>
(*printer)(
ffc0a16c: 3c a0 ff c2 lis r5,-62
ffc0a170: 7f c3 f3 78 mr r3,r30
ffc0a174: 38 a5 de 32 addi r5,r5,-8654
ffc0a178: 7f 66 db 78 mr r6,r27
ffc0a17c: 48 00 03 68 b ffc0a4e4 <_Heap_Walk+0x4a0>
);
return false;
}
if (
ffc0a180: 38 1f 00 08 addi r0,r31,8
ffc0a184: 7d 20 e3 96 divwu r9,r0,r28
ffc0a188: 7d 29 e1 d6 mullw r9,r9,r28
ffc0a18c: 7f 80 48 00 cmpw cr7,r0,r9
ffc0a190: 41 be 00 14 beq+ cr7,ffc0a1a4 <_Heap_Walk+0x160>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
ffc0a194: 3c a0 ff c2 lis r5,-62
ffc0a198: 7f c3 f3 78 mr r3,r30
ffc0a19c: 38 a5 de 56 addi r5,r5,-8618
ffc0a1a0: 48 00 03 40 b ffc0a4e0 <_Heap_Walk+0x49c>
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
ffc0a1a4: 80 1f 00 04 lwz r0,4(r31)
ffc0a1a8: 70 09 00 01 andi. r9,r0,1
ffc0a1ac: 40 a2 00 14 bne+ ffc0a1c0 <_Heap_Walk+0x17c>
(*printer)(
ffc0a1b0: 3c a0 ff c2 lis r5,-62
ffc0a1b4: 7f c3 f3 78 mr r3,r30
ffc0a1b8: 38 a5 de 87 addi r5,r5,-8569
ffc0a1bc: 48 00 00 48 b ffc0a204 <_Heap_Walk+0x1c0>
);
return false;
}
if ( first_block->prev_size != page_size ) {
ffc0a1c0: 83 5f 00 00 lwz r26,0(r31)
ffc0a1c4: 7f 9a e0 00 cmpw cr7,r26,r28
ffc0a1c8: 41 be 00 18 beq+ cr7,ffc0a1e0 <_Heap_Walk+0x19c>
(*printer)(
ffc0a1cc: 3c a0 ff c2 lis r5,-62
ffc0a1d0: 7f c3 f3 78 mr r3,r30
ffc0a1d4: 38 a5 de b5 addi r5,r5,-8523
ffc0a1d8: 7f 46 d3 78 mr r6,r26
ffc0a1dc: 48 00 02 18 b ffc0a3f4 <_Heap_Walk+0x3b0>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
ffc0a1e0: 81 39 00 04 lwz r9,4(r25)
ffc0a1e4: 55 29 00 3c rlwinm r9,r9,0,0,30
ffc0a1e8: 7d 39 4a 14 add r9,r25,r9
ffc0a1ec: 80 09 00 04 lwz r0,4(r9)
ffc0a1f0: 70 09 00 01 andi. r9,r0,1
ffc0a1f4: 40 a2 00 28 bne+ ffc0a21c <_Heap_Walk+0x1d8>
(*printer)(
ffc0a1f8: 3c a0 ff c2 lis r5,-62
ffc0a1fc: 7f c3 f3 78 mr r3,r30
ffc0a200: 38 a5 de e0 addi r5,r5,-8480
ffc0a204: 80 01 00 18 lwz r0,24(r1)
ffc0a208: 38 80 00 01 li r4,1
ffc0a20c: 7c 09 03 a6 mtctr r0
ffc0a210: 4c c6 31 82 crclr 4*cr1+eq
ffc0a214: 4e 80 04 21 bctrl
ffc0a218: 48 00 02 e0 b ffc0a4f8 <_Heap_Walk+0x4b4>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
ffc0a21c: 81 3d 00 10 lwz r9,16(r29)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0a220: 7f a0 eb 78 mr r0,r29
ffc0a224: 80 dd 00 08 lwz r6,8(r29)
ffc0a228: 48 00 00 a4 b ffc0a2cc <_Heap_Walk+0x288>
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
ffc0a22c: 81 1d 00 20 lwz r8,32(r29)
ffc0a230: 7f 88 30 40 cmplw cr7,r8,r6
ffc0a234: 41 9d 00 14 bgt- cr7,ffc0a248 <_Heap_Walk+0x204>
ffc0a238: 81 7d 00 24 lwz r11,36(r29)
ffc0a23c: 7d 66 58 10 subfc r11,r6,r11
ffc0a240: 39 60 00 00 li r11,0
ffc0a244: 7d 6b 59 14 adde r11,r11,r11
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
ffc0a248: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0a24c: 40 be 00 14 bne+ cr7,ffc0a260 <_Heap_Walk+0x21c>
(*printer)(
ffc0a250: 3c a0 ff c2 lis r5,-62
ffc0a254: 7f c3 f3 78 mr r3,r30
ffc0a258: 38 a5 de f5 addi r5,r5,-8459
ffc0a25c: 48 00 02 88 b ffc0a4e4 <_Heap_Walk+0x4a0>
);
return false;
}
if (
ffc0a260: 7d 6a 4b 96 divwu r11,r10,r9
ffc0a264: 7d 6b 49 d6 mullw r11,r11,r9
ffc0a268: 7f 8a 58 00 cmpw cr7,r10,r11
ffc0a26c: 41 be 00 14 beq+ cr7,ffc0a280 <_Heap_Walk+0x23c>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
ffc0a270: 3c a0 ff c2 lis r5,-62
ffc0a274: 7f c3 f3 78 mr r3,r30
ffc0a278: 38 a5 df 15 addi r5,r5,-8427
ffc0a27c: 48 00 02 68 b ffc0a4e4 <_Heap_Walk+0x4a0>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0a280: 81 66 00 04 lwz r11,4(r6)
ffc0a284: 55 6b 00 3c rlwinm r11,r11,0,0,30
ffc0a288: 7d 66 5a 14 add r11,r6,r11
ffc0a28c: 81 6b 00 04 lwz r11,4(r11)
ffc0a290: 71 6a 00 01 andi. r10,r11,1
ffc0a294: 41 a2 00 14 beq+ ffc0a2a8 <_Heap_Walk+0x264>
(*printer)(
ffc0a298: 3c a0 ff c2 lis r5,-62
ffc0a29c: 7f c3 f3 78 mr r3,r30
ffc0a2a0: 38 a5 df 45 addi r5,r5,-8379
ffc0a2a4: 48 00 02 40 b ffc0a4e4 <_Heap_Walk+0x4a0>
);
return false;
}
if ( free_block->prev != prev_block ) {
ffc0a2a8: 80 e6 00 0c lwz r7,12(r6)
ffc0a2ac: 7f 87 00 00 cmpw cr7,r7,r0
return false;
}
prev_block = free_block;
free_block = free_block->next;
ffc0a2b0: 7c c0 33 78 mr r0,r6
);
return false;
}
if ( free_block->prev != prev_block ) {
ffc0a2b4: 41 be 00 14 beq+ cr7,ffc0a2c8 <_Heap_Walk+0x284>
(*printer)(
ffc0a2b8: 3c a0 ff c2 lis r5,-62
ffc0a2bc: 7f c3 f3 78 mr r3,r30
ffc0a2c0: 38 a5 df 61 addi r5,r5,-8351
ffc0a2c4: 48 00 01 34 b ffc0a3f8 <_Heap_Walk+0x3b4>
return false;
}
prev_block = free_block;
free_block = free_block->next;
ffc0a2c8: 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 ) {
ffc0a2cc: 7f 86 e8 00 cmpw cr7,r6,r29
);
return false;
}
if (
ffc0a2d0: 39 46 00 08 addi r10,r6,8
ffc0a2d4: 39 60 00 00 li r11,0
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 ) {
ffc0a2d8: 40 9e ff 54 bne+ cr7,ffc0a22c <_Heap_Walk+0x1e8>
ffc0a2dc: 48 00 02 4c b ffc0a528 <_Heap_Walk+0x4e4>
- 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;
ffc0a2e0: 83 1f 00 04 lwz r24,4(r31)
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
ffc0a2e4: 73 09 00 01 andi. r9,r24,1
ffc0a2e8: 57 18 00 3c rlwinm r24,r24,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);
ffc0a2ec: 7f 9f c2 14 add r28,r31,r24
ffc0a2f0: 41 82 00 2c beq- ffc0a31c <_Heap_Walk+0x2d8>
(*printer)(
ffc0a2f4: 80 01 00 18 lwz r0,24(r1)
ffc0a2f8: 7f c3 f3 78 mr r3,r30
ffc0a2fc: 38 80 00 00 li r4,0
ffc0a300: 7e 85 a3 78 mr r5,r20
ffc0a304: 7c 09 03 a6 mtctr r0
ffc0a308: 7f e6 fb 78 mr r6,r31
ffc0a30c: 7f 07 c3 78 mr r7,r24
ffc0a310: 4c c6 31 82 crclr 4*cr1+eq
ffc0a314: 4e 80 04 21 bctrl
ffc0a318: 48 00 00 2c b ffc0a344 <_Heap_Walk+0x300>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0a31c: 80 01 00 18 lwz r0,24(r1)
ffc0a320: 7f c3 f3 78 mr r3,r30
ffc0a324: 38 80 00 00 li r4,0
ffc0a328: 81 1f 00 00 lwz r8,0(r31)
ffc0a32c: 7e 65 9b 78 mr r5,r19
ffc0a330: 7c 09 03 a6 mtctr r0
ffc0a334: 7f e6 fb 78 mr r6,r31
ffc0a338: 7f 07 c3 78 mr r7,r24
ffc0a33c: 4c c6 31 82 crclr 4*cr1+eq
ffc0a340: 4e 80 04 21 bctrl
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
ffc0a344: 81 3d 00 20 lwz r9,32(r29)
ffc0a348: 38 00 00 00 li r0,0
ffc0a34c: 7f 89 e0 40 cmplw cr7,r9,r28
ffc0a350: 41 9d 00 14 bgt- cr7,ffc0a364 <_Heap_Walk+0x320> <== NEVER TAKEN
ffc0a354: 80 1d 00 24 lwz r0,36(r29)
ffc0a358: 7c 1c 00 10 subfc r0,r28,r0
ffc0a35c: 38 00 00 00 li r0,0
ffc0a360: 7c 00 01 14 adde r0,r0,r0
block_size,
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
ffc0a364: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a368: 40 be 00 14 bne+ cr7,ffc0a37c <_Heap_Walk+0x338>
(*printer)(
ffc0a36c: 3c a0 ff c2 lis r5,-62
ffc0a370: 7f c3 f3 78 mr r3,r30
ffc0a374: 38 a5 df cf addi r5,r5,-8241
ffc0a378: 48 00 00 78 b ffc0a3f0 <_Heap_Walk+0x3ac>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
ffc0a37c: 7c 18 d3 96 divwu r0,r24,r26
ffc0a380: 7c 00 d1 d6 mullw r0,r0,r26
ffc0a384: 7f 98 00 00 cmpw cr7,r24,r0
ffc0a388: 41 be 00 1c beq+ cr7,ffc0a3a4 <_Heap_Walk+0x360>
(*printer)(
ffc0a38c: 3c a0 ff c2 lis r5,-62
ffc0a390: 7f c3 f3 78 mr r3,r30
ffc0a394: 38 a5 df fc addi r5,r5,-8196
ffc0a398: 7f e6 fb 78 mr r6,r31
ffc0a39c: 7f 07 c3 78 mr r7,r24
ffc0a3a0: 48 00 00 58 b ffc0a3f8 <_Heap_Walk+0x3b4>
);
return false;
}
if ( block_size < min_block_size ) {
ffc0a3a4: 7f 98 d8 40 cmplw cr7,r24,r27
ffc0a3a8: 40 bc 00 34 bge+ cr7,ffc0a3dc <_Heap_Walk+0x398>
(*printer)(
ffc0a3ac: 80 01 00 18 lwz r0,24(r1)
ffc0a3b0: 3c a0 ff c2 lis r5,-62
ffc0a3b4: 7f c3 f3 78 mr r3,r30
ffc0a3b8: 38 a5 e0 2a addi r5,r5,-8150
ffc0a3bc: 7c 09 03 a6 mtctr r0
ffc0a3c0: 7f e6 fb 78 mr r6,r31
ffc0a3c4: 7f 07 c3 78 mr r7,r24
ffc0a3c8: 7f 68 db 78 mr r8,r27
ffc0a3cc: 38 80 00 01 li r4,1
ffc0a3d0: 4c c6 31 82 crclr 4*cr1+eq
ffc0a3d4: 4e 80 04 21 bctrl
ffc0a3d8: 48 00 01 20 b ffc0a4f8 <_Heap_Walk+0x4b4>
);
return false;
}
if ( next_block_begin <= block_begin ) {
ffc0a3dc: 7f 9c f8 40 cmplw cr7,r28,r31
ffc0a3e0: 41 bd 00 30 bgt+ cr7,ffc0a410 <_Heap_Walk+0x3cc>
(*printer)(
ffc0a3e4: 3c a0 ff c2 lis r5,-62
ffc0a3e8: 7f c3 f3 78 mr r3,r30
ffc0a3ec: 38 a5 e0 55 addi r5,r5,-8107
ffc0a3f0: 7f e6 fb 78 mr r6,r31
ffc0a3f4: 7f 87 e3 78 mr r7,r28
ffc0a3f8: 80 01 00 18 lwz r0,24(r1)
ffc0a3fc: 38 80 00 01 li r4,1
ffc0a400: 7c 09 03 a6 mtctr r0
ffc0a404: 4c c6 31 82 crclr 4*cr1+eq
ffc0a408: 4e 80 04 21 bctrl
ffc0a40c: 48 00 00 ec b ffc0a4f8 <_Heap_Walk+0x4b4>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc0a410: 80 1c 00 04 lwz r0,4(r28)
ffc0a414: 70 09 00 01 andi. r9,r0,1
ffc0a418: 40 82 01 08 bne- ffc0a520 <_Heap_Walk+0x4dc>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0a41c: 80 1d 00 08 lwz r0,8(r29)
ffc0a420: 7d c8 73 78 mr r8,r14
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)(
ffc0a424: 80 ff 00 0c lwz r7,12(r31)
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;
ffc0a428: 82 bf 00 04 lwz r21,4(r31)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0a42c: 7f 87 00 00 cmpw cr7,r7,r0
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
ffc0a430: 80 1d 00 0c lwz r0,12(r29)
- 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;
ffc0a434: 56 b8 00 3c rlwinm r24,r21,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc0a438: 7e df c2 14 add r22,r31,r24
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0a43c: 41 9e 00 14 beq- cr7,ffc0a450 <_Heap_Walk+0x40c>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0a440: 7f 87 e8 00 cmpw cr7,r7,r29
ffc0a444: 7e e8 bb 78 mr r8,r23
ffc0a448: 40 be 00 08 bne+ cr7,ffc0a450 <_Heap_Walk+0x40c>
ffc0a44c: 7d e8 7b 78 mr r8,r15
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)(
ffc0a450: 81 3f 00 08 lwz r9,8(r31)
ffc0a454: 7e 0a 83 78 mr r10,r16
ffc0a458: 7f 89 00 00 cmpw cr7,r9,r0
ffc0a45c: 41 9e 00 14 beq- cr7,ffc0a470 <_Heap_Walk+0x42c>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0a460: 7f 89 e8 00 cmpw cr7,r9,r29
ffc0a464: 7e ea bb 78 mr r10,r23
ffc0a468: 40 be 00 08 bne+ cr7,ffc0a470 <_Heap_Walk+0x42c>
ffc0a46c: 7e 2a 8b 78 mr r10,r17
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)(
ffc0a470: 80 01 00 18 lwz r0,24(r1)
ffc0a474: 7f c3 f3 78 mr r3,r30
ffc0a478: 38 80 00 00 li r4,0
ffc0a47c: 7e 45 93 78 mr r5,r18
ffc0a480: 7c 09 03 a6 mtctr r0
ffc0a484: 7f e6 fb 78 mr r6,r31
ffc0a488: 4c c6 31 82 crclr 4*cr1+eq
ffc0a48c: 4e 80 04 21 bctrl
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
ffc0a490: 81 16 00 00 lwz r8,0(r22)
ffc0a494: 7f 98 40 00 cmpw cr7,r24,r8
ffc0a498: 41 9e 00 34 beq- cr7,ffc0a4cc <_Heap_Walk+0x488>
(*printer)(
ffc0a49c: 80 01 00 18 lwz r0,24(r1)
ffc0a4a0: 3c a0 ff c2 lis r5,-62
ffc0a4a4: 7f c3 f3 78 mr r3,r30
ffc0a4a8: 38 a5 e0 de addi r5,r5,-7970
ffc0a4ac: 7c 09 03 a6 mtctr r0
ffc0a4b0: 7f e6 fb 78 mr r6,r31
ffc0a4b4: 7f 07 c3 78 mr r7,r24
ffc0a4b8: 7e c9 b3 78 mr r9,r22
ffc0a4bc: 38 80 00 01 li r4,1
ffc0a4c0: 4c c6 31 82 crclr 4*cr1+eq
ffc0a4c4: 4e 80 04 21 bctrl
ffc0a4c8: 48 00 00 30 b ffc0a4f8 <_Heap_Walk+0x4b4>
);
return false;
}
if ( !prev_used ) {
ffc0a4cc: 72 a9 00 01 andi. r9,r21,1
ffc0a4d0: 40 a2 00 30 bne+ ffc0a500 <_Heap_Walk+0x4bc>
(*printer)(
ffc0a4d4: 3c a0 ff c2 lis r5,-62
ffc0a4d8: 7f c3 f3 78 mr r3,r30
ffc0a4dc: 38 a5 e1 17 addi r5,r5,-7913
ffc0a4e0: 7f e6 fb 78 mr r6,r31
ffc0a4e4: 80 01 00 18 lwz r0,24(r1)
ffc0a4e8: 38 80 00 01 li r4,1
ffc0a4ec: 7c 09 03 a6 mtctr r0
ffc0a4f0: 4c c6 31 82 crclr 4*cr1+eq
ffc0a4f4: 4e 80 04 21 bctrl
ffc0a4f8: 38 60 00 00 li r3,0
ffc0a4fc: 48 00 00 78 b ffc0a574 <_Heap_Walk+0x530>
ffc0a500: 81 3d 00 08 lwz r9,8(r29)
ffc0a504: 48 00 00 0c b ffc0a510 <_Heap_Walk+0x4cc>
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
if ( free_block == block ) {
ffc0a508: 41 9a 00 18 beq- cr6,ffc0a520 <_Heap_Walk+0x4dc>
return true;
}
free_block = free_block->next;
ffc0a50c: 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 ) {
ffc0a510: 7f 89 e8 00 cmpw cr7,r9,r29
if ( free_block == block ) {
ffc0a514: 7f 09 f8 00 cmpw cr6,r9,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 ) {
ffc0a518: 40 9e ff f0 bne+ cr7,ffc0a508 <_Heap_Walk+0x4c4>
ffc0a51c: 48 00 00 b0 b ffc0a5cc <_Heap_Walk+0x588>
ffc0a520: 7f 9f e3 78 mr r31,r28
ffc0a524: 48 00 00 44 b ffc0a568 <_Heap_Walk+0x524>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0a528: 3e 60 ff c2 lis r19,-62
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
(*printer)(
ffc0a52c: 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)(
ffc0a530: 3e 40 ff c2 lis r18,-62
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0a534: 3e 20 ff c2 lis r17,-62
ffc0a538: 3e e0 ff c2 lis r23,-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)(
ffc0a53c: 3e 00 ff c2 lis r16,-62
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0a540: 3d e0 ff c2 lis r15,-62
ffc0a544: 3d c0 ff c2 lis r14,-62
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0a548: 3a 73 df aa addi r19,r19,-8278
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
(*printer)(
ffc0a54c: 3a 94 df 93 addi r20,r20,-8301
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)(
ffc0a550: 3a 52 e0 b2 addi r18,r18,-8014
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0a554: 3a 31 e0 a8 addi r17,r17,-8024
ffc0a558: 3a f7 dc bc addi r23,r23,-9028
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)(
ffc0a55c: 3a 10 e0 9e addi r16,r16,-8034
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0a560: 39 ef e0 94 addi r15,r15,-8044
ffc0a564: 39 ce e0 89 addi r14,r14,-8055
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
ffc0a568: 7f 9f c8 00 cmpw cr7,r31,r25
ffc0a56c: 40 9e fd 74 bne+ cr7,ffc0a2e0 <_Heap_Walk+0x29c>
ffc0a570: 38 60 00 01 li r3,1
block = next_block;
}
return true;
}
ffc0a574: 80 01 00 6c lwz r0,108(r1)
ffc0a578: 81 c1 00 20 lwz r14,32(r1)
ffc0a57c: 7c 08 03 a6 mtlr r0
ffc0a580: 81 e1 00 24 lwz r15,36(r1)
ffc0a584: 82 01 00 28 lwz r16,40(r1)
ffc0a588: 82 21 00 2c lwz r17,44(r1)
ffc0a58c: 82 41 00 30 lwz r18,48(r1)
ffc0a590: 82 61 00 34 lwz r19,52(r1)
ffc0a594: 82 81 00 38 lwz r20,56(r1)
ffc0a598: 82 a1 00 3c lwz r21,60(r1)
ffc0a59c: 82 c1 00 40 lwz r22,64(r1)
ffc0a5a0: 82 e1 00 44 lwz r23,68(r1)
ffc0a5a4: 83 01 00 48 lwz r24,72(r1)
ffc0a5a8: 83 21 00 4c lwz r25,76(r1)
ffc0a5ac: 83 41 00 50 lwz r26,80(r1)
ffc0a5b0: 83 61 00 54 lwz r27,84(r1)
ffc0a5b4: 83 81 00 58 lwz r28,88(r1)
ffc0a5b8: 83 a1 00 5c lwz r29,92(r1)
ffc0a5bc: 83 c1 00 60 lwz r30,96(r1)
ffc0a5c0: 83 e1 00 64 lwz r31,100(r1)
ffc0a5c4: 38 21 00 68 addi r1,r1,104
ffc0a5c8: 4e 80 00 20 blr
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
ffc0a5cc: 3c a0 ff c2 lis r5,-62
ffc0a5d0: 7f c3 f3 78 mr r3,r30
ffc0a5d4: 38 a5 e1 46 addi r5,r5,-7866
ffc0a5d8: 4b ff ff 08 b ffc0a4e0 <_Heap_Walk+0x49c>
ffc0a5dc <_Heap_Walk_print>:
{
/* Do nothing */
}
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc0a5dc: 94 21 ff 88 stwu r1,-120(r1)
ffc0a5e0: 7c 08 02 a6 mflr r0
ffc0a5e4: 93 e1 00 74 stw r31,116(r1)
ffc0a5e8: 90 01 00 7c stw r0,124(r1)
ffc0a5ec: 7c 60 1b 78 mr r0,r3
ffc0a5f0: 90 c1 00 1c stw r6,28(r1)
ffc0a5f4: 90 e1 00 20 stw r7,32(r1)
ffc0a5f8: 91 01 00 24 stw r8,36(r1)
ffc0a5fc: 91 21 00 28 stw r9,40(r1)
ffc0a600: 91 41 00 2c stw r10,44(r1)
ffc0a604: 40 86 00 24 bne- cr1,ffc0a628 <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN
ffc0a608: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc0a60c: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc0a610: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc0a614: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc0a618: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc0a61c: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc0a620: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc0a624: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list ap;
if ( error ) {
ffc0a628: 2f 84 00 00 cmpwi cr7,r4,0
{
/* Do nothing */
}
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc0a62c: 7c bf 2b 78 mr r31,r5
va_list ap;
if ( error ) {
ffc0a630: 41 be 00 10 beq+ cr7,ffc0a640 <_Heap_Walk_print+0x64>
printk( "FAIL[%d]: ", source );
ffc0a634: 3c 60 ff c2 lis r3,-62
ffc0a638: 38 63 e1 71 addi r3,r3,-7823
ffc0a63c: 48 00 00 0c b ffc0a648 <_Heap_Walk_print+0x6c>
} else {
printk( "PASS[%d]: ", source );
ffc0a640: 3c 60 ff c2 lis r3,-62
ffc0a644: 38 63 e1 7c addi r3,r3,-7812
ffc0a648: 7c 04 03 78 mr r4,r0
ffc0a64c: 4c c6 31 82 crclr 4*cr1+eq
ffc0a650: 4b ff b4 a5 bl ffc05af4 <printk>
}
va_start( ap, fmt );
ffc0a654: 38 00 00 03 li r0,3
ffc0a658: 98 01 00 08 stb r0,8(r1)
ffc0a65c: 38 00 00 00 li r0,0
vprintk( fmt, ap );
ffc0a660: 7f e3 fb 78 mr r3,r31
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0a664: 98 01 00 09 stb r0,9(r1)
ffc0a668: 38 01 00 80 addi r0,r1,128
vprintk( fmt, ap );
ffc0a66c: 38 81 00 08 addi r4,r1,8
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0a670: 90 01 00 0c stw r0,12(r1)
ffc0a674: 38 01 00 10 addi r0,r1,16
ffc0a678: 90 01 00 10 stw r0,16(r1)
vprintk( fmt, ap );
ffc0a67c: 4b ff d4 d5 bl ffc07b50 <vprintk>
va_end( ap );
}
ffc0a680: 80 01 00 7c lwz r0,124(r1)
ffc0a684: 83 e1 00 74 lwz r31,116(r1)
ffc0a688: 38 21 00 78 addi r1,r1,120
ffc0a68c: 7c 08 03 a6 mtlr r0
ffc0a690: 4e 80 00 20 blr
ffc0864c <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc0864c: 94 21 ff d8 stwu r1,-40(r1)
ffc08650: 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;
ffc08654: 3d 20 00 00 lis r9,0
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc08658: 90 01 00 2c stw r0,44(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;
ffc0865c: 39 29 20 a0 addi r9,r9,8352
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc08660: 93 c1 00 20 stw r30,32(r1)
ffc08664: 93 e1 00 24 stw r31,36(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;
ffc08668: 83 c9 00 2c lwz r30,44(r9)
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
drivers_in_table = Configuration.number_of_device_drivers;
ffc0866c: 83 e9 00 30 lwz r31,48(r9)
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc08670: 93 61 00 14 stw r27,20(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 )
ffc08674: 7f 9e f8 40 cmplw cr7,r30,r31
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc08678: 93 81 00 18 stw r28,24(r1)
ffc0867c: 3f 80 00 00 lis r28,0
ffc08680: 93 a1 00 1c stw r29,28(r1)
ffc08684: 3f a0 00 00 lis r29,0
ffc08688: 93 21 00 0c stw r25,12(r1)
ffc0868c: 93 41 00 10 stw r26,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;
ffc08690: 83 69 00 34 lwz r27,52(r9)
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
ffc08694: 40 9d 00 40 ble- cr7,ffc086d4 <_IO_Manager_initialization+0x88>
* 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 )
ffc08698: 1f 3e 00 18 mulli r25,r30,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 *)
ffc0869c: 7f 23 cb 78 mr r3,r25
ffc086a0: 48 00 35 d9 bl ffc0bc78 <_Workspace_Allocate_or_fatal_error>
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
ffc086a4: 7f 25 cb 78 mr r5,r25
ffc086a8: 38 80 00 00 li r4,0
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
ffc086ac: 93 dd 27 a4 stw r30,10148(r29)
/*
* 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 *)
ffc086b0: 7c 7a 1b 78 mr r26,r3
ffc086b4: 90 7c 27 a8 stw r3,10152(r28)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
ffc086b8: 48 00 8c 19 bl ffc112d0 <memset>
ffc086bc: 2f 9f 00 00 cmpwi cr7,r31,0
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
ffc086c0: 39 40 00 00 li r10,0
ffc086c4: 3b ff 00 01 addi r31,r31,1
ffc086c8: 40 be 00 4c bne+ cr7,ffc08714 <_IO_Manager_initialization+0xc8><== ALWAYS TAKEN
ffc086cc: 3b e0 00 01 li r31,1 <== NOT EXECUTED
ffc086d0: 48 00 00 44 b ffc08714 <_IO_Manager_initialization+0xc8><== NOT EXECUTED
* 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;
ffc086d4: 93 7c 27 a8 stw r27,10152(r28)
_IO_Number_of_drivers = number_of_drivers;
ffc086d8: 93 fd 27 a4 stw r31,10148(r29)
return;
ffc086dc: 48 00 00 48 b ffc08724 <_IO_Manager_initialization+0xd8>
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
ffc086e0: 7c c9 50 6e lwzux r6,r9,r10
ffc086e4: 81 09 00 08 lwz r8,8(r9)
ffc086e8: 80 09 00 0c lwz r0,12(r9)
ffc086ec: 80 e9 00 04 lwz r7,4(r9)
ffc086f0: 7c da 51 2e stwx r6,r26,r10
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
ffc086f4: 39 4a 00 18 addi r10,r10,24
_IO_Driver_address_table[index] = driver_table[index];
ffc086f8: 90 eb 00 04 stw r7,4(r11)
ffc086fc: 91 0b 00 08 stw r8,8(r11)
ffc08700: 90 0b 00 0c stw r0,12(r11)
ffc08704: 81 09 00 14 lwz r8,20(r9)
ffc08708: 80 09 00 10 lwz r0,16(r9)
ffc0870c: 91 0b 00 14 stw r8,20(r11)
ffc08710: 90 0b 00 10 stw r0,16(r11)
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
ffc08714: 37 ff ff ff addic. r31,r31,-1
_IO_Driver_address_table[index] = driver_table[index];
ffc08718: 7f 69 db 78 mr r9,r27
ffc0871c: 7d 7a 52 14 add r11,r26,r10
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
ffc08720: 40 82 ff c0 bne+ ffc086e0 <_IO_Manager_initialization+0x94>
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
ffc08724: 80 01 00 2c lwz r0,44(r1)
ffc08728: 83 21 00 0c lwz r25,12(r1)
ffc0872c: 7c 08 03 a6 mtlr r0
ffc08730: 83 41 00 10 lwz r26,16(r1)
ffc08734: 83 61 00 14 lwz r27,20(r1)
ffc08738: 83 81 00 18 lwz r28,24(r1)
ffc0873c: 83 a1 00 1c lwz r29,28(r1)
ffc08740: 83 c1 00 20 lwz r30,32(r1)
ffc08744: 83 e1 00 24 lwz r31,36(r1)
ffc08748: 38 21 00 28 addi r1,r1,40
ffc0874c: 4e 80 00 20 blr
ffc093c0 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc093c0: 94 21 ff f0 stwu r1,-16(r1)
ffc093c4: 7c 08 02 a6 mflr r0
_Internal_errors_What_happened.the_source = the_source;
ffc093c8: 3d 60 00 00 lis r11,0
ffc093cc: 39 2b 2c 90 addi r9,r11,11408
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc093d0: 90 01 00 14 stw r0,20(r1)
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
ffc093d4: 90 a9 00 08 stw r5,8(r9)
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
ffc093d8: 98 89 00 04 stb r4,4(r9)
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc093dc: 93 e1 00 0c stw r31,12(r1)
ffc093e0: 7c bf 2b 78 mr r31,r5
_Internal_errors_What_happened.the_source = the_source;
ffc093e4: 90 6b 2c 90 stw r3,11408(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 );
ffc093e8: 48 00 23 19 bl ffc0b700 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
ffc093ec: 38 00 00 05 li r0,5
ffc093f0: 3d 20 00 00 lis r9,0
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
ffc093f4: 7f e3 fb 78 mr r3,r31
ffc093f8: 90 09 27 90 stw r0,10128(r9)
ffc093fc: 4b ff a3 55 bl ffc03750 <_BSP_Fatal_error>
ffc09400: 48 00 00 00 b ffc09400 <_Internal_error_Occurred+0x40><== NOT EXECUTED
ffc09420 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc09420: 94 21 ff f0 stwu r1,-16(r1)
ffc09424: 7c 08 02 a6 mflr r0
ffc09428: 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 )
ffc0942c: 80 03 00 18 lwz r0,24(r3)
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc09430: 93 e1 00 0c stw r31,12(r1)
ffc09434: 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 )
ffc09438: 2f 80 00 00 cmpwi cr7,r0,0
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc0943c: 93 c1 00 08 stw r30,8(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 )
ffc09440: 38 60 00 00 li r3,0
ffc09444: 41 be 00 70 beq+ cr7,ffc094b4 <_Objects_Allocate+0x94> <== NEVER TAKEN
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
ffc09448: 3b df 00 20 addi r30,r31,32
ffc0944c: 7f c3 f3 78 mr r3,r30
ffc09450: 4b ff f5 f9 bl ffc08a48 <_Chain_Get>
if ( information->auto_extend ) {
ffc09454: 88 1f 00 12 lbz r0,18(r31)
ffc09458: 2f 80 00 00 cmpwi cr7,r0,0
ffc0945c: 41 9e 00 58 beq- cr7,ffc094b4 <_Objects_Allocate+0x94>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
ffc09460: 2f 83 00 00 cmpwi cr7,r3,0
ffc09464: 40 be 00 1c bne+ cr7,ffc09480 <_Objects_Allocate+0x60>
_Objects_Extend_information( information );
ffc09468: 7f e3 fb 78 mr r3,r31
ffc0946c: 48 00 00 95 bl ffc09500 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
ffc09470: 7f c3 f3 78 mr r3,r30
ffc09474: 4b ff f5 d5 bl ffc08a48 <_Chain_Get>
}
if ( the_object ) {
ffc09478: 2c 03 00 00 cmpwi r3,0
ffc0947c: 41 a2 00 38 beq+ ffc094b4 <_Objects_Allocate+0x94>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
ffc09480: a1 63 00 0a lhz r11,10(r3)
ffc09484: a0 1f 00 0a lhz r0,10(r31)
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
ffc09488: a1 3f 00 14 lhz r9,20(r31)
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
ffc0948c: 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--;
ffc09490: a1 7f 00 2c lhz r11,44(r31)
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
ffc09494: 7c 00 4b 96 divwu r0,r0,r9
ffc09498: 81 3f 00 30 lwz r9,48(r31)
ffc0949c: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc094a0: 7d 49 00 2e lwzx r10,r9,r0
information->inactive--;
ffc094a4: 39 6b ff ff addi r11,r11,-1
ffc094a8: b1 7f 00 2c sth r11,44(r31)
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
ffc094ac: 39 4a ff ff addi r10,r10,-1
ffc094b0: 7d 49 01 2e stwx r10,r9,r0
information->inactive--;
}
}
return the_object;
}
ffc094b4: 80 01 00 14 lwz r0,20(r1)
ffc094b8: 83 c1 00 08 lwz r30,8(r1)
ffc094bc: 7c 08 03 a6 mtlr r0
ffc094c0: 83 e1 00 0c lwz r31,12(r1)
ffc094c4: 38 21 00 10 addi r1,r1,16
ffc094c8: 4e 80 00 20 blr
ffc09500 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc09500: 94 21 ff b8 stwu r1,-72(r1)
ffc09504: 7c 08 02 a6 mflr r0
ffc09508: 90 01 00 4c stw r0,76(r1)
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc0950c: 81 63 00 34 lwz r11,52(r3)
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc09510: 93 61 00 34 stw r27,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 )
ffc09514: 2f 8b 00 00 cmpwi cr7,r11,0
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc09518: 93 e1 00 44 stw r31,68(r1)
ffc0951c: 7c 7f 1b 78 mr r31,r3
ffc09520: 92 a1 00 1c stw r21,28(r1)
ffc09524: 92 c1 00 20 stw r22,32(r1)
ffc09528: 92 e1 00 24 stw r23,36(r1)
ffc0952c: 93 01 00 28 stw r24,40(r1)
ffc09530: 93 21 00 2c stw r25,44(r1)
ffc09534: 93 41 00 30 stw r26,48(r1)
ffc09538: 93 81 00 38 stw r28,56(r1)
ffc0953c: 93 a1 00 3c stw r29,60(r1)
ffc09540: 93 c1 00 40 stw r30,64(r1)
/*
* Search for a free block of indexes. The block variable ends up set
* to block_count + 1 if the table needs to be extended.
*/
minimum_index = _Objects_Get_index( information->minimum_id );
ffc09544: a3 63 00 0a lhz r27,10(r3)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc09548: 40 be 00 14 bne+ cr7,ffc0955c <_Objects_Extend_information+0x5c>
ffc0954c: 7f 7e db 78 mr r30,r27
ffc09550: 3b 80 00 00 li r28,0
ffc09554: 3b 40 00 00 li r26,0
ffc09558: 48 00 00 4c b ffc095a4 <_Objects_Extend_information+0xa4>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc0955c: a1 23 00 14 lhz r9,20(r3)
ffc09560: 7f 7e db 78 mr r30,r27
ffc09564: a3 43 00 10 lhz r26,16(r3)
ffc09568: 3b 80 00 00 li r28,0
ffc0956c: 7f 5a 4b 96 divwu r26,r26,r9
ffc09570: 2f 9a 00 00 cmpwi cr7,r26,0
ffc09574: 38 1a 00 01 addi r0,r26,1
ffc09578: 40 be 00 20 bne+ cr7,ffc09598 <_Objects_Extend_information+0x98><== ALWAYS TAKEN
ffc0957c: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc09580: 48 00 00 18 b ffc09598 <_Objects_Extend_information+0x98><== NOT EXECUTED
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL )
ffc09584: 7d 4b 50 2e lwzx r10,r11,r10
ffc09588: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0958c: 41 9e 00 18 beq- cr7,ffc095a4 <_Objects_Extend_information+0xa4>
ffc09590: 7f de 4a 14 add r30,r30,r9
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc09594: 3b 9c 00 01 addi r28,r28,1
ffc09598: 34 00 ff ff addic. r0,r0,-1
if ( information->object_blocks[ block ] == NULL )
ffc0959c: 57 8a 10 3a rlwinm r10,r28,2,0,29
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc095a0: 40 82 ff e4 bne+ ffc09584 <_Objects_Extend_information+0x84>
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
ffc095a4: a0 1f 00 14 lhz r0,20(r31)
ffc095a8: a2 df 00 10 lhz r22,16(r31)
ffc095ac: 7e c0 b2 14 add r22,r0,r22
/*
* 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 ) {
ffc095b0: 2b 96 ff ff cmplwi cr7,r22,65535
ffc095b4: 41 9d 02 1c bgt- cr7,ffc097d0 <_Objects_Extend_information+0x2d0><== NEVER TAKEN
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
ffc095b8: 89 3f 00 12 lbz r9,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;
ffc095bc: 80 7f 00 18 lwz r3,24(r31)
if ( information->auto_extend ) {
ffc095c0: 2f 89 00 00 cmpwi cr7,r9,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;
ffc095c4: 7c 60 19 d6 mullw r3,r0,r3
if ( information->auto_extend ) {
ffc095c8: 41 9e 00 14 beq- cr7,ffc095dc <_Objects_Extend_information+0xdc>
new_object_block = _Workspace_Allocate( block_size );
ffc095cc: 48 00 26 f5 bl ffc0bcc0 <_Workspace_Allocate>
if ( !new_object_block )
ffc095d0: 7c 7d 1b 79 mr. r29,r3
ffc095d4: 40 a2 00 10 bne+ ffc095e4 <_Objects_Extend_information+0xe4>
ffc095d8: 48 00 01 f8 b ffc097d0 <_Objects_Extend_information+0x2d0>
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
ffc095dc: 48 00 26 9d bl ffc0bc78 <_Workspace_Allocate_or_fatal_error>
ffc095e0: 7c 7d 1b 78 mr r29,r3
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
ffc095e4: a0 1f 00 10 lhz r0,16(r31)
ffc095e8: 7f 9e 00 40 cmplw cr7,r30,r0
ffc095ec: 41 9c 01 5c blt- cr7,ffc09748 <_Objects_Extend_information+0x248>
*/
/*
* Up the block count and maximum
*/
block_count++;
ffc095f0: 3b 3a 00 01 addi r25,r26,1
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
ffc095f4: 1c 19 00 03 mulli r0,r25,3
ffc095f8: 7c 76 da 14 add r3,r22,r27
ffc095fc: 7c 63 02 14 add r3,r3,r0
ffc09600: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc09604: 48 00 26 bd bl ffc0bcc0 <_Workspace_Allocate>
if ( !object_blocks ) {
ffc09608: 7c 77 1b 79 mr. r23,r3
ffc0960c: 40 a2 00 10 bne+ ffc0961c <_Objects_Extend_information+0x11c>
_Workspace_Free( new_object_block );
ffc09610: 7f a3 eb 78 mr r3,r29
ffc09614: 48 00 26 e1 bl ffc0bcf4 <_Workspace_Free>
return;
ffc09618: 48 00 01 b8 b ffc097d0 <_Objects_Extend_information+0x2d0>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc0961c: a0 1f 00 10 lhz r0,16(r31)
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
ffc09620: 57 39 10 3a rlwinm r25,r25,2,0,29
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
ffc09624: 7f 17 ca 14 add r24,r23,r25
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc09628: 7f 80 d8 40 cmplw cr7,r0,r27
ffc0962c: 7f 38 ca 14 add r25,r24,r25
ffc09630: 41 9d 00 20 bgt- cr7,ffc09650 <_Objects_Extend_information+0x150>
ffc09634: 2f 9b 00 00 cmpwi cr7,r27,0
ffc09638: 39 20 00 00 li r9,0
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
ffc0963c: 38 00 00 00 li r0,0
ffc09640: 3b 7b 00 01 addi r27,r27,1
ffc09644: 40 be 00 50 bne+ cr7,ffc09694 <_Objects_Extend_information+0x194><== ALWAYS TAKEN
ffc09648: 3b 60 00 01 li r27,1 <== NOT EXECUTED
ffc0964c: 48 00 00 48 b ffc09694 <_Objects_Extend_information+0x194><== NOT EXECUTED
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
information->object_blocks,
block_count * sizeof(void*) );
ffc09650: 57 55 10 3a rlwinm r21,r26,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,
ffc09654: 80 9f 00 34 lwz r4,52(r31)
ffc09658: 7e a5 ab 78 mr r5,r21
ffc0965c: 48 00 7b 75 bl ffc111d0 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
ffc09660: 80 9f 00 30 lwz r4,48(r31)
ffc09664: 7e a5 ab 78 mr r5,r21
ffc09668: 7f 03 c3 78 mr r3,r24
ffc0966c: 48 00 7b 65 bl ffc111d0 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
ffc09670: a0 1f 00 10 lhz r0,16(r31)
ffc09674: 80 9f 00 1c lwz r4,28(r31)
ffc09678: 7f 23 cb 78 mr r3,r25
ffc0967c: 7f 7b 02 14 add r27,r27,r0
ffc09680: 57 65 10 3a rlwinm r5,r27,2,0,29
ffc09684: 48 00 7b 4d bl ffc111d0 <memcpy>
ffc09688: 48 00 00 18 b ffc096a0 <_Objects_Extend_information+0x1a0>
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
ffc0968c: 7c 0b c9 2e stwx r0,r11,r25
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc09690: 39 29 00 01 addi r9,r9,1
ffc09694: 37 7b ff ff addic. r27,r27,-1
local_table[ index ] = NULL;
ffc09698: 55 2b 10 3a rlwinm r11,r9,2,0,29
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc0969c: 40 82 ff f0 bne+ ffc0968c <_Objects_Extend_information+0x18c>
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
ffc096a0: a1 5f 00 14 lhz r10,20(r31)
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
ffc096a4: 38 00 00 00 li r0,0
ffc096a8: 57 5a 10 3a rlwinm r26,r26,2,0,29
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc096ac: 7d 7e 52 14 add r11,r30,r10
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
ffc096b0: 7c 18 d1 2e stwx r0,r24,r26
ffc096b4: 7f 9e 58 40 cmplw cr7,r30,r11
for ( index=index_base ;
index < ( information->allocation_size + index_base );
ffc096b8: 57 c9 10 3a rlwinm r9,r30,2,0,29
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
ffc096bc: 7c 17 d1 2e stwx r0,r23,r26
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
ffc096c0: 7d 39 4a 14 add r9,r25,r9
index++ ) {
local_table[ index ] = NULL;
ffc096c4: 38 0a 00 01 addi r0,r10,1
ffc096c8: 39 40 00 00 li r10,0
ffc096cc: 41 9d 00 0c bgt- cr7,ffc096d8 <_Objects_Extend_information+0x1d8><== NEVER TAKEN
ffc096d0: 2f 8b 00 00 cmpwi cr7,r11,0
ffc096d4: 40 be 00 14 bne+ cr7,ffc096e8 <_Objects_Extend_information+0x1e8><== ALWAYS TAKEN
ffc096d8: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc096dc: 48 00 00 0c b ffc096e8 <_Objects_Extend_information+0x1e8><== NOT EXECUTED
ffc096e0: 91 49 00 00 stw r10,0(r9)
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
ffc096e4: 39 29 00 04 addi r9,r9,4
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
ffc096e8: 34 00 ff ff addic. r0,r0,-1
ffc096ec: 40 82 ff f4 bne+ ffc096e0 <_Objects_Extend_information+0x1e0>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc096f0: 7c 00 00 a6 mfmsr r0
ffc096f4: 7d 30 42 a6 mfsprg r9,0
ffc096f8: 7c 09 48 78 andc r9,r0,r9
ffc096fc: 7d 20 01 24 mtmsr r9
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
ffc09700: 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;
ffc09704: 56 d6 04 3e clrlwi r22,r22,16
information->maximum_id = _Objects_Build_id(
ffc09708: a1 3f 00 04 lhz r9,4(r31)
ffc0970c: 55 6b c0 0e rlwinm r11,r11,24,0,7
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
ffc09710: 80 7f 00 34 lwz r3,52(r31)
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
ffc09714: 65 6b 00 01 oris r11,r11,1
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
ffc09718: 93 1f 00 30 stw r24,48(r31)
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
ffc0971c: 55 29 d8 08 rlwinm r9,r9,27,0,4
ffc09720: 7d 69 4b 78 or r9,r11,r9
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
ffc09724: 93 3f 00 1c stw r25,28(r31)
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
ffc09728: 7d 29 b3 78 or r9,r9,r22
ffc0972c: 91 3f 00 0c stw r9,12(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;
ffc09730: b2 df 00 10 sth r22,16(r31)
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
ffc09734: 92 ff 00 34 stw r23,52(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc09738: 7c 00 01 24 mtmsr r0
information->maximum
);
_ISR_Enable( level );
if ( old_tables )
ffc0973c: 2f 83 00 00 cmpwi cr7,r3,0
ffc09740: 41 9e 00 08 beq- cr7,ffc09748 <_Objects_Extend_information+0x248>
_Workspace_Free( old_tables );
ffc09744: 48 00 25 b1 bl ffc0bcf4 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
ffc09748: 81 3f 00 34 lwz r9,52(r31)
ffc0974c: 57 9c 10 3a rlwinm r28,r28,2,0,29
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc09750: 3b 61 00 08 addi r27,r1,8
ffc09754: 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;
ffc09758: 7f a9 e1 2e stwx r29,r9,r28
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0975c: 7f a4 eb 78 mr r4,r29
ffc09760: 7f 63 db 78 mr r3,r27
ffc09764: 80 df 00 18 lwz r6,24(r31)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc09768: 3b bf 00 20 addi r29,r31,32
information->object_blocks[ block ] = new_object_block;
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0976c: 48 00 44 79 bl ffc0dbe4 <_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 ) {
ffc09770: 48 00 00 2c b ffc0979c <_Objects_Extend_information+0x29c>
the_object->id = _Objects_Build_id(
ffc09774: 81 7f 00 00 lwz r11,0(r31)
ffc09778: a0 1f 00 04 lhz r0,4(r31)
ffc0977c: 55 6b c0 0e rlwinm r11,r11,24,0,7
ffc09780: 65 6b 00 01 oris r11,r11,1
ffc09784: 54 00 d8 08 rlwinm r0,r0,27,0,4
ffc09788: 7d 60 03 78 or r0,r11,r0
ffc0978c: 7c 00 f3 78 or r0,r0,r30
ffc09790: 90 09 00 08 stw r0,8(r9)
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
ffc09794: 3b de 00 01 addi r30,r30,1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc09798: 4b ff f2 81 bl ffc08a18 <_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 ) {
ffc0979c: 7f 63 db 78 mr r3,r27
ffc097a0: 4b ff f2 a9 bl ffc08a48 <_Chain_Get>
ffc097a4: 7c 69 1b 79 mr. r9,r3
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc097a8: 7f a3 eb 78 mr r3,r29
ffc097ac: 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 ) {
ffc097b0: 40 82 ff c4 bne+ ffc09774 <_Objects_Extend_information+0x274>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc097b4: a0 1f 00 14 lhz r0,20(r31)
information->inactive =
ffc097b8: a1 3f 00 2c lhz r9,44(r31)
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc097bc: 81 7f 00 30 lwz r11,48(r31)
information->inactive =
ffc097c0: 7d 20 4a 14 add r9,r0,r9
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc097c4: 54 00 04 3e clrlwi r0,r0,16
information->inactive =
ffc097c8: b1 3f 00 2c sth r9,44(r31)
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc097cc: 7c 0b e1 2e stwx r0,r11,r28
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
ffc097d0: 80 01 00 4c lwz r0,76(r1)
ffc097d4: 82 a1 00 1c lwz r21,28(r1)
ffc097d8: 7c 08 03 a6 mtlr r0
ffc097dc: 82 c1 00 20 lwz r22,32(r1)
ffc097e0: 82 e1 00 24 lwz r23,36(r1)
ffc097e4: 83 01 00 28 lwz r24,40(r1)
ffc097e8: 83 21 00 2c lwz r25,44(r1)
ffc097ec: 83 41 00 30 lwz r26,48(r1)
ffc097f0: 83 61 00 34 lwz r27,52(r1)
ffc097f4: 83 81 00 38 lwz r28,56(r1)
ffc097f8: 83 a1 00 3c lwz r29,60(r1)
ffc097fc: 83 c1 00 40 lwz r30,64(r1)
ffc09800: 83 e1 00 44 lwz r31,68(r1)
ffc09804: 38 21 00 48 addi r1,r1,72
ffc09808: 4e 80 00 20 blr
ffc098d8 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
ffc098d8: 94 21 ff f0 stwu r1,-16(r1)
ffc098dc: 7c 08 02 a6 mflr r0
ffc098e0: 93 e1 00 0c stw r31,12(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc098e4: 7c 9f 23 79 mr. r31,r4
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
ffc098e8: 93 c1 00 08 stw r30,8(r1)
ffc098ec: 7c 7e 1b 78 mr r30,r3
ffc098f0: 90 01 00 14 stw r0,20(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc098f4: 41 a2 00 4c beq+ ffc09940 <_Objects_Get_information+0x68>
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
ffc098f8: 48 00 49 59 bl ffc0e250 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
ffc098fc: 2c 03 00 00 cmpwi r3,0
ffc09900: 41 a2 00 40 beq+ ffc09940 <_Objects_Get_information+0x68>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
ffc09904: 7f 9f 18 40 cmplw cr7,r31,r3
ffc09908: 41 bd 00 38 bgt+ cr7,ffc09940 <_Objects_Get_information+0x68>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
ffc0990c: 3d 20 00 00 lis r9,0
ffc09910: 57 de 10 3a rlwinm r30,r30,2,0,29
ffc09914: 39 29 2b 80 addi r9,r9,11136
ffc09918: 7d 29 f0 2e lwzx r9,r9,r30
ffc0991c: 2f 89 00 00 cmpwi cr7,r9,0
ffc09920: 41 be 00 20 beq+ cr7,ffc09940 <_Objects_Get_information+0x68><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
ffc09924: 57 ff 10 3a rlwinm r31,r31,2,0,29
ffc09928: 7c 69 f8 2e lwzx r3,r9,r31
if ( !info )
ffc0992c: 2f 83 00 00 cmpwi cr7,r3,0
ffc09930: 41 be 00 14 beq+ cr7,ffc09944 <_Objects_Get_information+0x6c><== NEVER TAKEN
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
ffc09934: a0 03 00 10 lhz r0,16(r3)
ffc09938: 2f 80 00 00 cmpwi cr7,r0,0
ffc0993c: 40 be 00 08 bne+ cr7,ffc09944 <_Objects_Get_information+0x6c>
ffc09940: 38 60 00 00 li r3,0
return NULL;
#endif
return info;
}
ffc09944: 80 01 00 14 lwz r0,20(r1)
ffc09948: 83 c1 00 08 lwz r30,8(r1)
ffc0994c: 7c 08 03 a6 mtlr r0
ffc09950: 83 e1 00 0c lwz r31,12(r1)
ffc09954: 38 21 00 10 addi r1,r1,16
ffc09958: 4e 80 00 20 blr
ffc1c6d0 <_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;
ffc1c6d0: 81 23 00 08 lwz r9,8(r3)
if ( information->maximum >= index ) {
ffc1c6d4: 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;
ffc1c6d8: 21 29 00 01 subfic r9,r9,1
ffc1c6dc: 7d 29 22 14 add r9,r9,r4
if ( information->maximum >= index ) {
ffc1c6e0: 7f 80 48 40 cmplw cr7,r0,r9
ffc1c6e4: 41 9c 00 24 blt- cr7,ffc1c708 <_Objects_Get_no_protection+0x38>
if ( (the_object = information->local_table[ index ]) != NULL ) {
ffc1c6e8: 81 63 00 1c lwz r11,28(r3)
ffc1c6ec: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc1c6f0: 7c 6b 48 2e lwzx r3,r11,r9
ffc1c6f4: 2f 83 00 00 cmpwi cr7,r3,0
ffc1c6f8: 41 9e 00 10 beq- cr7,ffc1c708 <_Objects_Get_no_protection+0x38><== NEVER TAKEN
*location = OBJECTS_LOCAL;
ffc1c6fc: 38 00 00 00 li r0,0
ffc1c700: 90 05 00 00 stw r0,0(r5)
return the_object;
ffc1c704: 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;
ffc1c708: 38 00 00 01 li r0,1
ffc1c70c: 90 05 00 00 stw r0,0(r5)
ffc1c710: 38 60 00 00 li r3,0
return NULL;
}
ffc1c714: 4e 80 00 20 blr
ffc0b3b0 <_Objects_Id_to_name>:
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
ffc0b3b0: 2c 03 00 00 cmpwi r3,0
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
ffc0b3b4: 94 21 ff e0 stwu r1,-32(r1)
ffc0b3b8: 7c 08 02 a6 mflr r0
ffc0b3bc: 93 e1 00 1c stw r31,28(r1)
ffc0b3c0: 7c 9f 23 78 mr r31,r4
ffc0b3c4: 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;
ffc0b3c8: 41 82 00 0c beq- ffc0b3d4 <_Objects_Id_to_name+0x24>
ffc0b3cc: 7c 64 1b 78 mr r4,r3
ffc0b3d0: 48 00 00 10 b ffc0b3e0 <_Objects_Id_to_name+0x30>
ffc0b3d4: 3d 20 00 00 lis r9,0
ffc0b3d8: 81 29 27 98 lwz r9,10136(r9)
ffc0b3dc: 80 89 00 08 lwz r4,8(r9)
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
ffc0b3e0: 54 89 47 7e rlwinm r9,r4,8,29,31
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
ffc0b3e4: 38 09 ff ff addi r0,r9,-1
ffc0b3e8: 2b 80 00 03 cmplwi cr7,r0,3
ffc0b3ec: 41 9d 00 3c bgt- cr7,ffc0b428 <_Objects_Id_to_name+0x78>
ffc0b3f0: 48 00 00 50 b ffc0b440 <_Objects_Id_to_name+0x90>
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
ffc0b3f4: 54 80 3e 7a rlwinm r0,r4,7,25,29
ffc0b3f8: 7c 69 00 2e lwzx r3,r9,r0
if ( !information )
ffc0b3fc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b400: 41 9e 00 28 beq- cr7,ffc0b428 <_Objects_Id_to_name+0x78><== 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 );
ffc0b404: 38 a1 00 08 addi r5,r1,8
ffc0b408: 4b ff ff 19 bl ffc0b320 <_Objects_Get>
if ( !the_object )
ffc0b40c: 2c 03 00 00 cmpwi r3,0
ffc0b410: 41 82 00 18 beq- ffc0b428 <_Objects_Id_to_name+0x78>
return OBJECTS_INVALID_ID;
*name = the_object->name;
ffc0b414: 80 03 00 0c lwz r0,12(r3)
ffc0b418: 90 1f 00 00 stw r0,0(r31)
_Thread_Enable_dispatch();
ffc0b41c: 48 00 0a 7d bl ffc0be98 <_Thread_Enable_dispatch>
ffc0b420: 38 60 00 00 li r3,0
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
ffc0b424: 48 00 00 08 b ffc0b42c <_Objects_Id_to_name+0x7c>
ffc0b428: 38 60 00 03 li r3,3
}
ffc0b42c: 80 01 00 24 lwz r0,36(r1)
ffc0b430: 83 e1 00 1c lwz r31,28(r1)
ffc0b434: 38 21 00 20 addi r1,r1,32
ffc0b438: 7c 08 03 a6 mtlr r0
ffc0b43c: 4e 80 00 20 blr
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
ffc0b440: 3d 60 00 00 lis r11,0
ffc0b444: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0b448: 39 6b 2b e0 addi r11,r11,11232
ffc0b44c: 7d 2b 48 2e lwzx r9,r11,r9
ffc0b450: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b454: 40 9e ff a0 bne+ cr7,ffc0b3f4 <_Objects_Id_to_name+0x44>
ffc0b458: 4b ff ff d0 b ffc0b428 <_Objects_Id_to_name+0x78>
ffc09a5c <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
ffc09a5c: 7c 08 02 a6 mflr r0
ffc09a60: 94 21 ff f8 stwu r1,-8(r1)
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
ffc09a64: 3d 40 00 00 lis r10,0
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
ffc09a68: 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;
ffc09a6c: 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) {
ffc09a70: 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;
ffc09a74: 39 4a 2b 80 addi r10,r10,11136
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
information->size = size;
ffc09a78: 90 e3 00 18 stw r7,24(r3)
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
ffc09a7c: 54 8b 10 3a rlwinm r11,r4,2,0,29
ffc09a80: 7d 6a 58 2e lwzx r11,r10,r11
ffc09a84: 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;
ffc09a88: 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;
ffc09a8c: 90 83 00 00 stw r4,0(r3)
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
ffc09a90: 54 c6 00 7e clrlwi r6,r6,1
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
ffc09a94: 7c 6b 41 2e stwx r3,r11,r8
/*
* 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;
ffc09a98: b1 43 00 10 sth r10,16(r3)
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
ffc09a9c: b0 a3 00 04 sth r5,4(r3)
information->size = size;
information->local_table = 0;
ffc09aa0: 91 43 00 1c stw r10,28(r3)
information->inactive_per_block = 0;
ffc09aa4: 91 43 00 30 stw r10,48(r3)
information->object_blocks = 0;
ffc09aa8: 91 43 00 34 stw r10,52(r3)
information->inactive = 0;
ffc09aac: b1 43 00 2c sth r10,44(r3)
_Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
ffc09ab0: 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) {
ffc09ab4: 41 9e 00 1c beq- cr7,ffc09ad0 <_Objects_Initialize_information+0x74>
ffc09ab8: 2f 86 00 00 cmpwi cr7,r6,0
ffc09abc: 40 be 00 14 bne+ cr7,ffc09ad0 <_Objects_Initialize_information+0x74>
_Internal_error_Occurred(
ffc09ac0: 38 60 00 00 li r3,0
ffc09ac4: 38 80 00 01 li r4,1
ffc09ac8: 38 a0 00 14 li r5,20
ffc09acc: 4b ff f8 f5 bl ffc093c0 <_Internal_error_Occurred>
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
ffc09ad0: 71 20 00 03 andi. r0,r9,3
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
ffc09ad4: b0 c3 00 14 sth r6,20(r3)
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
ffc09ad8: 54 84 c0 0e rlwinm r4,r4,24,0,7
ffc09adc: 64 84 00 01 oris r4,r4,1
ffc09ae0: 54 a5 d8 08 rlwinm r5,r5,27,0,4
ffc09ae4: 7c 06 00 d0 neg r0,r6
ffc09ae8: 54 00 0f fe rlwinm r0,r0,1,31,31
ffc09aec: 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;
ffc09af0: 3d 60 00 00 lis r11,0
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
ffc09af4: 7c a5 03 78 or r5,r5,r0
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;
ffc09af8: 39 6b 28 f4 addi r11,r11,10484
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
ffc09afc: 90 a3 00 08 stw r5,8(r3)
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
ffc09b00: 38 09 00 04 addi r0,r9,4
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;
ffc09b04: 91 63 00 1c stw r11,28(r3)
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
ffc09b08: 54 00 00 3a rlwinm r0,r0,0,0,29
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
ffc09b0c: 40 82 00 08 bne- ffc09b14 <_Objects_Initialize_information+0xb8><== NEVER TAKEN
ffc09b10: 7d 20 4b 78 mr r0,r9
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
ffc09b14: 2f 86 00 00 cmpwi cr7,r6,0
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
ffc09b18: b0 03 00 38 sth r0,56(r3)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
ffc09b1c: 39 63 00 24 addi r11,r3,36
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
ffc09b20: 39 23 00 20 addi r9,r3,32
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
ffc09b24: 91 63 00 20 stw r11,32(r3)
the_chain->permanent_null = NULL;
ffc09b28: 38 00 00 00 li r0,0
ffc09b2c: 90 03 00 24 stw r0,36(r3)
the_chain->last = _Chain_Head(the_chain);
ffc09b30: 91 23 00 28 stw r9,40(r3)
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
ffc09b34: 41 be 00 08 beq+ cr7,ffc09b3c <_Objects_Initialize_information+0xe0>
/*
* 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 );
ffc09b38: 4b ff f9 c9 bl ffc09500 <_Objects_Extend_information>
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
ffc09b3c: 80 01 00 0c lwz r0,12(r1)
ffc09b40: 38 21 00 08 addi r1,r1,8
ffc09b44: 7c 08 03 a6 mtlr r0
ffc09b48: 4e 80 00 20 blr
ffc09be4 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc09be4: 94 21 ff e8 stwu r1,-24(r1)
ffc09be8: 7c 08 02 a6 mflr r0
/*
* 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) /
ffc09bec: 39 20 00 00 li r9,0
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc09bf0: 90 01 00 1c stw r0,28(r1)
ffc09bf4: 93 c1 00 10 stw r30,16(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) /
ffc09bf8: 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 );
ffc09bfc: a3 c3 00 0a lhz r30,10(r3)
block_count = (information->maximum - index_base) /
ffc09c00: a1 63 00 14 lhz r11,20(r3)
ffc09c04: 7d 5e 50 50 subf r10,r30,r10
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc09c08: 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) /
ffc09c0c: 7d 4a 5b 96 divwu r10,r10,r11
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc09c10: 93 81 00 08 stw r28,8(r1)
ffc09c14: 93 a1 00 0c stw r29,12(r1)
ffc09c18: 2f 8a 00 00 cmpwi cr7,r10,0
ffc09c1c: 7c 7f 1b 78 mr r31,r3
/*
* 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) /
ffc09c20: 38 0a 00 01 addi r0,r10,1
ffc09c24: 40 be 00 88 bne+ cr7,ffc09cac <_Objects_Shrink_information+0xc8><== ALWAYS TAKEN
ffc09c28: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc09c2c: 48 00 00 80 b ffc09cac <_Objects_Shrink_information+0xc8><== NOT EXECUTED
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
ffc09c30: 81 5f 00 30 lwz r10,48(r31)
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
ffc09c34: 39 29 00 01 addi r9,r9,1
if ( information->inactive_per_block[ block ] ==
ffc09c38: 7d 4a e8 2e lwzx r10,r10,r29
ffc09c3c: 7f 8a 58 00 cmpw cr7,r10,r11
ffc09c40: 40 be 00 68 bne+ cr7,ffc09ca8 <_Objects_Shrink_information+0xc4>
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
ffc09c44: 80 7f 00 20 lwz r3,32(r31)
do {
index = _Objects_Get_index( the_object->id );
ffc09c48: 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;
ffc09c4c: 83 83 00 00 lwz r28,0(r3)
if ((index >= index_base) &&
ffc09c50: 7f 80 f0 40 cmplw cr7,r0,r30
ffc09c54: 41 9c 00 18 blt- cr7,ffc09c6c <_Objects_Shrink_information+0x88>
(index < (index_base + information->allocation_size))) {
ffc09c58: a1 3f 00 14 lhz r9,20(r31)
ffc09c5c: 7d 3e 4a 14 add r9,r30,r9
ffc09c60: 7f 80 48 40 cmplw cr7,r0,r9
ffc09c64: 40 bc 00 08 bge+ cr7,ffc09c6c <_Objects_Shrink_information+0x88>
_Chain_Extract( &extract_me->Node );
ffc09c68: 48 00 3f 55 bl ffc0dbbc <_Chain_Extract>
}
}
while ( the_object );
ffc09c6c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc09c70: 7f 83 e3 78 mr r3,r28
ffc09c74: 40 9e ff d4 bne+ cr7,ffc09c48 <_Objects_Shrink_information+0x64>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
ffc09c78: 81 3f 00 34 lwz r9,52(r31)
ffc09c7c: 7c 69 e8 2e lwzx r3,r9,r29
ffc09c80: 48 00 20 75 bl ffc0bcf4 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
ffc09c84: a1 5f 00 2c lhz r10,44(r31)
ffc09c88: a0 1f 00 14 lhz r0,20(r31)
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
ffc09c8c: 81 3f 00 34 lwz r9,52(r31)
information->inactive_per_block[ block ] = 0;
ffc09c90: 81 7f 00 30 lwz r11,48(r31)
information->inactive -= information->allocation_size;
ffc09c94: 7c 00 50 50 subf r0,r0,r10
ffc09c98: b0 1f 00 2c sth r0,44(r31)
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
ffc09c9c: 7f 8b e9 2e stwx r28,r11,r29
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
ffc09ca0: 7f 89 e9 2e stwx r28,r9,r29
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
ffc09ca4: 48 00 00 14 b ffc09cb8 <_Objects_Shrink_information+0xd4>
}
index_base += information->allocation_size;
ffc09ca8: 7f de 5a 14 add r30,r30,r11
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
ffc09cac: 34 00 ff ff addic. r0,r0,-1
ffc09cb0: 55 3d 10 3a rlwinm r29,r9,2,0,29
ffc09cb4: 40 82 ff 7c bne+ ffc09c30 <_Objects_Shrink_information+0x4c>
return;
}
index_base += information->allocation_size;
}
}
ffc09cb8: 80 01 00 1c lwz r0,28(r1)
ffc09cbc: 83 81 00 08 lwz r28,8(r1)
ffc09cc0: 7c 08 03 a6 mtlr r0
ffc09cc4: 83 a1 00 0c lwz r29,12(r1)
ffc09cc8: 83 c1 00 10 lwz r30,16(r1)
ffc09ccc: 83 e1 00 14 lwz r31,20(r1)
ffc09cd0: 38 21 00 18 addi r1,r1,24
ffc09cd4: 4e 80 00 20 blr
ffc0d8d0 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
ffc0d8d0: 94 21 ff d8 stwu r1,-40(r1)
ffc0d8d4: 7c 08 02 a6 mflr r0
ffc0d8d8: 90 01 00 2c stw r0,44(r1)
ffc0d8dc: 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 ];
ffc0d8e0: 83 e3 01 40 lwz r31,320(r3)
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
ffc0d8e4: 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 )
ffc0d8e8: 2f 9f 00 00 cmpwi cr7,r31,0
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
ffc0d8ec: 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 )
ffc0d8f0: 41 9e 00 80 beq- cr7,ffc0d970 <_RTEMS_tasks_Post_switch_extension+0xa0><== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0d8f4: 7c 00 00 a6 mfmsr r0
ffc0d8f8: 7d 30 42 a6 mfsprg r9,0
ffc0d8fc: 7c 09 48 78 andc r9,r0,r9
ffc0d900: 7d 20 01 24 mtmsr r9
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
asr->signals_posted = 0;
ffc0d904: 39 20 00 00 li r9,0
*/
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
ffc0d908: 83 bf 00 14 lwz r29,20(r31)
asr->signals_posted = 0;
ffc0d90c: 91 3f 00 14 stw r9,20(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0d910: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
ffc0d914: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0d918: 41 be 00 58 beq+ cr7,ffc0d970 <_RTEMS_tasks_Post_switch_extension+0xa0><== NEVER TAKEN
return;
asr->nest_level += 1;
ffc0d91c: 81 3f 00 1c lwz r9,28(r31)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0d920: 3b c1 00 08 addi r30,r1,8
ffc0d924: 80 7f 00 10 lwz r3,16(r31)
ffc0d928: 38 80 00 00 li r4,0
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
ffc0d92c: 38 09 00 01 addi r0,r9,1
ffc0d930: 90 1f 00 1c stw r0,28(r31)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0d934: 60 84 ff ff ori r4,r4,65535
ffc0d938: 7f c5 f3 78 mr r5,r30
ffc0d93c: 48 00 20 9d bl ffc0f9d8 <rtems_task_mode>
(*asr->handler)( signal_set );
ffc0d940: 80 1f 00 0c lwz r0,12(r31)
ffc0d944: 7f a3 eb 78 mr r3,r29
ffc0d948: 7c 09 03 a6 mtctr r0
ffc0d94c: 4e 80 04 21 bctrl
asr->nest_level -= 1;
ffc0d950: 81 3f 00 1c lwz r9,28(r31)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0d954: 38 80 00 00 li r4,0
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
ffc0d958: 38 09 ff ff addi r0,r9,-1
ffc0d95c: 90 1f 00 1c stw r0,28(r31)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0d960: 60 84 ff ff ori r4,r4,65535
ffc0d964: 7f c5 f3 78 mr r5,r30
ffc0d968: 80 61 00 08 lwz r3,8(r1)
ffc0d96c: 48 00 20 6d bl ffc0f9d8 <rtems_task_mode>
}
ffc0d970: 80 01 00 2c lwz r0,44(r1)
ffc0d974: 83 a1 00 1c lwz r29,28(r1)
ffc0d978: 7c 08 03 a6 mtlr r0
ffc0d97c: 83 c1 00 20 lwz r30,32(r1)
ffc0d980: 83 e1 00 24 lwz r31,36(r1)
ffc0d984: 38 21 00 28 addi r1,r1,40
ffc0d988: 4e 80 00 20 blr
ffc09844 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
ffc09844: 94 21 ff e0 stwu r1,-32(r1)
ffc09848: 7c 08 02 a6 mflr r0
ffc0984c: 7c 64 1b 78 mr r4,r3
ffc09850: 3c 60 00 00 lis r3,0
ffc09854: 90 01 00 24 stw r0,36(r1)
ffc09858: 38 63 2b ec addi r3,r3,11244
ffc0985c: 38 a1 00 08 addi r5,r1,8
ffc09860: 93 e1 00 1c stw r31,28(r1)
ffc09864: 48 00 23 3d bl ffc0bba0 <_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 ) {
ffc09868: 80 01 00 08 lwz r0,8(r1)
ffc0986c: 7c 7f 1b 78 mr r31,r3
ffc09870: 2f 80 00 00 cmpwi cr7,r0,0
ffc09874: 40 9e 00 84 bne- cr7,ffc098f8 <_Rate_monotonic_Timeout+0xb4><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
ffc09878: 80 63 00 40 lwz r3,64(r3)
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
ffc0987c: 80 03 00 10 lwz r0,16(r3)
ffc09880: 70 09 40 00 andi. r9,r0,16384
ffc09884: 41 82 00 24 beq- ffc098a8 <_Rate_monotonic_Timeout+0x64>
the_thread->Wait.id == the_period->Object.id ) {
ffc09888: 81 23 00 20 lwz r9,32(r3)
ffc0988c: 80 1f 00 08 lwz r0,8(r31)
ffc09890: 7f 89 00 00 cmpw cr7,r9,r0
ffc09894: 40 be 00 14 bne+ cr7,ffc098a8 <_Rate_monotonic_Timeout+0x64>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc09898: 3c 80 10 03 lis r4,4099
ffc0989c: 60 84 ff f8 ori r4,r4,65528
ffc098a0: 48 00 28 e9 bl ffc0c188 <_Thread_Clear_state>
ffc098a4: 48 00 00 18 b ffc098bc <_Rate_monotonic_Timeout+0x78>
_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 ) {
ffc098a8: 80 1f 00 38 lwz r0,56(r31)
ffc098ac: 2f 80 00 01 cmpwi cr7,r0,1
ffc098b0: 40 be 00 30 bne+ cr7,ffc098e0 <_Rate_monotonic_Timeout+0x9c>
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
ffc098b4: 38 00 00 03 li r0,3
ffc098b8: 90 1f 00 38 stw r0,56(r31)
_Rate_monotonic_Initiate_statistics( the_period );
ffc098bc: 7f e3 fb 78 mr r3,r31
ffc098c0: 4b ff f7 75 bl ffc09034 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc098c4: 80 1f 00 3c lwz r0,60(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc098c8: 3c 60 00 00 lis r3,0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc098cc: 90 1f 00 1c stw r0,28(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc098d0: 38 63 2d e8 addi r3,r3,11752
ffc098d4: 38 9f 00 10 addi r4,r31,16
ffc098d8: 48 00 44 0d bl ffc0dce4 <_Watchdog_Insert>
ffc098dc: 48 00 00 0c b ffc098e8 <_Rate_monotonic_Timeout+0xa4>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
ffc098e0: 38 00 00 04 li r0,4
ffc098e4: 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;
ffc098e8: 3d 20 00 00 lis r9,0
ffc098ec: 81 69 27 b0 lwz r11,10160(r9)
ffc098f0: 38 0b ff ff addi r0,r11,-1
ffc098f4: 90 09 27 b0 stw r0,10160(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc098f8: 80 01 00 24 lwz r0,36(r1)
ffc098fc: 83 e1 00 1c lwz r31,28(r1)
ffc09900: 38 21 00 20 addi r1,r1,32
ffc09904: 7c 08 03 a6 mtlr r0
ffc09908: 4e 80 00 20 blr
ffc09184 <_TOD_Validate>:
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
ffc09184: 2c 03 00 00 cmpwi r3,0
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
ffc09188: 3d 20 00 00 lis r9,0
ffc0918c: 81 29 20 cc lwz r9,8396(r9)
if ((!the_tod) ||
ffc09190: 41 82 00 98 beq- ffc09228 <_TOD_Validate+0xa4> <== NEVER TAKEN
(the_tod->ticks >= ticks_per_second) ||
ffc09194: 3c 00 00 0f lis r0,15
ffc09198: 60 00 42 40 ori r0,r0,16960
ffc0919c: 7c 00 4b 96 divwu r0,r0,r9
ffc091a0: 81 23 00 18 lwz r9,24(r3)
ffc091a4: 7f 89 00 40 cmplw cr7,r9,r0
ffc091a8: 40 9c 00 80 bge- cr7,ffc09228 <_TOD_Validate+0xa4>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
ffc091ac: 80 03 00 14 lwz r0,20(r3)
ffc091b0: 2b 80 00 3b cmplwi cr7,r0,59
ffc091b4: 41 9d 00 74 bgt- cr7,ffc09228 <_TOD_Validate+0xa4>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
ffc091b8: 80 03 00 10 lwz r0,16(r3)
ffc091bc: 2b 80 00 3b cmplwi cr7,r0,59
ffc091c0: 41 9d 00 68 bgt- cr7,ffc09228 <_TOD_Validate+0xa4>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
ffc091c4: 80 03 00 0c lwz r0,12(r3)
ffc091c8: 2b 80 00 17 cmplwi cr7,r0,23
ffc091cc: 41 9d 00 5c bgt- cr7,ffc09228 <_TOD_Validate+0xa4>
(the_tod->month == 0) ||
ffc091d0: 81 23 00 04 lwz r9,4(r3)
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
ffc091d4: 2f 89 00 00 cmpwi cr7,r9,0
ffc091d8: 41 9e 00 50 beq- cr7,ffc09228 <_TOD_Validate+0xa4> <== NEVER TAKEN
ffc091dc: 2b 89 00 0c cmplwi cr7,r9,12
ffc091e0: 41 9d 00 48 bgt- cr7,ffc09228 <_TOD_Validate+0xa4>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
ffc091e4: 80 03 00 00 lwz r0,0(r3)
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
ffc091e8: 2b 80 07 c3 cmplwi cr7,r0,1987
ffc091ec: 40 9d 00 3c ble- cr7,ffc09228 <_TOD_Validate+0xa4>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
ffc091f0: 80 63 00 08 lwz r3,8(r3)
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
ffc091f4: 2f 83 00 00 cmpwi cr7,r3,0
ffc091f8: 41 9e 00 30 beq- cr7,ffc09228 <_TOD_Validate+0xa4> <== NEVER TAKEN
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
ffc091fc: 70 0b 00 03 andi. r11,r0,3
ffc09200: 3d 60 ff c2 lis r11,-62
ffc09204: 39 6b 28 38 addi r11,r11,10296
ffc09208: 40 82 00 08 bne- ffc09210 <_TOD_Validate+0x8c>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
ffc0920c: 39 29 00 0d addi r9,r9,13
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
ffc09210: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc09214: 7c 0b 48 2e lwzx r0,r11,r9
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
ffc09218: 7c 63 00 10 subfc r3,r3,r0
ffc0921c: 38 60 00 00 li r3,0
ffc09220: 7c 63 19 14 adde r3,r3,r3
ffc09224: 4e 80 00 20 blr
ffc09228: 38 60 00 00 li r3,0
if ( the_tod->day > days_in_month )
return false;
return true;
}
ffc0922c: 4e 80 00 20 blr
ffc09e10 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
ffc09e10: 94 21 ff e0 stwu r1,-32(r1)
ffc09e14: 7c 08 02 a6 mflr r0
ffc09e18: 90 01 00 24 stw r0,36(r1)
ffc09e1c: 93 e1 00 1c stw r31,28(r1)
ffc09e20: 7c 7f 1b 78 mr r31,r3
ffc09e24: 93 a1 00 14 stw r29,20(r1)
ffc09e28: 93 c1 00 18 stw r30,24(r1)
ffc09e2c: 7c be 2b 78 mr r30,r5
/*
* 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 );
ffc09e30: 90 81 00 08 stw r4,8(r1)
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
ffc09e34: 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 );
ffc09e38: 48 00 11 e9 bl ffc0b020 <_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 )
ffc09e3c: 80 1f 00 14 lwz r0,20(r31)
ffc09e40: 80 81 00 08 lwz r4,8(r1)
ffc09e44: 7f 80 20 00 cmpw cr7,r0,r4
ffc09e48: 41 9e 00 0c beq- cr7,ffc09e54 <_Thread_Change_priority+0x44>
_Thread_Set_priority( the_thread, new_priority );
ffc09e4c: 7f e3 fb 78 mr r3,r31
ffc09e50: 48 00 10 5d bl ffc0aeac <_Thread_Set_priority>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc09e54: 7d 60 00 a6 mfmsr r11
ffc09e58: 7c 10 42 a6 mfsprg r0,0
ffc09e5c: 7d 60 00 78 andc r0,r11,r0
ffc09e60: 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;
ffc09e64: 80 1f 00 10 lwz r0,16(r31)
ffc09e68: 57 bd 07 7a rlwinm r29,r29,0,29,29
if ( state != STATES_TRANSIENT ) {
ffc09e6c: 2f 80 00 04 cmpwi cr7,r0,4
ffc09e70: 41 9e 00 38 beq- cr7,ffc09ea8 <_Thread_Change_priority+0x98>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
ffc09e74: 2f 9d 00 00 cmpwi cr7,r29,0
ffc09e78: 40 9e 00 0c bne- cr7,ffc09e84 <_Thread_Change_priority+0x74><== NEVER TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
ffc09e7c: 54 09 07 b8 rlwinm r9,r0,0,30,28
ffc09e80: 91 3f 00 10 stw r9,16(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc09e84: 7d 60 01 24 mtmsr r11
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
ffc09e88: 3d 20 00 03 lis r9,3
ffc09e8c: 61 29 be e0 ori r9,r9,48864
ffc09e90: 7c 0b 48 39 and. r11,r0,r9
ffc09e94: 41 a2 01 04 beq+ ffc09f98 <_Thread_Change_priority+0x188>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
ffc09e98: 80 7f 00 44 lwz r3,68(r31)
ffc09e9c: 7f e4 fb 78 mr r4,r31
ffc09ea0: 48 00 0f 39 bl ffc0add8 <_Thread_queue_Requeue>
ffc09ea4: 48 00 00 f4 b ffc09f98 <_Thread_Change_priority+0x188>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
ffc09ea8: 2f 9d 00 00 cmpwi cr7,r29,0
ffc09eac: 40 9e 00 6c bne- cr7,ffc09f18 <_Thread_Change_priority+0x108><== NEVER TAKEN
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
ffc09eb0: 93 bf 00 10 stw r29,16(r31)
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
ffc09eb4: 2f 9e 00 00 cmpwi cr7,r30,0
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
_Priority_Major_bit_map |= the_priority_map->ready_major;
ffc09eb8: 3d 40 00 00 lis r10,0
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
ffc09ebc: 81 3f 00 90 lwz r9,144(r31)
ffc09ec0: 80 1f 00 98 lwz r0,152(r31)
ffc09ec4: 81 09 00 00 lwz r8,0(r9)
ffc09ec8: 7d 00 03 78 or r0,r8,r0
ffc09ecc: 90 09 00 00 stw r0,0(r9)
_Priority_Major_bit_map |= the_priority_map->ready_major;
ffc09ed0: 81 0a 27 60 lwz r8,10080(r10)
ffc09ed4: 80 1f 00 94 lwz r0,148(r31)
ffc09ed8: 81 3f 00 8c lwz r9,140(r31)
ffc09edc: 7d 00 03 78 or r0,r8,r0
ffc09ee0: 90 0a 27 60 stw r0,10080(r10)
ffc09ee4: 41 9e 00 1c beq- cr7,ffc09f00 <_Thread_Change_priority+0xf0>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc09ee8: 81 49 00 00 lwz r10,0(r9)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc09eec: 91 3f 00 04 stw r9,4(r31)
before_node = after_node->next;
after_node->next = the_node;
ffc09ef0: 93 e9 00 00 stw r31,0(r9)
the_node->next = before_node;
before_node->previous = the_node;
ffc09ef4: 93 ea 00 04 stw r31,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;
ffc09ef8: 91 5f 00 00 stw r10,0(r31)
ffc09efc: 48 00 00 1c b ffc09f18 <_Thread_Change_priority+0x108>
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
ffc09f00: 38 09 00 04 addi r0,r9,4
ffc09f04: 90 1f 00 00 stw r0,0(r31)
old_last_node = the_chain->last;
ffc09f08: 81 49 00 08 lwz r10,8(r9)
the_chain->last = the_node;
ffc09f0c: 93 e9 00 08 stw r31,8(r9)
old_last_node->next = the_node;
the_node->previous = old_last_node;
ffc09f10: 91 5f 00 04 stw r10,4(r31)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
ffc09f14: 93 ea 00 00 stw r31,0(r10)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc09f18: 7c 00 00 a6 mfmsr r0
ffc09f1c: 7d 60 01 24 mtmsr r11
ffc09f20: 7c 00 01 24 mtmsr r0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc09f24: 3c c0 00 00 lis r6,0
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
_Thread_Ready_chain[ _Priority_Get_highest() ].first;
ffc09f28: 3d 40 00 00 lis r10,0
ffc09f2c: 81 26 27 60 lwz r9,10080(r6)
ffc09f30: 80 aa 27 20 lwz r5,10016(r10)
ffc09f34: 7d 27 00 34 cntlzw r7,r9
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc09f38: 3d 00 00 00 lis r8,0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc09f3c: 91 26 27 60 stw r9,10080(r6)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc09f40: 39 08 2d 00 addi r8,r8,11520
ffc09f44: 54 ea 10 3a rlwinm r10,r7,2,0,29
ffc09f48: 7c 08 50 2e lwzx r0,r8,r10
ffc09f4c: 7c 09 00 34 cntlzw r9,r0
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
ffc09f50: 54 e7 20 36 rlwinm r7,r7,4,0,27
ffc09f54: 7c 08 51 2e stwx r0,r8,r10
ffc09f58: 7c e7 4a 14 add r7,r7,r9
ffc09f5c: 1c e7 00 0c mulli r7,r7,12
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
ffc09f60: 3d 20 00 00 lis r9,0
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
ffc09f64: 7c 05 38 2e lwzx r0,r5,r7
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
ffc09f68: 81 29 27 6c lwz r9,10092(r9)
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
ffc09f6c: 3d 40 00 00 lis r10,0
ffc09f70: 90 0a 27 48 stw r0,10056(r10)
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Thread_Calculate_heir();
if ( !_Thread_Is_executing_also_the_heir() &&
ffc09f74: 7f 89 00 00 cmpw cr7,r9,r0
ffc09f78: 41 9e 00 1c beq- cr7,ffc09f94 <_Thread_Change_priority+0x184>
_Thread_Executing->is_preemptible )
ffc09f7c: 88 09 00 75 lbz r0,117(r9)
ffc09f80: 2f 80 00 00 cmpwi cr7,r0,0
ffc09f84: 41 9e 00 10 beq- cr7,ffc09f94 <_Thread_Change_priority+0x184>
_Context_Switch_necessary = true;
ffc09f88: 38 00 00 01 li r0,1
ffc09f8c: 3d 20 00 00 lis r9,0
ffc09f90: 98 09 27 7c stb r0,10108(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc09f94: 7d 60 01 24 mtmsr r11
_ISR_Enable( level );
}
ffc09f98: 80 01 00 24 lwz r0,36(r1)
ffc09f9c: 83 a1 00 14 lwz r29,20(r1)
ffc09fa0: 7c 08 03 a6 mtlr r0
ffc09fa4: 83 c1 00 18 lwz r30,24(r1)
ffc09fa8: 83 e1 00 1c lwz r31,28(r1)
ffc09fac: 38 21 00 20 addi r1,r1,32
ffc09fb0: 4e 80 00 20 blr
ffc09fb4 <_Thread_Clear_state>:
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc09fb4: 7c 00 00 a6 mfmsr r0
ffc09fb8: 7d 30 42 a6 mfsprg r9,0
ffc09fbc: 7c 09 48 78 andc r9,r0,r9
ffc09fc0: 7d 20 01 24 mtmsr r9
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
current_state = the_thread->current_state;
ffc09fc4: 81 23 00 10 lwz r9,16(r3)
if ( current_state & state ) {
ffc09fc8: 7c 8b 48 39 and. r11,r4,r9
ffc09fcc: 41 82 00 a8 beq- ffc0a074 <_Thread_Clear_state+0xc0>
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
ffc09fd0: 7d 24 20 78 andc r4,r9,r4
current_state =
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
ffc09fd4: 2f 84 00 00 cmpwi cr7,r4,0
_ISR_Disable( level );
current_state = the_thread->current_state;
if ( current_state & state ) {
current_state =
ffc09fd8: 90 83 00 10 stw r4,16(r3)
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
ffc09fdc: 40 9e 00 98 bne- cr7,ffc0a074 <_Thread_Clear_state+0xc0>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
ffc09fe0: 81 63 00 90 lwz r11,144(r3)
ffc09fe4: 81 43 00 98 lwz r10,152(r3)
ffc09fe8: 81 0b 00 00 lwz r8,0(r11)
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
ffc09fec: 81 23 00 8c lwz r9,140(r3)
ffc09ff0: 7d 0a 53 78 or r10,r8,r10
ffc09ff4: 91 4b 00 00 stw r10,0(r11)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
ffc09ff8: 39 69 00 04 addi r11,r9,4
_Priority_Major_bit_map |= the_priority_map->ready_major;
ffc09ffc: 3d 40 00 00 lis r10,0
ffc0a000: 91 63 00 00 stw r11,0(r3)
ffc0a004: 80 ea 27 60 lwz r7,10080(r10)
ffc0a008: 81 03 00 94 lwz r8,148(r3)
old_last_node = the_chain->last;
ffc0a00c: 81 69 00 08 lwz r11,8(r9)
ffc0a010: 7c e8 43 78 or r8,r7,r8
the_chain->last = the_node;
ffc0a014: 90 69 00 08 stw r3,8(r9)
ffc0a018: 91 0a 27 60 stw r8,10080(r10)
old_last_node->next = the_node;
the_node->previous = old_last_node;
ffc0a01c: 91 63 00 04 stw r11,4(r3)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
ffc0a020: 90 6b 00 00 stw r3,0(r11)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0a024: 7d 20 00 a6 mfmsr r9
ffc0a028: 7c 00 01 24 mtmsr r0
ffc0a02c: 7d 20 01 24 mtmsr r9
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
ffc0a030: 3d 60 00 00 lis r11,0
ffc0a034: 81 23 00 14 lwz r9,20(r3)
ffc0a038: 81 4b 27 48 lwz r10,10056(r11)
ffc0a03c: 81 4a 00 14 lwz r10,20(r10)
ffc0a040: 7f 89 50 40 cmplw cr7,r9,r10
ffc0a044: 40 9c 00 30 bge- cr7,ffc0a074 <_Thread_Clear_state+0xc0>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
ffc0a048: 3d 40 00 00 lis r10,0
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
ffc0a04c: 90 6b 27 48 stw r3,10056(r11)
if ( _Thread_Executing->is_preemptible ||
ffc0a050: 81 4a 27 6c lwz r10,10092(r10)
ffc0a054: 89 6a 00 75 lbz r11,117(r10)
ffc0a058: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0a05c: 40 9e 00 0c bne- cr7,ffc0a068 <_Thread_Clear_state+0xb4>
ffc0a060: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a064: 40 9e 00 10 bne- cr7,ffc0a074 <_Thread_Clear_state+0xc0><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
ffc0a068: 39 60 00 01 li r11,1
ffc0a06c: 3d 20 00 00 lis r9,0
ffc0a070: 99 69 27 7c stb r11,10108(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0a074: 7c 00 01 24 mtmsr r0
}
}
}
_ISR_Enable( level );
}
ffc0a078: 4e 80 00 20 blr
ffc0a07c <_Thread_Close>:
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
ffc0a07c: 94 21 ff e8 stwu r1,-24(r1)
ffc0a080: 7c 08 02 a6 mflr r0
ffc0a084: 39 60 00 00 li r11,0
ffc0a088: 90 01 00 1c stw r0,28(r1)
ffc0a08c: a0 04 00 0a lhz r0,10(r4)
ffc0a090: 81 23 00 1c lwz r9,28(r3)
ffc0a094: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0a098: 93 a1 00 0c stw r29,12(r1)
ffc0a09c: 7c 7d 1b 78 mr r29,r3
ffc0a0a0: 93 e1 00 14 stw r31,20(r1)
ffc0a0a4: 7c 9f 23 78 mr r31,r4
ffc0a0a8: 93 c1 00 10 stw r30,16(r1)
ffc0a0ac: 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;
ffc0a0b0: 3f c0 00 00 lis r30,0
ffc0a0b4: 81 3e 27 2c lwz r9,10028(r30)
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
ffc0a0b8: 7c 83 23 78 mr r3,r4
ffc0a0bc: 38 09 ff ff addi r0,r9,-1
ffc0a0c0: 90 1e 27 2c stw r0,10028(r30)
ffc0a0c4: 48 00 17 5d bl ffc0b820 <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc0a0c8: 81 3e 27 2c lwz r9,10028(r30)
ffc0a0cc: 38 09 00 01 addi r0,r9,1
ffc0a0d0: 90 1e 27 2c stw r0,10028(r30)
/*
* 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 );
ffc0a0d4: 7f a3 eb 78 mr r3,r29
ffc0a0d8: 7f e4 fb 78 mr r4,r31
ffc0a0dc: 4b ff f3 f1 bl ffc094cc <_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 );
ffc0a0e0: 7f e3 fb 78 mr r3,r31
ffc0a0e4: 38 80 00 01 li r4,1
ffc0a0e8: 48 00 0e 21 bl ffc0af08 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
ffc0a0ec: 7f e3 fb 78 mr r3,r31
ffc0a0f0: 48 00 0c 05 bl ffc0acf4 <_Thread_queue_Extract_with_proxy>
ffc0a0f4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a0f8: 40 9e 00 18 bne- cr7,ffc0a110 <_Thread_Close+0x94>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
ffc0a0fc: 80 1f 00 50 lwz r0,80(r31)
ffc0a100: 2f 80 00 02 cmpwi cr7,r0,2
ffc0a104: 40 be 00 0c bne+ cr7,ffc0a110 <_Thread_Close+0x94>
(void) _Watchdog_Remove( &the_thread->Timer );
ffc0a108: 38 7f 00 48 addi r3,r31,72
ffc0a10c: 48 00 19 ed bl ffc0baf8 <_Watchdog_Remove>
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
if ( the_thread->Start.fp_context )
ffc0a110: 80 7f 00 d0 lwz r3,208(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;
ffc0a114: 38 00 00 00 li r0,0
ffc0a118: 90 1f 01 38 stw r0,312(r31)
if ( the_thread->Start.fp_context )
ffc0a11c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a120: 41 9e 00 08 beq- cr7,ffc0a128 <_Thread_Close+0xac> <== NEVER TAKEN
(void) _Workspace_Free( the_thread->Start.fp_context );
ffc0a124: 48 00 1b d1 bl ffc0bcf4 <_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 );
ffc0a128: 7f e3 fb 78 mr r3,r31
ffc0a12c: 48 00 10 15 bl ffc0b140 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
if ( the_thread->extensions )
ffc0a130: 80 7f 01 4c lwz r3,332(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;
ffc0a134: 38 00 00 00 li r0,0
if ( the_thread->extensions )
ffc0a138: 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;
ffc0a13c: 90 1f 00 d4 stw r0,212(r31)
if ( the_thread->extensions )
ffc0a140: 41 9e 00 08 beq- cr7,ffc0a148 <_Thread_Close+0xcc>
(void) _Workspace_Free( the_thread->extensions );
ffc0a144: 48 00 1b b1 bl ffc0bcf4 <_Workspace_Free>
the_thread->extensions = NULL;
ffc0a148: 38 00 00 00 li r0,0
}
ffc0a14c: 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;
ffc0a150: 90 1f 01 4c stw r0,332(r31)
}
ffc0a154: 80 01 00 1c lwz r0,28(r1)
ffc0a158: 83 c1 00 10 lwz r30,16(r1)
ffc0a15c: 7c 08 03 a6 mtlr r0
ffc0a160: 83 e1 00 14 lwz r31,20(r1)
ffc0a164: 38 21 00 18 addi r1,r1,24
ffc0a168: 4e 80 00 20 blr
ffc0a25c <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0a25c: 94 21 ff e8 stwu r1,-24(r1)
ffc0a260: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0a264: 38 81 00 08 addi r4,r1,8
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0a268: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0a26c: 48 00 02 4d bl ffc0a4b8 <_Thread_Get>
switch ( location ) {
ffc0a270: 80 01 00 08 lwz r0,8(r1)
ffc0a274: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a278: 40 9e 00 20 bne- cr7,ffc0a298 <_Thread_Delay_ended+0x3c><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
ffc0a27c: 3c 80 10 00 lis r4,4096
ffc0a280: 60 84 00 18 ori r4,r4,24
ffc0a284: 4b ff fd 31 bl ffc09fb4 <_Thread_Clear_state>
ffc0a288: 3d 20 00 00 lis r9,0
ffc0a28c: 81 69 27 2c lwz r11,10028(r9)
ffc0a290: 38 0b ff ff addi r0,r11,-1
ffc0a294: 90 09 27 2c stw r0,10028(r9)
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
ffc0a298: 80 01 00 1c lwz r0,28(r1)
ffc0a29c: 38 21 00 18 addi r1,r1,24
ffc0a2a0: 7c 08 03 a6 mtlr r0
ffc0a2a4: 4e 80 00 20 blr
ffc0a2a8 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
ffc0a2a8: 94 21 ff b0 stwu r1,-80(r1)
ffc0a2ac: 7c 08 02 a6 mflr r0
ffc0a2b0: 93 41 00 38 stw r26,56(r1)
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
ffc0a2b4: 3f 40 00 00 lis r26,0
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
ffc0a2b8: 93 e1 00 4c stw r31,76(r1)
ffc0a2bc: 90 01 00 54 stw r0,84(r1)
ffc0a2c0: 92 61 00 1c stw r19,28(r1)
ffc0a2c4: 92 81 00 20 stw r20,32(r1)
ffc0a2c8: 92 a1 00 24 stw r21,36(r1)
ffc0a2cc: 92 c1 00 28 stw r22,40(r1)
ffc0a2d0: 92 e1 00 2c stw r23,44(r1)
ffc0a2d4: 93 01 00 30 stw r24,48(r1)
ffc0a2d8: 93 21 00 34 stw r25,52(r1)
ffc0a2dc: 93 61 00 3c stw r27,60(r1)
ffc0a2e0: 93 81 00 40 stw r28,64(r1)
ffc0a2e4: 93 a1 00 44 stw r29,68(r1)
ffc0a2e8: 93 c1 00 48 stw r30,72(r1)
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
ffc0a2ec: 83 fa 27 6c lwz r31,10092(r26)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0a2f0: 7c 00 00 a6 mfmsr r0
ffc0a2f4: 7d 30 42 a6 mfsprg r9,0
ffc0a2f8: 7c 09 48 78 andc r9,r0,r9
ffc0a2fc: 7d 20 01 24 mtmsr r9
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
ffc0a300: 3f 20 00 00 lis r25,0
heir = _Thread_Heir;
ffc0a304: 3e 60 00 00 lis r19,0
_Thread_Dispatch_disable_level = 1;
ffc0a308: 3e 80 00 00 lis r20,0
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0a30c: 3e a0 00 00 lis r21,0
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
ffc0a310: 3f 60 00 00 lis r27,0
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0a314: 3e c0 00 00 lis r22,0
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
ffc0a318: 3b 39 27 7c addi r25,r25,10108
heir = _Thread_Heir;
ffc0a31c: 3a 73 27 48 addi r19,r19,10056
_Thread_Dispatch_disable_level = 1;
ffc0a320: 3a 94 27 2c addi r20,r20,10028
_Context_Switch_necessary = false;
_Thread_Executing = heir;
ffc0a324: 3b 5a 27 6c addi r26,r26,10092
#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;
ffc0a328: 3a b5 27 24 addi r21,r21,10020
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
ffc0a32c: 3b 7b 27 74 addi r27,r27,10100
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0a330: 3a d6 27 44 addi r22,r22,10052
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
ffc0a334: 3a e0 00 01 li r23,1
_Context_Switch_necessary = false;
ffc0a338: 3b 00 00 00 li r24,0
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
ffc0a33c: 3b 81 00 08 addi r28,r1,8
_Timestamp_Subtract(
ffc0a340: 3b a1 00 10 addi r29,r1,16
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
ffc0a344: 48 00 00 d0 b ffc0a414 <_Thread_Dispatch+0x16c>
heir = _Thread_Heir;
ffc0a348: 83 d3 00 00 lwz r30,0(r19)
_Thread_Dispatch_disable_level = 1;
ffc0a34c: 92 f4 00 00 stw r23,0(r20)
_Thread_Executing = heir;
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
ffc0a350: 81 3e 00 7c lwz r9,124(r30)
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
ffc0a354: 9b 19 00 00 stb r24,0(r25)
_Thread_Executing = heir;
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
ffc0a358: 2f 89 00 01 cmpwi cr7,r9,1
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
_Thread_Executing = heir;
ffc0a35c: 93 da 00 00 stw r30,0(r26)
#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 )
ffc0a360: 40 be 00 0c bne+ cr7,ffc0a36c <_Thread_Dispatch+0xc4>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0a364: 81 35 00 00 lwz r9,0(r21)
ffc0a368: 91 3e 00 78 stw r9,120(r30)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0a36c: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
ffc0a370: 7f 83 e3 78 mr r3,r28
ffc0a374: 48 00 3a 91 bl ffc0de04 <_TOD_Get_uptime>
_Timestamp_Subtract(
ffc0a378: 7f 63 db 78 mr r3,r27
ffc0a37c: 7f 84 e3 78 mr r4,r28
ffc0a380: 7f a5 eb 78 mr r5,r29
ffc0a384: 48 00 11 59 bl ffc0b4dc <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
ffc0a388: 7f a4 eb 78 mr r4,r29
ffc0a38c: 38 7f 00 84 addi r3,r31,132
ffc0a390: 48 00 10 f1 bl ffc0b480 <_Timespec_Add_to>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0a394: 81 36 00 00 lwz r9,0(r22)
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
ffc0a398: 81 61 00 08 lwz r11,8(r1)
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
ffc0a39c: 7f e3 fb 78 mr r3,r31
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0a3a0: 2f 89 00 00 cmpwi cr7,r9,0
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
ffc0a3a4: 81 81 00 0c lwz r12,12(r1)
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
ffc0a3a8: 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;
ffc0a3ac: 91 7b 00 00 stw r11,0(r27)
ffc0a3b0: 91 9b 00 04 stw r12,4(r27)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0a3b4: 41 9e 00 14 beq- cr7,ffc0a3c8 <_Thread_Dispatch+0x120> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
ffc0a3b8: 80 09 00 00 lwz r0,0(r9)
ffc0a3bc: 90 1f 01 3c stw r0,316(r31)
*_Thread_libc_reent = heir->libc_reent;
ffc0a3c0: 80 1e 01 3c lwz r0,316(r30)
ffc0a3c4: 90 09 00 00 stw r0,0(r9)
}
_User_extensions_Thread_switch( executing, heir );
ffc0a3c8: 48 00 15 61 bl ffc0b928 <_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 )
ffc0a3cc: 80 1f 01 38 lwz r0,312(r31)
_Context_Save_fp( &executing->fp_context );
ffc0a3d0: 38 7f 01 38 addi r3,r31,312
* operations.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE )
if ( executing->fp_context != NULL )
ffc0a3d4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a3d8: 41 9e 00 08 beq- cr7,ffc0a3e0 <_Thread_Dispatch+0x138>
_Context_Save_fp( &executing->fp_context );
ffc0a3dc: 48 01 09 65 bl ffc1ad40 <_CPU_Context_save_fp>
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
ffc0a3e0: 38 7f 00 d8 addi r3,r31,216
ffc0a3e4: 38 9e 00 d8 addi r4,r30,216
ffc0a3e8: 48 01 0a d9 bl ffc1aec0 <_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 )
ffc0a3ec: 80 1f 01 38 lwz r0,312(r31)
_Context_Restore_fp( &executing->fp_context );
ffc0a3f0: 38 7f 01 38 addi r3,r31,312
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
_Context_Restore_fp( &executing->fp_context );
_Thread_Allocated_fp = executing;
}
#else
if ( executing->fp_context != NULL )
ffc0a3f4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a3f8: 41 9e 00 08 beq- cr7,ffc0a400 <_Thread_Dispatch+0x158>
_Context_Restore_fp( &executing->fp_context );
ffc0a3fc: 48 01 0a 05 bl ffc1ae00 <_CPU_Context_restore_fp>
#endif
#endif
executing = _Thread_Executing;
ffc0a400: 83 fa 00 00 lwz r31,0(r26)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0a404: 7c 00 00 a6 mfmsr r0
ffc0a408: 7d 30 42 a6 mfsprg r9,0
ffc0a40c: 7c 09 48 78 andc r9,r0,r9
ffc0a410: 7d 20 01 24 mtmsr r9
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
ffc0a414: 89 39 00 00 lbz r9,0(r25)
ffc0a418: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a41c: 40 9e ff 2c bne+ cr7,ffc0a348 <_Thread_Dispatch+0xa0>
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
ffc0a420: 3d 60 00 00 lis r11,0
ffc0a424: 91 2b 27 2c stw r9,10028(r11)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0a428: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
if ( _Thread_Do_post_task_switch_extension ||
ffc0a42c: 3d 20 00 00 lis r9,0
ffc0a430: 80 09 27 5c lwz r0,10076(r9)
ffc0a434: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a438: 40 9e 00 10 bne- cr7,ffc0a448 <_Thread_Dispatch+0x1a0> <== NEVER TAKEN
executing->do_post_task_switch_extension ) {
ffc0a43c: 88 1f 00 74 lbz r0,116(r31)
ffc0a440: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a444: 41 9e 00 10 beq- cr7,ffc0a454 <_Thread_Dispatch+0x1ac>
executing->do_post_task_switch_extension = false;
ffc0a448: 38 00 00 00 li r0,0
ffc0a44c: 98 1f 00 74 stb r0,116(r31)
_API_extensions_Run_postswitch();
ffc0a450: 4b ff e3 d1 bl ffc08820 <_API_extensions_Run_postswitch>
}
}
ffc0a454: 80 01 00 54 lwz r0,84(r1)
ffc0a458: 82 61 00 1c lwz r19,28(r1)
ffc0a45c: 7c 08 03 a6 mtlr r0
ffc0a460: 82 81 00 20 lwz r20,32(r1)
ffc0a464: 82 a1 00 24 lwz r21,36(r1)
ffc0a468: 82 c1 00 28 lwz r22,40(r1)
ffc0a46c: 82 e1 00 2c lwz r23,44(r1)
ffc0a470: 83 01 00 30 lwz r24,48(r1)
ffc0a474: 83 21 00 34 lwz r25,52(r1)
ffc0a478: 83 41 00 38 lwz r26,56(r1)
ffc0a47c: 83 61 00 3c lwz r27,60(r1)
ffc0a480: 83 81 00 40 lwz r28,64(r1)
ffc0a484: 83 a1 00 44 lwz r29,68(r1)
ffc0a488: 83 c1 00 48 lwz r30,72(r1)
ffc0a48c: 83 e1 00 4c lwz r31,76(r1)
ffc0a490: 38 21 00 50 addi r1,r1,80
ffc0a494: 4e 80 00 20 blr
ffc0fe78 <_Thread_Evaluate_mode>:
bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
ffc0fe78: 3d 20 00 00 lis r9,0
ffc0fe7c: 81 29 27 6c lwz r9,10092(r9)
if ( !_States_Is_ready( executing->current_state ) ||
ffc0fe80: 80 09 00 10 lwz r0,16(r9)
ffc0fe84: 2f 80 00 00 cmpwi cr7,r0,0
ffc0fe88: 40 9e 00 20 bne- cr7,ffc0fea8 <_Thread_Evaluate_mode+0x30><== NEVER TAKEN
ffc0fe8c: 3d 60 00 00 lis r11,0
ffc0fe90: 80 0b 27 48 lwz r0,10056(r11)
ffc0fe94: 7f 89 00 00 cmpw cr7,r9,r0
ffc0fe98: 41 9e 00 24 beq- cr7,ffc0febc <_Thread_Evaluate_mode+0x44>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
ffc0fe9c: 88 09 00 75 lbz r0,117(r9)
ffc0fea0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0fea4: 41 9e 00 18 beq- cr7,ffc0febc <_Thread_Evaluate_mode+0x44><== NEVER TAKEN
_Context_Switch_necessary = true;
ffc0fea8: 38 00 00 01 li r0,1
ffc0feac: 3d 20 00 00 lis r9,0
ffc0feb0: 98 09 27 7c stb r0,10108(r9)
ffc0feb4: 38 60 00 01 li r3,1
return true;
ffc0feb8: 4e 80 00 20 blr
ffc0febc: 38 60 00 00 li r3,0
}
return false;
}
ffc0fec0: 4e 80 00 20 blr
ffc0fec4 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc0fec4: 94 21 ff f0 stwu r1,-16(r1)
ffc0fec8: 7c 08 02 a6 mflr r0
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
ffc0fecc: 3d 20 00 00 lis r9,0
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc0fed0: 90 01 00 14 stw r0,20(r1)
ffc0fed4: 93 e1 00 0c stw r31,12(r1)
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
ffc0fed8: 83 e9 27 6c lwz r31,10092(r9)
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc0fedc: 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;
ffc0fee0: 81 3f 00 c0 lwz r9,192(r31)
}
static inline void _CPU_ISR_Set_level( uint32_t level )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc0fee4: 38 00 00 00 li r0,0
ffc0fee8: 7c 00 00 a6 mfmsr r0
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc0feec: 71 2b 00 01 andi. r11,r9,1
ffc0fef0: 40 82 00 10 bne- ffc0ff00 <_Thread_Handler+0x3c>
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
asm volatile (
ffc0fef4: 7d 30 42 a6 mfsprg r9,0
msr |= ppc_interrupt_get_disable_mask();
ffc0fef8: 7d 20 03 78 or r0,r9,r0
ffc0fefc: 48 00 00 0c b ffc0ff08 <_Thread_Handler+0x44>
ffc0ff00: 7d 30 42 a6 mfsprg r9,0
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
ffc0ff04: 7c 00 48 78 andc r0,r0,r9
}
_CPU_MSR_SET(msr);
ffc0ff08: 7c 00 01 24 mtmsr r0
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
ffc0ff0c: 3d 20 00 00 lis r9,0
ffc0ff10: 8b c9 29 00 lbz r30,10496(r9)
doneConstructors = 1;
ffc0ff14: 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 );
ffc0ff18: 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;
ffc0ff1c: 98 09 29 00 stb r0,10496(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 );
ffc0ff20: 4b ff b7 01 bl ffc0b620 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
ffc0ff24: 4b ff a5 75 bl ffc0a498 <_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) */ {
ffc0ff28: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0ff2c: 40 be 00 08 bne+ cr7,ffc0ff34 <_Thread_Handler+0x70>
INIT_NAME ();
ffc0ff30: 48 00 be 6d bl ffc1bd9c <_init>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
ffc0ff34: 80 1f 00 a8 lwz r0,168(r31)
ffc0ff38: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ff3c: 40 be 00 18 bne+ cr7,ffc0ff54 <_Thread_Handler+0x90> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
ffc0ff40: 80 1f 00 a4 lwz r0,164(r31)
ffc0ff44: 80 7f 00 b0 lwz r3,176(r31)
ffc0ff48: 7c 09 03 a6 mtctr r0
ffc0ff4c: 4e 80 04 21 bctrl
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
ffc0ff50: 90 7f 00 28 stw r3,40(r31)
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
ffc0ff54: 7f e3 fb 78 mr r3,r31
ffc0ff58: 4b ff b7 39 bl ffc0b690 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
ffc0ff5c: 38 60 00 00 li r3,0
ffc0ff60: 38 80 00 01 li r4,1
ffc0ff64: 38 a0 00 06 li r5,6
ffc0ff68: 4b ff 94 59 bl ffc093c0 <_Internal_error_Occurred>
ffc0a56c <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0a56c: 94 21 ff d0 stwu r1,-48(r1)
ffc0a570: 7c 08 02 a6 mflr r0
ffc0a574: 90 01 00 34 stw r0,52(r1)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0a578: 38 00 00 00 li r0,0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0a57c: 93 41 00 18 stw r26,24(r1)
ffc0a580: 7d 3a 4b 78 mr r26,r9
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
the_thread->libc_reent = NULL;
ffc0a584: 90 04 01 3c stw r0,316(r4)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0a588: 90 04 01 40 stw r0,320(r4)
ffc0a58c: 90 04 01 44 stw r0,324(r4)
ffc0a590: 90 04 01 48 stw r0,328(r4)
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0a594: 81 21 00 40 lwz r9,64(r1)
ffc0a598: 93 a1 00 24 stw r29,36(r1)
ffc0a59c: 7c 7d 1b 78 mr r29,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 );
ffc0a5a0: 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
)
{
ffc0a5a4: 93 e1 00 2c stw r31,44(r1)
ffc0a5a8: 7c 9f 23 78 mr r31,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 );
ffc0a5ac: 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
)
{
ffc0a5b0: 92 e1 00 0c stw r23,12(r1)
ffc0a5b4: 7d 57 53 78 mr r23,r10
ffc0a5b8: 93 01 00 10 stw r24,16(r1)
ffc0a5bc: 93 61 00 1c stw r27,28(r1)
ffc0a5c0: 7d 1b 43 78 mr r27,r8
ffc0a5c4: 93 81 00 20 stw r28,32(r1)
ffc0a5c8: 7c fc 3b 78 mr r28,r7
ffc0a5cc: 93 c1 00 28 stw r30,40(r1)
ffc0a5d0: 7c de 33 78 mr r30,r6
ffc0a5d4: 93 21 00 14 stw r25,20(r1)
ffc0a5d8: 83 09 00 00 lwz r24,0(r9)
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
ffc0a5dc: 48 00 0a d9 bl ffc0b0b4 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
ffc0a5e0: 2c 03 00 00 cmpwi r3,0
ffc0a5e4: 41 82 01 90 beq- ffc0a774 <_Thread_Initialize+0x208>
ffc0a5e8: 7f 83 f0 40 cmplw cr7,r3,r30
ffc0a5ec: 41 9c 01 88 blt- cr7,ffc0a774 <_Thread_Initialize+0x208><== NEVER TAKEN
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
ffc0a5f0: 2f 9c 00 00 cmpwi cr7,r28,0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
ffc0a5f4: 80 1f 00 d4 lwz r0,212(r31)
the_stack->size = size;
ffc0a5f8: 90 7f 00 c8 stw r3,200(r31)
ffc0a5fc: 3b 80 00 00 li r28,0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
ffc0a600: 90 1f 00 cc stw r0,204(r31)
ffc0a604: 41 be 00 1c beq+ cr7,ffc0a620 <_Thread_Initialize+0xb4>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
ffc0a608: 38 60 01 08 li r3,264
ffc0a60c: 48 00 16 b5 bl ffc0bcc0 <_Workspace_Allocate>
if ( !fp_area )
ffc0a610: 7c 7c 1b 79 mr. r28,r3
ffc0a614: 40 a2 00 0c bne+ ffc0a620 <_Thread_Initialize+0xb4>
ffc0a618: 3b c0 00 00 li r30,0
ffc0a61c: 48 00 00 f0 b ffc0a70c <_Thread_Initialize+0x1a0>
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0a620: 3d 20 00 00 lis r9,0
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
ffc0a624: 93 9f 01 38 stw r28,312(r31)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0a628: 38 00 00 00 li r0,0
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0a62c: 80 69 27 58 lwz r3,10072(r9)
ffc0a630: 3b c0 00 00 li r30,0
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
ffc0a634: 90 1f 00 6c stw r0,108(r31)
ffc0a638: 2f 83 00 00 cmpwi cr7,r3,0
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
the_thread->Start.fp_context = fp_area;
ffc0a63c: 93 9f 00 d0 stw r28,208(r31)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0a640: 90 1f 00 50 stw r0,80(r31)
the_watchdog->routine = routine;
ffc0a644: 90 1f 00 64 stw r0,100(r31)
the_watchdog->id = id;
ffc0a648: 90 1f 00 68 stw r0,104(r31)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0a64c: 41 be 00 18 beq+ cr7,ffc0a664 <_Thread_Initialize+0xf8>
extensions_area = _Workspace_Allocate(
ffc0a650: 38 63 00 01 addi r3,r3,1
ffc0a654: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc0a658: 48 00 16 69 bl ffc0bcc0 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
ffc0a65c: 7c 7e 1b 79 mr. r30,r3
ffc0a660: 41 82 00 ac beq- ffc0a70c <_Thread_Initialize+0x1a0>
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
ffc0a664: 2f 9e 00 00 cmpwi cr7,r30,0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
ffc0a668: 93 df 01 4c stw r30,332(r31)
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
ffc0a66c: 41 9e 00 30 beq- cr7,ffc0a69c <_Thread_Initialize+0x130>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
ffc0a670: 3d 20 00 00 lis r9,0
ffc0a674: 81 69 27 58 lwz r11,10072(r9)
the_thread->extensions[i] = NULL;
ffc0a678: 38 00 00 00 li r0,0
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
ffc0a67c: 39 20 00 00 li r9,0
ffc0a680: 48 00 00 0c b ffc0a68c <_Thread_Initialize+0x120>
the_thread->extensions[i] = NULL;
ffc0a684: 81 1f 01 4c lwz r8,332(r31)
ffc0a688: 7c 08 51 2e stwx r0,r8,r10
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
ffc0a68c: 7f 89 58 40 cmplw cr7,r9,r11
the_thread->extensions[i] = NULL;
ffc0a690: 55 2a 10 3a rlwinm r10,r9,2,0,29
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
ffc0a694: 39 29 00 01 addi r9,r9,1
ffc0a698: 40 9d ff ec ble+ cr7,ffc0a684 <_Thread_Initialize+0x118>
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
ffc0a69c: 80 01 00 38 lwz r0,56(r1)
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
ffc0a6a0: 3b 20 00 00 li r25,0
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
ffc0a6a4: 9b 5f 00 b4 stb r26,180(r31)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
ffc0a6a8: 7f 64 db 78 mr r4,r27
ffc0a6ac: 7f e3 fb 78 mr r3,r31
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
ffc0a6b0: 90 1f 00 bc stw r0,188(r31)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0a6b4: 80 01 00 3c lwz r0,60(r1)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
ffc0a6b8: 92 ff 00 b8 stw r23,184(r31)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0a6bc: 90 1f 00 c0 stw r0,192(r31)
the_thread->current_state = STATES_DORMANT;
ffc0a6c0: 38 00 00 01 li r0,1
ffc0a6c4: 90 1f 00 10 stw r0,16(r31)
the_thread->Wait.queue = NULL;
ffc0a6c8: 93 3f 00 44 stw r25,68(r31)
the_thread->resource_count = 0;
ffc0a6cc: 93 3f 00 1c stw r25,28(r31)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
ffc0a6d0: 93 7f 00 18 stw r27,24(r31)
the_thread->Start.initial_priority = priority;
ffc0a6d4: 93 7f 00 c4 stw r27,196(r31)
_Thread_Set_priority( the_thread, priority );
ffc0a6d8: 48 00 07 d5 bl ffc0aeac <_Thread_Set_priority>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc0a6dc: a0 1f 00 0a lhz r0,10(r31)
ffc0a6e0: 81 3d 00 1c lwz r9,28(r29)
* 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 );
ffc0a6e4: 7f e3 fb 78 mr r3,r31
ffc0a6e8: 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 );
ffc0a6ec: 93 3f 00 88 stw r25,136(r31)
ffc0a6f0: 7f e9 01 2e stwx r31,r9,r0
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc0a6f4: 93 1f 00 0c stw r24,12(r31)
ffc0a6f8: 93 3f 00 84 stw r25,132(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 );
ffc0a6fc: 48 00 10 95 bl ffc0b790 <_User_extensions_Thread_create>
if ( extension_status )
ffc0a700: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a704: 38 60 00 01 li r3,1
ffc0a708: 40 9e 00 70 bne- cr7,ffc0a778 <_Thread_Initialize+0x20c>
return true;
failed:
if ( the_thread->libc_reent )
ffc0a70c: 80 7f 01 3c lwz r3,316(r31)
ffc0a710: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a714: 41 9e 00 08 beq- cr7,ffc0a71c <_Thread_Initialize+0x1b0>
_Workspace_Free( the_thread->libc_reent );
ffc0a718: 48 00 15 dd bl ffc0bcf4 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
ffc0a71c: 80 7f 01 40 lwz r3,320(r31)
ffc0a720: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a724: 41 9e 00 08 beq- cr7,ffc0a72c <_Thread_Initialize+0x1c0>
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0a728: 48 00 15 cd bl ffc0bcf4 <_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] )
ffc0a72c: 80 7f 01 44 lwz r3,324(r31)
ffc0a730: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a734: 41 9e 00 08 beq- cr7,ffc0a73c <_Thread_Initialize+0x1d0><== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0a738: 48 00 15 bd bl ffc0bcf4 <_Workspace_Free> <== NOT EXECUTED
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] )
ffc0a73c: 80 7f 01 48 lwz r3,328(r31)
ffc0a740: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a744: 41 9e 00 08 beq- cr7,ffc0a74c <_Thread_Initialize+0x1e0><== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0a748: 48 00 15 ad bl ffc0bcf4 <_Workspace_Free> <== NOT EXECUTED
if ( extensions_area )
ffc0a74c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0a750: 41 9e 00 0c beq- cr7,ffc0a75c <_Thread_Initialize+0x1f0>
(void) _Workspace_Free( extensions_area );
ffc0a754: 7f c3 f3 78 mr r3,r30
ffc0a758: 48 00 15 9d bl ffc0bcf4 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
ffc0a75c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0a760: 41 9e 00 0c beq- cr7,ffc0a76c <_Thread_Initialize+0x200>
(void) _Workspace_Free( fp_area );
ffc0a764: 7f 83 e3 78 mr r3,r28
ffc0a768: 48 00 15 8d bl ffc0bcf4 <_Workspace_Free>
#endif
_Thread_Stack_Free( the_thread );
ffc0a76c: 7f e3 fb 78 mr r3,r31
ffc0a770: 48 00 09 d1 bl ffc0b140 <_Thread_Stack_Free>
return false;
ffc0a774: 38 60 00 00 li r3,0
}
ffc0a778: 80 01 00 34 lwz r0,52(r1)
ffc0a77c: 82 e1 00 0c lwz r23,12(r1)
ffc0a780: 7c 08 03 a6 mtlr r0
ffc0a784: 83 01 00 10 lwz r24,16(r1)
ffc0a788: 83 21 00 14 lwz r25,20(r1)
ffc0a78c: 83 41 00 18 lwz r26,24(r1)
ffc0a790: 83 61 00 1c lwz r27,28(r1)
ffc0a794: 83 81 00 20 lwz r28,32(r1)
ffc0a798: 83 a1 00 24 lwz r29,36(r1)
ffc0a79c: 83 c1 00 28 lwz r30,40(r1)
ffc0a7a0: 83 e1 00 2c lwz r31,44(r1)
ffc0a7a4: 38 21 00 30 addi r1,r1,48
ffc0a7a8: 4e 80 00 20 blr
ffc0e678 <_Thread_Reset_timeslice>:
{
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ffc0e678: 3d 20 00 00 lis r9,0
ffc0e67c: 81 29 27 6c lwz r9,10092(r9)
ready = executing->ready;
ffc0e680: 81 69 00 8c lwz r11,140(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0e684: 7c 00 00 a6 mfmsr r0
ffc0e688: 7d 50 42 a6 mfsprg r10,0
ffc0e68c: 7c 0a 50 78 andc r10,r0,r10
ffc0e690: 7d 40 01 24 mtmsr r10
_ISR_Disable( level );
if ( _Chain_Has_only_one_node( ready ) ) {
ffc0e694: 81 0b 00 00 lwz r8,0(r11)
ffc0e698: 81 4b 00 08 lwz r10,8(r11)
ffc0e69c: 7f 88 50 00 cmpw cr7,r8,r10
ffc0e6a0: 40 be 00 08 bne+ cr7,ffc0e6a8 <_Thread_Reset_timeslice+0x30>
_ISR_Enable( level );
ffc0e6a4: 48 00 00 5c b ffc0e700 <_Thread_Reset_timeslice+0x88>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0e6a8: 81 49 00 00 lwz r10,0(r9)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
ffc0e6ac: 38 eb 00 04 addi r7,r11,4
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
ffc0e6b0: 81 09 00 04 lwz r8,4(r9)
next->previous = previous;
previous->next = next;
ffc0e6b4: 91 48 00 00 stw r10,0(r8)
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
ffc0e6b8: 91 0a 00 04 stw r8,4(r10)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
ffc0e6bc: 90 e9 00 00 stw r7,0(r9)
old_last_node = the_chain->last;
ffc0e6c0: 81 4b 00 08 lwz r10,8(r11)
the_chain->last = the_node;
ffc0e6c4: 91 2b 00 08 stw r9,8(r11)
old_last_node->next = the_node;
the_node->previous = old_last_node;
ffc0e6c8: 91 49 00 04 stw r10,4(r9)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
ffc0e6cc: 91 2a 00 00 stw r9,0(r10)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0e6d0: 7d 40 00 a6 mfmsr r10
ffc0e6d4: 7c 00 01 24 mtmsr r0
ffc0e6d8: 7d 40 01 24 mtmsr r10
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
ffc0e6dc: 3d 40 00 00 lis r10,0
ffc0e6e0: 81 0a 27 48 lwz r8,10056(r10)
ffc0e6e4: 7f 89 40 00 cmpw cr7,r9,r8
ffc0e6e8: 40 be 00 0c bne+ cr7,ffc0e6f4 <_Thread_Reset_timeslice+0x7c><== NEVER TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
ffc0e6ec: 81 2b 00 00 lwz r9,0(r11)
ffc0e6f0: 91 2a 27 48 stw r9,10056(r10)
_Context_Switch_necessary = true;
ffc0e6f4: 39 60 00 01 li r11,1
ffc0e6f8: 3d 20 00 00 lis r9,0
ffc0e6fc: 99 69 27 7c stb r11,10108(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0e700: 7c 00 01 24 mtmsr r0
ffc0e704: 4e 80 00 20 blr
ffc0bf0c <_Thread_Restart>:
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
ffc0bf0c: 94 21 ff e8 stwu r1,-24(r1)
ffc0bf10: 7c 08 02 a6 mflr r0
ffc0bf14: 90 01 00 1c stw r0,28(r1)
if ( !_States_Is_dormant( the_thread->current_state ) ) {
ffc0bf18: 80 03 00 10 lwz r0,16(r3)
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
ffc0bf1c: 93 e1 00 14 stw r31,20(r1)
ffc0bf20: 7c 7f 1b 78 mr r31,r3
if ( !_States_Is_dormant( the_thread->current_state ) ) {
ffc0bf24: 70 09 00 01 andi. r9,r0,1
ffc0bf28: 38 00 00 00 li r0,0
ffc0bf2c: 40 a2 00 74 bne+ ffc0bfa0 <_Thread_Restart+0x94>
_Thread_Set_transient( the_thread );
ffc0bf30: 90 81 00 08 stw r4,8(r1)
ffc0bf34: 90 a1 00 0c stw r5,12(r1)
ffc0bf38: 48 00 01 f5 bl ffc0c12c <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
ffc0bf3c: 7f e3 fb 78 mr r3,r31
ffc0bf40: 80 81 00 08 lwz r4,8(r1)
ffc0bf44: 80 a1 00 0c lwz r5,12(r1)
ffc0bf48: 48 00 39 89 bl ffc0f8d0 <_Thread_Reset>
_Thread_Load_environment( the_thread );
ffc0bf4c: 7f e3 fb 78 mr r3,r31
ffc0bf50: 48 00 35 7d bl ffc0f4cc <_Thread_Load_environment>
_Thread_Ready( the_thread );
ffc0bf54: 7f e3 fb 78 mr r3,r31
ffc0bf58: 48 00 38 9d bl ffc0f7f4 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
ffc0bf5c: 7f e3 fb 78 mr r3,r31
ffc0bf60: 48 00 0a 51 bl ffc0c9b0 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
ffc0bf64: 3d 20 00 00 lis r9,0
ffc0bf68: 81 29 27 98 lwz r9,10136(r9)
ffc0bf6c: 38 00 00 01 li r0,1
ffc0bf70: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0bf74: 40 be 00 2c bne+ cr7,ffc0bfa0 <_Thread_Restart+0x94>
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
ffc0bf78: 80 1f 01 38 lwz r0,312(r31)
ffc0bf7c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0bf80: 41 9e 00 0c beq- cr7,ffc0bf8c <_Thread_Restart+0x80> <== NEVER TAKEN
_Context_Restore_fp( &_Thread_Executing->fp_context );
ffc0bf84: 38 7f 01 38 addi r3,r31,312
ffc0bf88: 48 01 2d 99 bl ffc1ed20 <_CPU_Context_restore_fp>
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
ffc0bf8c: 3d 20 00 00 lis r9,0
ffc0bf90: 80 69 27 98 lwz r3,10136(r9)
ffc0bf94: 38 63 00 d8 addi r3,r3,216
ffc0bf98: 48 01 2f 49 bl ffc1eee0 <_CPU_Context_restore>
ffc0bf9c: 38 00 00 01 li r0,1 <== NOT EXECUTED
return true;
}
return false;
}
ffc0bfa0: 7c 03 03 78 mr r3,r0
ffc0bfa4: 80 01 00 1c lwz r0,28(r1)
ffc0bfa8: 83 e1 00 14 lwz r31,20(r1)
ffc0bfac: 38 21 00 18 addi r1,r1,24
ffc0bfb0: 7c 08 03 a6 mtlr r0
ffc0bfb4: 4e 80 00 20 blr
ffc0f5e4 <_Thread_Resume>:
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0f5e4: 7c 00 00 a6 mfmsr r0
ffc0f5e8: 7d 30 42 a6 mfsprg r9,0
ffc0f5ec: 7c 09 48 78 andc r9,r0,r9
ffc0f5f0: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
ffc0f5f4: 81 23 00 10 lwz r9,16(r3)
if ( current_state & STATES_SUSPENDED ) {
ffc0f5f8: 71 2b 00 02 andi. r11,r9,2
ffc0f5fc: 41 82 00 a8 beq- ffc0f6a4 <_Thread_Resume+0xc0> <== NEVER TAKEN
ffc0f600: 55 29 07 fa rlwinm r9,r9,0,31,29
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
ffc0f604: 2f 89 00 00 cmpwi cr7,r9,0
}
#endif
current_state = the_thread->current_state;
if ( current_state & STATES_SUSPENDED ) {
current_state =
ffc0f608: 91 23 00 10 stw r9,16(r3)
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
ffc0f60c: 40 9e 00 98 bne- cr7,ffc0f6a4 <_Thread_Resume+0xc0>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
ffc0f610: 81 63 00 90 lwz r11,144(r3)
ffc0f614: 81 43 00 98 lwz r10,152(r3)
ffc0f618: 81 0b 00 00 lwz r8,0(r11)
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
ffc0f61c: 81 23 00 8c lwz r9,140(r3)
ffc0f620: 7d 0a 53 78 or r10,r8,r10
ffc0f624: 91 4b 00 00 stw r10,0(r11)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
ffc0f628: 39 69 00 04 addi r11,r9,4
_Priority_Major_bit_map |= the_priority_map->ready_major;
ffc0f62c: 3d 40 00 00 lis r10,0
ffc0f630: 91 63 00 00 stw r11,0(r3)
ffc0f634: 80 ea 27 80 lwz r7,10112(r10)
ffc0f638: 81 03 00 94 lwz r8,148(r3)
old_last_node = the_chain->last;
ffc0f63c: 81 69 00 08 lwz r11,8(r9)
ffc0f640: 7c e8 43 78 or r8,r7,r8
the_chain->last = the_node;
ffc0f644: 90 69 00 08 stw r3,8(r9)
ffc0f648: 91 0a 27 80 stw r8,10112(r10)
old_last_node->next = the_node;
the_node->previous = old_last_node;
ffc0f64c: 91 63 00 04 stw r11,4(r3)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
ffc0f650: 90 6b 00 00 stw r3,0(r11)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0f654: 7d 20 00 a6 mfmsr r9
ffc0f658: 7c 00 01 24 mtmsr r0
ffc0f65c: 7d 20 01 24 mtmsr r9
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
ffc0f660: 3d 60 00 00 lis r11,0
ffc0f664: 81 23 00 14 lwz r9,20(r3)
ffc0f668: 81 4b 27 68 lwz r10,10088(r11)
ffc0f66c: 81 4a 00 14 lwz r10,20(r10)
ffc0f670: 7f 89 50 40 cmplw cr7,r9,r10
ffc0f674: 40 9c 00 30 bge- cr7,ffc0f6a4 <_Thread_Resume+0xc0>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
ffc0f678: 3d 40 00 00 lis r10,0
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
ffc0f67c: 90 6b 27 68 stw r3,10088(r11)
if ( _Thread_Executing->is_preemptible ||
ffc0f680: 81 4a 27 8c lwz r10,10124(r10)
ffc0f684: 89 6a 00 75 lbz r11,117(r10)
ffc0f688: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0f68c: 40 9e 00 0c bne- cr7,ffc0f698 <_Thread_Resume+0xb4>
ffc0f690: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f694: 40 9e 00 10 bne- cr7,ffc0f6a4 <_Thread_Resume+0xc0> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
ffc0f698: 39 60 00 01 li r11,1
ffc0f69c: 3d 20 00 00 lis r9,0
ffc0f6a0: 99 69 27 9c stb r11,10140(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0f6a4: 7c 00 01 24 mtmsr r0
}
}
}
_ISR_Enable( level );
}
ffc0f6a8: 4e 80 00 20 blr
ffc0b3e4 <_Thread_Yield_processor>:
{
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ffc0b3e4: 3d 20 00 00 lis r9,0
ffc0b3e8: 81 29 27 6c lwz r9,10092(r9)
ready = executing->ready;
ffc0b3ec: 81 69 00 8c lwz r11,140(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0b3f0: 7c 00 00 a6 mfmsr r0
ffc0b3f4: 7d 50 42 a6 mfsprg r10,0
ffc0b3f8: 7c 0a 50 78 andc r10,r0,r10
ffc0b3fc: 7d 40 01 24 mtmsr r10
_ISR_Disable( level );
if ( !_Chain_Has_only_one_node( ready ) ) {
ffc0b400: 80 eb 00 00 lwz r7,0(r11)
ffc0b404: 3d 40 00 00 lis r10,0
ffc0b408: 81 0b 00 08 lwz r8,8(r11)
ffc0b40c: 7f 87 40 00 cmpw cr7,r7,r8
ffc0b410: 41 9e 00 50 beq- cr7,ffc0b460 <_Thread_Yield_processor+0x7c>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0b414: 81 09 00 00 lwz r8,0(r9)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
ffc0b418: 38 cb 00 04 addi r6,r11,4
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
ffc0b41c: 80 e9 00 04 lwz r7,4(r9)
next->previous = previous;
previous->next = next;
ffc0b420: 91 07 00 00 stw r8,0(r7)
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
ffc0b424: 90 e8 00 04 stw r7,4(r8)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
ffc0b428: 90 c9 00 00 stw r6,0(r9)
old_last_node = the_chain->last;
ffc0b42c: 81 0b 00 08 lwz r8,8(r11)
the_chain->last = the_node;
ffc0b430: 91 2b 00 08 stw r9,8(r11)
old_last_node->next = the_node;
the_node->previous = old_last_node;
ffc0b434: 91 09 00 04 stw r8,4(r9)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
ffc0b438: 91 28 00 00 stw r9,0(r8)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0b43c: 7d 00 00 a6 mfmsr r8
ffc0b440: 7c 00 01 24 mtmsr r0
ffc0b444: 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 ) )
ffc0b448: 81 0a 27 48 lwz r8,10056(r10)
ffc0b44c: 7f 89 40 00 cmpw cr7,r9,r8
ffc0b450: 40 be 00 1c bne+ cr7,ffc0b46c <_Thread_Yield_processor+0x88><== NEVER TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
ffc0b454: 81 2b 00 00 lwz r9,0(r11)
ffc0b458: 91 2a 27 48 stw r9,10056(r10)
ffc0b45c: 48 00 00 10 b ffc0b46c <_Thread_Yield_processor+0x88>
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
ffc0b460: 81 6a 27 48 lwz r11,10056(r10)
ffc0b464: 7f 89 58 00 cmpw cr7,r9,r11
ffc0b468: 41 9e 00 10 beq- cr7,ffc0b478 <_Thread_Yield_processor+0x94><== ALWAYS TAKEN
_Context_Switch_necessary = true;
ffc0b46c: 39 60 00 01 li r11,1
ffc0b470: 3d 20 00 00 lis r9,0
ffc0b474: 99 69 27 7c stb r11,10108(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0b478: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
}
ffc0b47c: 4e 80 00 20 blr
ffc0ab48 <_Thread_queue_Enqueue_priority>:
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
ffc0ab48: 80 04 00 14 lwz r0,20(r4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
ffc0ab4c: 39 04 00 3c addi r8,r4,60
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
ffc0ab50: 94 21 ff f0 stwu r1,-16(r1)
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
ffc0ab54: 39 64 00 38 addi r11,r4,56
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 ) )
ffc0ab58: 70 09 00 20 andi. r9,r0,32
_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 ];
ffc0ab5c: 54 0a d1 be rlwinm r10,r0,26,6,31
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
ffc0ab60: 91 04 00 38 stw r8,56(r4)
ffc0ab64: 1d 4a 00 0c mulli r10,r10,12
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
ffc0ab68: 93 e1 00 0c stw r31,12(r1)
the_chain->permanent_null = NULL;
ffc0ab6c: 39 00 00 00 li r8,0
_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;
ffc0ab70: 81 23 00 38 lwz r9,56(r3)
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
ffc0ab74: 7d 43 52 14 add r10,r3,r10
ffc0ab78: 91 04 00 3c stw r8,60(r4)
the_chain->last = _Chain_Head(the_chain);
ffc0ab7c: 91 64 00 40 stw r11,64(r4)
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
ffc0ab80: 40 82 00 98 bne- ffc0ac18 <_Thread_queue_Enqueue_priority+0xd0>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
ffc0ab84: 38 ca 00 04 addi r6,r10,4
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0ab88: 7d 00 00 a6 mfmsr r8
ffc0ab8c: 7d 70 42 a6 mfsprg r11,0
ffc0ab90: 7d 0b 58 78 andc r11,r8,r11
ffc0ab94: 7d 60 01 24 mtmsr r11
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
ffc0ab98: 38 e0 ff ff li r7,-1
ffc0ab9c: 81 6a 00 00 lwz r11,0(r10)
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
ffc0aba0: 48 00 00 34 b ffc0abd4 <_Thread_queue_Enqueue_priority+0x8c>
search_priority = search_thread->current_priority;
ffc0aba4: 80 eb 00 14 lwz r7,20(r11)
if ( priority <= search_priority )
ffc0aba8: 7f 80 38 40 cmplw cr7,r0,r7
ffc0abac: 40 9d 00 30 ble- cr7,ffc0abdc <_Thread_queue_Enqueue_priority+0x94>
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0abb0: 7d 80 00 a6 mfmsr r12
ffc0abb4: 7d 00 01 24 mtmsr r8
ffc0abb8: 7d 80 01 24 mtmsr r12
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) ) {
ffc0abbc: 81 8b 00 10 lwz r12,16(r11)
ffc0abc0: 7d 3f 60 39 and. r31,r9,r12
ffc0abc4: 40 a2 00 0c bne+ ffc0abd0 <_Thread_queue_Enqueue_priority+0x88><== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0abc8: 7d 00 01 24 mtmsr r8 <== NOT EXECUTED
ffc0abcc: 4b ff ff bc b ffc0ab88 <_Thread_queue_Enqueue_priority+0x40><== NOT EXECUTED
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
ffc0abd0: 81 6b 00 00 lwz r11,0(r11)
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
ffc0abd4: 7f 8b 30 00 cmpw cr7,r11,r6
ffc0abd8: 40 9e ff cc bne+ cr7,ffc0aba4 <_Thread_queue_Enqueue_priority+0x5c>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
ffc0abdc: 81 43 00 30 lwz r10,48(r3)
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
ffc0abe0: 7d 09 43 78 mr r9,r8
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
ffc0abe4: 2f 8a 00 01 cmpwi cr7,r10,1
ffc0abe8: 40 be 00 f8 bne+ cr7,ffc0ace0 <_Thread_queue_Enqueue_priority+0x198>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
ffc0abec: 7f 80 38 00 cmpw cr7,r0,r7
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
ffc0abf0: 38 00 00 00 li r0,0
ffc0abf4: 90 03 00 30 stw r0,48(r3)
if ( priority == search_priority )
ffc0abf8: 41 9e 00 c4 beq- cr7,ffc0acbc <_Thread_queue_Enqueue_priority+0x174>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
ffc0abfc: 81 2b 00 04 lwz r9,4(r11)
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
ffc0ac00: 91 64 00 00 stw r11,0(r4)
the_node->previous = previous_node;
ffc0ac04: 91 24 00 04 stw r9,4(r4)
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
ffc0ac08: 90 64 00 44 stw r3,68(r4)
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
ffc0ac0c: 90 89 00 00 stw r4,0(r9)
search_node->previous = the_node;
ffc0ac10: 90 8b 00 04 stw r4,4(r11)
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
ffc0ac14: 48 00 00 9c b ffc0acb0 <_Thread_queue_Enqueue_priority+0x168>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
ffc0ac18: 3c c0 00 00 lis r6,0
ffc0ac1c: 38 c6 26 64 addi r6,r6,9828
ffc0ac20: 88 e6 00 00 lbz r7,0(r6)
ffc0ac24: 38 e7 00 01 addi r7,r7,1
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0ac28: 7d 00 00 a6 mfmsr r8
ffc0ac2c: 7d 70 42 a6 mfsprg r11,0
ffc0ac30: 7d 0b 58 78 andc r11,r8,r11
ffc0ac34: 7d 60 01 24 mtmsr r11
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
ffc0ac38: 81 6a 00 08 lwz r11,8(r10)
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
ffc0ac3c: 48 00 00 34 b ffc0ac70 <_Thread_queue_Enqueue_priority+0x128>
search_priority = search_thread->current_priority;
ffc0ac40: 80 eb 00 14 lwz r7,20(r11)
if ( priority >= search_priority )
ffc0ac44: 7f 80 38 40 cmplw cr7,r0,r7
ffc0ac48: 40 9c 00 30 bge- cr7,ffc0ac78 <_Thread_queue_Enqueue_priority+0x130>
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0ac4c: 7d 80 00 a6 mfmsr r12
ffc0ac50: 7d 00 01 24 mtmsr r8
ffc0ac54: 7d 80 01 24 mtmsr r12
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) ) {
ffc0ac58: 81 8b 00 10 lwz r12,16(r11)
ffc0ac5c: 7d 3f 60 39 and. r31,r9,r12
ffc0ac60: 40 a2 00 0c bne+ ffc0ac6c <_Thread_queue_Enqueue_priority+0x124>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0ac64: 7d 00 01 24 mtmsr r8
ffc0ac68: 4b ff ff b8 b ffc0ac20 <_Thread_queue_Enqueue_priority+0xd8>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
ffc0ac6c: 81 6b 00 04 lwz r11,4(r11)
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
ffc0ac70: 7f 8b 50 00 cmpw cr7,r11,r10
ffc0ac74: 40 9e ff cc bne+ cr7,ffc0ac40 <_Thread_queue_Enqueue_priority+0xf8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
ffc0ac78: 81 43 00 30 lwz r10,48(r3)
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
ffc0ac7c: 7d 09 43 78 mr r9,r8
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
ffc0ac80: 2f 8a 00 01 cmpwi cr7,r10,1
ffc0ac84: 40 be 00 5c bne+ cr7,ffc0ace0 <_Thread_queue_Enqueue_priority+0x198>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
ffc0ac88: 7f 80 38 00 cmpw cr7,r0,r7
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
ffc0ac8c: 38 00 00 00 li r0,0
ffc0ac90: 90 03 00 30 stw r0,48(r3)
if ( priority == search_priority )
ffc0ac94: 41 9e 00 28 beq- cr7,ffc0acbc <_Thread_queue_Enqueue_priority+0x174>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
ffc0ac98: 81 2b 00 00 lwz r9,0(r11)
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
ffc0ac9c: 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;
ffc0aca0: 91 24 00 00 stw r9,0(r4)
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
ffc0aca4: 90 64 00 44 stw r3,68(r4)
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;
ffc0aca8: 90 8b 00 00 stw r4,0(r11)
next_node->previous = the_node;
ffc0acac: 90 89 00 04 stw r4,4(r9)
ffc0acb0: 7d 00 01 24 mtmsr r8
ffc0acb4: 38 60 00 01 li r3,1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
ffc0acb8: 48 00 00 30 b ffc0ace8 <_Thread_queue_Enqueue_priority+0x1a0>
ffc0acbc: 39 6b 00 3c addi r11,r11,60
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
ffc0acc0: 90 64 00 44 stw r3,68(r4)
_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;
ffc0acc4: 81 4b 00 04 lwz r10,4(r11)
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
ffc0acc8: 91 64 00 00 stw r11,0(r4)
the_node->previous = previous_node;
ffc0accc: 91 44 00 04 stw r10,4(r4)
previous_node->next = the_node;
ffc0acd0: 90 8a 00 00 stw r4,0(r10)
search_node->previous = the_node;
ffc0acd4: 90 8b 00 04 stw r4,4(r11)
ffc0acd8: 7d 20 01 24 mtmsr r9
ffc0acdc: 4b ff ff d8 b ffc0acb4 <_Thread_queue_Enqueue_priority+0x16c>
* 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;
ffc0ace0: 91 25 00 00 stw r9,0(r5)
return the_thread_queue->sync_state;
ffc0ace4: 80 63 00 30 lwz r3,48(r3)
}
ffc0ace8: 83 e1 00 0c lwz r31,12(r1)
ffc0acec: 38 21 00 10 addi r1,r1,16
ffc0acf0: 4e 80 00 20 blr
ffc0add8 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0add8: 94 21 ff d8 stwu r1,-40(r1)
ffc0addc: 7c 08 02 a6 mflr r0
ffc0ade0: 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 )
ffc0ade4: 7c 7f 1b 79 mr. r31,r3
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0ade8: 93 c1 00 20 stw r30,32(r1)
ffc0adec: 7c 9e 23 78 mr r30,r4
ffc0adf0: 90 01 00 2c stw r0,44(r1)
ffc0adf4: 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 )
ffc0adf8: 41 82 00 54 beq- ffc0ae4c <_Thread_queue_Requeue+0x74> <== 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 ) {
ffc0adfc: 80 1f 00 34 lwz r0,52(r31)
ffc0ae00: 2f 80 00 01 cmpwi cr7,r0,1
ffc0ae04: 40 be 00 48 bne+ cr7,ffc0ae4c <_Thread_queue_Requeue+0x74><== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0ae08: 7f a0 00 a6 mfmsr r29
ffc0ae0c: 7d 30 42 a6 mfsprg r9,0
ffc0ae10: 7f a9 48 78 andc r9,r29,r9
ffc0ae14: 7d 20 01 24 mtmsr r9
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
ffc0ae18: 3d 60 00 03 lis r11,3
ffc0ae1c: 81 24 00 10 lwz r9,16(r4)
ffc0ae20: 61 6b be e0 ori r11,r11,48864
ffc0ae24: 7d 6a 48 39 and. r10,r11,r9
ffc0ae28: 41 a2 00 20 beq+ ffc0ae48 <_Thread_queue_Requeue+0x70> <== NEVER TAKEN
ffc0ae2c: 90 1f 00 30 stw r0,48(r31)
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
ffc0ae30: 38 a0 00 01 li r5,1
ffc0ae34: 48 00 36 01 bl ffc0e434 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
ffc0ae38: 7f e3 fb 78 mr r3,r31
ffc0ae3c: 7f c4 f3 78 mr r4,r30
ffc0ae40: 38 a1 00 08 addi r5,r1,8
ffc0ae44: 4b ff fd 05 bl ffc0ab48 <_Thread_queue_Enqueue_priority>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0ae48: 7f a0 01 24 mtmsr r29
}
_ISR_Enable( level );
}
}
ffc0ae4c: 80 01 00 2c lwz r0,44(r1)
ffc0ae50: 83 a1 00 1c lwz r29,28(r1)
ffc0ae54: 7c 08 03 a6 mtlr r0
ffc0ae58: 83 c1 00 20 lwz r30,32(r1)
ffc0ae5c: 83 e1 00 24 lwz r31,36(r1)
ffc0ae60: 38 21 00 28 addi r1,r1,40
ffc0ae64: 4e 80 00 20 blr
ffc0ae68 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0ae68: 94 21 ff e8 stwu r1,-24(r1)
ffc0ae6c: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0ae70: 38 81 00 08 addi r4,r1,8
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0ae74: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0ae78: 4b ff f6 41 bl ffc0a4b8 <_Thread_Get>
switch ( location ) {
ffc0ae7c: 80 01 00 08 lwz r0,8(r1)
ffc0ae80: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ae84: 40 9e 00 18 bne- cr7,ffc0ae9c <_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 );
ffc0ae88: 48 00 36 a9 bl ffc0e530 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
ffc0ae8c: 3d 20 00 00 lis r9,0
ffc0ae90: 81 69 27 2c lwz r11,10028(r9)
ffc0ae94: 38 0b ff ff addi r0,r11,-1
ffc0ae98: 90 09 27 2c stw r0,10028(r9)
_Thread_Unnest_dispatch();
break;
}
}
ffc0ae9c: 80 01 00 1c lwz r0,28(r1)
ffc0aea0: 38 21 00 18 addi r1,r1,24
ffc0aea4: 7c 08 03 a6 mtlr r0
ffc0aea8: 4e 80 00 20 blr
ffc19d0c <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc19d0c: 94 21 ff 98 stwu r1,-104(r1)
ffc19d10: 7c 08 02 a6 mflr r0
ffc19d14: 92 01 00 28 stw r16,40(r1)
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
ffc19d18: 3a 01 00 08 addi r16,r1,8
ffc19d1c: 90 01 00 6c stw r0,108(r1)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
ffc19d20: 38 00 00 00 li r0,0
ffc19d24: 93 01 00 48 stw r24,72(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
ffc19d28: 3b 01 00 0c addi r24,r1,12
ffc19d2c: 93 61 00 54 stw r27,84(r1)
ffc19d30: 3b 61 00 18 addi r27,r1,24
ffc19d34: 93 c1 00 60 stw r30,96(r1)
ffc19d38: 3b c1 00 14 addi r30,r1,20
ffc19d3c: 92 21 00 2c stw r17,44(r1)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc19d40: 3e 20 00 00 lis r17,0
ffc19d44: 3a 31 28 7c addi r17,r17,10364
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc19d48: 92 41 00 30 stw r18,48(r1)
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ffc19d4c: 3e 40 00 00 lis r18,0
ffc19d50: 3a 52 28 44 addi r18,r18,10308
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc19d54: 93 21 00 4c stw r25,76(r1)
ffc19d58: 3f 20 00 00 lis r25,0
ffc19d5c: 3b 39 28 24 addi r25,r25,10276
ffc19d60: 93 a1 00 5c stw r29,92(r1)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
ffc19d64: 90 01 00 18 stw r0,24(r1)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
ffc19d68: 93 01 00 08 stw r24,8(r1)
the_chain->permanent_null = NULL;
ffc19d6c: 90 01 00 0c stw r0,12(r1)
the_chain->last = _Chain_Head(the_chain);
ffc19d70: 92 01 00 10 stw r16,16(r1)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
ffc19d74: 93 61 00 14 stw r27,20(r1)
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
ffc19d78: 93 c1 00 1c stw r30,28(r1)
ffc19d7c: 92 61 00 34 stw r19,52(r1)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
ffc19d80: 3a 63 00 08 addi r19,r3,8
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc19d84: 92 81 00 38 stw r20,56(r1)
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc19d88: 3a 83 00 40 addi r20,r3,64
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc19d8c: 92 a1 00 3c stw r21,60(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
ffc19d90: 3a a0 00 00 li r21,0
ffc19d94: 92 c1 00 40 stw r22,64(r1)
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
ffc19d98: 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
)
{
ffc19d9c: 92 e1 00 44 stw r23,68(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;
ffc19da0: 3a e0 00 01 li r23,1
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc19da4: 93 41 00 50 stw r26,80(r1)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc19da8: 3b 43 00 30 addi r26,r3,48
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc19dac: 93 81 00 58 stw r28,88(r1)
/*
* 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 );
ffc19db0: 3b 83 00 68 addi r28,r3,104
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc19db4: 93 e1 00 64 stw r31,100(r1)
ffc19db8: 7c 7f 1b 78 mr r31,r3
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
ffc19dbc: 92 1f 00 78 stw r16,120(r31)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc19dc0: 80 11 00 00 lwz r0,0(r17)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc19dc4: 7f c5 f3 78 mr r5,r30
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
ffc19dc8: 80 9f 00 3c lwz r4,60(r31)
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc19dcc: 7f 43 d3 78 mr r3,r26
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
ffc19dd0: 90 1f 00 3c stw r0,60(r31)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc19dd4: 7c 84 00 50 subf r4,r4,r0
ffc19dd8: 48 00 4d 61 bl ffc1eb38 <_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();
ffc19ddc: 83 b2 00 00 lwz r29,0(r18)
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
ffc19de0: 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 ) {
ffc19de4: 7f 9d 28 40 cmplw cr7,r29,r5
ffc19de8: 40 bd 00 18 ble+ cr7,ffc19e00 <_Timer_server_Body+0xf4>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc19dec: 7c 85 e8 50 subf r4,r5,r29
ffc19df0: 7f 83 e3 78 mr r3,r28
ffc19df4: 7f c5 f3 78 mr r5,r30
ffc19df8: 48 00 4d 41 bl ffc1eb38 <_Watchdog_Adjust_to_chain>
ffc19dfc: 48 00 00 18 b ffc19e14 <_Timer_server_Body+0x108>
} else if ( snapshot < last_snapshot ) {
ffc19e00: 40 bc 00 14 bge+ cr7,ffc19e14 <_Timer_server_Body+0x108>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
ffc19e04: 7c bd 28 50 subf r5,r29,r5
ffc19e08: 7f 83 e3 78 mr r3,r28
ffc19e0c: 38 80 00 01 li r4,1
ffc19e10: 48 00 4c 45 bl ffc1ea54 <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
ffc19e14: 93 bf 00 74 stw r29,116(r31)
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
ffc19e18: 80 7f 00 78 lwz r3,120(r31)
ffc19e1c: 48 00 0b 1d bl ffc1a938 <_Chain_Get>
if ( timer == NULL ) {
ffc19e20: 7c 64 1b 79 mr. r4,r3
ffc19e24: 41 82 00 34 beq- ffc19e58 <_Timer_server_Body+0x14c>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc19e28: 80 04 00 38 lwz r0,56(r4)
ffc19e2c: 2f 00 00 01 cmpwi cr6,r0,1
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc19e30: 2f 80 00 03 cmpwi cr7,r0,3
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc19e34: 40 ba 00 10 bne+ cr6,ffc19e44 <_Timer_server_Body+0x138>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
ffc19e38: 38 84 00 10 addi r4,r4,16
ffc19e3c: 7f 43 d3 78 mr r3,r26
ffc19e40: 48 00 00 10 b ffc19e50 <_Timer_server_Body+0x144>
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc19e44: 40 9e ff d4 bne+ cr7,ffc19e18 <_Timer_server_Body+0x10c><== NEVER TAKEN
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc19e48: 38 84 00 10 addi r4,r4,16
ffc19e4c: 7f 83 e3 78 mr r3,r28
ffc19e50: 48 00 4d a1 bl ffc1ebf0 <_Watchdog_Insert>
ffc19e54: 4b ff ff c4 b ffc19e18 <_Timer_server_Body+0x10c>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc19e58: 7c 00 00 a6 mfmsr r0
ffc19e5c: 7d 30 42 a6 mfsprg r9,0
ffc19e60: 7c 09 48 78 andc r9,r0,r9
ffc19e64: 7d 20 01 24 mtmsr r9
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ffc19e68: 81 21 00 08 lwz r9,8(r1)
ffc19e6c: 7f 89 c0 00 cmpw cr7,r9,r24
ffc19e70: 40 be 00 1c bne+ cr7,ffc19e8c <_Timer_server_Body+0x180><== NEVER TAKEN
ts->insert_chain = NULL;
ffc19e74: 90 9f 00 78 stw r4,120(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc19e78: 7c 00 01 24 mtmsr r0
_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 ) ) {
ffc19e7c: 80 01 00 14 lwz r0,20(r1)
ffc19e80: 7f 80 d8 00 cmpw cr7,r0,r27
ffc19e84: 40 be 00 10 bne+ cr7,ffc19e94 <_Timer_server_Body+0x188>
ffc19e88: 48 00 00 64 b ffc19eec <_Timer_server_Body+0x1e0>
ffc19e8c: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED
ffc19e90: 4b ff ff 30 b ffc19dc0 <_Timer_server_Body+0xb4> <== NOT EXECUTED
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc19e94: 7c 00 00 a6 mfmsr r0
ffc19e98: 7d 30 42 a6 mfsprg r9,0
ffc19e9c: 7c 09 48 78 andc r9,r0,r9
ffc19ea0: 7d 20 01 24 mtmsr r9
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
ffc19ea4: 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))
ffc19ea8: 7f 09 d8 00 cmpw cr6,r9,r27
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
ffc19eac: 2f 89 00 00 cmpwi cr7,r9,0
ffc19eb0: 41 9a 00 34 beq- cr6,ffc19ee4 <_Timer_server_Body+0x1d8>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
ffc19eb4: 81 69 00 00 lwz r11,0(r9)
the_chain->first = new_first;
ffc19eb8: 91 61 00 14 stw r11,20(r1)
new_first->previous = _Chain_Head(the_chain);
ffc19ebc: 93 cb 00 04 stw r30,4(r11)
ffc19ec0: 41 9e 00 24 beq- cr7,ffc19ee4 <_Timer_server_Body+0x1d8><== NEVER TAKEN
watchdog->state = WATCHDOG_INACTIVE;
ffc19ec4: 92 a9 00 08 stw r21,8(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc19ec8: 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 );
ffc19ecc: 80 09 00 1c lwz r0,28(r9)
ffc19ed0: 80 89 00 24 lwz r4,36(r9)
ffc19ed4: 80 69 00 20 lwz r3,32(r9)
ffc19ed8: 7c 09 03 a6 mtctr r0
ffc19edc: 4e 80 04 21 bctrl
}
ffc19ee0: 4b ff ff b4 b ffc19e94 <_Timer_server_Body+0x188>
ffc19ee4: 7c 00 01 24 mtmsr r0
ffc19ee8: 4b ff fe d4 b ffc19dbc <_Timer_server_Body+0xb0>
} else {
ts->active = false;
ffc19eec: 9a df 00 7c stb r22,124(r31)
ffc19ef0: 81 39 00 00 lwz r9,0(r25)
ffc19ef4: 38 09 00 01 addi r0,r9,1
ffc19ef8: 90 19 00 00 stw r0,0(r25)
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
ffc19efc: 80 7f 00 00 lwz r3,0(r31)
ffc19f00: 38 80 00 08 li r4,8
ffc19f04: 48 00 3f bd bl ffc1dec0 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc19f08: 7f e3 fb 78 mr r3,r31
ffc19f0c: 4b ff fd 01 bl ffc19c0c <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
ffc19f10: 7f e3 fb 78 mr r3,r31
ffc19f14: 4b ff fd 79 bl ffc19c8c <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
ffc19f18: 48 00 33 79 bl ffc1d290 <_Thread_Enable_dispatch>
ts->active = true;
ffc19f1c: 9a ff 00 7c stb r23,124(r31)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
ffc19f20: 7e 63 9b 78 mr r3,r19
ffc19f24: 48 00 4e 25 bl ffc1ed48 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc19f28: 7e 83 a3 78 mr r3,r20
ffc19f2c: 48 00 4e 1d bl ffc1ed48 <_Watchdog_Remove>
ffc19f30: 4b ff fe 8c b ffc19dbc <_Timer_server_Body+0xb0>
ffc0de30 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
ffc0de30: 94 21 ff e0 stwu r1,-32(r1)
ffc0de34: 7c 08 02 a6 mflr r0
ffc0de38: 90 01 00 24 stw r0,36(r1)
ffc0de3c: 93 c1 00 18 stw r30,24(r1)
ffc0de40: 7c be 2b 78 mr r30,r5
ffc0de44: 93 e1 00 1c stw r31,28(r1)
ffc0de48: 7c 7f 1b 78 mr r31,r3
ffc0de4c: 93 61 00 0c stw r27,12(r1)
ffc0de50: 93 81 00 10 stw r28,16(r1)
ffc0de54: 93 a1 00 14 stw r29,20(r1)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0de58: 7c 00 00 a6 mfmsr r0
ffc0de5c: 7d 30 42 a6 mfsprg r9,0
ffc0de60: 7c 09 48 78 andc r9,r0,r9
ffc0de64: 7d 20 01 24 mtmsr r9
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
ffc0de68: 81 23 00 00 lwz r9,0(r3)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
ffc0de6c: 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 ) ) {
ffc0de70: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0de74: 41 9e 00 78 beq- cr7,ffc0deec <_Watchdog_Adjust+0xbc>
switch ( direction ) {
ffc0de78: 2f 84 00 00 cmpwi cr7,r4,0
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
ffc0de7c: 3b 60 00 01 li r27,1
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
ffc0de80: 41 9e 00 64 beq- cr7,ffc0dee4 <_Watchdog_Adjust+0xb4>
ffc0de84: 2f 84 00 01 cmpwi cr7,r4,1
ffc0de88: 40 be 00 64 bne+ cr7,ffc0deec <_Watchdog_Adjust+0xbc> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
ffc0de8c: 81 69 00 10 lwz r11,16(r9)
ffc0de90: 7f cb 2a 14 add r30,r11,r5
ffc0de94: 48 00 00 18 b ffc0deac <_Watchdog_Adjust+0x7c>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
ffc0de98: 81 3f 00 00 lwz r9,0(r31)
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
ffc0de9c: 83 a9 00 10 lwz r29,16(r9)
ffc0dea0: 7f 9e e8 40 cmplw cr7,r30,r29
ffc0dea4: 40 bc 00 10 bge+ cr7,ffc0deb4 <_Watchdog_Adjust+0x84>
_Watchdog_First( header )->delta_interval -= units;
ffc0dea8: 7f de e8 50 subf r30,r30,r29
ffc0deac: 93 c9 00 10 stw r30,16(r9)
break;
ffc0deb0: 48 00 00 3c b ffc0deec <_Watchdog_Adjust+0xbc>
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
ffc0deb4: 93 69 00 10 stw r27,16(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0deb8: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
_Watchdog_Tickle( header );
ffc0debc: 7f e3 fb 78 mr r3,r31
ffc0dec0: 48 00 02 59 bl ffc0e118 <_Watchdog_Tickle>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0dec4: 7c 00 00 a6 mfmsr r0
ffc0dec8: 7d 30 42 a6 mfsprg r9,0
ffc0decc: 7c 09 48 78 andc r9,r0,r9
ffc0ded0: 7d 20 01 24 mtmsr r9
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
ffc0ded4: 81 3f 00 00 lwz r9,0(r31)
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
ffc0ded8: 7f dd f0 50 subf r30,r29,r30
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
ffc0dedc: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0dee0: 41 9e 00 0c beq- cr7,ffc0deec <_Watchdog_Adjust+0xbc>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
ffc0dee4: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0dee8: 40 9e ff b0 bne+ cr7,ffc0de98 <_Watchdog_Adjust+0x68> <== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0deec: 7c 00 01 24 mtmsr r0
}
}
_ISR_Enable( level );
}
ffc0def0: 80 01 00 24 lwz r0,36(r1)
ffc0def4: 83 61 00 0c lwz r27,12(r1)
ffc0def8: 7c 08 03 a6 mtlr r0
ffc0defc: 83 81 00 10 lwz r28,16(r1)
ffc0df00: 83 a1 00 14 lwz r29,20(r1)
ffc0df04: 83 c1 00 18 lwz r30,24(r1)
ffc0df08: 83 e1 00 1c lwz r31,28(r1)
ffc0df0c: 38 21 00 20 addi r1,r1,32
ffc0df10: 4e 80 00 20 blr
ffc1eb38 <_Watchdog_Adjust_to_chain>:
{
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
ffc1eb38: 2c 04 00 00 cmpwi r4,0
ffc1eb3c: 4d 82 00 20 beqlr
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc1eb40: 7d 40 00 a6 mfmsr r10
ffc1eb44: 7c 10 42 a6 mfsprg r0,0
ffc1eb48: 7d 40 00 78 andc r0,r10,r0
ffc1eb4c: 7c 00 01 24 mtmsr r0
/*
* 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;
ffc1eb50: 38 c0 00 00 li r6,0
ffc1eb54: 39 03 00 04 addi r8,r3,4
ffc1eb58: 39 85 00 04 addi r12,r5,4
ffc1eb5c: 48 00 00 0c b ffc1eb68 <_Watchdog_Adjust_to_chain+0x30>
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
ffc1eb60: 2f 84 00 00 cmpwi cr7,r4,0
ffc1eb64: 41 9e 00 84 beq- cr7,ffc1ebe8 <_Watchdog_Adjust_to_chain+0xb0>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
ffc1eb68: 81 63 00 00 lwz r11,0(r3)
break;
}
if ( _Chain_Is_empty( header ) ) {
ffc1eb6c: 7f 8b 40 00 cmpw cr7,r11,r8
ffc1eb70: 41 9e 00 78 beq- cr7,ffc1ebe8 <_Watchdog_Adjust_to_chain+0xb0>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
ffc1eb74: 80 0b 00 10 lwz r0,16(r11)
ffc1eb78: 7d 69 5b 78 mr r9,r11
ffc1eb7c: 7f 84 00 40 cmplw cr7,r4,r0
ffc1eb80: 40 bc 00 10 bge+ cr7,ffc1eb90 <_Watchdog_Adjust_to_chain+0x58>
first->delta_interval -= units;
ffc1eb84: 7c 84 00 50 subf r4,r4,r0
ffc1eb88: 90 8b 00 10 stw r4,16(r11)
break;
ffc1eb8c: 48 00 00 5c b ffc1ebe8 <_Watchdog_Adjust_to_chain+0xb0>
/*
* 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;
ffc1eb90: 90 cb 00 10 stw r6,16(r11)
/*
* 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;
ffc1eb94: 7c 80 20 50 subf r4,r0,r4
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc1eb98: 81 69 00 00 lwz r11,0(r9)
previous = the_node->previous;
ffc1eb9c: 80 e9 00 04 lwz r7,4(r9)
next->previous = previous;
previous->next = next;
ffc1eba0: 91 67 00 00 stw r11,0(r7)
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
ffc1eba4: 90 eb 00 04 stw r7,4(r11)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
ffc1eba8: 91 89 00 00 stw r12,0(r9)
old_last_node = the_chain->last;
ffc1ebac: 81 65 00 08 lwz r11,8(r5)
the_chain->last = the_node;
ffc1ebb0: 91 25 00 08 stw r9,8(r5)
old_last_node->next = the_node;
the_node->previous = old_last_node;
ffc1ebb4: 91 69 00 04 stw r11,4(r9)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
ffc1ebb8: 91 2b 00 00 stw r9,0(r11)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc1ebbc: 7c 00 00 a6 mfmsr r0
ffc1ebc0: 7d 40 01 24 mtmsr r10
ffc1ebc4: 7c 00 01 24 mtmsr r0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
ffc1ebc8: 80 03 00 00 lwz r0,0(r3)
_Chain_Extract_unprotected( &first->Node );
_Chain_Append_unprotected( to_fire, &first->Node );
_ISR_Flash( level );
if ( _Chain_Is_empty( header ) )
ffc1ebcc: 7f 80 40 00 cmpw cr7,r0,r8
ffc1ebd0: 7c 09 03 78 mr r9,r0
ffc1ebd4: 41 be ff 8c beq- cr7,ffc1eb60 <_Watchdog_Adjust_to_chain+0x28>
break;
first = _Watchdog_First( header );
if ( first->delta_interval != 0 )
ffc1ebd8: 80 09 00 10 lwz r0,16(r9)
ffc1ebdc: 2f 80 00 00 cmpwi cr7,r0,0
ffc1ebe0: 41 9e ff b8 beq+ cr7,ffc1eb98 <_Watchdog_Adjust_to_chain+0x60><== NEVER TAKEN
ffc1ebe4: 4b ff ff 7c b ffc1eb60 <_Watchdog_Adjust_to_chain+0x28>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc1ebe8: 7d 40 01 24 mtmsr r10
ffc1ebec: 4e 80 00 20 blr
ffc0baf8 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
ffc0baf8: 7c 69 1b 78 mr r9,r3
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0bafc: 7c 00 00 a6 mfmsr r0
ffc0bb00: 7d 70 42 a6 mfsprg r11,0
ffc0bb04: 7c 0b 58 78 andc r11,r0,r11
ffc0bb08: 7d 60 01 24 mtmsr r11
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
ffc0bb0c: 80 63 00 08 lwz r3,8(r3)
switch ( previous_state ) {
ffc0bb10: 2f 83 00 01 cmpwi cr7,r3,1
ffc0bb14: 41 9e 00 18 beq- cr7,ffc0bb2c <_Watchdog_Remove+0x34>
ffc0bb18: 2b 83 00 01 cmplwi cr7,r3,1
ffc0bb1c: 41 9c 00 74 blt- cr7,ffc0bb90 <_Watchdog_Remove+0x98>
ffc0bb20: 2b 83 00 03 cmplwi cr7,r3,3
ffc0bb24: 41 9d 00 6c bgt- cr7,ffc0bb90 <_Watchdog_Remove+0x98> <== NEVER TAKEN
ffc0bb28: 48 00 00 10 b ffc0bb38 <_Watchdog_Remove+0x40>
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0bb2c: 39 60 00 00 li r11,0
ffc0bb30: 91 69 00 08 stw r11,8(r9)
break;
ffc0bb34: 48 00 00 5c b ffc0bb90 <_Watchdog_Remove+0x98>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
ffc0bb38: 81 69 00 00 lwz r11,0(r9)
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0bb3c: 39 00 00 00 li r8,0
ffc0bb40: 91 09 00 08 stw r8,8(r9)
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
ffc0bb44: 81 4b 00 00 lwz r10,0(r11)
ffc0bb48: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0bb4c: 41 9e 00 14 beq- cr7,ffc0bb60 <_Watchdog_Remove+0x68>
next_watchdog->delta_interval += the_watchdog->delta_interval;
ffc0bb50: 81 0b 00 10 lwz r8,16(r11)
ffc0bb54: 81 49 00 10 lwz r10,16(r9)
ffc0bb58: 7d 48 52 14 add r10,r8,r10
ffc0bb5c: 91 4b 00 10 stw r10,16(r11)
if ( _Watchdog_Sync_count )
ffc0bb60: 3d 60 00 00 lis r11,0
ffc0bb64: 81 6b 27 80 lwz r11,10112(r11)
ffc0bb68: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0bb6c: 41 9e 00 14 beq- cr7,ffc0bb80 <_Watchdog_Remove+0x88>
_Watchdog_Sync_level = _ISR_Nest_level;
ffc0bb70: 3d 60 00 00 lis r11,0
ffc0bb74: 81 4b 27 54 lwz r10,10068(r11)
ffc0bb78: 3d 60 00 00 lis r11,0
ffc0bb7c: 91 4b 27 68 stw r10,10088(r11)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0bb80: 81 69 00 00 lwz r11,0(r9)
previous = the_node->previous;
ffc0bb84: 81 49 00 04 lwz r10,4(r9)
next->previous = previous;
previous->next = next;
ffc0bb88: 91 6a 00 00 stw r11,0(r10)
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
ffc0bb8c: 91 4b 00 04 stw r10,4(r11)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
ffc0bb90: 3d 60 00 00 lis r11,0
ffc0bb94: 81 6b 27 84 lwz r11,10116(r11)
ffc0bb98: 91 69 00 18 stw r11,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0bb9c: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
return( previous_state );
}
ffc0bba0: 4e 80 00 20 blr
ffc0d53c <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
ffc0d53c: 94 21 ff e8 stwu r1,-24(r1)
ffc0d540: 7c 08 02 a6 mflr r0
ffc0d544: 93 c1 00 10 stw r30,16(r1)
ffc0d548: 7c 7e 1b 78 mr r30,r3
ffc0d54c: 93 e1 00 14 stw r31,20(r1)
ffc0d550: 7c 9f 23 78 mr r31,r4
ffc0d554: 90 01 00 1c stw r0,28(r1)
ffc0d558: 93 81 00 08 stw r28,8(r1)
ffc0d55c: 93 a1 00 0c stw r29,12(r1)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0d560: 7f a0 00 a6 mfmsr r29
ffc0d564: 7c 10 42 a6 mfsprg r0,0
ffc0d568: 7f a0 00 78 andc r0,r29,r0
ffc0d56c: 7c 00 01 24 mtmsr r0
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
ffc0d570: 3c 60 ff c2 lis r3,-62
ffc0d574: 7f e5 fb 78 mr r5,r31
ffc0d578: 38 63 1f d0 addi r3,r3,8144
ffc0d57c: 7f c4 f3 78 mr r4,r30
ffc0d580: 4c c6 31 82 crclr 4*cr1+eq
ffc0d584: 4b ff 8c c9 bl ffc0624c <printk>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
ffc0d588: 83 9f 00 00 lwz r28,0(r31)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
ffc0d58c: 3b ff 00 04 addi r31,r31,4
if ( !_Chain_Is_empty( header ) ) {
ffc0d590: 7f 9c f8 00 cmpw cr7,r28,r31
ffc0d594: 41 9e 00 34 beq- cr7,ffc0d5c8 <_Watchdog_Report_chain+0x8c>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
ffc0d598: 7f 84 e3 78 mr r4,r28
ffc0d59c: 38 60 00 00 li r3,0
ffc0d5a0: 48 00 00 5d bl ffc0d5fc <_Watchdog_Report>
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
node != _Chain_Tail(header) ;
node = node->next )
ffc0d5a4: 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 = header->first ;
ffc0d5a8: 7f 9c f8 00 cmpw cr7,r28,r31
ffc0d5ac: 40 9e ff ec bne+ cr7,ffc0d598 <_Watchdog_Report_chain+0x5c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
ffc0d5b0: 3c 60 ff c2 lis r3,-62
ffc0d5b4: 38 63 1f e7 addi r3,r3,8167
ffc0d5b8: 7f c4 f3 78 mr r4,r30
ffc0d5bc: 4c c6 31 82 crclr 4*cr1+eq
ffc0d5c0: 4b ff 8c 8d bl ffc0624c <printk>
ffc0d5c4: 48 00 00 14 b ffc0d5d8 <_Watchdog_Report_chain+0x9c>
} else {
printk( "Chain is empty\n" );
ffc0d5c8: 3c 60 ff c2 lis r3,-62
ffc0d5cc: 38 63 1f f6 addi r3,r3,8182
ffc0d5d0: 4c c6 31 82 crclr 4*cr1+eq
ffc0d5d4: 4b ff 8c 79 bl ffc0624c <printk>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0d5d8: 7f a0 01 24 mtmsr r29
}
_ISR_Enable( level );
}
ffc0d5dc: 80 01 00 1c lwz r0,28(r1)
ffc0d5e0: 83 81 00 08 lwz r28,8(r1)
ffc0d5e4: 7c 08 03 a6 mtlr r0
ffc0d5e8: 83 a1 00 0c lwz r29,12(r1)
ffc0d5ec: 83 c1 00 10 lwz r30,16(r1)
ffc0d5f0: 83 e1 00 14 lwz r31,20(r1)
ffc0d5f4: 38 21 00 18 addi r1,r1,24
ffc0d5f8: 4e 80 00 20 blr
ffc0a40c <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
)
{
ffc0a40c: 94 21 ff f0 stwu r1,-16(r1)
ffc0a410: 7c 08 02 a6 mflr r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
ffc0a414: 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
)
{
ffc0a418: 90 01 00 14 stw r0,20(r1)
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
ffc0a41c: 80 09 27 74 lwz r0,10100(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;
ffc0a420: 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
)
{
ffc0a424: 93 e1 00 0c stw r31,12(r1)
ffc0a428: 7c 7f 1b 78 mr r31,r3
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
ffc0a42c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a430: 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;
ffc0a434: 80 09 27 c0 lwz r0,10176(r9)
if ( rtems_interrupt_is_in_progress() )
ffc0a438: 40 9e 01 40 bne- cr7,ffc0a578 <rtems_io_register_driver+0x16c>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
ffc0a43c: 2f 85 00 00 cmpwi cr7,r5,0
ffc0a440: 41 9e 01 34 beq- cr7,ffc0a574 <rtems_io_register_driver+0x168>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
ffc0a444: 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;
ffc0a448: 90 05 00 00 stw r0,0(r5)
if ( driver_table == NULL )
ffc0a44c: 41 9e 01 28 beq- cr7,ffc0a574 <rtems_io_register_driver+0x168>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0a450: 81 24 00 00 lwz r9,0(r4)
ffc0a454: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a458: 40 be 01 34 bne+ cr7,ffc0a58c <rtems_io_register_driver+0x180>
ffc0a45c: 81 24 00 04 lwz r9,4(r4)
ffc0a460: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a464: 40 be 01 28 bne+ cr7,ffc0a58c <rtems_io_register_driver+0x180>
ffc0a468: 48 00 01 0c b ffc0a574 <rtems_io_register_driver+0x168>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc0a46c: 3d 20 00 00 lis r9,0
ffc0a470: 81 69 27 4c lwz r11,10060(r9)
ffc0a474: 38 0b 00 01 addi r0,r11,1
ffc0a478: 90 09 27 4c stw r0,10060(r9)
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
ffc0a47c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0a480: 3d 20 00 00 lis r9,0
ffc0a484: 40 9e 00 58 bne- cr7,ffc0a4dc <rtems_io_register_driver+0xd0>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
ffc0a488: 3d 60 00 00 lis r11,0
ffc0a48c: 81 29 27 c4 lwz r9,10180(r9)
ffc0a490: 81 6b 27 c0 lwz r11,10176(r11)
ffc0a494: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0a498: 38 0b 00 01 addi r0,r11,1
ffc0a49c: 40 be 00 28 bne+ cr7,ffc0a4c4 <rtems_io_register_driver+0xb8><== ALWAYS TAKEN
ffc0a4a0: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc0a4a4: 48 00 00 20 b ffc0a4c4 <rtems_io_register_driver+0xb8><== NOT EXECUTED
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0a4a8: 81 49 00 00 lwz r10,0(r9)
ffc0a4ac: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0a4b0: 40 be 00 ec bne+ cr7,ffc0a59c <rtems_io_register_driver+0x190>
ffc0a4b4: 81 49 00 04 lwz r10,4(r9)
ffc0a4b8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0a4bc: 40 be 00 e0 bne+ cr7,ffc0a59c <rtems_io_register_driver+0x190>
ffc0a4c0: 48 00 00 0c b ffc0a4cc <rtems_io_register_driver+0xc0>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
ffc0a4c4: 34 00 ff ff addic. r0,r0,-1
ffc0a4c8: 40 82 ff e0 bne+ ffc0a4a8 <rtems_io_register_driver+0x9c>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
ffc0a4cc: 7f 9f 58 00 cmpw cr7,r31,r11
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
ffc0a4d0: 93 e5 00 00 stw r31,0(r5)
if ( m != n )
ffc0a4d4: 40 be 00 48 bne+ cr7,ffc0a51c <rtems_io_register_driver+0x110>
ffc0a4d8: 48 00 00 d0 b ffc0a5a8 <rtems_io_register_driver+0x19c>
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
ffc0a4dc: 1c 1f 00 18 mulli r0,r31,24
ffc0a4e0: 81 29 27 c4 lwz r9,10180(r9)
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0a4e4: 7d 69 00 2e lwzx r11,r9,r0
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
ffc0a4e8: 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;
ffc0a4ec: 38 00 00 00 li r0,0
ffc0a4f0: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0a4f4: 40 be 00 10 bne+ cr7,ffc0a504 <rtems_io_register_driver+0xf8>
ffc0a4f8: 80 09 00 04 lwz r0,4(r9)
ffc0a4fc: 7c 00 00 34 cntlzw r0,r0
ffc0a500: 54 00 d9 7e rlwinm r0,r0,27,5,31
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
ffc0a504: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a508: 40 9e 00 10 bne- cr7,ffc0a518 <rtems_io_register_driver+0x10c>
_Thread_Enable_dispatch();
ffc0a50c: 48 00 1f 71 bl ffc0c47c <_Thread_Enable_dispatch>
ffc0a510: 38 60 00 0c li r3,12
return RTEMS_RESOURCE_IN_USE;
ffc0a514: 48 00 00 64 b ffc0a578 <rtems_io_register_driver+0x16c>
}
*registered_major = major;
ffc0a518: 93 e5 00 00 stw r31,0(r5)
}
_IO_Driver_address_table [major] = *driver_table;
ffc0a51c: 3d 20 00 00 lis r9,0
ffc0a520: 80 c4 00 00 lwz r6,0(r4)
ffc0a524: 81 69 27 c4 lwz r11,10180(r9)
ffc0a528: 1c 1f 00 18 mulli r0,r31,24
ffc0a52c: 80 e4 00 04 lwz r7,4(r4)
ffc0a530: 81 04 00 08 lwz r8,8(r4)
ffc0a534: 7d 2b 02 14 add r9,r11,r0
ffc0a538: 81 44 00 0c lwz r10,12(r4)
ffc0a53c: 7c cb 01 2e stwx r6,r11,r0
ffc0a540: 90 e9 00 04 stw r7,4(r9)
ffc0a544: 91 09 00 08 stw r8,8(r9)
ffc0a548: 91 49 00 0c stw r10,12(r9)
ffc0a54c: 81 64 00 14 lwz r11,20(r4)
ffc0a550: 80 04 00 10 lwz r0,16(r4)
ffc0a554: 91 69 00 14 stw r11,20(r9)
ffc0a558: 90 09 00 10 stw r0,16(r9)
_Thread_Enable_dispatch();
ffc0a55c: 48 00 1f 21 bl ffc0c47c <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
ffc0a560: 7f e3 fb 78 mr r3,r31
ffc0a564: 38 80 00 00 li r4,0
ffc0a568: 38 a0 00 00 li r5,0
ffc0a56c: 48 00 97 7d bl ffc13ce8 <rtems_io_initialize>
ffc0a570: 48 00 00 08 b ffc0a578 <rtems_io_register_driver+0x16c>
ffc0a574: 38 60 00 09 li r3,9
}
ffc0a578: 80 01 00 14 lwz r0,20(r1)
ffc0a57c: 83 e1 00 0c lwz r31,12(r1)
ffc0a580: 38 21 00 10 addi r1,r1,16
ffc0a584: 7c 08 03 a6 mtlr r0
ffc0a588: 4e 80 00 20 blr
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
ffc0a58c: 7f 9f 00 40 cmplw cr7,r31,r0
ffc0a590: 38 60 00 0a li r3,10
ffc0a594: 41 9c fe d8 blt+ cr7,ffc0a46c <rtems_io_register_driver+0x60>
ffc0a598: 4b ff ff e0 b ffc0a578 <rtems_io_register_driver+0x16c>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
ffc0a59c: 3b ff 00 01 addi r31,r31,1
ffc0a5a0: 39 29 00 18 addi r9,r9,24
ffc0a5a4: 4b ff ff 20 b ffc0a4c4 <rtems_io_register_driver+0xb8>
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
ffc0a5a8: 48 00 1e d5 bl ffc0c47c <_Thread_Enable_dispatch>
ffc0a5ac: 38 60 00 05 li r3,5
return sc;
ffc0a5b0: 4b ff ff c8 b ffc0a578 <rtems_io_register_driver+0x16c>
ffc0b490 <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)
{
ffc0b490: 94 21 ff e0 stwu r1,-32(r1)
ffc0b494: 7c 08 02 a6 mflr r0
ffc0b498: 93 61 00 0c stw r27,12(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0b49c: 7c 7b 1b 79 mr. r27,r3
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
ffc0b4a0: 90 01 00 24 stw r0,36(r1)
ffc0b4a4: 93 81 00 10 stw r28,16(r1)
ffc0b4a8: 93 a1 00 14 stw r29,20(r1)
ffc0b4ac: 93 c1 00 18 stw r30,24(r1)
ffc0b4b0: 93 e1 00 1c stw r31,28(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0b4b4: 41 82 00 68 beq- ffc0b51c <rtems_iterate_over_all_threads+0x8c><== NEVER TAKEN
ffc0b4b8: 3f e0 00 01 lis r31,1
ffc0b4bc: 3b ff a9 84 addi r31,r31,-22140
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
ffc0b4c0: 3b 9f 00 10 addi r28,r31,16
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
ffc0b4c4: 81 3f 00 00 lwz r9,0(r31)
ffc0b4c8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b4cc: 41 9e 00 44 beq- cr7,ffc0b510 <rtems_iterate_over_all_threads+0x80>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
ffc0b4d0: 83 a9 00 04 lwz r29,4(r9)
if ( !information )
ffc0b4d4: 3b c0 00 01 li r30,1
ffc0b4d8: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b4dc: 40 be 00 20 bne+ cr7,ffc0b4fc <rtems_iterate_over_all_threads+0x6c>
ffc0b4e0: 48 00 00 30 b ffc0b510 <rtems_iterate_over_all_threads+0x80>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
ffc0b4e4: 81 7d 00 1c lwz r11,28(r29)
ffc0b4e8: 7c 6b 48 2e lwzx r3,r11,r9
if ( !the_thread )
ffc0b4ec: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b4f0: 41 9e 00 0c beq- cr7,ffc0b4fc <rtems_iterate_over_all_threads+0x6c><== NEVER TAKEN
continue;
(*routine)(the_thread);
ffc0b4f4: 7f 69 03 a6 mtctr r27
ffc0b4f8: 4e 80 04 21 bctrl
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc0b4fc: a0 1d 00 10 lhz r0,16(r29)
the_thread = (Thread_Control *)information->local_table[ i ];
ffc0b500: 57 c9 10 3a rlwinm r9,r30,2,0,29
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc0b504: 7f 9e 00 40 cmplw cr7,r30,r0
ffc0b508: 3b de 00 01 addi r30,r30,1
ffc0b50c: 40 9d ff d8 ble+ cr7,ffc0b4e4 <rtems_iterate_over_all_threads+0x54>
ffc0b510: 3b ff 00 04 addi r31,r31,4
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
ffc0b514: 7f 9f e0 00 cmpw cr7,r31,r28
ffc0b518: 40 9e ff ac bne+ cr7,ffc0b4c4 <rtems_iterate_over_all_threads+0x34>
(*routine)(the_thread);
}
}
}
ffc0b51c: 80 01 00 24 lwz r0,36(r1)
ffc0b520: 83 61 00 0c lwz r27,12(r1)
ffc0b524: 7c 08 03 a6 mtlr r0
ffc0b528: 83 81 00 10 lwz r28,16(r1)
ffc0b52c: 83 a1 00 14 lwz r29,20(r1)
ffc0b530: 83 c1 00 18 lwz r30,24(r1)
ffc0b534: 83 e1 00 1c lwz r31,28(r1)
ffc0b538: 38 21 00 20 addi r1,r1,32
ffc0b53c: 4e 80 00 20 blr
ffc16c0c <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc16c0c: 94 21 ff d0 stwu r1,-48(r1)
ffc16c10: 7c 08 02 a6 mflr r0
ffc16c14: 93 e1 00 2c stw r31,44(r1)
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc16c18: 7c 7f 1b 79 mr. r31,r3
ffc16c1c: 38 60 00 03 li r3,3
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc16c20: 93 41 00 18 stw r26,24(r1)
ffc16c24: 7c fa 3b 78 mr r26,r7
ffc16c28: 93 81 00 20 stw r28,32(r1)
ffc16c2c: 7d 1c 43 78 mr r28,r8
ffc16c30: 93 c1 00 28 stw r30,40(r1)
ffc16c34: 7c be 2b 78 mr r30,r5
ffc16c38: 90 01 00 34 stw r0,52(r1)
ffc16c3c: 93 21 00 14 stw r25,20(r1)
ffc16c40: 93 61 00 1c stw r27,28(r1)
ffc16c44: 93 a1 00 24 stw r29,36(r1)
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc16c48: 41 82 00 d0 beq- ffc16d18 <rtems_partition_create+0x10c>
return RTEMS_INVALID_NAME;
if ( !starting_address )
ffc16c4c: 2f 84 00 00 cmpwi cr7,r4,0
ffc16c50: 41 9e 00 bc beq- cr7,ffc16d0c <rtems_partition_create+0x100>
return RTEMS_INVALID_ADDRESS;
if ( !id )
ffc16c54: 2f 88 00 00 cmpwi cr7,r8,0
ffc16c58: 41 9e 00 b4 beq- cr7,ffc16d0c <rtems_partition_create+0x100><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
ffc16c5c: 2f 85 00 00 cmpwi cr7,r5,0
ffc16c60: 41 9e 00 b4 beq- cr7,ffc16d14 <rtems_partition_create+0x108>
ffc16c64: 2f 86 00 00 cmpwi cr7,r6,0
ffc16c68: 41 9e 00 ac beq- cr7,ffc16d14 <rtems_partition_create+0x108>
ffc16c6c: 7f 85 30 40 cmplw cr7,r5,r6
ffc16c70: 41 9c 00 a4 blt- cr7,ffc16d14 <rtems_partition_create+0x108>
ffc16c74: 70 c0 00 07 andi. r0,r6,7
ffc16c78: 40 82 00 9c bne- ffc16d14 <rtems_partition_create+0x108>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
ffc16c7c: 70 99 00 07 andi. r25,r4,7
ffc16c80: 40 a2 00 8c bne+ ffc16d0c <rtems_partition_create+0x100>
ffc16c84: 3d 20 00 00 lis r9,0
ffc16c88: 81 69 28 24 lwz r11,10276(r9)
ffc16c8c: 38 0b 00 01 addi r0,r11,1
ffc16c90: 90 09 28 24 stw r0,10276(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 );
ffc16c94: 3f 60 00 00 lis r27,0
ffc16c98: 90 81 00 08 stw r4,8(r1)
ffc16c9c: 3b 7b 6e 6c addi r27,r27,28268
ffc16ca0: 7f 63 db 78 mr r3,r27
ffc16ca4: 90 c1 00 0c stw r6,12(r1)
ffc16ca8: 48 00 54 7d bl ffc1c124 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
ffc16cac: 7c 7d 1b 79 mr. r29,r3
ffc16cb0: 80 81 00 08 lwz r4,8(r1)
ffc16cb4: 80 c1 00 0c lwz r6,12(r1)
ffc16cb8: 40 a2 00 10 bne+ ffc16cc8 <rtems_partition_create+0xbc>
_Thread_Enable_dispatch();
ffc16cbc: 48 00 65 d5 bl ffc1d290 <_Thread_Enable_dispatch>
ffc16cc0: 38 60 00 05 li r3,5
return RTEMS_TOO_MANY;
ffc16cc4: 48 00 00 54 b ffc16d18 <rtems_partition_create+0x10c>
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,
ffc16cc8: 7c be 33 96 divwu r5,r30,r6
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
ffc16ccc: 90 9d 00 10 stw r4,16(r29)
the_partition->length = length;
the_partition->buffer_size = buffer_size;
ffc16cd0: 90 dd 00 18 stw r6,24(r29)
the_partition->attribute_set = attribute_set;
ffc16cd4: 93 5d 00 1c stw r26,28(r29)
the_partition->number_of_used_blocks = 0;
ffc16cd8: 93 3d 00 20 stw r25,32(r29)
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
ffc16cdc: 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;
_Chain_Initialize( &the_partition->Memory, starting_address,
ffc16ce0: 38 7d 00 24 addi r3,r29,36
ffc16ce4: 48 00 3c 95 bl ffc1a978 <_Chain_Initialize>
ffc16ce8: 80 1d 00 08 lwz r0,8(r29)
ffc16cec: 81 7b 00 1c lwz r11,28(r27)
ffc16cf0: 54 09 13 ba rlwinm r9,r0,2,14,29
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc16cf4: 93 fd 00 0c stw r31,12(r29)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc16cf8: 7f ab 49 2e stwx r29,r11,r9
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
ffc16cfc: 90 1c 00 00 stw r0,0(r28)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
ffc16d00: 48 00 65 91 bl ffc1d290 <_Thread_Enable_dispatch>
ffc16d04: 38 60 00 00 li r3,0
return RTEMS_SUCCESSFUL;
ffc16d08: 48 00 00 10 b ffc16d18 <rtems_partition_create+0x10c>
ffc16d0c: 38 60 00 09 li r3,9
ffc16d10: 48 00 00 08 b ffc16d18 <rtems_partition_create+0x10c>
ffc16d14: 38 60 00 08 li r3,8
}
ffc16d18: 80 01 00 34 lwz r0,52(r1)
ffc16d1c: 83 21 00 14 lwz r25,20(r1)
ffc16d20: 7c 08 03 a6 mtlr r0
ffc16d24: 83 41 00 18 lwz r26,24(r1)
ffc16d28: 83 61 00 1c lwz r27,28(r1)
ffc16d2c: 83 81 00 20 lwz r28,32(r1)
ffc16d30: 83 a1 00 24 lwz r29,36(r1)
ffc16d34: 83 c1 00 28 lwz r30,40(r1)
ffc16d38: 83 e1 00 2c lwz r31,44(r1)
ffc16d3c: 38 21 00 30 addi r1,r1,48
ffc16d40: 4e 80 00 20 blr
ffc16ebc <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
ffc16ebc: 94 21 ff e0 stwu r1,-32(r1)
ffc16ec0: 7c 08 02 a6 mflr r0
ffc16ec4: 90 01 00 24 stw r0,36(r1)
ffc16ec8: 7c 60 1b 78 mr r0,r3
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
ffc16ecc: 3c 60 00 00 lis r3,0
ffc16ed0: 93 e1 00 1c stw r31,28(r1)
ffc16ed4: 38 63 6e 6c addi r3,r3,28268
ffc16ed8: 7c 9f 23 78 mr r31,r4
ffc16edc: 38 a1 00 08 addi r5,r1,8
ffc16ee0: 93 c1 00 18 stw r30,24(r1)
ffc16ee4: 7c 04 03 78 mr r4,r0
ffc16ee8: 48 00 58 31 bl ffc1c718 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
ffc16eec: 80 01 00 08 lwz r0,8(r1)
ffc16ef0: 7c 7e 1b 78 mr r30,r3
ffc16ef4: 2f 80 00 00 cmpwi cr7,r0,0
ffc16ef8: 38 60 00 04 li r3,4
ffc16efc: 40 9e 00 58 bne- cr7,ffc16f54 <rtems_partition_return_buffer+0x98>
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
ffc16f00: 80 1e 00 10 lwz r0,16(r30)
ending = _Addresses_Add_offset( starting, the_partition->length );
ffc16f04: 81 3e 00 14 lwz r9,20(r30)
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
ffc16f08: 7f 9f 00 40 cmplw cr7,r31,r0
ffc16f0c: 41 9c 00 60 blt- cr7,ffc16f6c <rtems_partition_return_buffer+0xb0>
ffc16f10: 7d 20 4a 14 add r9,r0,r9
ffc16f14: 7f 9f 48 40 cmplw cr7,r31,r9
ffc16f18: 41 9d 00 54 bgt- cr7,ffc16f6c <rtems_partition_return_buffer+0xb0><== NEVER TAKEN
return (
ffc16f1c: 81 3e 00 18 lwz r9,24(r30)
ffc16f20: 7c 00 f8 50 subf r0,r0,r31
ffc16f24: 7d 60 4b 96 divwu r11,r0,r9
ffc16f28: 7d 2b 49 d6 mullw r9,r11,r9
ffc16f2c: 7f 80 48 00 cmpw cr7,r0,r9
ffc16f30: 40 9e 00 3c bne- cr7,ffc16f6c <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 );
ffc16f34: 38 7e 00 24 addi r3,r30,36
ffc16f38: 7f e4 fb 78 mr r4,r31
ffc16f3c: 48 00 39 cd bl ffc1a908 <_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;
ffc16f40: 81 3e 00 20 lwz r9,32(r30)
ffc16f44: 38 09 ff ff addi r0,r9,-1
ffc16f48: 90 1e 00 20 stw r0,32(r30)
_Thread_Enable_dispatch();
ffc16f4c: 48 00 63 45 bl ffc1d290 <_Thread_Enable_dispatch>
ffc16f50: 38 60 00 00 li r3,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc16f54: 80 01 00 24 lwz r0,36(r1)
ffc16f58: 83 c1 00 18 lwz r30,24(r1)
ffc16f5c: 7c 08 03 a6 mtlr r0
ffc16f60: 83 e1 00 1c lwz r31,28(r1)
ffc16f64: 38 21 00 20 addi r1,r1,32
ffc16f68: 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();
ffc16f6c: 48 00 63 25 bl ffc1d290 <_Thread_Enable_dispatch>
ffc16f70: 38 60 00 09 li r3,9
return RTEMS_INVALID_ADDRESS;
ffc16f74: 4b ff ff e0 b ffc16f54 <rtems_partition_return_buffer+0x98>
ffc092d8 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
ffc092d8: 94 21 ff d8 stwu r1,-40(r1)
ffc092dc: 7c 08 02 a6 mflr r0
ffc092e0: 93 c1 00 20 stw r30,32(r1)
ffc092e4: 7c 7e 1b 78 mr r30,r3
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
ffc092e8: 3c 60 00 00 lis r3,0
ffc092ec: 93 e1 00 24 stw r31,36(r1)
ffc092f0: 38 63 2b ec addi r3,r3,11244
ffc092f4: 7c 9f 23 78 mr r31,r4
ffc092f8: 38 a1 00 08 addi r5,r1,8
ffc092fc: 90 01 00 2c stw r0,44(r1)
ffc09300: 7f c4 f3 78 mr r4,r30
ffc09304: 93 a1 00 1c stw r29,28(r1)
ffc09308: 93 81 00 18 stw r28,24(r1)
ffc0930c: 48 00 28 95 bl ffc0bba0 <_Objects_Get>
ffc09310: 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 ) {
ffc09314: 80 01 00 08 lwz r0,8(r1)
ffc09318: 2f 80 00 00 cmpwi cr7,r0,0
ffc0931c: 40 9e 01 70 bne- cr7,ffc0948c <rtems_rate_monotonic_period+0x1b4>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
ffc09320: 3d 20 00 00 lis r9,0
ffc09324: 80 09 27 f0 lwz r0,10224(r9)
ffc09328: 81 23 00 40 lwz r9,64(r3)
ffc0932c: 7f 89 00 00 cmpw cr7,r9,r0
ffc09330: 41 9e 00 10 beq- cr7,ffc09340 <rtems_rate_monotonic_period+0x68>
_Thread_Enable_dispatch();
ffc09334: 48 00 33 39 bl ffc0c66c <_Thread_Enable_dispatch>
ffc09338: 3b c0 00 17 li r30,23
return RTEMS_NOT_OWNER_OF_RESOURCE;
ffc0933c: 48 00 01 54 b ffc09490 <rtems_rate_monotonic_period+0x1b8>
}
if ( length == RTEMS_PERIOD_STATUS ) {
ffc09340: 2f 9f 00 00 cmpwi cr7,r31,0
ffc09344: 40 be 00 28 bne+ cr7,ffc0936c <rtems_rate_monotonic_period+0x94>
switch ( the_period->state ) {
ffc09348: 80 03 00 38 lwz r0,56(r3)
ffc0934c: 3b c0 00 00 li r30,0
ffc09350: 2b 80 00 04 cmplwi cr7,r0,4
ffc09354: 41 9d 01 30 bgt- cr7,ffc09484 <rtems_rate_monotonic_period+0x1ac><== NEVER TAKEN
ffc09358: 3d 20 ff c2 lis r9,-62
ffc0935c: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc09360: 39 29 1d 94 addi r9,r9,7572
ffc09364: 7f c9 00 2e lwzx r30,r9,r0
ffc09368: 48 00 01 1c b ffc09484 <rtems_rate_monotonic_period+0x1ac>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0936c: 7f 80 00 a6 mfmsr r28
ffc09370: 7c 10 42 a6 mfsprg r0,0
ffc09374: 7f 80 00 78 andc r0,r28,r0
ffc09378: 7c 00 01 24 mtmsr r0
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
switch ( the_period->state ) {
ffc0937c: 80 03 00 38 lwz r0,56(r3)
ffc09380: 2f 80 00 02 cmpwi cr7,r0,2
ffc09384: 41 9e 00 60 beq- cr7,ffc093e4 <rtems_rate_monotonic_period+0x10c>
ffc09388: 2f 80 00 04 cmpwi cr7,r0,4
ffc0938c: 41 9e 00 cc beq- cr7,ffc09458 <rtems_rate_monotonic_period+0x180>
ffc09390: 2f 80 00 00 cmpwi cr7,r0,0
ffc09394: 40 9e 00 f8 bne- cr7,ffc0948c <rtems_rate_monotonic_period+0x1b4><== NEVER TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc09398: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
ffc0939c: 4b ff fc 99 bl ffc09034 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc093a0: 39 20 00 02 li r9,2
ffc093a4: 91 3d 00 38 stw r9,56(r29)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc093a8: 3d 20 ff c1 lis r9,-63
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc093ac: 38 00 00 00 li r0,0
the_watchdog->routine = routine;
ffc093b0: 39 29 98 44 addi r9,r9,-26556
the_watchdog->id = id;
ffc093b4: 93 dd 00 30 stw r30,48(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc093b8: 3c 60 00 00 lis r3,0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc093bc: 91 3d 00 2c stw r9,44(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc093c0: 38 63 2d e8 addi r3,r3,11752
ffc093c4: 38 9d 00 10 addi r4,r29,16
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
ffc093c8: 90 1d 00 34 stw r0,52(r29)
);
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
ffc093cc: 3b c0 00 00 li r30,0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc093d0: 93 fd 00 1c stw r31,28(r29)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc093d4: 90 1d 00 18 stw r0,24(r29)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
ffc093d8: 93 fd 00 3c stw r31,60(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc093dc: 48 00 49 09 bl ffc0dce4 <_Watchdog_Insert>
ffc093e0: 48 00 00 a4 b ffc09484 <rtems_rate_monotonic_period+0x1ac>
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
ffc093e4: 4b ff fd d9 bl ffc091bc <_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;
ffc093e8: 38 00 00 01 li r0,1
the_period->next_length = length;
ffc093ec: 93 fd 00 3c stw r31,60(r29)
/*
* 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;
ffc093f0: 90 1d 00 38 stw r0,56(r29)
ffc093f4: 7f 80 01 24 mtmsr r28
the_period->next_length = length;
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
ffc093f8: 3d 20 00 00 lis r9,0
ffc093fc: 80 1d 00 08 lwz r0,8(r29)
ffc09400: 81 29 27 f0 lwz r9,10224(r9)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc09404: 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;
ffc09408: 90 09 00 20 stw r0,32(r9)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc0940c: 7d 23 4b 78 mr r3,r9
ffc09410: 48 00 3d 19 bl ffc0d128 <_Thread_Set_state>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc09414: 7d 20 00 a6 mfmsr r9
ffc09418: 7c 10 42 a6 mfsprg r0,0
ffc0941c: 7d 20 00 78 andc r0,r9,r0
ffc09420: 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;
ffc09424: 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;
ffc09428: 80 1d 00 38 lwz r0,56(r29)
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc0942c: 91 7d 00 38 stw r11,56(r29)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc09430: 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 )
ffc09434: 2f 80 00 03 cmpwi cr7,r0,3
ffc09438: 40 be 00 14 bne+ cr7,ffc0944c <rtems_rate_monotonic_period+0x174><== ALWAYS TAKEN
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc0943c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc09440: 80 69 27 f0 lwz r3,10224(r9) <== NOT EXECUTED
ffc09444: 38 80 40 00 li r4,16384 <== NOT EXECUTED
ffc09448: 48 00 2d 41 bl ffc0c188 <_Thread_Clear_state> <== NOT EXECUTED
_Thread_Enable_dispatch();
ffc0944c: 48 00 32 21 bl ffc0c66c <_Thread_Enable_dispatch>
ffc09450: 3b c0 00 00 li r30,0
return RTEMS_SUCCESSFUL;
ffc09454: 48 00 00 3c b ffc09490 <rtems_rate_monotonic_period+0x1b8>
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
ffc09458: 4b ff fd 65 bl ffc091bc <_Rate_monotonic_Update_statistics>
ffc0945c: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc09460: 38 00 00 02 li r0,2
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc09464: 93 fd 00 1c stw r31,28(r29)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc09468: 3c 60 00 00 lis r3,0
ffc0946c: 90 1d 00 38 stw r0,56(r29)
ffc09470: 38 63 2d e8 addi r3,r3,11752
ffc09474: 38 9d 00 10 addi r4,r29,16
the_period->next_length = length;
ffc09478: 93 fd 00 3c stw r31,60(r29)
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
ffc0947c: 3b c0 00 06 li r30,6
ffc09480: 48 00 48 65 bl ffc0dce4 <_Watchdog_Insert>
ffc09484: 48 00 31 e9 bl ffc0c66c <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
ffc09488: 48 00 00 08 b ffc09490 <rtems_rate_monotonic_period+0x1b8>
ffc0948c: 3b c0 00 04 li r30,4
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc09490: 80 01 00 2c lwz r0,44(r1)
ffc09494: 7f c3 f3 78 mr r3,r30
ffc09498: 83 81 00 18 lwz r28,24(r1)
ffc0949c: 7c 08 03 a6 mtlr r0
ffc094a0: 83 a1 00 1c lwz r29,28(r1)
ffc094a4: 83 c1 00 20 lwz r30,32(r1)
ffc094a8: 83 e1 00 24 lwz r31,36(r1)
ffc094ac: 38 21 00 28 addi r1,r1,40
ffc094b0: 4e 80 00 20 blr
ffc094b4 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc094b4: 94 21 ff 58 stwu r1,-168(r1)
ffc094b8: 7c 08 02 a6 mflr r0
ffc094bc: 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 )
ffc094c0: 7c 80 23 79 mr. r0,r4
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc094c4: 93 e1 00 a4 stw r31,164(r1)
ffc094c8: 7c 7f 1b 78 mr r31,r3
ffc094cc: 92 41 00 70 stw r18,112(r1)
ffc094d0: 92 61 00 74 stw r19,116(r1)
ffc094d4: 92 81 00 78 stw r20,120(r1)
ffc094d8: 92 a1 00 7c stw r21,124(r1)
ffc094dc: 92 c1 00 80 stw r22,128(r1)
ffc094e0: 92 e1 00 84 stw r23,132(r1)
ffc094e4: 93 01 00 88 stw r24,136(r1)
ffc094e8: 93 21 00 8c stw r25,140(r1)
ffc094ec: 93 41 00 90 stw r26,144(r1)
ffc094f0: 93 61 00 94 stw r27,148(r1)
ffc094f4: 93 81 00 98 stw r28,152(r1)
ffc094f8: 93 a1 00 9c stw r29,156(r1)
ffc094fc: 93 c1 00 a0 stw r30,160(r1)
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
ffc09500: 90 01 00 68 stw r0,104(r1)
ffc09504: 41 82 02 00 beq- ffc09704 <rtems_rate_monotonic_report_statistics_with_plugin+0x250><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
ffc09508: 3c 80 ff c2 lis r4,-62
ffc0950c: 7c 09 03 a6 mtctr r0
ffc09510: 38 84 1d a8 addi r4,r4,7592
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc09514: 3f 00 ff c2 lis r24,-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,
ffc09518: 3f 20 ff c2 lis r25,-62
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,
ffc0951c: 3f 40 ff c2 lis r26,-62
char name[5];
if ( !print )
return;
(*print)( context, "Period information by period\n" );
ffc09520: 4c c6 31 82 crclr 4*cr1+eq
ffc09524: 4e 80 04 21 bctrl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
ffc09528: 80 01 00 68 lwz r0,104(r1)
ffc0952c: 3c 80 ff c2 lis r4,-62
ffc09530: 7c 09 03 a6 mtctr r0
ffc09534: 38 84 1d c6 addi r4,r4,7622
ffc09538: 7f e3 fb 78 mr r3,r31
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc0953c: 3e 40 ff c2 lis r18,-62
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
ffc09540: 3a 61 00 30 addi r19,r1,48
if ( status != RTEMS_SUCCESSFUL )
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
ffc09544: 3a 81 00 18 addi r20,r1,24
if ( !print )
return;
(*print)( context, "Period information by period\n" );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
ffc09548: 4c c6 31 82 crclr 4*cr1+eq
ffc0954c: 4e 80 04 21 bctrl
(*print)( context, "--- Wall times are in seconds ---\n" );
ffc09550: 80 01 00 68 lwz r0,104(r1)
ffc09554: 3c 80 ff c2 lis r4,-62
ffc09558: 7c 09 03 a6 mtctr r0
ffc0955c: 38 84 1d e8 addi r4,r4,7656
ffc09560: 7f e3 fb 78 mr r3,r31
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
ffc09564: 3b 61 00 08 addi r27,r1,8
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 );
ffc09568: 3a a1 00 48 addi r21,r1,72
ffc0956c: 3b 81 00 10 addi r28,r1,16
return;
(*print)( context, "Period information by period\n" );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
(*print)( context, "--- Wall times are in seconds ---\n" );
ffc09570: 4c c6 31 82 crclr 4*cr1+eq
ffc09574: 4e 80 04 21 bctrl
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
ffc09578: 80 01 00 68 lwz r0,104(r1)
ffc0957c: 3c 80 ff c2 lis r4,-62
ffc09580: 7c 09 03 a6 mtctr r0
ffc09584: 38 84 1e 0b addi r4,r4,7691
ffc09588: 7f e3 fb 78 mr r3,r31
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,
ffc0958c: 3b a0 03 e8 li r29,1000
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);
ffc09590: 3a c1 00 60 addi r22,r1,96
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc09594: 3b 18 1e a2 addi r24,r24,7842
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
ffc09598: 4c c6 31 82 crclr 4*cr1+eq
ffc0959c: 4e 80 04 21 bctrl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
ffc095a0: 80 01 00 68 lwz r0,104(r1)
ffc095a4: 3c 80 ff c2 lis r4,-62
ffc095a8: 38 84 1e 56 addi r4,r4,7766
ffc095ac: 7c 09 03 a6 mtctr r0
ffc095b0: 7f e3 fb 78 mr r3,r31
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,
ffc095b4: 3b 39 1e b9 addi r25,r25,7865
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,
ffc095b8: 3b 5a 1e d8 addi r26,r26,7896
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc095bc: 3a 52 1d 76 addi r18,r18,7542
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
ffc095c0: 4c c6 31 82 crclr 4*cr1+eq
ffc095c4: 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 ;
ffc095c8: 3d 20 00 00 lis r9,0
ffc095cc: 39 29 2b ec addi r9,r9,11244
ffc095d0: 7d 37 4b 78 mr r23,r9
ffc095d4: 83 c9 00 08 lwz r30,8(r9)
ffc095d8: 48 00 01 18 b ffc096f0 <rtems_rate_monotonic_report_statistics_with_plugin+0x23c>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
ffc095dc: 48 00 65 6d bl ffc0fb48 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
ffc095e0: 2f 83 00 00 cmpwi cr7,r3,0
ffc095e4: 40 be 01 08 bne+ cr7,ffc096ec <rtems_rate_monotonic_report_statistics_with_plugin+0x238>
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
ffc095e8: 7e 84 a3 78 mr r4,r20
ffc095ec: 7f c3 f3 78 mr r3,r30
ffc095f0: 48 00 66 29 bl ffc0fc18 <rtems_rate_monotonic_get_status>
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
ffc095f4: 80 61 00 18 lwz r3,24(r1)
ffc095f8: 7f 65 db 78 mr r5,r27
ffc095fc: 38 80 00 05 li r4,5
ffc09600: 48 00 03 0d bl ffc0990c <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc09604: 80 01 00 68 lwz r0,104(r1)
ffc09608: 7f 04 c3 78 mr r4,r24
ffc0960c: 80 e1 00 30 lwz r7,48(r1)
ffc09610: 7f c5 f3 78 mr r5,r30
ffc09614: 7c 09 03 a6 mtctr r0
ffc09618: 7f e3 fb 78 mr r3,r31
ffc0961c: 81 01 00 34 lwz r8,52(r1)
ffc09620: 7f 66 db 78 mr r6,r27
ffc09624: 4c c6 31 82 crclr 4*cr1+eq
ffc09628: 4e 80 04 21 bctrl
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc0962c: 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 );
ffc09630: 7e a3 ab 78 mr r3,r21
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc09634: 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 );
ffc09638: 7f 85 e3 78 mr r5,r28
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc0963c: 7e 44 93 78 mr r4,r18
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc09640: 40 9e 00 1c bne- cr7,ffc0965c <rtems_rate_monotonic_report_statistics_with_plugin+0x1a8>
(*print)( context, "\n" );
ffc09644: 80 01 00 68 lwz r0,104(r1)
ffc09648: 7f e3 fb 78 mr r3,r31
ffc0964c: 7c 09 03 a6 mtctr r0
ffc09650: 4c c6 31 82 crclr 4*cr1+eq
ffc09654: 4e 80 04 21 bctrl
continue;
ffc09658: 48 00 00 94 b ffc096ec <rtems_rate_monotonic_report_statistics_with_plugin+0x238>
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 );
ffc0965c: 7c 04 03 78 mr r4,r0
ffc09660: 48 00 40 9d bl ffc0d6fc <_Timespec_Divide_by_integer>
(*print)( context,
ffc09664: 80 01 00 68 lwz r0,104(r1)
ffc09668: 80 c1 00 3c lwz r6,60(r1)
ffc0966c: 7f 24 cb 78 mr r4,r25
ffc09670: 81 01 00 44 lwz r8,68(r1)
ffc09674: 7c 09 03 a6 mtctr r0
ffc09678: 81 41 00 14 lwz r10,20(r1)
ffc0967c: 7c c6 eb d6 divw r6,r6,r29
ffc09680: 80 e1 00 40 lwz r7,64(r1)
ffc09684: 81 21 00 10 lwz r9,16(r1)
ffc09688: 80 a1 00 38 lwz r5,56(r1)
ffc0968c: 7d 08 eb d6 divw r8,r8,r29
ffc09690: 7d 4a eb d6 divw r10,r10,r29
ffc09694: 7f e3 fb 78 mr r3,r31
ffc09698: 4c c6 31 82 crclr 4*cr1+eq
ffc0969c: 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);
ffc096a0: 80 81 00 30 lwz r4,48(r1)
ffc096a4: 7e c3 b3 78 mr r3,r22
ffc096a8: 7f 85 e3 78 mr r5,r28
ffc096ac: 48 00 40 51 bl ffc0d6fc <_Timespec_Divide_by_integer>
(*print)( context,
ffc096b0: 80 c1 00 54 lwz r6,84(r1)
ffc096b4: 81 01 00 5c lwz r8,92(r1)
ffc096b8: 7f e3 fb 78 mr r3,r31
ffc096bc: 81 41 00 14 lwz r10,20(r1)
ffc096c0: 7c c6 eb d6 divw r6,r6,r29
ffc096c4: 80 01 00 68 lwz r0,104(r1)
ffc096c8: 80 a1 00 50 lwz r5,80(r1)
ffc096cc: 80 e1 00 58 lwz r7,88(r1)
ffc096d0: 7c 09 03 a6 mtctr r0
ffc096d4: 81 21 00 10 lwz r9,16(r1)
ffc096d8: 7d 08 eb d6 divw r8,r8,r29
ffc096dc: 7d 4a eb d6 divw r10,r10,r29
ffc096e0: 7f 44 d3 78 mr r4,r26
ffc096e4: 4c c6 31 82 crclr 4*cr1+eq
ffc096e8: 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 ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
ffc096ec: 3b de 00 01 addi r30,r30,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 ;
ffc096f0: 80 17 00 0c lwz r0,12(r23)
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
ffc096f4: 7f c3 f3 78 mr r3,r30
ffc096f8: 7e 64 9b 78 mr r4,r19
/*
* 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 ;
ffc096fc: 7f 9e 00 40 cmplw cr7,r30,r0
ffc09700: 40 9d fe dc ble+ cr7,ffc095dc <rtems_rate_monotonic_report_statistics_with_plugin+0x128>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
ffc09704: 80 01 00 ac lwz r0,172(r1)
ffc09708: 82 41 00 70 lwz r18,112(r1)
ffc0970c: 7c 08 03 a6 mtlr r0
ffc09710: 82 61 00 74 lwz r19,116(r1)
ffc09714: 82 81 00 78 lwz r20,120(r1)
ffc09718: 82 a1 00 7c lwz r21,124(r1)
ffc0971c: 82 c1 00 80 lwz r22,128(r1)
ffc09720: 82 e1 00 84 lwz r23,132(r1)
ffc09724: 83 01 00 88 lwz r24,136(r1)
ffc09728: 83 21 00 8c lwz r25,140(r1)
ffc0972c: 83 41 00 90 lwz r26,144(r1)
ffc09730: 83 61 00 94 lwz r27,148(r1)
ffc09734: 83 81 00 98 lwz r28,152(r1)
ffc09738: 83 a1 00 9c lwz r29,156(r1)
ffc0973c: 83 c1 00 a0 lwz r30,160(r1)
ffc09740: 83 e1 00 a4 lwz r31,164(r1)
ffc09744: 38 21 00 a8 addi r1,r1,168
ffc09748: 4e 80 00 20 blr
ffc186fc <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc186fc: 94 21 ff e0 stwu r1,-32(r1)
ffc18700: 7c 08 02 a6 mflr r0
ffc18704: 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 )
ffc18708: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc1870c: 90 01 00 24 stw r0,36(r1)
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
ffc18710: 38 00 00 0a li r0,10
ffc18714: 41 82 00 c0 beq- ffc187d4 <rtems_signal_send+0xd8>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
ffc18718: 38 81 00 08 addi r4,r1,8
ffc1871c: 48 00 4b e1 bl ffc1d2fc <_Thread_Get>
switch ( location ) {
ffc18720: 81 21 00 08 lwz r9,8(r1)
ffc18724: 38 00 00 04 li r0,4
ffc18728: 2f 89 00 00 cmpwi cr7,r9,0
ffc1872c: 40 9e 00 a8 bne- cr7,ffc187d4 <rtems_signal_send+0xd8>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
ffc18730: 81 23 01 40 lwz r9,320(r3)
asr = &api->Signal;
ffc18734: 80 09 00 0c lwz r0,12(r9)
ffc18738: 2f 80 00 00 cmpwi cr7,r0,0
ffc1873c: 41 9e 00 90 beq- cr7,ffc187cc <rtems_signal_send+0xd0>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
ffc18740: 88 09 00 08 lbz r0,8(r9)
ffc18744: 2f 80 00 00 cmpwi cr7,r0,0
ffc18748: 41 9e 00 58 beq- cr7,ffc187a0 <rtems_signal_send+0xa4>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc1874c: 7c 00 00 a6 mfmsr r0
ffc18750: 7d 70 42 a6 mfsprg r11,0
ffc18754: 7c 0b 58 78 andc r11,r0,r11
ffc18758: 7d 60 01 24 mtmsr r11
)
{
ISR_Level _level;
_ISR_Disable( _level );
*signal_set |= signals;
ffc1875c: 81 69 00 14 lwz r11,20(r9)
ffc18760: 7d 7f fb 78 or r31,r11,r31
ffc18764: 93 e9 00 14 stw r31,20(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc18768: 7c 00 01 24 mtmsr r0
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
ffc1876c: 3d 20 00 00 lis r9,0
ffc18770: 81 29 28 4c lwz r9,10316(r9)
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
ffc18774: 38 00 00 01 li r0,1
ffc18778: 98 03 00 74 stb r0,116(r3)
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
ffc1877c: 2f 89 00 00 cmpwi cr7,r9,0
ffc18780: 41 9e 00 40 beq- cr7,ffc187c0 <rtems_signal_send+0xc4>
ffc18784: 3d 20 00 00 lis r9,0
ffc18788: 81 29 28 64 lwz r9,10340(r9)
ffc1878c: 7f 83 48 00 cmpw cr7,r3,r9
ffc18790: 40 be 00 30 bne+ cr7,ffc187c0 <rtems_signal_send+0xc4> <== NEVER TAKEN
_ISR_Signals_to_thread_executing = true;
ffc18794: 3d 20 00 00 lis r9,0
ffc18798: 98 09 28 80 stb r0,10368(r9)
ffc1879c: 48 00 00 24 b ffc187c0 <rtems_signal_send+0xc4>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc187a0: 7c 00 00 a6 mfmsr r0
ffc187a4: 7d 70 42 a6 mfsprg r11,0
ffc187a8: 7c 0b 58 78 andc r11,r0,r11
ffc187ac: 7d 60 01 24 mtmsr r11
ffc187b0: 81 69 00 18 lwz r11,24(r9)
ffc187b4: 7d 7f fb 78 or r31,r11,r31
ffc187b8: 93 e9 00 18 stw r31,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc187bc: 7c 00 01 24 mtmsr r0
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
ffc187c0: 48 00 4a d1 bl ffc1d290 <_Thread_Enable_dispatch>
ffc187c4: 38 00 00 00 li r0,0
return RTEMS_SUCCESSFUL;
ffc187c8: 48 00 00 0c b ffc187d4 <rtems_signal_send+0xd8>
}
_Thread_Enable_dispatch();
ffc187cc: 48 00 4a c5 bl ffc1d290 <_Thread_Enable_dispatch>
ffc187d0: 38 00 00 0b li r0,11
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc187d4: 7c 03 03 78 mr r3,r0
ffc187d8: 80 01 00 24 lwz r0,36(r1)
ffc187dc: 83 e1 00 1c lwz r31,28(r1)
ffc187e0: 38 21 00 20 addi r1,r1,32
ffc187e4: 7c 08 03 a6 mtlr r0
ffc187e8: 4e 80 00 20 blr
ffc0f9d8 <rtems_task_mode>:
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
ffc0f9d8: 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
)
{
ffc0f9dc: 94 21 ff f0 stwu r1,-16(r1)
ffc0f9e0: 7c 08 02 a6 mflr r0
ffc0f9e4: 93 e1 00 0c stw r31,12(r1)
ffc0f9e8: 90 01 00 14 stw r0,20(r1)
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
ffc0f9ec: 38 00 00 09 li r0,9
ffc0f9f0: 41 82 01 5c beq- ffc0fb4c <rtems_task_mode+0x174>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
ffc0f9f4: 3d 20 00 00 lis r9,0
ffc0f9f8: 81 29 27 6c lwz r9,10092(r9)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc0f9fc: 80 09 00 7c lwz r0,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;
ffc0fa00: 89 49 00 75 lbz r10,117(r9)
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc0fa04: 2f 80 00 00 cmpwi cr7,r0,0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc0fa08: 81 69 01 40 lwz r11,320(r9)
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
ffc0fa0c: 7d 4a 00 34 cntlzw r10,r10
ffc0fa10: 55 4a d9 7e rlwinm r10,r10,27,5,31
ffc0fa14: 55 4a 40 2e rlwinm r10,r10,8,0,23
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc0fa18: 41 9e 00 08 beq- cr7,ffc0fa20 <rtems_task_mode+0x48>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
ffc0fa1c: 61 4a 02 00 ori r10,r10,512
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
ffc0fa20: 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);
ffc0fa24: 38 00 00 00 li r0,0
ffc0fa28: 7d 08 00 34 cntlzw r8,r8
ffc0fa2c: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc0fa30: 55 08 50 2a rlwinm r8,r8,10,0,21
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;
ffc0fa34: 7d 0a 53 78 or r10,r8,r10
ffc0fa38: 7c 00 00 a6 mfmsr r0
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc0fa3c: 70 88 01 00 andi. r8,r4,256
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
ffc0fa40: 68 00 80 00 xori r0,r0,32768
ffc0fa44: 54 00 8f fe rlwinm r0,r0,17,31,31
ffc0fa48: 7d 4a 03 78 or r10,r10,r0
ffc0fa4c: 91 45 00 00 stw r10,0(r5)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc0fa50: 41 82 00 10 beq- ffc0fa60 <rtems_task_mode+0x88>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
ffc0fa54: 68 60 01 00 xori r0,r3,256
ffc0fa58: 54 00 c7 fe rlwinm r0,r0,24,31,31
ffc0fa5c: 98 09 00 75 stb r0,117(r9)
if ( mask & RTEMS_TIMESLICE_MASK ) {
ffc0fa60: 70 8a 02 00 andi. r10,r4,512
ffc0fa64: 41 82 00 28 beq- ffc0fa8c <rtems_task_mode+0xb4>
if ( _Modes_Is_timeslice(mode_set) ) {
ffc0fa68: 70 60 02 00 andi. r0,r3,512
ffc0fa6c: 41 82 00 1c beq- ffc0fa88 <rtems_task_mode+0xb0>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0fa70: 3d 40 00 00 lis r10,0
ffc0fa74: 80 0a 27 24 lwz r0,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;
ffc0fa78: 39 40 00 01 li r10,1
ffc0fa7c: 91 49 00 7c stw r10,124(r9)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0fa80: 90 09 00 78 stw r0,120(r9)
ffc0fa84: 48 00 00 08 b ffc0fa8c <rtems_task_mode+0xb4>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
ffc0fa88: 90 09 00 7c stw r0,124(r9)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
ffc0fa8c: 70 80 00 01 andi. r0,r4,1
ffc0fa90: 41 82 00 2c beq- ffc0fabc <rtems_task_mode+0xe4>
}
static inline void _CPU_ISR_Set_level( uint32_t level )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc0fa94: 38 00 00 00 li r0,0
ffc0fa98: 7c 00 00 a6 mfmsr r0
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc0fa9c: 70 68 00 01 andi. r8,r3,1
ffc0faa0: 40 82 00 10 bne- ffc0fab0 <rtems_task_mode+0xd8>
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
asm volatile (
ffc0faa4: 7d 50 42 a6 mfsprg r10,0
msr |= ppc_interrupt_get_disable_mask();
ffc0faa8: 7d 40 03 78 or r0,r10,r0
ffc0faac: 48 00 00 0c b ffc0fab8 <rtems_task_mode+0xe0>
ffc0fab0: 7d 50 42 a6 mfsprg r10,0
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
ffc0fab4: 7c 00 50 78 andc r0,r0,r10
}
_CPU_MSR_SET(msr);
ffc0fab8: 7c 00 01 24 mtmsr r0
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
ffc0fabc: 70 8a 04 00 andi. r10,r4,1024
ffc0fac0: 41 82 00 5c beq- ffc0fb1c <rtems_task_mode+0x144>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
ffc0fac4: 68 63 04 00 xori r3,r3,1024
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
ffc0fac8: 88 0b 00 08 lbz r0,8(r11)
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
ffc0facc: 54 63 b7 fe rlwinm r3,r3,22,31,31
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
ffc0fad0: 7f 80 18 00 cmpw cr7,r0,r3
ffc0fad4: 41 9e 00 48 beq- cr7,ffc0fb1c <rtems_task_mode+0x144>
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
ffc0fad8: 98 6b 00 08 stb r3,8(r11)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0fadc: 7c 00 00 a6 mfmsr r0
ffc0fae0: 7d 50 42 a6 mfsprg r10,0
ffc0fae4: 7c 0a 50 78 andc r10,r0,r10
ffc0fae8: 7d 40 01 24 mtmsr r10
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
ffc0faec: 81 0b 00 18 lwz r8,24(r11)
information->signals_pending = information->signals_posted;
ffc0faf0: 81 4b 00 14 lwz r10,20(r11)
information->signals_posted = _signals;
ffc0faf4: 91 0b 00 14 stw r8,20(r11)
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
ffc0faf8: 91 4b 00 18 stw r10,24(r11)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0fafc: 7c 00 01 24 mtmsr r0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
ffc0fb00: 80 0b 00 14 lwz r0,20(r11)
ffc0fb04: 2f 80 00 00 cmpwi cr7,r0,0
ffc0fb08: 41 9e 00 14 beq- cr7,ffc0fb1c <rtems_task_mode+0x144>
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
ffc0fb0c: 38 00 00 01 li r0,1
ffc0fb10: 98 09 00 74 stb r0,116(r9)
ffc0fb14: 3b e0 00 01 li r31,1
ffc0fb18: 48 00 00 08 b ffc0fb20 <rtems_task_mode+0x148>
ffc0fb1c: 3b e0 00 00 li r31,0
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
ffc0fb20: 3d 20 00 00 lis r9,0
ffc0fb24: 80 09 27 90 lwz r0,10128(r9)
ffc0fb28: 2f 80 00 03 cmpwi cr7,r0,3
ffc0fb2c: 40 be 00 1c bne+ cr7,ffc0fb48 <rtems_task_mode+0x170> <== NEVER TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
ffc0fb30: 48 00 03 49 bl ffc0fe78 <_Thread_Evaluate_mode>
ffc0fb34: 2f 83 00 00 cmpwi cr7,r3,0
ffc0fb38: 40 9e 00 0c bne- cr7,ffc0fb44 <rtems_task_mode+0x16c>
ffc0fb3c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0fb40: 41 9e 00 08 beq- cr7,ffc0fb48 <rtems_task_mode+0x170>
_Thread_Dispatch();
ffc0fb44: 4b ff a7 65 bl ffc0a2a8 <_Thread_Dispatch>
ffc0fb48: 38 00 00 00 li r0,0
return RTEMS_SUCCESSFUL;
}
ffc0fb4c: 7c 03 03 78 mr r3,r0
ffc0fb50: 80 01 00 14 lwz r0,20(r1)
ffc0fb54: 83 e1 00 0c lwz r31,12(r1)
ffc0fb58: 38 21 00 10 addi r1,r1,16
ffc0fb5c: 7c 08 03 a6 mtlr r0
ffc0fb60: 4e 80 00 20 blr
ffc0dce8 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0dce8: 94 21 ff e0 stwu r1,-32(r1)
ffc0dcec: 7c 08 02 a6 mflr r0
ffc0dcf0: 93 e1 00 1c stw r31,28(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0dcf4: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0dcf8: 93 c1 00 18 stw r30,24(r1)
ffc0dcfc: 7c be 2b 78 mr r30,r5
ffc0dd00: 90 01 00 24 stw r0,36(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0dd04: 41 82 00 18 beq- ffc0dd1c <rtems_task_set_priority+0x34>
ffc0dd08: 3d 20 00 00 lis r9,0
ffc0dd0c: 89 29 26 a4 lbz r9,9892(r9)
ffc0dd10: 38 00 00 13 li r0,19
ffc0dd14: 7f 9f 48 40 cmplw cr7,r31,r9
ffc0dd18: 41 9d 00 68 bgt- cr7,ffc0dd80 <rtems_task_set_priority+0x98>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
ffc0dd1c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0dd20: 38 00 00 09 li r0,9
ffc0dd24: 41 9e 00 5c beq- cr7,ffc0dd80 <rtems_task_set_priority+0x98>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
ffc0dd28: 38 81 00 08 addi r4,r1,8
ffc0dd2c: 48 00 25 f9 bl ffc10324 <_Thread_Get>
switch ( location ) {
ffc0dd30: 81 21 00 08 lwz r9,8(r1)
ffc0dd34: 38 00 00 04 li r0,4
ffc0dd38: 2f 89 00 00 cmpwi cr7,r9,0
ffc0dd3c: 40 9e 00 44 bne- cr7,ffc0dd80 <rtems_task_set_priority+0x98>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
ffc0dd40: 2f 9f 00 00 cmpwi cr7,r31,0
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
ffc0dd44: 80 03 00 14 lwz r0,20(r3)
ffc0dd48: 90 1e 00 00 stw r0,0(r30)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
ffc0dd4c: 41 9e 00 2c beq- cr7,ffc0dd78 <rtems_task_set_priority+0x90>
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
ffc0dd50: 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;
ffc0dd54: 93 e3 00 18 stw r31,24(r3)
if ( the_thread->resource_count == 0 ||
ffc0dd58: 2f 80 00 00 cmpwi cr7,r0,0
ffc0dd5c: 41 9e 00 10 beq- cr7,ffc0dd6c <rtems_task_set_priority+0x84>
the_thread->current_priority > new_priority )
ffc0dd60: 80 03 00 14 lwz r0,20(r3)
ffc0dd64: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0dd68: 40 9d 00 10 ble- cr7,ffc0dd78 <rtems_task_set_priority+0x90><== ALWAYS TAKEN
_Thread_Change_priority( the_thread, new_priority, false );
ffc0dd6c: 7f e4 fb 78 mr r4,r31
ffc0dd70: 38 a0 00 00 li r5,0
ffc0dd74: 48 00 1e bd bl ffc0fc30 <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
ffc0dd78: 48 00 25 41 bl ffc102b8 <_Thread_Enable_dispatch>
ffc0dd7c: 38 00 00 00 li r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0dd80: 7c 03 03 78 mr r3,r0
ffc0dd84: 80 01 00 24 lwz r0,36(r1)
ffc0dd88: 83 c1 00 18 lwz r30,24(r1)
ffc0dd8c: 7c 08 03 a6 mtlr r0
ffc0dd90: 83 e1 00 1c lwz r31,28(r1)
ffc0dd94: 38 21 00 20 addi r1,r1,32
ffc0dd98: 4e 80 00 20 blr
ffc192a4 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
ffc192a4: 94 21 ff e8 stwu r1,-24(r1)
ffc192a8: 7c 08 02 a6 mflr r0
ffc192ac: 7c 64 1b 78 mr r4,r3
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
ffc192b0: 3c 60 00 00 lis r3,0
ffc192b4: 90 01 00 1c stw r0,28(r1)
ffc192b8: 38 63 72 44 addi r3,r3,29252
ffc192bc: 38 a1 00 08 addi r5,r1,8
ffc192c0: 48 00 34 59 bl ffc1c718 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc192c4: 81 21 00 08 lwz r9,8(r1)
ffc192c8: 38 00 00 04 li r0,4
ffc192cc: 2f 89 00 00 cmpwi cr7,r9,0
ffc192d0: 40 9e 00 20 bne- cr7,ffc192f0 <rtems_timer_cancel+0x4c>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
ffc192d4: 80 03 00 38 lwz r0,56(r3)
ffc192d8: 2f 80 00 04 cmpwi cr7,r0,4
ffc192dc: 41 9e 00 0c beq- cr7,ffc192e8 <rtems_timer_cancel+0x44> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc192e0: 38 63 00 10 addi r3,r3,16
ffc192e4: 48 00 5a 65 bl ffc1ed48 <_Watchdog_Remove>
_Thread_Enable_dispatch();
ffc192e8: 48 00 3f a9 bl ffc1d290 <_Thread_Enable_dispatch>
ffc192ec: 38 00 00 00 li r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc192f0: 7c 03 03 78 mr r3,r0
ffc192f4: 80 01 00 1c lwz r0,28(r1)
ffc192f8: 38 21 00 18 addi r1,r1,24
ffc192fc: 7c 08 03 a6 mtlr r0
ffc19300: 4e 80 00 20 blr
ffc19914 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc19914: 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;
ffc19918: 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
)
{
ffc1991c: 7c 08 02 a6 mflr r0
ffc19920: 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;
ffc19924: 83 e9 28 a4 lwz r31,10404(r9)
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc19928: 93 41 00 20 stw r26,32(r1)
ffc1992c: 7c da 33 78 mr r26,r6
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
ffc19930: 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
)
{
ffc19934: 93 81 00 28 stw r28,40(r1)
ffc19938: 7c 9c 23 78 mr r28,r4
ffc1993c: 93 a1 00 2c stw r29,44(r1)
ffc19940: 7c 7d 1b 78 mr r29,r3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
ffc19944: 38 60 00 0e li r3,14
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc19948: 93 c1 00 30 stw r30,48(r1)
ffc1994c: 7c be 2b 78 mr r30,r5
ffc19950: 90 01 00 3c stw r0,60(r1)
ffc19954: 93 01 00 18 stw r24,24(r1)
ffc19958: 93 21 00 1c stw r25,28(r1)
ffc1995c: 93 61 00 24 stw r27,36(r1)
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
ffc19960: 41 9e 00 c8 beq- cr7,ffc19a28 <rtems_timer_server_fire_when+0x114>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
ffc19964: 3d 20 00 00 lis r9,0
ffc19968: 88 09 28 2c lbz r0,10284(r9)
ffc1996c: 38 60 00 0b li r3,11
ffc19970: 2f 80 00 00 cmpwi cr7,r0,0
ffc19974: 41 9e 00 b4 beq- cr7,ffc19a28 <rtems_timer_server_fire_when+0x114><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
ffc19978: 2f 85 00 00 cmpwi cr7,r5,0
ffc1997c: 38 60 00 09 li r3,9
ffc19980: 41 9e 00 a8 beq- cr7,ffc19a28 <rtems_timer_server_fire_when+0x114>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
ffc19984: 7c 83 23 78 mr r3,r4
ffc19988: 4b ff c5 75 bl ffc15efc <_TOD_Validate>
ffc1998c: 2f 83 00 00 cmpwi cr7,r3,0
ffc19990: 41 9e 00 94 beq- cr7,ffc19a24 <rtems_timer_server_fire_when+0x110>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc19994: 7f 83 e3 78 mr r3,r28
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc19998: 3f 60 00 00 lis r27,0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc1999c: 4b ff c4 d5 bl ffc15e70 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc199a0: 80 1b 28 44 lwz r0,10308(r27)
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc199a4: 7c 7c 1b 78 mr r28,r3
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc199a8: 7f 83 00 40 cmplw cr7,r3,r0
ffc199ac: 40 9d 00 78 ble- cr7,ffc19a24 <rtems_timer_server_fire_when+0x110>
ffc199b0: 3c 60 00 00 lis r3,0
ffc199b4: 38 63 72 44 addi r3,r3,29252
ffc199b8: 7f a4 eb 78 mr r4,r29
ffc199bc: 38 a1 00 08 addi r5,r1,8
ffc199c0: 48 00 2d 59 bl ffc1c718 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc199c4: 83 01 00 08 lwz r24,8(r1)
ffc199c8: 7c 79 1b 78 mr r25,r3
ffc199cc: 2f 98 00 00 cmpwi cr7,r24,0
ffc199d0: 38 60 00 04 li r3,4
ffc199d4: 40 9e 00 54 bne- cr7,ffc19a28 <rtems_timer_server_fire_when+0x114>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc199d8: 38 79 00 10 addi r3,r25,16
ffc199dc: 48 00 53 6d bl ffc1ed48 <_Watchdog_Remove>
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
ffc199e0: 93 b9 00 30 stw r29,48(r25)
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
ffc199e4: 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();
ffc199e8: 80 1b 28 44 lwz r0,10308(r27)
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc199ec: 7f e3 fb 78 mr r3,r31
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;
ffc199f0: 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 );
ffc199f4: 7f 24 cb 78 mr r4,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();
ffc199f8: 7f 80 e0 50 subf r28,r0,r28
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc199fc: 80 1f 00 04 lwz r0,4(r31)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc19a00: 93 19 00 18 stw r24,24(r25)
ffc19a04: 7c 09 03 a6 mtctr r0
the_watchdog->routine = routine;
ffc19a08: 93 d9 00 2c stw r30,44(r25)
the_watchdog->id = id;
the_watchdog->user_data = user_data;
ffc19a0c: 93 59 00 34 stw r26,52(r25)
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
ffc19a10: 93 99 00 1c stw r28,28(r25)
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc19a14: 4e 80 04 21 bctrl
_Thread_Enable_dispatch();
ffc19a18: 48 00 38 79 bl ffc1d290 <_Thread_Enable_dispatch>
ffc19a1c: 38 60 00 00 li r3,0
return RTEMS_SUCCESSFUL;
ffc19a20: 48 00 00 08 b ffc19a28 <rtems_timer_server_fire_when+0x114>
ffc19a24: 38 60 00 14 li r3,20
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc19a28: 80 01 00 3c lwz r0,60(r1)
ffc19a2c: 83 01 00 18 lwz r24,24(r1)
ffc19a30: 7c 08 03 a6 mtlr r0
ffc19a34: 83 21 00 1c lwz r25,28(r1)
ffc19a38: 83 41 00 20 lwz r26,32(r1)
ffc19a3c: 83 61 00 24 lwz r27,36(r1)
ffc19a40: 83 81 00 28 lwz r28,40(r1)
ffc19a44: 83 a1 00 2c lwz r29,44(r1)
ffc19a48: 83 c1 00 30 lwz r30,48(r1)
ffc19a4c: 83 e1 00 34 lwz r31,52(r1)
ffc19a50: 38 21 00 38 addi r1,r1,56
ffc19a54: 4e 80 00 20 blr