RTEMS 4.10Annotated Report
Sat May 22 08:31:53 2010
08002b78 <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
8002b78: 37 9c ff f4 addi sp,sp,-12
8002b7c: 5b 8b 00 0c sw (sp+12),r11
8002b80: 5b 8c 00 08 sw (sp+8),r12
8002b84: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
8002b88: 78 0c 08 01 mvhi r12,0x801
8002b8c: 39 8c d9 e0 ori r12,r12,0xd9e0
8002b90: 29 8b 00 00 lw r11,(r12+0)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
8002b94: 35 8c 00 04 addi r12,r12,4
8002b98: 45 6c 00 05 be r11,r12,8002bac <_API_extensions_Run_postdriver+0x34><== NEVER TAKEN
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
8002b9c: 29 61 00 08 lw r1,(r11+8)
8002ba0: d8 20 00 00 call r1
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
8002ba4: 29 6b 00 00 lw r11,(r11+0)
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
8002ba8: 5d 6c ff fd bne r11,r12,8002b9c <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
8002bac: 2b 9d 00 04 lw ra,(sp+4)
8002bb0: 2b 8b 00 0c lw r11,(sp+12)
8002bb4: 2b 8c 00 08 lw r12,(sp+8)
8002bb8: 37 9c 00 0c addi sp,sp,12
8002bbc: c3 a0 00 00 ret
08002bc0 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
8002bc0: 37 9c ff f0 addi sp,sp,-16
8002bc4: 5b 8b 00 10 sw (sp+16),r11
8002bc8: 5b 8c 00 0c sw (sp+12),r12
8002bcc: 5b 8d 00 08 sw (sp+8),r13
8002bd0: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
8002bd4: 78 0d 08 01 mvhi r13,0x801
8002bd8: 39 ad d9 e0 ori r13,r13,0xd9e0
8002bdc: 29 ab 00 00 lw r11,(r13+0)
8002be0: 35 ad 00 04 addi r13,r13,4
8002be4: 45 6d 00 08 be r11,r13,8002c04 <_API_extensions_Run_postswitch+0x44><== NEVER TAKEN
8002be8: 78 0c 08 01 mvhi r12,0x801
8002bec: 39 8c d8 e8 ori r12,r12,0xd8e8
* provide this hook.
*/
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
8002bf0: 29 62 00 0c lw r2,(r11+12)
8002bf4: 29 81 00 00 lw r1,(r12+0)
8002bf8: d8 40 00 00 call r2
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
8002bfc: 29 6b 00 00 lw r11,(r11+0)
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
8002c00: 5d 6d ff fc bne r11,r13,8002bf0 <_API_extensions_Run_postswitch+0x30><== NEVER TAKEN
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
8002c04: 2b 9d 00 04 lw ra,(sp+4)
8002c08: 2b 8b 00 10 lw r11,(sp+16)
8002c0c: 2b 8c 00 0c lw r12,(sp+12)
8002c10: 2b 8d 00 08 lw r13,(sp+8)
8002c14: 37 9c 00 10 addi sp,sp,16
8002c18: c3 a0 00 00 ret
08015780 <_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
)
{
8015780: 37 9c ff e4 addi sp,sp,-28
8015784: 5b 8b 00 1c sw (sp+28),r11
8015788: 5b 8c 00 18 sw (sp+24),r12
801578c: 5b 8d 00 14 sw (sp+20),r13
8015790: 5b 8e 00 10 sw (sp+16),r14
8015794: 5b 8f 00 0c sw (sp+12),r15
8015798: 5b 90 00 08 sw (sp+8),r16
801579c: 5b 9d 00 04 sw (sp+4),ra
80157a0: b8 20 70 00 mv r14,r1
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
80157a4: 28 21 00 4c lw r1,(r1+76)
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
80157a8: b8 60 60 00 mv r12,r3
80157ac: b8 40 78 00 mv r15,r2
80157b0: b8 c0 80 00 mv r16,r6
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
80157b4: 50 23 00 0b bgeu r1,r3,80157e0 <_CORE_message_queue_Broadcast+0x60><== ALWAYS TAKEN
80157b8: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
80157bc: 2b 9d 00 04 lw ra,(sp+4)
80157c0: 2b 8b 00 1c lw r11,(sp+28)
80157c4: 2b 8c 00 18 lw r12,(sp+24)
80157c8: 2b 8d 00 14 lw r13,(sp+20)
80157cc: 2b 8e 00 10 lw r14,(sp+16)
80157d0: 2b 8f 00 0c lw r15,(sp+12)
80157d4: 2b 90 00 08 lw r16,(sp+8)
80157d8: 37 9c 00 1c addi sp,sp,28
80157dc: c3 a0 00 00 ret
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
80157e0: 29 c2 00 48 lw r2,(r14+72)
80157e4: 34 01 00 00 mvi r1,0
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
80157e8: b8 40 68 00 mv r13,r2
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
80157ec: 44 41 00 08 be r2,r1,801580c <_CORE_message_queue_Broadcast+0x8c>
*count = 0;
80157f0: 58 c1 00 00 sw (r6+0),r1
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
80157f4: e3 ff ff f2 bi 80157bc <_CORE_message_queue_Broadcast+0x3c>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
80157f8: 29 61 00 2c lw r1,(r11+44)
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
80157fc: 35 ad 00 01 addi r13,r13,1
8015800: f8 00 29 18 calli 801fc60 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
8015804: 29 61 00 28 lw r1,(r11+40)
8015808: 58 2c 00 00 sw (r1+0),r12
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
801580c: b9 c0 08 00 mv r1,r14
8015810: f8 00 0c 6f calli 80189cc <_Thread_queue_Dequeue>
8015814: b8 20 58 00 mv r11,r1
8015818: b9 e0 10 00 mv r2,r15
801581c: b9 80 18 00 mv r3,r12
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
8015820: 5c 20 ff f6 bne r1,r0,80157f8 <_CORE_message_queue_Broadcast+0x78>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
8015824: 5a 0d 00 00 sw (r16+0),r13
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
8015828: e3 ff ff e5 bi 80157bc <_CORE_message_queue_Broadcast+0x3c>
0800e9ec <_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
)
{
800e9ec: 37 9c ff e8 addi sp,sp,-24
800e9f0: 5b 8b 00 18 sw (sp+24),r11
800e9f4: 5b 8c 00 14 sw (sp+20),r12
800e9f8: 5b 8d 00 10 sw (sp+16),r13
800e9fc: 5b 8e 00 0c sw (sp+12),r14
800ea00: 5b 8f 00 08 sw (sp+8),r15
800ea04: 5b 9d 00 04 sw (sp+4),ra
800ea08: b8 20 58 00 mv r11,r1
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
800ea0c: 34 01 00 00 mvi r1,0
800ea10: 59 61 00 48 sw (r11+72),r1
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
800ea14: 59 63 00 44 sw (r11+68),r3
the_message_queue->number_of_pending_messages = 0;
the_message_queue->maximum_message_size = maximum_message_size;
800ea18: 59 64 00 4c sw (r11+76),r4
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
800ea1c: 20 81 00 03 andi r1,r4,0x3
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
800ea20: b8 60 68 00 mv r13,r3
800ea24: b8 40 78 00 mv r15,r2
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
800ea28: b8 80 60 00 mv r12,r4
800ea2c: 44 20 00 05 be r1,r0,800ea40 <_CORE_message_queue_Initialize+0x54>
allocated_message_size += sizeof(uint32_t);
800ea30: 34 8c 00 04 addi r12,r4,4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
800ea34: 34 01 ff fc mvi r1,-4
800ea38: a1 81 60 00 and r12,r12,r1
}
if (allocated_message_size < maximum_message_size)
800ea3c: 54 8c 00 23 bgu r4,r12,800eac8 <_CORE_message_queue_Initialize+0xdc><== 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));
800ea40: 35 8e 00 10 addi r14,r12,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 *
800ea44: b9 c0 08 00 mv r1,r14
800ea48: b9 a0 10 00 mv r2,r13
800ea4c: f8 00 67 11 calli 8028690 <__mulsi3>
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
800ea50: 55 81 00 1e bgu r12,r1,800eac8 <_CORE_message_queue_Initialize+0xdc><== NEVER TAKEN
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
800ea54: f8 00 0e 7f calli 8012450 <_Workspace_Allocate>
800ea58: 59 61 00 5c sw (r11+92),r1
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
800ea5c: 44 20 00 1b be r1,r0,800eac8 <_CORE_message_queue_Initialize+0xdc>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
800ea60: b8 20 10 00 mv r2,r1
800ea64: b9 a0 18 00 mv r3,r13
800ea68: b9 c0 20 00 mv r4,r14
800ea6c: 35 61 00 60 addi r1,r11,96
800ea70: f8 00 17 9b calli 80148dc <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
800ea74: 29 e2 00 00 lw r2,(r15+0)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
800ea78: 35 63 00 54 addi r3,r11,84
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
800ea7c: 35 61 00 50 addi r1,r11,80
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
800ea80: 59 63 00 50 sw (r11+80),r3
800ea84: 64 42 00 01 cmpei r2,r2,1
the_chain->permanent_null = NULL;
800ea88: 34 03 00 00 mvi r3,0
800ea8c: 59 63 00 54 sw (r11+84),r3
the_chain->last = _Chain_Head(the_chain);
800ea90: 59 61 00 58 sw (r11+88),r1
800ea94: 34 03 00 80 mvi r3,128
800ea98: b9 60 08 00 mv r1,r11
800ea9c: 34 04 00 06 mvi r4,6
800eaa0: f8 00 0a c2 calli 80115a8 <_Thread_queue_Initialize>
800eaa4: 34 01 00 01 mvi r1,1
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
800eaa8: 2b 9d 00 04 lw ra,(sp+4)
800eaac: 2b 8b 00 18 lw r11,(sp+24)
800eab0: 2b 8c 00 14 lw r12,(sp+20)
800eab4: 2b 8d 00 10 lw r13,(sp+16)
800eab8: 2b 8e 00 0c lw r14,(sp+12)
800eabc: 2b 8f 00 08 lw r15,(sp+8)
800eac0: 37 9c 00 18 addi sp,sp,24
800eac4: c3 a0 00 00 ret
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
800eac8: 34 01 00 00 mvi r1,0
}
800eacc: 2b 9d 00 04 lw ra,(sp+4)
800ead0: 2b 8b 00 18 lw r11,(sp+24)
800ead4: 2b 8c 00 14 lw r12,(sp+20)
800ead8: 2b 8d 00 10 lw r13,(sp+16)
800eadc: 2b 8e 00 0c lw r14,(sp+12)
800eae0: 2b 8f 00 08 lw r15,(sp+8)
800eae4: 37 9c 00 18 addi sp,sp,24
800eae8: c3 a0 00 00 ret
08002f0c <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
8002f0c: 37 9c ff e4 addi sp,sp,-28
8002f10: 5b 8b 00 18 sw (sp+24),r11
8002f14: 5b 8c 00 14 sw (sp+20),r12
8002f18: 5b 8d 00 10 sw (sp+16),r13
8002f1c: 5b 8e 00 0c sw (sp+12),r14
8002f20: 5b 8f 00 08 sw (sp+8),r15
8002f24: 5b 9d 00 04 sw (sp+4),ra
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
8002f28: 78 0b 08 01 mvhi r11,0x801
8002f2c: 39 6b d8 2c ori r11,r11,0xd82c
8002f30: 29 66 00 00 lw r6,(r11+0)
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
8002f34: 5b 85 00 1c sw (sp+28),r5
8002f38: b8 20 60 00 mv r12,r1
8002f3c: b8 40 78 00 mv r15,r2
8002f40: b8 80 70 00 mv r14,r4
8002f44: 20 6d 00 ff andi r13,r3,0xff
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
8002f48: 44 c0 00 02 be r6,r0,8002f50 <_CORE_mutex_Seize+0x44>
8002f4c: 5d a0 00 15 bne r13,r0,8002fa0 <_CORE_mutex_Seize+0x94> <== ALWAYS TAKEN
8002f50: b9 80 08 00 mv r1,r12
8002f54: 37 82 00 1c addi r2,sp,28
8002f58: f8 00 16 d9 calli 8008abc <_CORE_mutex_Seize_interrupt_trylock>
8002f5c: 44 20 00 09 be r1,r0,8002f80 <_CORE_mutex_Seize+0x74>
8002f60: 5d a0 00 19 bne r13,r0,8002fc4 <_CORE_mutex_Seize+0xb8>
8002f64: 2b 81 00 1c lw r1,(sp+28)
8002f68: d0 01 00 00 wcsr IE,r1
8002f6c: 78 01 08 01 mvhi r1,0x801
8002f70: 38 21 d8 e8 ori r1,r1,0xd8e8
8002f74: 28 21 00 00 lw r1,(r1+0)
8002f78: 34 02 00 01 mvi r2,1
8002f7c: 58 22 00 34 sw (r1+52),r2
}
8002f80: 2b 9d 00 04 lw ra,(sp+4)
8002f84: 2b 8b 00 18 lw r11,(sp+24)
8002f88: 2b 8c 00 14 lw r12,(sp+20)
8002f8c: 2b 8d 00 10 lw r13,(sp+16)
8002f90: 2b 8e 00 0c lw r14,(sp+12)
8002f94: 2b 8f 00 08 lw r15,(sp+8)
8002f98: 37 9c 00 1c addi sp,sp,28
8002f9c: c3 a0 00 00 ret
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
8002fa0: 78 01 08 01 mvhi r1,0x801
8002fa4: 38 21 d9 c8 ori r1,r1,0xd9c8
8002fa8: 28 21 00 00 lw r1,(r1+0)
8002fac: 34 02 00 01 mvi r2,1
8002fb0: 50 41 ff e8 bgeu r2,r1,8002f50 <_CORE_mutex_Seize+0x44>
8002fb4: 34 01 00 00 mvi r1,0
8002fb8: b8 20 10 00 mv r2,r1
8002fbc: 34 03 00 13 mvi r3,19
8002fc0: f8 00 01 cf calli 80036fc <_Internal_error_Occurred>
8002fc4: 78 01 08 01 mvhi r1,0x801
8002fc8: 38 21 d8 e8 ori r1,r1,0xd8e8
8002fcc: 28 21 00 00 lw r1,(r1+0)
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
8002fd0: 34 02 00 01 mvi r2,1
8002fd4: 59 82 00 30 sw (r12+48),r2
8002fd8: 58 2f 00 20 sw (r1+32),r15
8002fdc: 29 62 00 00 lw r2,(r11+0)
8002fe0: 58 2c 00 44 sw (r1+68),r12
8002fe4: 34 41 00 01 addi r1,r2,1
8002fe8: 59 61 00 00 sw (r11+0),r1
8002fec: 2b 81 00 1c lw r1,(sp+28)
8002ff0: d0 01 00 00 wcsr IE,r1
8002ff4: b9 80 08 00 mv r1,r12
8002ff8: b9 c0 10 00 mv r2,r14
8002ffc: fb ff ff a3 calli 8002e88 <_CORE_mutex_Seize_interrupt_blocking>
}
8003000: 2b 9d 00 04 lw ra,(sp+4)
8003004: 2b 8b 00 18 lw r11,(sp+24)
8003008: 2b 8c 00 14 lw r12,(sp+20)
800300c: 2b 8d 00 10 lw r13,(sp+16)
8003010: 2b 8e 00 0c lw r14,(sp+12)
8003014: 2b 8f 00 08 lw r15,(sp+8)
8003018: 37 9c 00 1c addi sp,sp,28
800301c: c3 a0 00 00 ret
08008abc <_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
)
{
8008abc: 37 9c ff fc addi sp,sp,-4
8008ac0: 5b 9d 00 04 sw (sp+4),ra
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
8008ac4: 78 03 08 01 mvhi r3,0x801
8008ac8: 38 63 d8 e8 ori r3,r3,0xd8e8
8008acc: 28 63 00 00 lw r3,(r3+0)
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
8008ad0: 34 04 00 00 mvi r4,0
8008ad4: 58 64 00 34 sw (r3+52),r4
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
8008ad8: 28 25 00 50 lw r5,(r1+80)
8008adc: 44 a4 00 12 be r5,r4,8008b24 <_CORE_mutex_Seize_interrupt_trylock+0x68>
the_mutex->lock = CORE_MUTEX_LOCKED;
8008ae0: 58 24 00 50 sw (r1+80),r4
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
8008ae4: 28 66 00 08 lw r6,(r3+8)
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
8008ae8: 28 25 00 48 lw r5,(r1+72)
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;
8008aec: 58 23 00 5c sw (r1+92),r3
the_mutex->holder_id = executing->Object.id;
8008af0: 58 26 00 60 sw (r1+96),r6
the_mutex->nest_count = 1;
8008af4: 34 06 00 01 mvi r6,1
8008af8: 58 26 00 54 sw (r1+84),r6
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
8008afc: 34 07 00 02 mvi r7,2
8008b00: 44 a7 00 0f be r5,r7,8008b3c <_CORE_mutex_Seize_interrupt_trylock+0x80>
8008b04: 34 07 00 03 mvi r7,3
8008b08: 44 a7 00 1b be r5,r7,8008b74 <_CORE_mutex_Seize_interrupt_trylock+0xb8>
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
8008b0c: 28 41 00 00 lw r1,(r2+0)
8008b10: d0 01 00 00 wcsr IE,r1
8008b14: 34 01 00 00 mvi r1,0
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
8008b18: 2b 9d 00 04 lw ra,(sp+4)
8008b1c: 37 9c 00 04 addi sp,sp,4
8008b20: c3 a0 00 00 ret
/*
* 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 ) ) {
8008b24: 28 24 00 5c lw r4,(r1+92)
8008b28: 44 64 00 09 be r3,r4,8008b4c <_CORE_mutex_Seize_interrupt_trylock+0x90>
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
_ISR_Enable( *level_p );
8008b2c: 34 01 00 01 mvi r1,1
8008b30: 2b 9d 00 04 lw ra,(sp+4)
8008b34: 37 9c 00 04 addi sp,sp,4
8008b38: c3 a0 00 00 ret
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
8008b3c: 28 61 00 1c lw r1,(r3+28)
8008b40: 34 21 00 01 addi r1,r1,1
8008b44: 58 61 00 1c sw (r3+28),r1
8008b48: e3 ff ff f1 bi 8008b0c <_CORE_mutex_Seize_interrupt_trylock+0x50>
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
8008b4c: 28 24 00 40 lw r4,(r1+64)
8008b50: 44 80 00 2d be r4,r0,8008c04 <_CORE_mutex_Seize_interrupt_trylock+0x148>
8008b54: 34 01 00 01 mvi r1,1
8008b58: 5c 81 ff f5 bne r4,r1,8008b2c <_CORE_mutex_Seize_interrupt_trylock+0x70><== ALWAYS TAKEN
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
8008b5c: 34 01 00 02 mvi r1,2 <== NOT EXECUTED
8008b60: 58 61 00 34 sw (r3+52),r1 <== NOT EXECUTED
_ISR_Enable( *level_p );
8008b64: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED
8008b68: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
8008b6c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8008b70: e3 ff ff f0 bi 8008b30 <_CORE_mutex_Seize_interrupt_trylock+0x74><== NOT EXECUTED
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
8008b74: 28 68 00 1c lw r8,(r3+28)
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
8008b78: 28 65 00 14 lw r5,(r3+20)
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
8008b7c: b5 06 38 00 add r7,r8,r6
8008b80: 58 67 00 1c sw (r3+28),r7
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
8008b84: 28 27 00 4c lw r7,(r1+76)
current = executing->current_priority;
if ( current == ceiling ) {
8008b88: 44 e5 00 1b be r7,r5,8008bf4 <_CORE_mutex_Seize_interrupt_trylock+0x138>
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
8008b8c: 50 e5 00 0f bgeu r7,r5,8008bc8 <_CORE_mutex_Seize_interrupt_trylock+0x10c>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8008b90: 78 03 08 01 mvhi r3,0x801
8008b94: 38 63 d8 2c ori r3,r3,0xd82c
8008b98: 28 64 00 00 lw r4,(r3+0)
8008b9c: 34 84 00 01 addi r4,r4,1
8008ba0: 58 64 00 00 sw (r3+0),r4
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
8008ba4: 28 42 00 00 lw r2,(r2+0)
8008ba8: d0 02 00 00 wcsr IE,r2
_Thread_Change_priority(
8008bac: 28 22 00 4c lw r2,(r1+76)
8008bb0: 28 21 00 5c lw r1,(r1+92)
8008bb4: 34 03 00 00 mvi r3,0
8008bb8: fb ff ed 3a calli 80040a0 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
8008bbc: fb ff ee c4 calli 80046cc <_Thread_Enable_dispatch>
8008bc0: 34 01 00 00 mvi r1,0
8008bc4: e3 ff ff db bi 8008b30 <_CORE_mutex_Seize_interrupt_trylock+0x74>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
8008bc8: 34 05 00 06 mvi r5,6
8008bcc: 58 65 00 34 sw (r3+52),r5
the_mutex->lock = CORE_MUTEX_UNLOCKED;
the_mutex->nest_count = 0; /* undo locking above */
8008bd0: 58 24 00 54 sw (r1+84),r4
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
8008bd4: 58 26 00 50 sw (r1+80),r6
the_mutex->nest_count = 0; /* undo locking above */
executing->resource_count--; /* undo locking above */
8008bd8: 58 68 00 1c sw (r3+28),r8
_ISR_Enable( *level_p );
8008bdc: 28 41 00 00 lw r1,(r2+0)
8008be0: d0 01 00 00 wcsr IE,r1
8008be4: 34 01 00 00 mvi r1,0
8008be8: 2b 9d 00 04 lw ra,(sp+4)
8008bec: 37 9c 00 04 addi sp,sp,4
8008bf0: c3 a0 00 00 ret
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( *level_p );
8008bf4: 28 41 00 00 lw r1,(r2+0)
8008bf8: d0 01 00 00 wcsr IE,r1
8008bfc: 34 01 00 00 mvi r1,0
8008c00: e3 ff ff cc bi 8008b30 <_CORE_mutex_Seize_interrupt_trylock+0x74>
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
8008c04: 28 23 00 54 lw r3,(r1+84)
8008c08: 34 63 00 01 addi r3,r3,1
8008c0c: 58 23 00 54 sw (r1+84),r3
_ISR_Enable( *level_p );
8008c10: 28 41 00 00 lw r1,(r2+0)
8008c14: d0 01 00 00 wcsr IE,r1
8008c18: 34 01 00 00 mvi r1,0
8008c1c: e3 ff ff c5 bi 8008b30 <_CORE_mutex_Seize_interrupt_trylock+0x74>
08008c38 <_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
)
{
8008c38: 37 9c ff f8 addi sp,sp,-8
8008c3c: 5b 8b 00 08 sw (sp+8),r11
8008c40: 5b 9d 00 04 sw (sp+4),ra
8008c44: b8 20 58 00 mv r11,r1
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
8008c48: fb ff ef c7 calli 8004b64 <_Thread_queue_Dequeue>
8008c4c: 34 02 00 00 mvi r2,0
8008c50: 44 22 00 06 be r1,r2,8008c68 <_CORE_semaphore_Surrender+0x30>
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
8008c54: b8 40 08 00 mv r1,r2
8008c58: 2b 9d 00 04 lw ra,(sp+4)
8008c5c: 2b 8b 00 08 lw r11,(sp+8)
8008c60: 37 9c 00 08 addi sp,sp,8
8008c64: c3 a0 00 00 ret
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
8008c68: 90 00 08 00 rcsr r1,IE
8008c6c: 34 02 ff fe mvi r2,-2
8008c70: a0 22 10 00 and r2,r1,r2
8008c74: d0 02 00 00 wcsr IE,r2
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
8008c78: 29 62 00 48 lw r2,(r11+72)
8008c7c: 29 63 00 40 lw r3,(r11+64)
8008c80: 54 62 00 08 bgu r3,r2,8008ca0 <_CORE_semaphore_Surrender+0x68><== ALWAYS TAKEN
8008c84: 34 02 00 04 mvi r2,4 <== NOT EXECUTED
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
8008c88: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
}
return status;
}
8008c8c: b8 40 08 00 mv r1,r2
8008c90: 2b 9d 00 04 lw ra,(sp+4)
8008c94: 2b 8b 00 08 lw r11,(sp+8)
8008c98: 37 9c 00 08 addi sp,sp,8
8008c9c: c3 a0 00 00 ret
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
8008ca0: 34 42 00 01 addi r2,r2,1
8008ca4: 59 62 00 48 sw (r11+72),r2
8008ca8: 34 02 00 00 mvi r2,0
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
8008cac: d0 01 00 00 wcsr IE,r1
8008cb0: e3 ff ff f7 bi 8008c8c <_CORE_semaphore_Surrender+0x54>
08008a6c <_Chain_Initialize>:
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
8008a6c: 34 05 00 00 mvi r5,0
8008a70: 58 25 00 04 sw (r1+4),r5
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
8008a74: b8 20 28 00 mv r5,r1
next = starting_address;
while ( count-- ) {
8008a78: 44 60 00 07 be r3,r0,8008a94 <_Chain_Initialize+0x28> <== NEVER TAKEN
current->next = next;
next->previous = current;
8008a7c: 58 45 00 04 sw (r2+4),r5
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
current->next = next;
8008a80: 58 a2 00 00 sw (r5+0),r2
next->previous = current;
current = next;
next = (Chain_Node *)
8008a84: 34 63 ff ff addi r3,r3,-1
8008a88: b8 40 28 00 mv r5,r2
8008a8c: b4 44 10 00 add r2,r2,r4
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
8008a90: 5c 60 ff fb bne r3,r0,8008a7c <_Chain_Initialize+0x10>
next->previous = current;
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
8008a94: 34 22 00 04 addi r2,r1,4
8008a98: 58 a2 00 00 sw (r5+0),r2
the_chain->last = current;
8008a9c: 58 25 00 08 sw (r1+8),r5
}
8008aa0: c3 a0 00 00 ret
0800e608 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
800e608: 37 9c ff f4 addi sp,sp,-12
800e60c: 5b 8b 00 0c sw (sp+12),r11
800e610: 5b 8c 00 08 sw (sp+8),r12
800e614: 5b 9d 00 04 sw (sp+4),ra
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
800e618: 78 05 08 02 mvhi r5,0x802
800e61c: 38 a5 49 78 ori r5,r5,0x4978
800e620: 28 ab 00 00 lw r11,(r5+0)
executing->Wait.return_code = RTEMS_SUCCESSFUL;
800e624: 34 05 00 00 mvi r5,0
800e628: 59 65 00 34 sw (r11+52),r5
api = executing->API_Extensions[ THREAD_API_RTEMS ];
800e62c: 29 67 01 24 lw r7,(r11+292)
_ISR_Disable( level );
800e630: 90 00 30 00 rcsr r6,IE
800e634: 34 05 ff fe mvi r5,-2
800e638: a0 c5 28 00 and r5,r6,r5
800e63c: d0 05 00 00 wcsr IE,r5
pending_events = api->pending_events;
800e640: 28 e8 00 00 lw r8,(r7+0)
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(
rtems_event_set the_event_set,
rtems_event_set the_event_condition
)
{
return ( the_event_set & the_event_condition );
800e644: a0 28 28 00 and r5,r1,r8
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
800e648: 44 a0 00 04 be r5,r0,800e658 <_Event_Seize+0x50>
800e64c: 44 25 00 2b be r1,r5,800e6f8 <_Event_Seize+0xf0>
800e650: 20 49 00 02 andi r9,r2,0x2
800e654: 5d 20 00 29 bne r9,r0,800e6f8 <_Event_Seize+0xf0> <== ALWAYS TAKEN
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
800e658: 20 47 00 01 andi r7,r2,0x1
800e65c: 5c e0 00 1e bne r7,r0,800e6d4 <_Event_Seize+0xcc>
*/
executing->Wait.option = (uint32_t) option_set;
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
800e660: 78 0c 08 02 mvhi r12,0x802
800e664: 39 8c 4b b8 ori r12,r12,0x4bb8
*
* 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;
800e668: 59 61 00 24 sw (r11+36),r1
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
800e66c: 34 01 00 01 mvi r1,1
* set properly when we are marked as in the event critical section.
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
800e670: 59 62 00 30 sw (r11+48),r2
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
800e674: 59 64 00 28 sw (r11+40),r4
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
800e678: 59 81 00 00 sw (r12+0),r1
_ISR_Enable( level );
800e67c: d0 06 00 00 wcsr IE,r6
if ( ticks ) {
800e680: 34 04 00 00 mvi r4,0
800e684: 5c 64 00 2d bne r3,r4,800e738 <_Event_Seize+0x130>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
800e688: b9 60 08 00 mv r1,r11
800e68c: 34 02 01 00 mvi r2,256
800e690: fb ff e4 f2 calli 8007a58 <_Thread_Set_state>
_ISR_Disable( level );
800e694: 90 00 18 00 rcsr r3,IE
800e698: 34 01 ff fe mvi r1,-2
800e69c: a0 61 08 00 and r1,r3,r1
800e6a0: d0 01 00 00 wcsr IE,r1
sync_state = _Event_Sync_state;
800e6a4: 29 81 00 00 lw r1,(r12+0)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
800e6a8: 34 02 00 00 mvi r2,0
800e6ac: 59 82 00 00 sw (r12+0),r2
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
800e6b0: 34 02 00 01 mvi r2,1
800e6b4: 44 22 00 1b be r1,r2,800e720 <_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 );
800e6b8: b9 60 10 00 mv r2,r11
800e6bc: f8 00 06 13 calli 800ff08 <_Thread_blocking_operation_Cancel>
}
800e6c0: 2b 9d 00 04 lw ra,(sp+4)
800e6c4: 2b 8b 00 0c lw r11,(sp+12)
800e6c8: 2b 8c 00 08 lw r12,(sp+8)
800e6cc: 37 9c 00 0c addi sp,sp,12
800e6d0: c3 a0 00 00 ret
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
800e6d4: d0 06 00 00 wcsr IE,r6
executing->Wait.return_code = RTEMS_UNSATISFIED;
800e6d8: 34 01 00 0d mvi r1,13
800e6dc: 59 61 00 34 sw (r11+52),r1
*event_out = seized_events;
800e6e0: 58 85 00 00 sw (r4+0),r5
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
800e6e4: 2b 9d 00 04 lw ra,(sp+4)
800e6e8: 2b 8b 00 0c lw r11,(sp+12)
800e6ec: 2b 8c 00 08 lw r12,(sp+8)
800e6f0: 37 9c 00 0c addi sp,sp,12
800e6f4: c3 a0 00 00 ret
pending_events = api->pending_events;
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
800e6f8: a4 a0 08 00 not r1,r5
800e6fc: a0 28 40 00 and r8,r1,r8
800e700: 58 e8 00 00 sw (r7+0),r8
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
800e704: d0 06 00 00 wcsr IE,r6
*event_out = seized_events;
800e708: 58 85 00 00 sw (r4+0),r5
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
800e70c: 2b 9d 00 04 lw ra,(sp+4)
800e710: 2b 8b 00 0c lw r11,(sp+12)
800e714: 2b 8c 00 08 lw r12,(sp+8)
800e718: 37 9c 00 0c addi sp,sp,12
800e71c: c3 a0 00 00 ret
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
_ISR_Enable( level );
800e720: d0 03 00 00 wcsr IE,r3
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
800e724: 2b 9d 00 04 lw ra,(sp+4)
800e728: 2b 8b 00 0c lw r11,(sp+12)
800e72c: 2b 8c 00 08 lw r12,(sp+8)
800e730: 37 9c 00 0c addi sp,sp,12
800e734: c3 a0 00 00 ret
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
800e738: 29 65 00 08 lw r5,(r11+8)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
800e73c: 78 02 08 00 mvhi r2,0x800
800e740: 38 42 e9 40 ori r2,r2,0xe940
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
800e744: 78 01 08 02 mvhi r1,0x802
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
800e748: 59 62 00 64 sw (r11+100),r2
the_watchdog->id = id;
800e74c: 59 65 00 68 sw (r11+104),r5
the_watchdog->user_data = user_data;
800e750: 59 64 00 6c sw (r11+108),r4
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
800e754: 59 63 00 54 sw (r11+84),r3
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
800e758: 59 64 00 50 sw (r11+80),r4
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
800e75c: 38 21 49 98 ori r1,r1,0x4998
800e760: 35 62 00 48 addi r2,r11,72
800e764: fb ff e6 cc calli 8008294 <_Watchdog_Insert>
800e768: e3 ff ff c8 bi 800e688 <_Event_Seize+0x80>
0800e7d4 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
800e7d4: 37 9c ff f8 addi sp,sp,-8
800e7d8: 5b 8b 00 08 sw (sp+8),r11
800e7dc: 5b 9d 00 04 sw (sp+4),ra
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
800e7e0: 28 25 01 24 lw r5,(r1+292)
option_set = (rtems_option) the_thread->Wait.option;
800e7e4: 28 28 00 30 lw r8,(r1+48)
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
800e7e8: b8 20 58 00 mv r11,r1
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
800e7ec: 90 00 08 00 rcsr r1,IE
800e7f0: 34 07 ff fe mvi r7,-2
800e7f4: a0 27 38 00 and r7,r1,r7
800e7f8: d0 07 00 00 wcsr IE,r7
pending_events = api->pending_events;
800e7fc: 28 a6 00 00 lw r6,(r5+0)
event_condition = (rtems_event_set) the_thread->Wait.count;
800e800: 29 64 00 24 lw r4,(r11+36)
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(
rtems_event_set the_event_set,
rtems_event_set the_event_condition
)
{
return ( the_event_set & the_event_condition );
800e804: a0 86 10 00 and r2,r4,r6
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
800e808: 44 40 00 29 be r2,r0,800e8ac <_Event_Surrender+0xd8>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
800e80c: 78 03 08 02 mvhi r3,0x802
800e810: 38 63 49 54 ori r3,r3,0x4954
800e814: 28 63 00 00 lw r3,(r3+0)
800e818: 44 60 00 05 be r3,r0,800e82c <_Event_Surrender+0x58>
800e81c: 78 03 08 02 mvhi r3,0x802
800e820: 38 63 49 78 ori r3,r3,0x4978
800e824: 28 63 00 00 lw r3,(r3+0)
800e828: 45 63 00 30 be r11,r3,800e8e8 <_Event_Surrender+0x114>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
800e82c: 29 63 00 10 lw r3,(r11+16)
800e830: 20 63 01 00 andi r3,r3,0x100
800e834: 44 60 00 19 be r3,r0,800e898 <_Event_Surrender+0xc4>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
800e838: 44 82 00 03 be r4,r2,800e844 <_Event_Surrender+0x70>
800e83c: 21 08 00 02 andi r8,r8,0x2
800e840: 45 00 00 16 be r8,r0,800e898 <_Event_Surrender+0xc4> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
800e844: a4 40 18 00 not r3,r2
800e848: a0 66 30 00 and r6,r3,r6
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800e84c: 29 64 00 28 lw r4,(r11+40)
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
800e850: 58 a6 00 00 sw (r5+0),r6
the_thread->Wait.count = 0;
800e854: 34 03 00 00 mvi r3,0
800e858: 59 63 00 24 sw (r11+36),r3
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800e85c: 58 82 00 00 sw (r4+0),r2
_ISR_Flash( level );
800e860: d0 01 00 00 wcsr IE,r1
800e864: d0 07 00 00 wcsr IE,r7
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
800e868: 29 63 00 50 lw r3,(r11+80)
800e86c: 34 02 00 02 mvi r2,2
800e870: 44 62 00 14 be r3,r2,800e8c0 <_Event_Surrender+0xec>
_ISR_Enable( level );
800e874: d0 01 00 00 wcsr IE,r1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
800e878: 78 02 10 03 mvhi r2,0x1003
800e87c: b9 60 08 00 mv r1,r11
800e880: 38 42 ff f8 ori r2,r2,0xfff8
800e884: f8 00 05 b9 calli 800ff68 <_Thread_Clear_state>
}
return;
}
}
_ISR_Enable( level );
}
800e888: 2b 9d 00 04 lw ra,(sp+4)
800e88c: 2b 8b 00 08 lw r11,(sp+8)
800e890: 37 9c 00 08 addi sp,sp,8
800e894: c3 a0 00 00 ret
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
800e898: d0 01 00 00 wcsr IE,r1
}
800e89c: 2b 9d 00 04 lw ra,(sp+4)
800e8a0: 2b 8b 00 08 lw r11,(sp+8)
800e8a4: 37 9c 00 08 addi sp,sp,8
800e8a8: c3 a0 00 00 ret
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
800e8ac: d0 01 00 00 wcsr IE,r1
}
return;
}
}
_ISR_Enable( level );
}
800e8b0: 2b 9d 00 04 lw ra,(sp+4)
800e8b4: 2b 8b 00 08 lw r11,(sp+8)
800e8b8: 37 9c 00 08 addi sp,sp,8
800e8bc: c3 a0 00 00 ret
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
800e8c0: 34 02 00 03 mvi r2,3
800e8c4: 59 62 00 50 sw (r11+80),r2
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
800e8c8: d0 01 00 00 wcsr IE,r1
(void) _Watchdog_Remove( &the_thread->Timer );
800e8cc: 35 61 00 48 addi r1,r11,72
800e8d0: fb ff e6 d8 calli 8008430 <_Watchdog_Remove>
800e8d4: 78 02 10 03 mvhi r2,0x1003
800e8d8: b9 60 08 00 mv r1,r11
800e8dc: 38 42 ff f8 ori r2,r2,0xfff8
800e8e0: f8 00 05 a2 calli 800ff68 <_Thread_Clear_state>
800e8e4: e3 ff ff ee bi 800e89c <_Event_Surrender+0xc8>
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
800e8e8: 78 03 08 02 mvhi r3,0x802
800e8ec: 38 63 4b b8 ori r3,r3,0x4bb8
800e8f0: 28 6a 00 00 lw r10,(r3+0)
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
800e8f4: 34 09 00 02 mvi r9,2
800e8f8: 45 49 00 04 be r10,r9,800e908 <_Event_Surrender+0x134> <== NEVER TAKEN
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
800e8fc: 28 6a 00 00 lw r10,(r3+0)
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
800e900: 34 09 00 01 mvi r9,1
800e904: 5d 49 ff ca bne r10,r9,800e82c <_Event_Surrender+0x58> <== NEVER TAKEN
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
800e908: 44 82 00 03 be r4,r2,800e914 <_Event_Surrender+0x140> <== ALWAYS TAKEN
800e90c: 21 08 00 02 andi r8,r8,0x2 <== NOT EXECUTED
800e910: 45 00 00 0a be r8,r0,800e938 <_Event_Surrender+0x164> <== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
800e914: a4 40 20 00 not r4,r2
800e918: a0 86 30 00 and r6,r4,r6
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800e91c: 29 64 00 28 lw r4,(r11+40)
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
800e920: 58 a6 00 00 sw (r5+0),r6
the_thread->Wait.count = 0;
800e924: 34 05 00 00 mvi r5,0
800e928: 59 65 00 24 sw (r11+36),r5
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800e92c: 58 82 00 00 sw (r4+0),r2
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
800e930: 34 02 00 03 mvi r2,3
800e934: 58 62 00 00 sw (r3+0),r2
}
_ISR_Enable( level );
800e938: d0 01 00 00 wcsr IE,r1
return;
800e93c: e3 ff ff d8 bi 800e89c <_Event_Surrender+0xc8>
0800e940 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
800e940: 37 9c ff f8 addi sp,sp,-8
800e944: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
800e948: 37 82 00 08 addi r2,sp,8
800e94c: fb ff e1 68 calli 8006eec <_Thread_Get>
switch ( location ) {
800e950: 2b 82 00 08 lw r2,(sp+8)
800e954: 44 40 00 04 be r2,r0,800e964 <_Event_Timeout+0x24> <== ALWAYS TAKEN
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
800e958: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800e95c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
800e960: c3 a0 00 00 ret <== NOT EXECUTED
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
800e964: 90 00 18 00 rcsr r3,IE
800e968: 34 02 ff fe mvi r2,-2
800e96c: a0 62 10 00 and r2,r3,r2
800e970: d0 02 00 00 wcsr IE,r2
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
800e974: 78 02 08 02 mvhi r2,0x802
800e978: 38 42 49 78 ori r2,r2,0x4978
800e97c: 28 42 00 00 lw r2,(r2+0)
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
800e980: 34 04 00 00 mvi r4,0
800e984: 58 24 00 24 sw (r1+36),r4
if ( _Thread_Is_executing( the_thread ) ) {
800e988: 44 22 00 0f be r1,r2,800e9c4 <_Event_Timeout+0x84>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
800e98c: 34 02 00 06 mvi r2,6
800e990: 58 22 00 34 sw (r1+52),r2
_ISR_Enable( level );
800e994: d0 03 00 00 wcsr IE,r3
800e998: 78 02 10 03 mvhi r2,0x1003
800e99c: 38 42 ff f8 ori r2,r2,0xfff8
800e9a0: f8 00 05 72 calli 800ff68 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
800e9a4: 78 01 08 02 mvhi r1,0x802
800e9a8: 38 21 48 bc ori r1,r1,0x48bc
800e9ac: 28 22 00 00 lw r2,(r1+0)
800e9b0: 34 42 ff ff addi r2,r2,-1
800e9b4: 58 22 00 00 sw (r1+0),r2
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
800e9b8: 2b 9d 00 04 lw ra,(sp+4)
800e9bc: 37 9c 00 08 addi sp,sp,8
800e9c0: c3 a0 00 00 ret
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
800e9c4: 78 02 08 02 mvhi r2,0x802
800e9c8: 38 42 4b b8 ori r2,r2,0x4bb8
800e9cc: 28 45 00 00 lw r5,(r2+0)
800e9d0: 34 04 00 01 mvi r4,1
800e9d4: 5c a4 ff ee bne r5,r4,800e98c <_Event_Timeout+0x4c>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
800e9d8: 34 04 00 02 mvi r4,2
800e9dc: 58 44 00 00 sw (r2+0),r4
800e9e0: e3 ff ff eb bi 800e98c <_Event_Timeout+0x4c>
08008de4 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
8008de4: 37 9c ff bc addi sp,sp,-68
8008de8: 5b 8b 00 44 sw (sp+68),r11
8008dec: 5b 8c 00 40 sw (sp+64),r12
8008df0: 5b 8d 00 3c sw (sp+60),r13
8008df4: 5b 8e 00 38 sw (sp+56),r14
8008df8: 5b 8f 00 34 sw (sp+52),r15
8008dfc: 5b 90 00 30 sw (sp+48),r16
8008e00: 5b 91 00 2c sw (sp+44),r17
8008e04: 5b 92 00 28 sw (sp+40),r18
8008e08: 5b 93 00 24 sw (sp+36),r19
8008e0c: 5b 94 00 20 sw (sp+32),r20
8008e10: 5b 95 00 1c sw (sp+28),r21
8008e14: 5b 96 00 18 sw (sp+24),r22
8008e18: 5b 97 00 14 sw (sp+20),r23
8008e1c: 5b 98 00 10 sw (sp+16),r24
8008e20: 5b 99 00 0c sw (sp+12),r25
8008e24: 5b 9b 00 08 sw (sp+8),fp
8008e28: 5b 9d 00 04 sw (sp+4),ra
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
8008e2c: 34 53 00 04 addi r19,r2,4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
8008e30: b8 40 68 00 mv r13,r2
8008e34: b8 20 78 00 mv r15,r1
8008e38: b8 60 88 00 mv r17,r3
8008e3c: b8 80 90 00 mv r18,r4
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
8008e40: 28 2b 00 08 lw r11,(r1+8)
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
8008e44: 28 35 00 10 lw r21,(r1+16)
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
8008e48: 54 53 00 6a bgu r2,r19,8008ff0 <_Heap_Allocate_aligned_with_boundary+0x20c>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
8008e4c: 5c 80 00 6b bne r4,r0,8008ff8 <_Heap_Allocate_aligned_with_boundary+0x214>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
8008e50: 34 10 00 00 mvi r16,0
8008e54: 45 eb 00 0d be r15,r11,8008e88 <_Heap_Allocate_aligned_with_boundary+0xa4>
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
8008e58: 34 1b 00 04 mvi fp,4
8008e5c: cb 6d d8 00 sub fp,fp,r13
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
8008e60: 34 19 ff fe mvi r25,-2
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
8008e64: 36 b8 00 07 addi r24,r21,7
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
8008e68: 29 61 00 04 lw r1,(r11+4)
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
8008e6c: 36 10 00 01 addi r16,r16,1
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
8008e70: 52 61 00 04 bgeu r19,r1,8008e80 <_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;
8008e74: 35 6c 00 08 addi r12,r11,8
if ( alignment == 0 ) {
8008e78: 5e 20 00 1b bne r17,r0,8008ee4 <_Heap_Allocate_aligned_with_boundary+0x100>
boundary
);
}
}
if ( alloc_begin != 0 ) {
8008e7c: 5d 80 00 53 bne r12,r0,8008fc8 <_Heap_Allocate_aligned_with_boundary+0x1e4><== ALWAYS TAKEN
break;
}
block = block->next;
8008e80: 29 6b 00 08 lw r11,(r11+8)
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
8008e84: 5d eb ff f9 bne r15,r11,8008e68 <_Heap_Allocate_aligned_with_boundary+0x84>
8008e88: 34 01 00 00 mvi r1,0
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
8008e8c: 29 e2 00 44 lw r2,(r15+68)
8008e90: 50 50 00 02 bgeu r2,r16,8008e98 <_Heap_Allocate_aligned_with_boundary+0xb4>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
8008e94: 59 f0 00 44 sw (r15+68),r16
}
return (void *) alloc_begin;
}
8008e98: 2b 9d 00 04 lw ra,(sp+4)
8008e9c: 2b 8b 00 44 lw r11,(sp+68)
8008ea0: 2b 8c 00 40 lw r12,(sp+64)
8008ea4: 2b 8d 00 3c lw r13,(sp+60)
8008ea8: 2b 8e 00 38 lw r14,(sp+56)
8008eac: 2b 8f 00 34 lw r15,(sp+52)
8008eb0: 2b 90 00 30 lw r16,(sp+48)
8008eb4: 2b 91 00 2c lw r17,(sp+44)
8008eb8: 2b 92 00 28 lw r18,(sp+40)
8008ebc: 2b 93 00 24 lw r19,(sp+36)
8008ec0: 2b 94 00 20 lw r20,(sp+32)
8008ec4: 2b 95 00 1c lw r21,(sp+28)
8008ec8: 2b 96 00 18 lw r22,(sp+24)
8008ecc: 2b 97 00 14 lw r23,(sp+20)
8008ed0: 2b 98 00 10 lw r24,(sp+16)
8008ed4: 2b 99 00 0c lw r25,(sp+12)
8008ed8: 2b 9b 00 08 lw fp,(sp+8)
8008edc: 37 9c 00 44 addi sp,sp,68
8008ee0: c3 a0 00 00 ret
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
8008ee4: a0 39 70 00 and r14,r1,r25
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
8008ee8: 29 f6 00 14 lw r22,(r15+20)
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
8008eec: b5 6e 70 00 add r14,r11,r14
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
8008ef0: b7 6e 60 00 add r12,fp,r14
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
8008ef4: cb 16 18 00 sub r3,r24,r22
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
8008ef8: b9 80 08 00 mv r1,r12
8008efc: ba 20 10 00 mv r2,r17
8008f00: b4 6e 70 00 add r14,r3,r14
8008f04: f8 00 43 cb calli 8019e30 <__umodsi3>
8008f08: c9 81 60 00 sub r12,r12,r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
8008f0c: 35 77 00 08 addi r23,r11,8
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
8008f10: 51 cc 00 05 bgeu r14,r12,8008f24 <_Heap_Allocate_aligned_with_boundary+0x140>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
8008f14: b9 c0 08 00 mv r1,r14
8008f18: ba 20 10 00 mv r2,r17
8008f1c: f8 00 43 c5 calli 8019e30 <__umodsi3>
8008f20: c9 c1 60 00 sub r12,r14,r1
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
8008f24: 46 40 00 1c be r18,r0,8008f94 <_Heap_Allocate_aligned_with_boundary+0x1b0>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
8008f28: b5 8d 70 00 add r14,r12,r13
8008f2c: b9 c0 08 00 mv r1,r14
8008f30: ba 40 10 00 mv r2,r18
8008f34: f8 00 43 bf calli 8019e30 <__umodsi3>
8008f38: c9 c1 28 00 sub r5,r14,r1
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
8008f3c: f5 c5 70 00 cmpgu r14,r14,r5
8008f40: f4 ac 08 00 cmpgu r1,r5,r12
8008f44: a1 c1 70 00 and r14,r14,r1
8008f48: 45 c0 00 13 be r14,r0,8008f94 <_Heap_Allocate_aligned_with_boundary+0x1b0>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
8008f4c: b6 ed a0 00 add r20,r23,r13
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
8008f50: 56 85 ff cc bgu r20,r5,8008e80 <_Heap_Allocate_aligned_with_boundary+0x9c>
8008f54: e0 00 00 02 bi 8008f5c <_Heap_Allocate_aligned_with_boundary+0x178>
8008f58: 56 85 ff ca bgu r20,r5,8008e80 <_Heap_Allocate_aligned_with_boundary+0x9c><== NEVER TAKEN
return 0;
}
alloc_begin = boundary_line - alloc_size;
8008f5c: c8 ad 60 00 sub r12,r5,r13
8008f60: ba 20 10 00 mv r2,r17
8008f64: b9 80 08 00 mv r1,r12
8008f68: f8 00 43 b2 calli 8019e30 <__umodsi3>
8008f6c: c9 81 60 00 sub r12,r12,r1
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
8008f70: b5 8d 70 00 add r14,r12,r13
8008f74: b9 c0 08 00 mv r1,r14
8008f78: ba 40 10 00 mv r2,r18
8008f7c: f8 00 43 ad calli 8019e30 <__umodsi3>
8008f80: c9 c1 28 00 sub r5,r14,r1
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
8008f84: f5 c5 70 00 cmpgu r14,r14,r5
8008f88: f4 ac 08 00 cmpgu r1,r5,r12
8008f8c: a1 c1 70 00 and r14,r14,r1
8008f90: 5d c0 ff f2 bne r14,r0,8008f58 <_Heap_Allocate_aligned_with_boundary+0x174>
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
8008f94: 56 ec ff bb bgu r23,r12,8008e80 <_Heap_Allocate_aligned_with_boundary+0x9c>
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
8008f98: 34 01 ff f8 mvi r1,-8
8008f9c: c8 2b 70 00 sub r14,r1,r11
8008fa0: ba a0 10 00 mv r2,r21
8008fa4: b9 80 08 00 mv r1,r12
8008fa8: b5 cc 70 00 add r14,r14,r12
8008fac: f8 00 43 a1 calli 8019e30 <__umodsi3>
8008fb0: c9 c1 08 00 sub r1,r14,r1
if ( free_size >= min_block_size || free_size == 0 ) {
8008fb4: f0 36 b0 00 cmpgeu r22,r1,r22
8008fb8: 64 21 00 00 cmpei r1,r1,0
8008fbc: b8 36 08 00 or r1,r1,r22
8008fc0: 44 20 ff b0 be r1,r0,8008e80 <_Heap_Allocate_aligned_with_boundary+0x9c>
boundary
);
}
}
if ( alloc_begin != 0 ) {
8008fc4: 45 80 ff af be r12,r0,8008e80 <_Heap_Allocate_aligned_with_boundary+0x9c><== NEVER TAKEN
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
8008fc8: 29 e1 00 4c lw r1,(r15+76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
8008fcc: b9 60 10 00 mv r2,r11
8008fd0: b9 a0 20 00 mv r4,r13
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
8008fd4: b4 30 08 00 add r1,r1,r16
8008fd8: 59 e1 00 4c sw (r15+76),r1
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
8008fdc: b9 80 18 00 mv r3,r12
8008fe0: b9 e0 08 00 mv r1,r15
8008fe4: fb ff e9 64 calli 8003574 <_Heap_Block_allocate>
8008fe8: b9 80 08 00 mv r1,r12
8008fec: e3 ff ff a8 bi 8008e8c <_Heap_Allocate_aligned_with_boundary+0xa8>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
8008ff0: 34 01 00 00 mvi r1,0
8008ff4: e3 ff ff a9 bi 8008e98 <_Heap_Allocate_aligned_with_boundary+0xb4>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
8008ff8: 54 44 ff fe bgu r2,r4,8008ff0 <_Heap_Allocate_aligned_with_boundary+0x20c>
return NULL;
}
if ( alignment == 0 ) {
8008ffc: 5c 60 ff 95 bne r3,r0,8008e50 <_Heap_Allocate_aligned_with_boundary+0x6c>
8009000: ba a0 88 00 mv r17,r21
8009004: e3 ff ff 93 bi 8008e50 <_Heap_Allocate_aligned_with_boundary+0x6c>
0800f0f0 <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
800f0f0: 37 9c ff e8 addi sp,sp,-24
800f0f4: 5b 8b 00 14 sw (sp+20),r11
800f0f8: 5b 8c 00 10 sw (sp+16),r12
800f0fc: 5b 8d 00 0c sw (sp+12),r13
800f100: 5b 8e 00 08 sw (sp+8),r14
800f104: 5b 9d 00 04 sw (sp+4),ra
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
800f108: 28 2c 00 18 lw r12,(r1+24)
uintptr_t const heap_area_end = heap->area_end;
800f10c: 28 25 00 1c lw r5,(r1+28)
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
800f110: b8 20 58 00 mv r11,r1
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
800f114: f0 4c 60 00 cmpgeu r12,r2,r12
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
800f118: f4 a2 08 00 cmpgu r1,r5,r2
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
uintptr_t extend_size = 0;
Heap_Block *const last_block = heap->last_block;
800f11c: 29 6d 00 24 lw r13,(r11+36)
uintptr_t *amount_extended
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
800f120: a0 2c 60 00 and r12,r1,r12
800f124: 34 01 00 01 mvi r1,1
800f128: 5d 80 00 03 bne r12,r0,800f134 <_Heap_Extend+0x44>
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
return HEAP_EXTEND_ERROR; /* case 3 */
} else if ( area_begin != heap_area_end ) {
800f12c: 34 01 00 02 mvi r1,2
800f130: 44 45 00 08 be r2,r5,800f150 <_Heap_Extend+0x60>
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
800f134: 2b 9d 00 04 lw ra,(sp+4)
800f138: 2b 8b 00 14 lw r11,(sp+20)
800f13c: 2b 8c 00 10 lw r12,(sp+16)
800f140: 2b 8d 00 0c lw r13,(sp+12)
800f144: 2b 8e 00 08 lw r14,(sp+8)
800f148: 37 9c 00 18 addi sp,sp,24
800f14c: c3 a0 00 00 ret
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
800f150: b4 43 18 00 add r3,r2,r3
* block and free it.
*/
heap->area_end = new_heap_area_end;
extend_size = new_heap_area_end
800f154: c8 6d 70 00 sub r14,r3,r13
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
800f158: 29 62 00 10 lw r2,(r11+16)
800f15c: 35 ce ff f8 addi r14,r14,-8
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
heap->area_end = new_heap_area_end;
800f160: 59 63 00 1c sw (r11+28),r3
800f164: b9 c0 08 00 mv r1,r14
800f168: 5b 84 00 18 sw (sp+24),r4
800f16c: fb ff d4 f2 calli 8004534 <__umodsi3>
extend_size = new_heap_area_end
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
800f170: 2b 84 00 18 lw r4,(sp+24)
800f174: c9 c1 08 00 sub r1,r14,r1
800f178: 58 81 00 00 sw (r4+0),r1
if( extend_size >= heap->min_block_size ) {
800f17c: 29 62 00 14 lw r2,(r11+20)
800f180: 50 22 00 09 bgeu r1,r2,800f1a4 <_Heap_Extend+0xb4> <== ALWAYS TAKEN
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
800f184: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
}
return HEAP_EXTEND_SUCCESSFUL;
}
800f188: 2b 9d 00 04 lw ra,(sp+4)
800f18c: 2b 8b 00 14 lw r11,(sp+20)
800f190: 2b 8c 00 10 lw r12,(sp+16)
800f194: 2b 8d 00 0c lw r13,(sp+12)
800f198: 2b 8e 00 08 lw r14,(sp+8)
800f19c: 37 9c 00 18 addi sp,sp,24
800f1a0: c3 a0 00 00 ret
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
800f1a4: 29 a4 00 04 lw r4,(r13+4)
if( extend_size >= heap->min_block_size ) {
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
800f1a8: 29 63 00 20 lw r3,(r11+32)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
800f1ac: b4 2d 10 00 add r2,r1,r13
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
800f1b0: 20 84 00 01 andi r4,r4,0x1
800f1b4: b8 24 20 00 or r4,r1,r4
800f1b8: c8 62 18 00 sub r3,r3,r2
800f1bc: 59 a4 00 04 sw (r13+4),r4
800f1c0: 38 63 00 01 ori r3,r3,0x1
800f1c4: 58 43 00 04 sw (r2+4),r3
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
800f1c8: 29 65 00 2c lw r5,(r11+44)
++stats->used_blocks;
800f1cc: 29 64 00 40 lw r4,(r11+64)
--stats->frees; /* Do not count subsequent call as actual free() */
800f1d0: 29 63 00 50 lw r3,(r11+80)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
800f1d4: b4 a1 08 00 add r1,r5,r1
++stats->used_blocks;
800f1d8: 34 84 00 01 addi r4,r4,1
--stats->frees; /* Do not count subsequent call as actual free() */
800f1dc: 34 63 ff ff addi r3,r3,-1
new_last_block->size_and_flag =
((uintptr_t) heap->first_block - (uintptr_t) new_last_block)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
800f1e0: 59 62 00 24 sw (r11+36),r2
/* Statistics */
stats->size += extend_size;
800f1e4: 59 61 00 2c sw (r11+44),r1
++stats->used_blocks;
800f1e8: 59 64 00 40 sw (r11+64),r4
--stats->frees; /* Do not count subsequent call as actual free() */
800f1ec: 59 63 00 50 sw (r11+80),r3
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
800f1f0: b9 60 08 00 mv r1,r11
800f1f4: 35 a2 00 08 addi r2,r13,8
800f1f8: fb ff e5 b2 calli 80088c0 <_Heap_Free>
800f1fc: b9 80 08 00 mv r1,r12
800f200: e3 ff ff e2 bi 800f188 <_Heap_Extend+0x98>
08009008 <_Heap_Free>:
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
8009008: 37 9c ff f4 addi sp,sp,-12
800900c: 5b 8b 00 0c sw (sp+12),r11
8009010: 5b 8c 00 08 sw (sp+8),r12
8009014: 5b 9d 00 04 sw (sp+4),ra
8009018: b8 40 18 00 mv r3,r2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
800901c: 28 22 00 10 lw r2,(r1+16)
8009020: b8 20 58 00 mv r11,r1
8009024: b8 60 08 00 mv r1,r3
8009028: 34 6c ff f8 addi r12,r3,-8
800902c: f8 00 43 81 calli 8019e30 <__umodsi3>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
8009030: 29 64 00 20 lw r4,(r11+32)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
8009034: c9 81 08 00 sub r1,r12,r1
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
8009038: 54 81 00 2b bgu r4,r1,80090e4 <_Heap_Free+0xdc>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
800903c: 29 63 00 24 lw r3,(r11+36)
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
8009040: 54 23 00 29 bgu r1,r3,80090e4 <_Heap_Free+0xdc>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
8009044: 28 28 00 04 lw r8,(r1+4)
8009048: 34 06 ff fe mvi r6,-2
800904c: a1 06 28 00 and r5,r8,r6
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
8009050: b4 25 10 00 add r2,r1,r5
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
8009054: 54 82 00 24 bgu r4,r2,80090e4 <_Heap_Free+0xdc> <== NEVER TAKEN
8009058: 54 43 00 23 bgu r2,r3,80090e4 <_Heap_Free+0xdc> <== NEVER TAKEN
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
800905c: 28 47 00 04 lw r7,(r2+4)
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
8009060: 20 e9 00 01 andi r9,r7,0x1
8009064: 45 20 00 20 be r9,r0,80090e4 <_Heap_Free+0xdc> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
8009068: a0 e6 38 00 and r7,r7,r6
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
800906c: 34 06 00 00 mvi r6,0
8009070: 44 62 00 05 be r3,r2,8009084 <_Heap_Free+0x7c>
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
8009074: b4 47 30 00 add r6,r2,r7
8009078: 28 c6 00 04 lw r6,(r6+4)
800907c: 20 c6 00 01 andi r6,r6,0x1
8009080: 18 c6 00 01 xori r6,r6,0x1
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
8009084: 21 08 00 01 andi r8,r8,0x1
8009088: 5d 00 00 1d bne r8,r0,80090fc <_Heap_Free+0xf4>
uintptr_t const prev_size = block->prev_size;
800908c: 28 28 00 00 lw r8,(r1+0)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
8009090: c8 28 08 00 sub r1,r1,r8
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
8009094: 54 81 00 14 bgu r4,r1,80090e4 <_Heap_Free+0xdc> <== NEVER TAKEN
8009098: 54 23 00 13 bgu r1,r3,80090e4 <_Heap_Free+0xdc> <== NEVER TAKEN
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
800909c: 28 23 00 04 lw r3,(r1+4)
80090a0: 20 63 00 01 andi r3,r3,0x1
80090a4: 44 60 00 10 be r3,r0,80090e4 <_Heap_Free+0xdc> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
80090a8: 44 c0 00 43 be r6,r0,80091b4 <_Heap_Free+0x1ac>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
80090ac: 29 64 00 38 lw r4,(r11+56)
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
80090b0: 28 43 00 0c lw r3,(r2+12)
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
80090b4: b4 a7 38 00 add r7,r5,r7
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
80090b8: 28 42 00 08 lw r2,(r2+8)
80090bc: b4 e8 40 00 add r8,r7,r8
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
80090c0: 34 84 ff ff addi r4,r4,-1
80090c4: 59 64 00 38 sw (r11+56),r4
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
80090c8: b4 28 30 00 add r6,r1,r8
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
80090cc: 39 04 00 01 ori r4,r8,0x1
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
80090d0: 58 43 00 0c sw (r2+12),r3
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
80090d4: 58 c8 00 00 sw (r6+0),r8
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
80090d8: 58 24 00 04 sw (r1+4),r4
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
80090dc: 58 62 00 08 sw (r3+8),r2
80090e0: e0 00 00 13 bi 800912c <_Heap_Free+0x124>
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
80090e4: 34 01 00 00 mvi r1,0
}
80090e8: 2b 9d 00 04 lw ra,(sp+4)
80090ec: 2b 8b 00 0c lw r11,(sp+12)
80090f0: 2b 8c 00 08 lw r12,(sp+8)
80090f4: 37 9c 00 0c addi sp,sp,12
80090f8: c3 a0 00 00 ret
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
80090fc: 44 c0 00 1b be r6,r0,8009168 <_Heap_Free+0x160>
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
8009100: 28 43 00 0c lw r3,(r2+12)
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
8009104: 28 42 00 08 lw r2,(r2+8)
uintptr_t const size = block_size + next_block_size;
8009108: b4 e5 38 00 add r7,r7,r5
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
800910c: 58 23 00 0c sw (r1+12),r3
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
8009110: 58 22 00 08 sw (r1+8),r2
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
8009114: b4 27 30 00 add r6,r1,r7
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
8009118: 38 e4 00 01 ori r4,r7,0x1
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
800911c: 58 c7 00 00 sw (r6+0),r7
new_block->prev = prev;
next->prev = new_block;
8009120: 58 41 00 0c sw (r2+12),r1
prev->next = new_block;
8009124: 58 61 00 08 sw (r3+8),r1
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
8009128: 58 24 00 04 sw (r1+4),r4
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
800912c: 29 61 00 50 lw r1,(r11+80)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
8009130: 29 62 00 40 lw r2,(r11+64)
++stats->frees;
stats->free_size += block_size;
8009134: 29 63 00 30 lw r3,(r11+48)
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
8009138: 34 21 00 01 addi r1,r1,1
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
800913c: 34 42 ff ff addi r2,r2,-1
++stats->frees;
stats->free_size += block_size;
8009140: b4 65 28 00 add r5,r3,r5
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
8009144: 59 61 00 50 sw (r11+80),r1
stats->free_size += block_size;
8009148: 34 01 00 01 mvi r1,1
800914c: 59 65 00 30 sw (r11+48),r5
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
8009150: 59 62 00 40 sw (r11+64),r2
++stats->frees;
stats->free_size += block_size;
return( true );
}
8009154: 2b 9d 00 04 lw ra,(sp+4)
8009158: 2b 8b 00 0c lw r11,(sp+12)
800915c: 2b 8c 00 08 lw r12,(sp+8)
8009160: 37 9c 00 0c addi sp,sp,12
8009164: c3 a0 00 00 ret
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
8009168: 38 a3 00 01 ori r3,r5,0x1
800916c: 58 23 00 04 sw (r1+4),r3
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
8009170: 28 44 00 04 lw r4,(r2+4)
8009174: 34 03 ff fe mvi r3,-2
next_block->prev_size = block_size;
8009178: 58 45 00 00 sw (r2+0),r5
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
800917c: a0 83 18 00 and r3,r4,r3
8009180: 58 43 00 04 sw (r2+4),r3
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
8009184: 29 62 00 38 lw r2,(r11+56)
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
8009188: 29 63 00 08 lw r3,(r11+8)
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
800918c: 29 64 00 3c lw r4,(r11+60)
new_block->next = next;
new_block->prev = block_before;
8009190: 58 2b 00 0c sw (r1+12),r11
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
8009194: 58 23 00 08 sw (r1+8),r3
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
8009198: 34 42 00 01 addi r2,r2,1
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
800919c: 58 61 00 0c sw (r3+12),r1
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
80091a0: 59 61 00 08 sw (r11+8),r1
80091a4: 59 62 00 38 sw (r11+56),r2
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
80091a8: 50 82 ff e1 bgeu r4,r2,800912c <_Heap_Free+0x124>
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
80091ac: 59 62 00 3c sw (r11+60),r2
80091b0: e3 ff ff df bi 800912c <_Heap_Free+0x124>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
80091b4: b4 a8 40 00 add r8,r5,r8
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
80091b8: 39 03 00 01 ori r3,r8,0x1
80091bc: 58 23 00 04 sw (r1+4),r3
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
80091c0: 28 43 00 04 lw r3,(r2+4)
80091c4: 34 01 ff fe mvi r1,-2
next_block->prev_size = size;
80091c8: 58 48 00 00 sw (r2+0),r8
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
80091cc: a0 61 08 00 and r1,r3,r1
80091d0: 58 41 00 04 sw (r2+4),r1
80091d4: e3 ff ff d6 bi 800912c <_Heap_Free+0x124>
0800f204 <_Heap_Get_free_information>:
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
800f204: 28 23 00 08 lw r3,(r1+8)
)
{
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
800f208: 34 05 00 00 mvi r5,0
800f20c: 58 45 00 00 sw (r2+0),r5
info->largest = 0;
800f210: 58 45 00 04 sw (r2+4),r5
info->total = 0;
800f214: 58 45 00 08 sw (r2+8),r5
for(the_block = _Heap_Free_list_first(the_heap);
800f218: 44 23 00 10 be r1,r3,800f258 <_Heap_Get_free_information+0x54><== NEVER TAKEN
800f21c: 34 06 00 01 mvi r6,1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
800f220: 34 08 ff fe mvi r8,-2
800f224: e0 00 00 02 bi 800f22c <_Heap_Get_free_information+0x28>
800f228: b8 e0 30 00 mv r6,r7
800f22c: 28 64 00 04 lw r4,(r3+4)
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
if ( info->largest < the_size )
800f230: 28 49 00 04 lw r9,(r2+4)
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
800f234: 34 c7 00 01 addi r7,r6,1
800f238: a0 88 20 00 and r4,r4,r8
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
800f23c: b4 a4 28 00 add r5,r5,r4
if ( info->largest < the_size )
800f240: 51 24 00 02 bgeu r9,r4,800f248 <_Heap_Get_free_information+0x44>
info->largest = the_size;
800f244: 58 44 00 04 sw (r2+4),r4
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
800f248: 28 63 00 08 lw r3,(r3+8)
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
800f24c: 5c 23 ff f7 bne r1,r3,800f228 <_Heap_Get_free_information+0x24>
800f250: 58 45 00 08 sw (r2+8),r5
800f254: 58 46 00 00 sw (r2+0),r6
800f258: c3 a0 00 00 ret
0800f25c <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
800f25c: 37 9c ff f8 addi sp,sp,-8
800f260: 5b 8b 00 08 sw (sp+8),r11
800f264: 5b 8c 00 04 sw (sp+4),r12
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
800f268: 28 29 00 24 lw r9,(r1+36)
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->first_block;
800f26c: 28 26 00 20 lw r6,(r1+32)
Heap_Block *const end = the_heap->last_block;
_HAssert(the_block->prev_size == the_heap->page_size);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
800f270: 34 01 00 00 mvi r1,0
the_info->Free.total = 0;
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
800f274: 58 41 00 10 sw (r2+16),r1
Heap_Block *const end = the_heap->last_block;
_HAssert(the_block->prev_size == the_heap->page_size);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
800f278: 58 41 00 00 sw (r2+0),r1
the_info->Free.total = 0;
800f27c: 58 41 00 08 sw (r2+8),r1
the_info->Free.largest = 0;
800f280: 58 41 00 04 sw (r2+4),r1
the_info->Used.number = 0;
800f284: 58 41 00 0c sw (r2+12),r1
the_info->Used.total = 0;
800f288: 58 41 00 14 sw (r2+20),r1
the_info->Used.largest = 0;
while ( the_block != end ) {
800f28c: 34 01 00 08 mvi r1,8
800f290: 44 c9 00 18 be r6,r9,800f2f0 <_Heap_Get_information+0x94> <== NEVER TAKEN
800f294: 28 c5 00 04 lw r5,(r6+4)
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
800f298: 34 4b 00 0c addi r11,r2,12
800f29c: 34 0a ff fe mvi r10,-2
800f2a0: a0 aa 18 00 and r3,r5,r10
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
800f2a4: b4 c3 20 00 add r4,r6,r3
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
800f2a8: 28 85 00 04 lw r5,(r4+4)
while ( the_block != end ) {
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
800f2ac: b9 60 08 00 mv r1,r11
info = &the_info->Free;
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
800f2b0: b8 80 30 00 mv r6,r4
while ( the_block != end ) {
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
800f2b4: 20 a7 00 01 andi r7,r5,0x1
800f2b8: 5c e0 00 02 bne r7,r0,800f2c0 <_Heap_Get_information+0x64>
800f2bc: b8 40 08 00 mv r1,r2
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
800f2c0: 28 28 00 00 lw r8,(r1+0)
info->total += the_size;
800f2c4: 28 27 00 08 lw r7,(r1+8)
if ( info->largest < the_size )
800f2c8: 28 2c 00 04 lw r12,(r1+4)
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
800f2cc: 35 08 00 01 addi r8,r8,1
info->total += the_size;
800f2d0: b4 e3 38 00 add r7,r7,r3
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
800f2d4: 58 28 00 00 sw (r1+0),r8
info->total += the_size;
800f2d8: 58 27 00 08 sw (r1+8),r7
if ( info->largest < the_size )
800f2dc: 51 83 00 02 bgeu r12,r3,800f2e4 <_Heap_Get_information+0x88>
info->largest = the_size;
800f2e0: 58 23 00 04 sw (r1+4),r3
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
800f2e4: 5d 24 ff ef bne r9,r4,800f2a0 <_Heap_Get_information+0x44>
800f2e8: 28 41 00 14 lw r1,(r2+20)
800f2ec: 34 21 00 08 addi r1,r1,8
/*
* Handle the last dummy block. Don't consider this block to be
* "used" as client never allocated it. Make 'Used.total' contain this
* blocks' overhead though.
*/
the_info->Used.total += HEAP_BLOCK_HEADER_SIZE;
800f2f0: 58 41 00 14 sw (r2+20),r1
}
800f2f4: 2b 8b 00 08 lw r11,(sp+8)
800f2f8: 2b 8c 00 04 lw r12,(sp+4)
800f2fc: 37 9c 00 08 addi sp,sp,8
800f300: c3 a0 00 00 ret
0801aa58 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
801aa58: 37 9c ff f0 addi sp,sp,-16
801aa5c: 5b 8b 00 10 sw (sp+16),r11
801aa60: 5b 8c 00 0c sw (sp+12),r12
801aa64: 5b 8d 00 08 sw (sp+8),r13
801aa68: 5b 9d 00 04 sw (sp+4),ra
801aa6c: b8 40 60 00 mv r12,r2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
801aa70: 28 22 00 10 lw r2,(r1+16)
801aa74: b8 20 58 00 mv r11,r1
801aa78: b9 80 08 00 mv r1,r12
801aa7c: b8 60 68 00 mv r13,r3
801aa80: fb ff fc ec calli 8019e30 <__umodsi3>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
801aa84: 29 62 00 20 lw r2,(r11+32)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
801aa88: 35 84 ff f8 addi r4,r12,-8
801aa8c: c8 81 20 00 sub r4,r4,r1
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
801aa90: 54 44 00 16 bgu r2,r4,801aae8 <_Heap_Size_of_alloc_area+0x90>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
801aa94: 29 61 00 24 lw r1,(r11+36)
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
801aa98: 54 81 00 14 bgu r4,r1,801aae8 <_Heap_Size_of_alloc_area+0x90><== NEVER TAKEN
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
801aa9c: 28 85 00 04 lw r5,(r4+4)
801aaa0: 34 03 ff fe mvi r3,-2
801aaa4: a0 a3 18 00 and r3,r5,r3
801aaa8: b4 83 20 00 add r4,r4,r3
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
801aaac: 54 44 00 0f bgu r2,r4,801aae8 <_Heap_Size_of_alloc_area+0x90><== NEVER TAKEN
801aab0: 54 81 00 0e bgu r4,r1,801aae8 <_Heap_Size_of_alloc_area+0x90><== NEVER TAKEN
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
801aab4: 28 81 00 04 lw r1,(r4+4)
801aab8: 20 21 00 01 andi r1,r1,0x1
801aabc: 44 20 00 0b be r1,r0,801aae8 <_Heap_Size_of_alloc_area+0x90><== NEVER TAKEN
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
801aac0: c8 8c 20 00 sub r4,r4,r12
801aac4: 34 84 00 04 addi r4,r4,4
801aac8: 34 01 00 01 mvi r1,1
801aacc: 59 a4 00 00 sw (r13+0),r4
return true;
}
801aad0: 2b 9d 00 04 lw ra,(sp+4)
801aad4: 2b 8b 00 10 lw r11,(sp+16)
801aad8: 2b 8c 00 0c lw r12,(sp+12)
801aadc: 2b 8d 00 08 lw r13,(sp+8)
801aae0: 37 9c 00 10 addi sp,sp,16
801aae4: c3 a0 00 00 ret
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
return true;
801aae8: 34 01 00 00 mvi r1,0
}
801aaec: 2b 9d 00 04 lw ra,(sp+4)
801aaf0: 2b 8b 00 10 lw r11,(sp+16)
801aaf4: 2b 8c 00 0c lw r12,(sp+12)
801aaf8: 2b 8d 00 08 lw r13,(sp+8)
801aafc: 37 9c 00 10 addi sp,sp,16
801ab00: c3 a0 00 00 ret
08003ec4 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
8003ec4: 37 9c ff a8 addi sp,sp,-88
8003ec8: 5b 8b 00 50 sw (sp+80),r11
8003ecc: 5b 8c 00 4c sw (sp+76),r12
8003ed0: 5b 8d 00 48 sw (sp+72),r13
8003ed4: 5b 8e 00 44 sw (sp+68),r14
8003ed8: 5b 8f 00 40 sw (sp+64),r15
8003edc: 5b 90 00 3c sw (sp+60),r16
8003ee0: 5b 91 00 38 sw (sp+56),r17
8003ee4: 5b 92 00 34 sw (sp+52),r18
8003ee8: 5b 93 00 30 sw (sp+48),r19
8003eec: 5b 94 00 2c sw (sp+44),r20
8003ef0: 5b 95 00 28 sw (sp+40),r21
8003ef4: 5b 96 00 24 sw (sp+36),r22
8003ef8: 5b 97 00 20 sw (sp+32),r23
8003efc: 5b 98 00 1c sw (sp+28),r24
8003f00: 5b 99 00 18 sw (sp+24),r25
8003f04: 5b 9b 00 14 sw (sp+20),fp
8003f08: 5b 9d 00 10 sw (sp+16),ra
8003f0c: 20 63 00 ff andi r3,r3,0xff
8003f10: b8 20 58 00 mv r11,r1
8003f14: b8 40 80 00 mv r16,r2
uintptr_t const page_size = heap->page_size;
8003f18: 28 32 00 10 lw r18,(r1+16)
uintptr_t const min_block_size = heap->min_block_size;
8003f1c: 28 33 00 14 lw r19,(r1+20)
Heap_Block *const last_block = heap->last_block;
8003f20: 28 34 00 24 lw r20,(r1+36)
Heap_Block *block = heap->first_block;
8003f24: 28 2c 00 20 lw r12,(r1+32)
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
8003f28: 5c 60 00 1c bne r3,r0,8003f98 <_Heap_Walk+0xd4>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
8003f2c: 78 03 08 01 mvhi r3,0x801
8003f30: 38 63 fa 10 ori r3,r3,0xfa10
8003f34: 28 63 00 00 lw r3,(r3+0)
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
8003f38: 78 0f 08 00 mvhi r15,0x800
if ( !_System_state_Is_up( _System_state_Get() ) ) {
8003f3c: 34 02 00 03 mvi r2,3
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
8003f40: 39 ef 3e a0 ori r15,r15,0x3ea0
if ( !_System_state_Is_up( _System_state_Get() ) ) {
8003f44: 44 62 00 1c be r3,r2,8003fb4 <_Heap_Walk+0xf0>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
8003f48: 34 01 00 01 mvi r1,1
block = next_block;
}
return true;
}
8003f4c: 2b 9d 00 10 lw ra,(sp+16)
8003f50: 2b 8b 00 50 lw r11,(sp+80)
8003f54: 2b 8c 00 4c lw r12,(sp+76)
8003f58: 2b 8d 00 48 lw r13,(sp+72)
8003f5c: 2b 8e 00 44 lw r14,(sp+68)
8003f60: 2b 8f 00 40 lw r15,(sp+64)
8003f64: 2b 90 00 3c lw r16,(sp+60)
8003f68: 2b 91 00 38 lw r17,(sp+56)
8003f6c: 2b 92 00 34 lw r18,(sp+52)
8003f70: 2b 93 00 30 lw r19,(sp+48)
8003f74: 2b 94 00 2c lw r20,(sp+44)
8003f78: 2b 95 00 28 lw r21,(sp+40)
8003f7c: 2b 96 00 24 lw r22,(sp+36)
8003f80: 2b 97 00 20 lw r23,(sp+32)
8003f84: 2b 98 00 1c lw r24,(sp+28)
8003f88: 2b 99 00 18 lw r25,(sp+24)
8003f8c: 2b 9b 00 14 lw fp,(sp+20)
8003f90: 37 9c 00 58 addi sp,sp,88
8003f94: c3 a0 00 00 ret
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
8003f98: 78 03 08 01 mvhi r3,0x801
8003f9c: 38 63 fa 10 ori r3,r3,0xfa10
8003fa0: 28 63 00 00 lw r3,(r3+0)
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
8003fa4: 78 0f 08 00 mvhi r15,0x800
if ( !_System_state_Is_up( _System_state_Get() ) ) {
8003fa8: 34 02 00 03 mvi r2,3
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
8003fac: 39 ef 44 b0 ori r15,r15,0x44b0
if ( !_System_state_Is_up( _System_state_Get() ) ) {
8003fb0: 5c 62 ff e6 bne r3,r2,8003f48 <_Heap_Walk+0x84> <== NEVER TAKEN
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
8003fb4: 29 61 00 08 lw r1,(r11+8)
8003fb8: 29 66 00 18 lw r6,(r11+24)
8003fbc: 29 67 00 1c lw r7,(r11+28)
8003fc0: 5b 81 00 08 sw (sp+8),r1
8003fc4: 29 61 00 0c lw r1,(r11+12)
8003fc8: 78 03 08 01 mvhi r3,0x801
8003fcc: 5b 94 00 04 sw (sp+4),r20
8003fd0: 5b 81 00 0c sw (sp+12),r1
8003fd4: 38 63 c3 54 ori r3,r3,0xc354
8003fd8: ba 00 08 00 mv r1,r16
8003fdc: 34 02 00 00 mvi r2,0
8003fe0: ba 40 20 00 mv r4,r18
8003fe4: ba 60 28 00 mv r5,r19
8003fe8: b9 80 40 00 mv r8,r12
8003fec: d9 e0 00 00 call r15
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
8003ff0: 46 40 00 d1 be r18,r0,8004334 <_Heap_Walk+0x470> <== NEVER TAKEN
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
8003ff4: 22 4d 00 07 andi r13,r18,0x7
8003ff8: 5d a0 00 d6 bne r13,r0,8004350 <_Heap_Walk+0x48c> <== NEVER TAKEN
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
8003ffc: ba 60 08 00 mv r1,r19
8004000: ba 40 10 00 mv r2,r18
8004004: fb ff f3 27 calli 8000ca0 <__umodsi3>
8004008: b8 20 88 00 mv r17,r1
800400c: 5c 2d 00 d9 bne r1,r13,8004370 <_Heap_Walk+0x4ac>
);
return false;
}
if (
8004010: 35 81 00 08 addi r1,r12,8
8004014: ba 40 10 00 mv r2,r18
8004018: fb ff f3 22 calli 8000ca0 <__umodsi3>
800401c: b8 20 70 00 mv r14,r1
8004020: 5c 31 00 ee bne r1,r17,80043d8 <_Heap_Walk+0x514>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
8004024: 29 8d 00 04 lw r13,(r12+4)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
8004028: 21 b1 00 01 andi r17,r13,0x1
800402c: 46 21 00 f3 be r17,r1,80043f8 <_Heap_Walk+0x534>
);
return false;
}
if ( first_block->prev_size != page_size ) {
8004030: 29 84 00 00 lw r4,(r12+0)
8004034: 5e 44 00 60 bne r18,r4,80041b4 <_Heap_Walk+0x2f0>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
8004038: 2a 82 00 04 lw r2,(r20+4)
800403c: 34 01 ff fe mvi r1,-2
8004040: a0 41 08 00 and r1,r2,r1
8004044: b6 81 08 00 add r1,r20,r1
8004048: 28 35 00 04 lw r21,(r1+4)
800404c: 22 b5 00 01 andi r21,r21,0x1
8004050: 46 ae 00 f1 be r21,r14,8004414 <_Heap_Walk+0x550>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
8004054: 29 6e 00 08 lw r14,(r11+8)
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
8004058: 29 78 00 10 lw r24,(r11+16)
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
800405c: 45 6e 00 24 be r11,r14,80040ec <_Heap_Walk+0x228>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
8004060: 29 76 00 20 lw r22,(r11+32)
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
8004064: 56 ce 00 fb bgu r22,r14,8004450 <_Heap_Walk+0x58c> <== NEVER TAKEN
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
8004068: 29 79 00 24 lw r25,(r11+36)
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
800406c: 55 d9 00 f9 bgu r14,r25,8004450 <_Heap_Walk+0x58c> <== NEVER TAKEN
);
return false;
}
if (
8004070: 35 c1 00 08 addi r1,r14,8
8004074: bb 00 10 00 mv r2,r24
8004078: fb ff f3 0a calli 8000ca0 <__umodsi3>
800407c: 5c 20 00 ed bne r1,r0,8004430 <_Heap_Walk+0x56c> <== NEVER TAKEN
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
8004080: 29 c2 00 04 lw r2,(r14+4)
8004084: 34 17 ff fe mvi r23,-2
8004088: a0 57 10 00 and r2,r2,r23
800408c: b5 c2 10 00 add r2,r14,r2
8004090: 28 42 00 04 lw r2,(r2+4)
8004094: 20 42 00 01 andi r2,r2,0x1
8004098: 5c 41 00 fe bne r2,r1,8004490 <_Heap_Walk+0x5cc> <== NEVER TAKEN
);
return false;
}
if ( free_block->prev != prev_block ) {
800409c: 29 c5 00 0c lw r5,(r14+12)
80040a0: 45 65 00 10 be r11,r5,80040e0 <_Heap_Walk+0x21c> <== ALWAYS TAKEN
80040a4: e0 00 00 f3 bi 8004470 <_Heap_Walk+0x5ac> <== NOT EXECUTED
80040a8: 56 ce 00 ea bgu r22,r14,8004450 <_Heap_Walk+0x58c>
);
return false;
}
if (
80040ac: 35 c1 00 08 addi r1,r14,8
80040b0: bb 00 10 00 mv r2,r24
80040b4: 55 d9 00 e7 bgu r14,r25,8004450 <_Heap_Walk+0x58c> <== NEVER TAKEN
80040b8: fb ff f2 fa calli 8000ca0 <__umodsi3>
80040bc: 5c 20 00 dd bne r1,r0,8004430 <_Heap_Walk+0x56c>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
80040c0: 29 c3 00 04 lw r3,(r14+4)
80040c4: a0 77 18 00 and r3,r3,r23
80040c8: b4 6e 18 00 add r3,r3,r14
80040cc: 28 63 00 04 lw r3,(r3+4)
80040d0: 20 63 00 01 andi r3,r3,0x1
80040d4: 5c 61 00 ef bne r3,r1,8004490 <_Heap_Walk+0x5cc>
);
return false;
}
if ( free_block->prev != prev_block ) {
80040d8: 29 c5 00 0c lw r5,(r14+12)
80040dc: 5c b5 00 e5 bne r5,r21,8004470 <_Heap_Walk+0x5ac>
(*printer)(
80040e0: b9 c0 a8 00 mv r21,r14
return false;
}
prev_block = free_block;
free_block = free_block->next;
80040e4: 29 ce 00 08 lw r14,(r14+8)
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
80040e8: 5d 6e ff f0 bne r11,r14,80040a8 <_Heap_Walk+0x1e4>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
80040ec: 46 8c ff 97 be r20,r12,8003f48 <_Heap_Walk+0x84> <== NEVER TAKEN
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
80040f0: 78 01 08 01 mvhi r1,0x801
80040f4: 5b 81 00 54 sw (sp+84),r1
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
80040f8: 78 01 08 01 mvhi r1,0x801
80040fc: 5b 81 00 58 sw (sp+88),r1
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
8004100: 2b 81 00 54 lw r1,(sp+84)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
8004104: 34 16 ff fe mvi r22,-2
8004108: 78 15 08 01 mvhi r21,0x801
800410c: 38 21 c6 ac ori r1,r1,0xc6ac
8004110: 5b 81 00 54 sw (sp+84),r1
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
8004114: 2b 81 00 58 lw r1,(sp+88)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
8004118: 78 18 08 01 mvhi r24,0x801
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
800411c: 78 17 08 01 mvhi r23,0x801
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
8004120: 38 21 c6 94 ori r1,r1,0xc694
- 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;
8004124: a1 b6 68 00 and r13,r13,r22
8004128: 5b 81 00 58 sw (sp+88),r1
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
800412c: ba 20 10 00 mv r2,r17
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
8004130: 3a b5 c7 1c ori r21,r21,0xc71c
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)(
8004134: 3b 18 c6 a0 ori r24,r24,0xc6a0
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
8004138: 3a f7 c6 88 ori r23,r23,0xc688
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
800413c: 78 1b 08 01 mvhi fp,0x801
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
8004140: b5 ac 70 00 add r14,r13,r12
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
8004144: 44 40 00 59 be r2,r0,80042a8 <_Heap_Walk+0x3e4> <== NEVER TAKEN
(*printer)(
8004148: 78 03 08 01 mvhi r3,0x801
800414c: ba 00 08 00 mv r1,r16
8004150: 34 02 00 00 mvi r2,0
8004154: 38 63 c5 88 ori r3,r3,0xc588
8004158: b9 80 20 00 mv r4,r12
800415c: b9 a0 28 00 mv r5,r13
8004160: d9 e0 00 00 call r15
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
8004164: 29 63 00 20 lw r3,(r11+32)
8004168: 54 6e 00 8a bgu r3,r14,8004390 <_Heap_Walk+0x4cc> <== NEVER TAKEN
800416c: 29 61 00 24 lw r1,(r11+36)
8004170: 55 c1 00 88 bgu r14,r1,8004390 <_Heap_Walk+0x4cc>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
8004174: b9 a0 08 00 mv r1,r13
8004178: ba 40 10 00 mv r2,r18
800417c: fb ff f2 c9 calli 8000ca0 <__umodsi3>
8004180: b8 20 88 00 mv r17,r1
8004184: 5c 20 00 8c bne r1,r0,80043b4 <_Heap_Walk+0x4f0>
);
return false;
}
if ( block_size < min_block_size ) {
8004188: 51 b3 00 13 bgeu r13,r19,80041d4 <_Heap_Walk+0x310>
(*printer)(
800418c: 78 03 08 01 mvhi r3,0x801
8004190: ba 00 08 00 mv r1,r16
8004194: 38 63 c6 28 ori r3,r3,0xc628
8004198: b9 80 20 00 mv r4,r12
800419c: b9 a0 28 00 mv r5,r13
80041a0: ba 60 30 00 mv r6,r19
80041a4: 34 02 00 01 mvi r2,1
80041a8: d9 e0 00 00 call r15
80041ac: ba 20 08 00 mv r1,r17
block,
block_size,
min_block_size
);
return false;
80041b0: e3 ff ff 67 bi 8003f4c <_Heap_Walk+0x88>
return false;
}
if ( first_block->prev_size != page_size ) {
(*printer)(
80041b4: 78 03 08 01 mvhi r3,0x801
80041b8: ba 00 08 00 mv r1,r16
80041bc: 38 63 c4 a4 ori r3,r3,0xc4a4
80041c0: ba 40 28 00 mv r5,r18
80041c4: 34 02 00 01 mvi r2,1
80041c8: d9 e0 00 00 call r15
80041cc: b9 c0 08 00 mv r1,r14
80041d0: e3 ff ff 5f bi 8003f4c <_Heap_Walk+0x88>
);
return false;
}
if ( next_block_begin <= block_begin ) {
80041d4: 55 cc 00 0a bgu r14,r12,80041fc <_Heap_Walk+0x338>
(*printer)(
80041d8: 78 03 08 01 mvhi r3,0x801
80041dc: ba 00 08 00 mv r1,r16
80041e0: 38 63 c6 54 ori r3,r3,0xc654
80041e4: b9 80 20 00 mv r4,r12
80041e8: b9 c0 28 00 mv r5,r14
80041ec: 34 02 00 01 mvi r2,1
80041f0: d9 e0 00 00 call r15
80041f4: ba 20 08 00 mv r1,r17
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
80041f8: e3 ff ff 55 bi 8003f4c <_Heap_Walk+0x88>
}
if ( !_Heap_Is_prev_used( next_block ) ) {
80041fc: 29 c3 00 04 lw r3,(r14+4)
8004200: 20 63 00 01 andi r3,r3,0x1
8004204: 5c 60 00 22 bne r3,r0,800428c <_Heap_Walk+0x3c8>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
8004208: 29 91 00 04 lw r17,(r12+4)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
800420c: 29 85 00 0c lw r5,(r12+12)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
8004210: 29 61 00 08 lw r1,(r11+8)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
8004214: a2 36 68 00 and r13,r17,r22
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
8004218: 29 63 00 0c lw r3,(r11+12)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
800421c: b5 8d c8 00 add r25,r12,r13
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
8004220: ba e0 30 00 mv r6,r23
8004224: 44 25 00 03 be r1,r5,8004230 <_Heap_Walk+0x36c>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
8004228: ba a0 30 00 mv r6,r21
800422c: 44 ab 00 40 be r5,r11,800432c <_Heap_Walk+0x468>
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
8004230: 29 87 00 08 lw r7,(r12+8)
8004234: bb 00 40 00 mv r8,r24
8004238: 44 67 00 03 be r3,r7,8004244 <_Heap_Walk+0x380>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
800423c: ba a0 40 00 mv r8,r21
8004240: 44 eb 00 39 be r7,r11,8004324 <_Heap_Walk+0x460>
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
8004244: 78 03 08 01 mvhi r3,0x801
8004248: ba 00 08 00 mv r1,r16
800424c: 34 02 00 00 mvi r2,0
8004250: 38 63 c6 b8 ori r3,r3,0xc6b8
8004254: b9 80 20 00 mv r4,r12
8004258: d9 e0 00 00 call r15
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
800425c: 2b 26 00 00 lw r6,(r25+0)
8004260: 45 a6 00 1a be r13,r6,80042c8 <_Heap_Walk+0x404>
(*printer)(
8004264: 78 03 08 01 mvhi r3,0x801
8004268: ba 00 08 00 mv r1,r16
800426c: 38 63 c6 e4 ori r3,r3,0xc6e4
8004270: b9 80 20 00 mv r4,r12
8004274: b9 a0 28 00 mv r5,r13
8004278: bb 20 38 00 mv r7,r25
800427c: 34 02 00 01 mvi r2,1
8004280: d9 e0 00 00 call r15
8004284: 34 01 00 00 mvi r1,0
8004288: e3 ff ff 31 bi 8003f4c <_Heap_Walk+0x88>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
800428c: 46 8e ff 2f be r20,r14,8003f48 <_Heap_Walk+0x84>
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
8004290: 29 cd 00 04 lw r13,(r14+4)
8004294: b9 c0 60 00 mv r12,r14
8004298: 21 a2 00 01 andi r2,r13,0x1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
800429c: a1 b6 68 00 and r13,r13,r22
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
80042a0: b5 ac 70 00 add r14,r13,r12
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
80042a4: 5c 40 ff a9 bne r2,r0,8004148 <_Heap_Walk+0x284>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
80042a8: 29 86 00 00 lw r6,(r12+0)
80042ac: bb 60 18 00 mv r3,fp
80042b0: ba 00 08 00 mv r1,r16
80042b4: 38 63 c5 a0 ori r3,r3,0xc5a0
80042b8: b9 80 20 00 mv r4,r12
80042bc: b9 a0 28 00 mv r5,r13
80042c0: d9 e0 00 00 call r15
80042c4: e3 ff ff a8 bi 8004164 <_Heap_Walk+0x2a0>
);
return false;
}
if ( !prev_used ) {
80042c8: 22 31 00 01 andi r17,r17,0x1
80042cc: 46 20 00 0e be r17,r0,8004304 <_Heap_Walk+0x440>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
80042d0: 29 63 00 08 lw r3,(r11+8)
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
80042d4: 44 6b 00 04 be r3,r11,80042e4 <_Heap_Walk+0x420> <== NEVER TAKEN
if ( free_block == block ) {
80042d8: 44 6c ff ed be r3,r12,800428c <_Heap_Walk+0x3c8>
return true;
}
free_block = free_block->next;
80042dc: 28 63 00 08 lw r3,(r3+8)
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
80042e0: 5c 6b ff fe bne r3,r11,80042d8 <_Heap_Walk+0x414>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
80042e4: 78 03 08 01 mvhi r3,0x801
80042e8: ba 00 08 00 mv r1,r16
80042ec: 38 63 c7 50 ori r3,r3,0xc750
80042f0: b9 80 20 00 mv r4,r12
80042f4: 34 02 00 01 mvi r2,1
80042f8: d9 e0 00 00 call r15
80042fc: 34 01 00 00 mvi r1,0
8004300: e3 ff ff 13 bi 8003f4c <_Heap_Walk+0x88>
return false;
}
if ( !prev_used ) {
(*printer)(
8004304: 78 03 08 01 mvhi r3,0x801
8004308: ba 00 08 00 mv r1,r16
800430c: 38 63 c7 20 ori r3,r3,0xc720
8004310: b9 80 20 00 mv r4,r12
8004314: 34 02 00 01 mvi r2,1
8004318: d9 e0 00 00 call r15
800431c: ba 20 08 00 mv r1,r17
8004320: e3 ff ff 0b bi 8003f4c <_Heap_Walk+0x88>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
8004324: 2b 88 00 54 lw r8,(sp+84)
8004328: e3 ff ff c7 bi 8004244 <_Heap_Walk+0x380>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
800432c: 2b 86 00 58 lw r6,(sp+88)
8004330: e3 ff ff c0 bi 8004230 <_Heap_Walk+0x36c>
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
8004334: 78 03 08 01 mvhi r3,0x801
8004338: ba 00 08 00 mv r1,r16
800433c: 38 63 c3 e8 ori r3,r3,0xc3e8
8004340: 34 02 00 01 mvi r2,1
8004344: d9 e0 00 00 call r15
8004348: ba 40 08 00 mv r1,r18
800434c: e3 ff ff 00 bi 8003f4c <_Heap_Walk+0x88>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
8004350: 78 03 08 01 mvhi r3,0x801
8004354: ba 00 08 00 mv r1,r16
8004358: 38 63 c3 fc ori r3,r3,0xc3fc
800435c: ba 40 20 00 mv r4,r18
8004360: 34 02 00 01 mvi r2,1
8004364: d9 e0 00 00 call r15
8004368: 34 01 00 00 mvi r1,0
800436c: e3 ff fe f8 bi 8003f4c <_Heap_Walk+0x88>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
8004370: 78 03 08 01 mvhi r3,0x801
8004374: ba 00 08 00 mv r1,r16
8004378: 38 63 c4 1c ori r3,r3,0xc41c
800437c: ba 60 20 00 mv r4,r19
8004380: 34 02 00 01 mvi r2,1
8004384: d9 e0 00 00 call r15
8004388: b9 a0 08 00 mv r1,r13
800438c: e3 ff fe f0 bi 8003f4c <_Heap_Walk+0x88>
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
8004390: 78 03 08 01 mvhi r3,0x801
8004394: ba 00 08 00 mv r1,r16
8004398: 38 63 c5 c8 ori r3,r3,0xc5c8
800439c: b9 80 20 00 mv r4,r12
80043a0: b9 c0 28 00 mv r5,r14
80043a4: 34 02 00 01 mvi r2,1
80043a8: d9 e0 00 00 call r15
80043ac: 34 01 00 00 mvi r1,0
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
80043b0: e3 ff fe e7 bi 8003f4c <_Heap_Walk+0x88>
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
(*printer)(
80043b4: 78 03 08 01 mvhi r3,0x801
80043b8: ba 00 08 00 mv r1,r16
80043bc: 38 63 c5 f8 ori r3,r3,0xc5f8
80043c0: b9 80 20 00 mv r4,r12
80043c4: b9 a0 28 00 mv r5,r13
80043c8: 34 02 00 01 mvi r2,1
80043cc: d9 e0 00 00 call r15
80043d0: 34 01 00 00 mvi r1,0
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
80043d4: e3 ff fe de bi 8003f4c <_Heap_Walk+0x88>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
80043d8: 78 03 08 01 mvhi r3,0x801
80043dc: ba 00 08 00 mv r1,r16
80043e0: 38 63 c4 40 ori r3,r3,0xc440
80043e4: b9 80 20 00 mv r4,r12
80043e8: 34 02 00 01 mvi r2,1
80043ec: d9 e0 00 00 call r15
80043f0: ba 20 08 00 mv r1,r17
80043f4: e3 ff fe d6 bi 8003f4c <_Heap_Walk+0x88>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
80043f8: 78 03 08 01 mvhi r3,0x801
80043fc: ba 00 08 00 mv r1,r16
8004400: 38 63 c4 74 ori r3,r3,0xc474
8004404: 34 02 00 01 mvi r2,1
8004408: d9 e0 00 00 call r15
800440c: ba 20 08 00 mv r1,r17
8004410: e3 ff fe cf bi 8003f4c <_Heap_Walk+0x88>
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
8004414: 78 03 08 01 mvhi r3,0x801
8004418: ba 00 08 00 mv r1,r16
800441c: 38 63 c4 d0 ori r3,r3,0xc4d0
8004420: 34 02 00 01 mvi r2,1
8004424: d9 e0 00 00 call r15
8004428: ba a0 08 00 mv r1,r21
800442c: e3 ff fe c8 bi 8003f4c <_Heap_Walk+0x88>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
8004430: 78 03 08 01 mvhi r3,0x801
8004434: ba 00 08 00 mv r1,r16
8004438: 38 63 c5 08 ori r3,r3,0xc508
800443c: b9 c0 20 00 mv r4,r14
8004440: 34 02 00 01 mvi r2,1
8004444: d9 e0 00 00 call r15
8004448: 34 01 00 00 mvi r1,0
800444c: e3 ff fe c0 bi 8003f4c <_Heap_Walk+0x88>
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
8004450: 78 03 08 01 mvhi r3,0x801
8004454: ba 00 08 00 mv r1,r16
8004458: 38 63 c4 e8 ori r3,r3,0xc4e8
800445c: b9 c0 20 00 mv r4,r14
8004460: 34 02 00 01 mvi r2,1
8004464: d9 e0 00 00 call r15
8004468: 34 01 00 00 mvi r1,0
800446c: e3 ff fe b8 bi 8003f4c <_Heap_Walk+0x88>
return false;
}
if ( free_block->prev != prev_block ) {
(*printer)(
8004470: 78 03 08 01 mvhi r3,0x801
8004474: ba 00 08 00 mv r1,r16
8004478: 38 63 c5 54 ori r3,r3,0xc554
800447c: b9 c0 20 00 mv r4,r14
8004480: 34 02 00 01 mvi r2,1
8004484: d9 e0 00 00 call r15
8004488: 34 01 00 00 mvi r1,0
800448c: e3 ff fe b0 bi 8003f4c <_Heap_Walk+0x88>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
8004490: 78 03 08 01 mvhi r3,0x801
8004494: ba 00 08 00 mv r1,r16
8004498: 38 63 c5 38 ori r3,r3,0xc538
800449c: b9 c0 20 00 mv r4,r14
80044a0: 34 02 00 01 mvi r2,1
80044a4: d9 e0 00 00 call r15
80044a8: 34 01 00 00 mvi r1,0
80044ac: e3 ff fe a8 bi 8003f4c <_Heap_Walk+0x88>
08002994 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
8002994: 37 9c ff f4 addi sp,sp,-12
8002998: 5b 8b 00 0c sw (sp+12),r11
800299c: 5b 8c 00 08 sw (sp+8),r12
80029a0: 5b 9d 00 04 sw (sp+4),ra
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
80029a4: 78 0c 08 01 mvhi r12,0x801
80029a8: 39 8c da 6c ori r12,r12,0xda6c
80029ac: 29 81 00 00 lw r1,(r12+0)
80029b0: 44 20 00 09 be r1,r0,80029d4 <_IO_Initialize_all_drivers+0x40><== NEVER TAKEN
80029b4: 34 0b 00 00 mvi r11,0
(void) rtems_io_initialize( major, 0, NULL );
80029b8: 34 02 00 00 mvi r2,0
80029bc: b9 60 08 00 mv r1,r11
80029c0: b8 40 18 00 mv r3,r2
80029c4: f8 00 17 e7 calli 8008960 <rtems_io_initialize>
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
80029c8: 29 81 00 00 lw r1,(r12+0)
80029cc: 35 6b 00 01 addi r11,r11,1
80029d0: 54 2b ff fa bgu r1,r11,80029b8 <_IO_Initialize_all_drivers+0x24>
(void) rtems_io_initialize( major, 0, NULL );
}
80029d4: 2b 9d 00 04 lw ra,(sp+4)
80029d8: 2b 8b 00 0c lw r11,(sp+12)
80029dc: 2b 8c 00 08 lw r12,(sp+8)
80029e0: 37 9c 00 0c addi sp,sp,12
80029e4: c3 a0 00 00 ret
080029e8 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
80029e8: 37 9c ff e8 addi sp,sp,-24
80029ec: 5b 8b 00 18 sw (sp+24),r11
80029f0: 5b 8c 00 14 sw (sp+20),r12
80029f4: 5b 8d 00 10 sw (sp+16),r13
80029f8: 5b 8e 00 0c sw (sp+12),r14
80029fc: 5b 8f 00 08 sw (sp+8),r15
8002a00: 5b 9d 00 04 sw (sp+4),ra
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
8002a04: 78 01 08 01 mvhi r1,0x801
8002a08: 38 21 d0 c4 ori r1,r1,0xd0c4
drivers_in_table = Configuration.number_of_device_drivers;
number_of_drivers = Configuration.maximum_drivers;
8002a0c: 28 2d 00 2c lw r13,(r1+44)
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
drivers_in_table = Configuration.number_of_device_drivers;
8002a10: 28 2b 00 30 lw r11,(r1+48)
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
8002a14: 28 2c 00 34 lw r12,(r1+52)
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
8002a18: 51 6d 00 2d bgeu r11,r13,8002acc <_IO_Manager_initialization+0xe4>
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
8002a1c: b5 ad 08 00 add r1,r13,r13
8002a20: 34 02 00 03 mvi r2,3
8002a24: b4 2d 08 00 add r1,r1,r13
8002a28: fb ff f5 f2 calli 80001f0 <__ashlsi3>
8002a2c: b8 20 78 00 mv r15,r1
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
8002a30: f8 00 0d 2d calli 8005ee4 <_Workspace_Allocate_or_fatal_error>
8002a34: 78 0e 08 01 mvhi r14,0x801
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
8002a38: 78 04 08 01 mvhi r4,0x801
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
8002a3c: 39 ce da 70 ori r14,r14,0xda70
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
8002a40: 38 84 da 6c ori r4,r4,0xda6c
memset(
8002a44: b9 e0 18 00 mv r3,r15
8002a48: 34 02 00 00 mvi r2,0
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
8002a4c: 58 8d 00 00 sw (r4+0),r13
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
8002a50: 59 c1 00 00 sw (r14+0),r1
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
8002a54: f8 00 27 80 calli 800c854 <memset>
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
8002a58: 45 60 00 15 be r11,r0,8002aac <_IO_Manager_initialization+0xc4><== NEVER TAKEN
8002a5c: 29 c5 00 00 lw r5,(r14+0)
8002a60: 34 03 00 00 mvi r3,0
8002a64: b8 60 20 00 mv r4,r3
_IO_Driver_address_table[index] = driver_table[index];
8002a68: b5 83 10 00 add r2,r12,r3
8002a6c: 28 46 00 00 lw r6,(r2+0)
8002a70: b4 a3 08 00 add r1,r5,r3
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
8002a74: 34 84 00 01 addi r4,r4,1
_IO_Driver_address_table[index] = driver_table[index];
8002a78: 58 26 00 00 sw (r1+0),r6
8002a7c: 28 46 00 04 lw r6,(r2+4)
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
8002a80: 34 63 00 18 addi r3,r3,24
_IO_Driver_address_table[index] = driver_table[index];
8002a84: 58 26 00 04 sw (r1+4),r6
8002a88: 28 46 00 08 lw r6,(r2+8)
8002a8c: 58 26 00 08 sw (r1+8),r6
8002a90: 28 46 00 0c lw r6,(r2+12)
8002a94: 58 26 00 0c sw (r1+12),r6
8002a98: 28 46 00 10 lw r6,(r2+16)
8002a9c: 58 26 00 10 sw (r1+16),r6
8002aa0: 28 42 00 14 lw r2,(r2+20)
8002aa4: 58 22 00 14 sw (r1+20),r2
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
8002aa8: 55 64 ff f0 bgu r11,r4,8002a68 <_IO_Manager_initialization+0x80>
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
8002aac: 2b 9d 00 04 lw ra,(sp+4)
8002ab0: 2b 8b 00 18 lw r11,(sp+24)
8002ab4: 2b 8c 00 14 lw r12,(sp+20)
8002ab8: 2b 8d 00 10 lw r13,(sp+16)
8002abc: 2b 8e 00 0c lw r14,(sp+12)
8002ac0: 2b 8f 00 08 lw r15,(sp+8)
8002ac4: 37 9c 00 18 addi sp,sp,24
8002ac8: c3 a0 00 00 ret
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
8002acc: 78 02 08 01 mvhi r2,0x801
_IO_Number_of_drivers = number_of_drivers;
8002ad0: 78 01 08 01 mvhi r1,0x801
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
8002ad4: 38 42 da 70 ori r2,r2,0xda70
_IO_Number_of_drivers = number_of_drivers;
8002ad8: 38 21 da 6c ori r1,r1,0xda6c
* 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;
8002adc: 58 4c 00 00 sw (r2+0),r12
_IO_Number_of_drivers = number_of_drivers;
8002ae0: 58 2b 00 00 sw (r1+0),r11
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
8002ae4: 2b 9d 00 04 lw ra,(sp+4)
8002ae8: 2b 8b 00 18 lw r11,(sp+24)
8002aec: 2b 8c 00 14 lw r12,(sp+20)
8002af0: 2b 8d 00 10 lw r13,(sp+16)
8002af4: 2b 8e 00 0c lw r14,(sp+12)
8002af8: 2b 8f 00 08 lw r15,(sp+8)
8002afc: 37 9c 00 18 addi sp,sp,24
8002b00: c3 a0 00 00 ret
08003738 <_ISR_Handler_initialization>:
*
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
8003738: 37 9c ff f4 addi sp,sp,-12
800373c: 5b 8b 00 0c sw (sp+12),r11
8003740: 5b 8c 00 08 sw (sp+8),r12
8003744: 5b 9d 00 04 sw (sp+4),ra
_ISR_Signals_to_thread_executing = false;
8003748: 78 03 08 01 mvhi r3,0x801
_ISR_Nest_level = 0;
800374c: 78 02 08 01 mvhi r2,0x801
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
_ISR_Signals_to_thread_executing = false;
8003750: 34 04 00 00 mvi r4,0
8003754: 38 63 d9 80 ori r3,r3,0xd980
_ISR_Nest_level = 0;
8003758: 38 42 d8 c4 ori r2,r2,0xd8c4
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
_ISR_Signals_to_thread_executing = false;
800375c: 30 64 00 00 sb (r3+0),r4
_ISR_Nest_level = 0;
8003760: 58 44 00 00 sw (r2+0),r4
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
_ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
8003764: 34 01 00 80 mvi r1,128
void _ISR_Handler_initialization( void )
{
_ISR_Signals_to_thread_executing = false;
_ISR_Nest_level = 0;
8003768: b8 80 60 00 mv r12,r4
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
_ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
800376c: f8 00 09 de calli 8005ee4 <_Workspace_Allocate_or_fatal_error>
_CPU_Initialize_vectors();
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
8003770: 78 0b 08 01 mvhi r11,0x801
8003774: 78 02 08 01 mvhi r2,0x801
8003778: 38 42 d0 bc ori r2,r2,0xd0bc
800377c: 39 6b d0 c4 ori r11,r11,0xd0c4
8003780: 28 44 00 00 lw r4,(r2+0)
8003784: 29 63 00 1c lw r3,(r11+28)
_ISR_Signals_to_thread_executing = false;
_ISR_Nest_level = 0;
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
_ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
8003788: 78 02 08 01 mvhi r2,0x801
800378c: 38 42 d8 a8 ori r2,r2,0xd8a8
8003790: 58 41 00 00 sw (r2+0),r1
_CPU_Initialize_vectors();
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
8003794: 50 64 00 05 bgeu r3,r4,80037a8 <_ISR_Handler_initialization+0x70><== ALWAYS TAKEN
_Internal_error_Occurred(
8003798: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
800379c: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
80037a0: 34 03 00 05 mvi r3,5 <== NOT EXECUTED
80037a4: fb ff ff d6 calli 80036fc <_Internal_error_Occurred> <== NOT EXECUTED
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
);
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
80037a8: b8 60 08 00 mv r1,r3
80037ac: f8 00 09 ce calli 8005ee4 <_Workspace_Allocate_or_fatal_error>
Configuration.interrupt_stack_size
);
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
80037b0: 29 64 00 1c lw r4,(r11+28)
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
);
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
80037b4: 78 02 08 01 mvhi r2,0x801
Configuration.interrupt_stack_size
);
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
80037b8: 78 03 08 01 mvhi r3,0x801
80037bc: b4 24 20 00 add r4,r1,r4
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
);
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
80037c0: 38 42 d8 3c ori r2,r2,0xd83c
Configuration.interrupt_stack_size
);
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
80037c4: 38 63 d7 c0 ori r3,r3,0xd7c0
80037c8: 58 64 00 00 sw (r3+0),r4
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
);
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
80037cc: 58 41 00 00 sw (r2+0),r1
#if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE )
_CPU_Install_interrupt_stack();
#endif
}
80037d0: 2b 9d 00 04 lw ra,(sp+4)
80037d4: 2b 8b 00 0c lw r11,(sp+12)
80037d8: 2b 8c 00 08 lw r12,(sp+8)
80037dc: 37 9c 00 0c addi sp,sp,12
80037e0: c3 a0 00 00 ret
080037e4 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
80037e4: 37 9c ff ec addi sp,sp,-20
80037e8: 5b 8b 00 14 sw (sp+20),r11
80037ec: 5b 8c 00 10 sw (sp+16),r12
80037f0: 5b 8d 00 0c sw (sp+12),r13
80037f4: 5b 8e 00 08 sw (sp+8),r14
80037f8: 5b 9d 00 04 sw (sp+4),ra
80037fc: b8 20 58 00 mv r11,r1
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
8003800: 28 21 00 18 lw r1,(r1+24)
8003804: b8 20 60 00 mv r12,r1
8003808: 5c 20 00 09 bne r1,r0,800382c <_Objects_Allocate+0x48> <== ALWAYS TAKEN
information->inactive--;
}
}
return the_object;
}
800380c: b9 80 08 00 mv r1,r12
8003810: 2b 9d 00 04 lw ra,(sp+4)
8003814: 2b 8b 00 14 lw r11,(sp+20)
8003818: 2b 8c 00 10 lw r12,(sp+16)
800381c: 2b 8d 00 0c lw r13,(sp+12)
8003820: 2b 8e 00 08 lw r14,(sp+8)
8003824: 37 9c 00 14 addi sp,sp,20
8003828: c3 a0 00 00 ret
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
800382c: 35 6d 00 20 addi r13,r11,32
8003830: b9 a0 08 00 mv r1,r13
8003834: f8 00 14 7d calli 8008a28 <_Chain_Get>
8003838: b8 20 60 00 mv r12,r1
if ( information->auto_extend ) {
800383c: 41 61 00 12 lbu r1,(r11+18)
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
8003840: b9 80 70 00 mv r14,r12
if ( information->auto_extend ) {
8003844: 44 20 ff f2 be r1,r0,800380c <_Objects_Allocate+0x28>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
8003848: 45 80 00 1a be r12,r0,80038b0 <_Objects_Allocate+0xcc>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
800384c: 29 83 00 08 lw r3,(r12+8)
8003850: 29 61 00 08 lw r1,(r11+8)
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
8003854: 2d 62 00 14 lhu r2,(r11+20)
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
8003858: 20 63 ff ff andi r3,r3,0xffff
800385c: 20 21 ff ff andi r1,r1,0xffff
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
8003860: c8 61 08 00 sub r1,r3,r1
8003864: f8 00 59 63 calli 8019df0 <__udivsi3>
8003868: 34 02 00 02 mvi r2,2
800386c: fb ff f2 61 calli 80001f0 <__ashlsi3>
8003870: 29 62 00 30 lw r2,(r11+48)
information->inactive--;
8003874: 2d 63 00 2c lhu r3,(r11+44)
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
8003878: b4 41 08 00 add r1,r2,r1
800387c: 28 22 00 00 lw r2,(r1+0)
information->inactive--;
8003880: 34 63 ff ff addi r3,r3,-1
8003884: 0d 63 00 2c sh (r11+44),r3
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
8003888: 34 42 ff ff addi r2,r2,-1
800388c: 58 22 00 00 sw (r1+0),r2
information->inactive--;
}
}
return the_object;
}
8003890: b9 80 08 00 mv r1,r12
8003894: 2b 9d 00 04 lw ra,(sp+4)
8003898: 2b 8b 00 14 lw r11,(sp+20)
800389c: 2b 8c 00 10 lw r12,(sp+16)
80038a0: 2b 8d 00 0c lw r13,(sp+12)
80038a4: 2b 8e 00 08 lw r14,(sp+8)
80038a8: 37 9c 00 14 addi sp,sp,20
80038ac: c3 a0 00 00 ret
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
80038b0: b9 60 08 00 mv r1,r11
80038b4: f8 00 00 06 calli 80038cc <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
80038b8: b9 a0 08 00 mv r1,r13
80038bc: f8 00 14 5b calli 8008a28 <_Chain_Get>
80038c0: b8 20 60 00 mv r12,r1
}
if ( the_object ) {
80038c4: 44 2e ff d2 be r1,r14,800380c <_Objects_Allocate+0x28>
80038c8: e3 ff ff e1 bi 800384c <_Objects_Allocate+0x68>
080038cc <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
80038cc: 37 9c ff c8 addi sp,sp,-56
80038d0: 5b 8b 00 2c sw (sp+44),r11
80038d4: 5b 8c 00 28 sw (sp+40),r12
80038d8: 5b 8d 00 24 sw (sp+36),r13
80038dc: 5b 8e 00 20 sw (sp+32),r14
80038e0: 5b 8f 00 1c sw (sp+28),r15
80038e4: 5b 90 00 18 sw (sp+24),r16
80038e8: 5b 91 00 14 sw (sp+20),r17
80038ec: 5b 92 00 10 sw (sp+16),r18
80038f0: 5b 93 00 0c sw (sp+12),r19
80038f4: 5b 94 00 08 sw (sp+8),r20
80038f8: 5b 9d 00 04 sw (sp+4),ra
/*
* Search for a free block of indexes. The block variable ends up set
* to block_count + 1 if the table needs to be extended.
*/
minimum_index = _Objects_Get_index( information->minimum_id );
80038fc: 28 30 00 08 lw r16,(r1+8)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
8003900: 28 31 00 34 lw r17,(r1+52)
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
8003904: b8 20 58 00 mv r11,r1
/*
* Search for a free block of indexes. The block variable ends up set
* to block_count + 1 if the table needs to be extended.
*/
minimum_index = _Objects_Get_index( information->minimum_id );
8003908: 22 10 ff ff andi r16,r16,0xffff
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
800390c: 46 20 00 ba be r17,r0,8003bf4 <_Objects_Extend_information+0x328>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
8003910: 2c 2f 00 14 lhu r15,(r1+20)
8003914: 2c 32 00 10 lhu r18,(r1+16)
for ( ; block < block_count; block++ ) {
8003918: ba 00 68 00 mv r13,r16
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
800391c: b9 e0 10 00 mv r2,r15
8003920: ba 40 08 00 mv r1,r18
8003924: f8 00 59 33 calli 8019df0 <__udivsi3>
8003928: 20 2e ff ff andi r14,r1,0xffff
for ( ; block < block_count; block++ ) {
800392c: b9 c0 60 00 mv r12,r14
8003930: b9 e0 08 00 mv r1,r15
8003934: 45 c0 00 08 be r14,r0,8003954 <_Objects_Extend_information+0x88><== NEVER TAKEN
if ( information->object_blocks[ block ] == NULL )
8003938: 2a 2c 00 00 lw r12,(r17+0)
800393c: 45 80 00 06 be r12,r0,8003954 <_Objects_Extend_information+0x88><== NEVER TAKEN
8003940: ba 20 18 00 mv r3,r17
8003944: 34 0c 00 00 mvi r12,0
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
8003948: 35 8c 00 01 addi r12,r12,1
if ( information->object_blocks[ block ] == NULL )
break;
else
index_base += information->allocation_size;
800394c: b5 af 68 00 add r13,r13,r15
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
8003950: 55 cc 00 8c bgu r14,r12,8003b80 <_Objects_Extend_information+0x2b4>
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
8003954: b6 41 90 00 add r18,r18,r1
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
8003958: 38 02 ff ff mvu r2,0xffff
800395c: 56 42 00 7c bgu r18,r2,8003b4c <_Objects_Extend_information+0x280><== NEVER TAKEN
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
8003960: 29 62 00 18 lw r2,(r11+24)
8003964: f8 00 58 a4 calli 8019bf4 <__mulsi3>
if ( information->auto_extend ) {
8003968: 41 62 00 12 lbu r2,(r11+18)
800396c: 5c 40 00 89 bne r2,r0,8003b90 <_Objects_Extend_information+0x2c4>
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
8003970: f8 00 09 5d calli 8005ee4 <_Workspace_Allocate_or_fatal_error>
8003974: b8 20 78 00 mv r15,r1
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
8003978: 2d 61 00 10 lhu r1,(r11+16)
800397c: 54 2d 00 4a bgu r1,r13,8003aa4 <_Objects_Extend_information+0x1d8>
*/
/*
* Up the block count and maximum
*/
block_count++;
8003980: 35 d3 00 01 addi r19,r14,1
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
8003984: b6 73 08 00 add r1,r19,r19
8003988: b4 33 08 00 add r1,r1,r19
800398c: b6 41 08 00 add r1,r18,r1
8003990: 34 02 00 02 mvi r2,2
8003994: b4 30 08 00 add r1,r1,r16
8003998: fb ff f2 16 calli 80001f0 <__ashlsi3>
800399c: f8 00 09 61 calli 8005f20 <_Workspace_Allocate>
80039a0: b8 20 88 00 mv r17,r1
if ( !object_blocks ) {
80039a4: 44 20 00 9a be r1,r0,8003c0c <_Objects_Extend_information+0x340><== NEVER TAKEN
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
80039a8: ba 60 08 00 mv r1,r19
80039ac: 34 02 00 02 mvi r2,2
80039b0: fb ff f2 10 calli 80001f0 <__ashlsi3>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
80039b4: 2d 62 00 10 lhu r2,(r11+16)
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
80039b8: b6 21 98 00 add r19,r17,r1
80039bc: b6 61 a0 00 add r20,r19,r1
80039c0: 54 50 00 78 bgu r2,r16,8003ba0 <_Objects_Extend_information+0x2d4>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
80039c4: 34 03 00 00 mvi r3,0
80039c8: ba 80 20 00 mv r4,r20
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
80039cc: b8 60 10 00 mv r2,r3
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
80039d0: 46 03 00 05 be r16,r3,80039e4 <_Objects_Extend_information+0x118><== NEVER TAKEN
local_table[ index ] = NULL;
80039d4: 58 82 00 00 sw (r4+0),r2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
80039d8: 34 63 00 01 addi r3,r3,1
80039dc: 34 84 00 04 addi r4,r4,4
80039e0: 56 03 ff fd bgu r16,r3,80039d4 <_Objects_Extend_information+0x108><== NEVER TAKEN
80039e4: b9 c0 08 00 mv r1,r14
80039e8: 34 02 00 02 mvi r2,2
80039ec: fb ff f2 01 calli 80001f0 <__ashlsi3>
80039f0: b8 20 70 00 mv r14,r1
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
80039f4: 2d 61 00 14 lhu r1,(r11+20)
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
80039f8: b6 6e 10 00 add r2,r19,r14
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
80039fc: 34 10 00 00 mvi r16,0
8003a00: b6 2e 70 00 add r14,r17,r14
8003a04: 59 d0 00 00 sw (r14+0),r16
inactive_per_block[block_count] = 0;
8003a08: 58 50 00 00 sw (r2+0),r16
for ( index=index_base ;
index < ( information->allocation_size + index_base );
8003a0c: b5 a1 70 00 add r14,r13,r1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
8003a10: 51 ae 00 0b bgeu r13,r14,8003a3c <_Objects_Extend_information+0x170><== NEVER TAKEN
8003a14: 34 02 00 02 mvi r2,2
8003a18: b9 a0 08 00 mv r1,r13
8003a1c: fb ff f1 f5 calli 80001f0 <__ashlsi3>
8003a20: b6 81 18 00 add r3,r20,r1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
8003a24: ba 00 10 00 mv r2,r16
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
8003a28: b9 a0 20 00 mv r4,r13
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
8003a2c: 58 62 00 00 sw (r3+0),r2
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
8003a30: 34 84 00 01 addi r4,r4,1
8003a34: 34 63 00 04 addi r3,r3,4
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
8003a38: 55 c4 ff fd bgu r14,r4,8003a2c <_Objects_Extend_information+0x160>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
8003a3c: 90 00 70 00 rcsr r14,IE
8003a40: 34 01 ff fe mvi r1,-2
8003a44: a1 c1 08 00 and r1,r14,r1
8003a48: d0 01 00 00 wcsr IE,r1
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
8003a4c: 29 61 00 00 lw r1,(r11+0)
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
8003a50: 22 52 ff ff andi r18,r18,0xffff
8003a54: 0d 72 00 10 sh (r11+16),r18
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
8003a58: 59 73 00 30 sw (r11+48),r19
information->local_table = local_table;
8003a5c: 59 74 00 1c sw (r11+28),r20
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
8003a60: 29 70 00 34 lw r16,(r11+52)
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
8003a64: 34 02 00 18 mvi r2,24
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
8003a68: 59 71 00 34 sw (r11+52),r17
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
8003a6c: fb ff f1 e1 calli 80001f0 <__ashlsi3>
8003a70: 78 02 00 01 mvhi r2,0x1
8003a74: 38 42 00 00 ori r2,r2,0x0
8003a78: b8 22 88 00 or r17,r1,r2
8003a7c: 2d 61 00 04 lhu r1,(r11+4)
8003a80: 34 02 00 1b mvi r2,27
8003a84: fb ff f1 db calli 80001f0 <__ashlsi3>
8003a88: ba 21 08 00 or r1,r17,r1
8003a8c: b8 32 90 00 or r18,r1,r18
8003a90: 59 72 00 0c sw (r11+12),r18
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
8003a94: d0 0e 00 00 wcsr IE,r14
if ( old_tables )
8003a98: 46 00 00 03 be r16,r0,8003aa4 <_Objects_Extend_information+0x1d8>
_Workspace_Free( old_tables );
8003a9c: ba 00 08 00 mv r1,r16
8003aa0: f8 00 09 2b calli 8005f4c <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
8003aa4: 34 02 00 02 mvi r2,2
8003aa8: b9 80 08 00 mv r1,r12
8003aac: fb ff f1 d1 calli 80001f0 <__ashlsi3>
8003ab0: b8 20 90 00 mv r18,r1
8003ab4: 29 61 00 34 lw r1,(r11+52)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
8003ab8: 2d 63 00 14 lhu r3,(r11+20)
8003abc: 29 64 00 18 lw r4,(r11+24)
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
8003ac0: b4 32 08 00 add r1,r1,r18
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
8003ac4: 37 90 00 30 addi r16,sp,48
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
8003ac8: 58 2f 00 00 sw (r1+0),r15
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
8003acc: b9 e0 10 00 mv r2,r15
8003ad0: ba 00 08 00 mv r1,r16
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
8003ad4: 78 0f 00 01 mvhi r15,0x1
information->object_blocks[ block ] = new_object_block;
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
8003ad8: f8 00 13 e5 calli 8008a6c <_Chain_Initialize>
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
8003adc: 39 ef 00 00 ori r15,r15,0x0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
8003ae0: 35 71 00 20 addi r17,r11,32
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
8003ae4: e0 00 00 0e bi 8003b1c <_Objects_Extend_information+0x250>
the_object->id = _Objects_Build_id(
8003ae8: 29 61 00 00 lw r1,(r11+0)
8003aec: fb ff f1 c1 calli 80001f0 <__ashlsi3>
8003af0: b8 2f 70 00 or r14,r1,r15
8003af4: 2d 61 00 04 lhu r1,(r11+4)
8003af8: 34 02 00 1b mvi r2,27
8003afc: fb ff f1 bd calli 80001f0 <__ashlsi3>
8003b00: b9 c1 10 00 or r2,r14,r1
8003b04: b8 4d 10 00 or r2,r2,r13
8003b08: 59 82 00 08 sw (r12+8),r2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
8003b0c: ba 20 08 00 mv r1,r17
8003b10: b9 80 10 00 mv r2,r12
8003b14: fb ff fc a0 calli 8002d94 <_Chain_Append>
index++;
8003b18: 35 ad 00 01 addi r13,r13,1
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
8003b1c: ba 00 08 00 mv r1,r16
8003b20: f8 00 13 c2 calli 8008a28 <_Chain_Get>
8003b24: b8 20 60 00 mv r12,r1
the_object->id = _Objects_Build_id(
8003b28: 34 02 00 18 mvi r2,24
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
8003b2c: 5c 20 ff ef bne r1,r0,8003ae8 <_Objects_Extend_information+0x21c>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
8003b30: 2d 62 00 14 lhu r2,(r11+20)
information->inactive =
8003b34: 2d 61 00 2c lhu r1,(r11+44)
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
8003b38: 29 63 00 30 lw r3,(r11+48)
information->inactive =
8003b3c: b4 41 08 00 add r1,r2,r1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
8003b40: b4 72 90 00 add r18,r3,r18
information->inactive =
8003b44: 0d 61 00 2c sh (r11+44),r1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
8003b48: 5a 42 00 00 sw (r18+0),r2
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
8003b4c: 2b 9d 00 04 lw ra,(sp+4)
8003b50: 2b 8b 00 2c lw r11,(sp+44)
8003b54: 2b 8c 00 28 lw r12,(sp+40)
8003b58: 2b 8d 00 24 lw r13,(sp+36)
8003b5c: 2b 8e 00 20 lw r14,(sp+32)
8003b60: 2b 8f 00 1c lw r15,(sp+28)
8003b64: 2b 90 00 18 lw r16,(sp+24)
8003b68: 2b 91 00 14 lw r17,(sp+20)
8003b6c: 2b 92 00 10 lw r18,(sp+16)
8003b70: 2b 93 00 0c lw r19,(sp+12)
8003b74: 2b 94 00 08 lw r20,(sp+8)
8003b78: 37 9c 00 38 addi sp,sp,56
8003b7c: c3 a0 00 00 ret
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL )
8003b80: 28 62 00 04 lw r2,(r3+4)
8003b84: 34 63 00 04 addi r3,r3,4
8003b88: 5c 40 ff 70 bne r2,r0,8003948 <_Objects_Extend_information+0x7c>
8003b8c: e3 ff ff 72 bi 8003954 <_Objects_Extend_information+0x88>
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
8003b90: f8 00 08 e4 calli 8005f20 <_Workspace_Allocate>
8003b94: b8 20 78 00 mv r15,r1
if ( !new_object_block )
8003b98: 5c 20 ff 78 bne r1,r0,8003978 <_Objects_Extend_information+0xac>
8003b9c: e3 ff ff ec bi 8003b4c <_Objects_Extend_information+0x280>
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
information->object_blocks,
block_count * sizeof(void*) );
8003ba0: b9 c0 08 00 mv r1,r14
8003ba4: 34 02 00 02 mvi r2,2
8003ba8: fb ff f1 92 calli 80001f0 <__ashlsi3>
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
8003bac: 29 62 00 34 lw r2,(r11+52)
information->object_blocks,
block_count * sizeof(void*) );
8003bb0: b8 20 70 00 mv r14,r1
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
8003bb4: b9 c0 18 00 mv r3,r14
8003bb8: ba 20 08 00 mv r1,r17
8003bbc: f8 00 22 c8 calli 800c6dc <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
8003bc0: 29 62 00 30 lw r2,(r11+48)
8003bc4: b9 c0 18 00 mv r3,r14
8003bc8: ba 60 08 00 mv r1,r19
8003bcc: f8 00 22 c4 calli 800c6dc <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
8003bd0: 2d 61 00 10 lhu r1,(r11+16)
8003bd4: 34 02 00 02 mvi r2,2
8003bd8: b6 01 08 00 add r1,r16,r1
8003bdc: fb ff f1 85 calli 80001f0 <__ashlsi3>
8003be0: 29 62 00 1c lw r2,(r11+28)
8003be4: b8 20 18 00 mv r3,r1
8003be8: ba 80 08 00 mv r1,r20
8003bec: f8 00 22 bc calli 800c6dc <memcpy>
8003bf0: e3 ff ff 81 bi 80039f4 <_Objects_Extend_information+0x128>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
8003bf4: 2c 32 00 10 lhu r18,(r1+16)
8003bf8: ba 20 60 00 mv r12,r17
8003bfc: 2c 21 00 14 lhu r1,(r1+20)
8003c00: ba 00 68 00 mv r13,r16
8003c04: ba 20 70 00 mv r14,r17
8003c08: e3 ff ff 53 bi 8003954 <_Objects_Extend_information+0x88>
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
8003c0c: b9 e0 08 00 mv r1,r15
8003c10: f8 00 08 cf calli 8005f4c <_Workspace_Free>
return;
8003c14: e3 ff ff ce bi 8003b4c <_Objects_Extend_information+0x280>
08003d10 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
8003d10: 37 9c ff f4 addi sp,sp,-12
8003d14: 5b 8b 00 0c sw (sp+12),r11
8003d18: 5b 8c 00 08 sw (sp+8),r12
8003d1c: 5b 9d 00 04 sw (sp+4),ra
8003d20: b8 40 58 00 mv r11,r2
8003d24: b8 20 60 00 mv r12,r1
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
8003d28: 5c 40 00 07 bne r2,r0,8003d44 <_Objects_Get_information+0x34>
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
8003d2c: 34 01 00 00 mvi r1,0
return NULL;
#endif
return info;
}
8003d30: 2b 9d 00 04 lw ra,(sp+4)
8003d34: 2b 8b 00 0c lw r11,(sp+12)
8003d38: 2b 8c 00 08 lw r12,(sp+8)
8003d3c: 37 9c 00 0c addi sp,sp,12
8003d40: c3 a0 00 00 ret
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
8003d44: f8 00 15 25 calli 80091d8 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
8003d48: 44 20 ff f9 be r1,r0,8003d2c <_Objects_Get_information+0x1c>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
8003d4c: 55 61 ff f8 bgu r11,r1,8003d2c <_Objects_Get_information+0x1c>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
8003d50: b9 80 08 00 mv r1,r12
8003d54: 34 02 00 02 mvi r2,2
8003d58: 78 0c 08 01 mvhi r12,0x801
8003d5c: 39 8c d7 c4 ori r12,r12,0xd7c4
8003d60: fb ff f1 24 calli 80001f0 <__ashlsi3>
8003d64: b5 81 08 00 add r1,r12,r1
8003d68: 28 2c 00 00 lw r12,(r1+0)
8003d6c: 45 80 ff f0 be r12,r0,8003d2c <_Objects_Get_information+0x1c><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
8003d70: b9 60 08 00 mv r1,r11
8003d74: 34 02 00 02 mvi r2,2
8003d78: fb ff f1 1e calli 80001f0 <__ashlsi3>
8003d7c: b5 81 08 00 add r1,r12,r1
8003d80: 28 21 00 00 lw r1,(r1+0)
if ( !info )
8003d84: 44 20 ff eb be r1,r0,8003d30 <_Objects_Get_information+0x20><== NEVER TAKEN
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
8003d88: 2c 22 00 10 lhu r2,(r1+16)
8003d8c: 5c 40 ff e9 bne r2,r0,8003d30 <_Objects_Get_information+0x20>
8003d90: e3 ff ff e7 bi 8003d2c <_Objects_Get_information+0x1c>
08005ce8 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
8005ce8: 37 9c ff dc addi sp,sp,-36
8005cec: 5b 8b 00 18 sw (sp+24),r11
8005cf0: 5b 8c 00 14 sw (sp+20),r12
8005cf4: 5b 8d 00 10 sw (sp+16),r13
8005cf8: 5b 8e 00 0c sw (sp+12),r14
8005cfc: 5b 8f 00 08 sw (sp+8),r15
8005d00: 5b 9d 00 04 sw (sp+4),ra
8005d04: b8 40 60 00 mv r12,r2
8005d08: b8 60 58 00 mv r11,r3
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
8005d0c: 5c 40 00 0b bne r2,r0,8005d38 <_Objects_Get_name_as_string+0x50>
}
}
*d = '\0';
_Thread_Enable_dispatch();
return name;
8005d10: 34 0b 00 00 mvi r11,0
}
return NULL; /* unreachable path */
}
8005d14: b9 60 08 00 mv r1,r11
8005d18: 2b 9d 00 04 lw ra,(sp+4)
8005d1c: 2b 8b 00 18 lw r11,(sp+24)
8005d20: 2b 8c 00 14 lw r12,(sp+20)
8005d24: 2b 8d 00 10 lw r13,(sp+16)
8005d28: 2b 8e 00 0c lw r14,(sp+12)
8005d2c: 2b 8f 00 08 lw r15,(sp+8)
8005d30: 37 9c 00 24 addi sp,sp,36
8005d34: c3 a0 00 00 ret
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
8005d38: 44 60 ff f7 be r3,r0,8005d14 <_Objects_Get_name_as_string+0x2c>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
8005d3c: b8 20 68 00 mv r13,r1
8005d40: 5c 20 00 05 bne r1,r0,8005d54 <_Objects_Get_name_as_string+0x6c>
8005d44: 78 01 08 02 mvhi r1,0x802
8005d48: 38 21 b6 d8 ori r1,r1,0xb6d8
8005d4c: 28 21 00 00 lw r1,(r1+0)
8005d50: 28 2d 00 08 lw r13,(r1+8)
information = _Objects_Get_information_id( tmpId );
8005d54: b9 a0 08 00 mv r1,r13
8005d58: fb ff ff b0 calli 8005c18 <_Objects_Get_information_id>
if ( !information )
8005d5c: 44 20 ff ed be r1,r0,8005d10 <_Objects_Get_name_as_string+0x28>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
8005d60: b9 a0 10 00 mv r2,r13
8005d64: 37 83 00 24 addi r3,sp,36
8005d68: f8 00 00 2e calli 8005e20 <_Objects_Get>
switch ( location ) {
8005d6c: 2b 8e 00 24 lw r14,(sp+36)
8005d70: 5d c0 ff e8 bne r14,r0,8005d10 <_Objects_Get_name_as_string+0x28>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
8005d74: 28 2f 00 0c lw r15,(r1+12)
lname[ 0 ] = (u32_name >> 24) & 0xff;
8005d78: 34 02 00 18 mvi r2,24
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
8005d7c: 35 8c ff ff addi r12,r12,-1
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
8005d80: b9 e0 08 00 mv r1,r15
8005d84: fb ff ed 43 calli 8001290 <__lshrsi3>
8005d88: 20 2d 00 ff andi r13,r1,0xff
lname[ 1 ] = (u32_name >> 16) & 0xff;
8005d8c: 34 02 00 10 mvi r2,16
8005d90: b9 e0 08 00 mv r1,r15
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
8005d94: 33 8d 00 1c sb (sp+28),r13
lname[ 1 ] = (u32_name >> 16) & 0xff;
8005d98: fb ff ed 3e calli 8001290 <__lshrsi3>
8005d9c: 33 81 00 1d sb (sp+29),r1
lname[ 2 ] = (u32_name >> 8) & 0xff;
8005da0: 34 02 00 08 mvi r2,8
8005da4: b9 e0 08 00 mv r1,r15
8005da8: fb ff ed 3a calli 8001290 <__lshrsi3>
8005dac: 33 81 00 1e sb (sp+30),r1
lname[ 3 ] = (u32_name >> 0) & 0xff;
8005db0: 33 8f 00 1f sb (sp+31),r15
lname[ 4 ] = '\0';
8005db4: 33 8e 00 20 sb (sp+32),r14
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
8005db8: 45 8e 00 18 be r12,r14,8005e18 <_Objects_Get_name_as_string+0x130><== NEVER TAKEN
8005dbc: 45 a0 00 17 be r13,r0,8005e18 <_Objects_Get_name_as_string+0x130>
8005dc0: 78 03 08 02 mvhi r3,0x802
8005dc4: b9 c0 08 00 mv r1,r14
8005dc8: 38 63 31 b4 ori r3,r3,0x31b4
8005dcc: b9 60 10 00 mv r2,r11
8005dd0: 37 86 00 1c addi r6,sp,28
*d = (isprint((unsigned char)*s)) ? *s : '*';
8005dd4: 28 64 00 00 lw r4,(r3+0)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
8005dd8: 34 21 00 01 addi r1,r1,1
8005ddc: b4 c1 28 00 add r5,r6,r1
*d = (isprint((unsigned char)*s)) ? *s : '*';
8005de0: b4 8d 20 00 add r4,r4,r13
8005de4: 40 84 00 01 lbu r4,(r4+1)
8005de8: 20 84 00 97 andi r4,r4,0x97
8005dec: 5c 80 00 02 bne r4,r0,8005df4 <_Objects_Get_name_as_string+0x10c>
8005df0: 34 0d 00 2a mvi r13,42
8005df4: 30 4d 00 00 sb (r2+0),r13
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
8005df8: 34 42 00 01 addi r2,r2,1
8005dfc: 50 2c 00 03 bgeu r1,r12,8005e08 <_Objects_Get_name_as_string+0x120>
8005e00: 40 ad 00 00 lbu r13,(r5+0)
8005e04: 5d a0 ff f4 bne r13,r0,8005dd4 <_Objects_Get_name_as_string+0xec>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
8005e08: 34 01 00 00 mvi r1,0
8005e0c: 30 41 00 00 sb (r2+0),r1
_Thread_Enable_dispatch();
8005e10: f8 00 02 29 calli 80066b4 <_Thread_Enable_dispatch>
return name;
8005e14: e3 ff ff c0 bi 8005d14 <_Objects_Get_name_as_string+0x2c>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
8005e18: b9 60 10 00 mv r2,r11
8005e1c: e3 ff ff fb bi 8005e08 <_Objects_Get_name_as_string+0x120>
08017820 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
8017820: 37 9c ff f4 addi sp,sp,-12
8017824: 5b 8b 00 0c sw (sp+12),r11
8017828: 5b 8c 00 08 sw (sp+8),r12
801782c: 5b 9d 00 04 sw (sp+4),ra
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
8017830: 28 25 00 08 lw r5,(r1+8)
if ( information->maximum >= index ) {
8017834: 2c 24 00 10 lhu r4,(r1+16)
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
8017838: b8 60 58 00 mv r11,r3
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
801783c: c8 45 10 00 sub r2,r2,r5
8017840: 34 42 00 01 addi r2,r2,1
if ( information->maximum >= index ) {
8017844: 54 44 00 0f bgu r2,r4,8017880 <_Objects_Get_no_protection+0x60>
if ( (the_object = information->local_table[ index ]) != NULL ) {
8017848: 28 2c 00 1c lw r12,(r1+28)
801784c: b8 40 08 00 mv r1,r2
8017850: 34 02 00 02 mvi r2,2
8017854: fb ff d9 a9 calli 800def8 <__ashlsi3>
8017858: b5 81 08 00 add r1,r12,r1
801785c: 28 21 00 00 lw r1,(r1+0)
8017860: 44 20 00 08 be r1,r0,8017880 <_Objects_Get_no_protection+0x60><== NEVER TAKEN
*location = OBJECTS_LOCAL;
8017864: 34 02 00 00 mvi r2,0
8017868: 59 62 00 00 sw (r11+0),r2
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
return NULL;
}
801786c: 2b 9d 00 04 lw ra,(sp+4)
8017870: 2b 8b 00 0c lw r11,(sp+12)
8017874: 2b 8c 00 08 lw r12,(sp+8)
8017878: 37 9c 00 0c addi sp,sp,12
801787c: c3 a0 00 00 ret
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
8017880: 34 01 00 01 mvi r1,1
8017884: 59 61 00 00 sw (r11+0),r1
8017888: 34 01 00 00 mvi r1,0
return NULL;
}
801788c: 2b 9d 00 04 lw ra,(sp+4)
8017890: 2b 8b 00 0c lw r11,(sp+12)
8017894: 2b 8c 00 08 lw r12,(sp+8)
8017898: 37 9c 00 0c addi sp,sp,12
801789c: c3 a0 00 00 ret
08005728 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
8005728: 37 9c ff ec addi sp,sp,-20
800572c: 5b 8b 00 10 sw (sp+16),r11
8005730: 5b 8c 00 0c sw (sp+12),r12
8005734: 5b 8d 00 08 sw (sp+8),r13
8005738: 5b 9d 00 04 sw (sp+4),ra
800573c: b8 40 68 00 mv r13,r2
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
8005740: b8 20 58 00 mv r11,r1
8005744: 5c 20 00 05 bne r1,r0,8005758 <_Objects_Id_to_name+0x30>
8005748: 78 01 08 02 mvhi r1,0x802
800574c: 38 21 29 40 ori r1,r1,0x2940
8005750: 28 21 00 00 lw r1,(r1+0)
8005754: 28 2b 00 08 lw r11,(r1+8)
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
8005758: b9 60 08 00 mv r1,r11
800575c: 34 02 00 18 mvi r2,24
8005760: fb ff ef b3 calli 800162c <__lshrsi3>
8005764: 20 21 00 07 andi r1,r1,0x7
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
8005768: 34 24 ff ff addi r4,r1,-1
800576c: 34 03 00 03 mvi r3,3
8005770: 54 83 00 1e bgu r4,r3,80057e8 <_Objects_Id_to_name+0xc0>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
8005774: 78 0c 08 02 mvhi r12,0x802
8005778: 34 02 00 02 mvi r2,2
800577c: 39 8c 28 1c ori r12,r12,0x281c
8005780: fb ff ef 83 calli 800158c <__ashlsi3>
8005784: b5 81 08 00 add r1,r12,r1
8005788: 28 2c 00 00 lw r12,(r1+0)
800578c: 45 80 00 17 be r12,r0,80057e8 <_Objects_Id_to_name+0xc0>
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
8005790: 34 02 00 1b mvi r2,27
8005794: b9 60 08 00 mv r1,r11
8005798: fb ff ef a5 calli 800162c <__lshrsi3>
800579c: 34 02 00 02 mvi r2,2
80057a0: fb ff ef 7b calli 800158c <__ashlsi3>
80057a4: b5 81 08 00 add r1,r12,r1
80057a8: 28 21 00 00 lw r1,(r1+0)
if ( !information )
80057ac: 44 20 00 0f be r1,r0,80057e8 <_Objects_Id_to_name+0xc0> <== 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 );
80057b0: b9 60 10 00 mv r2,r11
80057b4: 37 83 00 14 addi r3,sp,20
80057b8: f8 00 16 73 calli 800b184 <_Objects_Get>
if ( !the_object )
80057bc: 44 20 00 0b be r1,r0,80057e8 <_Objects_Id_to_name+0xc0>
return OBJECTS_INVALID_ID;
*name = the_object->name;
80057c0: 28 21 00 0c lw r1,(r1+12)
80057c4: 59 a1 00 00 sw (r13+0),r1
_Thread_Enable_dispatch();
80057c8: f8 00 02 6e calli 8006180 <_Thread_Enable_dispatch>
80057cc: 34 01 00 00 mvi r1,0
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
80057d0: 2b 9d 00 04 lw ra,(sp+4)
80057d4: 2b 8b 00 10 lw r11,(sp+16)
80057d8: 2b 8c 00 0c lw r12,(sp+12)
80057dc: 2b 8d 00 08 lw r13,(sp+8)
80057e0: 37 9c 00 14 addi sp,sp,20
80057e4: c3 a0 00 00 ret
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
80057e8: 34 01 00 03 mvi r1,3
}
80057ec: 2b 9d 00 04 lw ra,(sp+4)
80057f0: 2b 8b 00 10 lw r11,(sp+16)
80057f4: 2b 8c 00 0c lw r12,(sp+12)
80057f8: 2b 8d 00 08 lw r13,(sp+8)
80057fc: 37 9c 00 14 addi sp,sp,20
8005800: c3 a0 00 00 ret
08003d94 <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
8003d94: 37 9c ff e4 addi sp,sp,-28
8003d98: 5b 8b 00 1c sw (sp+28),r11
8003d9c: 5b 8c 00 18 sw (sp+24),r12
8003da0: 5b 8d 00 14 sw (sp+20),r13
8003da4: 5b 8e 00 10 sw (sp+16),r14
8003da8: 5b 8f 00 0c sw (sp+12),r15
8003dac: 5b 90 00 08 sw (sp+8),r16
8003db0: 5b 9d 00 04 sw (sp+4),ra
#endif
information->the_api = the_api;
information->the_class = the_class;
information->size = size;
information->local_table = 0;
8003db4: 34 06 00 00 mvi r6,0
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
8003db8: b8 20 58 00 mv r11,r1
8003dbc: 20 a5 ff ff andi r5,r5,0xffff
8003dc0: b8 40 78 00 mv r15,r2
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
information->size = size;
8003dc4: 58 25 00 18 sw (r1+24),r5
/*
* 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;
8003dc8: 0c 26 00 10 sh (r1+16),r6
#endif
information->the_api = the_api;
information->the_class = the_class;
information->size = size;
information->local_table = 0;
8003dcc: 58 26 00 1c sw (r1+28),r6
information->inactive_per_block = 0;
8003dd0: 58 26 00 30 sw (r1+48),r6
information->object_blocks = 0;
8003dd4: 58 26 00 34 sw (r1+52),r6
information->inactive = 0;
8003dd8: 0c 26 00 2c sh (r1+44),r6
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
8003ddc: 0d 63 00 04 sh (r11+4),r3
uint32_t maximum_per_allocation;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
8003de0: 59 62 00 00 sw (r11+0),r2
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
8003de4: 78 0d 08 01 mvhi r13,0x801
8003de8: 34 02 00 02 mvi r2,2
8003dec: b9 e0 08 00 mv r1,r15
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
8003df0: b8 80 60 00 mv r12,r4
8003df4: b8 60 70 00 mv r14,r3
8003df8: b8 e0 80 00 mv r16,r7
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
8003dfc: 39 ad d7 c4 ori r13,r13,0xd7c4
8003e00: fb ff f0 fc calli 80001f0 <__ashlsi3>
8003e04: b5 a1 08 00 add r1,r13,r1
8003e08: 28 2d 00 00 lw r13,(r1+0)
8003e0c: 34 02 00 02 mvi r2,2
8003e10: b9 c0 08 00 mv r1,r14
8003e14: fb ff f0 f7 calli 80001f0 <__ashlsi3>
8003e18: b5 a1 08 00 add r1,r13,r1
8003e1c: 58 2b 00 00 sw (r1+0),r11
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
8003e20: 34 02 00 1f mvi r2,31
8003e24: b9 80 08 00 mv r1,r12
8003e28: fb ff f1 1a calli 8000290 <__lshrsi3>
8003e2c: 20 22 00 ff andi r2,r1,0xff
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
8003e30: 78 05 7f ff mvhi r5,0x7fff
8003e34: 38 a5 ff ff ori r5,r5,0xffff
_Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
8003e38: 31 62 00 12 sb (r11+18),r2
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
8003e3c: a1 85 60 00 and r12,r12,r5
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
8003e40: 44 40 00 02 be r2,r0,8003e48 <_Objects_Initialize_information+0xb4>
8003e44: 45 80 00 2c be r12,r0,8003ef4 <_Objects_Initialize_information+0x160>
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;
8003e48: 78 01 08 01 mvhi r1,0x801
8003e4c: 38 21 d6 20 ori r1,r1,0xd620
8003e50: 59 61 00 1c sw (r11+28),r1
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
8003e54: 34 02 00 18 mvi r2,24
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
8003e58: 0d 6c 00 14 sh (r11+20),r12
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
8003e5c: b9 e0 08 00 mv r1,r15
8003e60: fb ff f0 e4 calli 80001f0 <__ashlsi3>
8003e64: 78 02 00 01 mvhi r2,0x1
8003e68: 38 42 00 00 ori r2,r2,0x0
8003e6c: b8 22 68 00 or r13,r1,r2
8003e70: 34 02 00 1b mvi r2,27
8003e74: b9 c0 08 00 mv r1,r14
8003e78: fb ff f0 de calli 80001f0 <__ashlsi3>
8003e7c: 7d 83 00 00 cmpnei r3,r12,0
8003e80: b9 a1 08 00 or r1,r13,r1
8003e84: b8 23 08 00 or r1,r1,r3
8003e88: 59 61 00 08 sw (r11+8),r1
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
8003e8c: 22 02 00 03 andi r2,r16,0x3
8003e90: ba 00 08 00 mv r1,r16
8003e94: 5c 40 00 14 bne r2,r0,8003ee4 <_Objects_Initialize_information+0x150><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8003e98: 35 63 00 24 addi r3,r11,36
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
8003e9c: 35 62 00 20 addi r2,r11,32
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
8003ea0: 0d 61 00 38 sh (r11+56),r1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
8003ea4: 34 01 00 00 mvi r1,0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8003ea8: 59 63 00 20 sw (r11+32),r3
the_chain->permanent_null = NULL;
8003eac: 59 61 00 24 sw (r11+36),r1
the_chain->last = _Chain_Head(the_chain);
8003eb0: 59 62 00 28 sw (r11+40),r2
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
8003eb4: 45 81 00 03 be r12,r1,8003ec0 <_Objects_Initialize_information+0x12c>
/*
* 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 );
8003eb8: b9 60 08 00 mv r1,r11
8003ebc: fb ff fe 84 calli 80038cc <_Objects_Extend_information>
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
8003ec0: 2b 9d 00 04 lw ra,(sp+4)
8003ec4: 2b 8b 00 1c lw r11,(sp+28)
8003ec8: 2b 8c 00 18 lw r12,(sp+24)
8003ecc: 2b 8d 00 14 lw r13,(sp+20)
8003ed0: 2b 8e 00 10 lw r14,(sp+16)
8003ed4: 2b 8f 00 0c lw r15,(sp+12)
8003ed8: 2b 90 00 08 lw r16,(sp+8)
8003edc: 37 9c 00 1c addi sp,sp,28
8003ee0: c3 a0 00 00 ret
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
8003ee4: 36 10 00 04 addi r16,r16,4 <== NOT EXECUTED
8003ee8: 34 01 ff fc mvi r1,-4 <== NOT EXECUTED
8003eec: a2 01 08 00 and r1,r16,r1 <== NOT EXECUTED
8003ef0: e3 ff ff ea bi 8003e98 <_Objects_Initialize_information+0x104><== NOT EXECUTED
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
_Internal_error_Occurred(
8003ef4: b9 80 08 00 mv r1,r12
8003ef8: 34 02 00 01 mvi r2,1
8003efc: 34 03 00 14 mvi r3,20
8003f00: fb ff fd ff calli 80036fc <_Internal_error_Occurred>
08003f80 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
8003f80: 37 9c ff ec addi sp,sp,-20
8003f84: 5b 8b 00 14 sw (sp+20),r11
8003f88: 5b 8c 00 10 sw (sp+16),r12
8003f8c: 5b 8d 00 0c sw (sp+12),r13
8003f90: 5b 8e 00 08 sw (sp+8),r14
8003f94: 5b 9d 00 04 sw (sp+4),ra
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
8003f98: 28 2c 00 08 lw r12,(r1+8)
block_count = (information->maximum - index_base) /
8003f9c: 2c 2d 00 14 lhu r13,(r1+20)
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
8003fa0: b8 20 70 00 mv r14,r1
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
8003fa4: 2c 21 00 10 lhu r1,(r1+16)
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
8003fa8: 21 8c ff ff andi r12,r12,0xffff
block_count = (information->maximum - index_base) /
8003fac: b9 a0 10 00 mv r2,r13
8003fb0: c8 2c 08 00 sub r1,r1,r12
8003fb4: f8 00 57 8f calli 8019df0 <__udivsi3>
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
8003fb8: 44 20 00 09 be r1,r0,8003fdc <_Objects_Shrink_information+0x5c><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
8003fbc: 29 c5 00 30 lw r5,(r14+48)
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
8003fc0: 34 0b 00 04 mvi r11,4
8003fc4: 34 03 00 00 mvi r3,0
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
8003fc8: 28 a2 00 00 lw r2,(r5+0)
8003fcc: 45 a2 00 11 be r13,r2,8004010 <_Objects_Shrink_information+0x90><== NEVER TAKEN
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
8003fd0: 34 63 00 01 addi r3,r3,1
if ( information->inactive_per_block[ block ] ==
8003fd4: b4 ab 10 00 add r2,r5,r11
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
8003fd8: 54 23 00 08 bgu r1,r3,8003ff8 <_Objects_Shrink_information+0x78>
return;
}
index_base += information->allocation_size;
}
}
8003fdc: 2b 9d 00 04 lw ra,(sp+4)
8003fe0: 2b 8b 00 14 lw r11,(sp+20)
8003fe4: 2b 8c 00 10 lw r12,(sp+16)
8003fe8: 2b 8d 00 0c lw r13,(sp+12)
8003fec: 2b 8e 00 08 lw r14,(sp+8)
8003ff0: 37 9c 00 14 addi sp,sp,20
8003ff4: c3 a0 00 00 ret
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
8003ff8: 28 42 00 00 lw r2,(r2+0)
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
8003ffc: b5 8d 60 00 add r12,r12,r13
8004000: 35 64 00 04 addi r4,r11,4
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
8004004: 45 a2 00 04 be r13,r2,8004014 <_Objects_Shrink_information+0x94>
8004008: b8 80 58 00 mv r11,r4
800400c: e3 ff ff f1 bi 8003fd0 <_Objects_Shrink_information+0x50>
8004010: b8 60 58 00 mv r11,r3 <== NOT EXECUTED
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
8004014: 29 c1 00 20 lw r1,(r14+32)
do {
index = _Objects_Get_index( the_object->id );
8004018: 28 22 00 08 lw r2,(r1+8)
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
800401c: 28 2d 00 00 lw r13,(r1+0)
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
do {
index = _Objects_Get_index( the_object->id );
8004020: 20 42 ff ff andi r2,r2,0xffff
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
8004024: 55 82 00 05 bgu r12,r2,8004038 <_Objects_Shrink_information+0xb8>
(index < (index_base + information->allocation_size))) {
8004028: 2d c3 00 14 lhu r3,(r14+20)
800402c: b5 83 18 00 add r3,r12,r3
8004030: 50 43 00 02 bgeu r2,r3,8004038 <_Objects_Shrink_information+0xb8>
_Chain_Extract( &extract_me->Node );
8004034: f8 00 12 73 calli 8008a00 <_Chain_Extract>
}
}
while ( the_object );
8004038: 45 a0 00 03 be r13,r0,8004044 <_Objects_Shrink_information+0xc4>
800403c: b9 a0 08 00 mv r1,r13
8004040: e3 ff ff f6 bi 8004018 <_Objects_Shrink_information+0x98>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
8004044: 29 c1 00 34 lw r1,(r14+52)
8004048: b4 2b 08 00 add r1,r1,r11
800404c: 28 21 00 00 lw r1,(r1+0)
8004050: f8 00 07 bf calli 8005f4c <_Workspace_Free>
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
8004054: 2d c3 00 2c lhu r3,(r14+44)
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
8004058: 29 c1 00 34 lw r1,(r14+52)
information->inactive_per_block[ block ] = 0;
800405c: 29 c4 00 30 lw r4,(r14+48)
information->inactive -= information->allocation_size;
8004060: 2d c2 00 14 lhu r2,(r14+20)
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
8004064: b4 2b 08 00 add r1,r1,r11
information->inactive_per_block[ block ] = 0;
8004068: b4 8b 58 00 add r11,r4,r11
information->inactive -= information->allocation_size;
800406c: c8 62 10 00 sub r2,r3,r2
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
8004070: 59 6d 00 00 sw (r11+0),r13
information->inactive -= information->allocation_size;
8004074: 0d c2 00 2c sh (r14+44),r2
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
8004078: 58 2d 00 00 sw (r1+0),r13
return;
}
index_base += information->allocation_size;
}
}
800407c: 2b 9d 00 04 lw ra,(sp+4)
8004080: 2b 8b 00 14 lw r11,(sp+20)
8004084: 2b 8c 00 10 lw r12,(sp+16)
8004088: 2b 8d 00 0c lw r13,(sp+12)
800408c: 2b 8e 00 08 lw r14,(sp+8)
8004090: 37 9c 00 14 addi sp,sp,20
8004094: c3 a0 00 00 ret
080026b4 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
80026b4: 37 9c ff e8 addi sp,sp,-24
80026b8: 5b 8b 00 14 sw (sp+20),r11
80026bc: 5b 8c 00 10 sw (sp+16),r12
80026c0: 5b 8d 00 0c sw (sp+12),r13
80026c4: 5b 8e 00 08 sw (sp+8),r14
80026c8: 5b 9d 00 04 sw (sp+4),ra
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
80026cc: 78 01 08 01 mvhi r1,0x801
80026d0: 38 21 d0 8c ori r1,r1,0xd08c
80026d4: 28 2b 00 2c lw r11,(r1+44)
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
80026d8: 28 2e 00 28 lw r14,(r1+40)
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
80026dc: 45 60 00 15 be r11,r0,8002730 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
80026e0: 45 c0 00 14 be r14,r0,8002730 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c><== NEVER TAKEN
80026e4: 34 0c 00 00 mvi r12,0
return_value = rtems_task_create(
80026e8: 29 61 00 00 lw r1,(r11+0)
80026ec: 29 62 00 08 lw r2,(r11+8)
80026f0: 29 63 00 04 lw r3,(r11+4)
80026f4: 29 64 00 14 lw r4,(r11+20)
80026f8: 29 65 00 0c lw r5,(r11+12)
80026fc: 37 86 00 18 addi r6,sp,24
8002700: fb ff ff 3a calli 80023e8 <rtems_task_create>
8002704: b8 20 68 00 mv r13,r1
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
8002708: 5c 20 00 11 bne r1,r0,800274c <_RTEMS_tasks_Initialize_user_tasks_body+0x98>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
800270c: 29 63 00 18 lw r3,(r11+24)
8002710: 2b 81 00 18 lw r1,(sp+24)
8002714: 29 62 00 10 lw r2,(r11+16)
8002718: f8 00 00 14 calli 8002768 <rtems_task_start>
800271c: b8 20 18 00 mv r3,r1
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
8002720: 5c 2d 00 0f bne r1,r13,800275c <_RTEMS_tasks_Initialize_user_tasks_body+0xa8>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
8002724: 35 8c 00 01 addi r12,r12,1
8002728: 35 6b 00 1c addi r11,r11,28
800272c: 55 cc ff ef bgu r14,r12,80026e8 <_RTEMS_tasks_Initialize_user_tasks_body+0x34><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
8002730: 2b 9d 00 04 lw ra,(sp+4)
8002734: 2b 8b 00 14 lw r11,(sp+20)
8002738: 2b 8c 00 10 lw r12,(sp+16)
800273c: 2b 8d 00 0c lw r13,(sp+12)
8002740: 2b 8e 00 08 lw r14,(sp+8)
8002744: 37 9c 00 18 addi sp,sp,24
8002748: c3 a0 00 00 ret
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
800274c: 34 01 00 01 mvi r1,1
8002750: b9 a0 18 00 mv r3,r13
8002754: b8 20 10 00 mv r2,r1
8002758: f8 00 03 e9 calli 80036fc <_Internal_error_Occurred>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
800275c: 34 01 00 01 mvi r1,1
8002760: b8 20 10 00 mv r2,r1
8002764: f8 00 03 e6 calli 80036fc <_Internal_error_Occurred>
0800870c <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
800870c: 37 9c ff f0 addi sp,sp,-16
8008710: 5b 8b 00 0c sw (sp+12),r11
8008714: 5b 8c 00 08 sw (sp+8),r12
8008718: 5b 9d 00 04 sw (sp+4),ra
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
800871c: 28 2b 01 24 lw r11,(r1+292)
if ( !api )
8008720: 45 60 00 1b be r11,r0,800878c <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
8008724: 90 00 10 00 rcsr r2,IE
8008728: 34 01 ff fe mvi r1,-2
800872c: a0 41 08 00 and r1,r2,r1
8008730: d0 01 00 00 wcsr IE,r1
signal_set = asr->signals_posted;
asr->signals_posted = 0;
8008734: 34 01 00 00 mvi r1,0
*/
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
8008738: 29 6c 00 14 lw r12,(r11+20)
asr->signals_posted = 0;
800873c: 59 61 00 14 sw (r11+20),r1
_ISR_Enable( level );
8008740: d0 02 00 00 wcsr IE,r2
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
8008744: 45 80 00 12 be r12,r0,800878c <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN
return;
asr->nest_level += 1;
8008748: 29 63 00 1c lw r3,(r11+28)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
800874c: 29 61 00 10 lw r1,(r11+16)
8008750: 38 02 ff ff mvu r2,0xffff
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
8008754: 34 63 00 01 addi r3,r3,1
8008758: 59 63 00 1c sw (r11+28),r3
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
800875c: 37 83 00 10 addi r3,sp,16
8008760: f8 00 09 ca calli 800ae88 <rtems_task_mode>
(*asr->handler)( signal_set );
8008764: 29 62 00 0c lw r2,(r11+12)
8008768: b9 80 08 00 mv r1,r12
800876c: d8 40 00 00 call r2
asr->nest_level -= 1;
8008770: 29 63 00 1c lw r3,(r11+28)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
8008774: 2b 81 00 10 lw r1,(sp+16)
8008778: 38 02 ff ff mvu r2,0xffff
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
800877c: 34 63 ff ff addi r3,r3,-1
8008780: 59 63 00 1c sw (r11+28),r3
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
8008784: 37 83 00 10 addi r3,sp,16
8008788: f8 00 09 c0 calli 800ae88 <rtems_task_mode>
}
800878c: 2b 9d 00 04 lw ra,(sp+4)
8008790: 2b 8b 00 0c lw r11,(sp+12)
8008794: 2b 8c 00 08 lw r12,(sp+8)
8008798: 37 9c 00 10 addi sp,sp,16
800879c: c3 a0 00 00 ret
08008640 <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
8008640: 28 21 01 34 lw r1,(r1+308)
while (tvp) {
8008644: 44 20 00 08 be r1,r0,8008664 <_RTEMS_tasks_Switch_extension+0x24>
tvp->tval = *tvp->ptr;
8008648: 28 23 00 04 lw r3,(r1+4)
800864c: 28 64 00 00 lw r4,(r3+0)
8008650: 58 24 00 0c sw (r1+12),r4
*tvp->ptr = tvp->gval;
8008654: 28 24 00 08 lw r4,(r1+8)
tvp = (rtems_task_variable_t *)tvp->next;
8008658: 28 21 00 00 lw r1,(r1+0)
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
800865c: 58 64 00 00 sw (r3+0),r4
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
8008660: 5c 20 ff fa bne r1,r0,8008648 <_RTEMS_tasks_Switch_extension+0x8><== NEVER TAKEN
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
8008664: 28 41 01 34 lw r1,(r2+308)
while (tvp) {
8008668: 44 20 00 08 be r1,r0,8008688 <_RTEMS_tasks_Switch_extension+0x48>
tvp->gval = *tvp->ptr;
800866c: 28 22 00 04 lw r2,(r1+4)
*tvp->ptr = tvp->tval;
8008670: 28 24 00 0c lw r4,(r1+12)
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
8008674: 28 43 00 00 lw r3,(r2+0)
8008678: 58 23 00 08 sw (r1+8),r3
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
800867c: 28 21 00 00 lw r1,(r1+0)
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
8008680: 58 44 00 00 sw (r2+0),r4
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
8008684: 5c 20 ff fa bne r1,r0,800866c <_RTEMS_tasks_Switch_extension+0x2c><== NEVER TAKEN
8008688: c3 a0 00 00 ret
08003f0c <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
8003f0c: 37 9c ff f4 addi sp,sp,-12
8003f10: 5b 8b 00 08 sw (sp+8),r11
8003f14: 5b 9d 00 04 sw (sp+4),ra
8003f18: b8 20 10 00 mv r2,r1
8003f1c: 78 01 08 02 mvhi r1,0x802
8003f20: 38 21 28 04 ori r1,r1,0x2804
8003f24: 37 83 00 0c addi r3,sp,12
8003f28: f8 00 08 27 calli 8005fc4 <_Objects_Get>
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
8003f2c: 2b 82 00 0c lw r2,(sp+12)
8003f30: b8 20 58 00 mv r11,r1
8003f34: 44 40 00 05 be r2,r0,8003f48 <_Rate_monotonic_Timeout+0x3c><== ALWAYS TAKEN
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
8003f38: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003f3c: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8003f40: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8003f44: c3 a0 00 00 ret <== NOT EXECUTED
*/
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_thread = the_period->owner;
8003f48: 28 21 00 40 lw r1,(r1+64)
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
8003f4c: 28 23 00 10 lw r3,(r1+16)
8003f50: 20 63 40 00 andi r3,r3,0x4000
8003f54: 44 62 00 04 be r3,r2,8003f64 <_Rate_monotonic_Timeout+0x58>
the_thread->Wait.id == the_period->Object.id ) {
8003f58: 28 23 00 20 lw r3,(r1+32)
8003f5c: 29 62 00 08 lw r2,(r11+8)
8003f60: 44 62 00 1a be r3,r2,8003fc8 <_Rate_monotonic_Timeout+0xbc>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
8003f64: 29 62 00 38 lw r2,(r11+56)
8003f68: 34 01 00 01 mvi r1,1
8003f6c: 44 41 00 0c be r2,r1,8003f9c <_Rate_monotonic_Timeout+0x90><== NEVER TAKEN
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
8003f70: 34 01 00 04 mvi r1,4
8003f74: 59 61 00 38 sw (r11+56),r1
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
8003f78: 78 01 08 02 mvhi r1,0x802
8003f7c: 38 21 29 3c ori r1,r1,0x293c
8003f80: 28 22 00 00 lw r2,(r1+0)
8003f84: 34 42 ff ff addi r2,r2,-1
8003f88: 58 22 00 00 sw (r1+0),r2
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
8003f8c: 2b 9d 00 04 lw ra,(sp+4)
8003f90: 2b 8b 00 08 lw r11,(sp+8)
8003f94: 37 9c 00 0c addi sp,sp,12
8003f98: c3 a0 00 00 ret
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
8003f9c: 34 01 00 03 mvi r1,3 <== NOT EXECUTED
8003fa0: 59 61 00 38 sw (r11+56),r1 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
8003fa4: b9 60 08 00 mv r1,r11
8003fa8: fb ff fd c7 calli 80036c4 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8003fac: 29 61 00 3c lw r1,(r11+60)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003fb0: 35 62 00 10 addi r2,r11,16
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8003fb4: 59 61 00 1c sw (r11+28),r1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003fb8: 78 01 08 02 mvhi r1,0x802
8003fbc: 38 21 2a 18 ori r1,r1,0x2a18
8003fc0: f8 00 10 93 calli 800820c <_Watchdog_Insert>
8003fc4: e3 ff ff ed bi 8003f78 <_Rate_monotonic_Timeout+0x6c>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
8003fc8: 78 02 10 03 mvhi r2,0x1003
8003fcc: 38 42 ff f8 ori r2,r2,0xfff8
8003fd0: f8 00 09 88 calli 80065f0 <_Thread_Clear_state>
8003fd4: e3 ff ff f4 bi 8003fa4 <_Rate_monotonic_Timeout+0x98>
08003858 <_Rate_monotonic_Update_statistics>:
}
void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
8003858: 37 9c ff e0 addi sp,sp,-32
800385c: 5b 8b 00 10 sw (sp+16),r11
8003860: 5b 8c 00 0c sw (sp+12),r12
8003864: 5b 8d 00 08 sw (sp+8),r13
8003868: 5b 9d 00 04 sw (sp+4),ra
800386c: b8 20 58 00 mv r11,r1
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
8003870: 28 21 00 54 lw r1,(r1+84)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
8003874: 29 62 00 38 lw r2,(r11+56)
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
8003878: 34 21 00 01 addi r1,r1,1
800387c: 59 61 00 54 sw (r11+84),r1
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
8003880: 34 01 00 04 mvi r1,4
8003884: 44 41 00 36 be r2,r1,800395c <_Rate_monotonic_Update_statistics+0x104>
/*
* Grab status for time statistics.
*/
valid_status =
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
8003888: 37 8c 00 14 addi r12,sp,20
800388c: 37 8d 00 1c addi r13,sp,28
8003890: b9 60 08 00 mv r1,r11
8003894: b9 80 10 00 mv r2,r12
8003898: b9 a0 18 00 mv r3,r13
800389c: fb ff ff b5 calli 8003770 <_Rate_monotonic_Get_status>
if (!valid_status)
80038a0: 5c 20 00 07 bne r1,r0,80038bc <_Rate_monotonic_Update_statistics+0x64><== ALWAYS TAKEN
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
80038a4: 2b 9d 00 04 lw ra,(sp+4)
80038a8: 2b 8b 00 10 lw r11,(sp+16)
80038ac: 2b 8c 00 0c lw r12,(sp+12)
80038b0: 2b 8d 00 08 lw r13,(sp+8)
80038b4: 37 9c 00 20 addi sp,sp,32
80038b8: c3 a0 00 00 ret
/*
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
80038bc: b9 a0 10 00 mv r2,r13
80038c0: 35 61 00 6c addi r1,r11,108
80038c4: f8 00 10 f2 calli 8007c8c <_Timespec_Add_to>
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
80038c8: b9 a0 08 00 mv r1,r13
80038cc: 35 62 00 5c addi r2,r11,92
80038d0: f8 00 11 4a calli 8007df8 <_Timespec_Less_than>
80038d4: 44 20 00 05 be r1,r0,80038e8 <_Rate_monotonic_Update_statistics+0x90>
stats->min_cpu_time = executed;
80038d8: 2b 81 00 1c lw r1,(sp+28)
80038dc: 59 61 00 5c sw (r11+92),r1
80038e0: 2b 81 00 20 lw r1,(sp+32)
80038e4: 59 61 00 60 sw (r11+96),r1
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
80038e8: b9 a0 08 00 mv r1,r13
80038ec: 35 62 00 64 addi r2,r11,100
80038f0: f8 00 11 36 calli 8007dc8 <_Timespec_Greater_than>
80038f4: 44 20 00 05 be r1,r0,8003908 <_Rate_monotonic_Update_statistics+0xb0>
stats->max_cpu_time = executed;
80038f8: 2b 81 00 1c lw r1,(sp+28)
80038fc: 59 61 00 64 sw (r11+100),r1
8003900: 2b 81 00 20 lw r1,(sp+32)
8003904: 59 61 00 68 sw (r11+104),r1
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
8003908: b9 80 10 00 mv r2,r12
800390c: 35 61 00 84 addi r1,r11,132
8003910: f8 00 10 df calli 8007c8c <_Timespec_Add_to>
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
8003914: b9 80 08 00 mv r1,r12
8003918: 35 62 00 74 addi r2,r11,116
800391c: f8 00 11 37 calli 8007df8 <_Timespec_Less_than>
8003920: 5c 20 00 13 bne r1,r0,800396c <_Rate_monotonic_Update_statistics+0x114>
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
8003924: b9 80 08 00 mv r1,r12
8003928: 35 62 00 7c addi r2,r11,124
800392c: f8 00 11 27 calli 8007dc8 <_Timespec_Greater_than>
8003930: 44 20 ff dd be r1,r0,80038a4 <_Rate_monotonic_Update_statistics+0x4c>
stats->max_wall_time = since_last_period;
8003934: 2b 81 00 18 lw r1,(sp+24)
8003938: 59 61 00 80 sw (r11+128),r1
800393c: 2b 81 00 14 lw r1,(sp+20)
8003940: 59 61 00 7c sw (r11+124),r1
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
8003944: 2b 9d 00 04 lw ra,(sp+4)
8003948: 2b 8b 00 10 lw r11,(sp+16)
800394c: 2b 8c 00 0c lw r12,(sp+12)
8003950: 2b 8d 00 08 lw r13,(sp+8)
8003954: 37 9c 00 20 addi sp,sp,32
8003958: c3 a0 00 00 ret
*/
stats = &the_period->Statistics;
stats->count++;
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
stats->missed_count++;
800395c: 29 61 00 58 lw r1,(r11+88)
8003960: 34 21 00 01 addi r1,r1,1
8003964: 59 61 00 58 sw (r11+88),r1
8003968: e3 ff ff c8 bi 8003888 <_Rate_monotonic_Update_statistics+0x30>
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
stats->min_wall_time = since_last_period;
800396c: 2b 81 00 14 lw r1,(sp+20)
8003970: 59 61 00 74 sw (r11+116),r1
8003974: 2b 81 00 18 lw r1,(sp+24)
8003978: 59 61 00 78 sw (r11+120),r1
800397c: e3 ff ff ea bi 8003924 <_Rate_monotonic_Update_statistics+0xcc>
08008cb4 <_TOD_Get>:
*/
void _TOD_Get(
struct timespec *time
)
{
8008cb4: 37 9c ff e4 addi sp,sp,-28
8008cb8: 5b 8b 00 0c sw (sp+12),r11
8008cbc: 5b 8c 00 08 sw (sp+8),r12
8008cc0: 5b 9d 00 04 sw (sp+4),ra
8008cc4: b8 20 58 00 mv r11,r1
/* assume time checked for NULL by caller */
/* _TOD_Now is the native current time */
nanoseconds = 0;
_ISR_Disable( level );
8008cc8: 90 00 60 00 rcsr r12,IE
8008ccc: 34 01 ff fe mvi r1,-2
8008cd0: a1 81 08 00 and r1,r12,r1
8008cd4: d0 01 00 00 wcsr IE,r1
now = _TOD_Now;
8008cd8: 78 02 08 01 mvhi r2,0x801
8008cdc: 38 42 d8 bc ori r2,r2,0xd8bc
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008ce0: 78 03 08 01 mvhi r3,0x801
/* assume time checked for NULL by caller */
/* _TOD_Now is the native current time */
nanoseconds = 0;
_ISR_Disable( level );
now = _TOD_Now;
8008ce4: 28 41 00 04 lw r1,(r2+4)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008ce8: 38 63 d9 cc ori r3,r3,0xd9cc
/* assume time checked for NULL by caller */
/* _TOD_Now is the native current time */
nanoseconds = 0;
_ISR_Disable( level );
now = _TOD_Now;
8008cec: 28 42 00 00 lw r2,(r2+0)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008cf0: 28 63 00 00 lw r3,(r3+0)
/* assume time checked for NULL by caller */
/* _TOD_Now is the native current time */
nanoseconds = 0;
_ISR_Disable( level );
now = _TOD_Now;
8008cf4: 5b 81 00 14 sw (sp+20),r1
8008cf8: 5b 82 00 10 sw (sp+16),r2
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008cfc: b8 60 20 00 mv r4,r3
8008d00: 44 60 00 03 be r3,r0,8008d0c <_TOD_Get+0x58> <== ALWAYS TAKEN
nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)();
8008d04: d8 60 00 00 call r3 <== NOT EXECUTED
8008d08: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
_ISR_Enable( level );
8008d0c: d0 0c 00 00 wcsr IE,r12
_Timestamp_Set( &offset, 0, nanoseconds );
8008d10: 34 03 00 00 mvi r3,0
_Timestamp_Add_to( &now, &offset );
8008d14: 37 81 00 10 addi r1,sp,16
8008d18: 37 82 00 18 addi r2,sp,24
now = _TOD_Now;
if ( _Watchdog_Nanoseconds_since_tick_handler )
nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)();
_ISR_Enable( level );
_Timestamp_Set( &offset, 0, nanoseconds );
8008d1c: 5b 83 00 18 sw (sp+24),r3
8008d20: 5b 84 00 1c sw (sp+28),r4
_Timestamp_Add_to( &now, &offset );
8008d24: fb ff f2 6d calli 80056d8 <_Timespec_Add_to>
_Timestamp_To_timespec( &now, time );
8008d28: 2b 81 00 14 lw r1,(sp+20)
8008d2c: 59 61 00 04 sw (r11+4),r1
8008d30: 2b 81 00 10 lw r1,(sp+16)
8008d34: 59 61 00 00 sw (r11+0),r1
}
8008d38: 2b 9d 00 04 lw ra,(sp+4)
8008d3c: 2b 8b 00 0c lw r11,(sp+12)
8008d40: 2b 8c 00 08 lw r12,(sp+8)
8008d44: 37 9c 00 1c addi sp,sp,28
8008d48: c3 a0 00 00 ret
08008d4c <_TOD_Get_uptime>:
*/
void _TOD_Get_uptime(
Timestamp_Control *uptime
)
{
8008d4c: 37 9c ff e4 addi sp,sp,-28
8008d50: 5b 8b 00 0c sw (sp+12),r11
8008d54: 5b 8c 00 08 sw (sp+8),r12
8008d58: 5b 9d 00 04 sw (sp+4),ra
8008d5c: b8 20 58 00 mv r11,r1
/* assume time checked for NULL by caller */
/* _TOD_Uptime is in native timestamp format */
nanoseconds = 0;
_ISR_Disable( level );
8008d60: 90 00 60 00 rcsr r12,IE
8008d64: 34 01 ff fe mvi r1,-2
8008d68: a1 81 08 00 and r1,r12,r1
8008d6c: d0 01 00 00 wcsr IE,r1
up = _TOD_Uptime;
8008d70: 78 02 08 01 mvhi r2,0x801
8008d74: 38 42 d8 ac ori r2,r2,0xd8ac
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008d78: 78 03 08 01 mvhi r3,0x801
/* assume time checked for NULL by caller */
/* _TOD_Uptime is in native timestamp format */
nanoseconds = 0;
_ISR_Disable( level );
up = _TOD_Uptime;
8008d7c: 28 41 00 04 lw r1,(r2+4)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008d80: 38 63 d9 cc ori r3,r3,0xd9cc
/* assume time checked for NULL by caller */
/* _TOD_Uptime is in native timestamp format */
nanoseconds = 0;
_ISR_Disable( level );
up = _TOD_Uptime;
8008d84: 28 42 00 00 lw r2,(r2+0)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008d88: 28 63 00 00 lw r3,(r3+0)
/* assume time checked for NULL by caller */
/* _TOD_Uptime is in native timestamp format */
nanoseconds = 0;
_ISR_Disable( level );
up = _TOD_Uptime;
8008d8c: 5b 81 00 14 sw (sp+20),r1
8008d90: 5b 82 00 10 sw (sp+16),r2
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008d94: b8 60 20 00 mv r4,r3
8008d98: 44 60 00 03 be r3,r0,8008da4 <_TOD_Get_uptime+0x58> <== ALWAYS TAKEN
nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)();
8008d9c: d8 60 00 00 call r3 <== NOT EXECUTED
8008da0: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
_ISR_Enable( level );
8008da4: d0 0c 00 00 wcsr IE,r12
_Timestamp_Set( &offset, 0, nanoseconds );
8008da8: 34 03 00 00 mvi r3,0
_Timestamp_Add_to( &up, &offset );
8008dac: 37 81 00 10 addi r1,sp,16
8008db0: 37 82 00 18 addi r2,sp,24
up = _TOD_Uptime;
if ( _Watchdog_Nanoseconds_since_tick_handler )
nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)();
_ISR_Enable( level );
_Timestamp_Set( &offset, 0, nanoseconds );
8008db4: 5b 83 00 18 sw (sp+24),r3
8008db8: 5b 84 00 1c sw (sp+28),r4
_Timestamp_Add_to( &up, &offset );
8008dbc: fb ff f2 47 calli 80056d8 <_Timespec_Add_to>
*uptime = up;
8008dc0: 2b 81 00 14 lw r1,(sp+20)
8008dc4: 59 61 00 04 sw (r11+4),r1
8008dc8: 2b 81 00 10 lw r1,(sp+16)
8008dcc: 59 61 00 00 sw (r11+0),r1
}
8008dd0: 2b 9d 00 04 lw ra,(sp+4)
8008dd4: 2b 8b 00 0c lw r11,(sp+12)
8008dd8: 2b 8c 00 08 lw r12,(sp+8)
8008ddc: 37 9c 00 1c addi sp,sp,28
8008de0: c3 a0 00 00 ret
080031e8 <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
80031e8: 37 9c ff ec addi sp,sp,-20
80031ec: 5b 8b 00 0c sw (sp+12),r11
80031f0: 5b 8c 00 08 sw (sp+8),r12
80031f4: 5b 9d 00 04 sw (sp+4),ra
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
80031f8: 78 01 08 01 mvhi r1,0x801
80031fc: 38 21 d0 c4 ori r1,r1,0xd0c4
8003200: 28 21 00 0c lw r1,(r1+12)
8003204: 34 03 00 00 mvi r3,0
8003208: 34 02 03 e8 mvi r2,1000
800320c: 5b 83 00 10 sw (sp+16),r3
8003210: f8 00 5a 79 calli 8019bf4 <__mulsi3>
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
8003214: 78 03 08 01 mvhi r3,0x801
8003218: 38 63 d9 7c ori r3,r3,0xd97c
800321c: 28 64 00 00 lw r4,(r3+0)
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
8003220: 37 8b 00 10 addi r11,sp,16
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
8003224: 5b 81 00 14 sw (sp+20),r1
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
8003228: 34 84 00 01 addi r4,r4,1
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
800322c: 78 01 08 01 mvhi r1,0x801
8003230: b9 60 10 00 mv r2,r11
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
8003234: 58 64 00 00 sw (r3+0),r4
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
8003238: 38 21 d8 ac ori r1,r1,0xd8ac
800323c: f8 00 09 27 calli 80056d8 <_Timespec_Add_to>
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
8003240: 78 01 08 01 mvhi r1,0x801
8003244: b9 60 10 00 mv r2,r11
8003248: 38 21 d8 bc ori r1,r1,0xd8bc
800324c: f8 00 09 23 calli 80056d8 <_Timespec_Add_to>
8003250: b8 20 58 00 mv r11,r1
while ( seconds ) {
8003254: 44 20 00 07 be r1,r0,8003270 <_TOD_Tickle_ticks+0x88>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
8003258: 78 0c 08 01 mvhi r12,0x801
800325c: b9 80 08 00 mv r1,r12
_Watchdog_Tickle_seconds();
seconds--;
8003260: 35 6b ff ff addi r11,r11,-1
8003264: 38 21 d8 fc ori r1,r1,0xd8fc
8003268: f8 00 0a e3 calli 8005df4 <_Watchdog_Tickle>
_Timestamp_Add_to( &_TOD_Uptime, &tick );
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
while ( seconds ) {
800326c: 5d 60 ff fc bne r11,r0,800325c <_TOD_Tickle_ticks+0x74> <== NEVER TAKEN
_Watchdog_Tickle_seconds();
seconds--;
}
}
8003270: 2b 9d 00 04 lw ra,(sp+4)
8003274: 2b 8b 00 0c lw r11,(sp+12)
8003278: 2b 8c 00 08 lw r12,(sp+8)
800327c: 37 9c 00 14 addi sp,sp,20
8003280: c3 a0 00 00 ret
08003a50 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
8003a50: 37 9c ff f4 addi sp,sp,-12
8003a54: 5b 8b 00 0c sw (sp+12),r11
8003a58: 5b 8c 00 08 sw (sp+8),r12
8003a5c: 5b 9d 00 04 sw (sp+4),ra
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
8003a60: 78 02 08 02 mvhi r2,0x802
8003a64: 38 42 30 c4 ori r2,r2,0x30c4
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
8003a68: b8 20 58 00 mv r11,r1
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
8003a6c: 28 42 00 0c lw r2,(r2+12)
if ((!the_tod) ||
8003a70: 44 20 00 22 be r1,r0,8003af8 <_TOD_Validate+0xa8> <== NEVER TAKEN
8003a74: 78 01 00 0f mvhi r1,0xf
8003a78: 38 21 42 40 ori r1,r1,0x4240
8003a7c: f8 00 6d 1b calli 801eee8 <__udivsi3>
(the_tod->ticks >= ticks_per_second) ||
8003a80: 29 62 00 18 lw r2,(r11+24)
8003a84: 50 41 00 1d bgeu r2,r1,8003af8 <_TOD_Validate+0xa8>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
8003a88: 29 62 00 14 lw r2,(r11+20)
8003a8c: 34 01 00 3b mvi r1,59
8003a90: 54 41 00 1a bgu r2,r1,8003af8 <_TOD_Validate+0xa8>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
8003a94: 29 62 00 10 lw r2,(r11+16)
8003a98: 54 41 00 18 bgu r2,r1,8003af8 <_TOD_Validate+0xa8>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
8003a9c: 29 62 00 0c lw r2,(r11+12)
8003aa0: 34 01 00 17 mvi r1,23
8003aa4: 54 41 00 15 bgu r2,r1,8003af8 <_TOD_Validate+0xa8>
(the_tod->month == 0) ||
8003aa8: 29 61 00 04 lw r1,(r11+4)
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
8003aac: 44 20 00 13 be r1,r0,8003af8 <_TOD_Validate+0xa8> <== NEVER TAKEN
8003ab0: 34 02 00 0c mvi r2,12
8003ab4: 54 22 00 11 bgu r1,r2,8003af8 <_TOD_Validate+0xa8>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
8003ab8: 29 62 00 00 lw r2,(r11+0)
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
8003abc: 34 03 07 c3 mvi r3,1987
8003ac0: 50 62 00 0e bgeu r3,r2,8003af8 <_TOD_Validate+0xa8>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
8003ac4: 29 6b 00 08 lw r11,(r11+8)
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
8003ac8: 45 60 00 0c be r11,r0,8003af8 <_TOD_Validate+0xa8> <== NEVER TAKEN
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
8003acc: 20 42 00 03 andi r2,r2,0x3
8003ad0: 5c 40 00 02 bne r2,r0,8003ad8 <_TOD_Validate+0x88>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
8003ad4: 34 21 00 0d addi r1,r1,13
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
8003ad8: 78 0c 08 02 mvhi r12,0x802
8003adc: 34 02 00 02 mvi r2,2
8003ae0: fb ff f5 c4 calli 80011f0 <__ashlsi3>
8003ae4: 39 8c 0a 60 ori r12,r12,0xa60
8003ae8: b5 81 08 00 add r1,r12,r1
8003aec: 28 21 00 00 lw r1,(r1+0)
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
8003af0: f0 2b 08 00 cmpgeu r1,r1,r11
8003af4: e0 00 00 02 bi 8003afc <_TOD_Validate+0xac>
8003af8: 34 01 00 00 mvi r1,0
if ( the_tod->day > days_in_month )
return false;
return true;
}
8003afc: 2b 9d 00 04 lw ra,(sp+4)
8003b00: 2b 8b 00 0c lw r11,(sp+12)
8003b04: 2b 8c 00 08 lw r12,(sp+8)
8003b08: 37 9c 00 0c addi sp,sp,12
8003b0c: c3 a0 00 00 ret
080040a0 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
80040a0: 37 9c ff ec addi sp,sp,-20
80040a4: 5b 8b 00 14 sw (sp+20),r11
80040a8: 5b 8c 00 10 sw (sp+16),r12
80040ac: 5b 8d 00 0c sw (sp+12),r13
80040b0: 5b 8e 00 08 sw (sp+8),r14
80040b4: 5b 9d 00 04 sw (sp+4),ra
80040b8: b8 20 58 00 mv r11,r1
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
80040bc: 28 2d 00 10 lw r13,(r1+16)
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
80040c0: b8 40 60 00 mv r12,r2
80040c4: 20 6e 00 ff andi r14,r3,0xff
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
80040c8: f8 00 04 e0 calli 8005448 <_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 )
80040cc: 29 61 00 14 lw r1,(r11+20)
80040d0: 44 2c 00 04 be r1,r12,80040e0 <_Thread_Change_priority+0x40>
_Thread_Set_priority( the_thread, new_priority );
80040d4: b9 80 10 00 mv r2,r12
80040d8: b9 60 08 00 mv r1,r11
80040dc: f8 00 04 36 calli 80051b4 <_Thread_Set_priority>
_ISR_Disable( level );
80040e0: 90 00 60 00 rcsr r12,IE
80040e4: 34 02 ff fe mvi r2,-2
80040e8: a1 82 10 00 and r2,r12,r2
80040ec: d0 02 00 00 wcsr IE,r2
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
80040f0: 29 61 00 10 lw r1,(r11+16)
if ( state != STATES_TRANSIENT ) {
80040f4: 34 04 00 04 mvi r4,4
80040f8: 44 24 00 21 be r1,r4,800417c <_Thread_Change_priority+0xdc>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
80040fc: a1 a4 68 00 and r13,r13,r4
8004100: 45 a0 00 0d be r13,r0,8004134 <_Thread_Change_priority+0x94><== ALWAYS TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
8004104: d0 0c 00 00 wcsr IE,r12 <== NOT EXECUTED
if ( _States_Is_waiting_on_thread_queue( state ) ) {
8004108: 78 02 00 03 mvhi r2,0x3 <== NOT EXECUTED
800410c: 38 42 be e0 ori r2,r2,0xbee0 <== NOT EXECUTED
8004110: a0 22 08 00 and r1,r1,r2 <== NOT EXECUTED
8004114: 5c 20 00 10 bne r1,r0,8004154 <_Thread_Change_priority+0xb4><== NOT EXECUTED
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
8004118: 2b 9d 00 04 lw ra,(sp+4)
800411c: 2b 8b 00 14 lw r11,(sp+20)
8004120: 2b 8c 00 10 lw r12,(sp+16)
8004124: 2b 8d 00 0c lw r13,(sp+12)
8004128: 2b 8e 00 08 lw r14,(sp+8)
800412c: 37 9c 00 14 addi sp,sp,20
8004130: c3 a0 00 00 ret
*/
state = the_thread->current_state;
if ( state != STATES_TRANSIENT ) {
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
8004134: 34 02 ff fb mvi r2,-5
8004138: a0 22 10 00 and r2,r1,r2
800413c: 59 62 00 10 sw (r11+16),r2
_ISR_Enable( level );
8004140: d0 0c 00 00 wcsr IE,r12
if ( _States_Is_waiting_on_thread_queue( state ) ) {
8004144: 78 02 00 03 mvhi r2,0x3
8004148: 38 42 be e0 ori r2,r2,0xbee0
800414c: a0 22 08 00 and r1,r1,r2
8004150: 44 20 ff f2 be r1,r0,8004118 <_Thread_Change_priority+0x78>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
8004154: 29 61 00 44 lw r1,(r11+68)
8004158: b9 60 10 00 mv r2,r11
800415c: f8 00 03 db calli 80050c8 <_Thread_queue_Requeue>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
8004160: 2b 9d 00 04 lw ra,(sp+4)
8004164: 2b 8b 00 14 lw r11,(sp+20)
8004168: 2b 8c 00 10 lw r12,(sp+16)
800416c: 2b 8d 00 0c lw r13,(sp+12)
8004170: 2b 8e 00 08 lw r14,(sp+8)
8004174: 37 9c 00 14 addi sp,sp,20
8004178: c3 a0 00 00 ret
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
800417c: 21 ad 00 04 andi r13,r13,0x4
8004180: 45 a0 00 3a be r13,r0,8004268 <_Thread_Change_priority+0x1c8><== ALWAYS TAKEN
8004184: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8004188: 38 21 d8 dc ori r1,r1,0xd8dc <== NOT EXECUTED
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
800418c: d0 0c 00 00 wcsr IE,r12
8004190: d0 02 00 00 wcsr IE,r2
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
8004194: 2c 21 00 00 lhu r1,(r1+0)
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
_Thread_Ready_chain[ _Priority_Get_highest() ].first;
8004198: 78 02 08 01 mvhi r2,0x801
800419c: 38 42 d7 b8 ori r2,r2,0xd7b8
80041a0: 28 4e 00 00 lw r14,(r2+0)
80041a4: 20 21 ff ff andi r1,r1,0xffff
80041a8: 34 02 00 ff mvi r2,255
80041ac: 54 22 00 49 bgu r1,r2,80042d0 <_Thread_Change_priority+0x230>
80041b0: 78 0b 08 01 mvhi r11,0x801
80041b4: 39 6b b0 e4 ori r11,r11,0xb0e4
80041b8: b5 61 08 00 add r1,r11,r1
80041bc: 40 2d 00 00 lbu r13,(r1+0)
80041c0: 35 ad 00 08 addi r13,r13,8
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
80041c4: 78 02 08 01 mvhi r2,0x801
80041c8: b5 ad 08 00 add r1,r13,r13
80041cc: 38 42 d9 58 ori r2,r2,0xd958
80041d0: b4 41 10 00 add r2,r2,r1
80041d4: 2c 41 00 00 lhu r1,(r2+0)
80041d8: 34 02 00 ff mvi r2,255
80041dc: 54 22 00 38 bgu r1,r2,80042bc <_Thread_Change_priority+0x21c>
80041e0: b5 61 58 00 add r11,r11,r1
80041e4: 41 6b 00 00 lbu r11,(r11+0)
80041e8: 35 6b 00 08 addi r11,r11,8
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
80041ec: 34 02 00 04 mvi r2,4
80041f0: b9 a0 08 00 mv r1,r13
80041f4: fb ff ef ff calli 80001f0 <__ashlsi3>
80041f8: b5 61 08 00 add r1,r11,r1
80041fc: b4 21 10 00 add r2,r1,r1
8004200: b4 41 08 00 add r1,r2,r1
8004204: 34 02 00 02 mvi r2,2
8004208: fb ff ef fa calli 80001f0 <__ashlsi3>
800420c: b5 c1 08 00 add r1,r14,r1
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
8004210: 78 02 08 01 mvhi r2,0x801
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
8004214: 28 23 00 00 lw r3,(r1+0)
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
8004218: 38 42 d8 e8 ori r2,r2,0xd8e8
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
800421c: 78 01 08 01 mvhi r1,0x801
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
8004220: 28 42 00 00 lw r2,(r2+0)
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
8004224: 38 21 d8 b8 ori r1,r1,0xd8b8
8004228: 58 23 00 00 sw (r1+0),r3
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Thread_Calculate_heir();
if ( !_Thread_Is_executing_also_the_heir() &&
800422c: 44 62 00 07 be r3,r2,8004248 <_Thread_Change_priority+0x1a8>
_Thread_Executing->is_preemptible )
8004230: 40 41 00 75 lbu r1,(r2+117)
8004234: 44 20 00 05 be r1,r0,8004248 <_Thread_Change_priority+0x1a8>
_Context_Switch_necessary = true;
8004238: 78 01 08 01 mvhi r1,0x801
800423c: 38 21 d8 f8 ori r1,r1,0xd8f8
8004240: 34 02 00 01 mvi r2,1
8004244: 30 22 00 00 sb (r1+0),r2
_ISR_Enable( level );
8004248: d0 0c 00 00 wcsr IE,r12
}
800424c: 2b 9d 00 04 lw ra,(sp+4)
8004250: 2b 8b 00 14 lw r11,(sp+20)
8004254: 2b 8c 00 10 lw r12,(sp+16)
8004258: 2b 8d 00 0c lw r13,(sp+12)
800425c: 2b 8e 00 08 lw r14,(sp+8)
8004260: 37 9c 00 14 addi sp,sp,20
8004264: c3 a0 00 00 ret
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
8004268: 29 63 00 90 lw r3,(r11+144)
800426c: 2d 64 00 96 lhu r4,(r11+150)
_Priority_Major_bit_map |= the_priority_map->ready_major;
8004270: 78 01 08 01 mvhi r1,0x801
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
8004274: 2c 65 00 00 lhu r5,(r3+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
8004278: 38 21 d8 dc ori r1,r1,0xd8dc
* 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 );
800427c: 59 6d 00 10 sw (r11+16),r13
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
8004280: b8 a4 20 00 or r4,r5,r4
8004284: 0c 64 00 00 sh (r3+0),r4
_Priority_Major_bit_map |= the_priority_map->ready_major;
8004288: 2c 23 00 00 lhu r3,(r1+0)
800428c: 2d 64 00 94 lhu r4,(r11+148)
8004290: b8 83 18 00 or r3,r4,r3
8004294: 20 63 ff ff andi r3,r3,0xffff
8004298: 0c 23 00 00 sh (r1+0),r3
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
800429c: 45 cd 00 14 be r14,r13,80042ec <_Thread_Change_priority+0x24c>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
80042a0: 29 63 00 8c lw r3,(r11+140)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
80042a4: 28 64 00 00 lw r4,(r3+0)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
80042a8: 59 63 00 04 sw (r11+4),r3
before_node = after_node->next;
after_node->next = the_node;
80042ac: 58 6b 00 00 sw (r3+0),r11
the_node->next = before_node;
before_node->previous = the_node;
80042b0: 58 8b 00 04 sw (r4+4),r11
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
80042b4: 59 64 00 00 sw (r11+0),r4
80042b8: e3 ff ff b5 bi 800418c <_Thread_Change_priority+0xec>
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
80042bc: 34 02 00 08 mvi r2,8
80042c0: fb ff ef f4 calli 8000290 <__lshrsi3>
80042c4: b5 61 08 00 add r1,r11,r1
80042c8: 40 2b 00 00 lbu r11,(r1+0)
80042cc: e3 ff ff c8 bi 80041ec <_Thread_Change_priority+0x14c>
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
80042d0: 34 02 00 08 mvi r2,8
80042d4: 78 0b 08 01 mvhi r11,0x801
80042d8: fb ff ef ee calli 8000290 <__lshrsi3>
80042dc: 39 6b b0 e4 ori r11,r11,0xb0e4
80042e0: b5 61 08 00 add r1,r11,r1
80042e4: 40 2d 00 00 lbu r13,(r1+0)
80042e8: e3 ff ff b7 bi 80041c4 <_Thread_Change_priority+0x124>
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
80042ec: 29 63 00 8c lw r3,(r11+140)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
80042f0: 34 64 00 04 addi r4,r3,4
80042f4: 59 64 00 00 sw (r11+0),r4
old_last_node = the_chain->last;
80042f8: 28 64 00 08 lw r4,(r3+8)
the_chain->last = the_node;
80042fc: 58 6b 00 08 sw (r3+8),r11
old_last_node->next = the_node;
the_node->previous = old_last_node;
8004300: 59 64 00 04 sw (r11+4),r4
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
8004304: 58 8b 00 00 sw (r4+0),r11
8004308: e3 ff ff a1 bi 800418c <_Thread_Change_priority+0xec>
08009530 <_Thread_Clear_state>:
)
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
8009530: 90 00 18 00 rcsr r3,IE
8009534: 34 05 ff fe mvi r5,-2
8009538: a0 65 28 00 and r5,r3,r5
800953c: d0 05 00 00 wcsr IE,r5
current_state = the_thread->current_state;
8009540: 28 24 00 10 lw r4,(r1+16)
if ( current_state & state ) {
8009544: a0 44 30 00 and r6,r2,r4
8009548: 44 c0 00 2a be r6,r0,80095f0 <_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);
800954c: a4 40 10 00 not r2,r2
8009550: a0 44 20 00 and r4,r2,r4
current_state =
8009554: 58 24 00 10 sw (r1+16),r4
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
8009558: 5c 80 00 26 bne r4,r0,80095f0 <_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;
800955c: 28 26 00 90 lw r6,(r1+144)
8009560: 2c 27 00 96 lhu r7,(r1+150)
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
8009564: 28 24 00 8c lw r4,(r1+140)
8009568: 2c c8 00 00 lhu r8,(r6+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
800956c: 78 02 08 01 mvhi r2,0x801
8009570: 38 42 d8 dc ori r2,r2,0xd8dc
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
8009574: b9 07 38 00 or r7,r8,r7
8009578: 0c c7 00 00 sh (r6+0),r7
_Priority_Major_bit_map |= the_priority_map->ready_major;
800957c: 2c 47 00 00 lhu r7,(r2+0)
8009580: 2c 28 00 94 lhu r8,(r1+148)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
8009584: 34 86 00 04 addi r6,r4,4
8009588: 58 26 00 00 sw (r1+0),r6
old_last_node = the_chain->last;
800958c: 28 86 00 08 lw r6,(r4+8)
8009590: b9 07 38 00 or r7,r8,r7
the_chain->last = the_node;
8009594: 58 81 00 08 sw (r4+8),r1
8009598: 20 e4 ff ff andi r4,r7,0xffff
800959c: 0c 44 00 00 sh (r2+0),r4
old_last_node->next = the_node;
the_node->previous = old_last_node;
80095a0: 58 26 00 04 sw (r1+4),r6
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
80095a4: 58 c1 00 00 sw (r6+0),r1
_ISR_Flash( level );
80095a8: d0 03 00 00 wcsr IE,r3
80095ac: d0 05 00 00 wcsr IE,r5
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
80095b0: 78 02 08 01 mvhi r2,0x801
80095b4: 38 42 d8 b8 ori r2,r2,0xd8b8
80095b8: 28 44 00 00 lw r4,(r2+0)
80095bc: 28 25 00 14 lw r5,(r1+20)
80095c0: 28 84 00 14 lw r4,(r4+20)
80095c4: 50 a4 00 0b bgeu r5,r4,80095f0 <_Thread_Clear_state+0xc0>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
80095c8: 78 04 08 01 mvhi r4,0x801
80095cc: 38 84 d8 e8 ori r4,r4,0xd8e8
80095d0: 28 84 00 00 lw r4,(r4+0)
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
80095d4: 58 41 00 00 sw (r2+0),r1
if ( _Thread_Executing->is_preemptible ||
80095d8: 40 81 00 75 lbu r1,(r4+117)
80095dc: 44 20 00 07 be r1,r0,80095f8 <_Thread_Clear_state+0xc8>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
80095e0: 78 01 08 01 mvhi r1,0x801
80095e4: 38 21 d8 f8 ori r1,r1,0xd8f8
80095e8: 34 02 00 01 mvi r2,1
80095ec: 30 22 00 00 sb (r1+0),r2
}
}
}
_ISR_Enable( level );
80095f0: d0 03 00 00 wcsr IE,r3
}
80095f4: c3 a0 00 00 ret
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
80095f8: 44 a1 ff fa be r5,r1,80095e0 <_Thread_Clear_state+0xb0> <== NEVER TAKEN
80095fc: e3 ff ff fd bi 80095f0 <_Thread_Clear_state+0xc0>
0800c77c <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
800c77c: 37 9c ff f8 addi sp,sp,-8
800c780: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
800c784: 37 82 00 08 addi r2,sp,8
800c788: f8 00 00 a5 calli 800ca1c <_Thread_Get>
switch ( location ) {
800c78c: 2b 82 00 08 lw r2,(sp+8)
800c790: 5c 40 00 09 bne r2,r0,800c7b4 <_Thread_Delay_ended+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
800c794: 78 02 10 00 mvhi r2,0x1000
800c798: 38 42 00 18 ori r2,r2,0x18
800c79c: fb ff ff 4b calli 800c4c8 <_Thread_Clear_state>
800c7a0: 78 01 08 02 mvhi r1,0x802
800c7a4: 38 21 a9 bc ori r1,r1,0xa9bc
800c7a8: 28 22 00 00 lw r2,(r1+0)
800c7ac: 34 42 ff ff addi r2,r2,-1
800c7b0: 58 22 00 00 sw (r1+0),r2
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
800c7b4: 2b 9d 00 04 lw ra,(sp+4)
800c7b8: 37 9c 00 08 addi sp,sp,8
800c7bc: c3 a0 00 00 ret
080044f0 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
80044f0: 37 9c ff b4 addi sp,sp,-76
80044f4: 5b 8b 00 3c sw (sp+60),r11
80044f8: 5b 8c 00 38 sw (sp+56),r12
80044fc: 5b 8d 00 34 sw (sp+52),r13
8004500: 5b 8e 00 30 sw (sp+48),r14
8004504: 5b 8f 00 2c sw (sp+44),r15
8004508: 5b 90 00 28 sw (sp+40),r16
800450c: 5b 91 00 24 sw (sp+36),r17
8004510: 5b 92 00 20 sw (sp+32),r18
8004514: 5b 93 00 1c sw (sp+28),r19
8004518: 5b 94 00 18 sw (sp+24),r20
800451c: 5b 95 00 14 sw (sp+20),r21
8004520: 5b 96 00 10 sw (sp+16),r22
8004524: 5b 97 00 0c sw (sp+12),r23
8004528: 5b 98 00 08 sw (sp+8),r24
800452c: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
8004530: 78 0e 08 01 mvhi r14,0x801
8004534: 39 ce d8 e8 ori r14,r14,0xd8e8
8004538: 29 cc 00 00 lw r12,(r14+0)
_ISR_Disable( level );
800453c: 90 00 08 00 rcsr r1,IE
8004540: 34 02 ff fe mvi r2,-2
8004544: a0 22 10 00 and r2,r1,r2
8004548: d0 02 00 00 wcsr IE,r2
while ( _Context_Switch_necessary == true ) {
800454c: 78 0d 08 01 mvhi r13,0x801
8004550: 39 ad d8 f8 ori r13,r13,0xd8f8
8004554: 41 a2 00 00 lbu r2,(r13+0)
8004558: 44 40 00 3d be r2,r0,800464c <_Thread_Dispatch+0x15c>
800455c: 78 11 08 01 mvhi r17,0x801
8004560: 78 15 08 01 mvhi r21,0x801
8004564: 78 0f 08 01 mvhi r15,0x801
8004568: 78 14 08 01 mvhi r20,0x801
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
800456c: 78 18 08 01 mvhi r24,0x801
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
8004570: ba 20 b8 00 mv r23,r17
8004574: 3a b5 d8 b8 ori r21,r21,0xd8b8
8004578: 39 ef d8 2c ori r15,r15,0xd82c
800457c: 3a 94 d8 b4 ori r20,r20,0xd8b4
#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;
8004580: 3b 18 d7 bc ori r24,r24,0xd7bc
8004584: 37 93 00 48 addi r19,sp,72
8004588: 37 92 00 40 addi r18,sp,64
800458c: 3a 31 d8 f0 ori r17,r17,0xd8f0
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
8004590: 34 10 00 01 mvi r16,1
#endif
#endif
executing = _Thread_Executing;
_ISR_Disable( level );
8004594: 34 16 ff fe mvi r22,-2
8004598: e0 00 00 23 bi 8004624 <_Thread_Dispatch+0x134>
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
800459c: d0 01 00 00 wcsr IE,r1
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
80045a0: ba 60 08 00 mv r1,r19
80045a4: f8 00 11 ea calli 8008d4c <_TOD_Get_uptime>
_Timestamp_Subtract(
80045a8: ba e0 08 00 mv r1,r23
80045ac: ba 40 18 00 mv r3,r18
80045b0: 38 21 d8 f0 ori r1,r1,0xd8f0
80045b4: ba 60 10 00 mv r2,r19
80045b8: f8 00 04 5d calli 800572c <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
80045bc: ba 40 10 00 mv r2,r18
80045c0: 35 81 00 84 addi r1,r12,132
80045c4: f8 00 04 45 calli 80056d8 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
80045c8: 2b 83 00 48 lw r3,(sp+72)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
80045cc: 2a 84 00 00 lw r4,(r20+0)
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
80045d0: b9 80 08 00 mv r1,r12
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
80045d4: 5a 23 00 00 sw (r17+0),r3
80045d8: 2b 83 00 4c lw r3,(sp+76)
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
80045dc: b9 60 10 00 mv r2,r11
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
80045e0: 5a 23 00 04 sw (r17+4),r3
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
80045e4: 44 80 00 05 be r4,r0,80045f8 <_Thread_Dispatch+0x108> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
80045e8: 28 83 00 00 lw r3,(r4+0)
80045ec: 59 83 01 20 sw (r12+288),r3
*_Thread_libc_reent = heir->libc_reent;
80045f0: 29 63 01 20 lw r3,(r11+288)
80045f4: 58 83 00 00 sw (r4+0),r3
}
_User_extensions_Thread_switch( executing, heir );
80045f8: f8 00 05 47 calli 8005b14 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
80045fc: 35 81 00 cc addi r1,r12,204
8004600: 35 62 00 cc addi r2,r11,204
8004604: f8 00 06 79 calli 8005fe8 <_CPU_Context_switch>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
8004608: 29 cc 00 00 lw r12,(r14+0)
_ISR_Disable( level );
800460c: 90 00 20 00 rcsr r4,IE
8004610: a0 96 08 00 and r1,r4,r22
8004614: d0 01 00 00 wcsr IE,r1
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
8004618: 41 a2 00 00 lbu r2,(r13+0)
800461c: b8 80 08 00 mv r1,r4
8004620: 44 40 00 0e be r2,r0,8004658 <_Thread_Dispatch+0x168>
heir = _Thread_Heir;
8004624: 2a ab 00 00 lw r11,(r21+0)
_Thread_Dispatch_disable_level = 1;
8004628: 59 f0 00 00 sw (r15+0),r16
_Context_Switch_necessary = false;
800462c: 34 02 00 00 mvi r2,0
_Thread_Executing = heir;
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
8004630: 29 63 00 7c lw r3,(r11+124)
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
8004634: 31 a2 00 00 sb (r13+0),r2
_Thread_Executing = heir;
8004638: 59 cb 00 00 sw (r14+0),r11
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
800463c: 5c 70 ff d8 bne r3,r16,800459c <_Thread_Dispatch+0xac>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
8004640: 2b 02 00 00 lw r2,(r24+0)
8004644: 59 62 00 78 sw (r11+120),r2
8004648: e3 ff ff d5 bi 800459c <_Thread_Dispatch+0xac>
800464c: 78 0f 08 01 mvhi r15,0x801
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
8004650: b8 20 20 00 mv r4,r1
8004654: 39 ef d8 2c ori r15,r15,0xd82c
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
8004658: 34 02 00 00 mvi r2,0
800465c: 59 e2 00 00 sw (r15+0),r2
_ISR_Enable( level );
8004660: d0 04 00 00 wcsr IE,r4
if ( _Thread_Do_post_task_switch_extension ||
8004664: 78 01 08 01 mvhi r1,0x801
8004668: 38 21 d8 cc ori r1,r1,0xd8cc
800466c: 28 21 00 00 lw r1,(r1+0)
8004670: 5c 20 00 03 bne r1,r0,800467c <_Thread_Dispatch+0x18c> <== NEVER TAKEN
executing->do_post_task_switch_extension ) {
8004674: 41 82 00 74 lbu r2,(r12+116)
8004678: 44 41 00 04 be r2,r1,8004688 <_Thread_Dispatch+0x198>
executing->do_post_task_switch_extension = false;
800467c: 34 01 00 00 mvi r1,0
8004680: 31 81 00 74 sb (r12+116),r1
_API_extensions_Run_postswitch();
8004684: fb ff f9 4f calli 8002bc0 <_API_extensions_Run_postswitch>
}
}
8004688: 2b 9d 00 04 lw ra,(sp+4)
800468c: 2b 8b 00 3c lw r11,(sp+60)
8004690: 2b 8c 00 38 lw r12,(sp+56)
8004694: 2b 8d 00 34 lw r13,(sp+52)
8004698: 2b 8e 00 30 lw r14,(sp+48)
800469c: 2b 8f 00 2c lw r15,(sp+44)
80046a0: 2b 90 00 28 lw r16,(sp+40)
80046a4: 2b 91 00 24 lw r17,(sp+36)
80046a8: 2b 92 00 20 lw r18,(sp+32)
80046ac: 2b 93 00 1c lw r19,(sp+28)
80046b0: 2b 94 00 18 lw r20,(sp+24)
80046b4: 2b 95 00 14 lw r21,(sp+20)
80046b8: 2b 96 00 10 lw r22,(sp+16)
80046bc: 2b 97 00 0c lw r23,(sp+12)
80046c0: 2b 98 00 08 lw r24,(sp+8)
80046c4: 37 9c 00 4c addi sp,sp,76
80046c8: c3 a0 00 00 ret
0800b4ac <_Thread_Evaluate_mode>:
bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
800b4ac: 78 01 08 01 mvhi r1,0x801
800b4b0: 38 21 d8 e8 ori r1,r1,0xd8e8
800b4b4: 28 21 00 00 lw r1,(r1+0)
if ( !_States_Is_ready( executing->current_state ) ||
800b4b8: 28 22 00 10 lw r2,(r1+16)
800b4bc: 5c 40 00 07 bne r2,r0,800b4d8 <_Thread_Evaluate_mode+0x2c> <== NEVER TAKEN
800b4c0: 78 02 08 01 mvhi r2,0x801
800b4c4: 38 42 d8 b8 ori r2,r2,0xd8b8
800b4c8: 28 42 00 00 lw r2,(r2+0)
800b4cc: 44 22 00 09 be r1,r2,800b4f0 <_Thread_Evaluate_mode+0x44>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
800b4d0: 40 21 00 75 lbu r1,(r1+117)
800b4d4: 44 20 00 07 be r1,r0,800b4f0 <_Thread_Evaluate_mode+0x44> <== NEVER TAKEN
_Context_Switch_necessary = true;
800b4d8: 78 01 08 01 mvhi r1,0x801
800b4dc: 38 21 d8 f8 ori r1,r1,0xd8f8
800b4e0: 34 02 00 01 mvi r2,1
800b4e4: 30 22 00 00 sb (r1+0),r2
800b4e8: b8 40 08 00 mv r1,r2
return true;
800b4ec: c3 a0 00 00 ret
800b4f0: 34 01 00 00 mvi r1,0
}
return false;
}
800b4f4: c3 a0 00 00 ret
0800b4f8 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
800b4f8: 37 9c ff f4 addi sp,sp,-12
800b4fc: 5b 8b 00 0c sw (sp+12),r11
800b500: 5b 8c 00 08 sw (sp+8),r12
800b504: 5b 9d 00 04 sw (sp+4),ra
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
800b508: 78 01 08 01 mvhi r1,0x801
800b50c: 38 21 d8 e8 ori r1,r1,0xd8e8
800b510: 28 2b 00 00 lw r11,(r1+0)
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
800b514: 29 61 00 b8 lw r1,(r11+184)
_ISR_Set_level(level);
800b518: 64 21 00 00 cmpei r1,r1,0
800b51c: d0 01 00 00 wcsr IE,r1
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
800b520: 78 02 08 01 mvhi r2,0x801
800b524: 38 42 d6 30 ori r2,r2,0xd630
800b528: 40 4c 00 00 lbu r12,(r2+0)
doneConstructors = 1;
800b52c: 34 03 00 01 mvi r3,1
/*
* Take care that 'begin' extensions get to complete before
* 'switch' extensions can run. This means must keep dispatch
* disabled until all 'begin' extensions complete.
*/
_User_extensions_Thread_begin( executing );
800b530: b9 60 08 00 mv r1,r11
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
doneConstructors = 1;
800b534: 30 43 00 00 sb (r2+0),r3
/*
* Take care that 'begin' extensions get to complete before
* 'switch' extensions can run. This means must keep dispatch
* disabled until all 'begin' extensions complete.
*/
_User_extensions_Thread_begin( executing );
800b538: fb ff e8 d7 calli 8005894 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
800b53c: fb ff e4 64 calli 80046cc <_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) */ {
800b540: 45 80 00 09 be r12,r0,800b564 <_Thread_Handler+0x6c>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
800b544: 29 61 00 a0 lw r1,(r11+160)
800b548: 44 20 00 0a be r1,r0,800b570 <_Thread_Handler+0x78> <== ALWAYS TAKEN
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
800b54c: b9 60 08 00 mv r1,r11
800b550: fb ff e8 e8 calli 80058f0 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
800b554: 34 01 00 00 mvi r1,0
800b558: 34 02 00 01 mvi r2,1
800b55c: 34 03 00 06 mvi r3,6
800b560: fb ff e0 67 calli 80036fc <_Internal_error_Occurred>
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
800b564: fb ff d2 a7 calli 8000000 <RamBase>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
800b568: 29 61 00 a0 lw r1,(r11+160)
800b56c: 5c 20 ff f8 bne r1,r0,800b54c <_Thread_Handler+0x54> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
800b570: 29 62 00 9c lw r2,(r11+156)
800b574: 29 61 00 a8 lw r1,(r11+168)
800b578: d8 40 00 00 call r2
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
800b57c: 59 61 00 28 sw (r11+40),r1
800b580: e3 ff ff f3 bi 800b54c <_Thread_Handler+0x54>
08004a3c <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
8004a3c: 37 9c ff f0 addi sp,sp,-16
8004a40: 5b 8b 00 10 sw (sp+16),r11
8004a44: 5b 8c 00 0c sw (sp+12),r12
8004a48: 5b 8d 00 08 sw (sp+8),r13
8004a4c: 5b 9d 00 04 sw (sp+4),ra
uint32_t maximum_extensions;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies;
#endif
ticks_per_timeslice = Configuration.ticks_per_timeslice;
8004a50: 78 01 08 01 mvhi r1,0x801
8004a54: 38 21 d0 c4 ori r1,r1,0xd0c4
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
8004a58: 28 22 00 20 lw r2,(r1+32)
8004a5c: 28 29 00 24 lw r9,(r1+36)
uint32_t maximum_extensions;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies;
#endif
ticks_per_timeslice = Configuration.ticks_per_timeslice;
8004a60: 28 2a 00 10 lw r10,(r1+16)
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
8004a64: 64 42 00 00 cmpei r2,r2,0
8004a68: 65 29 00 00 cmpei r9,r9,0
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies;
#endif
ticks_per_timeslice = Configuration.ticks_per_timeslice;
maximum_extensions = Configuration.maximum_extensions;
8004a6c: 28 2d 00 08 lw r13,(r1+8)
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
8004a70: 99 22 48 00 xor r9,r9,r2
8004a74: b9 20 58 00 mv r11,r9
8004a78: 5d 20 00 37 bne r9,r0,8004b54 <_Thread_Handler_initialization+0x118><== NEVER TAKEN
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8004a7c: 78 0c 08 01 mvhi r12,0x801
8004a80: 39 8c d0 c0 ori r12,r12,0xd0c0
8004a84: 41 81 00 00 lbu r1,(r12+0)
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
8004a88: 78 08 08 01 mvhi r8,0x801
_Thread_Executing = NULL;
8004a8c: 78 05 08 01 mvhi r5,0x801
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8004a90: 34 21 00 01 addi r1,r1,1
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
_Thread_Executing = NULL;
_Thread_Heir = NULL;
8004a94: 78 04 08 01 mvhi r4,0x801
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
8004a98: 78 03 08 01 mvhi r3,0x801
_Thread_Maximum_extensions = maximum_extensions;
8004a9c: 78 07 08 01 mvhi r7,0x801
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
8004aa0: 78 06 08 01 mvhi r6,0x801
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
_Thread_Executing = NULL;
_Thread_Heir = NULL;
8004aa4: 38 84 d8 b8 ori r4,r4,0xd8b8
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
8004aa8: 38 63 d8 cc ori r3,r3,0xd8cc
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
8004aac: 38 c6 d7 bc ori r6,r6,0xd7bc
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
8004ab0: 39 08 d8 f8 ori r8,r8,0xd8f8
_Thread_Executing = NULL;
8004ab4: 38 a5 d8 e8 ori r5,r5,0xd8e8
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
8004ab8: 38 e7 d8 c8 ori r7,r7,0xd8c8
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8004abc: b4 21 10 00 add r2,r1,r1
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
8004ac0: 58 ca 00 00 sw (r6+0),r10
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
_Thread_Executing = NULL;
_Thread_Heir = NULL;
8004ac4: 58 89 00 00 sw (r4+0),r9
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
8004ac8: 58 69 00 00 sw (r3+0),r9
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8004acc: b4 41 08 00 add r1,r2,r1
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
8004ad0: 31 09 00 00 sb (r8+0),r9
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8004ad4: 34 02 00 02 mvi r2,2
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
8004ad8: 58 ed 00 00 sw (r7+0),r13
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
_Thread_Executing = NULL;
8004adc: 58 a9 00 00 sw (r5+0),r9
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8004ae0: fb ff ed c4 calli 80001f0 <__ashlsi3>
8004ae4: f8 00 05 00 calli 8005ee4 <_Workspace_Allocate_or_fatal_error>
8004ae8: 78 03 08 01 mvhi r3,0x801
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
8004aec: 41 84 00 00 lbu r4,(r12+0)
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8004af0: 38 63 d7 b8 ori r3,r3,0xd7b8
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
8004af4: b9 60 10 00 mv r2,r11
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8004af8: 58 61 00 00 sw (r3+0),r1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
8004afc: b9 60 30 00 mv r6,r11
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8004b00: 34 23 00 04 addi r3,r1,4
8004b04: 58 23 00 00 sw (r1+0),r3
the_chain->permanent_null = NULL;
8004b08: 58 26 00 04 sw (r1+4),r6
the_chain->last = _Chain_Head(the_chain);
8004b0c: 58 21 00 08 sw (r1+8),r1
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
8004b10: 34 42 00 01 addi r2,r2,1
8004b14: 34 21 00 0c addi r1,r1,12
8004b18: 50 82 ff fa bgeu r4,r2,8004b00 <_Thread_Handler_initialization+0xc4>
/*
* Initialize this class of objects.
*/
_Objects_Initialize_information(
8004b1c: 34 02 00 01 mvi r2,1
8004b20: 78 01 08 01 mvhi r1,0x801
8004b24: 38 21 d9 88 ori r1,r1,0xd988
8004b28: b8 40 18 00 mv r3,r2
8004b2c: b8 40 20 00 mv r4,r2
8004b30: 34 05 01 38 mvi r5,312
8004b34: 34 07 00 08 mvi r7,8
8004b38: fb ff fc 97 calli 8003d94 <_Objects_Initialize_information>
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
8004b3c: 2b 9d 00 04 lw ra,(sp+4)
8004b40: 2b 8b 00 10 lw r11,(sp+16)
8004b44: 2b 8c 00 0c lw r12,(sp+12)
8004b48: 2b 8d 00 08 lw r13,(sp+8)
8004b4c: 37 9c 00 10 addi sp,sp,16
8004b50: c3 a0 00 00 ret
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
== (!Configuration.stack_free_hook) ) )
_Internal_error_Occurred(
8004b54: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8004b58: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8004b5c: 34 03 00 0f mvi r3,15 <== NOT EXECUTED
8004b60: fb ff fa e7 calli 80036fc <_Internal_error_Occurred> <== NOT EXECUTED
08004844 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
8004844: 37 9c ff d4 addi sp,sp,-44
8004848: 5b 8b 00 2c sw (sp+44),r11
800484c: 5b 8c 00 28 sw (sp+40),r12
8004850: 5b 8d 00 24 sw (sp+36),r13
8004854: 5b 8e 00 20 sw (sp+32),r14
8004858: 5b 8f 00 1c sw (sp+28),r15
800485c: 5b 90 00 18 sw (sp+24),r16
8004860: 5b 91 00 14 sw (sp+20),r17
8004864: 5b 92 00 10 sw (sp+16),r18
8004868: 5b 93 00 0c sw (sp+12),r19
800486c: 5b 94 00 08 sw (sp+8),r20
8004870: 5b 9d 00 04 sw (sp+4),ra
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
8004874: 34 0d 00 00 mvi r13,0
8004878: 58 4d 01 24 sw (r2+292),r13
800487c: 58 4d 01 28 sw (r2+296),r13
8004880: 58 4d 01 2c sw (r2+300),r13
extensions_area = NULL;
the_thread->libc_reent = NULL;
8004884: 58 4d 01 20 sw (r2+288),r13
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
8004888: b8 40 58 00 mv r11,r2
800488c: b8 20 90 00 mv r18,r1
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
8004890: b8 40 08 00 mv r1,r2
8004894: b8 80 10 00 mv r2,r4
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
8004898: b8 80 60 00 mv r12,r4
800489c: b8 c0 80 00 mv r16,r6
80048a0: b9 00 a0 00 mv r20,r8
80048a4: 20 f3 00 ff andi r19,r7,0xff
/*
* 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 );
80048a8: f8 00 03 0d calli 80054dc <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
80048ac: f5 81 60 00 cmpgu r12,r12,r1
80048b0: e4 2d 10 00 cmpe r2,r1,r13
/*
* 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 );
80048b4: b8 20 18 00 mv r3,r1
if ( !actual_stack_size || actual_stack_size < stack_size )
80048b8: b9 82 60 00 or r12,r12,r2
80048bc: 5d 8d 00 3e bne r12,r13,80049b4 <_Thread_Initialize+0x170>
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
80048c0: 78 0d 08 01 mvhi r13,0x801
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
80048c4: 59 6c 00 68 sw (r11+104),r12
80048c8: 39 ad d8 c8 ori r13,r13,0xd8c8
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
80048cc: 29 61 00 c8 lw r1,(r11+200)
80048d0: 29 a2 00 00 lw r2,(r13+0)
the_stack->size = size;
80048d4: 59 63 00 c0 sw (r11+192),r3
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
80048d8: 59 61 00 c4 sw (r11+196),r1
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
80048dc: 59 6c 00 50 sw (r11+80),r12
the_watchdog->routine = routine;
80048e0: 59 6c 00 64 sw (r11+100),r12
the_watchdog->id = id;
the_watchdog->user_data = user_data;
80048e4: 59 6c 00 6c sw (r11+108),r12
80048e8: 5c 4c 00 41 bne r2,r12,80049ec <_Thread_Initialize+0x1a8>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
80048ec: 59 62 01 30 sw (r11+304),r2
80048f0: b8 40 88 00 mv r17,r2
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
80048f4: 2b 81 00 30 lw r1,(sp+48)
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
80048f8: 34 0c 00 00 mvi r12,0
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
80048fc: 34 0d 00 01 mvi r13,1
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
8004900: 59 61 00 b4 sw (r11+180),r1
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
8004904: 2b 81 00 34 lw r1,(sp+52)
#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 );
8004908: ba 00 10 00 mv r2,r16
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
800490c: 31 73 00 ac sb (r11+172),r19
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
8004910: 59 61 00 b8 sw (r11+184),r1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
8004914: 59 74 00 b0 sw (r11+176),r20
#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 );
8004918: b9 60 08 00 mv r1,r11
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
800491c: 59 6d 00 10 sw (r11+16),r13
the_thread->Wait.queue = NULL;
8004920: 59 6c 00 44 sw (r11+68),r12
the_thread->resource_count = 0;
8004924: 59 6c 00 1c sw (r11+28),r12
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
8004928: 59 70 00 18 sw (r11+24),r16
the_thread->Start.initial_priority = priority;
800492c: 59 70 00 bc sw (r11+188),r16
_Thread_Set_priority( the_thread, priority );
8004930: f8 00 02 21 calli 80051b4 <_Thread_Set_priority>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8004934: 29 61 00 08 lw r1,(r11+8)
8004938: 2a 4e 00 1c lw r14,(r18+28)
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
800493c: 59 6c 00 88 sw (r11+136),r12
8004940: 59 6c 00 84 sw (r11+132),r12
8004944: 20 21 ff ff andi r1,r1,0xffff
8004948: 34 02 00 02 mvi r2,2
800494c: fb ff ee 29 calli 80001f0 <__ashlsi3>
8004950: b5 c1 08 00 add r1,r14,r1
8004954: 58 2b 00 00 sw (r1+0),r11
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
8004958: 2b 81 00 38 lw r1,(sp+56)
800495c: 59 61 00 0c sw (r11+12),r1
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
8004960: b9 60 08 00 mv r1,r11
8004964: f8 00 04 17 calli 80059c0 <_User_extensions_Thread_create>
if ( extension_status )
8004968: 5c 2c 00 13 bne r1,r12,80049b4 <_Thread_Initialize+0x170>
return true;
failed:
if ( the_thread->libc_reent )
800496c: 29 61 01 20 lw r1,(r11+288)
8004970: 44 20 00 02 be r1,r0,8004978 <_Thread_Initialize+0x134>
_Workspace_Free( the_thread->libc_reent );
8004974: f8 00 05 76 calli 8005f4c <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
8004978: 29 61 01 24 lw r1,(r11+292)
800497c: 44 20 00 02 be r1,r0,8004984 <_Thread_Initialize+0x140>
_Workspace_Free( the_thread->API_Extensions[i] );
8004980: f8 00 05 73 calli 8005f4c <_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] )
8004984: 29 61 01 28 lw r1,(r11+296)
8004988: 44 20 00 02 be r1,r0,8004990 <_Thread_Initialize+0x14c> <== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
800498c: f8 00 05 70 calli 8005f4c <_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] )
8004990: 29 61 01 2c lw r1,(r11+300)
8004994: 44 20 00 02 be r1,r0,800499c <_Thread_Initialize+0x158> <== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
8004998: f8 00 05 6d calli 8005f4c <_Workspace_Free> <== NOT EXECUTED
if ( extensions_area )
800499c: 46 20 00 03 be r17,r0,80049a8 <_Thread_Initialize+0x164>
(void) _Workspace_Free( extensions_area );
80049a0: ba 20 08 00 mv r1,r17
80049a4: f8 00 05 6a calli 8005f4c <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
80049a8: b9 60 08 00 mv r1,r11
80049ac: f8 00 02 f2 calli 8005574 <_Thread_Stack_Free>
80049b0: 34 0d 00 00 mvi r13,0
return false;
}
80049b4: b9 a0 08 00 mv r1,r13
80049b8: 2b 9d 00 04 lw ra,(sp+4)
80049bc: 2b 8b 00 2c lw r11,(sp+44)
80049c0: 2b 8c 00 28 lw r12,(sp+40)
80049c4: 2b 8d 00 24 lw r13,(sp+36)
80049c8: 2b 8e 00 20 lw r14,(sp+32)
80049cc: 2b 8f 00 1c lw r15,(sp+28)
80049d0: 2b 90 00 18 lw r16,(sp+24)
80049d4: 2b 91 00 14 lw r17,(sp+20)
80049d8: 2b 92 00 10 lw r18,(sp+16)
80049dc: 2b 93 00 0c lw r19,(sp+12)
80049e0: 2b 94 00 08 lw r20,(sp+8)
80049e4: 37 9c 00 2c addi sp,sp,44
80049e8: c3 a0 00 00 ret
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
80049ec: 34 41 00 01 addi r1,r2,1
80049f0: 34 02 00 02 mvi r2,2
80049f4: fb ff ed ff calli 80001f0 <__ashlsi3>
80049f8: f8 00 05 4a calli 8005f20 <_Workspace_Allocate>
80049fc: b8 20 88 00 mv r17,r1
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
8004a00: 44 20 ff db be r1,r0,800496c <_Thread_Initialize+0x128>
* 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++ )
8004a04: 29 af 00 00 lw r15,(r13+0)
8004a08: b9 80 08 00 mv r1,r12
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
8004a0c: 59 71 01 30 sw (r11+304),r17
8004a10: ba 20 68 00 mv r13,r17
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
8004a14: b9 80 70 00 mv r14,r12
8004a18: 34 02 00 02 mvi r2,2
8004a1c: fb ff ed f5 calli 80001f0 <__ashlsi3>
8004a20: b5 a1 18 00 add r3,r13,r1
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
8004a24: 35 8c 00 01 addi r12,r12,1
the_thread->extensions[i] = NULL;
8004a28: 58 6e 00 00 sw (r3+0),r14
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
8004a2c: b9 80 08 00 mv r1,r12
8004a30: 55 8f ff b1 bgu r12,r15,80048f4 <_Thread_Initialize+0xb0>
8004a34: 29 6d 01 30 lw r13,(r11+304)
8004a38: e3 ff ff f8 bi 8004a18 <_Thread_Initialize+0x1d4>
08009ae4 <_Thread_Reset_timeslice>:
{
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
8009ae4: 78 01 08 01 mvhi r1,0x801
8009ae8: 38 21 d8 e8 ori r1,r1,0xd8e8
8009aec: 28 21 00 00 lw r1,(r1+0)
ready = executing->ready;
8009af0: 28 22 00 8c lw r2,(r1+140)
_ISR_Disable( level );
8009af4: 90 00 20 00 rcsr r4,IE
8009af8: 34 03 ff fe mvi r3,-2
8009afc: a0 83 18 00 and r3,r4,r3
8009b00: d0 03 00 00 wcsr IE,r3
if ( _Chain_Has_only_one_node( ready ) ) {
8009b04: 28 46 00 00 lw r6,(r2+0)
8009b08: 28 45 00 08 lw r5,(r2+8)
8009b0c: 44 c5 00 1f be r6,r5,8009b88 <_Thread_Reset_timeslice+0xa4>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
8009b10: 28 25 00 00 lw r5,(r1+0)
previous = the_node->previous;
8009b14: 28 26 00 04 lw r6,(r1+4)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
8009b18: 34 47 00 04 addi r7,r2,4
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
8009b1c: 58 c5 00 00 sw (r6+0),r5
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
8009b20: 58 27 00 00 sw (r1+0),r7
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
8009b24: 58 a6 00 04 sw (r5+4),r6
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
8009b28: 28 45 00 08 lw r5,(r2+8)
the_chain->last = the_node;
8009b2c: 58 41 00 08 sw (r2+8),r1
old_last_node->next = the_node;
the_node->previous = old_last_node;
8009b30: 58 25 00 04 sw (r1+4),r5
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
8009b34: 58 a1 00 00 sw (r5+0),r1
return;
}
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
8009b38: d0 04 00 00 wcsr IE,r4
8009b3c: d0 03 00 00 wcsr IE,r3
if ( _Thread_Is_heir( executing ) )
8009b40: 78 03 08 01 mvhi r3,0x801
8009b44: 38 63 d8 b8 ori r3,r3,0xd8b8
8009b48: 28 65 00 00 lw r5,(r3+0)
8009b4c: 44 25 00 07 be r1,r5,8009b68 <_Thread_Reset_timeslice+0x84><== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
8009b50: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8009b54: 38 21 d8 f8 ori r1,r1,0xd8f8 <== NOT EXECUTED
8009b58: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8009b5c: 30 22 00 00 sb (r1+0),r2 <== NOT EXECUTED
_ISR_Enable( level );
8009b60: d0 04 00 00 wcsr IE,r4 <== NOT EXECUTED
8009b64: c3 a0 00 00 ret <== NOT EXECUTED
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
8009b68: 28 42 00 00 lw r2,(r2+0)
_Context_Switch_necessary = true;
8009b6c: 78 01 08 01 mvhi r1,0x801
8009b70: 38 21 d8 f8 ori r1,r1,0xd8f8
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
8009b74: 58 62 00 00 sw (r3+0),r2
_Context_Switch_necessary = true;
8009b78: 34 02 00 01 mvi r2,1
8009b7c: 30 22 00 00 sb (r1+0),r2
_ISR_Enable( level );
8009b80: d0 04 00 00 wcsr IE,r4
8009b84: c3 a0 00 00 ret
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
if ( _Chain_Has_only_one_node( ready ) ) {
_ISR_Enable( level );
8009b88: d0 04 00 00 wcsr IE,r4
return;
8009b8c: c3 a0 00 00 ret
08006178 <_Thread_Restart>:
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
8006178: 37 9c ff f0 addi sp,sp,-16
800617c: 5b 8b 00 08 sw (sp+8),r11
8006180: 5b 9d 00 04 sw (sp+4),ra
if ( !_States_Is_dormant( the_thread->current_state ) ) {
8006184: 28 25 00 10 lw r5,(r1+16)
8006188: 34 04 00 00 mvi r4,0
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
800618c: b8 20 58 00 mv r11,r1
if ( !_States_Is_dormant( the_thread->current_state ) ) {
8006190: 20 a5 00 01 andi r5,r5,0x1
8006194: 44 a4 00 06 be r5,r4,80061ac <_Thread_Restart+0x34>
return true;
}
return false;
}
8006198: b8 80 08 00 mv r1,r4
800619c: 2b 9d 00 04 lw ra,(sp+4)
80061a0: 2b 8b 00 08 lw r11,(sp+8)
80061a4: 37 9c 00 10 addi sp,sp,16
80061a8: c3 a0 00 00 ret
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread );
80061ac: 5b 82 00 10 sw (sp+16),r2
80061b0: 5b 83 00 0c sw (sp+12),r3
80061b4: f8 00 00 b9 calli 8006498 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
80061b8: 2b 82 00 10 lw r2,(sp+16)
80061bc: 2b 83 00 0c lw r3,(sp+12)
80061c0: b9 60 08 00 mv r1,r11
80061c4: f8 00 12 df calli 800ad40 <_Thread_Reset>
_Thread_Load_environment( the_thread );
80061c8: b9 60 08 00 mv r1,r11
80061cc: f8 00 11 a4 calli 800a85c <_Thread_Load_environment>
_Thread_Ready( the_thread );
80061d0: b9 60 08 00 mv r1,r11
80061d4: f8 00 12 77 calli 800abb0 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
80061d8: b9 60 08 00 mv r1,r11
80061dc: f8 00 02 6f calli 8006b98 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
80061e0: 78 01 08 02 mvhi r1,0x802
80061e4: 38 21 19 40 ori r1,r1,0x1940
80061e8: 28 21 00 00 lw r1,(r1+0)
80061ec: 34 04 00 01 mvi r4,1
80061f0: 5d 61 ff ea bne r11,r1,8006198 <_Thread_Restart+0x20>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
_Context_Restore_fp( &_Thread_Executing->fp_context );
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
80061f4: 35 61 00 cc addi r1,r11,204
80061f8: f8 00 04 0a calli 8007220 <_CPU_Context_restore>
80061fc: 34 04 00 01 mvi r4,1 <== NOT EXECUTED
8006200: e3 ff ff e6 bi 8006198 <_Thread_Restart+0x20> <== NOT EXECUTED
0800abd8 <_Thread_Resume>:
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
800abd8: 90 00 10 00 rcsr r2,IE
800abdc: 34 04 ff fe mvi r4,-2
800abe0: a0 44 20 00 and r4,r2,r4
800abe4: d0 04 00 00 wcsr IE,r4
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
800abe8: 28 23 00 10 lw r3,(r1+16)
if ( current_state & STATES_SUSPENDED ) {
800abec: 20 65 00 02 andi r5,r3,0x2
800abf0: 44 a0 00 2a be r5,r0,800ac98 <_Thread_Resume+0xc0> <== NEVER TAKEN
800abf4: 34 05 ff fd mvi r5,-3
800abf8: a0 65 18 00 and r3,r3,r5
current_state =
800abfc: 58 23 00 10 sw (r1+16),r3
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
800ac00: 5c 60 00 26 bne r3,r0,800ac98 <_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;
800ac04: 28 26 00 90 lw r6,(r1+144)
800ac08: 2c 27 00 96 lhu r7,(r1+150)
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
800ac0c: 28 25 00 8c lw r5,(r1+140)
800ac10: 2c c8 00 00 lhu r8,(r6+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
800ac14: 78 03 08 02 mvhi r3,0x802
800ac18: 38 63 49 bc ori r3,r3,0x49bc
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
800ac1c: b9 07 38 00 or r7,r8,r7
800ac20: 0c c7 00 00 sh (r6+0),r7
_Priority_Major_bit_map |= the_priority_map->ready_major;
800ac24: 2c 67 00 00 lhu r7,(r3+0)
800ac28: 2c 28 00 94 lhu r8,(r1+148)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
800ac2c: 34 a6 00 04 addi r6,r5,4
800ac30: 58 26 00 00 sw (r1+0),r6
old_last_node = the_chain->last;
800ac34: 28 a6 00 08 lw r6,(r5+8)
800ac38: b9 07 38 00 or r7,r8,r7
the_chain->last = the_node;
800ac3c: 58 a1 00 08 sw (r5+8),r1
800ac40: 20 e5 ff ff andi r5,r7,0xffff
800ac44: 0c 65 00 00 sh (r3+0),r5
old_last_node->next = the_node;
the_node->previous = old_last_node;
800ac48: 58 26 00 04 sw (r1+4),r6
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
800ac4c: 58 c1 00 00 sw (r6+0),r1
_ISR_Flash( level );
800ac50: d0 02 00 00 wcsr IE,r2
800ac54: d0 04 00 00 wcsr IE,r4
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
800ac58: 78 03 08 02 mvhi r3,0x802
800ac5c: 38 63 49 98 ori r3,r3,0x4998
800ac60: 28 64 00 00 lw r4,(r3+0)
800ac64: 28 25 00 14 lw r5,(r1+20)
800ac68: 28 84 00 14 lw r4,(r4+20)
800ac6c: 50 a4 00 0b bgeu r5,r4,800ac98 <_Thread_Resume+0xc0>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
800ac70: 78 04 08 02 mvhi r4,0x802
800ac74: 38 84 49 c8 ori r4,r4,0x49c8
800ac78: 28 84 00 00 lw r4,(r4+0)
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
800ac7c: 58 61 00 00 sw (r3+0),r1
if ( _Thread_Executing->is_preemptible ||
800ac80: 40 81 00 75 lbu r1,(r4+117)
800ac84: 44 20 00 07 be r1,r0,800aca0 <_Thread_Resume+0xc8>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
800ac88: 78 01 08 02 mvhi r1,0x802
800ac8c: 38 21 49 d8 ori r1,r1,0x49d8
800ac90: 34 03 00 01 mvi r3,1
800ac94: 30 23 00 00 sb (r1+0),r3
}
}
}
_ISR_Enable( level );
800ac98: d0 02 00 00 wcsr IE,r2
}
800ac9c: c3 a0 00 00 ret
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
800aca0: 44 a1 ff fa be r5,r1,800ac88 <_Thread_Resume+0xb0> <== NEVER TAKEN
800aca4: e3 ff ff fd bi 800ac98 <_Thread_Resume+0xc0>
0800da34 <_Thread_Yield_processor>:
{
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
800da34: 78 01 08 02 mvhi r1,0x802
800da38: 38 21 aa 78 ori r1,r1,0xaa78
800da3c: 28 21 00 00 lw r1,(r1+0)
ready = executing->ready;
800da40: 28 22 00 8c lw r2,(r1+140)
_ISR_Disable( level );
800da44: 90 00 20 00 rcsr r4,IE
800da48: 34 03 ff fe mvi r3,-2
800da4c: a0 83 18 00 and r3,r4,r3
800da50: d0 03 00 00 wcsr IE,r3
if ( !_Chain_Has_only_one_node( ready ) ) {
800da54: 28 46 00 00 lw r6,(r2+0)
800da58: 28 45 00 08 lw r5,(r2+8)
800da5c: 44 c5 00 1a be r6,r5,800dac4 <_Thread_Yield_processor+0x90>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
800da60: 28 25 00 00 lw r5,(r1+0)
previous = the_node->previous;
800da64: 28 26 00 04 lw r6,(r1+4)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
800da68: 34 47 00 04 addi r7,r2,4
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
800da6c: 58 c5 00 00 sw (r6+0),r5
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
800da70: 58 27 00 00 sw (r1+0),r7
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
800da74: 58 a6 00 04 sw (r5+4),r6
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
800da78: 28 45 00 08 lw r5,(r2+8)
the_chain->last = the_node;
800da7c: 58 41 00 08 sw (r2+8),r1
old_last_node->next = the_node;
the_node->previous = old_last_node;
800da80: 58 25 00 04 sw (r1+4),r5
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
800da84: 58 a1 00 00 sw (r5+0),r1
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
800da88: d0 04 00 00 wcsr IE,r4
800da8c: d0 03 00 00 wcsr IE,r3
if ( _Thread_Is_heir( executing ) )
800da90: 78 03 08 02 mvhi r3,0x802
800da94: 38 63 aa 48 ori r3,r3,0xaa48
800da98: 28 65 00 00 lw r5,(r3+0)
800da9c: 44 25 00 07 be r1,r5,800dab8 <_Thread_Yield_processor+0x84><== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
800daa0: 78 01 08 02 mvhi r1,0x802
800daa4: 38 21 aa 88 ori r1,r1,0xaa88
800daa8: 34 02 00 01 mvi r2,1
800daac: 30 22 00 00 sb (r1+0),r2
_ISR_Enable( level );
800dab0: d0 04 00 00 wcsr IE,r4
}
800dab4: c3 a0 00 00 ret
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
800dab8: 28 42 00 00 lw r2,(r2+0)
800dabc: 58 62 00 00 sw (r3+0),r2
800dac0: e3 ff ff f8 bi 800daa0 <_Thread_Yield_processor+0x6c>
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
800dac4: 78 02 08 02 mvhi r2,0x802
800dac8: 38 42 aa 48 ori r2,r2,0xaa48
800dacc: 28 42 00 00 lw r2,(r2+0)
800dad0: 5c 22 ff f4 bne r1,r2,800daa0 <_Thread_Yield_processor+0x6c><== NEVER TAKEN
800dad4: e3 ff ff f7 bi 800dab0 <_Thread_Yield_processor+0x7c>
08004e0c <_Thread_queue_Enqueue_priority>:
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
8004e0c: 37 9c ff ec addi sp,sp,-20
8004e10: 5b 8b 00 14 sw (sp+20),r11
8004e14: 5b 8c 00 10 sw (sp+16),r12
8004e18: 5b 8d 00 0c sw (sp+12),r13
8004e1c: 5b 8e 00 08 sw (sp+8),r14
8004e20: 5b 9d 00 04 sw (sp+4),ra
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
8004e24: 28 4b 00 14 lw r11,(r2+20)
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
8004e28: b8 40 60 00 mv r12,r2
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8004e2c: 34 44 00 3c addi r4,r2,60
8004e30: 59 84 00 38 sw (r12+56),r4
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
8004e34: 34 42 00 38 addi r2,r2,56
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
8004e38: 34 04 00 00 mvi r4,0
8004e3c: b8 20 68 00 mv r13,r1
8004e40: 59 84 00 3c sw (r12+60),r4
the_chain->last = _Chain_Head(the_chain);
8004e44: 59 82 00 40 sw (r12+64),r2
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
8004e48: b9 60 08 00 mv r1,r11
8004e4c: 34 02 00 06 mvi r2,6
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
8004e50: b8 60 70 00 mv r14,r3
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
8004e54: fb ff ed 0f calli 8000290 <__lshrsi3>
8004e58: b4 21 10 00 add r2,r1,r1
8004e5c: b4 41 08 00 add r1,r2,r1
8004e60: 34 02 00 02 mvi r2,2
8004e64: fb ff ec e3 calli 80001f0 <__ashlsi3>
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
8004e68: 21 62 00 20 andi r2,r11,0x20
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
8004e6c: b5 a1 40 00 add r8,r13,r1
block_state = the_thread_queue->state;
8004e70: 29 a6 00 38 lw r6,(r13+56)
if ( _Thread_queue_Is_reverse_search( priority ) )
8004e74: 5c 40 00 25 bne r2,r0,8004f08 <_Thread_queue_Enqueue_priority+0xfc>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
8004e78: 35 01 00 04 addi r1,r8,4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
8004e7c: 34 0a ff fe mvi r10,-2
8004e80: 90 00 10 00 rcsr r2,IE
8004e84: a0 4a 48 00 and r9,r2,r10
8004e88: d0 09 00 00 wcsr IE,r9
search_thread = (Thread_Control *) header->first;
8004e8c: 29 04 00 00 lw r4,(r8+0)
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
8004e90: 44 81 00 69 be r4,r1,8005034 <_Thread_queue_Enqueue_priority+0x228>
search_priority = search_thread->current_priority;
8004e94: 28 85 00 14 lw r5,(r4+20)
if ( priority <= search_priority )
8004e98: 50 ab 00 10 bgeu r5,r11,8004ed8 <_Thread_queue_Enqueue_priority+0xcc>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
8004e9c: d0 02 00 00 wcsr IE,r2
8004ea0: d0 09 00 00 wcsr IE,r9
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
8004ea4: 28 83 00 10 lw r3,(r4+16)
8004ea8: a0 c3 18 00 and r3,r6,r3
8004eac: 5c 60 00 09 bne r3,r0,8004ed0 <_Thread_queue_Enqueue_priority+0xc4><== ALWAYS TAKEN
8004eb0: e0 00 00 43 bi 8004fbc <_Thread_queue_Enqueue_priority+0x1b0><== NOT EXECUTED
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
search_priority = search_thread->current_priority;
8004eb4: 28 85 00 14 lw r5,(r4+20)
if ( priority <= search_priority )
8004eb8: 50 ab 00 08 bgeu r5,r11,8004ed8 <_Thread_queue_Enqueue_priority+0xcc>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
8004ebc: d0 02 00 00 wcsr IE,r2
8004ec0: d0 09 00 00 wcsr IE,r9
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
8004ec4: 28 87 00 10 lw r7,(r4+16)
8004ec8: a0 c7 38 00 and r7,r6,r7
8004ecc: 44 e0 00 3c be r7,r0,8004fbc <_Thread_queue_Enqueue_priority+0x1b0><== NEVER TAKEN
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
8004ed0: 28 84 00 00 lw r4,(r4+0)
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
8004ed4: 5c 81 ff f8 bne r4,r1,8004eb4 <_Thread_queue_Enqueue_priority+0xa8>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
8004ed8: 29 a1 00 30 lw r1,(r13+48)
8004edc: 34 06 00 01 mvi r6,1
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
8004ee0: b8 40 18 00 mv r3,r2
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
8004ee4: 44 26 00 38 be r1,r6,8004fc4 <_Thread_queue_Enqueue_priority+0x1b8>
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
8004ee8: 59 c3 00 00 sw (r14+0),r3
return the_thread_queue->sync_state;
}
8004eec: 2b 9d 00 04 lw ra,(sp+4)
8004ef0: 2b 8b 00 14 lw r11,(sp+20)
8004ef4: 2b 8c 00 10 lw r12,(sp+16)
8004ef8: 2b 8d 00 0c lw r13,(sp+12)
8004efc: 2b 8e 00 08 lw r14,(sp+8)
8004f00: 37 9c 00 14 addi sp,sp,20
8004f04: c3 a0 00 00 ret
8004f08: 78 01 08 01 mvhi r1,0x801
8004f0c: 38 21 d0 c0 ori r1,r1,0xd0c0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
8004f10: 34 03 ff fe mvi r3,-2
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
8004f14: 40 25 00 00 lbu r5,(r1+0)
8004f18: 34 a5 00 01 addi r5,r5,1
_ISR_Disable( level );
8004f1c: 90 00 38 00 rcsr r7,IE
8004f20: a0 e3 48 00 and r9,r7,r3
8004f24: d0 09 00 00 wcsr IE,r9
search_thread = (Thread_Control *) header->last;
8004f28: 29 04 00 08 lw r4,(r8+8)
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
8004f2c: 5c 88 00 04 bne r4,r8,8004f3c <_Thread_queue_Enqueue_priority+0x130>
8004f30: e0 00 00 0c bi 8004f60 <_Thread_queue_Enqueue_priority+0x154>
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
8004f34: 28 84 00 04 lw r4,(r4+4)
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
8004f38: 45 04 00 0a be r8,r4,8004f60 <_Thread_queue_Enqueue_priority+0x154>
search_priority = search_thread->current_priority;
8004f3c: 28 85 00 14 lw r5,(r4+20)
if ( priority >= search_priority )
8004f40: 51 65 00 08 bgeu r11,r5,8004f60 <_Thread_queue_Enqueue_priority+0x154>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
8004f44: d0 07 00 00 wcsr IE,r7
8004f48: d0 09 00 00 wcsr IE,r9
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
8004f4c: 28 82 00 10 lw r2,(r4+16)
8004f50: a0 c2 10 00 and r2,r6,r2
8004f54: 5c 40 ff f8 bne r2,r0,8004f34 <_Thread_queue_Enqueue_priority+0x128><== ALWAYS TAKEN
_ISR_Enable( level );
8004f58: d0 07 00 00 wcsr IE,r7 <== NOT EXECUTED
goto restart_reverse_search;
8004f5c: e3 ff ff ee bi 8004f14 <_Thread_queue_Enqueue_priority+0x108><== NOT EXECUTED
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
8004f60: 29 a1 00 30 lw r1,(r13+48)
8004f64: 34 02 00 01 mvi r2,1
8004f68: b8 e0 18 00 mv r3,r7
8004f6c: 5c 22 ff df bne r1,r2,8004ee8 <_Thread_queue_Enqueue_priority+0xdc>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
8004f70: 34 01 00 00 mvi r1,0
8004f74: 59 a1 00 30 sw (r13+48),r1
if ( priority == search_priority )
8004f78: b8 e0 10 00 mv r2,r7
8004f7c: 45 65 00 24 be r11,r5,800500c <_Thread_queue_Enqueue_priority+0x200>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
8004f80: 28 81 00 00 lw r1,(r4+0)
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
8004f84: 59 84 00 04 sw (r12+4),r4
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
8004f88: 59 8d 00 44 sw (r12+68),r13
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
8004f8c: 59 81 00 00 sw (r12+0),r1
the_node->previous = search_node;
search_node->next = the_node;
8004f90: 58 8c 00 00 sw (r4+0),r12
next_node->previous = the_node;
8004f94: 58 2c 00 04 sw (r1+4),r12
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
8004f98: d0 07 00 00 wcsr IE,r7
8004f9c: 34 01 00 01 mvi r1,1
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
8004fa0: 2b 9d 00 04 lw ra,(sp+4)
8004fa4: 2b 8b 00 14 lw r11,(sp+20)
8004fa8: 2b 8c 00 10 lw r12,(sp+16)
8004fac: 2b 8d 00 0c lw r13,(sp+12)
8004fb0: 2b 8e 00 08 lw r14,(sp+8)
8004fb4: 37 9c 00 14 addi sp,sp,20
8004fb8: c3 a0 00 00 ret
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
8004fbc: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
goto restart_forward_search;
8004fc0: e3 ff ff b0 bi 8004e80 <_Thread_queue_Enqueue_priority+0x74><== NOT EXECUTED
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
8004fc4: 34 01 00 00 mvi r1,0
8004fc8: 59 a1 00 30 sw (r13+48),r1
if ( priority == search_priority )
8004fcc: 45 65 00 10 be r11,r5,800500c <_Thread_queue_Enqueue_priority+0x200>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
8004fd0: 28 81 00 04 lw r1,(r4+4)
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
8004fd4: 59 84 00 00 sw (r12+0),r4
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
8004fd8: 59 8d 00 44 sw (r12+68),r13
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
8004fdc: 59 81 00 04 sw (r12+4),r1
previous_node->next = the_node;
8004fe0: 58 2c 00 00 sw (r1+0),r12
search_node->previous = the_node;
8004fe4: 58 8c 00 04 sw (r4+4),r12
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
8004fe8: d0 02 00 00 wcsr IE,r2
8004fec: 34 01 00 01 mvi r1,1
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
8004ff0: 2b 9d 00 04 lw ra,(sp+4)
8004ff4: 2b 8b 00 14 lw r11,(sp+20)
8004ff8: 2b 8c 00 10 lw r12,(sp+16)
8004ffc: 2b 8d 00 0c lw r13,(sp+12)
8005000: 2b 8e 00 08 lw r14,(sp+8)
8005004: 37 9c 00 14 addi sp,sp,20
8005008: c3 a0 00 00 ret
800500c: 34 84 00 3c addi r4,r4,60
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
8005010: 28 81 00 04 lw r1,(r4+4)
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
8005014: 59 84 00 00 sw (r12+0),r4
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
8005018: 59 8d 00 44 sw (r12+68),r13
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
800501c: 59 81 00 04 sw (r12+4),r1
previous_node->next = the_node;
8005020: 58 2c 00 00 sw (r1+0),r12
search_node->previous = the_node;
8005024: 58 8c 00 04 sw (r4+4),r12
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
8005028: d0 02 00 00 wcsr IE,r2
800502c: 34 01 00 01 mvi r1,1
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
8005030: e3 ff ff af bi 8004eec <_Thread_queue_Enqueue_priority+0xe0>
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
8005034: 34 05 ff ff mvi r5,-1
8005038: e3 ff ff a8 bi 8004ed8 <_Thread_queue_Enqueue_priority+0xcc>
080098f8 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
80098f8: 37 9c ff fc addi sp,sp,-4
80098fc: 5b 9d 00 04 sw (sp+4),ra
8009900: b8 20 10 00 mv r2,r1
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
8009904: 28 21 00 44 lw r1,(r1+68)
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
8009908: 28 24 00 30 lw r4,(r1+48)
800990c: 44 80 00 05 be r4,r0,8009920 <_Thread_queue_Process_timeout+0x28>
8009910: 78 03 08 01 mvhi r3,0x801
8009914: 38 63 d8 e8 ori r3,r3,0xd8e8
8009918: 28 63 00 00 lw r3,(r3+0)
800991c: 44 43 00 07 be r2,r3,8009938 <_Thread_queue_Process_timeout+0x40>
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
8009920: 28 23 00 3c lw r3,(r1+60)
8009924: 58 43 00 34 sw (r2+52),r3
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
8009928: fb ff ff 93 calli 8009774 <_Thread_queue_Extract>
}
}
800992c: 2b 9d 00 04 lw ra,(sp+4)
8009930: 37 9c 00 04 addi sp,sp,4
8009934: c3 a0 00 00 ret
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
8009938: 34 03 00 03 mvi r3,3
800993c: 44 83 ff fc be r4,r3,800992c <_Thread_queue_Process_timeout+0x34><== ALWAYS TAKEN
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
8009940: 34 03 00 02 mvi r3,2
8009944: 58 23 00 30 sw (r1+48),r3
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
8009948: 28 21 00 3c lw r1,(r1+60)
800994c: 58 41 00 34 sw (r2+52),r1
8009950: e3 ff ff f7 bi 800992c <_Thread_queue_Process_timeout+0x34>
080050c8 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
80050c8: 37 9c ff ec addi sp,sp,-20
80050cc: 5b 8b 00 10 sw (sp+16),r11
80050d0: 5b 8c 00 0c sw (sp+12),r12
80050d4: 5b 8d 00 08 sw (sp+8),r13
80050d8: 5b 9d 00 04 sw (sp+4),ra
80050dc: b8 20 58 00 mv r11,r1
80050e0: b8 40 60 00 mv r12,r2
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
80050e4: 44 20 00 04 be r1,r0,80050f4 <_Thread_queue_Requeue+0x2c> <== NEVER TAKEN
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
80050e8: 28 22 00 34 lw r2,(r1+52)
80050ec: 34 01 00 01 mvi r1,1
80050f0: 44 41 00 07 be r2,r1,800510c <_Thread_queue_Requeue+0x44> <== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
80050f4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80050f8: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
80050fc: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
8005100: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
8005104: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
8005108: c3 a0 00 00 ret <== NOT EXECUTED
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
800510c: 90 00 68 00 rcsr r13,IE
8005110: 34 01 ff fe mvi r1,-2
8005114: a1 a1 08 00 and r1,r13,r1
8005118: d0 01 00 00 wcsr IE,r1
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
800511c: 29 82 00 10 lw r2,(r12+16)
8005120: 78 01 00 03 mvhi r1,0x3
8005124: 38 21 be e0 ori r1,r1,0xbee0
8005128: a0 41 08 00 and r1,r2,r1
800512c: 5c 20 00 08 bne r1,r0,800514c <_Thread_queue_Requeue+0x84> <== ALWAYS TAKEN
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
8005130: d0 0d 00 00 wcsr IE,r13 <== NOT EXECUTED
}
}
8005134: 2b 9d 00 04 lw ra,(sp+4)
8005138: 2b 8b 00 10 lw r11,(sp+16)
800513c: 2b 8c 00 0c lw r12,(sp+12)
8005140: 2b 8d 00 08 lw r13,(sp+8)
8005144: 37 9c 00 14 addi sp,sp,20
8005148: c3 a0 00 00 ret
800514c: 34 03 00 01 mvi r3,1
8005150: 59 63 00 30 sw (r11+48),r3
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
8005154: b9 60 08 00 mv r1,r11
8005158: b9 80 10 00 mv r2,r12
800515c: f8 00 11 94 calli 80097ac <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
8005160: b9 60 08 00 mv r1,r11
8005164: b9 80 10 00 mv r2,r12
8005168: 37 83 00 14 addi r3,sp,20
800516c: fb ff ff 28 calli 8004e0c <_Thread_queue_Enqueue_priority>
}
_ISR_Enable( level );
8005170: d0 0d 00 00 wcsr IE,r13
8005174: e3 ff ff f0 bi 8005134 <_Thread_queue_Requeue+0x6c>
08005178 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
8005178: 37 9c ff f8 addi sp,sp,-8
800517c: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
8005180: 37 82 00 08 addi r2,sp,8
8005184: fb ff fd 5f calli 8004700 <_Thread_Get>
switch ( location ) {
8005188: 2b 82 00 08 lw r2,(sp+8)
800518c: 5c 40 00 07 bne r2,r0,80051a8 <_Thread_queue_Timeout+0x30> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
8005190: f8 00 11 da calli 80098f8 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
8005194: 78 01 08 01 mvhi r1,0x801
8005198: 38 21 d8 2c ori r1,r1,0xd82c
800519c: 28 22 00 00 lw r2,(r1+0)
80051a0: 34 42 ff ff addi r2,r2,-1
80051a4: 58 22 00 00 sw (r1+0),r2
_Thread_Unnest_dispatch();
break;
}
}
80051a8: 2b 9d 00 04 lw ra,(sp+4)
80051ac: 37 9c 00 08 addi sp,sp,8
80051b0: c3 a0 00 00 ret
08014998 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
8014998: 37 9c ff a0 addi sp,sp,-96
801499c: 5b 8b 00 44 sw (sp+68),r11
80149a0: 5b 8c 00 40 sw (sp+64),r12
80149a4: 5b 8d 00 3c sw (sp+60),r13
80149a8: 5b 8e 00 38 sw (sp+56),r14
80149ac: 5b 8f 00 34 sw (sp+52),r15
80149b0: 5b 90 00 30 sw (sp+48),r16
80149b4: 5b 91 00 2c sw (sp+44),r17
80149b8: 5b 92 00 28 sw (sp+40),r18
80149bc: 5b 93 00 24 sw (sp+36),r19
80149c0: 5b 94 00 20 sw (sp+32),r20
80149c4: 5b 95 00 1c sw (sp+28),r21
80149c8: 5b 96 00 18 sw (sp+24),r22
80149cc: 5b 97 00 14 sw (sp+20),r23
80149d0: 5b 98 00 10 sw (sp+16),r24
80149d4: 5b 99 00 0c sw (sp+12),r25
80149d8: 5b 9b 00 08 sw (sp+8),fp
80149dc: 5b 9d 00 04 sw (sp+4),ra
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
80149e0: 34 17 00 00 mvi r23,0
80149e4: b8 20 58 00 mv r11,r1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
80149e8: 37 98 00 58 addi r24,sp,88
80149ec: 37 96 00 5c addi r22,sp,92
80149f0: 37 8f 00 4c addi r15,sp,76
80149f4: 37 95 00 50 addi r21,sp,80
80149f8: 78 14 08 03 mvhi r20,0x803
80149fc: 78 13 08 03 mvhi r19,0x803
8014a00: 78 19 08 03 mvhi r25,0x803
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
8014a04: 34 31 00 30 addi r17,r1,48
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
8014a08: 34 30 00 68 addi r16,r1,104
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
8014a0c: 34 21 00 08 addi r1,r1,8
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8014a10: 5b 96 00 58 sw (sp+88),r22
the_chain->permanent_null = NULL;
8014a14: 5b 97 00 5c sw (sp+92),r23
the_chain->last = _Chain_Head(the_chain);
8014a18: 5b 98 00 60 sw (sp+96),r24
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8014a1c: 5b 95 00 4c sw (sp+76),r21
the_chain->permanent_null = NULL;
8014a20: 5b 97 00 50 sw (sp+80),r23
the_chain->last = _Chain_Head(the_chain);
8014a24: 5b 8f 00 54 sw (sp+84),r15
8014a28: 3a 94 ed 84 ori r20,r20,0xed84
8014a2c: 3a 73 ec c4 ori r19,r19,0xecc4
8014a30: 3b 39 ec 34 ori r25,r25,0xec34
8014a34: 5b 81 00 48 sw (sp+72),r1
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
8014a38: 35 7b 00 40 addi fp,r11,64
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
8014a3c: 34 0c 00 01 mvi r12,1
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
8014a40: 34 0d 00 03 mvi r13,3
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
8014a44: 34 12 ff fe mvi r18,-2
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
8014a48: 59 78 00 78 sw (r11+120),r24
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
8014a4c: 2a 82 00 00 lw r2,(r20+0)
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
8014a50: 29 63 00 3c lw r3,(r11+60)
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
8014a54: ba 20 08 00 mv r1,r17
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
8014a58: 59 62 00 3c sw (r11+60),r2
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
8014a5c: c8 43 10 00 sub r2,r2,r3
8014a60: b9 e0 18 00 mv r3,r15
8014a64: f8 00 15 5b calli 8019fd0 <_Watchdog_Adjust_to_chain>
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
8014a68: 29 62 00 74 lw r2,(r11+116)
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
8014a6c: 2a 6e 00 00 lw r14,(r19+0)
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
8014a70: 50 4e 00 19 bgeu r2,r14,8014ad4 <_Timer_server_Body+0x13c>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
8014a74: c9 c2 10 00 sub r2,r14,r2
8014a78: ba 00 08 00 mv r1,r16
8014a7c: b9 e0 18 00 mv r3,r15
8014a80: f8 00 15 54 calli 8019fd0 <_Watchdog_Adjust_to_chain>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
8014a84: 59 6e 00 74 sw (r11+116),r14
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
8014a88: 29 61 00 78 lw r1,(r11+120)
8014a8c: f8 00 03 1e calli 8015704 <_Chain_Get>
if ( timer == NULL ) {
8014a90: 44 20 00 0a be r1,r0,8014ab8 <_Timer_server_Body+0x120> <== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
8014a94: 28 22 00 38 lw r2,(r1+56) <== NOT EXECUTED
8014a98: 44 4c 00 15 be r2,r12,8014aec <_Timer_server_Body+0x154> <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
8014a9c: 5c 4d ff fb bne r2,r13,8014a88 <_Timer_server_Body+0xf0> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
8014aa0: 34 22 00 10 addi r2,r1,16 <== NOT EXECUTED
8014aa4: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
8014aa8: f8 00 15 74 calli 801a078 <_Watchdog_Insert> <== NOT EXECUTED
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
8014aac: 29 61 00 78 lw r1,(r11+120) <== NOT EXECUTED
8014ab0: f8 00 03 15 calli 8015704 <_Chain_Get> <== NOT EXECUTED
if ( timer == NULL ) {
8014ab4: 5c 20 ff f8 bne r1,r0,8014a94 <_Timer_server_Body+0xfc> <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
8014ab8: 90 00 10 00 rcsr r2,IE
8014abc: a0 52 18 00 and r3,r2,r18
8014ac0: d0 03 00 00 wcsr IE,r3
if ( _Chain_Is_empty( insert_chain ) ) {
8014ac4: 2b 83 00 58 lw r3,(sp+88)
8014ac8: 46 c3 00 0d be r22,r3,8014afc <_Timer_server_Body+0x164> <== ALWAYS TAKEN
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
8014acc: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
8014ad0: e3 ff ff df bi 8014a4c <_Timer_server_Body+0xb4> <== NOT EXECUTED
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
8014ad4: 51 c2 ff ec bgeu r14,r2,8014a84 <_Timer_server_Body+0xec>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
8014ad8: c8 4e 18 00 sub r3,r2,r14
8014adc: ba 00 08 00 mv r1,r16
8014ae0: 34 02 00 01 mvi r2,1
8014ae4: f8 00 14 fd calli 8019ed8 <_Watchdog_Adjust>
8014ae8: e3 ff ff e7 bi 8014a84 <_Timer_server_Body+0xec>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
8014aec: 34 22 00 10 addi r2,r1,16 <== NOT EXECUTED
8014af0: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
8014af4: f8 00 15 61 calli 801a078 <_Watchdog_Insert> <== NOT EXECUTED
8014af8: e3 ff ff e4 bi 8014a88 <_Timer_server_Body+0xf0> <== NOT EXECUTED
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
8014afc: 59 77 00 78 sw (r11+120),r23
_ISR_Enable( level );
8014b00: d0 02 00 00 wcsr IE,r2
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
8014b04: 2b 82 00 4c lw r2,(sp+76)
8014b08: 5e a2 00 0b bne r21,r2,8014b34 <_Timer_server_Body+0x19c>
8014b0c: e0 00 00 11 bi 8014b50 <_Timer_server_Body+0x1b8>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
8014b10: 28 83 00 00 lw r3,(r4+0)
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
8014b14: 58 97 00 08 sw (r4+8),r23
the_chain->first = new_first;
8014b18: 5b 83 00 4c sw (sp+76),r3
new_first->previous = _Chain_Head(the_chain);
8014b1c: 58 6f 00 04 sw (r3+4),r15
_ISR_Enable( level );
8014b20: d0 02 00 00 wcsr IE,r2
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
8014b24: 28 82 00 24 lw r2,(r4+36)
8014b28: 28 83 00 1c lw r3,(r4+28)
8014b2c: 28 81 00 20 lw r1,(r4+32)
8014b30: d8 60 00 00 call r3
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
8014b34: 90 00 10 00 rcsr r2,IE
8014b38: a0 52 18 00 and r3,r2,r18
8014b3c: d0 03 00 00 wcsr IE,r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
8014b40: 2b 84 00 4c lw r4,(sp+76)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
8014b44: 5e a4 ff f3 bne r21,r4,8014b10 <_Timer_server_Body+0x178>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
8014b48: d0 02 00 00 wcsr IE,r2
8014b4c: e3 ff ff bf bi 8014a48 <_Timer_server_Body+0xb0>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
8014b50: 34 01 00 00 mvi r1,0
8014b54: 31 61 00 7c sb (r11+124),r1
8014b58: 2b 21 00 00 lw r1,(r25+0)
8014b5c: 34 21 00 01 addi r1,r1,1
8014b60: 5b 21 00 00 sw (r25+0),r1
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
8014b64: 29 61 00 00 lw r1,(r11+0)
8014b68: 34 02 00 08 mvi r2,8
8014b6c: f8 00 11 c0 calli 801926c <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
8014b70: b9 60 08 00 mv r1,r11
8014b74: fb ff ff 47 calli 8014890 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
8014b78: b9 60 08 00 mv r1,r11
8014b7c: fb ff ff 66 calli 8014914 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
8014b80: f8 00 0e 5a calli 80184e8 <_Thread_Enable_dispatch>
ts->active = true;
8014b84: 34 01 00 01 mvi r1,1
8014b88: 31 61 00 7c sb (r11+124),r1
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
8014b8c: 2b 81 00 48 lw r1,(sp+72)
8014b90: f8 00 15 a1 calli 801a214 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
8014b94: bb 60 08 00 mv r1,fp
8014b98: f8 00 15 9f calli 801a214 <_Watchdog_Remove>
8014b9c: e3 ff ff ab bi 8014a48 <_Timer_server_Body+0xb0>
08014ba0 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
8014ba0: 37 9c ff f8 addi sp,sp,-8
8014ba4: 5b 8b 00 08 sw (sp+8),r11
8014ba8: 5b 9d 00 04 sw (sp+4),ra
if ( ts->insert_chain == NULL ) {
8014bac: 28 23 00 78 lw r3,(r1+120)
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
8014bb0: b8 20 58 00 mv r11,r1
8014bb4: b8 40 08 00 mv r1,r2
if ( ts->insert_chain == NULL ) {
8014bb8: 44 60 00 07 be r3,r0,8014bd4 <_Timer_server_Schedule_operation_method+0x34><== ALWAYS TAKEN
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
8014bbc: 29 61 00 78 lw r1,(r11+120) <== NOT EXECUTED
8014bc0: f8 00 02 c5 calli 80156d4 <_Chain_Append> <== NOT EXECUTED
}
}
8014bc4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8014bc8: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8014bcc: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
8014bd0: c3 a0 00 00 ret <== NOT EXECUTED
8014bd4: 78 02 08 03 mvhi r2,0x803
8014bd8: 38 42 ec 34 ori r2,r2,0xec34
8014bdc: 28 43 00 00 lw r3,(r2+0)
8014be0: 34 63 00 01 addi r3,r3,1
8014be4: 58 43 00 00 sw (r2+0),r3
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
8014be8: 28 22 00 38 lw r2,(r1+56)
8014bec: 34 03 00 01 mvi r3,1
8014bf0: 44 43 00 28 be r2,r3,8014c90 <_Timer_server_Schedule_operation_method+0xf0>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
8014bf4: 34 03 00 03 mvi r3,3
8014bf8: 44 43 00 06 be r2,r3,8014c10 <_Timer_server_Schedule_operation_method+0x70>
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
8014bfc: f8 00 0e 3b calli 80184e8 <_Thread_Enable_dispatch>
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
8014c00: 2b 9d 00 04 lw ra,(sp+4)
8014c04: 2b 8b 00 08 lw r11,(sp+8)
8014c08: 37 9c 00 08 addi sp,sp,8
8014c0c: c3 a0 00 00 ret
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
8014c10: 90 00 38 00 rcsr r7,IE
8014c14: 34 02 ff fe mvi r2,-2
8014c18: a0 e2 10 00 and r2,r7,r2
8014c1c: d0 02 00 00 wcsr IE,r2
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
8014c20: 29 63 00 68 lw r3,(r11+104)
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
8014c24: 78 02 08 03 mvhi r2,0x803
last_snapshot = ts->TOD_watchdogs.last_snapshot;
8014c28: 29 64 00 74 lw r4,(r11+116)
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
8014c2c: 38 42 ec c4 ori r2,r2,0xecc4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
8014c30: 35 65 00 6c addi r5,r11,108
8014c34: 28 42 00 00 lw r2,(r2+0)
8014c38: 44 65 00 0b be r3,r5,8014c64 <_Timer_server_Schedule_operation_method+0xc4>
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
8014c3c: 28 66 00 10 lw r6,(r3+16)
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
8014c40: b4 c4 28 00 add r5,r6,r4
delta_interval += delta;
8014c44: c8 a2 28 00 sub r5,r5,r2
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
8014c48: 50 82 00 06 bgeu r4,r2,8014c60 <_Timer_server_Schedule_operation_method+0xc0>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
8014c4c: c8 44 20 00 sub r4,r2,r4
if (delta_interval > delta) {
8014c50: f4 c4 40 00 cmpgu r8,r6,r4
delta_interval -= delta;
8014c54: c8 c4 28 00 sub r5,r6,r4
if ( snapshot > last_snapshot ) {
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
8014c58: c8 08 20 00 sub r4,r0,r8
8014c5c: a0 a4 28 00 and r5,r5,r4
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
8014c60: 58 65 00 10 sw (r3+16),r5
}
ts->TOD_watchdogs.last_snapshot = snapshot;
8014c64: 59 62 00 74 sw (r11+116),r2
_ISR_Enable( level );
8014c68: d0 07 00 00 wcsr IE,r7
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
8014c6c: 34 22 00 10 addi r2,r1,16
8014c70: 35 61 00 68 addi r1,r11,104
8014c74: f8 00 15 01 calli 801a078 <_Watchdog_Insert>
if ( !ts->active ) {
8014c78: 41 61 00 7c lbu r1,(r11+124)
8014c7c: 5c 20 ff e0 bne r1,r0,8014bfc <_Timer_server_Schedule_operation_method+0x5c>
_Timer_server_Reset_tod_system_watchdog( ts );
8014c80: b9 60 08 00 mv r1,r11
8014c84: fb ff ff 24 calli 8014914 <_Timer_server_Reset_tod_system_watchdog>
}
}
_Thread_Enable_dispatch();
8014c88: f8 00 0e 18 calli 80184e8 <_Thread_Enable_dispatch>
8014c8c: e3 ff ff dd bi 8014c00 <_Timer_server_Schedule_operation_method+0x60>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
8014c90: 90 00 20 00 rcsr r4,IE
8014c94: 34 02 ff fe mvi r2,-2
8014c98: a0 82 10 00 and r2,r4,r2
8014c9c: d0 02 00 00 wcsr IE,r2
snapshot = _Watchdog_Ticks_since_boot;
8014ca0: 78 03 08 03 mvhi r3,0x803
8014ca4: 38 63 ed 84 ori r3,r3,0xed84
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
8014ca8: 29 62 00 30 lw r2,(r11+48)
8014cac: 28 65 00 00 lw r5,(r3+0)
last_snapshot = ts->Interval_watchdogs.last_snapshot;
8014cb0: 29 63 00 3c lw r3,(r11+60)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
8014cb4: 35 66 00 34 addi r6,r11,52
8014cb8: 44 46 00 08 be r2,r6,8014cd8 <_Timer_server_Schedule_operation_method+0x138>
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
8014cbc: 28 47 00 10 lw r7,(r2+16)
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
8014cc0: c8 a3 18 00 sub r3,r5,r3
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
8014cc4: f4 e3 30 00 cmpgu r6,r7,r3
delta_interval -= delta;
8014cc8: c8 e3 18 00 sub r3,r7,r3
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
8014ccc: c8 06 30 00 sub r6,r0,r6
8014cd0: a0 66 18 00 and r3,r3,r6
delta_interval -= delta;
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
8014cd4: 58 43 00 10 sw (r2+16),r3
}
ts->Interval_watchdogs.last_snapshot = snapshot;
8014cd8: 59 65 00 3c sw (r11+60),r5
_ISR_Enable( level );
8014cdc: d0 04 00 00 wcsr IE,r4
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
8014ce0: 34 22 00 10 addi r2,r1,16
8014ce4: 35 61 00 30 addi r1,r11,48
8014ce8: f8 00 14 e4 calli 801a078 <_Watchdog_Insert>
if ( !ts->active ) {
8014cec: 41 61 00 7c lbu r1,(r11+124)
8014cf0: 5c 20 ff c3 bne r1,r0,8014bfc <_Timer_server_Schedule_operation_method+0x5c>
_Timer_server_Reset_interval_system_watchdog( ts );
8014cf4: b9 60 08 00 mv r1,r11
8014cf8: fb ff fe e6 calli 8014890 <_Timer_server_Reset_interval_system_watchdog>
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
8014cfc: f8 00 0d fb calli 80184e8 <_Thread_Enable_dispatch>
8014d00: e3 ff ff c0 bi 8014c00 <_Timer_server_Schedule_operation_method+0x60>
080056d8 <_Timespec_Add_to>:
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
80056d8: b8 20 28 00 mv r5,r1
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
80056dc: 28 44 00 04 lw r4,(r2+4)
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
uint32_t seconds = add->tv_sec;
80056e0: 28 41 00 00 lw r1,(r2+0)
/* Add the basics */
time->tv_sec += add->tv_sec;
80056e4: 28 a3 00 00 lw r3,(r5+0)
time->tv_nsec += add->tv_nsec;
80056e8: 28 a2 00 04 lw r2,(r5+4)
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
80056ec: 78 06 3b 9a mvhi r6,0x3b9a
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
80056f0: b4 61 18 00 add r3,r3,r1
time->tv_nsec += add->tv_nsec;
80056f4: b4 82 10 00 add r2,r4,r2
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
80056f8: 58 a3 00 00 sw (r5+0),r3
time->tv_nsec += add->tv_nsec;
80056fc: 58 a2 00 04 sw (r5+4),r2
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
8005700: 38 c6 c9 ff ori r6,r6,0xc9ff
8005704: 50 c2 00 09 bgeu r6,r2,8005728 <_Timespec_Add_to+0x50>
8005708: 78 04 c4 65 mvhi r4,0xc465
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
800570c: 38 84 36 00 ori r4,r4,0x3600
8005710: b4 44 10 00 add r2,r2,r4
*
* This routines adds two timespecs. The second argument is added
* to the first.
*/
uint32_t _Timespec_Add_to(
8005714: 34 63 00 01 addi r3,r3,1
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
time->tv_sec++;
seconds++;
8005718: 34 21 00 01 addi r1,r1,1
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
800571c: 54 46 ff fd bgu r2,r6,8005710 <_Timespec_Add_to+0x38> <== NEVER TAKEN
8005720: 58 a3 00 00 sw (r5+0),r3
8005724: 58 a2 00 04 sw (r5+4),r2
time->tv_sec++;
seconds++;
}
return seconds;
}
8005728: c3 a0 00 00 ret
08007dc8 <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
8007dc8: 28 24 00 00 lw r4,(r1+0)
8007dcc: 28 43 00 00 lw r3,(r2+0)
8007dd0: 4c 64 00 03 bge r3,r4,8007ddc <_Timespec_Greater_than+0x14>
8007dd4: 34 01 00 01 mvi r1,1
8007dd8: c3 a0 00 00 ret
return true;
if ( lhs->tv_sec < rhs->tv_sec )
8007ddc: 4c 83 00 03 bge r4,r3,8007de8 <_Timespec_Greater_than+0x20><== ALWAYS TAKEN
8007de0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8007de4: c3 a0 00 00 ret <== NOT EXECUTED
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
8007de8: 28 23 00 04 lw r3,(r1+4)
8007dec: 28 41 00 04 lw r1,(r2+4)
8007df0: e8 61 08 00 cmpg r1,r3,r1
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
8007df4: c3 a0 00 00 ret
08005948 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
8005948: 37 9c ff e8 addi sp,sp,-24
800594c: 5b 8b 00 18 sw (sp+24),r11
8005950: 5b 8c 00 14 sw (sp+20),r12
8005954: 5b 8d 00 10 sw (sp+16),r13
8005958: 5b 8e 00 0c sw (sp+12),r14
800595c: 5b 8f 00 08 sw (sp+8),r15
8005960: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
8005964: 78 0c 08 01 mvhi r12,0x801
8005968: 39 8c d9 d4 ori r12,r12,0xd9d4
800596c: 29 8b 00 08 lw r11,(r12+8)
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
8005970: b8 20 78 00 mv r15,r1
8005974: b8 60 70 00 mv r14,r3
8005978: 20 4d 00 ff andi r13,r2,0xff
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
800597c: 45 6c 00 09 be r11,r12,80059a0 <_User_extensions_Fatal+0x58><== NEVER TAKEN
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
8005980: 29 64 00 30 lw r4,(r11+48)
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
8005984: b9 e0 08 00 mv r1,r15
8005988: b9 a0 10 00 mv r2,r13
800598c: b9 c0 18 00 mv r3,r14
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
8005990: 44 80 00 02 be r4,r0,8005998 <_User_extensions_Fatal+0x50>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
8005994: d8 80 00 00 call r4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
8005998: 29 6b 00 04 lw r11,(r11+4)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
800599c: 5d 6c ff f9 bne r11,r12,8005980 <_User_extensions_Fatal+0x38>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
80059a0: 2b 9d 00 04 lw ra,(sp+4)
80059a4: 2b 8b 00 18 lw r11,(sp+24)
80059a8: 2b 8c 00 14 lw r12,(sp+20)
80059ac: 2b 8d 00 10 lw r13,(sp+16)
80059b0: 2b 8e 00 0c lw r14,(sp+12)
80059b4: 2b 8f 00 08 lw r15,(sp+8)
80059b8: 37 9c 00 18 addi sp,sp,24
80059bc: c3 a0 00 00 ret
08005780 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
8005780: 37 9c ff e8 addi sp,sp,-24
8005784: 5b 8b 00 18 sw (sp+24),r11
8005788: 5b 8c 00 14 sw (sp+20),r12
800578c: 5b 8d 00 10 sw (sp+16),r13
8005790: 5b 8e 00 0c sw (sp+12),r14
8005794: 5b 8f 00 08 sw (sp+8),r15
8005798: 5b 9d 00 04 sw (sp+4),ra
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
800579c: 78 04 08 01 mvhi r4,0x801
80057a0: 38 84 d0 c4 ori r4,r4,0xd0c4
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
80057a4: 78 03 08 01 mvhi r3,0x801
80057a8: 78 01 08 01 mvhi r1,0x801
80057ac: 38 63 d9 d4 ori r3,r3,0xd9d4
80057b0: 38 21 d8 30 ori r1,r1,0xd830
initial_extensions = Configuration.User_extension_table;
80057b4: 28 8c 00 3c lw r12,(r4+60)
the_chain->permanent_null = NULL;
80057b8: 34 0d 00 00 mvi r13,0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
80057bc: 34 65 00 04 addi r5,r3,4
80057c0: 34 22 00 04 addi r2,r1,4
80057c4: 58 65 00 00 sw (r3+0),r5
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
80057c8: 58 63 00 08 sw (r3+8),r3
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
80057cc: 58 22 00 00 sw (r1+0),r2
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
80057d0: 58 21 00 08 sw (r1+8),r1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
80057d4: 58 6d 00 04 sw (r3+4),r13
80057d8: 58 2d 00 04 sw (r1+4),r13
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
80057dc: 28 8e 00 38 lw r14,(r4+56)
initial_extensions = Configuration.User_extension_table;
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
80057e0: 45 8d 00 25 be r12,r13,8005874 <_User_extensions_Handler_initialization+0xf4>
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
80057e4: b5 ce 78 00 add r15,r14,r14
80057e8: b5 ee 78 00 add r15,r15,r14
80057ec: 34 02 00 04 mvi r2,4
80057f0: b9 e0 08 00 mv r1,r15
80057f4: fb ff ea 7f calli 80001f0 <__ashlsi3>
80057f8: b5 e1 78 00 add r15,r15,r1
80057fc: b5 ee 78 00 add r15,r15,r14
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
8005800: b9 e0 08 00 mv r1,r15
8005804: f8 00 01 b8 calli 8005ee4 <_Workspace_Allocate_or_fatal_error>
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
8005808: b9 a0 10 00 mv r2,r13
800580c: b9 e0 18 00 mv r3,r15
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
8005810: b8 20 58 00 mv r11,r1
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
8005814: f8 00 1c 10 calli 800c854 <memset>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
8005818: 45 cd 00 17 be r14,r13,8005874 <_User_extensions_Handler_initialization+0xf4><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
800581c: 29 81 00 00 lw r1,(r12+0)
8005820: 35 ad 00 01 addi r13,r13,1
8005824: 59 61 00 14 sw (r11+20),r1
8005828: 29 82 00 04 lw r2,(r12+4)
_User_extensions_Add_set( extension );
800582c: b9 60 08 00 mv r1,r11
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
8005830: 59 62 00 18 sw (r11+24),r2
8005834: 29 82 00 08 lw r2,(r12+8)
8005838: 59 62 00 1c sw (r11+28),r2
800583c: 29 82 00 0c lw r2,(r12+12)
8005840: 59 62 00 20 sw (r11+32),r2
8005844: 29 82 00 10 lw r2,(r12+16)
8005848: 59 62 00 24 sw (r11+36),r2
800584c: 29 82 00 14 lw r2,(r12+20)
8005850: 59 62 00 28 sw (r11+40),r2
8005854: 29 82 00 18 lw r2,(r12+24)
8005858: 59 62 00 2c sw (r11+44),r2
800585c: 29 82 00 1c lw r2,(r12+28)
8005860: 35 8c 00 20 addi r12,r12,32
8005864: 59 62 00 30 sw (r11+48),r2
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
8005868: 35 6b 00 34 addi r11,r11,52
_User_extensions_Add_set( extension );
800586c: f8 00 10 c9 calli 8009b90 <_User_extensions_Add_set>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
8005870: 55 cd ff eb bgu r14,r13,800581c <_User_extensions_Handler_initialization+0x9c>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
8005874: 2b 9d 00 04 lw ra,(sp+4)
8005878: 2b 8b 00 18 lw r11,(sp+24)
800587c: 2b 8c 00 14 lw r12,(sp+20)
8005880: 2b 8d 00 10 lw r13,(sp+16)
8005884: 2b 8e 00 0c lw r14,(sp+12)
8005888: 2b 8f 00 08 lw r15,(sp+8)
800588c: 37 9c 00 18 addi sp,sp,24
8005890: c3 a0 00 00 ret
08005894 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
8005894: 37 9c ff f0 addi sp,sp,-16
8005898: 5b 8b 00 10 sw (sp+16),r11
800589c: 5b 8c 00 0c sw (sp+12),r12
80058a0: 5b 8d 00 08 sw (sp+8),r13
80058a4: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
80058a8: 78 0c 08 01 mvhi r12,0x801
80058ac: 39 8c d9 d4 ori r12,r12,0xd9d4
80058b0: 29 8b 00 00 lw r11,(r12+0)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
80058b4: 35 8c 00 04 addi r12,r12,4
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
80058b8: b8 20 68 00 mv r13,r1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
80058bc: 45 6c 00 07 be r11,r12,80058d8 <_User_extensions_Thread_begin+0x44><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
80058c0: 29 62 00 28 lw r2,(r11+40)
(*the_extension->Callouts.thread_begin)( executing );
80058c4: b9 a0 08 00 mv r1,r13
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
80058c8: 44 40 00 02 be r2,r0,80058d0 <_User_extensions_Thread_begin+0x3c>
(*the_extension->Callouts.thread_begin)( executing );
80058cc: d8 40 00 00 call r2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
80058d0: 29 6b 00 00 lw r11,(r11+0)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
80058d4: 5d 6c ff fb bne r11,r12,80058c0 <_User_extensions_Thread_begin+0x2c>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
80058d8: 2b 9d 00 04 lw ra,(sp+4)
80058dc: 2b 8b 00 10 lw r11,(sp+16)
80058e0: 2b 8c 00 0c lw r12,(sp+12)
80058e4: 2b 8d 00 08 lw r13,(sp+8)
80058e8: 37 9c 00 10 addi sp,sp,16
80058ec: c3 a0 00 00 ret
080059c0 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
80059c0: 37 9c ff ec addi sp,sp,-20
80059c4: 5b 8b 00 14 sw (sp+20),r11
80059c8: 5b 8c 00 10 sw (sp+16),r12
80059cc: 5b 8d 00 0c sw (sp+12),r13
80059d0: 5b 8e 00 08 sw (sp+8),r14
80059d4: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
80059d8: 78 0d 08 01 mvhi r13,0x801
80059dc: 39 ad d9 d4 ori r13,r13,0xd9d4
80059e0: 29 ab 00 00 lw r11,(r13+0)
80059e4: 35 ad 00 04 addi r13,r13,4
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
80059e8: b8 20 70 00 mv r14,r1
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
80059ec: 45 6d 00 0b be r11,r13,8005a18 <_User_extensions_Thread_create+0x58><== NEVER TAKEN
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
80059f0: 78 0c 08 01 mvhi r12,0x801
80059f4: 39 8c d8 e8 ori r12,r12,0xd8e8
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
80059f8: 29 63 00 14 lw r3,(r11+20)
status = (*the_extension->Callouts.thread_create)(
80059fc: b9 c0 10 00 mv r2,r14
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
8005a00: 44 60 00 04 be r3,r0,8005a10 <_User_extensions_Thread_create+0x50>
status = (*the_extension->Callouts.thread_create)(
8005a04: 29 81 00 00 lw r1,(r12+0)
8005a08: d8 60 00 00 call r3
_Thread_Executing,
the_thread
);
if ( !status )
8005a0c: 44 20 00 04 be r1,r0,8005a1c <_User_extensions_Thread_create+0x5c>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
8005a10: 29 6b 00 00 lw r11,(r11+0)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
8005a14: 5d 6d ff f9 bne r11,r13,80059f8 <_User_extensions_Thread_create+0x38>
8005a18: 34 01 00 01 mvi r1,1
return false;
}
}
return true;
}
8005a1c: 2b 9d 00 04 lw ra,(sp+4)
8005a20: 2b 8b 00 14 lw r11,(sp+20)
8005a24: 2b 8c 00 10 lw r12,(sp+16)
8005a28: 2b 8d 00 0c lw r13,(sp+12)
8005a2c: 2b 8e 00 08 lw r14,(sp+8)
8005a30: 37 9c 00 14 addi sp,sp,20
8005a34: c3 a0 00 00 ret
08005a38 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
8005a38: 37 9c ff ec addi sp,sp,-20
8005a3c: 5b 8b 00 14 sw (sp+20),r11
8005a40: 5b 8c 00 10 sw (sp+16),r12
8005a44: 5b 8d 00 0c sw (sp+12),r13
8005a48: 5b 8e 00 08 sw (sp+8),r14
8005a4c: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
8005a50: 78 0d 08 01 mvhi r13,0x801
8005a54: 39 ad d9 d4 ori r13,r13,0xd9d4
8005a58: 29 ab 00 08 lw r11,(r13+8)
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
8005a5c: b8 20 70 00 mv r14,r1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
8005a60: 45 6d 00 0a be r11,r13,8005a88 <_User_extensions_Thread_delete+0x50><== NEVER TAKEN
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
(*the_extension->Callouts.thread_delete)(
8005a64: 78 0c 08 01 mvhi r12,0x801
8005a68: 39 8c d8 e8 ori r12,r12,0xd8e8
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
8005a6c: 29 63 00 20 lw r3,(r11+32)
(*the_extension->Callouts.thread_delete)(
8005a70: b9 c0 10 00 mv r2,r14
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
8005a74: 44 60 00 03 be r3,r0,8005a80 <_User_extensions_Thread_delete+0x48>
(*the_extension->Callouts.thread_delete)(
8005a78: 29 81 00 00 lw r1,(r12+0)
8005a7c: d8 60 00 00 call r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
8005a80: 29 6b 00 04 lw r11,(r11+4)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
8005a84: 5d 6d ff fa bne r11,r13,8005a6c <_User_extensions_Thread_delete+0x34>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
8005a88: 2b 9d 00 04 lw ra,(sp+4)
8005a8c: 2b 8b 00 14 lw r11,(sp+20)
8005a90: 2b 8c 00 10 lw r12,(sp+16)
8005a94: 2b 8d 00 0c lw r13,(sp+12)
8005a98: 2b 8e 00 08 lw r14,(sp+8)
8005a9c: 37 9c 00 14 addi sp,sp,20
8005aa0: c3 a0 00 00 ret
080058f0 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
80058f0: 37 9c ff f0 addi sp,sp,-16
80058f4: 5b 8b 00 10 sw (sp+16),r11
80058f8: 5b 8c 00 0c sw (sp+12),r12
80058fc: 5b 8d 00 08 sw (sp+8),r13
8005900: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
8005904: 78 0c 08 01 mvhi r12,0x801
8005908: 39 8c d9 d4 ori r12,r12,0xd9d4
800590c: 29 8b 00 08 lw r11,(r12+8)
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
8005910: b8 20 68 00 mv r13,r1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
8005914: 45 6c 00 07 be r11,r12,8005930 <_User_extensions_Thread_exitted+0x40><== NEVER TAKEN
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
8005918: 29 62 00 2c lw r2,(r11+44)
(*the_extension->Callouts.thread_exitted)( executing );
800591c: b9 a0 08 00 mv r1,r13
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
8005920: 44 40 00 02 be r2,r0,8005928 <_User_extensions_Thread_exitted+0x38>
(*the_extension->Callouts.thread_exitted)( executing );
8005924: d8 40 00 00 call r2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
8005928: 29 6b 00 04 lw r11,(r11+4)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
800592c: 5d 6c ff fb bne r11,r12,8005918 <_User_extensions_Thread_exitted+0x28>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
8005930: 2b 9d 00 04 lw ra,(sp+4)
8005934: 2b 8b 00 10 lw r11,(sp+16)
8005938: 2b 8c 00 0c lw r12,(sp+12)
800593c: 2b 8d 00 08 lw r13,(sp+8)
8005940: 37 9c 00 10 addi sp,sp,16
8005944: c3 a0 00 00 ret
08006b98 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
8006b98: 37 9c ff ec addi sp,sp,-20
8006b9c: 5b 8b 00 14 sw (sp+20),r11
8006ba0: 5b 8c 00 10 sw (sp+16),r12
8006ba4: 5b 8d 00 0c sw (sp+12),r13
8006ba8: 5b 8e 00 08 sw (sp+8),r14
8006bac: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
8006bb0: 78 0d 08 02 mvhi r13,0x802
8006bb4: 39 ad 1a 2c ori r13,r13,0x1a2c
8006bb8: 29 ab 00 00 lw r11,(r13+0)
8006bbc: 35 ad 00 04 addi r13,r13,4
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
8006bc0: b8 20 70 00 mv r14,r1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
8006bc4: 45 6d 00 0a be r11,r13,8006bec <_User_extensions_Thread_restart+0x54><== NEVER TAKEN
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
(*the_extension->Callouts.thread_restart)(
8006bc8: 78 0c 08 02 mvhi r12,0x802
8006bcc: 39 8c 19 40 ori r12,r12,0x1940
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
8006bd0: 29 63 00 1c lw r3,(r11+28)
(*the_extension->Callouts.thread_restart)(
8006bd4: b9 c0 10 00 mv r2,r14
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
8006bd8: 44 60 00 03 be r3,r0,8006be4 <_User_extensions_Thread_restart+0x4c>
(*the_extension->Callouts.thread_restart)(
8006bdc: 29 81 00 00 lw r1,(r12+0)
8006be0: d8 60 00 00 call r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
8006be4: 29 6b 00 00 lw r11,(r11+0)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
8006be8: 5d 6d ff fa bne r11,r13,8006bd0 <_User_extensions_Thread_restart+0x38>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
8006bec: 2b 9d 00 04 lw ra,(sp+4)
8006bf0: 2b 8b 00 14 lw r11,(sp+20)
8006bf4: 2b 8c 00 10 lw r12,(sp+16)
8006bf8: 2b 8d 00 0c lw r13,(sp+12)
8006bfc: 2b 8e 00 08 lw r14,(sp+8)
8006c00: 37 9c 00 14 addi sp,sp,20
8006c04: c3 a0 00 00 ret
08005aa4 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
8005aa4: 37 9c ff ec addi sp,sp,-20
8005aa8: 5b 8b 00 14 sw (sp+20),r11
8005aac: 5b 8c 00 10 sw (sp+16),r12
8005ab0: 5b 8d 00 0c sw (sp+12),r13
8005ab4: 5b 8e 00 08 sw (sp+8),r14
8005ab8: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
8005abc: 78 0d 08 01 mvhi r13,0x801
8005ac0: 39 ad d9 d4 ori r13,r13,0xd9d4
8005ac4: 29 ab 00 00 lw r11,(r13+0)
8005ac8: 35 ad 00 04 addi r13,r13,4
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
8005acc: b8 20 70 00 mv r14,r1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
8005ad0: 45 6d 00 0a be r11,r13,8005af8 <_User_extensions_Thread_start+0x54><== NEVER TAKEN
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
(*the_extension->Callouts.thread_start)(
8005ad4: 78 0c 08 01 mvhi r12,0x801
8005ad8: 39 8c d8 e8 ori r12,r12,0xd8e8
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
8005adc: 29 63 00 18 lw r3,(r11+24)
(*the_extension->Callouts.thread_start)(
8005ae0: b9 c0 10 00 mv r2,r14
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
8005ae4: 44 60 00 03 be r3,r0,8005af0 <_User_extensions_Thread_start+0x4c>
(*the_extension->Callouts.thread_start)(
8005ae8: 29 81 00 00 lw r1,(r12+0)
8005aec: d8 60 00 00 call r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
8005af0: 29 6b 00 00 lw r11,(r11+0)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
8005af4: 5d 6d ff fa bne r11,r13,8005adc <_User_extensions_Thread_start+0x38>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
8005af8: 2b 9d 00 04 lw ra,(sp+4)
8005afc: 2b 8b 00 14 lw r11,(sp+20)
8005b00: 2b 8c 00 10 lw r12,(sp+16)
8005b04: 2b 8d 00 0c lw r13,(sp+12)
8005b08: 2b 8e 00 08 lw r14,(sp+8)
8005b0c: 37 9c 00 14 addi sp,sp,20
8005b10: c3 a0 00 00 ret
08005b14 <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
8005b14: 37 9c ff ec addi sp,sp,-20
8005b18: 5b 8b 00 14 sw (sp+20),r11
8005b1c: 5b 8c 00 10 sw (sp+16),r12
8005b20: 5b 8d 00 0c sw (sp+12),r13
8005b24: 5b 8e 00 08 sw (sp+8),r14
8005b28: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
8005b2c: 78 0c 08 01 mvhi r12,0x801
8005b30: 39 8c d8 30 ori r12,r12,0xd830
8005b34: 29 8b 00 00 lw r11,(r12+0)
8005b38: 35 8c 00 04 addi r12,r12,4
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
8005b3c: b8 20 70 00 mv r14,r1
8005b40: b8 40 68 00 mv r13,r2
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
8005b44: 45 6c 00 07 be r11,r12,8005b60 <_User_extensions_Thread_switch+0x4c><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
8005b48: 29 63 00 08 lw r3,(r11+8)
8005b4c: b9 c0 08 00 mv r1,r14
8005b50: b9 a0 10 00 mv r2,r13
8005b54: d8 60 00 00 call r3
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
8005b58: 29 6b 00 00 lw r11,(r11+0)
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
8005b5c: 5d 6c ff fb bne r11,r12,8005b48 <_User_extensions_Thread_switch+0x34>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
8005b60: 2b 9d 00 04 lw ra,(sp+4)
8005b64: 2b 8b 00 14 lw r11,(sp+20)
8005b68: 2b 8c 00 10 lw r12,(sp+16)
8005b6c: 2b 8d 00 0c lw r13,(sp+12)
8005b70: 2b 8e 00 08 lw r14,(sp+8)
8005b74: 37 9c 00 14 addi sp,sp,20
8005b78: c3 a0 00 00 ret
08007f60 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
8007f60: 37 9c ff e4 addi sp,sp,-28
8007f64: 5b 8b 00 1c sw (sp+28),r11
8007f68: 5b 8c 00 18 sw (sp+24),r12
8007f6c: 5b 8d 00 14 sw (sp+20),r13
8007f70: 5b 8e 00 10 sw (sp+16),r14
8007f74: 5b 8f 00 0c sw (sp+12),r15
8007f78: 5b 90 00 08 sw (sp+8),r16
8007f7c: 5b 9d 00 04 sw (sp+4),ra
8007f80: b8 20 60 00 mv r12,r1
8007f84: b8 60 58 00 mv r11,r3
ISR_Level level;
_ISR_Disable( level );
8007f88: 90 00 20 00 rcsr r4,IE
8007f8c: 34 01 ff fe mvi r1,-2
8007f90: a0 81 08 00 and r1,r4,r1
8007f94: d0 01 00 00 wcsr IE,r1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
8007f98: 29 81 00 00 lw r1,(r12+0)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
8007f9c: 35 8e 00 04 addi r14,r12,4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
8007fa0: 44 2e 00 04 be r1,r14,8007fb0 <_Watchdog_Adjust+0x50>
switch ( direction ) {
8007fa4: 44 40 00 11 be r2,r0,8007fe8 <_Watchdog_Adjust+0x88>
8007fa8: 34 03 00 01 mvi r3,1
8007fac: 44 43 00 0b be r2,r3,8007fd8 <_Watchdog_Adjust+0x78> <== ALWAYS TAKEN
}
break;
}
}
_ISR_Enable( level );
8007fb0: d0 04 00 00 wcsr IE,r4
}
8007fb4: 2b 9d 00 04 lw ra,(sp+4)
8007fb8: 2b 8b 00 1c lw r11,(sp+28)
8007fbc: 2b 8c 00 18 lw r12,(sp+24)
8007fc0: 2b 8d 00 14 lw r13,(sp+20)
8007fc4: 2b 8e 00 10 lw r14,(sp+16)
8007fc8: 2b 8f 00 0c lw r15,(sp+12)
8007fcc: 2b 90 00 08 lw r16,(sp+8)
8007fd0: 37 9c 00 1c addi sp,sp,28
8007fd4: c3 a0 00 00 ret
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
8007fd8: 28 22 00 10 lw r2,(r1+16)
8007fdc: b4 4b 58 00 add r11,r2,r11
8007fe0: 58 2b 00 10 sw (r1+16),r11
break;
8007fe4: e3 ff ff f3 bi 8007fb0 <_Watchdog_Adjust+0x50>
case WATCHDOG_FORWARD:
while ( units ) {
8007fe8: 44 62 ff f2 be r3,r2,8007fb0 <_Watchdog_Adjust+0x50> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
8007fec: 28 2d 00 10 lw r13,(r1+16)
_Watchdog_First( header )->delta_interval -= units;
break;
8007ff0: b8 80 18 00 mv r3,r4
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
8007ff4: 34 10 00 01 mvi r16,1
_ISR_Enable( level );
_Watchdog_Tickle( header );
_ISR_Disable( level );
8007ff8: 34 0f ff fe mvi r15,-2
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
8007ffc: 51 6d 00 02 bgeu r11,r13,8008004 <_Watchdog_Adjust+0xa4> <== ALWAYS TAKEN
8008000: e0 00 00 11 bi 8008044 <_Watchdog_Adjust+0xe4> <== NOT EXECUTED
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
8008004: 58 30 00 10 sw (r1+16),r16
_ISR_Enable( level );
8008008: d0 03 00 00 wcsr IE,r3
_Watchdog_Tickle( header );
800800c: b9 80 08 00 mv r1,r12
8008010: f8 00 00 b0 calli 80082d0 <_Watchdog_Tickle>
_ISR_Disable( level );
8008014: 90 00 10 00 rcsr r2,IE
8008018: a0 4f 08 00 and r1,r2,r15
800801c: d0 01 00 00 wcsr IE,r1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
8008020: 29 84 00 00 lw r4,(r12+0)
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
8008024: c9 6d 58 00 sub r11,r11,r13
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
8008028: b8 40 18 00 mv r3,r2
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
800802c: b8 80 08 00 mv r1,r4
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
8008030: 45 c4 00 08 be r14,r4,8008050 <_Watchdog_Adjust+0xf0>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
8008034: 45 60 00 07 be r11,r0,8008050 <_Watchdog_Adjust+0xf0> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
8008038: 28 2d 00 10 lw r13,(r1+16)
800803c: 51 6d ff f2 bgeu r11,r13,8008004 <_Watchdog_Adjust+0xa4>
8008040: b8 60 20 00 mv r4,r3
_Watchdog_First( header )->delta_interval -= units;
8008044: c9 ab 58 00 sub r11,r13,r11
8008048: 58 2b 00 10 sw (r1+16),r11
break;
800804c: e3 ff ff d9 bi 8007fb0 <_Watchdog_Adjust+0x50>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
8008050: b8 40 20 00 mv r4,r2
8008054: e3 ff ff d7 bi 8007fb0 <_Watchdog_Adjust+0x50>
08005b7c <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
8005b7c: 37 9c ff f8 addi sp,sp,-8
8005b80: 5b 8b 00 08 sw (sp+8),r11
8005b84: 5b 8c 00 04 sw (sp+4),r12
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
8005b88: 78 03 08 01 mvhi r3,0x801
8005b8c: 38 63 d8 c4 ori r3,r3,0xd8c4
8005b90: 28 69 00 00 lw r9,(r3+0)
_ISR_Disable( level );
8005b94: 90 00 30 00 rcsr r6,IE
8005b98: 34 08 ff fe mvi r8,-2
8005b9c: a0 c8 40 00 and r8,r6,r8
8005ba0: d0 08 00 00 wcsr IE,r8
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
8005ba4: 28 43 00 08 lw r3,(r2+8)
8005ba8: 5c 60 00 3e bne r3,r0,8005ca0 <_Watchdog_Insert+0x124>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
8005bac: 78 0c 08 01 mvhi r12,0x801
8005bb0: 39 8c d9 78 ori r12,r12,0xd978
8005bb4: 29 83 00 00 lw r3,(r12+0)
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
8005bb8: 34 0a 00 01 mvi r10,1
8005bbc: 78 07 08 01 mvhi r7,0x801
_Watchdog_Sync_count++;
8005bc0: b4 6a 18 00 add r3,r3,r10
8005bc4: 59 83 00 00 sw (r12+0),r3
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
8005bc8: 58 4a 00 08 sw (r2+8),r10
8005bcc: 38 e7 d8 e4 ori r7,r7,0xd8e4
_Watchdog_Sync_count++;
restart:
delta_interval = the_watchdog->initial;
8005bd0: 28 44 00 0c lw r4,(r2+12)
* cache *header!!
*
* Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc)
*
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
8005bd4: 28 23 00 00 lw r3,(r1+0)
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
8005bd8: 44 80 00 14 be r4,r0,8005c28 <_Watchdog_Insert+0xac>
8005bdc: 28 65 00 00 lw r5,(r3+0)
8005be0: 44 a0 00 12 be r5,r0,8005c28 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
8005be4: 28 65 00 10 lw r5,(r3+16)
8005be8: 54 a4 00 0e bgu r5,r4,8005c20 <_Watchdog_Insert+0xa4>
* used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
8005bec: d0 06 00 00 wcsr IE,r6
8005bf0: d0 08 00 00 wcsr IE,r8
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
8005bf4: 28 4b 00 08 lw r11,(r2+8)
8005bf8: 5d 6a 00 19 bne r11,r10,8005c5c <_Watchdog_Insert+0xe0>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
8005bfc: 28 eb 00 00 lw r11,(r7+0)
8005c00: 55 69 00 2d bgu r11,r9,8005cb4 <_Watchdog_Insert+0x138>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
8005c04: c8 85 20 00 sub r4,r4,r5
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
8005c08: 28 63 00 00 lw r3,(r3+0)
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
8005c0c: 44 80 00 07 be r4,r0,8005c28 <_Watchdog_Insert+0xac>
8005c10: 28 65 00 00 lw r5,(r3+0)
8005c14: 44 a0 00 05 be r5,r0,8005c28 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
8005c18: 28 65 00 10 lw r5,(r3+16)
8005c1c: 50 85 00 19 bgeu r4,r5,8005c80 <_Watchdog_Insert+0x104>
after->delta_interval -= delta_interval;
8005c20: c8 a4 28 00 sub r5,r5,r4
8005c24: 58 65 00 10 sw (r3+16),r5
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
8005c28: 28 63 00 04 lw r3,(r3+4)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
8005c2c: 78 01 08 01 mvhi r1,0x801
8005c30: 38 21 d9 7c ori r1,r1,0xd97c
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
8005c34: 58 44 00 10 sw (r2+16),r4
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
8005c38: 28 24 00 00 lw r4,(r1+0)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
8005c3c: 28 61 00 00 lw r1,(r3+0)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
8005c40: 58 43 00 04 sw (r2+4),r3
before_node = after_node->next;
after_node->next = the_node;
8005c44: 58 62 00 00 sw (r3+0),r2
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
8005c48: 34 03 00 02 mvi r3,2
8005c4c: 58 44 00 14 sw (r2+20),r4
8005c50: 58 43 00 08 sw (r2+8),r3
the_node->next = before_node;
before_node->previous = the_node;
8005c54: 58 22 00 04 sw (r1+4),r2
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
8005c58: 58 41 00 00 sw (r2+0),r1
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
8005c5c: 58 e9 00 00 sw (r7+0),r9
_Watchdog_Sync_count--;
8005c60: 29 81 00 00 lw r1,(r12+0)
8005c64: 34 21 ff ff addi r1,r1,-1
8005c68: 59 81 00 00 sw (r12+0),r1
_ISR_Enable( level );
8005c6c: d0 06 00 00 wcsr IE,r6
}
8005c70: 2b 8b 00 08 lw r11,(sp+8)
8005c74: 2b 8c 00 04 lw r12,(sp+4)
8005c78: 37 9c 00 08 addi sp,sp,8
8005c7c: c3 a0 00 00 ret
* used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
8005c80: d0 06 00 00 wcsr IE,r6
8005c84: d0 08 00 00 wcsr IE,r8
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
8005c88: 28 4b 00 08 lw r11,(r2+8)
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
8005c8c: c8 85 20 00 sub r4,r4,r5
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
8005c90: 5d 6a ff f3 bne r11,r10,8005c5c <_Watchdog_Insert+0xe0> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
8005c94: 28 e5 00 00 lw r5,(r7+0)
8005c98: 54 a9 00 07 bgu r5,r9,8005cb4 <_Watchdog_Insert+0x138> <== NEVER TAKEN
8005c9c: e3 ff ff db bi 8005c08 <_Watchdog_Insert+0x8c>
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
8005ca0: d0 06 00 00 wcsr IE,r6
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
8005ca4: 2b 8b 00 08 lw r11,(sp+8)
8005ca8: 2b 8c 00 04 lw r12,(sp+4)
8005cac: 37 9c 00 08 addi sp,sp,8
8005cb0: c3 a0 00 00 ret
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
_Watchdog_Sync_level = insert_isr_nest_level;
8005cb4: 58 e9 00 00 sw (r7+0),r9
goto restart;
8005cb8: e3 ff ff c6 bi 8005bd0 <_Watchdog_Insert+0x54>
08005d18 <_Watchdog_Remove>:
{
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
8005d18: 90 00 20 00 rcsr r4,IE
8005d1c: 34 02 ff fe mvi r2,-2
8005d20: a0 82 10 00 and r2,r4,r2
8005d24: d0 02 00 00 wcsr IE,r2
previous_state = the_watchdog->state;
8005d28: 28 22 00 08 lw r2,(r1+8)
switch ( previous_state ) {
8005d2c: 34 03 00 01 mvi r3,1
8005d30: 44 43 00 28 be r2,r3,8005dd0 <_Watchdog_Remove+0xb8>
8005d34: 5c 40 00 08 bne r2,r0,8005d54 <_Watchdog_Remove+0x3c>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
8005d38: 78 03 08 01 mvhi r3,0x801
8005d3c: 38 63 d9 7c ori r3,r3,0xd97c
8005d40: 28 63 00 00 lw r3,(r3+0)
8005d44: 58 23 00 18 sw (r1+24),r3
_ISR_Enable( level );
8005d48: d0 04 00 00 wcsr IE,r4
return( previous_state );
}
8005d4c: b8 40 08 00 mv r1,r2
8005d50: c3 a0 00 00 ret
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
8005d54: 34 03 00 03 mvi r3,3
8005d58: 54 43 ff f8 bgu r2,r3,8005d38 <_Watchdog_Remove+0x20> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
8005d5c: 28 23 00 00 lw r3,(r1+0)
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
8005d60: 34 05 00 00 mvi r5,0
8005d64: 58 25 00 08 sw (r1+8),r5
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
8005d68: 28 65 00 00 lw r5,(r3+0)
8005d6c: 44 a0 00 05 be r5,r0,8005d80 <_Watchdog_Remove+0x68>
next_watchdog->delta_interval += the_watchdog->delta_interval;
8005d70: 28 66 00 10 lw r6,(r3+16)
8005d74: 28 25 00 10 lw r5,(r1+16)
8005d78: b4 c5 28 00 add r5,r6,r5
8005d7c: 58 65 00 10 sw (r3+16),r5
if ( _Watchdog_Sync_count )
8005d80: 78 05 08 01 mvhi r5,0x801
8005d84: 38 a5 d9 78 ori r5,r5,0xd978
8005d88: 28 a5 00 00 lw r5,(r5+0)
8005d8c: 44 a0 00 07 be r5,r0,8005da8 <_Watchdog_Remove+0x90>
_Watchdog_Sync_level = _ISR_Nest_level;
8005d90: 78 05 08 01 mvhi r5,0x801
8005d94: 38 a5 d8 c4 ori r5,r5,0xd8c4
8005d98: 28 a6 00 00 lw r6,(r5+0)
8005d9c: 78 05 08 01 mvhi r5,0x801
8005da0: 38 a5 d8 e4 ori r5,r5,0xd8e4
8005da4: 58 a6 00 00 sw (r5+0),r6
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
8005da8: 28 25 00 04 lw r5,(r1+4)
next->previous = previous;
previous->next = next;
8005dac: 58 a3 00 00 sw (r5+0),r3
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
8005db0: 58 65 00 04 sw (r3+4),r5
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
8005db4: 78 03 08 01 mvhi r3,0x801
8005db8: 38 63 d9 7c ori r3,r3,0xd97c
8005dbc: 28 63 00 00 lw r3,(r3+0)
8005dc0: 58 23 00 18 sw (r1+24),r3
_ISR_Enable( level );
8005dc4: d0 04 00 00 wcsr IE,r4
return( previous_state );
}
8005dc8: b8 40 08 00 mv r1,r2
8005dcc: c3 a0 00 00 ret
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
8005dd0: 34 03 00 00 mvi r3,0
8005dd4: 58 23 00 08 sw (r1+8),r3
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
8005dd8: 78 03 08 01 mvhi r3,0x801
8005ddc: 38 63 d9 7c ori r3,r3,0xd97c
8005de0: 28 63 00 00 lw r3,(r3+0)
8005de4: 58 23 00 18 sw (r1+24),r3
_ISR_Enable( level );
8005de8: d0 04 00 00 wcsr IE,r4
return( previous_state );
}
8005dec: b8 40 08 00 mv r1,r2
8005df0: c3 a0 00 00 ret
08007c98 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
8007c98: 37 9c ff ec addi sp,sp,-20
8007c9c: 5b 8b 00 14 sw (sp+20),r11
8007ca0: 5b 8c 00 10 sw (sp+16),r12
8007ca4: 5b 8d 00 0c sw (sp+12),r13
8007ca8: 5b 8e 00 08 sw (sp+8),r14
8007cac: 5b 9d 00 04 sw (sp+4),ra
8007cb0: b8 20 70 00 mv r14,r1
8007cb4: b8 40 60 00 mv r12,r2
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
8007cb8: 90 00 68 00 rcsr r13,IE
8007cbc: 34 01 ff fe mvi r1,-2
8007cc0: a1 a1 08 00 and r1,r13,r1
8007cc4: d0 01 00 00 wcsr IE,r1
printk( "Watchdog Chain: %s %p\n", name, header );
8007cc8: 78 01 08 02 mvhi r1,0x802
8007ccc: b9 80 18 00 mv r3,r12
8007cd0: 38 21 06 d8 ori r1,r1,0x6d8
8007cd4: b9 c0 10 00 mv r2,r14
8007cd8: fb ff eb de calli 8002c50 <printk>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
8007cdc: 29 8b 00 00 lw r11,(r12+0)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
8007ce0: 35 8c 00 04 addi r12,r12,4
if ( !_Chain_Is_empty( header ) ) {
8007ce4: 45 6c 00 12 be r11,r12,8007d2c <_Watchdog_Report_chain+0x94>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
8007ce8: b9 60 10 00 mv r2,r11
8007cec: 34 01 00 00 mvi r1,0
8007cf0: f8 00 00 13 calli 8007d3c <_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 )
8007cf4: 29 6b 00 00 lw r11,(r11+0)
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
8007cf8: 5d 6c ff fc bne r11,r12,8007ce8 <_Watchdog_Report_chain+0x50><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
8007cfc: 78 01 08 02 mvhi r1,0x802
8007d00: 38 21 06 f0 ori r1,r1,0x6f0
8007d04: b9 c0 10 00 mv r2,r14
8007d08: fb ff eb d2 calli 8002c50 <printk>
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
8007d0c: d0 0d 00 00 wcsr IE,r13
}
8007d10: 2b 9d 00 04 lw ra,(sp+4)
8007d14: 2b 8b 00 14 lw r11,(sp+20)
8007d18: 2b 8c 00 10 lw r12,(sp+16)
8007d1c: 2b 8d 00 0c lw r13,(sp+12)
8007d20: 2b 8e 00 08 lw r14,(sp+8)
8007d24: 37 9c 00 14 addi sp,sp,20
8007d28: c3 a0 00 00 ret
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
8007d2c: 78 01 08 02 mvhi r1,0x802
8007d30: 38 21 07 00 ori r1,r1,0x700
8007d34: fb ff eb c7 calli 8002c50 <printk>
8007d38: e3 ff ff f5 bi 8007d0c <_Watchdog_Report_chain+0x74>
08005df4 <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
8005df4: 37 9c ff e4 addi sp,sp,-28
8005df8: 5b 8b 00 1c sw (sp+28),r11
8005dfc: 5b 8c 00 18 sw (sp+24),r12
8005e00: 5b 8d 00 14 sw (sp+20),r13
8005e04: 5b 8e 00 10 sw (sp+16),r14
8005e08: 5b 8f 00 0c sw (sp+12),r15
8005e0c: 5b 90 00 08 sw (sp+8),r16
8005e10: 5b 9d 00 04 sw (sp+4),ra
8005e14: b8 20 60 00 mv r12,r1
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
8005e18: 90 00 68 00 rcsr r13,IE
8005e1c: 34 01 ff fe mvi r1,-2
8005e20: a1 a1 08 00 and r1,r13,r1
8005e24: d0 01 00 00 wcsr IE,r1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
8005e28: 29 8b 00 00 lw r11,(r12+0)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
8005e2c: 35 8e 00 04 addi r14,r12,4
if ( _Chain_Is_empty( header ) )
8005e30: 45 6e 00 2b be r11,r14,8005edc <_Watchdog_Tickle+0xe8>
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
8005e34: 29 61 00 10 lw r1,(r11+16)
8005e38: 5c 20 00 26 bne r1,r0,8005ed0 <_Watchdog_Tickle+0xdc>
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
_ISR_Enable( level );
switch( watchdog_state ) {
8005e3c: 34 10 00 02 mvi r16,2
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
8005e40: 34 0f ff fe mvi r15,-2
8005e44: e0 00 00 0a bi 8005e6c <_Watchdog_Tickle+0x78>
8005e48: 90 00 10 00 rcsr r2,IE <== NOT EXECUTED
8005e4c: a0 4f 08 00 and r1,r2,r15 <== NOT EXECUTED
8005e50: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
8005e54: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED
8005e58: b8 40 68 00 mv r13,r2 <== NOT EXECUTED
8005e5c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
8005e60: 45 c1 00 12 be r14,r1,8005ea8 <_Watchdog_Tickle+0xb4> <== NOT EXECUTED
8005e64: 28 21 00 10 lw r1,(r1+16)
8005e68: 5c 20 00 10 bne r1,r0,8005ea8 <_Watchdog_Tickle+0xb4>
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
8005e6c: b9 60 08 00 mv r1,r11
8005e70: fb ff ff aa calli 8005d18 <_Watchdog_Remove>
_ISR_Enable( level );
8005e74: d0 0d 00 00 wcsr IE,r13
switch( watchdog_state ) {
8005e78: 5c 30 ff f4 bne r1,r16,8005e48 <_Watchdog_Tickle+0x54> <== NEVER TAKEN
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
8005e7c: 29 62 00 24 lw r2,(r11+36)
8005e80: 29 63 00 1c lw r3,(r11+28)
8005e84: 29 61 00 20 lw r1,(r11+32)
8005e88: d8 60 00 00 call r3
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
8005e8c: 90 00 10 00 rcsr r2,IE
8005e90: a0 4f 08 00 and r1,r2,r15
8005e94: d0 01 00 00 wcsr IE,r1
8005e98: 29 81 00 00 lw r1,(r12+0)
8005e9c: b8 40 68 00 mv r13,r2
8005ea0: b8 20 58 00 mv r11,r1
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
8005ea4: 5d c1 ff f0 bne r14,r1,8005e64 <_Watchdog_Tickle+0x70>
leave:
_ISR_Enable(level);
8005ea8: d0 02 00 00 wcsr IE,r2
}
8005eac: 2b 9d 00 04 lw ra,(sp+4)
8005eb0: 2b 8b 00 1c lw r11,(sp+28)
8005eb4: 2b 8c 00 18 lw r12,(sp+24)
8005eb8: 2b 8d 00 14 lw r13,(sp+20)
8005ebc: 2b 8e 00 10 lw r14,(sp+16)
8005ec0: 2b 8f 00 0c lw r15,(sp+12)
8005ec4: 2b 90 00 08 lw r16,(sp+8)
8005ec8: 37 9c 00 1c addi sp,sp,28
8005ecc: c3 a0 00 00 ret
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
the_watchdog->delta_interval--;
8005ed0: 34 21 ff ff addi r1,r1,-1
8005ed4: 59 61 00 10 sw (r11+16),r1
if ( the_watchdog->delta_interval != 0 )
8005ed8: 44 20 ff d9 be r1,r0,8005e3c <_Watchdog_Tickle+0x48>
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
8005edc: b9 a0 10 00 mv r2,r13
8005ee0: e3 ff ff f2 bi 8005ea8 <_Watchdog_Tickle+0xb4>
08005ee4 <_Workspace_Allocate_or_fatal_error>:
* _Workspace_Allocate_or_fatal_error
*/
void *_Workspace_Allocate_or_fatal_error(
size_t size
)
{
8005ee4: 37 9c ff fc addi sp,sp,-4
8005ee8: 5b 9d 00 04 sw (sp+4),ra
* @brief See _Heap_Allocate_aligned_with_boundary() with alignment and
* boundary equals zero.
*/
RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size )
{
return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
8005eec: 34 03 00 00 mvi r3,0
8005ef0: b8 20 10 00 mv r2,r1
8005ef4: 78 01 08 01 mvhi r1,0x801
8005ef8: 38 21 d8 50 ori r1,r1,0xd850
8005efc: b8 60 20 00 mv r4,r3
8005f00: f8 00 0b b9 calli 8008de4 <_Heap_Allocate_aligned_with_boundary>
__builtin_return_address( 1 ),
memory
);
#endif
if ( memory == NULL )
8005f04: 44 20 00 04 be r1,r0,8005f14 <_Workspace_Allocate_or_fatal_error+0x30><== NEVER TAKEN
true,
INTERNAL_ERROR_WORKSPACE_ALLOCATION
);
return memory;
}
8005f08: 2b 9d 00 04 lw ra,(sp+4)
8005f0c: 37 9c 00 04 addi sp,sp,4
8005f10: c3 a0 00 00 ret
memory
);
#endif
if ( memory == NULL )
_Internal_error_Occurred(
8005f14: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8005f18: 34 03 00 04 mvi r3,4 <== NOT EXECUTED
8005f1c: fb ff f5 f8 calli 80036fc <_Internal_error_Occurred> <== NOT EXECUTED
08010400 <rtems_clock_set_nanoseconds_extension>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_set_nanoseconds_extension(
rtems_nanoseconds_extension_routine routine
)
{
8010400: b8 20 18 00 mv r3,r1
if ( !routine )
8010404: 34 01 00 09 mvi r1,9
8010408: 44 60 00 05 be r3,r0,801041c <rtems_clock_set_nanoseconds_extension+0x1c><== ALWAYS TAKEN
return RTEMS_INVALID_ADDRESS;
_Watchdog_Nanoseconds_since_tick_handler = routine;
801040c: 78 02 08 03 mvhi r2,0x803 <== NOT EXECUTED
8010410: 38 42 ed d4 ori r2,r2,0xedd4 <== NOT EXECUTED
8010414: 58 43 00 00 sw (r2+0),r3 <== NOT EXECUTED
8010418: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
801041c: c3 a0 00 00 ret
0800b254 <rtems_io_read>:
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
800b254: 37 9c ff ec addi sp,sp,-20
800b258: 5b 8b 00 10 sw (sp+16),r11
800b25c: 5b 8c 00 0c sw (sp+12),r12
800b260: 5b 8d 00 08 sw (sp+8),r13
800b264: 5b 9d 00 04 sw (sp+4),ra
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
800b268: 78 04 08 01 mvhi r4,0x801
800b26c: 38 84 da 6c ori r4,r4,0xda6c
800b270: 28 84 00 00 lw r4,(r4+0)
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
800b274: b8 20 58 00 mv r11,r1
800b278: b8 40 60 00 mv r12,r2
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
800b27c: 54 81 00 08 bgu r4,r1,800b29c <rtems_io_read+0x48>
800b280: 34 01 00 0a mvi r1,10
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
800b284: 2b 9d 00 04 lw ra,(sp+4)
800b288: 2b 8b 00 10 lw r11,(sp+16)
800b28c: 2b 8c 00 0c lw r12,(sp+12)
800b290: 2b 8d 00 08 lw r13,(sp+8)
800b294: 37 9c 00 14 addi sp,sp,20
800b298: c3 a0 00 00 ret
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
800b29c: 78 01 08 01 mvhi r1,0x801
800b2a0: 38 21 da 70 ori r1,r1,0xda70
800b2a4: 28 2d 00 00 lw r13,(r1+0)
800b2a8: b5 6b 08 00 add r1,r11,r11
800b2ac: b4 2b 08 00 add r1,r1,r11
800b2b0: 34 02 00 03 mvi r2,3
800b2b4: 5b 83 00 14 sw (sp+20),r3
800b2b8: fb ff d3 ce calli 80001f0 <__ashlsi3>
800b2bc: b5 a1 08 00 add r1,r13,r1
800b2c0: 28 24 00 0c lw r4,(r1+12)
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
800b2c4: 2b 83 00 14 lw r3,(sp+20)
800b2c8: b8 80 08 00 mv r1,r4
800b2cc: 44 80 ff ee be r4,r0,800b284 <rtems_io_read+0x30> <== NEVER TAKEN
800b2d0: b9 60 08 00 mv r1,r11
800b2d4: b9 80 10 00 mv r2,r12
800b2d8: d8 80 00 00 call r4
}
800b2dc: 2b 9d 00 04 lw ra,(sp+4)
800b2e0: 2b 8b 00 10 lw r11,(sp+16)
800b2e4: 2b 8c 00 0c lw r12,(sp+12)
800b2e8: 2b 8d 00 08 lw r13,(sp+8)
800b2ec: 37 9c 00 14 addi sp,sp,20
800b2f0: c3 a0 00 00 ret
08004e90 <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
)
{
8004e90: 37 9c ff ec addi sp,sp,-20
8004e94: 5b 8b 00 10 sw (sp+16),r11
8004e98: 5b 8c 00 0c sw (sp+12),r12
8004e9c: 5b 8d 00 08 sw (sp+8),r13
8004ea0: 5b 9d 00 04 sw (sp+4),ra
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
8004ea4: 78 04 08 02 mvhi r4,0x802
8004ea8: 38 84 49 54 ori r4,r4,0x4954
8004eac: 28 85 00 00 lw r5,(r4+0)
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
8004eb0: 78 04 08 02 mvhi r4,0x802
8004eb4: 38 84 4b 70 ori r4,r4,0x4b70
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
)
{
8004eb8: b8 20 58 00 mv r11,r1
8004ebc: b8 40 60 00 mv r12,r2
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
8004ec0: 34 01 00 12 mvi r1,18
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
8004ec4: 28 82 00 00 lw r2,(r4+0)
if ( rtems_interrupt_is_in_progress() )
8004ec8: 5c a0 00 08 bne r5,r0,8004ee8 <rtems_io_register_driver+0x58>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
8004ecc: 44 65 00 52 be r3,r5,8005014 <rtems_io_register_driver+0x184>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
8004ed0: 58 62 00 00 sw (r3+0),r2
if ( driver_table == NULL )
8004ed4: 45 80 00 50 be r12,r0,8005014 <rtems_io_register_driver+0x184>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
8004ed8: 29 81 00 00 lw r1,(r12+0)
8004edc: 44 20 00 4c be r1,r0,800500c <rtems_io_register_driver+0x17c>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
8004ee0: 54 4b 00 08 bgu r2,r11,8004f00 <rtems_io_register_driver+0x70>
8004ee4: 34 01 00 0a mvi r1,10
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
8004ee8: 2b 9d 00 04 lw ra,(sp+4)
8004eec: 2b 8b 00 10 lw r11,(sp+16)
8004ef0: 2b 8c 00 0c lw r12,(sp+12)
8004ef4: 2b 8d 00 08 lw r13,(sp+8)
8004ef8: 37 9c 00 14 addi sp,sp,20
8004efc: c3 a0 00 00 ret
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8004f00: 78 01 08 02 mvhi r1,0x802
8004f04: 38 21 48 bc ori r1,r1,0x48bc
8004f08: 28 22 00 00 lw r2,(r1+0)
8004f0c: 34 42 00 01 addi r2,r2,1
8004f10: 58 22 00 00 sw (r1+0),r2
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
8004f14: 5d 60 00 2a bne r11,r0,8004fbc <rtems_io_register_driver+0x12c>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
8004f18: 28 84 00 00 lw r4,(r4+0)
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
8004f1c: 44 8b 00 48 be r4,r11,800503c <rtems_io_register_driver+0x1ac><== NEVER TAKEN
8004f20: 78 01 08 02 mvhi r1,0x802
8004f24: 38 21 4b 74 ori r1,r1,0x4b74
8004f28: 28 2d 00 00 lw r13,(r1+0)
8004f2c: b9 a0 08 00 mv r1,r13
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
8004f30: 28 22 00 00 lw r2,(r1+0)
8004f34: 44 40 00 3f be r2,r0,8005030 <rtems_io_register_driver+0x1a0>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
8004f38: 35 6b 00 01 addi r11,r11,1
8004f3c: 34 21 00 18 addi r1,r1,24
8004f40: 54 8b ff fc bgu r4,r11,8004f30 <rtems_io_register_driver+0xa0>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
8004f44: 58 6b 00 00 sw (r3+0),r11
if ( m != n )
8004f48: 44 8b 00 3e be r4,r11,8005040 <rtems_io_register_driver+0x1b0>
8004f4c: b5 6b 08 00 add r1,r11,r11
8004f50: b4 2b 08 00 add r1,r1,r11
8004f54: 34 02 00 03 mvi r2,3
8004f58: fb ff ef 23 calli 8000be4 <__ashlsi3>
8004f5c: b5 a1 08 00 add r1,r13,r1
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
8004f60: 29 82 00 00 lw r2,(r12+0)
8004f64: 58 22 00 00 sw (r1+0),r2
8004f68: 29 82 00 04 lw r2,(r12+4)
8004f6c: 58 22 00 04 sw (r1+4),r2
8004f70: 29 82 00 08 lw r2,(r12+8)
8004f74: 58 22 00 08 sw (r1+8),r2
8004f78: 29 82 00 0c lw r2,(r12+12)
8004f7c: 58 22 00 0c sw (r1+12),r2
8004f80: 29 82 00 10 lw r2,(r12+16)
8004f84: 58 22 00 10 sw (r1+16),r2
8004f88: 29 8c 00 14 lw r12,(r12+20)
8004f8c: 58 2c 00 14 sw (r1+20),r12
_Thread_Enable_dispatch();
8004f90: f8 00 07 ca calli 8006eb8 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
8004f94: 34 02 00 00 mvi r2,0
8004f98: b9 60 08 00 mv r1,r11
8004f9c: b8 40 18 00 mv r3,r2
8004fa0: f8 00 28 f3 calli 800f36c <rtems_io_initialize>
}
8004fa4: 2b 9d 00 04 lw ra,(sp+4)
8004fa8: 2b 8b 00 10 lw r11,(sp+16)
8004fac: 2b 8c 00 0c lw r12,(sp+12)
8004fb0: 2b 8d 00 08 lw r13,(sp+8)
8004fb4: 37 9c 00 14 addi sp,sp,20
8004fb8: c3 a0 00 00 ret
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
8004fbc: b5 6b 08 00 add r1,r11,r11
8004fc0: 34 02 00 03 mvi r2,3
8004fc4: 78 0d 08 02 mvhi r13,0x802
8004fc8: b4 2b 08 00 add r1,r1,r11
8004fcc: 5b 83 00 14 sw (sp+20),r3
8004fd0: 39 ad 4b 74 ori r13,r13,0x4b74
8004fd4: fb ff ef 04 calli 8000be4 <__ashlsi3>
8004fd8: 29 a2 00 00 lw r2,(r13+0)
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
8004fdc: 2b 83 00 14 lw r3,(sp+20)
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
8004fe0: b4 41 08 00 add r1,r2,r1
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
8004fe4: 28 22 00 00 lw r2,(r1+0)
8004fe8: 44 40 00 19 be r2,r0,800504c <rtems_io_register_driver+0x1bc>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
8004fec: f8 00 07 b3 calli 8006eb8 <_Thread_Enable_dispatch>
8004ff0: 34 01 00 0c mvi r1,12
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
8004ff4: 2b 9d 00 04 lw ra,(sp+4)
8004ff8: 2b 8b 00 10 lw r11,(sp+16)
8004ffc: 2b 8c 00 0c lw r12,(sp+12)
8005000: 2b 8d 00 08 lw r13,(sp+8)
8005004: 37 9c 00 14 addi sp,sp,20
8005008: c3 a0 00 00 ret
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
800500c: 29 85 00 04 lw r5,(r12+4)
8005010: 5c a1 ff b4 bne r5,r1,8004ee0 <rtems_io_register_driver+0x50>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
8005014: 34 01 00 09 mvi r1,9
}
8005018: 2b 9d 00 04 lw ra,(sp+4)
800501c: 2b 8b 00 10 lw r11,(sp+16)
8005020: 2b 8c 00 0c lw r12,(sp+12)
8005024: 2b 8d 00 08 lw r13,(sp+8)
8005028: 37 9c 00 14 addi sp,sp,20
800502c: c3 a0 00 00 ret
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
8005030: 28 25 00 04 lw r5,(r1+4)
8005034: 5c a2 ff c1 bne r5,r2,8004f38 <rtems_io_register_driver+0xa8>
8005038: e3 ff ff c3 bi 8004f44 <rtems_io_register_driver+0xb4>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
800503c: 58 6b 00 00 sw (r3+0),r11 <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
8005040: f8 00 07 9e calli 8006eb8 <_Thread_Enable_dispatch>
8005044: 34 01 00 05 mvi r1,5
return sc;
8005048: e3 ff ff a8 bi 8004ee8 <rtems_io_register_driver+0x58>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
800504c: 28 24 00 04 lw r4,(r1+4)
8005050: 5c 82 ff e7 bne r4,r2,8004fec <rtems_io_register_driver+0x15c>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
8005054: 58 6b 00 00 sw (r3+0),r11
8005058: e3 ff ff c2 bi 8004f60 <rtems_io_register_driver+0xd0>
08005690 <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)
{
8005690: 37 9c ff e4 addi sp,sp,-28
8005694: 5b 8b 00 1c sw (sp+28),r11
8005698: 5b 8c 00 18 sw (sp+24),r12
800569c: 5b 8d 00 14 sw (sp+20),r13
80056a0: 5b 8e 00 10 sw (sp+16),r14
80056a4: 5b 8f 00 0c sw (sp+12),r15
80056a8: 5b 90 00 08 sw (sp+8),r16
80056ac: 5b 9d 00 04 sw (sp+4),ra
80056b0: b8 20 78 00 mv r15,r1
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
80056b4: 44 20 00 18 be r1,r0,8005714 <rtems_iterate_over_all_threads+0x84><== NEVER TAKEN
80056b8: 78 0e 08 02 mvhi r14,0x802
80056bc: 39 ce b5 b8 ori r14,r14,0xb5b8
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
80056c0: 35 d0 00 10 addi r16,r14,16
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
80056c4: 29 c1 00 00 lw r1,(r14+0)
80056c8: 44 20 00 11 be r1,r0,800570c <rtems_iterate_over_all_threads+0x7c>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
80056cc: 28 2d 00 04 lw r13,(r1+4)
if ( !information )
80056d0: 45 a0 00 0f be r13,r0,800570c <rtems_iterate_over_all_threads+0x7c>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
80056d4: 2d a3 00 10 lhu r3,(r13+16)
80056d8: 44 60 00 0d be r3,r0,800570c <rtems_iterate_over_all_threads+0x7c><== NEVER TAKEN
80056dc: 34 0c 00 04 mvi r12,4
80056e0: 34 0b 00 01 mvi r11,1
the_thread = (Thread_Control *)information->local_table[ i ];
80056e4: 29 a2 00 1c lw r2,(r13+28)
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
80056e8: 35 6b 00 01 addi r11,r11,1
the_thread = (Thread_Control *)information->local_table[ i ];
80056ec: b4 4c 10 00 add r2,r2,r12
80056f0: 28 42 00 00 lw r2,(r2+0)
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
80056f4: 35 8c 00 04 addi r12,r12,4
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
(*routine)(the_thread);
80056f8: b8 40 08 00 mv r1,r2
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
80056fc: 44 40 00 03 be r2,r0,8005708 <rtems_iterate_over_all_threads+0x78><== NEVER TAKEN
continue;
(*routine)(the_thread);
8005700: d9 e0 00 00 call r15
8005704: 2d a3 00 10 lhu r3,(r13+16)
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
8005708: 50 6b ff f7 bgeu r3,r11,80056e4 <rtems_iterate_over_all_threads+0x54>
800570c: 35 ce 00 04 addi r14,r14,4
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
8005710: 5d d0 ff ed bne r14,r16,80056c4 <rtems_iterate_over_all_threads+0x34>
(*routine)(the_thread);
}
}
}
8005714: 2b 9d 00 04 lw ra,(sp+4)
8005718: 2b 8b 00 1c lw r11,(sp+28)
800571c: 2b 8c 00 18 lw r12,(sp+24)
8005720: 2b 8d 00 14 lw r13,(sp+20)
8005724: 2b 8e 00 10 lw r14,(sp+16)
8005728: 2b 8f 00 0c lw r15,(sp+12)
800572c: 2b 90 00 08 lw r16,(sp+8)
8005730: 37 9c 00 1c addi sp,sp,28
8005734: c3 a0 00 00 ret
080044c4 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
80044c4: 37 9c ff e8 addi sp,sp,-24
80044c8: 5b 8b 00 18 sw (sp+24),r11
80044cc: 5b 8c 00 14 sw (sp+20),r12
80044d0: 5b 8d 00 10 sw (sp+16),r13
80044d4: 5b 8e 00 0c sw (sp+12),r14
80044d8: 5b 8f 00 08 sw (sp+8),r15
80044dc: 5b 9d 00 04 sw (sp+4),ra
80044e0: b8 60 70 00 mv r14,r3
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
80044e4: 34 03 00 09 mvi r3,9
80044e8: 45 c0 00 1e be r14,r0,8004560 <rtems_object_get_class_information+0x9c>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
80044ec: f8 00 06 f7 calli 80060c8 <_Objects_Get_information>
80044f0: b8 20 10 00 mv r2,r1
if ( !obj_info )
80044f4: 34 03 00 0a mvi r3,10
80044f8: 44 20 00 1a be r1,r0,8004560 <rtems_object_get_class_information+0x9c>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
80044fc: 28 21 00 08 lw r1,(r1+8)
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
8004500: 2c 4d 00 10 lhu r13,(r2+16)
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
8004504: 59 c1 00 00 sw (r14+0),r1
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
8004508: 40 41 00 12 lbu r1,(r2+18)
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
800450c: b9 a0 60 00 mv r12,r13
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
8004510: 31 c1 00 0c sb (r14+12),r1
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
8004514: 28 41 00 0c lw r1,(r2+12)
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
8004518: 59 cd 00 08 sw (r14+8),r13
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
800451c: 59 c1 00 04 sw (r14+4),r1
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
8004520: 45 a0 00 0e be r13,r0,8004558 <rtems_object_get_class_information+0x94><== NEVER TAKEN
8004524: 28 4f 00 1c lw r15,(r2+28)
8004528: 34 01 00 01 mvi r1,1
800452c: b8 20 58 00 mv r11,r1
8004530: 34 0c 00 00 mvi r12,0
if ( !obj_info->local_table[i] )
8004534: 34 02 00 02 mvi r2,2
8004538: fb ff f6 97 calli 8001f94 <__ashlsi3>
800453c: b5 e1 08 00 add r1,r15,r1
8004540: 28 22 00 00 lw r2,(r1+0)
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
8004544: 35 6b 00 01 addi r11,r11,1
8004548: b9 60 08 00 mv r1,r11
if ( !obj_info->local_table[i] )
unallocated++;
800454c: 64 42 00 00 cmpei r2,r2,0
8004550: b5 82 60 00 add r12,r12,r2
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
8004554: 51 ab ff f8 bgeu r13,r11,8004534 <rtems_object_get_class_information+0x70>
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
8004558: 59 cc 00 10 sw (r14+16),r12
800455c: 34 03 00 00 mvi r3,0
return RTEMS_SUCCESSFUL;
}
8004560: b8 60 08 00 mv r1,r3
8004564: 2b 9d 00 04 lw ra,(sp+4)
8004568: 2b 8b 00 18 lw r11,(sp+24)
800456c: 2b 8c 00 14 lw r12,(sp+20)
8004570: 2b 8d 00 10 lw r13,(sp+16)
8004574: 2b 8e 00 0c lw r14,(sp+12)
8004578: 2b 8f 00 08 lw r15,(sp+8)
800457c: 37 9c 00 18 addi sp,sp,24
8004580: c3 a0 00 00 ret
08011490 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
8011490: 37 9c ff d8 addi sp,sp,-40
8011494: 5b 8b 00 18 sw (sp+24),r11
8011498: 5b 8c 00 14 sw (sp+20),r12
801149c: 5b 8d 00 10 sw (sp+16),r13
80114a0: 5b 8e 00 0c sw (sp+12),r14
80114a4: 5b 8f 00 08 sw (sp+8),r15
80114a8: 5b 9d 00 04 sw (sp+4),ra
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
80114ac: 34 07 00 03 mvi r7,3
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
80114b0: b8 20 60 00 mv r12,r1
80114b4: b8 40 58 00 mv r11,r2
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
80114b8: 44 20 00 3c be r1,r0,80115a8 <rtems_partition_create+0x118>
return RTEMS_INVALID_NAME;
if ( !starting_address )
80114bc: 44 40 00 46 be r2,r0,80115d4 <rtems_partition_create+0x144>
return RTEMS_INVALID_ADDRESS;
if ( !id )
80114c0: 44 c0 00 45 be r6,r0,80115d4 <rtems_partition_create+0x144><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
80114c4: 64 82 00 00 cmpei r2,r4,0
80114c8: 64 61 00 00 cmpei r1,r3,0
80114cc: b8 41 08 00 or r1,r2,r1
80114d0: 5c 20 00 3f bne r1,r0,80115cc <rtems_partition_create+0x13c>
80114d4: 54 83 00 3e bgu r4,r3,80115cc <rtems_partition_create+0x13c>
80114d8: 20 81 00 07 andi r1,r4,0x7
80114dc: 5c 20 00 3c bne r1,r0,80115cc <rtems_partition_create+0x13c>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
80114e0: 21 6e 00 07 andi r14,r11,0x7
80114e4: 5d c1 00 3c bne r14,r1,80115d4 <rtems_partition_create+0x144>
80114e8: 78 01 08 03 mvhi r1,0x803
80114ec: 38 21 ec 34 ori r1,r1,0xec34
80114f0: 28 22 00 00 lw r2,(r1+0)
80114f4: 34 42 00 01 addi r2,r2,1
80114f8: 58 22 00 00 sw (r1+0),r2
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
80114fc: 78 01 08 03 mvhi r1,0x803
8011500: 38 21 ea 7c ori r1,r1,0xea7c
8011504: 5b 83 00 28 sw (sp+40),r3
8011508: 5b 84 00 20 sw (sp+32),r4
801150c: 5b 85 00 24 sw (sp+36),r5
8011510: 5b 86 00 1c sw (sp+28),r6
8011514: f8 00 17 0e calli 801714c <_Objects_Allocate>
8011518: b8 20 68 00 mv r13,r1
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
801151c: 2b 83 00 28 lw r3,(sp+40)
8011520: 2b 84 00 20 lw r4,(sp+32)
8011524: 2b 85 00 24 lw r5,(sp+36)
8011528: 2b 86 00 1c lw r6,(sp+28)
801152c: 44 2e 00 2c be r1,r14,80115dc <rtems_partition_create+0x14c>
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
8011530: 58 25 00 1c sw (r1+28),r5
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
8011534: 58 2b 00 10 sw (r1+16),r11
the_partition->length = length;
8011538: 58 23 00 14 sw (r1+20),r3
the_partition->buffer_size = buffer_size;
801153c: 58 24 00 18 sw (r1+24),r4
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
8011540: b8 80 10 00 mv r2,r4
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
8011544: 58 2e 00 20 sw (r1+32),r14
_Chain_Initialize( &the_partition->Memory, starting_address,
8011548: b8 60 08 00 mv r1,r3
801154c: 5b 86 00 1c sw (sp+28),r6
8011550: 5b 84 00 20 sw (sp+32),r4
8011554: f8 00 7b 42 calli 803025c <__udivsi3>
8011558: 2b 84 00 20 lw r4,(sp+32)
801155c: 35 af 00 24 addi r15,r13,36
8011560: b8 20 18 00 mv r3,r1
8011564: b9 60 10 00 mv r2,r11
8011568: b9 e0 08 00 mv r1,r15
801156c: f8 00 10 77 calli 8015748 <_Chain_Initialize>
8011570: 29 ab 00 08 lw r11,(r13+8)
8011574: 78 01 08 03 mvhi r1,0x803
8011578: 38 21 ea 7c ori r1,r1,0xea7c
801157c: 28 2f 00 1c lw r15,(r1+28)
8011580: 34 02 00 02 mvi r2,2
8011584: 21 61 ff ff andi r1,r11,0xffff
8011588: fb ff f2 5c calli 800def8 <__ashlsi3>
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
801158c: 2b 86 00 1c lw r6,(sp+28)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
8011590: 59 ac 00 0c sw (r13+12),r12
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8011594: b5 e1 08 00 add r1,r15,r1
8011598: 58 cb 00 00 sw (r6+0),r11
801159c: 58 2d 00 00 sw (r1+0),r13
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
80115a0: f8 00 1b d2 calli 80184e8 <_Thread_Enable_dispatch>
80115a4: b9 c0 38 00 mv r7,r14
return RTEMS_SUCCESSFUL;
}
80115a8: b8 e0 08 00 mv r1,r7
80115ac: 2b 9d 00 04 lw ra,(sp+4)
80115b0: 2b 8b 00 18 lw r11,(sp+24)
80115b4: 2b 8c 00 14 lw r12,(sp+20)
80115b8: 2b 8d 00 10 lw r13,(sp+16)
80115bc: 2b 8e 00 0c lw r14,(sp+12)
80115c0: 2b 8f 00 08 lw r15,(sp+8)
80115c4: 37 9c 00 28 addi sp,sp,40
80115c8: c3 a0 00 00 ret
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
80115cc: 34 07 00 08 mvi r7,8
80115d0: e3 ff ff f6 bi 80115a8 <rtems_partition_create+0x118>
80115d4: 34 07 00 09 mvi r7,9
80115d8: e3 ff ff f4 bi 80115a8 <rtems_partition_create+0x118>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
80115dc: f8 00 1b c3 calli 80184e8 <_Thread_Enable_dispatch>
80115e0: 34 07 00 05 mvi r7,5
return RTEMS_TOO_MANY;
80115e4: e3 ff ff f1 bi 80115a8 <rtems_partition_create+0x118>
08003980 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
8003980: 37 9c ff e0 addi sp,sp,-32
8003984: 5b 8b 00 18 sw (sp+24),r11
8003988: 5b 8c 00 14 sw (sp+20),r12
800398c: 5b 8d 00 10 sw (sp+16),r13
8003990: 5b 8e 00 0c sw (sp+12),r14
8003994: 5b 8f 00 08 sw (sp+8),r15
8003998: 5b 9d 00 04 sw (sp+4),ra
800399c: b8 20 70 00 mv r14,r1
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
80039a0: 78 01 08 02 mvhi r1,0x802
80039a4: b8 40 68 00 mv r13,r2
80039a8: 38 21 28 04 ori r1,r1,0x2804
80039ac: b9 c0 10 00 mv r2,r14
80039b0: 37 83 00 20 addi r3,sp,32
80039b4: f8 00 09 84 calli 8005fc4 <_Objects_Get>
80039b8: b8 20 58 00 mv r11,r1
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
80039bc: 2b 81 00 20 lw r1,(sp+32)
80039c0: 44 20 00 0a be r1,r0,80039e8 <rtems_rate_monotonic_period+0x68>
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
80039c4: 34 01 00 04 mvi r1,4
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80039c8: 2b 9d 00 04 lw ra,(sp+4)
80039cc: 2b 8b 00 18 lw r11,(sp+24)
80039d0: 2b 8c 00 14 lw r12,(sp+20)
80039d4: 2b 8d 00 10 lw r13,(sp+16)
80039d8: 2b 8e 00 0c lw r14,(sp+12)
80039dc: 2b 8f 00 08 lw r15,(sp+8)
80039e0: 37 9c 00 20 addi sp,sp,32
80039e4: c3 a0 00 00 ret
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
80039e8: 78 0c 08 02 mvhi r12,0x802
80039ec: 39 8c 29 f8 ori r12,r12,0x29f8
80039f0: 29 62 00 40 lw r2,(r11+64)
80039f4: 29 81 00 00 lw r1,(r12+0)
80039f8: 44 41 00 0b be r2,r1,8003a24 <rtems_rate_monotonic_period+0xa4>
_Thread_Enable_dispatch();
80039fc: f8 00 0b fb calli 80069e8 <_Thread_Enable_dispatch>
8003a00: 34 01 00 17 mvi r1,23
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003a04: 2b 9d 00 04 lw ra,(sp+4)
8003a08: 2b 8b 00 18 lw r11,(sp+24)
8003a0c: 2b 8c 00 14 lw r12,(sp+20)
8003a10: 2b 8d 00 10 lw r13,(sp+16)
8003a14: 2b 8e 00 0c lw r14,(sp+12)
8003a18: 2b 8f 00 08 lw r15,(sp+8)
8003a1c: 37 9c 00 20 addi sp,sp,32
8003a20: c3 a0 00 00 ret
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
8003a24: 45 a0 00 32 be r13,r0,8003aec <rtems_rate_monotonic_period+0x16c>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
8003a28: 90 00 78 00 rcsr r15,IE
8003a2c: 34 01 ff fe mvi r1,-2
8003a30: a1 e1 08 00 and r1,r15,r1
8003a34: d0 01 00 00 wcsr IE,r1
switch ( the_period->state ) {
8003a38: 29 61 00 38 lw r1,(r11+56)
8003a3c: 34 02 00 02 mvi r2,2
8003a40: 44 22 00 30 be r1,r2,8003b00 <rtems_rate_monotonic_period+0x180>
8003a44: 34 02 00 04 mvi r2,4
8003a48: 44 22 00 19 be r1,r2,8003aac <rtems_rate_monotonic_period+0x12c>
8003a4c: 5c 20 ff de bne r1,r0,80039c4 <rtems_rate_monotonic_period+0x44><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
8003a50: d0 0f 00 00 wcsr IE,r15
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
8003a54: b9 60 08 00 mv r1,r11
8003a58: fb ff ff 1b calli 80036c4 <_Rate_monotonic_Initiate_statistics>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
8003a5c: 78 02 08 00 mvhi r2,0x800
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8003a60: 34 0c 00 00 mvi r12,0
the_watchdog->routine = routine;
8003a64: 38 42 3f 0c ori r2,r2,0x3f0c
the_period->state = RATE_MONOTONIC_ACTIVE;
8003a68: 34 03 00 02 mvi r3,2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003a6c: 78 01 08 02 mvhi r1,0x802
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
8003a70: 59 62 00 2c sw (r11+44),r2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003a74: 38 21 2a 18 ori r1,r1,0x2a18
8003a78: 59 63 00 38 sw (r11+56),r3
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
8003a7c: 59 6e 00 30 sw (r11+48),r14
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8003a80: 59 6d 00 1c sw (r11+28),r13
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003a84: 35 62 00 10 addi r2,r11,16
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8003a88: 59 6c 00 18 sw (r11+24),r12
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
8003a8c: 59 6c 00 34 sw (r11+52),r12
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
8003a90: 59 6d 00 3c sw (r11+60),r13
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003a94: f8 00 11 de calli 800820c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
8003a98: b9 80 08 00 mv r1,r12
8003a9c: 5b 81 00 1c sw (sp+28),r1
8003aa0: f8 00 0b d2 calli 80069e8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
8003aa4: 2b 81 00 1c lw r1,(sp+28)
8003aa8: e3 ff ff d7 bi 8003a04 <rtems_rate_monotonic_period+0x84>
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
8003aac: b9 60 08 00 mv r1,r11
8003ab0: fb ff ff 6a calli 8003858 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
8003ab4: d0 0f 00 00 wcsr IE,r15
the_period->state = RATE_MONOTONIC_ACTIVE;
8003ab8: 34 02 00 02 mvi r2,2
8003abc: 78 01 08 02 mvhi r1,0x802
8003ac0: 59 62 00 38 sw (r11+56),r2
8003ac4: 38 21 2a 18 ori r1,r1,0x2a18
8003ac8: 35 62 00 10 addi r2,r11,16
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8003acc: 59 6d 00 1c sw (r11+28),r13
the_period->next_length = length;
8003ad0: 59 6d 00 3c sw (r11+60),r13
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003ad4: f8 00 11 ce calli 800820c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
8003ad8: 34 01 00 06 mvi r1,6
8003adc: 5b 81 00 1c sw (sp+28),r1
8003ae0: f8 00 0b c2 calli 80069e8 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
8003ae4: 2b 81 00 1c lw r1,(sp+28)
8003ae8: e3 ff ff c7 bi 8003a04 <rtems_rate_monotonic_period+0x84>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
8003aec: 29 61 00 38 lw r1,(r11+56)
8003af0: 34 02 00 04 mvi r2,4
8003af4: 50 41 00 1b bgeu r2,r1,8003b60 <rtems_rate_monotonic_period+0x1e0><== ALWAYS TAKEN
8003af8: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8003afc: e3 ff ff e8 bi 8003a9c <rtems_rate_monotonic_period+0x11c> <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
8003b00: b9 60 08 00 mv r1,r11
8003b04: fb ff ff 55 calli 8003858 <_Rate_monotonic_Update_statistics>
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
8003b08: 34 01 00 01 mvi r1,1
the_period->next_length = length;
8003b0c: 59 6d 00 3c sw (r11+60),r13
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
8003b10: 59 61 00 38 sw (r11+56),r1
the_period->next_length = length;
_ISR_Enable( level );
8003b14: d0 0f 00 00 wcsr IE,r15
_Thread_Executing->Wait.id = the_period->Object.id;
8003b18: 29 81 00 00 lw r1,(r12+0)
8003b1c: 29 63 00 08 lw r3,(r11+8)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
8003b20: 34 02 40 00 mvi r2,16384
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
the_period->next_length = length;
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
8003b24: 58 23 00 20 sw (r1+32),r3
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
8003b28: f8 00 0e 9b calli 8007594 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
8003b2c: 90 00 08 00 rcsr r1,IE
8003b30: 34 02 ff fe mvi r2,-2
8003b34: a0 22 10 00 and r2,r1,r2
8003b38: d0 02 00 00 wcsr IE,r2
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
8003b3c: 34 03 00 02 mvi r3,2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
8003b40: 29 62 00 38 lw r2,(r11+56)
the_period->state = RATE_MONOTONIC_ACTIVE;
8003b44: 59 63 00 38 sw (r11+56),r3
_ISR_Enable( level );
8003b48: d0 01 00 00 wcsr IE,r1
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
8003b4c: 34 01 00 03 mvi r1,3
8003b50: 44 41 00 0b be r2,r1,8003b7c <rtems_rate_monotonic_period+0x1fc><== NEVER TAKEN
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
8003b54: f8 00 0b a5 calli 80069e8 <_Thread_Enable_dispatch>
8003b58: 34 01 00 00 mvi r1,0
return RTEMS_SUCCESSFUL;
8003b5c: e3 ff ff aa bi 8003a04 <rtems_rate_monotonic_period+0x84>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
8003b60: 78 0b 08 02 mvhi r11,0x802
8003b64: 34 02 00 02 mvi r2,2
8003b68: fb ff f5 ad calli 800121c <__ashlsi3>
8003b6c: 39 6b 03 38 ori r11,r11,0x338
8003b70: b5 61 08 00 add r1,r11,r1
8003b74: 28 21 00 00 lw r1,(r1+0)
8003b78: e3 ff ff c9 bi 8003a9c <rtems_rate_monotonic_period+0x11c>
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
8003b7c: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED
8003b80: 34 02 40 00 mvi r2,16384 <== NOT EXECUTED
8003b84: f8 00 0a 9b calli 80065f0 <_Thread_Clear_state> <== NOT EXECUTED
8003b88: e3 ff ff f3 bi 8003b54 <rtems_rate_monotonic_period+0x1d4> <== NOT EXECUTED
08003b8c <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
8003b8c: 37 9c ff 5c addi sp,sp,-164
8003b90: 5b 8b 00 44 sw (sp+68),r11
8003b94: 5b 8c 00 40 sw (sp+64),r12
8003b98: 5b 8d 00 3c sw (sp+60),r13
8003b9c: 5b 8e 00 38 sw (sp+56),r14
8003ba0: 5b 8f 00 34 sw (sp+52),r15
8003ba4: 5b 90 00 30 sw (sp+48),r16
8003ba8: 5b 91 00 2c sw (sp+44),r17
8003bac: 5b 92 00 28 sw (sp+40),r18
8003bb0: 5b 93 00 24 sw (sp+36),r19
8003bb4: 5b 94 00 20 sw (sp+32),r20
8003bb8: 5b 95 00 1c sw (sp+28),r21
8003bbc: 5b 96 00 18 sw (sp+24),r22
8003bc0: 5b 97 00 14 sw (sp+20),r23
8003bc4: 5b 98 00 10 sw (sp+16),r24
8003bc8: 5b 99 00 0c sw (sp+12),r25
8003bcc: 5b 9b 00 08 sw (sp+8),fp
8003bd0: 5b 9d 00 04 sw (sp+4),ra
8003bd4: b8 40 68 00 mv r13,r2
8003bd8: b8 20 78 00 mv r15,r1
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
8003bdc: 44 40 00 2b be r2,r0,8003c88 <rtems_rate_monotonic_report_statistics_with_plugin+0xfc><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
8003be0: 78 02 08 02 mvhi r2,0x802
8003be4: 38 42 03 4c ori r2,r2,0x34c
8003be8: d9 a0 00 00 call r13
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
8003bec: 78 02 08 02 mvhi r2,0x802
8003bf0: 38 42 03 6c ori r2,r2,0x36c
8003bf4: b9 e0 08 00 mv r1,r15
8003bf8: d9 a0 00 00 call r13
(*print)( context, "--- Wall times are in seconds ---\n" );
8003bfc: 78 02 08 02 mvhi r2,0x802
8003c00: 38 42 03 90 ori r2,r2,0x390
8003c04: b9 e0 08 00 mv r1,r15
8003c08: d9 a0 00 00 call r13
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
8003c0c: 78 02 08 02 mvhi r2,0x802
8003c10: 38 42 03 b4 ori r2,r2,0x3b4
8003c14: b9 e0 08 00 mv r1,r15
8003c18: d9 a0 00 00 call r13
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
8003c1c: 78 02 08 02 mvhi r2,0x802
8003c20: b9 e0 08 00 mv r1,r15
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
8003c24: 78 0c 08 02 mvhi r12,0x802
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
8003c28: 38 42 04 00 ori r2,r2,0x400
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
8003c2c: 39 8c 28 04 ori r12,r12,0x2804
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
8003c30: d9 a0 00 00 call r13
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
8003c34: 29 81 00 0c lw r1,(r12+12)
8003c38: 29 8b 00 08 lw r11,(r12+8)
8003c3c: 55 61 00 13 bgu r11,r1,8003c88 <rtems_rate_monotonic_report_statistics_with_plugin+0xfc><== NEVER TAKEN
8003c40: 37 90 00 48 addi r16,sp,72
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
if ( status != RTEMS_SUCCESSFUL )
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
8003c44: 37 96 00 80 addi r22,sp,128
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
8003c48: 37 91 00 a0 addi r17,sp,160
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
8003c4c: 78 15 08 02 mvhi r21,0x802
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
8003c50: 37 94 00 60 addi r20,sp,96
8003c54: 37 92 00 98 addi r18,sp,152
(*print)( context,
8003c58: 78 1b 08 02 mvhi fp,0x802
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
8003c5c: 37 99 00 78 addi r25,sp,120
(*print)( context,
8003c60: 78 18 08 02 mvhi r24,0x802
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
8003c64: 78 13 08 01 mvhi r19,0x801
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
8003c68: b9 60 08 00 mv r1,r11
8003c6c: ba 00 10 00 mv r2,r16
8003c70: f8 00 1b 40 calli 800a970 <rtems_rate_monotonic_get_statistics>
8003c74: b8 20 70 00 mv r14,r1
if ( status != RTEMS_SUCCESSFUL )
8003c78: 44 20 00 17 be r1,r0,8003cd4 <rtems_rate_monotonic_report_statistics_with_plugin+0x148>
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
8003c7c: 29 85 00 0c lw r5,(r12+12)
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
8003c80: 35 6b 00 01 addi r11,r11,1
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
8003c84: 50 ab ff f9 bgeu r5,r11,8003c68 <rtems_rate_monotonic_report_statistics_with_plugin+0xdc>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
8003c88: 2b 9d 00 04 lw ra,(sp+4)
8003c8c: 2b 8b 00 44 lw r11,(sp+68)
8003c90: 2b 8c 00 40 lw r12,(sp+64)
8003c94: 2b 8d 00 3c lw r13,(sp+60)
8003c98: 2b 8e 00 38 lw r14,(sp+56)
8003c9c: 2b 8f 00 34 lw r15,(sp+52)
8003ca0: 2b 90 00 30 lw r16,(sp+48)
8003ca4: 2b 91 00 2c lw r17,(sp+44)
8003ca8: 2b 92 00 28 lw r18,(sp+40)
8003cac: 2b 93 00 24 lw r19,(sp+36)
8003cb0: 2b 94 00 20 lw r20,(sp+32)
8003cb4: 2b 95 00 1c lw r21,(sp+28)
8003cb8: 2b 96 00 18 lw r22,(sp+24)
8003cbc: 2b 97 00 14 lw r23,(sp+20)
8003cc0: 2b 98 00 10 lw r24,(sp+16)
8003cc4: 2b 99 00 0c lw r25,(sp+12)
8003cc8: 2b 9b 00 08 lw fp,(sp+8)
8003ccc: 37 9c 00 a4 addi sp,sp,164
8003cd0: c3 a0 00 00 ret
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
if ( status != RTEMS_SUCCESSFUL )
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
8003cd4: ba c0 10 00 mv r2,r22
8003cd8: b9 60 08 00 mv r1,r11
8003cdc: f8 00 1b 58 calli 800aa3c <rtems_rate_monotonic_get_status>
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
8003ce0: 2b 81 00 80 lw r1,(sp+128)
8003ce4: ba 20 18 00 mv r3,r17
8003ce8: 34 02 00 05 mvi r2,5
8003cec: f8 00 00 bb calli 8003fd8 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
8003cf0: 2b 85 00 48 lw r5,(sp+72)
8003cf4: 2b 86 00 4c lw r6,(sp+76)
8003cf8: ba a0 10 00 mv r2,r21
8003cfc: b9 60 18 00 mv r3,r11
8003d00: 38 42 04 4c ori r2,r2,0x44c
8003d04: b9 e0 08 00 mv r1,r15
8003d08: ba 20 20 00 mv r4,r17
8003d0c: d9 a0 00 00 call r13
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
8003d10: 2b 85 00 48 lw r5,(sp+72)
(*print)( context, "\n" );
8003d14: ba 60 10 00 mv r2,r19
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
8003d18: ba 40 18 00 mv r3,r18
8003d1c: ba 80 08 00 mv r1,r20
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
8003d20: 38 42 f9 40 ori r2,r2,0xf940
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
8003d24: 5c ae 00 04 bne r5,r14,8003d34 <rtems_rate_monotonic_report_statistics_with_plugin+0x1a8>
(*print)( context, "\n" );
8003d28: b9 e0 08 00 mv r1,r15
8003d2c: d9 a0 00 00 call r13
continue;
8003d30: e3 ff ff d3 bi 8003c7c <rtems_rate_monotonic_report_statistics_with_plugin+0xf0>
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
8003d34: b8 a0 10 00 mv r2,r5
8003d38: f8 00 0f ea calli 8007ce0 <_Timespec_Divide_by_integer>
(*print)( context,
8003d3c: 2b 81 00 54 lw r1,(sp+84)
8003d40: 34 02 03 e8 mvi r2,1000
8003d44: f8 00 6a fe calli 801e93c <__divsi3>
8003d48: b8 20 b8 00 mv r23,r1
8003d4c: 2b 81 00 5c lw r1,(sp+92)
8003d50: 34 02 03 e8 mvi r2,1000
8003d54: f8 00 6a fa calli 801e93c <__divsi3>
8003d58: b8 20 70 00 mv r14,r1
8003d5c: 2b 81 00 9c lw r1,(sp+156)
8003d60: 34 02 03 e8 mvi r2,1000
8003d64: f8 00 6a f6 calli 801e93c <__divsi3>
8003d68: 2b 85 00 58 lw r5,(sp+88)
8003d6c: 2b 87 00 98 lw r7,(sp+152)
8003d70: 2b 83 00 50 lw r3,(sp+80)
8003d74: bb 60 10 00 mv r2,fp
8003d78: b8 20 40 00 mv r8,r1
8003d7c: ba e0 20 00 mv r4,r23
8003d80: b9 c0 30 00 mv r6,r14
8003d84: b9 e0 08 00 mv r1,r15
8003d88: 38 42 04 64 ori r2,r2,0x464
8003d8c: d9 a0 00 00 call r13
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
8003d90: 2b 82 00 48 lw r2,(sp+72)
8003d94: ba 40 18 00 mv r3,r18
8003d98: bb 20 08 00 mv r1,r25
8003d9c: f8 00 0f d1 calli 8007ce0 <_Timespec_Divide_by_integer>
(*print)( context,
8003da0: 2b 81 00 6c lw r1,(sp+108)
8003da4: 34 02 03 e8 mvi r2,1000
8003da8: f8 00 6a e5 calli 801e93c <__divsi3>
8003dac: b8 20 b8 00 mv r23,r1
8003db0: 2b 81 00 74 lw r1,(sp+116)
8003db4: 34 02 03 e8 mvi r2,1000
8003db8: f8 00 6a e1 calli 801e93c <__divsi3>
8003dbc: b8 20 70 00 mv r14,r1
8003dc0: 2b 81 00 9c lw r1,(sp+156)
8003dc4: 34 02 03 e8 mvi r2,1000
8003dc8: f8 00 6a dd calli 801e93c <__divsi3>
8003dcc: 2b 83 00 68 lw r3,(sp+104)
8003dd0: 2b 85 00 70 lw r5,(sp+112)
8003dd4: 2b 87 00 98 lw r7,(sp+152)
8003dd8: bb 00 10 00 mv r2,r24
8003ddc: b8 20 40 00 mv r8,r1
8003de0: ba e0 20 00 mv r4,r23
8003de4: b9 e0 08 00 mv r1,r15
8003de8: b9 c0 30 00 mv r6,r14
8003dec: 38 42 04 84 ori r2,r2,0x484
8003df0: d9 a0 00 00 call r13
8003df4: e3 ff ff a2 bi 8003c7c <rtems_rate_monotonic_report_statistics_with_plugin+0xf0>
08003e1c <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
8003e1c: 37 9c ff f4 addi sp,sp,-12
8003e20: 5b 8b 00 0c sw (sp+12),r11
8003e24: 5b 8c 00 08 sw (sp+8),r12
8003e28: 5b 9d 00 04 sw (sp+4),ra
8003e2c: 78 01 08 02 mvhi r1,0x802
8003e30: 38 21 29 3c ori r1,r1,0x293c
8003e34: 28 22 00 00 lw r2,(r1+0)
8003e38: 34 42 00 01 addi r2,r2,1
8003e3c: 58 22 00 00 sw (r1+0),r2
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
8003e40: 78 0c 08 02 mvhi r12,0x802
8003e44: 39 8c 28 04 ori r12,r12,0x2804
8003e48: 29 8b 00 08 lw r11,(r12+8)
8003e4c: 29 81 00 0c lw r1,(r12+12)
8003e50: 55 61 00 06 bgu r11,r1,8003e68 <rtems_rate_monotonic_reset_all_statistics+0x4c><== NEVER TAKEN
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
8003e54: b9 60 08 00 mv r1,r11
8003e58: f8 00 00 0a calli 8003e80 <rtems_rate_monotonic_reset_statistics>
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
8003e5c: 29 81 00 0c lw r1,(r12+12)
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
8003e60: 35 6b 00 01 addi r11,r11,1
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
8003e64: 50 2b ff fc bgeu r1,r11,8003e54 <rtems_rate_monotonic_reset_all_statistics+0x38>
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
8003e68: f8 00 0a e0 calli 80069e8 <_Thread_Enable_dispatch>
}
8003e6c: 2b 9d 00 04 lw ra,(sp+4)
8003e70: 2b 8b 00 0c lw r11,(sp+12)
8003e74: 2b 8c 00 08 lw r12,(sp+8)
8003e78: 37 9c 00 0c addi sp,sp,12
8003e7c: c3 a0 00 00 ret
08012808 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
8012808: 37 9c ff e8 addi sp,sp,-24
801280c: 5b 8b 00 14 sw (sp+20),r11
8012810: 5b 8c 00 10 sw (sp+16),r12
8012814: 5b 8d 00 0c sw (sp+12),r13
8012818: 5b 8e 00 08 sw (sp+8),r14
801281c: 5b 9d 00 04 sw (sp+4),ra
8012820: b8 40 60 00 mv r12,r2
8012824: b8 20 68 00 mv r13,r1
8012828: b8 60 70 00 mv r14,r3
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
801282c: 44 40 00 1b be r2,r0,8012898 <rtems_region_get_segment_size+0x90>
return RTEMS_INVALID_ADDRESS;
if ( !size )
8012830: 44 60 00 1a be r3,r0,8012898 <rtems_region_get_segment_size+0x90>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
8012834: 78 0b 08 03 mvhi r11,0x803
8012838: 39 6b ec e8 ori r11,r11,0xece8
801283c: 29 61 00 00 lw r1,(r11+0)
8012840: f8 00 0b 7a calli 8015628 <_API_Mutex_Lock>
8012844: 78 01 08 03 mvhi r1,0x803
8012848: b9 a0 10 00 mv r2,r13
801284c: 38 21 ea fc ori r1,r1,0xeafc
8012850: 37 83 00 18 addi r3,sp,24
8012854: f8 00 13 f3 calli 8017820 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
8012858: 2b 8d 00 18 lw r13,(sp+24)
801285c: 45 a0 00 18 be r13,r0,80128bc <rtems_region_get_segment_size+0xb4>
8012860: 34 01 00 01 mvi r1,1
8012864: 34 0c 00 04 mvi r12,4
8012868: 45 a1 00 02 be r13,r1,8012870 <rtems_region_get_segment_size+0x68><== ALWAYS TAKEN
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
801286c: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
8012870: 29 61 00 00 lw r1,(r11+0)
8012874: f8 00 0b 89 calli 8015698 <_API_Mutex_Unlock>
return return_status;
}
8012878: b9 80 08 00 mv r1,r12
801287c: 2b 9d 00 04 lw ra,(sp+4)
8012880: 2b 8b 00 14 lw r11,(sp+20)
8012884: 2b 8c 00 10 lw r12,(sp+16)
8012888: 2b 8d 00 0c lw r13,(sp+12)
801288c: 2b 8e 00 08 lw r14,(sp+8)
8012890: 37 9c 00 18 addi sp,sp,24
8012894: c3 a0 00 00 ret
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
8012898: 34 0c 00 09 mvi r12,9
}
801289c: b9 80 08 00 mv r1,r12
80128a0: 2b 9d 00 04 lw ra,(sp+4)
80128a4: 2b 8b 00 14 lw r11,(sp+20)
80128a8: 2b 8c 00 10 lw r12,(sp+16)
80128ac: 2b 8d 00 0c lw r13,(sp+12)
80128b0: 2b 8e 00 08 lw r14,(sp+8)
80128b4: 37 9c 00 18 addi sp,sp,24
80128b8: c3 a0 00 00 ret
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
80128bc: b9 80 10 00 mv r2,r12
80128c0: 34 21 00 68 addi r1,r1,104
80128c4: b9 c0 18 00 mv r3,r14
80128c8: f8 00 11 bc calli 8016fb8 <_Heap_Size_of_alloc_area>
80128cc: 34 0c 00 09 mvi r12,9
80128d0: 44 2d ff e8 be r1,r13,8012870 <rtems_region_get_segment_size+0x68><== NEVER TAKEN
80128d4: 34 0c 00 00 mvi r12,0
80128d8: e3 ff ff e6 bi 8012870 <rtems_region_get_segment_size+0x68>
0801318c <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
801318c: 37 9c ff f4 addi sp,sp,-12
8013190: 5b 8b 00 08 sw (sp+8),r11
8013194: 5b 9d 00 04 sw (sp+4),ra
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
8013198: 34 03 00 0a mvi r3,10
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
801319c: b8 40 58 00 mv r11,r2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
80131a0: 5c 40 00 06 bne r2,r0,80131b8 <rtems_signal_send+0x2c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80131a4: b8 60 08 00 mv r1,r3
80131a8: 2b 9d 00 04 lw ra,(sp+4)
80131ac: 2b 8b 00 08 lw r11,(sp+8)
80131b0: 37 9c 00 0c addi sp,sp,12
80131b4: c3 a0 00 00 ret
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
80131b8: 37 82 00 0c addi r2,sp,12
80131bc: f8 00 14 eb calli 8018568 <_Thread_Get>
switch ( location ) {
80131c0: 2b 84 00 0c lw r4,(sp+12)
80131c4: 34 03 00 04 mvi r3,4
80131c8: 5c 80 ff f7 bne r4,r0,80131a4 <rtems_signal_send+0x18>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
80131cc: 28 22 01 24 lw r2,(r1+292)
asr = &api->Signal;
80131d0: 28 43 00 0c lw r3,(r2+12)
80131d4: 44 64 00 28 be r3,r4,8013274 <rtems_signal_send+0xe8>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
80131d8: 40 43 00 08 lbu r3,(r2+8)
80131dc: 44 60 00 17 be r3,r0,8013238 <rtems_signal_send+0xac>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
80131e0: 90 00 18 00 rcsr r3,IE
80131e4: 34 04 ff fe mvi r4,-2
80131e8: a0 64 20 00 and r4,r3,r4
80131ec: d0 04 00 00 wcsr IE,r4
*signal_set |= signals;
80131f0: 28 44 00 14 lw r4,(r2+20)
80131f4: b8 8b 58 00 or r11,r4,r11
80131f8: 58 4b 00 14 sw (r2+20),r11
_ISR_Enable( _level );
80131fc: d0 03 00 00 wcsr IE,r3
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
8013200: 78 02 08 03 mvhi r2,0x803
8013204: 38 42 ec cc ori r2,r2,0xeccc
8013208: 28 42 00 00 lw r2,(r2+0)
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
801320c: 34 03 00 01 mvi r3,1
8013210: 30 23 00 74 sb (r1+116),r3
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
8013214: 44 40 00 11 be r2,r0,8013258 <rtems_signal_send+0xcc>
8013218: 78 02 08 03 mvhi r2,0x803
801321c: 38 42 ec f0 ori r2,r2,0xecf0
8013220: 28 42 00 00 lw r2,(r2+0)
8013224: 5c 22 00 0d bne r1,r2,8013258 <rtems_signal_send+0xcc> <== NEVER TAKEN
_ISR_Signals_to_thread_executing = true;
8013228: 78 01 08 03 mvhi r1,0x803
801322c: 38 21 ed 88 ori r1,r1,0xed88
8013230: 30 23 00 00 sb (r1+0),r3
8013234: e0 00 00 09 bi 8013258 <rtems_signal_send+0xcc>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
8013238: 90 00 08 00 rcsr r1,IE
801323c: 34 03 ff fe mvi r3,-2
8013240: a0 23 18 00 and r3,r1,r3
8013244: d0 03 00 00 wcsr IE,r3
*signal_set |= signals;
8013248: 28 43 00 18 lw r3,(r2+24)
801324c: b8 6b 58 00 or r11,r3,r11
8013250: 58 4b 00 18 sw (r2+24),r11
_ISR_Enable( _level );
8013254: d0 01 00 00 wcsr IE,r1
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
8013258: f8 00 14 a4 calli 80184e8 <_Thread_Enable_dispatch>
801325c: 34 03 00 00 mvi r3,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8013260: b8 60 08 00 mv r1,r3
8013264: 2b 9d 00 04 lw ra,(sp+4)
8013268: 2b 8b 00 08 lw r11,(sp+8)
801326c: 37 9c 00 0c addi sp,sp,12
8013270: c3 a0 00 00 ret
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
8013274: f8 00 14 9d calli 80184e8 <_Thread_Enable_dispatch>
8013278: 34 03 00 0b mvi r3,11
return RTEMS_NOT_DEFINED;
801327c: e3 ff ff ca bi 80131a4 <rtems_signal_send+0x18>
0800ae88 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
800ae88: 37 9c ff e0 addi sp,sp,-32
800ae8c: 5b 8b 00 20 sw (sp+32),r11
800ae90: 5b 8c 00 1c sw (sp+28),r12
800ae94: 5b 8d 00 18 sw (sp+24),r13
800ae98: 5b 8e 00 14 sw (sp+20),r14
800ae9c: 5b 8f 00 10 sw (sp+16),r15
800aea0: 5b 90 00 0c sw (sp+12),r16
800aea4: 5b 91 00 08 sw (sp+8),r17
800aea8: 5b 9d 00 04 sw (sp+4),ra
800aeac: b8 40 68 00 mv r13,r2
800aeb0: b8 60 80 00 mv r16,r3
800aeb4: b8 20 78 00 mv r15,r1
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
800aeb8: 34 02 00 09 mvi r2,9
800aebc: 44 60 00 44 be r3,r0,800afcc <rtems_task_mode+0x144>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
800aec0: 78 02 08 01 mvhi r2,0x801
800aec4: 38 42 d8 e8 ori r2,r2,0xd8e8
800aec8: 28 4b 00 00 lw r11,(r2+0)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
800aecc: 34 0e 00 00 mvi r14,0
800aed0: 41 61 00 75 lbu r1,(r11+117)
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
800aed4: 29 6c 01 24 lw r12,(r11+292)
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
800aed8: 44 2e 00 55 be r1,r14,800b02c <rtems_task_mode+0x1a4>
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
800aedc: 29 61 00 7c lw r1,(r11+124)
800aee0: 5c 20 00 4e bne r1,r0,800b018 <rtems_task_mode+0x190>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
800aee4: 41 81 00 08 lbu r1,(r12+8)
800aee8: 34 11 00 00 mvi r17,0
800aeec: 44 31 00 43 be r1,r17,800aff8 <rtems_task_mode+0x170>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
800aef0: fb ff ec a3 calli 800617c <_CPU_ISR_Get_level>
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
800aef4: ba 21 88 00 or r17,r17,r1
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
800aef8: ba 2e 88 00 or r17,r17,r14
800aefc: 5a 11 00 00 sw (r16+0),r17
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
800af00: 21 a1 01 00 andi r1,r13,0x100
800af04: 44 20 00 07 be r1,r0,800af20 <rtems_task_mode+0x98>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
800af08: b9 e0 08 00 mv r1,r15
800af0c: 34 02 00 08 mvi r2,8
800af10: fb ff d4 e0 calli 8000290 <__lshrsi3>
800af14: 18 21 00 01 xori r1,r1,0x1
800af18: 20 21 00 01 andi r1,r1,0x1
800af1c: 31 61 00 75 sb (r11+117),r1
if ( mask & RTEMS_TIMESLICE_MASK ) {
800af20: 21 a1 02 00 andi r1,r13,0x200
800af24: 44 20 00 09 be r1,r0,800af48 <rtems_task_mode+0xc0>
if ( _Modes_Is_timeslice(mode_set) ) {
800af28: 21 e1 02 00 andi r1,r15,0x200
800af2c: 44 20 00 44 be r1,r0,800b03c <rtems_task_mode+0x1b4>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
800af30: 78 01 08 01 mvhi r1,0x801
800af34: 38 21 d7 bc ori r1,r1,0xd7bc
800af38: 28 21 00 00 lw r1,(r1+0)
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
800af3c: 34 02 00 01 mvi r2,1
800af40: 59 62 00 7c sw (r11+124),r2
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
800af44: 59 61 00 78 sw (r11+120),r1
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
800af48: 21 a1 00 01 andi r1,r13,0x1
800af4c: 44 20 00 04 be r1,r0,800af5c <rtems_task_mode+0xd4>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
800af50: 19 e1 00 01 xori r1,r15,0x1
800af54: 20 21 00 01 andi r1,r1,0x1
800af58: d0 01 00 00 wcsr IE,r1
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
800af5c: 21 ad 04 00 andi r13,r13,0x400
800af60: 45 a0 00 14 be r13,r0,800afb0 <rtems_task_mode+0x128>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
800af64: 34 02 00 0a mvi r2,10
800af68: b9 e0 08 00 mv r1,r15
800af6c: fb ff d4 c9 calli 8000290 <__lshrsi3>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
800af70: 41 82 00 08 lbu r2,(r12+8)
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
800af74: 18 21 00 01 xori r1,r1,0x1
800af78: 20 21 00 01 andi r1,r1,0x1
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
800af7c: 44 41 00 0d be r2,r1,800afb0 <rtems_task_mode+0x128>
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
800af80: 31 81 00 08 sb (r12+8),r1
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
800af84: 90 00 08 00 rcsr r1,IE
800af88: 34 02 ff fe mvi r2,-2
800af8c: a0 22 10 00 and r2,r1,r2
800af90: d0 02 00 00 wcsr IE,r2
_signals = information->signals_pending;
800af94: 29 82 00 18 lw r2,(r12+24)
information->signals_pending = information->signals_posted;
800af98: 29 83 00 14 lw r3,(r12+20)
information->signals_posted = _signals;
800af9c: 59 82 00 14 sw (r12+20),r2
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
800afa0: 59 83 00 18 sw (r12+24),r3
information->signals_posted = _signals;
_ISR_Enable( _level );
800afa4: d0 01 00 00 wcsr IE,r1
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
800afa8: 29 81 00 14 lw r1,(r12+20)
800afac: 5c 20 00 2e bne r1,r0,800b064 <rtems_task_mode+0x1dc>
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
800afb0: 34 0b 00 00 mvi r11,0
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
800afb4: 78 01 08 01 mvhi r1,0x801
800afb8: 38 21 d9 c8 ori r1,r1,0xd9c8
800afbc: 28 22 00 00 lw r2,(r1+0)
800afc0: 34 01 00 03 mvi r1,3
800afc4: 44 41 00 22 be r2,r1,800b04c <rtems_task_mode+0x1c4> <== ALWAYS TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
800afc8: 34 02 00 00 mvi r2,0
return RTEMS_SUCCESSFUL;
}
800afcc: b8 40 08 00 mv r1,r2
800afd0: 2b 9d 00 04 lw ra,(sp+4)
800afd4: 2b 8b 00 20 lw r11,(sp+32)
800afd8: 2b 8c 00 1c lw r12,(sp+28)
800afdc: 2b 8d 00 18 lw r13,(sp+24)
800afe0: 2b 8e 00 14 lw r14,(sp+20)
800afe4: 2b 8f 00 10 lw r15,(sp+16)
800afe8: 2b 90 00 0c lw r16,(sp+12)
800afec: 2b 91 00 08 lw r17,(sp+8)
800aff0: 37 9c 00 20 addi sp,sp,32
800aff4: c3 a0 00 00 ret
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
800aff8: fb ff ec 61 calli 800617c <_CPU_ISR_Get_level>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
800affc: 34 11 04 00 mvi r17,1024
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
800b000: ba 21 88 00 or r17,r17,r1
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
800b004: ba 2e 88 00 or r17,r17,r14
800b008: 5a 11 00 00 sw (r16+0),r17
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
800b00c: 21 a1 01 00 andi r1,r13,0x100
800b010: 44 20 ff c4 be r1,r0,800af20 <rtems_task_mode+0x98>
800b014: e3 ff ff bd bi 800af08 <rtems_task_mode+0x80>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
800b018: 41 81 00 08 lbu r1,(r12+8)
800b01c: 34 11 00 00 mvi r17,0
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
800b020: 39 ce 02 00 ori r14,r14,0x200
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
800b024: 5c 31 ff b3 bne r1,r17,800aef0 <rtems_task_mode+0x68>
800b028: e3 ff ff f4 bi 800aff8 <rtems_task_mode+0x170>
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
800b02c: 29 61 00 7c lw r1,(r11+124)
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
800b030: 34 0e 01 00 mvi r14,256
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
800b034: 44 20 ff ac be r1,r0,800aee4 <rtems_task_mode+0x5c>
800b038: e3 ff ff f8 bi 800b018 <rtems_task_mode+0x190>
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
800b03c: 59 61 00 7c sw (r11+124),r1
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
800b040: 21 a1 00 01 andi r1,r13,0x1
800b044: 44 20 ff c6 be r1,r0,800af5c <rtems_task_mode+0xd4>
800b048: e3 ff ff c2 bi 800af50 <rtems_task_mode+0xc8>
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
800b04c: f8 00 01 18 calli 800b4ac <_Thread_Evaluate_mode>
800b050: 5c 20 00 02 bne r1,r0,800b058 <rtems_task_mode+0x1d0>
800b054: 45 61 ff dd be r11,r1,800afc8 <rtems_task_mode+0x140>
_Thread_Dispatch();
800b058: fb ff e5 26 calli 80044f0 <_Thread_Dispatch>
800b05c: 34 02 00 00 mvi r2,0
800b060: e3 ff ff db bi 800afcc <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;
800b064: 34 01 00 01 mvi r1,1
800b068: 31 61 00 74 sb (r11+116),r1
800b06c: b8 20 58 00 mv r11,r1
800b070: e3 ff ff d1 bi 800afb4 <rtems_task_mode+0x12c>
08009068 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
8009068: 37 9c ff f0 addi sp,sp,-16
800906c: 5b 8b 00 0c sw (sp+12),r11
8009070: 5b 8c 00 08 sw (sp+8),r12
8009074: 5b 9d 00 04 sw (sp+4),ra
8009078: b8 40 58 00 mv r11,r2
800907c: b8 60 60 00 mv r12,r3
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
8009080: 44 40 00 0c be r2,r0,80090b0 <rtems_task_set_priority+0x48>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
8009084: 78 02 08 02 mvhi r2,0x802
8009088: 38 42 50 c0 ori r2,r2,0x50c0
800908c: 40 42 00 00 lbu r2,(r2+0)
8009090: 50 4b 00 08 bgeu r2,r11,80090b0 <rtems_task_set_priority+0x48>
8009094: 34 04 00 13 mvi r4,19
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8009098: b8 80 08 00 mv r1,r4
800909c: 2b 9d 00 04 lw ra,(sp+4)
80090a0: 2b 8b 00 0c lw r11,(sp+12)
80090a4: 2b 8c 00 08 lw r12,(sp+8)
80090a8: 37 9c 00 10 addi sp,sp,16
80090ac: c3 a0 00 00 ret
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
80090b0: 34 04 00 09 mvi r4,9
80090b4: 45 80 ff f9 be r12,r0,8009098 <rtems_task_set_priority+0x30>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
80090b8: 37 82 00 10 addi r2,sp,16
80090bc: f8 00 0a 21 calli 800b940 <_Thread_Get>
switch ( location ) {
80090c0: 2b 82 00 10 lw r2,(sp+16)
80090c4: 34 04 00 04 mvi r4,4
80090c8: 5c 40 ff f4 bne r2,r0,8009098 <rtems_task_set_priority+0x30>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
80090cc: 28 23 00 14 lw r3,(r1+20)
80090d0: 59 83 00 00 sw (r12+0),r3
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
80090d4: 45 62 00 09 be r11,r2,80090f8 <rtems_task_set_priority+0x90>
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
80090d8: 28 22 00 1c lw r2,(r1+28)
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
the_thread->real_priority = new_priority;
80090dc: 58 2b 00 18 sw (r1+24),r11
if ( the_thread->resource_count == 0 ||
80090e0: 44 40 00 03 be r2,r0,80090ec <rtems_task_set_priority+0x84>
the_thread->current_priority > new_priority )
80090e4: 28 22 00 14 lw r2,(r1+20)
80090e8: 51 62 00 04 bgeu r11,r2,80090f8 <rtems_task_set_priority+0x90><== ALWAYS TAKEN
_Thread_Change_priority( the_thread, new_priority, false );
80090ec: b9 60 10 00 mv r2,r11
80090f0: 34 03 00 00 mvi r3,0
80090f4: f8 00 08 34 calli 800b1c4 <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
80090f8: f8 00 09 f2 calli 800b8c0 <_Thread_Enable_dispatch>
80090fc: 34 04 00 00 mvi r4,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8009100: b8 80 08 00 mv r1,r4
8009104: 2b 9d 00 04 lw ra,(sp+4)
8009108: 2b 8b 00 0c lw r11,(sp+12)
800910c: 2b 8c 00 08 lw r12,(sp+8)
8009110: 37 9c 00 10 addi sp,sp,16
8009114: c3 a0 00 00 ret
08003e58 <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
8003e58: 37 9c ff ec addi sp,sp,-20
8003e5c: 5b 8b 00 10 sw (sp+16),r11
8003e60: 5b 8c 00 0c sw (sp+12),r12
8003e64: 5b 8d 00 08 sw (sp+8),r13
8003e68: 5b 9d 00 04 sw (sp+4),ra
8003e6c: b8 40 58 00 mv r11,r2
8003e70: b8 60 68 00 mv r13,r3
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
8003e74: 34 02 00 09 mvi r2,9
8003e78: 45 60 00 07 be r11,r0,8003e94 <rtems_task_variable_add+0x3c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
8003e7c: 37 82 00 14 addi r2,sp,20
8003e80: f8 00 08 ca calli 80061a8 <_Thread_Get>
8003e84: b8 20 60 00 mv r12,r1
switch (location) {
8003e88: 2b 81 00 14 lw r1,(sp+20)
8003e8c: 34 02 00 04 mvi r2,4
8003e90: 44 20 00 08 be r1,r0,8003eb0 <rtems_task_variable_add+0x58>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003e94: b8 40 08 00 mv r1,r2
8003e98: 2b 9d 00 04 lw ra,(sp+4)
8003e9c: 2b 8b 00 10 lw r11,(sp+16)
8003ea0: 2b 8c 00 0c lw r12,(sp+12)
8003ea4: 2b 8d 00 08 lw r13,(sp+8)
8003ea8: 37 9c 00 14 addi sp,sp,20
8003eac: c3 a0 00 00 ret
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
8003eb0: 29 84 01 34 lw r4,(r12+308)
while (tvp) {
8003eb4: 44 81 00 08 be r4,r1,8003ed4 <rtems_task_variable_add+0x7c>
if (tvp->ptr == ptr) {
8003eb8: 28 81 00 04 lw r1,(r4+4)
8003ebc: 5c 2b 00 04 bne r1,r11,8003ecc <rtems_task_variable_add+0x74>
8003ec0: e0 00 00 18 bi 8003f20 <rtems_task_variable_add+0xc8>
8003ec4: 28 82 00 04 lw r2,(r4+4)
8003ec8: 44 4b 00 16 be r2,r11,8003f20 <rtems_task_variable_add+0xc8><== NEVER TAKEN
tvp->dtor = dtor;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
8003ecc: 28 84 00 00 lw r4,(r4+0)
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
8003ed0: 5c 80 ff fd bne r4,r0,8003ec4 <rtems_task_variable_add+0x6c>
}
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
8003ed4: 34 01 00 14 mvi r1,20
8003ed8: f8 00 0e 4b calli 8007804 <_Workspace_Allocate>
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
8003edc: 44 20 00 1b be r1,r0,8003f48 <rtems_task_variable_add+0xf0>
}
new->gval = *ptr;
new->ptr = ptr;
new->dtor = dtor;
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
8003ee0: 29 82 01 34 lw r2,(r12+308)
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
new->ptr = ptr;
8003ee4: 58 2b 00 04 sw (r1+4),r11
new->dtor = dtor;
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
the_thread->task_variables = new;
8003ee8: 59 81 01 34 sw (r12+308),r1
}
new->gval = *ptr;
new->ptr = ptr;
new->dtor = dtor;
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
8003eec: 58 22 00 00 sw (r1+0),r2
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
8003ef0: 29 62 00 00 lw r2,(r11+0)
new->ptr = ptr;
new->dtor = dtor;
8003ef4: 58 2d 00 10 sw (r1+16),r13
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
8003ef8: 58 22 00 08 sw (r1+8),r2
new->ptr = ptr;
new->dtor = dtor;
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
the_thread->task_variables = new;
_Thread_Enable_dispatch();
8003efc: f8 00 08 9e calli 8006174 <_Thread_Enable_dispatch>
8003f00: 34 02 00 00 mvi r2,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003f04: b8 40 08 00 mv r1,r2
8003f08: 2b 9d 00 04 lw ra,(sp+4)
8003f0c: 2b 8b 00 10 lw r11,(sp+16)
8003f10: 2b 8c 00 0c lw r12,(sp+12)
8003f14: 2b 8d 00 08 lw r13,(sp+8)
8003f18: 37 9c 00 14 addi sp,sp,20
8003f1c: c3 a0 00 00 ret
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
tvp->dtor = dtor;
8003f20: 58 8d 00 10 sw (r4+16),r13
_Thread_Enable_dispatch();
8003f24: f8 00 08 94 calli 8006174 <_Thread_Enable_dispatch>
8003f28: 34 02 00 00 mvi r2,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003f2c: b8 40 08 00 mv r1,r2
8003f30: 2b 9d 00 04 lw ra,(sp+4)
8003f34: 2b 8b 00 10 lw r11,(sp+16)
8003f38: 2b 8c 00 0c lw r12,(sp+12)
8003f3c: 2b 8d 00 08 lw r13,(sp+8)
8003f40: 37 9c 00 14 addi sp,sp,20
8003f44: c3 a0 00 00 ret
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
8003f48: f8 00 08 8b calli 8006174 <_Thread_Enable_dispatch>
8003f4c: 34 02 00 1a mvi r2,26
return RTEMS_NO_MEMORY;
8003f50: e3 ff ff d1 bi 8003e94 <rtems_task_variable_add+0x3c>
08003f54 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
8003f54: 37 9c ff f4 addi sp,sp,-12
8003f58: 5b 8b 00 08 sw (sp+8),r11
8003f5c: 5b 9d 00 04 sw (sp+4),ra
8003f60: b8 40 58 00 mv r11,r2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
8003f64: 34 02 00 09 mvi r2,9
8003f68: 45 60 00 06 be r11,r0,8003f80 <rtems_task_variable_delete+0x2c>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
8003f6c: 37 82 00 0c addi r2,sp,12
8003f70: f8 00 08 8e calli 80061a8 <_Thread_Get>
switch (location) {
8003f74: 2b 84 00 0c lw r4,(sp+12)
8003f78: 34 02 00 04 mvi r2,4
8003f7c: 44 80 00 06 be r4,r0,8003f94 <rtems_task_variable_delete+0x40>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003f80: b8 40 08 00 mv r1,r2
8003f84: 2b 9d 00 04 lw ra,(sp+4)
8003f88: 2b 8b 00 08 lw r11,(sp+8)
8003f8c: 37 9c 00 0c addi sp,sp,12
8003f90: c3 a0 00 00 ret
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
8003f94: 28 23 01 34 lw r3,(r1+308)
while (tvp) {
8003f98: 44 64 00 09 be r3,r4,8003fbc <rtems_task_variable_delete+0x68>
if (tvp->ptr == ptr) {
8003f9c: 28 62 00 04 lw r2,(r3+4)
8003fa0: 5c 4b 00 04 bne r2,r11,8003fb0 <rtems_task_variable_delete+0x5c>
8003fa4: e0 00 00 18 bi 8004004 <rtems_task_variable_delete+0xb0>
8003fa8: 28 64 00 04 lw r4,(r3+4)
8003fac: 44 8b 00 0b be r4,r11,8003fd8 <rtems_task_variable_delete+0x84>
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
8003fb0: b8 60 10 00 mv r2,r3
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
8003fb4: 28 63 00 00 lw r3,(r3+0)
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
8003fb8: 5c 60 ff fc bne r3,r0,8003fa8 <rtems_task_variable_delete+0x54><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
8003fbc: f8 00 08 6e calli 8006174 <_Thread_Enable_dispatch>
8003fc0: 34 02 00 09 mvi r2,9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003fc4: b8 40 08 00 mv r1,r2
8003fc8: 2b 9d 00 04 lw ra,(sp+4)
8003fcc: 2b 8b 00 08 lw r11,(sp+8)
8003fd0: 37 9c 00 0c addi sp,sp,12
8003fd4: c3 a0 00 00 ret
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
8003fd8: 28 64 00 00 lw r4,(r3+0)
8003fdc: 58 44 00 00 sw (r2+0),r4
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
8003fe0: b8 60 10 00 mv r2,r3
8003fe4: f8 00 00 3b calli 80040d0 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
8003fe8: f8 00 08 63 calli 8006174 <_Thread_Enable_dispatch>
8003fec: 34 02 00 00 mvi r2,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003ff0: b8 40 08 00 mv r1,r2
8003ff4: 2b 9d 00 04 lw ra,(sp+4)
8003ff8: 2b 8b 00 08 lw r11,(sp+8)
8003ffc: 37 9c 00 0c addi sp,sp,12
8004000: c3 a0 00 00 ret
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
8004004: 28 62 00 00 lw r2,(r3+0)
8004008: 58 22 01 34 sw (r1+308),r2
800400c: e3 ff ff f5 bi 8003fe0 <rtems_task_variable_delete+0x8c>
08004010 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
8004010: 37 9c ff f0 addi sp,sp,-16
8004014: 5b 8b 00 0c sw (sp+12),r11
8004018: 5b 8c 00 08 sw (sp+8),r12
800401c: 5b 9d 00 04 sw (sp+4),ra
8004020: b8 40 58 00 mv r11,r2
8004024: b8 60 60 00 mv r12,r3
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
8004028: 44 40 00 1d be r2,r0,800409c <rtems_task_variable_get+0x8c>
return RTEMS_INVALID_ADDRESS;
if ( !result )
800402c: 44 60 00 1c be r3,r0,800409c <rtems_task_variable_get+0x8c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
8004030: 37 82 00 10 addi r2,sp,16
8004034: f8 00 08 5d calli 80061a8 <_Thread_Get>
switch (location) {
8004038: 2b 82 00 10 lw r2,(sp+16)
return RTEMS_INVALID_ADDRESS;
if ( !result )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
800403c: b8 20 18 00 mv r3,r1
switch (location) {
8004040: 34 01 00 04 mvi r1,4
8004044: 44 40 00 06 be r2,r0,800405c <rtems_task_variable_get+0x4c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8004048: 2b 9d 00 04 lw ra,(sp+4)
800404c: 2b 8b 00 0c lw r11,(sp+12)
8004050: 2b 8c 00 08 lw r12,(sp+8)
8004054: 37 9c 00 10 addi sp,sp,16
8004058: c3 a0 00 00 ret
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
800405c: 28 61 01 34 lw r1,(r3+308)
while (tvp) {
8004060: 5c 22 00 04 bne r1,r2,8004070 <rtems_task_variable_get+0x60>
8004064: e0 00 00 14 bi 80040b4 <rtems_task_variable_get+0xa4>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
8004068: 28 21 00 00 lw r1,(r1+0)
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
800406c: 44 20 00 12 be r1,r0,80040b4 <rtems_task_variable_get+0xa4><== NEVER TAKEN
if (tvp->ptr == ptr) {
8004070: 28 22 00 04 lw r2,(r1+4)
8004074: 5c 4b ff fd bne r2,r11,8004068 <rtems_task_variable_get+0x58>
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
8004078: 28 21 00 0c lw r1,(r1+12)
800407c: 59 81 00 00 sw (r12+0),r1
_Thread_Enable_dispatch();
8004080: f8 00 08 3d calli 8006174 <_Thread_Enable_dispatch>
8004084: 34 01 00 00 mvi r1,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8004088: 2b 9d 00 04 lw ra,(sp+4)
800408c: 2b 8b 00 0c lw r11,(sp+12)
8004090: 2b 8c 00 08 lw r12,(sp+8)
8004094: 37 9c 00 10 addi sp,sp,16
8004098: c3 a0 00 00 ret
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
800409c: 34 01 00 09 mvi r1,9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80040a0: 2b 9d 00 04 lw ra,(sp+4)
80040a4: 2b 8b 00 0c lw r11,(sp+12)
80040a8: 2b 8c 00 08 lw r12,(sp+8)
80040ac: 37 9c 00 10 addi sp,sp,16
80040b0: c3 a0 00 00 ret
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
80040b4: f8 00 08 30 calli 8006174 <_Thread_Enable_dispatch>
80040b8: 34 01 00 09 mvi r1,9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80040bc: 2b 9d 00 04 lw ra,(sp+4)
80040c0: 2b 8b 00 0c lw r11,(sp+12)
80040c4: 2b 8c 00 08 lw r12,(sp+8)
80040c8: 37 9c 00 10 addi sp,sp,16
80040cc: c3 a0 00 00 ret
08013f04 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
8013f04: 37 9c ff f8 addi sp,sp,-8
8013f08: 5b 9d 00 04 sw (sp+4),ra
8013f0c: b8 20 10 00 mv r2,r1
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
8013f10: 78 01 08 03 mvhi r1,0x803
8013f14: 37 83 00 08 addi r3,sp,8
8013f18: 38 21 ee 80 ori r1,r1,0xee80
8013f1c: f8 00 0e 61 calli 80178a0 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
8013f20: 2b 83 00 08 lw r3,(sp+8)
8013f24: 34 02 00 04 mvi r2,4
8013f28: 44 60 00 05 be r3,r0,8013f3c <rtems_timer_cancel+0x38>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8013f2c: b8 40 08 00 mv r1,r2
8013f30: 2b 9d 00 04 lw ra,(sp+4)
8013f34: 37 9c 00 08 addi sp,sp,8
8013f38: c3 a0 00 00 ret
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
8013f3c: 28 23 00 38 lw r3,(r1+56)
8013f40: 44 62 00 03 be r3,r2,8013f4c <rtems_timer_cancel+0x48> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
8013f44: 34 21 00 10 addi r1,r1,16
8013f48: f8 00 18 b3 calli 801a214 <_Watchdog_Remove>
_Thread_Enable_dispatch();
8013f4c: f8 00 11 67 calli 80184e8 <_Thread_Enable_dispatch>
8013f50: 34 02 00 00 mvi r2,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8013f54: b8 40 08 00 mv r1,r2
8013f58: 2b 9d 00 04 lw ra,(sp+4)
8013f5c: 37 9c 00 08 addi sp,sp,8
8013f60: c3 a0 00 00 ret
08013f64 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
8013f64: 37 9c ff e4 addi sp,sp,-28
8013f68: 5b 8b 00 1c sw (sp+28),r11
8013f6c: 5b 8c 00 18 sw (sp+24),r12
8013f70: 5b 8d 00 14 sw (sp+20),r13
8013f74: 5b 8e 00 10 sw (sp+16),r14
8013f78: 5b 8f 00 0c sw (sp+12),r15
8013f7c: 5b 90 00 08 sw (sp+8),r16
8013f80: 5b 9d 00 04 sw (sp+4),ra
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
8013f84: 34 0c 00 00 mvi r12,0
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
8013f88: b8 20 68 00 mv r13,r1
8013f8c: b8 40 70 00 mv r14,r2
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
8013f90: 34 01 00 03 mvi r1,3
8013f94: 45 ac 00 20 be r13,r12,8014014 <rtems_timer_create+0xb0> <== NEVER TAKEN
return RTEMS_INVALID_NAME;
if ( !id )
8013f98: 34 01 00 09 mvi r1,9
8013f9c: 44 4c 00 1e be r2,r12,8014014 <rtems_timer_create+0xb0> <== NEVER TAKEN
8013fa0: 78 03 08 03 mvhi r3,0x803
8013fa4: 38 63 ec 34 ori r3,r3,0xec34
8013fa8: 28 61 00 00 lw r1,(r3+0)
8013fac: 34 21 00 01 addi r1,r1,1
8013fb0: 58 61 00 00 sw (r3+0),r1
* This function allocates a timer control block from
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
{
return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
8013fb4: 78 01 08 03 mvhi r1,0x803
8013fb8: 38 21 ee 80 ori r1,r1,0xee80
8013fbc: f8 00 0c 64 calli 801714c <_Objects_Allocate>
8013fc0: b8 20 58 00 mv r11,r1
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
8013fc4: 44 2c 00 1d be r1,r12,8014038 <rtems_timer_create+0xd4> <== NEVER TAKEN
8013fc8: 28 2f 00 08 lw r15,(r1+8)
8013fcc: 78 01 08 03 mvhi r1,0x803
8013fd0: 38 21 ee 80 ori r1,r1,0xee80
8013fd4: 28 30 00 1c lw r16,(r1+28)
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
8013fd8: 34 01 00 04 mvi r1,4
8013fdc: 59 61 00 38 sw (r11+56),r1
8013fe0: 34 02 00 02 mvi r2,2
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8013fe4: 59 6c 00 18 sw (r11+24),r12
the_watchdog->routine = routine;
8013fe8: 59 6c 00 2c sw (r11+44),r12
the_watchdog->id = id;
8013fec: 59 6c 00 30 sw (r11+48),r12
the_watchdog->user_data = user_data;
8013ff0: 59 6c 00 34 sw (r11+52),r12
8013ff4: 21 e1 ff ff andi r1,r15,0xffff
8013ff8: fb ff e7 c0 calli 800def8 <__ashlsi3>
8013ffc: b6 01 08 00 add r1,r16,r1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
8014000: 59 6d 00 0c sw (r11+12),r13
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8014004: 58 2b 00 00 sw (r1+0),r11
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
8014008: 59 cf 00 00 sw (r14+0),r15
_Thread_Enable_dispatch();
801400c: f8 00 11 37 calli 80184e8 <_Thread_Enable_dispatch>
8014010: b9 80 08 00 mv r1,r12
return RTEMS_SUCCESSFUL;
}
8014014: 2b 9d 00 04 lw ra,(sp+4)
8014018: 2b 8b 00 1c lw r11,(sp+28)
801401c: 2b 8c 00 18 lw r12,(sp+24)
8014020: 2b 8d 00 14 lw r13,(sp+20)
8014024: 2b 8e 00 10 lw r14,(sp+16)
8014028: 2b 8f 00 0c lw r15,(sp+12)
801402c: 2b 90 00 08 lw r16,(sp+8)
8014030: 37 9c 00 1c addi sp,sp,28
8014034: c3 a0 00 00 ret
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
_Thread_Enable_dispatch();
8014038: f8 00 11 2c calli 80184e8 <_Thread_Enable_dispatch>
801403c: 34 01 00 05 mvi r1,5
return RTEMS_TOO_MANY;
8014040: e3 ff ff f5 bi 8014014 <rtems_timer_create+0xb0>
080145a4 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
80145a4: 37 9c ff d8 addi sp,sp,-40
80145a8: 5b 8b 00 24 sw (sp+36),r11
80145ac: 5b 8c 00 20 sw (sp+32),r12
80145b0: 5b 8d 00 1c sw (sp+28),r13
80145b4: 5b 8e 00 18 sw (sp+24),r14
80145b8: 5b 8f 00 14 sw (sp+20),r15
80145bc: 5b 90 00 10 sw (sp+16),r16
80145c0: 5b 91 00 0c sw (sp+12),r17
80145c4: 5b 92 00 08 sw (sp+8),r18
80145c8: 5b 9d 00 04 sw (sp+4),ra
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
80145cc: 78 05 08 03 mvhi r5,0x803
80145d0: 38 a5 ee c0 ori r5,r5,0xeec0
80145d4: 28 ab 00 00 lw r11,(r5+0)
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
80145d8: b8 20 78 00 mv r15,r1
80145dc: b8 40 68 00 mv r13,r2
80145e0: b8 60 70 00 mv r14,r3
80145e4: b8 80 80 00 mv r16,r4
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
80145e8: 34 05 00 0e mvi r5,14
80145ec: 45 60 00 0c be r11,r0,801461c <rtems_timer_server_fire_when+0x78>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
80145f0: 78 05 08 03 mvhi r5,0x803
80145f4: 38 a5 ec 48 ori r5,r5,0xec48
80145f8: 40 a6 00 00 lbu r6,(r5+0)
80145fc: 34 05 00 0b mvi r5,11
8014600: 44 c0 00 07 be r6,r0,801461c <rtems_timer_server_fire_when+0x78><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
8014604: 34 05 00 09 mvi r5,9
8014608: 44 60 00 05 be r3,r0,801461c <rtems_timer_server_fire_when+0x78>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
801460c: b8 40 08 00 mv r1,r2
8014610: fb ff f0 06 calli 8010628 <_TOD_Validate>
8014614: 5c 20 00 0e bne r1,r0,801464c <rtems_timer_server_fire_when+0xa8>
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
8014618: 34 05 00 14 mvi r5,20
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
801461c: b8 a0 08 00 mv r1,r5
8014620: 2b 9d 00 04 lw ra,(sp+4)
8014624: 2b 8b 00 24 lw r11,(sp+36)
8014628: 2b 8c 00 20 lw r12,(sp+32)
801462c: 2b 8d 00 1c lw r13,(sp+28)
8014630: 2b 8e 00 18 lw r14,(sp+24)
8014634: 2b 8f 00 14 lw r15,(sp+20)
8014638: 2b 90 00 10 lw r16,(sp+16)
801463c: 2b 91 00 0c lw r17,(sp+12)
8014640: 2b 92 00 08 lw r18,(sp+8)
8014644: 37 9c 00 28 addi sp,sp,40
8014648: c3 a0 00 00 ret
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
801464c: 78 0c 08 03 mvhi r12,0x803
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
8014650: b9 a0 08 00 mv r1,r13
8014654: fb ff ef ad calli 8010508 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
8014658: 39 8c ec c4 ori r12,r12,0xecc4
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
801465c: b8 20 88 00 mv r17,r1
if ( seconds <= _TOD_Seconds_since_epoch() )
8014660: 29 81 00 00 lw r1,(r12+0)
8014664: 50 31 ff ed bgeu r1,r17,8014618 <rtems_timer_server_fire_when+0x74>
8014668: 78 01 08 03 mvhi r1,0x803
801466c: 38 21 ee 80 ori r1,r1,0xee80
8014670: b9 e0 10 00 mv r2,r15
8014674: 37 83 00 28 addi r3,sp,40
8014678: f8 00 0c 8a calli 80178a0 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
801467c: 2b 92 00 28 lw r18,(sp+40)
8014680: b8 20 68 00 mv r13,r1
8014684: 34 05 00 04 mvi r5,4
8014688: 5e 40 ff e5 bne r18,r0,801461c <rtems_timer_server_fire_when+0x78>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
801468c: 34 21 00 10 addi r1,r1,16
8014690: f8 00 16 e1 calli 801a214 <_Watchdog_Remove>
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
8014694: 59 af 00 30 sw (r13+48),r15
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
8014698: 29 81 00 00 lw r1,(r12+0)
(*timer_server->schedule_operation)( timer_server, the_timer );
801469c: 29 63 00 04 lw r3,(r11+4)
80146a0: b9 a0 10 00 mv r2,r13
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
80146a4: ca 21 88 00 sub r17,r17,r1
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
80146a8: 34 01 00 03 mvi r1,3
80146ac: 59 a1 00 38 sw (r13+56),r1
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
80146b0: 59 ae 00 2c sw (r13+44),r14
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
80146b4: b9 60 08 00 mv r1,r11
the_watchdog->id = id;
the_watchdog->user_data = user_data;
80146b8: 59 b0 00 34 sw (r13+52),r16
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
80146bc: 59 b1 00 1c sw (r13+28),r17
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
80146c0: 59 b2 00 18 sw (r13+24),r18
(*timer_server->schedule_operation)( timer_server, the_timer );
80146c4: d8 60 00 00 call r3
_Thread_Enable_dispatch();
80146c8: f8 00 0f 88 calli 80184e8 <_Thread_Enable_dispatch>
80146cc: ba 40 28 00 mv r5,r18
return RTEMS_SUCCESSFUL;
80146d0: e3 ff ff d3 bi 801461c <rtems_timer_server_fire_when+0x78>