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 c9 d8 ori r12,r12,0xc9d8 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 c9 d8 ori r13,r13,0xc9d8 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 c8 e0 ori r12,r12,0xc8e0
* 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 08 calli 801fc20 <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 70 calli 80189d0 <_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>
0800e8c4 <_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 ) {
800e8c4: 37 9c ff e8 addi sp,sp,-24 800e8c8: 5b 8b 00 18 sw (sp+24),r11 800e8cc: 5b 8c 00 14 sw (sp+20),r12 800e8d0: 5b 8d 00 10 sw (sp+16),r13 800e8d4: 5b 8e 00 0c sw (sp+12),r14 800e8d8: 5b 8f 00 08 sw (sp+8),r15 800e8dc: 5b 9d 00 04 sw (sp+4),ra 800e8e0: 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;
800e8e4: 34 01 00 00 mvi r1,0 800e8e8: 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;
800e8ec: 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;
800e8f0: 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)) {
800e8f4: 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 ) {
800e8f8: b8 60 68 00 mv r13,r3 800e8fc: 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)) {
800e900: b8 80 60 00 mv r12,r4
800e904: 44 20 00 05 be r1,r0,800e918 <_CORE_message_queue_Initialize+0x54> allocated_message_size += sizeof(uint32_t);
800e908: 34 8c 00 04 addi r12,r4,4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
800e90c: 34 01 ff fc mvi r1,-4 800e910: a1 81 60 00 and r12,r12,r1
} if (allocated_message_size < maximum_message_size)
800e914: 54 8c 00 23 bgu r4,r12,800e9a0 <_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));
800e918: 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 *
800e91c: b9 c0 08 00 mv r1,r14 800e920: b9 a0 10 00 mv r2,r13 800e924: f8 00 67 00 calli 8028524 <__mulsi3>
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size)
800e928: 55 81 00 1e bgu r12,r1,800e9a0 <_CORE_message_queue_Initialize+0xdc><== NEVER TAKEN
return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
800e92c: f8 00 0e 80 calli 801232c <_Workspace_Allocate> 800e930: 59 61 00 5c sw (r11+92),r1
_Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 800e934: 44 20 00 1b be r1,r0,800e9a0 <_CORE_message_queue_Initialize+0xdc> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize (
800e938: b8 20 10 00 mv r2,r1 800e93c: b9 a0 18 00 mv r3,r13 800e940: b9 c0 20 00 mv r4,r14 800e944: 35 61 00 60 addi r1,r11,96 800e948: f8 00 17 8b calli 8014774 <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize(
800e94c: 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);
800e950: 35 63 00 54 addi r3,r11,84
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
800e954: 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);
800e958: 59 63 00 50 sw (r11+80),r3 800e95c: 64 42 00 01 cmpei r2,r2,1
the_chain->permanent_null = NULL;
800e960: 34 03 00 00 mvi r3,0 800e964: 59 63 00 54 sw (r11+84),r3
the_chain->last = _Chain_Head(the_chain);
800e968: 59 61 00 58 sw (r11+88),r1 800e96c: 34 03 00 80 mvi r3,128 800e970: b9 60 08 00 mv r1,r11 800e974: 34 04 00 06 mvi r4,6 800e978: f8 00 0a c3 calli 8011484 <_Thread_queue_Initialize> 800e97c: 34 01 00 01 mvi r1,1
STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; }
800e980: 2b 9d 00 04 lw ra,(sp+4) 800e984: 2b 8b 00 18 lw r11,(sp+24) 800e988: 2b 8c 00 14 lw r12,(sp+20) 800e98c: 2b 8d 00 10 lw r13,(sp+16) 800e990: 2b 8e 00 0c lw r14,(sp+12) 800e994: 2b 8f 00 08 lw r15,(sp+8) 800e998: 37 9c 00 18 addi sp,sp,24 800e99c: c3 a0 00 00 ret
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true;
800e9a0: 34 01 00 00 mvi r1,0
}
800e9a4: 2b 9d 00 04 lw ra,(sp+4) 800e9a8: 2b 8b 00 18 lw r11,(sp+24) 800e9ac: 2b 8c 00 14 lw r12,(sp+20) 800e9b0: 2b 8d 00 10 lw r13,(sp+16) 800e9b4: 2b 8e 00 0c lw r14,(sp+12) 800e9b8: 2b 8f 00 08 lw r15,(sp+8) 800e9bc: 37 9c 00 18 addi sp,sp,24 800e9c0: 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 c8 24 ori r11,r11,0xc824 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 c9 calli 8008a7c <_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 c8 e0 ori r1,r1,0xc8e0 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 c9 c0 ori r1,r1,0xc9c0 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 c8 e0 ori r1,r1,0xc8e0 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
08008a7c <_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 ) {
8008a7c: 37 9c ff fc addi sp,sp,-4 8008a80: 5b 9d 00 04 sw (sp+4),ra
{ Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing;
8008a84: 78 03 08 01 mvhi r3,0x801 8008a88: 38 63 c8 e0 ori r3,r3,0xc8e0 8008a8c: 28 63 00 00 lw r3,(r3+0)
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
8008a90: 34 04 00 00 mvi r4,0 8008a94: 58 64 00 34 sw (r3+52),r4
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
8008a98: 28 25 00 50 lw r5,(r1+80)
8008a9c: 44 a4 00 12 be r5,r4,8008ae4 <_CORE_mutex_Seize_interrupt_trylock+0x68> the_mutex->lock = CORE_MUTEX_LOCKED;
8008aa0: 58 24 00 50 sw (r1+80),r4
the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id;
8008aa4: 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;
8008aa8: 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;
8008aac: 58 23 00 5c sw (r1+92),r3
the_mutex->holder_id = executing->Object.id;
8008ab0: 58 26 00 60 sw (r1+96),r6
the_mutex->nest_count = 1;
8008ab4: 34 06 00 01 mvi r6,1 8008ab8: 58 26 00 54 sw (r1+84),r6
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
8008abc: 34 07 00 02 mvi r7,2
8008ac0: 44 a7 00 0f be r5,r7,8008afc <_CORE_mutex_Seize_interrupt_trylock+0x80>
8008ac4: 34 07 00 03 mvi r7,3
8008ac8: 44 a7 00 1b be r5,r7,8008b34 <_CORE_mutex_Seize_interrupt_trylock+0xb8> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p );
8008acc: 28 41 00 00 lw r1,(r2+0) 8008ad0: d0 01 00 00 wcsr IE,r1 8008ad4: 34 01 00 00 mvi r1,0
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); }
8008ad8: 2b 9d 00 04 lw ra,(sp+4) 8008adc: 37 9c 00 04 addi sp,sp,4 8008ae0: 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 ) ) {
8008ae4: 28 24 00 5c lw r4,(r1+92)
8008ae8: 44 64 00 09 be r3,r4,8008b0c <_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 );
8008aec: 34 01 00 01 mvi r1,1 8008af0: 2b 9d 00 04 lw ra,(sp+4) 8008af4: 37 9c 00 04 addi sp,sp,4 8008af8: 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++;
8008afc: 28 61 00 1c lw r1,(r3+28) 8008b00: 34 21 00 01 addi r1,r1,1 8008b04: 58 61 00 1c sw (r3+28),r1 8008b08: e3 ff ff f1 bi 8008acc <_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 ) {
8008b0c: 28 24 00 40 lw r4,(r1+64)
8008b10: 44 80 00 2d be r4,r0,8008bc4 <_CORE_mutex_Seize_interrupt_trylock+0x148>
8008b14: 34 01 00 01 mvi r1,1
8008b18: 5c 81 ff f5 bne r4,r1,8008aec <_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;
8008b1c: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8008b20: 58 61 00 34 sw (r3+52),r1 <== NOT EXECUTED
_ISR_Enable( *level_p );
8008b24: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 8008b28: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 8008b2c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8008b30: e3 ff ff f0 bi 8008af0 <_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++;
8008b34: 28 68 00 1c lw r8,(r3+28)
{ Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority;
8008b38: 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++;
8008b3c: b5 06 38 00 add r7,r8,r6 8008b40: 58 67 00 1c sw (r3+28),r7
*/ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling;
8008b44: 28 27 00 4c lw r7,(r1+76)
current = executing->current_priority; if ( current == ceiling ) { 8008b48: 44 e5 00 1b be r7,r5,8008bb4 <_CORE_mutex_Seize_interrupt_trylock+0x138> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 8008b4c: 50 e5 00 0f bgeu r7,r5,8008b88 <_CORE_mutex_Seize_interrupt_trylock+0x10c> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
8008b50: 78 03 08 01 mvhi r3,0x801 8008b54: 38 63 c8 24 ori r3,r3,0xc824 8008b58: 28 64 00 00 lw r4,(r3+0) 8008b5c: 34 84 00 01 addi r4,r4,1 8008b60: 58 64 00 00 sw (r3+0),r4
_Thread_Disable_dispatch(); _ISR_Enable( *level_p );
8008b64: 28 42 00 00 lw r2,(r2+0) 8008b68: d0 02 00 00 wcsr IE,r2
_Thread_Change_priority(
8008b6c: 28 22 00 4c lw r2,(r1+76) 8008b70: 28 21 00 5c lw r1,(r1+92) 8008b74: 34 03 00 00 mvi r3,0 8008b78: fb ff ed 4a calli 80040a0 <_Thread_Change_priority>
the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch();
8008b7c: fb ff ee d4 calli 80046cc <_Thread_Enable_dispatch> 8008b80: 34 01 00 00 mvi r1,0 8008b84: e3 ff ff db bi 8008af0 <_CORE_mutex_Seize_interrupt_trylock+0x74>
return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
8008b88: 34 05 00 06 mvi r5,6 8008b8c: 58 65 00 34 sw (r3+52),r5
the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */
8008b90: 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;
8008b94: 58 26 00 50 sw (r1+80),r6
the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */
8008b98: 58 68 00 1c sw (r3+28),r8
_ISR_Enable( *level_p );
8008b9c: 28 41 00 00 lw r1,(r2+0) 8008ba0: d0 01 00 00 wcsr IE,r1 8008ba4: 34 01 00 00 mvi r1,0 8008ba8: 2b 9d 00 04 lw ra,(sp+4) 8008bac: 37 9c 00 04 addi sp,sp,4 8008bb0: 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 );
8008bb4: 28 41 00 00 lw r1,(r2+0) 8008bb8: d0 01 00 00 wcsr IE,r1 8008bbc: 34 01 00 00 mvi r1,0 8008bc0: e3 ff ff cc bi 8008af0 <_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++;
8008bc4: 28 23 00 54 lw r3,(r1+84) 8008bc8: 34 63 00 01 addi r3,r3,1 8008bcc: 58 23 00 54 sw (r1+84),r3
_ISR_Enable( *level_p );
8008bd0: 28 41 00 00 lw r1,(r2+0) 8008bd4: d0 01 00 00 wcsr IE,r1 8008bd8: 34 01 00 00 mvi r1,0 8008bdc: e3 ff ff c5 bi 8008af0 <_CORE_mutex_Seize_interrupt_trylock+0x74>
08008bf8 <_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 ) {
8008bf8: 37 9c ff f8 addi sp,sp,-8 8008bfc: 5b 8b 00 08 sw (sp+8),r11 8008c00: 5b 9d 00 04 sw (sp+4),ra 8008c04: 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)) ) {
8008c08: fb ff ef d8 calli 8004b68 <_Thread_queue_Dequeue> 8008c0c: 34 02 00 00 mvi r2,0
8008c10: 44 22 00 06 be r1,r2,8008c28 <_CORE_semaphore_Surrender+0x30> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; }
8008c14: b8 40 08 00 mv r1,r2 8008c18: 2b 9d 00 04 lw ra,(sp+4) 8008c1c: 2b 8b 00 08 lw r11,(sp+8) 8008c20: 37 9c 00 08 addi sp,sp,8 8008c24: 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 );
8008c28: 90 00 08 00 rcsr r1,IE 8008c2c: 34 02 ff fe mvi r2,-2 8008c30: a0 22 10 00 and r2,r1,r2 8008c34: d0 02 00 00 wcsr IE,r2
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
8008c38: 29 62 00 48 lw r2,(r11+72) 8008c3c: 29 63 00 40 lw r3,(r11+64)
8008c40: 54 62 00 08 bgu r3,r2,8008c60 <_CORE_semaphore_Surrender+0x68><== ALWAYS TAKEN
8008c44: 34 02 00 04 mvi r2,4 <== NOT EXECUTED
the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level );
8008c48: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
} return status; }
8008c4c: b8 40 08 00 mv r1,r2 8008c50: 2b 9d 00 04 lw ra,(sp+4) 8008c54: 2b 8b 00 08 lw r11,(sp+8) 8008c58: 37 9c 00 08 addi sp,sp,8 8008c5c: c3 a0 00 00 ret
#endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1;
8008c60: 34 42 00 01 addi r2,r2,1 8008c64: 59 62 00 48 sw (r11+72),r2 8008c68: 34 02 00 00 mvi r2,0
else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level );
8008c6c: d0 01 00 00 wcsr IE,r1 8008c70: e3 ff ff f7 bi 8008c4c <_CORE_semaphore_Surrender+0x54>
08008a2c <_Chain_Initialize>: Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL;
8008a2c: 34 05 00 00 mvi r5,0 8008a30: 58 25 00 04 sw (r1+4),r5
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain;
8008a34: b8 20 28 00 mv r5,r1
next = starting_address; while ( count-- ) {
8008a38: 44 60 00 07 be r3,r0,8008a54 <_Chain_Initialize+0x28> <== NEVER TAKEN
current->next = next; next->previous = current;
8008a3c: 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;
8008a40: 58 a2 00 00 sw (r5+0),r2
next->previous = current; current = next; next = (Chain_Node *)
8008a44: 34 63 ff ff addi r3,r3,-1 8008a48: b8 40 28 00 mv r5,r2 8008a4c: 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-- ) { 8008a50: 5c 60 ff fb bne r3,r0,8008a3c <_Chain_Initialize+0x10> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain );
8008a54: 34 22 00 04 addi r2,r1,4 8008a58: 58 a2 00 00 sw (r5+0),r2
the_chain->last = current;
8008a5c: 58 25 00 08 sw (r1+8),r5
}
8008a60: c3 a0 00 00 ret
0800e4a0 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) {
800e4a0: 37 9c ff f4 addi sp,sp,-12 800e4a4: 5b 8b 00 0c sw (sp+12),r11 800e4a8: 5b 8c 00 08 sw (sp+8),r12 800e4ac: 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;
800e4b0: 78 05 08 02 mvhi r5,0x802 800e4b4: 38 a5 49 70 ori r5,r5,0x4970 800e4b8: 28 ab 00 00 lw r11,(r5+0)
executing->Wait.return_code = RTEMS_SUCCESSFUL;
800e4bc: 34 05 00 00 mvi r5,0 800e4c0: 59 65 00 34 sw (r11+52),r5
api = executing->API_Extensions[ THREAD_API_RTEMS ];
800e4c4: 29 67 01 24 lw r7,(r11+292)
_ISR_Disable( level );
800e4c8: 90 00 30 00 rcsr r6,IE 800e4cc: 34 05 ff fe mvi r5,-2 800e4d0: a0 c5 28 00 and r5,r6,r5 800e4d4: d0 05 00 00 wcsr IE,r5
pending_events = api->pending_events;
800e4d8: 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 );
800e4dc: a0 28 28 00 and r5,r1,r8
seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 800e4e0: 44 a0 00 04 be r5,r0,800e4f0 <_Event_Seize+0x50> 800e4e4: 44 25 00 2b be r1,r5,800e590 <_Event_Seize+0xf0>
800e4e8: 20 49 00 02 andi r9,r2,0x2
800e4ec: 5d 20 00 29 bne r9,r0,800e590 <_Event_Seize+0xf0> <== ALWAYS TAKEN
_ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) {
800e4f0: 20 47 00 01 andi r7,r2,0x1
800e4f4: 5c e0 00 1e bne r7,r0,800e56c <_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;
800e4f8: 78 0c 08 02 mvhi r12,0x802 800e4fc: 39 8c 4b b0 ori r12,r12,0x4bb0
* * 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;
800e500: 59 61 00 24 sw (r11+36),r1
executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
800e504: 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;
800e508: 59 62 00 30 sw (r11+48),r2
executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out;
800e50c: 59 64 00 28 sw (r11+40),r4
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
800e510: 59 81 00 00 sw (r12+0),r1
_ISR_Enable( level );
800e514: d0 06 00 00 wcsr IE,r6
if ( ticks ) {
800e518: 34 04 00 00 mvi r4,0
800e51c: 5c 64 00 2d bne r3,r4,800e5d0 <_Event_Seize+0x130> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
800e520: b9 60 08 00 mv r1,r11 800e524: 34 02 01 00 mvi r2,256 800e528: fb ff e5 2a calli 80079d0 <_Thread_Set_state>
_ISR_Disable( level );
800e52c: 90 00 18 00 rcsr r3,IE 800e530: 34 01 ff fe mvi r1,-2 800e534: a0 61 08 00 and r1,r3,r1 800e538: d0 01 00 00 wcsr IE,r1
sync_state = _Event_Sync_state;
800e53c: 29 81 00 00 lw r1,(r12+0)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
800e540: 34 02 00 00 mvi r2,0 800e544: 59 82 00 00 sw (r12+0),r2
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
800e548: 34 02 00 01 mvi r2,1
800e54c: 44 22 00 1b be r1,r2,800e5b8 <_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 );
800e550: b9 60 10 00 mv r2,r11 800e554: f8 00 06 13 calli 800fda0 <_Thread_blocking_operation_Cancel>
}
800e558: 2b 9d 00 04 lw ra,(sp+4) 800e55c: 2b 8b 00 0c lw r11,(sp+12) 800e560: 2b 8c 00 08 lw r12,(sp+8) 800e564: 37 9c 00 0c addi sp,sp,12 800e568: c3 a0 00 00 ret
*event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level );
800e56c: d0 06 00 00 wcsr IE,r6
executing->Wait.return_code = RTEMS_UNSATISFIED;
800e570: 34 01 00 0d mvi r1,13 800e574: 59 61 00 34 sw (r11+52),r1
*event_out = seized_events;
800e578: 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 ); }
800e57c: 2b 9d 00 04 lw ra,(sp+4) 800e580: 2b 8b 00 0c lw r11,(sp+12) 800e584: 2b 8c 00 08 lw r12,(sp+8) 800e588: 37 9c 00 0c addi sp,sp,12 800e58c: 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 =
800e590: a4 a0 08 00 not r1,r5 800e594: a0 28 40 00 and r8,r1,r8 800e598: 58 e8 00 00 sw (r7+0),r8
_Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level );
800e59c: d0 06 00 00 wcsr IE,r6
*event_out = seized_events;
800e5a0: 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 ); }
800e5a4: 2b 9d 00 04 lw ra,(sp+4) 800e5a8: 2b 8b 00 0c lw r11,(sp+12) 800e5ac: 2b 8c 00 08 lw r12,(sp+8) 800e5b0: 37 9c 00 0c addi sp,sp,12 800e5b4: 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 );
800e5b8: 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 ); }
800e5bc: 2b 9d 00 04 lw ra,(sp+4) 800e5c0: 2b 8b 00 0c lw r11,(sp+12) 800e5c4: 2b 8c 00 08 lw r12,(sp+8) 800e5c8: 37 9c 00 0c addi sp,sp,12 800e5cc: c3 a0 00 00 ret
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize(
800e5d0: 29 65 00 08 lw r5,(r11+8)
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
800e5d4: 78 02 08 00 mvhi r2,0x800 800e5d8: 38 42 e7 d8 ori r2,r2,0xe7d8
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
800e5dc: 78 01 08 02 mvhi r1,0x802
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
800e5e0: 59 62 00 64 sw (r11+100),r2
the_watchdog->id = id;
800e5e4: 59 65 00 68 sw (r11+104),r5
the_watchdog->user_data = user_data;
800e5e8: 59 64 00 6c sw (r11+108),r4
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
800e5ec: 59 63 00 54 sw (r11+84),r3
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
800e5f0: 59 64 00 50 sw (r11+80),r4
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
800e5f4: 38 21 49 90 ori r1,r1,0x4990 800e5f8: 35 62 00 48 addi r2,r11,72 800e5fc: fb ff e7 04 calli 800820c <_Watchdog_Insert> 800e600: e3 ff ff c8 bi 800e520 <_Event_Seize+0x80>
0800e66c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) {
800e66c: 37 9c ff f8 addi sp,sp,-8 800e670: 5b 8b 00 08 sw (sp+8),r11 800e674: 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 ];
800e678: 28 25 01 24 lw r5,(r1+292)
option_set = (rtems_option) the_thread->Wait.option;
800e67c: 28 28 00 30 lw r8,(r1+48)
*/ void _Event_Surrender( Thread_Control *the_thread ) {
800e680: 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 );
800e684: 90 00 08 00 rcsr r1,IE 800e688: 34 07 ff fe mvi r7,-2 800e68c: a0 27 38 00 and r7,r1,r7 800e690: d0 07 00 00 wcsr IE,r7
pending_events = api->pending_events;
800e694: 28 a6 00 00 lw r6,(r5+0)
event_condition = (rtems_event_set) the_thread->Wait.count;
800e698: 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 );
800e69c: 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 ) ) { 800e6a0: 44 40 00 29 be r2,r0,800e744 <_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() &&
800e6a4: 78 03 08 02 mvhi r3,0x802 800e6a8: 38 63 49 4c ori r3,r3,0x494c 800e6ac: 28 63 00 00 lw r3,(r3+0)
800e6b0: 44 60 00 05 be r3,r0,800e6c4 <_Event_Surrender+0x58>
800e6b4: 78 03 08 02 mvhi r3,0x802 800e6b8: 38 63 49 70 ori r3,r3,0x4970 800e6bc: 28 63 00 00 lw r3,(r3+0)
800e6c0: 45 63 00 30 be r11,r3,800e780 <_Event_Surrender+0x114> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
800e6c4: 29 63 00 10 lw r3,(r11+16) 800e6c8: 20 63 01 00 andi r3,r3,0x100
800e6cc: 44 60 00 19 be r3,r0,800e730 <_Event_Surrender+0xc4> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 800e6d0: 44 82 00 03 be r4,r2,800e6dc <_Event_Surrender+0x70>
800e6d4: 21 08 00 02 andi r8,r8,0x2
800e6d8: 45 00 00 16 be r8,r0,800e730 <_Event_Surrender+0xc4> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
800e6dc: a4 40 18 00 not r3,r2 800e6e0: a0 66 30 00 and r6,r3,r6
the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800e6e4: 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 );
800e6e8: 58 a6 00 00 sw (r5+0),r6
the_thread->Wait.count = 0;
800e6ec: 34 03 00 00 mvi r3,0 800e6f0: 59 63 00 24 sw (r11+36),r3
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800e6f4: 58 82 00 00 sw (r4+0),r2
_ISR_Flash( level );
800e6f8: d0 01 00 00 wcsr IE,r1 800e6fc: d0 07 00 00 wcsr IE,r7
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
800e700: 29 63 00 50 lw r3,(r11+80) 800e704: 34 02 00 02 mvi r2,2
800e708: 44 62 00 14 be r3,r2,800e758 <_Event_Surrender+0xec> _ISR_Enable( level );
800e70c: d0 01 00 00 wcsr IE,r1
RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED );
800e710: 78 02 10 03 mvhi r2,0x1003 800e714: b9 60 08 00 mv r1,r11 800e718: 38 42 ff f8 ori r2,r2,0xfff8 800e71c: f8 00 05 b9 calli 800fe00 <_Thread_Clear_state>
} return; } } _ISR_Enable( level ); }
800e720: 2b 9d 00 04 lw ra,(sp+4) 800e724: 2b 8b 00 08 lw r11,(sp+8) 800e728: 37 9c 00 08 addi sp,sp,8 800e72c: c3 a0 00 00 ret
_Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level );
800e730: d0 01 00 00 wcsr IE,r1
}
800e734: 2b 9d 00 04 lw ra,(sp+4) 800e738: 2b 8b 00 08 lw r11,(sp+8) 800e73c: 37 9c 00 08 addi sp,sp,8 800e740: c3 a0 00 00 ret
/* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level );
800e744: d0 01 00 00 wcsr IE,r1
} return; } } _ISR_Enable( level ); }
800e748: 2b 9d 00 04 lw ra,(sp+4) 800e74c: 2b 8b 00 08 lw r11,(sp+8) 800e750: 37 9c 00 08 addi sp,sp,8 800e754: c3 a0 00 00 ret
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT;
800e758: 34 02 00 03 mvi r2,3 800e75c: 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 );
800e760: d0 01 00 00 wcsr IE,r1
(void) _Watchdog_Remove( &the_thread->Timer );
800e764: 35 61 00 48 addi r1,r11,72 800e768: fb ff e7 10 calli 80083a8 <_Watchdog_Remove> 800e76c: 78 02 10 03 mvhi r2,0x1003 800e770: b9 60 08 00 mv r1,r11 800e774: 38 42 ff f8 ori r2,r2,0xfff8 800e778: f8 00 05 a2 calli 800fe00 <_Thread_Clear_state> 800e77c: e3 ff ff ee bi 800e734 <_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) ||
800e780: 78 03 08 02 mvhi r3,0x802 800e784: 38 63 4b b0 ori r3,r3,0x4bb0 800e788: 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() &&
800e78c: 34 09 00 02 mvi r9,2
800e790: 45 49 00 04 be r10,r9,800e7a0 <_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)) ) {
800e794: 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() &&
800e798: 34 09 00 01 mvi r9,1
800e79c: 5d 49 ff ca bne r10,r9,800e6c4 <_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) ) {
800e7a0: 44 82 00 03 be r4,r2,800e7ac <_Event_Surrender+0x140> <== ALWAYS TAKEN
800e7a4: 21 08 00 02 andi r8,r8,0x2 <== NOT EXECUTED 800e7a8: 45 00 00 0a be r8,r0,800e7d0 <_Event_Surrender+0x164> <== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
800e7ac: a4 40 20 00 not r4,r2 800e7b0: a0 86 30 00 and r6,r4,r6
the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800e7b4: 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 );
800e7b8: 58 a6 00 00 sw (r5+0),r6
the_thread->Wait.count = 0;
800e7bc: 34 05 00 00 mvi r5,0 800e7c0: 59 65 00 24 sw (r11+36),r5
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800e7c4: 58 82 00 00 sw (r4+0),r2
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
800e7c8: 34 02 00 03 mvi r2,3 800e7cc: 58 62 00 00 sw (r3+0),r2
} _ISR_Enable( level );
800e7d0: d0 01 00 00 wcsr IE,r1
return;
800e7d4: e3 ff ff d8 bi 800e734 <_Event_Surrender+0xc8>
0800e7d8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) {
800e7d8: 37 9c ff f8 addi sp,sp,-8 800e7dc: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location );
800e7e0: 37 82 00 08 addi r2,sp,8 800e7e4: fb ff e1 9f calli 8006e60 <_Thread_Get>
switch ( location ) {
800e7e8: 2b 82 00 08 lw r2,(sp+8)
800e7ec: 44 40 00 04 be r2,r0,800e7fc <_Event_Timeout+0x24> <== ALWAYS TAKEN
case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } }
800e7f0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800e7f4: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800e7f8: 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 );
800e7fc: 90 00 18 00 rcsr r3,IE 800e800: 34 02 ff fe mvi r2,-2 800e804: a0 62 10 00 and r2,r3,r2 800e808: d0 02 00 00 wcsr IE,r2
return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) {
800e80c: 78 02 08 02 mvhi r2,0x802 800e810: 38 42 49 70 ori r2,r2,0x4970 800e814: 28 42 00 00 lw r2,(r2+0)
_ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0;
800e818: 34 04 00 00 mvi r4,0 800e81c: 58 24 00 24 sw (r1+36),r4
if ( _Thread_Is_executing( the_thread ) ) { 800e820: 44 22 00 0f be r1,r2,800e85c <_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;
800e824: 34 02 00 06 mvi r2,6 800e828: 58 22 00 34 sw (r1+52),r2
_ISR_Enable( level );
800e82c: d0 03 00 00 wcsr IE,r3 800e830: 78 02 10 03 mvhi r2,0x1003 800e834: 38 42 ff f8 ori r2,r2,0xfff8 800e838: f8 00 05 72 calli 800fe00 <_Thread_Clear_state>
*/ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1;
800e83c: 78 01 08 02 mvhi r1,0x802 800e840: 38 21 48 b4 ori r1,r1,0x48b4 800e844: 28 22 00 00 lw r2,(r1+0) 800e848: 34 42 ff ff addi r2,r2,-1 800e84c: 58 22 00 00 sw (r1+0),r2
case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } }
800e850: 2b 9d 00 04 lw ra,(sp+4) 800e854: 37 9c 00 08 addi sp,sp,8 800e858: 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 )
800e85c: 78 02 08 02 mvhi r2,0x802 800e860: 38 42 4b b0 ori r2,r2,0x4bb0 800e864: 28 45 00 00 lw r5,(r2+0) 800e868: 34 04 00 01 mvi r4,1
800e86c: 5c a4 ff ee bne r5,r4,800e824 <_Event_Timeout+0x4c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
800e870: 34 04 00 02 mvi r4,2 800e874: 58 44 00 00 sw (r2+0),r4 800e878: e3 ff ff eb bi 800e824 <_Event_Timeout+0x4c>
08008da4 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) {
8008da4: 37 9c ff bc addi sp,sp,-68 8008da8: 5b 8b 00 44 sw (sp+68),r11 8008dac: 5b 8c 00 40 sw (sp+64),r12 8008db0: 5b 8d 00 3c sw (sp+60),r13 8008db4: 5b 8e 00 38 sw (sp+56),r14 8008db8: 5b 8f 00 34 sw (sp+52),r15 8008dbc: 5b 90 00 30 sw (sp+48),r16 8008dc0: 5b 91 00 2c sw (sp+44),r17 8008dc4: 5b 92 00 28 sw (sp+40),r18 8008dc8: 5b 93 00 24 sw (sp+36),r19 8008dcc: 5b 94 00 20 sw (sp+32),r20 8008dd0: 5b 95 00 1c sw (sp+28),r21 8008dd4: 5b 96 00 18 sw (sp+24),r22 8008dd8: 5b 97 00 14 sw (sp+20),r23 8008ddc: 5b 98 00 10 sw (sp+16),r24 8008de0: 5b 99 00 0c sw (sp+12),r25 8008de4: 5b 9b 00 08 sw (sp+8),fp 8008de8: 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;
8008dec: 34 53 00 04 addi r19,r2,4
Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) {
8008df0: b8 40 68 00 mv r13,r2 8008df4: b8 20 78 00 mv r15,r1 8008df8: b8 60 88 00 mv r17,r3 8008dfc: 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;
8008e00: 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;
8008e04: 28 35 00 10 lw r21,(r1+16)
uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 8008e08: 54 53 00 6a bgu r2,r19,8008fb0 <_Heap_Allocate_aligned_with_boundary+0x20c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 8008e0c: 5c 80 00 6b bne r4,r0,8008fb8 <_Heap_Allocate_aligned_with_boundary+0x214> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) {
8008e10: 34 10 00 00 mvi r16,0
8008e14: 45 eb 00 0d be r15,r11,8008e48 <_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;
8008e18: 34 1b 00 04 mvi fp,4 8008e1c: 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;
8008e20: 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;
8008e24: 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 ) {
8008e28: 29 61 00 04 lw r1,(r11+4)
while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count;
8008e2c: 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 ) { 8008e30: 52 61 00 04 bgeu r19,r1,8008e40 <_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;
8008e34: 35 6c 00 08 addi r12,r11,8
if ( alignment == 0 ) { 8008e38: 5e 20 00 1b bne r17,r0,8008ea4 <_Heap_Allocate_aligned_with_boundary+0x100> boundary ); } } if ( alloc_begin != 0 ) {
8008e3c: 5d 80 00 53 bne r12,r0,8008f88 <_Heap_Allocate_aligned_with_boundary+0x1e4><== ALWAYS TAKEN
break; } block = block->next;
8008e40: 29 6b 00 08 lw r11,(r11+8)
if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 8008e44: 5d eb ff f9 bne r15,r11,8008e28 <_Heap_Allocate_aligned_with_boundary+0x84>
8008e48: 34 01 00 00 mvi r1,0
uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats;
8008e4c: 29 e2 00 44 lw r2,(r15+68)
8008e50: 50 50 00 02 bgeu r2,r16,8008e58 <_Heap_Allocate_aligned_with_boundary+0xb4> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count;
8008e54: 59 f0 00 44 sw (r15+68),r16
} return (void *) alloc_begin; }
8008e58: 2b 9d 00 04 lw ra,(sp+4) 8008e5c: 2b 8b 00 44 lw r11,(sp+68) 8008e60: 2b 8c 00 40 lw r12,(sp+64) 8008e64: 2b 8d 00 3c lw r13,(sp+60) 8008e68: 2b 8e 00 38 lw r14,(sp+56) 8008e6c: 2b 8f 00 34 lw r15,(sp+52) 8008e70: 2b 90 00 30 lw r16,(sp+48) 8008e74: 2b 91 00 2c lw r17,(sp+44) 8008e78: 2b 92 00 28 lw r18,(sp+40) 8008e7c: 2b 93 00 24 lw r19,(sp+36) 8008e80: 2b 94 00 20 lw r20,(sp+32) 8008e84: 2b 95 00 1c lw r21,(sp+28) 8008e88: 2b 96 00 18 lw r22,(sp+24) 8008e8c: 2b 97 00 14 lw r23,(sp+20) 8008e90: 2b 98 00 10 lw r24,(sp+16) 8008e94: 2b 99 00 0c lw r25,(sp+12) 8008e98: 2b 9b 00 08 lw fp,(sp+8) 8008e9c: 37 9c 00 44 addi sp,sp,68 8008ea0: 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;
8008ea4: 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;
8008ea8: 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;
8008eac: 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;
8008eb0: 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;
8008eb4: 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);
8008eb8: b9 80 08 00 mv r1,r12 8008ebc: ba 20 10 00 mv r2,r17 8008ec0: b4 6e 70 00 add r14,r3,r14 8008ec4: f8 00 43 c4 calli 8019dd4 <__umodsi3> 8008ec8: 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;
8008ecc: 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 ) { 8008ed0: 51 cc 00 05 bgeu r14,r12,8008ee4 <_Heap_Allocate_aligned_with_boundary+0x140> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment);
8008ed4: b9 c0 08 00 mv r1,r14 8008ed8: ba 20 10 00 mv r2,r17 8008edc: f8 00 43 be calli 8019dd4 <__umodsi3> 8008ee0: c9 c1 60 00 sub r12,r14,r1
} alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 8008ee4: 46 40 00 1c be r18,r0,8008f54 <_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;
8008ee8: b5 8d 70 00 add r14,r12,r13 8008eec: b9 c0 08 00 mv r1,r14 8008ef0: ba 40 10 00 mv r2,r18 8008ef4: f8 00 43 b8 calli 8019dd4 <__umodsi3> 8008ef8: 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 ) {
8008efc: f5 c5 70 00 cmpgu r14,r14,r5 8008f00: f4 ac 08 00 cmpgu r1,r5,r12 8008f04: a1 c1 70 00 and r14,r14,r1
8008f08: 45 c0 00 13 be r14,r0,8008f54 <_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;
8008f0c: 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 ) { 8008f10: 56 85 ff cc bgu r20,r5,8008e40 <_Heap_Allocate_aligned_with_boundary+0x9c>
8008f14: e0 00 00 02 bi 8008f1c <_Heap_Allocate_aligned_with_boundary+0x178>
8008f18: 56 85 ff ca bgu r20,r5,8008e40 <_Heap_Allocate_aligned_with_boundary+0x9c><== NEVER TAKEN
return 0; } alloc_begin = boundary_line - alloc_size;
8008f1c: c8 ad 60 00 sub r12,r5,r13 8008f20: ba 20 10 00 mv r2,r17 8008f24: b9 80 08 00 mv r1,r12 8008f28: f8 00 43 ab calli 8019dd4 <__umodsi3> 8008f2c: c9 81 60 00 sub r12,r12,r1
alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size;
8008f30: b5 8d 70 00 add r14,r12,r13 8008f34: b9 c0 08 00 mv r1,r14 8008f38: ba 40 10 00 mv r2,r18 8008f3c: f8 00 43 a6 calli 8019dd4 <__umodsi3> 8008f40: 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 ) {
8008f44: f5 c5 70 00 cmpgu r14,r14,r5 8008f48: f4 ac 08 00 cmpgu r1,r5,r12 8008f4c: a1 c1 70 00 and r14,r14,r1
8008f50: 5d c0 ff f2 bne r14,r0,8008f18 <_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 ) { 8008f54: 56 ec ff bb bgu r23,r12,8008e40 <_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;
8008f58: 34 01 ff f8 mvi r1,-8 8008f5c: c8 2b 70 00 sub r14,r1,r11 8008f60: ba a0 10 00 mv r2,r21 8008f64: b9 80 08 00 mv r1,r12 8008f68: b5 cc 70 00 add r14,r14,r12 8008f6c: f8 00 43 9a calli 8019dd4 <__umodsi3> 8008f70: c9 c1 08 00 sub r1,r14,r1
if ( free_size >= min_block_size || free_size == 0 ) {
8008f74: f0 36 b0 00 cmpgeu r22,r1,r22 8008f78: 64 21 00 00 cmpei r1,r1,0 8008f7c: b8 36 08 00 or r1,r1,r22
8008f80: 44 20 ff b0 be r1,r0,8008e40 <_Heap_Allocate_aligned_with_boundary+0x9c> boundary ); } } if ( alloc_begin != 0 ) {
8008f84: 45 80 ff af be r12,r0,8008e40 <_Heap_Allocate_aligned_with_boundary+0x9c><== NEVER TAKEN
block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count;
8008f88: 29 e1 00 4c lw r1,(r15+76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
8008f8c: b9 60 10 00 mv r2,r11 8008f90: b9 a0 20 00 mv r4,r13
block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count;
8008f94: b4 30 08 00 add r1,r1,r16 8008f98: 59 e1 00 4c sw (r15+76),r1
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
8008f9c: b9 80 18 00 mv r3,r12 8008fa0: b9 e0 08 00 mv r1,r15 8008fa4: fb ff e9 74 calli 8003574 <_Heap_Block_allocate> 8008fa8: b9 80 08 00 mv r1,r12 8008fac: e3 ff ff a8 bi 8008e4c <_Heap_Allocate_aligned_with_boundary+0xa8>
); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count;
8008fb0: 34 01 00 00 mvi r1,0 8008fb4: e3 ff ff a9 bi 8008e58 <_Heap_Allocate_aligned_with_boundary+0xb4>
/* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 8008fb8: 54 44 ff fe bgu r2,r4,8008fb0 <_Heap_Allocate_aligned_with_boundary+0x20c> return NULL; } if ( alignment == 0 ) { 8008fbc: 5c 60 ff 95 bne r3,r0,8008e10 <_Heap_Allocate_aligned_with_boundary+0x6c>
8008fc0: ba a0 88 00 mv r17,r21 8008fc4: e3 ff ff 93 bi 8008e10 <_Heap_Allocate_aligned_with_boundary+0x6c>
0800f0e0 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) {
800f0e0: 37 9c ff e8 addi sp,sp,-24 800f0e4: 5b 8b 00 14 sw (sp+20),r11 800f0e8: 5b 8c 00 10 sw (sp+16),r12 800f0ec: 5b 8d 00 0c sw (sp+12),r13 800f0f0: 5b 8e 00 08 sw (sp+8),r14 800f0f4: 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;
800f0f8: 28 2c 00 18 lw r12,(r1+24)
uintptr_t const heap_area_end = heap->area_end;
800f0fc: 28 25 00 1c lw r5,(r1+28)
Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) {
800f100: 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;
800f104: 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 ) {
800f108: 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;
800f10c: 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;
800f110: a0 2c 60 00 and r12,r1,r12 800f114: 34 01 00 01 mvi r1,1
800f118: 5d 80 00 03 bne r12,r0,800f124 <_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 ) {
800f11c: 34 01 00 02 mvi r1,2
800f120: 44 45 00 08 be r2,r5,800f140 <_Heap_Extend+0x60> _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; }
800f124: 2b 9d 00 04 lw ra,(sp+4) 800f128: 2b 8b 00 14 lw r11,(sp+20) 800f12c: 2b 8c 00 10 lw r12,(sp+16) 800f130: 2b 8d 00 0c lw r13,(sp+12) 800f134: 2b 8e 00 08 lw r14,(sp+8) 800f138: 37 9c 00 18 addi sp,sp,24 800f13c: 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;
800f140: 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
800f144: 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);
800f148: 29 62 00 10 lw r2,(r11+16) 800f14c: 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;
800f150: 59 63 00 1c sw (r11+28),r3 800f154: b9 c0 08 00 mv r1,r14 800f158: 5b 84 00 18 sw (sp+24),r4 800f15c: fb ff d5 02 calli 8004564 <__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;
800f160: 2b 84 00 18 lw r4,(sp+24) 800f164: c9 c1 08 00 sub r1,r14,r1 800f168: 58 81 00 00 sw (r4+0),r1
if( extend_size >= heap->min_block_size ) {
800f16c: 29 62 00 14 lw r2,(r11+20)
800f170: 50 22 00 09 bgeu r1,r2,800f194 <_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 ));
800f174: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
} return HEAP_EXTEND_SUCCESSFUL; }
800f178: 2b 9d 00 04 lw ra,(sp+4) 800f17c: 2b 8b 00 14 lw r11,(sp+20) 800f180: 2b 8c 00 10 lw r12,(sp+16) 800f184: 2b 8d 00 0c lw r13,(sp+12) 800f188: 2b 8e 00 08 lw r14,(sp+8) 800f18c: 37 9c 00 18 addi sp,sp,24 800f190: 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;
800f194: 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 =
800f198: 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);
800f19c: 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;
800f1a0: 20 84 00 01 andi r4,r4,0x1 800f1a4: b8 24 20 00 or r4,r1,r4 800f1a8: c8 62 18 00 sub r3,r3,r2 800f1ac: 59 a4 00 04 sw (r13+4),r4 800f1b0: 38 63 00 01 ori r3,r3,0x1 800f1b4: 58 43 00 04 sw (r2+4),r3
| HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size;
800f1b8: 29 65 00 2c lw r5,(r11+44)
++stats->used_blocks;
800f1bc: 29 64 00 40 lw r4,(r11+64)
--stats->frees; /* Do not count subsequent call as actual free() */
800f1c0: 29 63 00 50 lw r3,(r11+80)
| HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size;
800f1c4: b4 a1 08 00 add r1,r5,r1
++stats->used_blocks;
800f1c8: 34 84 00 01 addi r4,r4,1
--stats->frees; /* Do not count subsequent call as actual free() */
800f1cc: 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;
800f1d0: 59 62 00 24 sw (r11+36),r2
/* Statistics */ stats->size += extend_size;
800f1d4: 59 61 00 2c sw (r11+44),r1
++stats->used_blocks;
800f1d8: 59 64 00 40 sw (r11+64),r4
--stats->frees; /* Do not count subsequent call as actual free() */
800f1dc: 59 63 00 50 sw (r11+80),r3
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
800f1e0: b9 60 08 00 mv r1,r11 800f1e4: 35 a2 00 08 addi r2,r13,8 800f1e8: fb ff e5 c2 calli 80088f0 <_Heap_Free> 800f1ec: b9 80 08 00 mv r1,r12 800f1f0: e3 ff ff e2 bi 800f178 <_Heap_Extend+0x98>
08008fc8 <_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 ) {
8008fc8: 37 9c ff f4 addi sp,sp,-12 8008fcc: 5b 8b 00 0c sw (sp+12),r11 8008fd0: 5b 8c 00 08 sw (sp+8),r12 8008fd4: 5b 9d 00 04 sw (sp+4),ra 8008fd8: 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 )
8008fdc: 28 22 00 10 lw r2,(r1+16) 8008fe0: b8 20 58 00 mv r11,r1 8008fe4: b8 60 08 00 mv r1,r3 8008fe8: 34 6c ff f8 addi r12,r3,-8 8008fec: f8 00 43 7a calli 8019dd4 <__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;
8008ff0: 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 )
8008ff4: 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 8008ff8: 54 81 00 2b bgu r4,r1,80090a4 <_Heap_Free+0xdc> && (uintptr_t) block <= (uintptr_t) heap->last_block;
8008ffc: 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 8009000: 54 23 00 29 bgu r1,r3,80090a4 <_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;
8009004: 28 28 00 04 lw r8,(r1+4) 8009008: 34 06 ff fe mvi r6,-2 800900c: 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);
8009010: 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
8009014: 54 82 00 24 bgu r4,r2,80090a4 <_Heap_Free+0xdc> <== NEVER TAKEN 8009018: 54 43 00 23 bgu r2,r3,80090a4 <_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;
800901c: 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 ) ) {
8009020: 20 e9 00 01 andi r9,r7,0x1
8009024: 45 20 00 20 be r9,r0,80090a4 <_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;
8009028: 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
800902c: 34 06 00 00 mvi r6,0
8009030: 44 62 00 05 be r3,r2,8009044 <_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 )
8009034: b4 47 30 00 add r6,r2,r7 8009038: 28 c6 00 04 lw r6,(r6+4) 800903c: 20 c6 00 01 andi r6,r6,0x1 8009040: 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 ) ) {
8009044: 21 08 00 01 andi r8,r8,0x1
8009048: 5d 00 00 1d bne r8,r0,80090bc <_Heap_Free+0xf4> uintptr_t const prev_size = block->prev_size;
800904c: 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);
8009050: 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
8009054: 54 81 00 14 bgu r4,r1,80090a4 <_Heap_Free+0xdc> <== NEVER TAKEN 8009058: 54 23 00 13 bgu r1,r3,80090a4 <_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) ) {
800905c: 28 23 00 04 lw r3,(r1+4) 8009060: 20 63 00 01 andi r3,r3,0x1
8009064: 44 60 00 10 be r3,r0,80090a4 <_Heap_Free+0xdc> <== NEVER TAKEN
_HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 8009068: 44 c0 00 43 be r6,r0,8009174 <_Heap_Free+0x1ac> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1;
800906c: 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;
8009070: 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;
8009074: 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;
8009078: 28 42 00 08 lw r2,(r2+8) 800907c: b4 e8 40 00 add r8,r7,r8
_Heap_Free_list_remove( next_block ); stats->free_blocks -= 1;
8009080: 34 84 ff ff addi r4,r4,-1 8009084: 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;
8009088: 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;
800908c: 39 04 00 01 ori r4,r8,0x1
Heap_Block *prev = block->prev; prev->next = next; next->prev = prev;
8009090: 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;
8009094: 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;
8009098: 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;
800909c: 58 62 00 08 sw (r3+8),r2 80090a0: e0 00 00 13 bi 80090ec <_Heap_Free+0x124>
/* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true );
80090a4: 34 01 00 00 mvi r1,0
}
80090a8: 2b 9d 00 04 lw ra,(sp+4) 80090ac: 2b 8b 00 0c lw r11,(sp+12) 80090b0: 2b 8c 00 08 lw r12,(sp+8) 80090b4: 37 9c 00 0c addi sp,sp,12 80090b8: 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 */ 80090bc: 44 c0 00 1b be r6,r0,8009128 <_Heap_Free+0x160> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev;
80090c0: 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;
80090c4: 28 42 00 08 lw r2,(r2+8)
uintptr_t const size = block_size + next_block_size;
80090c8: b4 e5 38 00 add r7,r7,r5
Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev;
80090cc: 58 23 00 0c sw (r1+12),r3
) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next;
80090d0: 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;
80090d4: 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;
80090d8: 38 e4 00 01 ori r4,r7,0x1
next_block = _Heap_Block_at( block, size ); next_block->prev_size = size;
80090dc: 58 c7 00 00 sw (r6+0),r7
new_block->prev = prev; next->prev = new_block;
80090e0: 58 41 00 0c sw (r2+12),r1
prev->next = new_block;
80090e4: 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;
80090e8: 58 24 00 04 sw (r1+4),r4
} } /* Statistics */ --stats->used_blocks; ++stats->frees;
80090ec: 29 61 00 50 lw r1,(r11+80)
stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks;
80090f0: 29 62 00 40 lw r2,(r11+64)
++stats->frees; stats->free_size += block_size;
80090f4: 29 63 00 30 lw r3,(r11+48)
} } /* Statistics */ --stats->used_blocks; ++stats->frees;
80090f8: 34 21 00 01 addi r1,r1,1
stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks;
80090fc: 34 42 ff ff addi r2,r2,-1
++stats->frees; stats->free_size += block_size;
8009100: b4 65 28 00 add r5,r3,r5
} } /* Statistics */ --stats->used_blocks; ++stats->frees;
8009104: 59 61 00 50 sw (r11+80),r1
stats->free_size += block_size;
8009108: 34 01 00 01 mvi r1,1 800910c: 59 65 00 30 sw (r11+48),r5
stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks;
8009110: 59 62 00 40 sw (r11+64),r2
++stats->frees; stats->free_size += block_size; return( true ); }
8009114: 2b 9d 00 04 lw ra,(sp+4) 8009118: 2b 8b 00 0c lw r11,(sp+12) 800911c: 2b 8c 00 08 lw r12,(sp+8) 8009120: 37 9c 00 0c addi sp,sp,12 8009124: 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;
8009128: 38 a3 00 01 ori r3,r5,0x1 800912c: 58 23 00 04 sw (r1+4),r3
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
8009130: 28 44 00 04 lw r4,(r2+4) 8009134: 34 03 ff fe mvi r3,-2
next_block->prev_size = block_size;
8009138: 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;
800913c: a0 83 18 00 and r3,r4,r3 8009140: 58 43 00 04 sw (r2+4),r3
next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks;
8009144: 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;
8009148: 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;
800914c: 29 64 00 3c lw r4,(r11+60)
new_block->next = next; new_block->prev = block_before;
8009150: 58 2b 00 0c sw (r1+12),r11
Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next;
8009154: 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;
8009158: 34 42 00 01 addi r2,r2,1
new_block->prev = block_before; block_before->next = new_block; next->prev = new_block;
800915c: 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;
8009160: 59 61 00 08 sw (r11+8),r1 8009164: 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; 8009168: 50 82 ff e1 bgeu r4,r2,80090ec <_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;
800916c: 59 62 00 3c sw (r11+60),r2 8009170: e3 ff ff df bi 80090ec <_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;
8009174: b4 a8 40 00 add r8,r5,r8
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
8009178: 39 03 00 01 ori r3,r8,0x1 800917c: 58 23 00 04 sw (r1+4),r3
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
8009180: 28 43 00 04 lw r3,(r2+4) 8009184: 34 01 ff fe mvi r1,-2
next_block->prev_size = size;
8009188: 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;
800918c: a0 61 08 00 and r1,r3,r1 8009190: 58 41 00 04 sw (r2+4),r1 8009194: e3 ff ff d6 bi 80090ec <_Heap_Free+0x124>
0802dd2c <_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;
802dd2c: 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;
802dd30: 34 07 00 00 mvi r7,0 802dd34: 58 47 00 00 sw (r2+0),r7
info->largest = 0;
802dd38: 58 47 00 04 sw (r2+4),r7
info->total = 0;
802dd3c: 58 47 00 08 sw (r2+8),r7
for(the_block = _Heap_Free_list_first(the_heap);
802dd40: 44 23 00 10 be r1,r3,802dd80 <_Heap_Get_free_information+0x54><== NEVER TAKEN
802dd44: 34 05 00 01 mvi r5,1 802dd48: b8 e0 30 00 mv r6,r7
- 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;
802dd4c: 34 09 ff fe mvi r9,-2 802dd50: 28 64 00 04 lw r4,(r3+4)
the_block != tail; the_block = the_block->next)
802dd54: b8 a0 40 00 mv r8,r5 802dd58: 34 a5 00 01 addi r5,r5,1 802dd5c: a0 89 20 00 and r4,r4,r9
/* 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;
802dd60: b4 c4 30 00 add r6,r6,r4
802dd64: 50 e4 00 02 bgeu r7,r4,802dd6c <_Heap_Get_free_information+0x40>
802dd68: b8 80 38 00 mv r7,r4
info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next)
802dd6c: 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); 802dd70: 5c 23 ff f8 bne r1,r3,802dd50 <_Heap_Get_free_information+0x24>
802dd74: 58 47 00 04 sw (r2+4),r7 802dd78: 58 48 00 00 sw (r2+0),r8 802dd7c: 58 46 00 08 sw (r2+8),r6 802dd80: c3 a0 00 00 ret
08041310 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) {
8041310: 37 9c ff f8 addi sp,sp,-8 8041314: 5b 8b 00 08 sw (sp+8),r11 8041318: 5b 8c 00 04 sw (sp+4),r12
Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block;
804131c: 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;
8041320: 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;
8041324: 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;
8041328: 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;
804132c: 58 41 00 00 sw (r2+0),r1
the_info->Free.total = 0;
8041330: 58 41 00 08 sw (r2+8),r1
the_info->Free.largest = 0;
8041334: 58 41 00 04 sw (r2+4),r1
the_info->Used.number = 0;
8041338: 58 41 00 0c sw (r2+12),r1
the_info->Used.total = 0;
804133c: 58 41 00 14 sw (r2+20),r1
the_info->Used.largest = 0; while ( the_block != end ) {
8041340: 34 01 00 08 mvi r1,8
8041344: 44 c9 00 18 be r6,r9,80413a4 <_Heap_Get_information+0x94> <== NEVER TAKEN
8041348: 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;
804134c: 34 4b 00 0c addi r11,r2,12
- 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;
8041350: 34 0a ff fe mvi r10,-2 8041354: 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);
8041358: 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;
804135c: 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) )
8041360: 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;
8041364: 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) )
8041368: 20 a7 00 01 andi r7,r5,0x1
804136c: 5c e0 00 02 bne r7,r0,8041374 <_Heap_Get_information+0x64>
8041370: b8 40 08 00 mv r1,r2
info = &the_info->Used; else info = &the_info->Free; info->number++;
8041374: 28 28 00 00 lw r8,(r1+0)
info->total += the_size;
8041378: 28 27 00 08 lw r7,(r1+8)
if ( info->largest < the_size )
804137c: 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++;
8041380: 35 08 00 01 addi r8,r8,1
info->total += the_size;
8041384: 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++;
8041388: 58 28 00 00 sw (r1+0),r8
info->total += the_size;
804138c: 58 27 00 08 sw (r1+8),r7
if ( info->largest < the_size ) 8041390: 51 83 00 02 bgeu r12,r3,8041398 <_Heap_Get_information+0x88> info->largest = the_size;
8041394: 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 ) { 8041398: 5d 24 ff ef bne r9,r4,8041354 <_Heap_Get_information+0x44>
804139c: 28 41 00 14 lw r1,(r2+20) 80413a0: 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;
80413a4: 58 41 00 14 sw (r2+20),r1
}
80413a8: 2b 8b 00 08 lw r11,(sp+8) 80413ac: 2b 8c 00 04 lw r12,(sp+4) 80413b0: 37 9c 00 08 addi sp,sp,8 80413b4: c3 a0 00 00 ret
0801a9fc <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) {
801a9fc: 37 9c ff f0 addi sp,sp,-16 801aa00: 5b 8b 00 10 sw (sp+16),r11 801aa04: 5b 8c 00 0c sw (sp+12),r12 801aa08: 5b 8d 00 08 sw (sp+8),r13 801aa0c: 5b 9d 00 04 sw (sp+4),ra 801aa10: 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 )
801aa14: 28 22 00 10 lw r2,(r1+16) 801aa18: b8 20 58 00 mv r11,r1 801aa1c: b9 80 08 00 mv r1,r12 801aa20: b8 60 68 00 mv r13,r3 801aa24: fb ff fc ec calli 8019dd4 <__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;
801aa28: 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 )
801aa2c: 35 84 ff f8 addi r4,r12,-8 801aa30: 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 801aa34: 54 44 00 16 bgu r2,r4,801aa8c <_Heap_Size_of_alloc_area+0x90> && (uintptr_t) block <= (uintptr_t) heap->last_block;
801aa38: 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
801aa3c: 54 81 00 14 bgu r4,r1,801aa8c <_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);
801aa40: 28 85 00 04 lw r5,(r4+4) 801aa44: 34 03 ff fe mvi r3,-2 801aa48: a0 a3 18 00 and r3,r5,r3 801aa4c: 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
801aa50: 54 44 00 0f bgu r2,r4,801aa8c <_Heap_Size_of_alloc_area+0x90><== NEVER TAKEN 801aa54: 54 81 00 0e bgu r4,r1,801aa8c <_Heap_Size_of_alloc_area+0x90><== NEVER TAKEN
} block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if (
801aa58: 28 81 00 04 lw r1,(r4+4) 801aa5c: 20 21 00 01 andi r1,r1,0x1
801aa60: 44 20 00 0b be r1,r0,801aa8c <_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;
801aa64: c8 8c 20 00 sub r4,r4,r12 801aa68: 34 84 00 04 addi r4,r4,4 801aa6c: 34 01 00 01 mvi r1,1 801aa70: 59 a4 00 00 sw (r13+0),r4
return true; }
801aa74: 2b 9d 00 04 lw ra,(sp+4) 801aa78: 2b 8b 00 10 lw r11,(sp+16) 801aa7c: 2b 8c 00 0c lw r12,(sp+12) 801aa80: 2b 8d 00 08 lw r13,(sp+8) 801aa84: 37 9c 00 10 addi sp,sp,16 801aa88: c3 a0 00 00 ret
return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true;
801aa8c: 34 01 00 00 mvi r1,0
}
801aa90: 2b 9d 00 04 lw ra,(sp+4) 801aa94: 2b 8b 00 10 lw r11,(sp+16) 801aa98: 2b 8c 00 0c lw r12,(sp+12) 801aa9c: 2b 8d 00 08 lw r13,(sp+8) 801aaa0: 37 9c 00 10 addi sp,sp,16 801aaa4: 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 08 ori r3,r3,0xfa08 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 08 ori r3,r3,0xfa08 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 c2 f4 ori r3,r3,0xc2f4 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 4c ori r1,r1,0xc64c 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 34 ori r1,r1,0xc634
- 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 c6 bc ori r21,r21,0xc6bc
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 40 ori r24,r24,0xc640
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 28 ori r23,r23,0xc628
"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 28 ori r3,r3,0xc528 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 c5 c8 ori r3,r3,0xc5c8 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 44 ori r3,r3,0xc444 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 c5 f4 ori r3,r3,0xc5f4 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 58 ori r3,r3,0xc658 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 84 ori r3,r3,0xc684 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 40 ori r3,r3,0xc540 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 c6 f0 ori r3,r3,0xc6f0 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 c6 c0 ori r3,r3,0xc6c0 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 88 ori r3,r3,0xc388 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 9c ori r3,r3,0xc39c 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 c3 bc ori r3,r3,0xc3bc 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 68 ori r3,r3,0xc568 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 98 ori r3,r3,0xc598 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 c3 e0 ori r3,r3,0xc3e0 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 14 ori r3,r3,0xc414 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 70 ori r3,r3,0xc470 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 c4 a8 ori r3,r3,0xc4a8 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 88 ori r3,r3,0xc488 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 c4 f4 ori r3,r3,0xc4f4 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 c4 d8 ori r3,r3,0xc4d8 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 ca 64 ori r12,r12,0xca64 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 d7 calli 8008920 <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 c0 c4 ori r1,r1,0xc0c4
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 2e calli 8005ee8 <_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 ca 68 ori r14,r14,0xca68
_Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers;
8002a40: 38 84 ca 64 ori r4,r4,0xca64
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 70 calli 800c814 <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 ca 68 ori r2,r2,0xca68
_IO_Number_of_drivers = number_of_drivers;
8002ad8: 38 21 ca 64 ori r1,r1,0xca64
* 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 c9 78 ori r3,r3,0xc978
_ISR_Nest_level = 0;
8003758: 38 42 c8 bc ori r2,r2,0xc8bc
* 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 df calli 8005ee8 <_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 c0 bc ori r2,r2,0xc0bc 800377c: 39 6b c0 c4 ori r11,r11,0xc0c4 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 c8 a0 ori r2,r2,0xc8a0 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 cf calli 8005ee8 <_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 c8 34 ori r2,r2,0xc834
Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset(
80037c4: 38 63 c7 b8 ori r3,r3,0xc7b8 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 6d calli 80089e8 <_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 4c calli 8019d94 <__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 4b calli 80089e8 <_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 1c calli 8019d94 <__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 8d calli 8019b98 <__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 5e calli 8005ee8 <_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 62 calli 8005f24 <_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 2c calli 8005f50 <_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 d5 calli 8008a2c <_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 b2 calli 80089e8 <_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 e5 calli 8005f24 <_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 b8 calli 800c69c <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 b4 calli 800c69c <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 ac calli 800c69c <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 d0 calli 8005f50 <_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 15 calli 8009198 <_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 c7 bc ori r12,r12,0xc7bc 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>
08014184 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) {
8014184: 37 9c ff dc addi sp,sp,-36 8014188: 5b 8b 00 18 sw (sp+24),r11 801418c: 5b 8c 00 14 sw (sp+20),r12 8014190: 5b 8d 00 10 sw (sp+16),r13 8014194: 5b 8e 00 0c sw (sp+12),r14 8014198: 5b 8f 00 08 sw (sp+8),r15 801419c: 5b 9d 00 04 sw (sp+4),ra 80141a0: b8 40 60 00 mv r12,r2 80141a4: b8 60 58 00 mv r11,r3
char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 80141a8: 5c 40 00 0b bne r2,r0,80141d4 <_Objects_Get_name_as_string+0x50> } } *d = '\0'; _Thread_Enable_dispatch(); return name;
80141ac: 34 0b 00 00 mvi r11,0
} return NULL; /* unreachable path */ }
80141b0: b9 60 08 00 mv r1,r11 80141b4: 2b 9d 00 04 lw ra,(sp+4) 80141b8: 2b 8b 00 18 lw r11,(sp+24) 80141bc: 2b 8c 00 14 lw r12,(sp+20) 80141c0: 2b 8d 00 10 lw r13,(sp+16) 80141c4: 2b 8e 00 0c lw r14,(sp+12) 80141c8: 2b 8f 00 08 lw r15,(sp+8) 80141cc: 37 9c 00 24 addi sp,sp,36 80141d0: c3 a0 00 00 ret
Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 80141d4: 44 60 ff f7 be r3,r0,80141b0 <_Objects_Get_name_as_string+0x2c> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
80141d8: b8 20 68 00 mv r13,r1
80141dc: 5c 20 00 05 bne r1,r0,80141f0 <_Objects_Get_name_as_string+0x6c>
80141e0: 78 01 08 03 mvhi r1,0x803 80141e4: 38 21 12 00 ori r1,r1,0x1200 80141e8: 28 21 00 00 lw r1,(r1+0) 80141ec: 28 2d 00 08 lw r13,(r1+8)
information = _Objects_Get_information_id( tmpId );
80141f0: b9 a0 08 00 mv r1,r13 80141f4: fb ff db b4 calli 800b0c4 <_Objects_Get_information_id>
if ( !information ) 80141f8: 44 20 ff ed be r1,r0,80141ac <_Objects_Get_name_as_string+0x28> return NULL; the_object = _Objects_Get( information, tmpId, &location );
80141fc: b9 a0 10 00 mv r2,r13 8014200: 37 83 00 24 addi r3,sp,36 8014204: fb ff dc 15 calli 800b258 <_Objects_Get>
switch ( location ) {
8014208: 2b 8e 00 24 lw r14,(sp+36)
801420c: 5d c0 ff e8 bne r14,r0,80141ac <_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;
8014210: 28 2f 00 0c lw r15,(r1+12)
lname[ 0 ] = (u32_name >> 24) & 0xff;
8014214: 34 02 00 18 mvi r2,24
s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
8014218: 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;
801421c: b9 e0 08 00 mv r1,r15 8014220: fb ff b1 88 calli 8000840 <__lshrsi3> 8014224: 20 2d 00 ff andi r13,r1,0xff
lname[ 1 ] = (u32_name >> 16) & 0xff;
8014228: 34 02 00 10 mvi r2,16 801422c: 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;
8014230: 33 8d 00 1c sb (sp+28),r13
lname[ 1 ] = (u32_name >> 16) & 0xff;
8014234: fb ff b1 83 calli 8000840 <__lshrsi3> 8014238: 33 81 00 1d sb (sp+29),r1
lname[ 2 ] = (u32_name >> 8) & 0xff;
801423c: 34 02 00 08 mvi r2,8 8014240: b9 e0 08 00 mv r1,r15 8014244: fb ff b1 7f calli 8000840 <__lshrsi3> 8014248: 33 81 00 1e sb (sp+30),r1
lname[ 3 ] = (u32_name >> 0) & 0xff;
801424c: 33 8f 00 1f sb (sp+31),r15
lname[ 4 ] = '\0';
8014250: 33 8e 00 20 sb (sp+32),r14
s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
8014254: 45 8e 00 18 be r12,r14,80142b4 <_Objects_Get_name_as_string+0x130><== NEVER TAKEN
8014258: 45 a0 00 17 be r13,r0,80142b4 <_Objects_Get_name_as_string+0x130>
801425c: 78 03 08 03 mvhi r3,0x803 8014260: b9 c0 08 00 mv r1,r14 8014264: 38 63 03 6c ori r3,r3,0x36c 8014268: b9 60 10 00 mv r2,r11 801426c: 37 86 00 1c addi r6,sp,28
*d = (isprint((unsigned char)*s)) ? *s : '*';
8014270: 28 64 00 00 lw r4,(r3+0)
s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
8014274: 34 21 00 01 addi r1,r1,1 8014278: b4 c1 28 00 add r5,r6,r1
*d = (isprint((unsigned char)*s)) ? *s : '*';
801427c: b4 8d 20 00 add r4,r4,r13 8014280: 40 84 00 01 lbu r4,(r4+1) 8014284: 20 84 00 97 andi r4,r4,0x97
8014288: 5c 80 00 02 bne r4,r0,8014290 <_Objects_Get_name_as_string+0x10c>
801428c: 34 0d 00 2a mvi r13,42 8014290: 30 4d 00 00 sb (r2+0),r13
s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
8014294: 34 42 00 01 addi r2,r2,1
8014298: 50 2c 00 03 bgeu r1,r12,80142a4 <_Objects_Get_name_as_string+0x120>
801429c: 40 ad 00 00 lbu r13,(r5+0)
80142a0: 5d a0 ff f4 bne r13,r0,8014270 <_Objects_Get_name_as_string+0xec> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0';
80142a4: 34 01 00 00 mvi r1,0 80142a8: 30 41 00 00 sb (r2+0),r1
_Thread_Enable_dispatch();
80142ac: fb ff df 2d calli 800bf60 <_Thread_Enable_dispatch>
return name;
80142b0: e3 ff ff c0 bi 80141b0 <_Objects_Get_name_as_string+0x2c>
s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
80142b4: b9 60 10 00 mv r2,r11 80142b8: e3 ff ff fb bi 80142a4 <_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
0800b30c <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) {
800b30c: 37 9c ff ec addi sp,sp,-20 800b310: 5b 8b 00 10 sw (sp+16),r11 800b314: 5b 8c 00 0c sw (sp+12),r12 800b318: 5b 8d 00 08 sw (sp+8),r13 800b31c: 5b 9d 00 04 sw (sp+4),ra 800b320: b8 40 68 00 mv r13,r2
/* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
800b324: b8 20 58 00 mv r11,r1
800b328: 5c 20 00 05 bne r1,r0,800b33c <_Objects_Id_to_name+0x30>
800b32c: 78 01 08 03 mvhi r1,0x803 800b330: 38 21 12 00 ori r1,r1,0x1200 800b334: 28 21 00 00 lw r1,(r1+0) 800b338: 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);
800b33c: b9 60 08 00 mv r1,r11 800b340: 34 02 00 18 mvi r2,24 800b344: fb ff d5 3f calli 8000840 <__lshrsi3> 800b348: 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 )
800b34c: 34 24 ff ff addi r4,r1,-1 800b350: 34 03 00 03 mvi r3,3
800b354: 54 83 00 1e bgu r4,r3,800b3cc <_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 ] )
800b358: 78 0c 08 03 mvhi r12,0x803 800b35c: 34 02 00 02 mvi r2,2 800b360: 39 8c 10 dc ori r12,r12,0x10dc 800b364: fb ff d5 0f calli 80007a0 <__ashlsi3> 800b368: b5 81 08 00 add r1,r12,r1 800b36c: 28 2c 00 00 lw r12,(r1+0)
800b370: 45 80 00 17 be r12,r0,800b3cc <_Objects_Id_to_name+0xc0> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ];
800b374: 34 02 00 1b mvi r2,27 800b378: b9 60 08 00 mv r1,r11 800b37c: fb ff d5 31 calli 8000840 <__lshrsi3> 800b380: 34 02 00 02 mvi r2,2 800b384: fb ff d5 07 calli 80007a0 <__ashlsi3> 800b388: b5 81 08 00 add r1,r12,r1 800b38c: 28 21 00 00 lw r1,(r1+0)
if ( !information )
800b390: 44 20 00 0f be r1,r0,800b3cc <_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 );
800b394: b9 60 10 00 mv r2,r11 800b398: 37 83 00 14 addi r3,sp,20 800b39c: fb ff ff af calli 800b258 <_Objects_Get>
if ( !the_object ) 800b3a0: 44 20 00 0b be r1,r0,800b3cc <_Objects_Id_to_name+0xc0> return OBJECTS_INVALID_ID; *name = the_object->name;
800b3a4: 28 21 00 0c lw r1,(r1+12) 800b3a8: 59 a1 00 00 sw (r13+0),r1
_Thread_Enable_dispatch();
800b3ac: f8 00 02 ed calli 800bf60 <_Thread_Enable_dispatch> 800b3b0: 34 01 00 00 mvi r1,0
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; }
800b3b4: 2b 9d 00 04 lw ra,(sp+4) 800b3b8: 2b 8b 00 10 lw r11,(sp+16) 800b3bc: 2b 8c 00 0c lw r12,(sp+12) 800b3c0: 2b 8d 00 08 lw r13,(sp+8) 800b3c4: 37 9c 00 14 addi sp,sp,20 800b3c8: 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;
800b3cc: 34 01 00 03 mvi r1,3
}
800b3d0: 2b 9d 00 04 lw ra,(sp+4) 800b3d4: 2b 8b 00 10 lw r11,(sp+16) 800b3d8: 2b 8c 00 0c lw r12,(sp+12) 800b3dc: 2b 8d 00 08 lw r13,(sp+8) 800b3e0: 37 9c 00 14 addi sp,sp,20 800b3e4: 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 c7 bc ori r13,r13,0xc7bc 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 c6 20 ori r1,r1,0xc620 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 78 calli 8019d94 <__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 63 calli 80089c0 <_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 c0 calli 8005f50 <_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 c0 8c ori r1,r1,0xc08c 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>
080086cc <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) {
80086cc: 37 9c ff f0 addi sp,sp,-16 80086d0: 5b 8b 00 0c sw (sp+12),r11 80086d4: 5b 8c 00 08 sw (sp+8),r12 80086d8: 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 ];
80086dc: 28 2b 01 24 lw r11,(r1+292)
if ( !api )
80086e0: 45 60 00 1b be r11,r0,800874c <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN
* Signal Processing */ asr = &api->Signal; _ISR_Disable( level );
80086e4: 90 00 10 00 rcsr r2,IE 80086e8: 34 01 ff fe mvi r1,-2 80086ec: a0 41 08 00 and r1,r2,r1 80086f0: d0 01 00 00 wcsr IE,r1
signal_set = asr->signals_posted; asr->signals_posted = 0;
80086f4: 34 01 00 00 mvi r1,0
*/ asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted;
80086f8: 29 6c 00 14 lw r12,(r11+20)
asr->signals_posted = 0;
80086fc: 59 61 00 14 sw (r11+20),r1
_ISR_Enable( level );
8008700: d0 02 00 00 wcsr IE,r2
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
8008704: 45 80 00 12 be r12,r0,800874c <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN
return; asr->nest_level += 1;
8008708: 29 63 00 1c lw r3,(r11+28)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
800870c: 29 61 00 10 lw r1,(r11+16) 8008710: 38 02 ff ff mvu r2,0xffff
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1;
8008714: 34 63 00 01 addi r3,r3,1 8008718: 59 63 00 1c sw (r11+28),r3
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
800871c: 37 83 00 10 addi r3,sp,16 8008720: f8 00 09 ca calli 800ae48 <rtems_task_mode>
(*asr->handler)( signal_set );
8008724: 29 62 00 0c lw r2,(r11+12) 8008728: b9 80 08 00 mv r1,r12 800872c: d8 40 00 00 call r2
asr->nest_level -= 1;
8008730: 29 63 00 1c lw r3,(r11+28)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
8008734: 2b 81 00 10 lw r1,(sp+16) 8008738: 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;
800873c: 34 63 ff ff addi r3,r3,-1 8008740: 59 63 00 1c sw (r11+28),r3
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
8008744: 37 83 00 10 addi r3,sp,16 8008748: f8 00 09 c0 calli 800ae48 <rtems_task_mode>
}
800874c: 2b 9d 00 04 lw ra,(sp+4) 8008750: 2b 8b 00 0c lw r11,(sp+12) 8008754: 2b 8c 00 08 lw r12,(sp+8) 8008758: 37 9c 00 10 addi sp,sp,16 800875c: c3 a0 00 00 ret
08008600 <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables;
8008600: 28 21 01 34 lw r1,(r1+308)
while (tvp) { 8008604: 44 20 00 08 be r1,r0,8008624 <_RTEMS_tasks_Switch_extension+0x24> tvp->tval = *tvp->ptr;
8008608: 28 23 00 04 lw r3,(r1+4) 800860c: 28 64 00 00 lw r4,(r3+0) 8008610: 58 24 00 0c sw (r1+12),r4
*tvp->ptr = tvp->gval;
8008614: 28 24 00 08 lw r4,(r1+8)
tvp = (rtems_task_variable_t *)tvp->next;
8008618: 28 21 00 00 lw r1,(r1+0)
*/ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval;
800861c: 58 64 00 00 sw (r3+0),r4
/* * Per Task Variables */ tvp = executing->task_variables; while (tvp) {
8008620: 5c 20 ff fa bne r1,r0,8008608 <_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;
8008624: 28 41 01 34 lw r1,(r2+308)
while (tvp) { 8008628: 44 20 00 08 be r1,r0,8008648 <_RTEMS_tasks_Switch_extension+0x48> tvp->gval = *tvp->ptr;
800862c: 28 22 00 04 lw r2,(r1+4)
*tvp->ptr = tvp->tval;
8008630: 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;
8008634: 28 43 00 00 lw r3,(r2+0) 8008638: 58 23 00 08 sw (r1+8),r3
*tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next;
800863c: 28 21 00 00 lw r1,(r1+0)
} tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval;
8008640: 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) {
8008644: 5c 20 ff fa bne r1,r0,800862c <_RTEMS_tasks_Switch_extension+0x2c><== NEVER TAKEN
8008648: c3 a0 00 00 ret
08040b6c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) {
8040b6c: 37 9c ff f4 addi sp,sp,-12 8040b70: 5b 8b 00 08 sw (sp+8),r11 8040b74: 5b 9d 00 04 sw (sp+4),ra 8040b78: b8 20 10 00 mv r2,r1 8040b7c: 78 01 08 07 mvhi r1,0x807 8040b80: 38 21 54 9c ori r1,r1,0x549c 8040b84: 37 83 00 0c addi r3,sp,12 8040b88: fb ff 28 94 calli 800add8 <_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 ) {
8040b8c: 2b 82 00 0c lw r2,(sp+12) 8040b90: b8 20 58 00 mv r11,r1
8040b94: 44 40 00 05 be r2,r0,8040ba8 <_Rate_monotonic_Timeout+0x3c><== ALWAYS TAKEN
case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } }
8040b98: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8040b9c: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8040ba0: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8040ba4: c3 a0 00 00 ret <== NOT EXECUTED
*/ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner;
8040ba8: 28 21 00 40 lw r1,(r1+64)
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
8040bac: 28 23 00 10 lw r3,(r1+16) 8040bb0: 20 63 40 00 andi r3,r3,0x4000
8040bb4: 44 62 00 04 be r3,r2,8040bc4 <_Rate_monotonic_Timeout+0x58> the_thread->Wait.id == the_period->Object.id ) {
8040bb8: 28 23 00 20 lw r3,(r1+32) 8040bbc: 29 62 00 08 lw r2,(r11+8)
8040bc0: 44 62 00 1a be r3,r2,8040c28 <_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 ) {
8040bc4: 29 62 00 38 lw r2,(r11+56) 8040bc8: 34 01 00 01 mvi r1,1
8040bcc: 44 41 00 0c be r2,r1,8040bfc <_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;
8040bd0: 34 01 00 04 mvi r1,4 8040bd4: 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;
8040bd8: 78 01 08 07 mvhi r1,0x807 8040bdc: 38 21 50 24 ori r1,r1,0x5024 8040be0: 28 22 00 00 lw r2,(r1+0) 8040be4: 34 42 ff ff addi r2,r2,-1 8040be8: 58 22 00 00 sw (r1+0),r2
case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } }
8040bec: 2b 9d 00 04 lw ra,(sp+4) 8040bf0: 2b 8b 00 08 lw r11,(sp+8) 8040bf4: 37 9c 00 0c addi sp,sp,12 8040bf8: 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;
8040bfc: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 8040c00: 59 61 00 38 sw (r11+56),r1 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
8040c04: b9 60 08 00 mv r1,r11 8040c08: fb ff fe a7 calli 80406a4 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
8040c0c: 29 61 00 3c lw r1,(r11+60)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8040c10: 35 62 00 10 addi r2,r11,16
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
8040c14: 59 61 00 1c sw (r11+28),r1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8040c18: 78 01 08 07 mvhi r1,0x807 8040c1c: 38 21 51 00 ori r1,r1,0x5100 8040c20: fb ff 30 81 calli 800ce24 <_Watchdog_Insert> 8040c24: e3 ff ff ed bi 8040bd8 <_Rate_monotonic_Timeout+0x6c>
RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED );
8040c28: 78 02 10 03 mvhi r2,0x1003 8040c2c: 38 42 ff f8 ori r2,r2,0xfff8 8040c30: fb ff b5 51 calli 802e174 <_Thread_Clear_state> 8040c34: e3 ff ff f4 bi 8040c04 <_Rate_monotonic_Timeout+0x98>
08040838 <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) {
8040838: 37 9c ff e0 addi sp,sp,-32 804083c: 5b 8b 00 10 sw (sp+16),r11 8040840: 5b 8c 00 0c sw (sp+12),r12 8040844: 5b 8d 00 08 sw (sp+8),r13 8040848: 5b 9d 00 04 sw (sp+4),ra 804084c: b8 20 58 00 mv r11,r1
/* * Update the counts. */ stats = &the_period->Statistics; stats->count++;
8040850: 28 21 00 54 lw r1,(r1+84)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
8040854: 29 62 00 38 lw r2,(r11+56)
/* * Update the counts. */ stats = &the_period->Statistics; stats->count++;
8040858: 34 21 00 01 addi r1,r1,1 804085c: 59 61 00 54 sw (r11+84),r1
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
8040860: 34 01 00 04 mvi r1,4
8040864: 44 41 00 36 be r2,r1,804093c <_Rate_monotonic_Update_statistics+0x104> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
8040868: 37 8c 00 14 addi r12,sp,20 804086c: 37 8d 00 1c addi r13,sp,28 8040870: b9 60 08 00 mv r1,r11 8040874: b9 80 10 00 mv r2,r12 8040878: b9 a0 18 00 mv r3,r13 804087c: fb ff ff b5 calli 8040750 <_Rate_monotonic_Get_status>
if (!valid_status)
8040880: 5c 20 00 07 bne r1,r0,804089c <_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 }
8040884: 2b 9d 00 04 lw ra,(sp+4) 8040888: 2b 8b 00 10 lw r11,(sp+16) 804088c: 2b 8c 00 0c lw r12,(sp+12) 8040890: 2b 8d 00 08 lw r13,(sp+8) 8040894: 37 9c 00 20 addi sp,sp,32 8040898: c3 a0 00 00 ret
/* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed );
804089c: b9 a0 10 00 mv r2,r13 80408a0: 35 61 00 6c addi r1,r11,108 80408a4: fb ff 30 37 calli 800c980 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
80408a8: b9 a0 08 00 mv r1,r13 80408ac: 35 62 00 5c addi r2,r11,92 80408b0: f8 00 03 1b calli 804151c <_Timespec_Less_than>
80408b4: 44 20 00 05 be r1,r0,80408c8 <_Rate_monotonic_Update_statistics+0x90> stats->min_cpu_time = executed;
80408b8: 2b 81 00 1c lw r1,(sp+28) 80408bc: 59 61 00 5c sw (r11+92),r1 80408c0: 2b 81 00 20 lw r1,(sp+32) 80408c4: 59 61 00 60 sw (r11+96),r1
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
80408c8: b9 a0 08 00 mv r1,r13 80408cc: 35 62 00 64 addi r2,r11,100 80408d0: f8 00 03 07 calli 80414ec <_Timespec_Greater_than>
80408d4: 44 20 00 05 be r1,r0,80408e8 <_Rate_monotonic_Update_statistics+0xb0> stats->max_cpu_time = executed;
80408d8: 2b 81 00 1c lw r1,(sp+28) 80408dc: 59 61 00 64 sw (r11+100),r1 80408e0: 2b 81 00 20 lw r1,(sp+32) 80408e4: 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 );
80408e8: b9 80 10 00 mv r2,r12 80408ec: 35 61 00 84 addi r1,r11,132 80408f0: fb ff 30 24 calli 800c980 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
80408f4: b9 80 08 00 mv r1,r12 80408f8: 35 62 00 74 addi r2,r11,116 80408fc: f8 00 03 08 calli 804151c <_Timespec_Less_than>
8040900: 5c 20 00 13 bne r1,r0,804094c <_Rate_monotonic_Update_statistics+0x114> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
8040904: b9 80 08 00 mv r1,r12 8040908: 35 62 00 7c addi r2,r11,124 804090c: f8 00 02 f8 calli 80414ec <_Timespec_Greater_than>
8040910: 44 20 ff dd be r1,r0,8040884 <_Rate_monotonic_Update_statistics+0x4c> stats->max_wall_time = since_last_period;
8040914: 2b 81 00 18 lw r1,(sp+24) 8040918: 59 61 00 80 sw (r11+128),r1 804091c: 2b 81 00 14 lw r1,(sp+20) 8040920: 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 }
8040924: 2b 9d 00 04 lw ra,(sp+4) 8040928: 2b 8b 00 10 lw r11,(sp+16) 804092c: 2b 8c 00 0c lw r12,(sp+12) 8040930: 2b 8d 00 08 lw r13,(sp+8) 8040934: 37 9c 00 20 addi sp,sp,32 8040938: c3 a0 00 00 ret
*/ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++;
804093c: 29 61 00 58 lw r1,(r11+88) 8040940: 34 21 00 01 addi r1,r1,1 8040944: 59 61 00 58 sw (r11+88),r1 8040948: e3 ff ff c8 bi 8040868 <_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;
804094c: 2b 81 00 14 lw r1,(sp+20) 8040950: 59 61 00 74 sw (r11+116),r1 8040954: 2b 81 00 18 lw r1,(sp+24) 8040958: 59 61 00 78 sw (r11+120),r1 804095c: e3 ff ff ea bi 8040904 <_Rate_monotonic_Update_statistics+0xcc>
08008c74 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) {
8008c74: 37 9c ff e4 addi sp,sp,-28 8008c78: 5b 8b 00 0c sw (sp+12),r11 8008c7c: 5b 8c 00 08 sw (sp+8),r12 8008c80: 5b 9d 00 04 sw (sp+4),ra 8008c84: 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 );
8008c88: 90 00 60 00 rcsr r12,IE 8008c8c: 34 01 ff fe mvi r1,-2 8008c90: a1 81 08 00 and r1,r12,r1 8008c94: d0 01 00 00 wcsr IE,r1
now = _TOD_Now;
8008c98: 78 02 08 01 mvhi r2,0x801 8008c9c: 38 42 c8 b4 ori r2,r2,0xc8b4
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008ca0: 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;
8008ca4: 28 41 00 04 lw r1,(r2+4)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008ca8: 38 63 c9 c4 ori r3,r3,0xc9c4
/* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now;
8008cac: 28 42 00 00 lw r2,(r2+0)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008cb0: 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;
8008cb4: 5b 81 00 14 sw (sp+20),r1 8008cb8: 5b 82 00 10 sw (sp+16),r2
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008cbc: b8 60 20 00 mv r4,r3
8008cc0: 44 60 00 03 be r3,r0,8008ccc <_TOD_Get+0x58> <== ALWAYS TAKEN
nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)();
8008cc4: d8 60 00 00 call r3 <== NOT EXECUTED 8008cc8: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
_ISR_Enable( level );
8008ccc: d0 0c 00 00 wcsr IE,r12
_Timestamp_Set( &offset, 0, nanoseconds );
8008cd0: 34 03 00 00 mvi r3,0
_Timestamp_Add_to( &now, &offset );
8008cd4: 37 81 00 10 addi r1,sp,16 8008cd8: 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 );
8008cdc: 5b 83 00 18 sw (sp+24),r3 8008ce0: 5b 84 00 1c sw (sp+28),r4
_Timestamp_Add_to( &now, &offset );
8008ce4: fb ff f2 7e calli 80056dc <_Timespec_Add_to>
_Timestamp_To_timespec( &now, time );
8008ce8: 2b 81 00 14 lw r1,(sp+20) 8008cec: 59 61 00 04 sw (r11+4),r1 8008cf0: 2b 81 00 10 lw r1,(sp+16) 8008cf4: 59 61 00 00 sw (r11+0),r1
}
8008cf8: 2b 9d 00 04 lw ra,(sp+4) 8008cfc: 2b 8b 00 0c lw r11,(sp+12) 8008d00: 2b 8c 00 08 lw r12,(sp+8) 8008d04: 37 9c 00 1c addi sp,sp,28 8008d08: c3 a0 00 00 ret
08008d0c <_TOD_Get_uptime>: */ void _TOD_Get_uptime( Timestamp_Control *uptime ) {
8008d0c: 37 9c ff e4 addi sp,sp,-28 8008d10: 5b 8b 00 0c sw (sp+12),r11 8008d14: 5b 8c 00 08 sw (sp+8),r12 8008d18: 5b 9d 00 04 sw (sp+4),ra 8008d1c: 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 );
8008d20: 90 00 60 00 rcsr r12,IE 8008d24: 34 01 ff fe mvi r1,-2 8008d28: a1 81 08 00 and r1,r12,r1 8008d2c: d0 01 00 00 wcsr IE,r1
up = _TOD_Uptime;
8008d30: 78 02 08 01 mvhi r2,0x801 8008d34: 38 42 c8 a4 ori r2,r2,0xc8a4
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008d38: 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;
8008d3c: 28 41 00 04 lw r1,(r2+4)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008d40: 38 63 c9 c4 ori r3,r3,0xc9c4
/* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime;
8008d44: 28 42 00 00 lw r2,(r2+0)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008d48: 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;
8008d4c: 5b 81 00 14 sw (sp+20),r1 8008d50: 5b 82 00 10 sw (sp+16),r2
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008d54: b8 60 20 00 mv r4,r3
8008d58: 44 60 00 03 be r3,r0,8008d64 <_TOD_Get_uptime+0x58> <== ALWAYS TAKEN
nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)();
8008d5c: d8 60 00 00 call r3 <== NOT EXECUTED 8008d60: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
_ISR_Enable( level );
8008d64: d0 0c 00 00 wcsr IE,r12
_Timestamp_Set( &offset, 0, nanoseconds );
8008d68: 34 03 00 00 mvi r3,0
_Timestamp_Add_to( &up, &offset );
8008d6c: 37 81 00 10 addi r1,sp,16 8008d70: 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 );
8008d74: 5b 83 00 18 sw (sp+24),r3 8008d78: 5b 84 00 1c sw (sp+28),r4
_Timestamp_Add_to( &up, &offset );
8008d7c: fb ff f2 58 calli 80056dc <_Timespec_Add_to>
*uptime = up;
8008d80: 2b 81 00 14 lw r1,(sp+20) 8008d84: 59 61 00 04 sw (r11+4),r1 8008d88: 2b 81 00 10 lw r1,(sp+16) 8008d8c: 59 61 00 00 sw (r11+0),r1
}
8008d90: 2b 9d 00 04 lw ra,(sp+4) 8008d94: 2b 8b 00 0c lw r11,(sp+12) 8008d98: 2b 8c 00 08 lw r12,(sp+8) 8008d9c: 37 9c 00 1c addi sp,sp,28 8008da0: 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 c0 c4 ori r1,r1,0xc0c4 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 62 calli 8019b98 <__mulsi3>
/* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1;
8003214: 78 03 08 01 mvhi r3,0x801 8003218: 38 63 c9 74 ori r3,r3,0xc974 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 c8 a4 ori r1,r1,0xc8a4 800323c: f8 00 09 28 calli 80056dc <_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 c8 b4 ori r1,r1,0xc8b4 800324c: f8 00 09 24 calli 80056dc <_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 c8 f4 ori r1,r1,0xc8f4 8003268: f8 00 0a e4 calli 8005df8 <_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 0a calli 801eea4 <__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 20 ori r12,r12,0xa20 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 e1 calli 800544c <_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 37 calli 80051b8 <_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 dc calli 80050cc <_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 c8 d4 ori r1,r1,0xc8d4 <== 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 c7 b0 ori r2,r2,0xc7b0 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 94 ori r11,r11,0xb094 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 c9 50 ori r2,r2,0xc950 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 c8 e0 ori r2,r2,0xc8e0
* 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 c8 b0 ori r1,r1,0xc8b0 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 c8 f0 ori r1,r1,0xc8f0 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 c8 d4 ori r1,r1,0xc8d4
* 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 94 ori r11,r11,0xb094 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>
080094f0 <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level );
80094f0: 90 00 18 00 rcsr r3,IE 80094f4: 34 05 ff fe mvi r5,-2 80094f8: a0 65 28 00 and r5,r3,r5 80094fc: d0 05 00 00 wcsr IE,r5
current_state = the_thread->current_state;
8009500: 28 24 00 10 lw r4,(r1+16)
if ( current_state & state ) {
8009504: a0 44 30 00 and r6,r2,r4
8009508: 44 c0 00 2a be r6,r0,80095b0 <_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);
800950c: a4 40 10 00 not r2,r2 8009510: a0 44 20 00 and r4,r2,r4
current_state =
8009514: 58 24 00 10 sw (r1+16),r4
the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 8009518: 5c 80 00 26 bne r4,r0,80095b0 <_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;
800951c: 28 26 00 90 lw r6,(r1+144) 8009520: 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);
8009524: 28 24 00 8c lw r4,(r1+140) 8009528: 2c c8 00 00 lhu r8,(r6+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
800952c: 78 02 08 01 mvhi r2,0x801 8009530: 38 42 c8 d4 ori r2,r2,0xc8d4
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor;
8009534: b9 07 38 00 or r7,r8,r7 8009538: 0c c7 00 00 sh (r6+0),r7
_Priority_Major_bit_map |= the_priority_map->ready_major;
800953c: 2c 47 00 00 lhu r7,(r2+0) 8009540: 2c 28 00 94 lhu r8,(r1+148)
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
8009544: 34 86 00 04 addi r6,r4,4 8009548: 58 26 00 00 sw (r1+0),r6
old_last_node = the_chain->last;
800954c: 28 86 00 08 lw r6,(r4+8) 8009550: b9 07 38 00 or r7,r8,r7
the_chain->last = the_node;
8009554: 58 81 00 08 sw (r4+8),r1 8009558: 20 e4 ff ff andi r4,r7,0xffff 800955c: 0c 44 00 00 sh (r2+0),r4
old_last_node->next = the_node; the_node->previous = old_last_node;
8009560: 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;
8009564: 58 c1 00 00 sw (r6+0),r1
_ISR_Flash( level );
8009568: d0 03 00 00 wcsr IE,r3 800956c: 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 ) {
8009570: 78 02 08 01 mvhi r2,0x801 8009574: 38 42 c8 b0 ori r2,r2,0xc8b0 8009578: 28 44 00 00 lw r4,(r2+0) 800957c: 28 25 00 14 lw r5,(r1+20) 8009580: 28 84 00 14 lw r4,(r4+20)
8009584: 50 a4 00 0b bgeu r5,r4,80095b0 <_Thread_Clear_state+0xc0> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible ||
8009588: 78 04 08 01 mvhi r4,0x801 800958c: 38 84 c8 e0 ori r4,r4,0xc8e0 8009590: 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;
8009594: 58 41 00 00 sw (r2+0),r1
if ( _Thread_Executing->is_preemptible ||
8009598: 40 81 00 75 lbu r1,(r4+117)
800959c: 44 20 00 07 be r1,r0,80095b8 <_Thread_Clear_state+0xc8> the_thread->current_priority == 0 ) _Context_Switch_necessary = true;
80095a0: 78 01 08 01 mvhi r1,0x801 80095a4: 38 21 c8 f0 ori r1,r1,0xc8f0 80095a8: 34 02 00 01 mvi r2,1 80095ac: 30 22 00 00 sb (r1+0),r2
} } } _ISR_Enable( level );
80095b0: d0 03 00 00 wcsr IE,r3
}
80095b4: 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 ||
80095b8: 44 a1 ff fa be r5,r1,80095a0 <_Thread_Clear_state+0xb0> <== NEVER TAKEN
80095bc: e3 ff ff fd bi 80095b0 <_Thread_Clear_state+0xc0>
0800c624 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) {
800c624: 37 9c ff f8 addi sp,sp,-8 800c628: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location );
800c62c: 37 82 00 08 addi r2,sp,8 800c630: f8 00 00 a5 calli 800c8c4 <_Thread_Get>
switch ( location ) {
800c634: 2b 82 00 08 lw r2,(sp+8)
800c638: 5c 40 00 09 bne r2,r0,800c65c <_Thread_Delay_ended+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state(
800c63c: 78 02 10 00 mvhi r2,0x1000 800c640: 38 42 00 18 ori r2,r2,0x18 800c644: fb ff ff 4b calli 800c370 <_Thread_Clear_state> 800c648: 78 01 08 02 mvhi r1,0x802 800c64c: 38 21 a9 b4 ori r1,r1,0xa9b4 800c650: 28 22 00 00 lw r2,(r1+0) 800c654: 34 42 ff ff addi r2,r2,-1 800c658: 58 22 00 00 sw (r1+0),r2
| STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } }
800c65c: 2b 9d 00 04 lw ra,(sp+4) 800c660: 37 9c 00 08 addi sp,sp,8 800c664: 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 c8 e0 ori r14,r14,0xc8e0 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 c8 f0 ori r13,r13,0xc8f0 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 c8 b0 ori r21,r21,0xc8b0 8004578: 39 ef c8 24 ori r15,r15,0xc824 800457c: 3a 94 c8 ac ori r20,r20,0xc8ac
#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 c7 b4 ori r24,r24,0xc7b4 8004584: 37 93 00 48 addi r19,sp,72 8004588: 37 92 00 40 addi r18,sp,64 800458c: 3a 31 c8 e8 ori r17,r17,0xc8e8
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 da calli 8008d0c <_TOD_Get_uptime>
_Timestamp_Subtract(
80045a8: ba e0 08 00 mv r1,r23 80045ac: ba 40 18 00 mv r3,r18 80045b0: 38 21 c8 e8 ori r1,r1,0xc8e8 80045b4: ba 60 10 00 mv r2,r19 80045b8: f8 00 04 5e calli 8005730 <_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 46 calli 80056dc <_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 48 calli 8005b18 <_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 7a calli 8005fec <_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 c8 24 ori r15,r15,0xc824
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 c8 c4 ori r1,r1,0xc8c4 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
0800b46c <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing;
800b46c: 78 01 08 01 mvhi r1,0x801 800b470: 38 21 c8 e0 ori r1,r1,0xc8e0 800b474: 28 21 00 00 lw r1,(r1+0)
if ( !_States_Is_ready( executing->current_state ) ||
800b478: 28 22 00 10 lw r2,(r1+16)
800b47c: 5c 40 00 07 bne r2,r0,800b498 <_Thread_Evaluate_mode+0x2c> <== NEVER TAKEN
800b480: 78 02 08 01 mvhi r2,0x801 800b484: 38 42 c8 b0 ori r2,r2,0xc8b0 800b488: 28 42 00 00 lw r2,(r2+0)
800b48c: 44 22 00 09 be r1,r2,800b4b0 <_Thread_Evaluate_mode+0x44> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
800b490: 40 21 00 75 lbu r1,(r1+117)
800b494: 44 20 00 07 be r1,r0,800b4b0 <_Thread_Evaluate_mode+0x44> <== NEVER TAKEN
_Context_Switch_necessary = true;
800b498: 78 01 08 01 mvhi r1,0x801 800b49c: 38 21 c8 f0 ori r1,r1,0xc8f0 800b4a0: 34 02 00 01 mvi r2,1 800b4a4: 30 22 00 00 sb (r1+0),r2 800b4a8: b8 40 08 00 mv r1,r2
return true;
800b4ac: c3 a0 00 00 ret 800b4b0: 34 01 00 00 mvi r1,0
} return false; }
800b4b4: c3 a0 00 00 ret
0800b4b8 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) {
800b4b8: 37 9c ff f4 addi sp,sp,-12 800b4bc: 5b 8b 00 0c sw (sp+12),r11 800b4c0: 5b 8c 00 08 sw (sp+8),r12 800b4c4: 5b 9d 00 04 sw (sp+4),ra
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing;
800b4c8: 78 01 08 01 mvhi r1,0x801 800b4cc: 38 21 c8 e0 ori r1,r1,0xc8e0 800b4d0: 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;
800b4d4: 29 61 00 b8 lw r1,(r11+184)
_ISR_Set_level(level);
800b4d8: 64 21 00 00 cmpei r1,r1,0 800b4dc: d0 01 00 00 wcsr IE,r1
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors;
800b4e0: 78 02 08 01 mvhi r2,0x801 800b4e4: 38 42 c6 2c ori r2,r2,0xc62c 800b4e8: 40 4c 00 00 lbu r12,(r2+0)
doneConstructors = 1;
800b4ec: 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 );
800b4f0: 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;
800b4f4: 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 );
800b4f8: fb ff e8 e8 calli 8005898 <_User_extensions_Thread_begin>
/* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch();
800b4fc: fb ff e4 74 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) */ { 800b500: 45 80 00 09 be r12,r0,800b524 <_Thread_Handler+0x6c> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
800b504: 29 61 00 a0 lw r1,(r11+160)
800b508: 44 20 00 0a be r1,r0,800b530 <_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 );
800b50c: b9 60 08 00 mv r1,r11 800b510: fb ff e8 f9 calli 80058f4 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
800b514: 34 01 00 00 mvi r1,0 800b518: 34 02 00 01 mvi r2,1 800b51c: 34 03 00 06 mvi r3,6 800b520: fb ff e0 77 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 ();
800b524: fb ff d2 b7 calli 8000000 <RamBase>
} #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
800b528: 29 61 00 a0 lw r1,(r11+160)
800b52c: 5c 20 ff f8 bne r1,r0,800b50c <_Thread_Handler+0x54> <== NEVER TAKEN
executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)(
800b530: 29 62 00 9c lw r2,(r11+156) 800b534: 29 61 00 a8 lw r1,(r11+168) 800b538: d8 40 00 00 call r2
INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument =
800b53c: 59 61 00 28 sw (r11+40),r1 800b540: e3 ff ff f3 bi 800b50c <_Thread_Handler+0x54>
08004a40 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) {
8004a40: 37 9c ff f0 addi sp,sp,-16 8004a44: 5b 8b 00 10 sw (sp+16),r11 8004a48: 5b 8c 00 0c sw (sp+12),r12 8004a4c: 5b 8d 00 08 sw (sp+8),r13 8004a50: 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;
8004a54: 78 01 08 01 mvhi r1,0x801 8004a58: 38 21 c0 c4 ori r1,r1,0xc0c4
#endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook)
8004a5c: 28 22 00 20 lw r2,(r1+32) 8004a60: 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;
8004a64: 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)
8004a68: 64 42 00 00 cmpei r2,r2,0 8004a6c: 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;
8004a70: 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)
8004a74: 99 22 48 00 xor r9,r9,r2 8004a78: b9 20 58 00 mv r11,r9
8004a7c: 5d 20 00 37 bne r9,r0,8004b58 <_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(
8004a80: 78 0c 08 01 mvhi r12,0x801 8004a84: 39 8c c0 c0 ori r12,r12,0xc0c0 8004a88: 41 81 00 00 lbu r1,(r12+0)
INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false;
8004a8c: 78 08 08 01 mvhi r8,0x801
_Thread_Executing = NULL;
8004a90: 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(
8004a94: 34 21 00 01 addi r1,r1,1
INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL;
8004a98: 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;
8004a9c: 78 03 08 01 mvhi r3,0x801
_Thread_Maximum_extensions = maximum_extensions;
8004aa0: 78 07 08 01 mvhi r7,0x801
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
8004aa4: 78 06 08 01 mvhi r6,0x801
INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL;
8004aa8: 38 84 c8 b0 ori r4,r4,0xc8b0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0;
8004aac: 38 63 c8 c4 ori r3,r3,0xc8c4
_Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice;
8004ab0: 38 c6 c7 b4 ori r6,r6,0xc7b4
INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false;
8004ab4: 39 08 c8 f0 ori r8,r8,0xc8f0
_Thread_Executing = NULL;
8004ab8: 38 a5 c8 e0 ori r5,r5,0xc8e0
_Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions;
8004abc: 38 e7 c8 c0 ori r7,r7,0xc8c0
_Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8004ac0: 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;
8004ac4: 58 ca 00 00 sw (r6+0),r10
INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL;
8004ac8: 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;
8004acc: 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(
8004ad0: b4 41 08 00 add r1,r2,r1
INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false;
8004ad4: 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(
8004ad8: 34 02 00 02 mvi r2,2
_Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions;
8004adc: 58 ed 00 00 sw (r7+0),r13
true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL;
8004ae0: 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(
8004ae4: fb ff ed c3 calli 80001f0 <__ashlsi3> 8004ae8: f8 00 05 00 calli 8005ee8 <_Workspace_Allocate_or_fatal_error> 8004aec: 78 03 08 01 mvhi r3,0x801
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
8004af0: 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(
8004af4: 38 63 c7 b0 ori r3,r3,0xc7b0
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
8004af8: 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(
8004afc: 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;
8004b00: 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);
8004b04: 34 23 00 04 addi r3,r1,4 8004b08: 58 23 00 00 sw (r1+0),r3
the_chain->permanent_null = NULL;
8004b0c: 58 26 00 04 sw (r1+4),r6
the_chain->last = _Chain_Head(the_chain);
8004b10: 58 21 00 08 sw (r1+8),r1
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
8004b14: 34 42 00 01 addi r2,r2,1 8004b18: 34 21 00 0c addi r1,r1,12
8004b1c: 50 82 ff fa bgeu r4,r2,8004b04 <_Thread_Handler_initialization+0xc4> /* * Initialize this class of objects. */ _Objects_Initialize_information(
8004b20: 34 02 00 01 mvi r2,1 8004b24: 78 01 08 01 mvhi r1,0x801 8004b28: 38 21 c9 80 ori r1,r1,0xc980 8004b2c: b8 40 18 00 mv r3,r2 8004b30: b8 40 20 00 mv r4,r2 8004b34: 34 05 01 38 mvi r5,312 8004b38: 34 07 00 08 mvi r7,8 8004b3c: fb ff fc 96 calli 8003d94 <_Objects_Initialize_information>
false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); }
8004b40: 2b 9d 00 04 lw ra,(sp+4) 8004b44: 2b 8b 00 10 lw r11,(sp+16) 8004b48: 2b 8c 00 0c lw r12,(sp+12) 8004b4c: 2b 8d 00 08 lw r13,(sp+8) 8004b50: 37 9c 00 10 addi sp,sp,16 8004b54: 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(
8004b58: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004b5c: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8004b60: 34 03 00 0f mvi r3,15 <== NOT EXECUTED 8004b64: fb ff fa e6 calli 80036fc <_Internal_error_Occurred> <== NOT EXECUTED
08009aa4 <_Thread_Reset_timeslice>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing;
8009aa4: 78 01 08 01 mvhi r1,0x801 8009aa8: 38 21 c8 e0 ori r1,r1,0xc8e0 8009aac: 28 21 00 00 lw r1,(r1+0)
ready = executing->ready;
8009ab0: 28 22 00 8c lw r2,(r1+140)
_ISR_Disable( level );
8009ab4: 90 00 20 00 rcsr r4,IE 8009ab8: 34 03 ff fe mvi r3,-2 8009abc: a0 83 18 00 and r3,r4,r3 8009ac0: d0 03 00 00 wcsr IE,r3
if ( _Chain_Has_only_one_node( ready ) ) {
8009ac4: 28 46 00 00 lw r6,(r2+0) 8009ac8: 28 45 00 08 lw r5,(r2+8)
8009acc: 44 c5 00 1f be r6,r5,8009b48 <_Thread_Reset_timeslice+0xa4> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next;
8009ad0: 28 25 00 00 lw r5,(r1+0)
previous = the_node->previous;
8009ad4: 28 26 00 04 lw r6,(r1+4)
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
8009ad8: 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;
8009adc: 58 c5 00 00 sw (r6+0),r5
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
8009ae0: 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;
8009ae4: 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;
8009ae8: 28 45 00 08 lw r5,(r2+8)
the_chain->last = the_node;
8009aec: 58 41 00 08 sw (r2+8),r1
old_last_node->next = the_node; the_node->previous = old_last_node;
8009af0: 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;
8009af4: 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 );
8009af8: d0 04 00 00 wcsr IE,r4 8009afc: d0 03 00 00 wcsr IE,r3
if ( _Thread_Is_heir( executing ) )
8009b00: 78 03 08 01 mvhi r3,0x801 8009b04: 38 63 c8 b0 ori r3,r3,0xc8b0 8009b08: 28 65 00 00 lw r5,(r3+0)
8009b0c: 44 25 00 07 be r1,r5,8009b28 <_Thread_Reset_timeslice+0x84><== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true;
8009b10: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8009b14: 38 21 c8 f0 ori r1,r1,0xc8f0 <== NOT EXECUTED 8009b18: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8009b1c: 30 22 00 00 sb (r1+0),r2 <== NOT EXECUTED
_ISR_Enable( level );
8009b20: d0 04 00 00 wcsr IE,r4 <== NOT EXECUTED 8009b24: 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;
8009b28: 28 42 00 00 lw r2,(r2+0)
_Context_Switch_necessary = true;
8009b2c: 78 01 08 01 mvhi r1,0x801 8009b30: 38 21 c8 f0 ori r1,r1,0xc8f0
_Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first;
8009b34: 58 62 00 00 sw (r3+0),r2
_Context_Switch_necessary = true;
8009b38: 34 02 00 01 mvi r2,1 8009b3c: 30 22 00 00 sb (r1+0),r2
_ISR_Enable( level );
8009b40: d0 04 00 00 wcsr IE,r4 8009b44: c3 a0 00 00 ret
executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level );
8009b48: d0 04 00 00 wcsr IE,r4
return;
8009b4c: c3 a0 00 00 ret
0800617c <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) {
800617c: 37 9c ff f0 addi sp,sp,-16 8006180: 5b 8b 00 08 sw (sp+8),r11 8006184: 5b 9d 00 04 sw (sp+4),ra
if ( !_States_Is_dormant( the_thread->current_state ) ) {
8006188: 28 25 00 10 lw r5,(r1+16) 800618c: 34 04 00 00 mvi r4,0
bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) {
8006190: b8 20 58 00 mv r11,r1
if ( !_States_Is_dormant( the_thread->current_state ) ) {
8006194: 20 a5 00 01 andi r5,r5,0x1
8006198: 44 a4 00 06 be r5,r4,80061b0 <_Thread_Restart+0x34> return true; } return false; }
800619c: b8 80 08 00 mv r1,r4 80061a0: 2b 9d 00 04 lw ra,(sp+4) 80061a4: 2b 8b 00 08 lw r11,(sp+8) 80061a8: 37 9c 00 10 addi sp,sp,16 80061ac: c3 a0 00 00 ret
Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread );
80061b0: 5b 82 00 10 sw (sp+16),r2 80061b4: 5b 83 00 0c sw (sp+12),r3 80061b8: f8 00 00 b9 calli 800649c <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
80061bc: 2b 82 00 10 lw r2,(sp+16) 80061c0: 2b 83 00 0c lw r3,(sp+12) 80061c4: b9 60 08 00 mv r1,r11 80061c8: f8 00 12 ce calli 800ad00 <_Thread_Reset>
_Thread_Load_environment( the_thread );
80061cc: b9 60 08 00 mv r1,r11 80061d0: f8 00 11 93 calli 800a81c <_Thread_Load_environment>
_Thread_Ready( the_thread );
80061d4: b9 60 08 00 mv r1,r11 80061d8: f8 00 12 66 calli 800ab70 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
80061dc: b9 60 08 00 mv r1,r11 80061e0: f8 00 02 6f calli 8006b9c <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
80061e4: 78 01 08 02 mvhi r1,0x802 80061e8: 38 21 19 40 ori r1,r1,0x1940 80061ec: 28 21 00 00 lw r1,(r1+0) 80061f0: 34 04 00 01 mvi r4,1
80061f4: 5d 61 ff ea bne r11,r1,800619c <_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 );
80061f8: 35 61 00 cc addi r1,r11,204 80061fc: f8 00 04 0a calli 8007224 <_CPU_Context_restore>
8006200: 34 04 00 01 mvi r4,1 <== NOT EXECUTED 8006204: e3 ff ff e6 bi 800619c <_Thread_Restart+0x20> <== NOT EXECUTED
0800aa9c <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level );
800aa9c: 90 00 10 00 rcsr r2,IE 800aaa0: 34 04 ff fe mvi r4,-2 800aaa4: a0 44 20 00 and r4,r2,r4 800aaa8: d0 04 00 00 wcsr IE,r4
_ISR_Enable( level ); return; } #endif current_state = the_thread->current_state;
800aaac: 28 23 00 10 lw r3,(r1+16)
if ( current_state & STATES_SUSPENDED ) {
800aab0: 20 65 00 02 andi r5,r3,0x2
800aab4: 44 a0 00 2a be r5,r0,800ab5c <_Thread_Resume+0xc0> <== NEVER TAKEN
800aab8: 34 05 ff fd mvi r5,-3 800aabc: a0 65 18 00 and r3,r3,r5
current_state =
800aac0: 58 23 00 10 sw (r1+16),r3
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 800aac4: 5c 60 00 26 bne r3,r0,800ab5c <_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;
800aac8: 28 26 00 90 lw r6,(r1+144) 800aacc: 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);
800aad0: 28 25 00 8c lw r5,(r1+140) 800aad4: 2c c8 00 00 lhu r8,(r6+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
800aad8: 78 03 08 02 mvhi r3,0x802 800aadc: 38 63 49 b4 ori r3,r3,0x49b4
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor;
800aae0: b9 07 38 00 or r7,r8,r7 800aae4: 0c c7 00 00 sh (r6+0),r7
_Priority_Major_bit_map |= the_priority_map->ready_major;
800aae8: 2c 67 00 00 lhu r7,(r3+0) 800aaec: 2c 28 00 94 lhu r8,(r1+148)
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
800aaf0: 34 a6 00 04 addi r6,r5,4 800aaf4: 58 26 00 00 sw (r1+0),r6
old_last_node = the_chain->last;
800aaf8: 28 a6 00 08 lw r6,(r5+8) 800aafc: b9 07 38 00 or r7,r8,r7
the_chain->last = the_node;
800ab00: 58 a1 00 08 sw (r5+8),r1 800ab04: 20 e5 ff ff andi r5,r7,0xffff 800ab08: 0c 65 00 00 sh (r3+0),r5
old_last_node->next = the_node; the_node->previous = old_last_node;
800ab0c: 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;
800ab10: 58 c1 00 00 sw (r6+0),r1
_ISR_Flash( level );
800ab14: d0 02 00 00 wcsr IE,r2 800ab18: d0 04 00 00 wcsr IE,r4
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
800ab1c: 78 03 08 02 mvhi r3,0x802 800ab20: 38 63 49 90 ori r3,r3,0x4990 800ab24: 28 64 00 00 lw r4,(r3+0) 800ab28: 28 25 00 14 lw r5,(r1+20) 800ab2c: 28 84 00 14 lw r4,(r4+20)
800ab30: 50 a4 00 0b bgeu r5,r4,800ab5c <_Thread_Resume+0xc0> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible ||
800ab34: 78 04 08 02 mvhi r4,0x802 800ab38: 38 84 49 c0 ori r4,r4,0x49c0 800ab3c: 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;
800ab40: 58 61 00 00 sw (r3+0),r1
if ( _Thread_Executing->is_preemptible ||
800ab44: 40 81 00 75 lbu r1,(r4+117)
800ab48: 44 20 00 07 be r1,r0,800ab64 <_Thread_Resume+0xc8> the_thread->current_priority == 0 ) _Context_Switch_necessary = true;
800ab4c: 78 01 08 02 mvhi r1,0x802 800ab50: 38 21 49 d0 ori r1,r1,0x49d0 800ab54: 34 03 00 01 mvi r3,1 800ab58: 30 23 00 00 sb (r1+0),r3
} } } _ISR_Enable( level );
800ab5c: d0 02 00 00 wcsr IE,r2
}
800ab60: 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 ||
800ab64: 44 a1 ff fa be r5,r1,800ab4c <_Thread_Resume+0xb0> <== NEVER TAKEN
800ab68: e3 ff ff fd bi 800ab5c <_Thread_Resume+0xc0>
0800d8e0 <_Thread_Yield_processor>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing;
800d8e0: 78 01 08 02 mvhi r1,0x802 800d8e4: 38 21 aa 70 ori r1,r1,0xaa70 800d8e8: 28 21 00 00 lw r1,(r1+0)
ready = executing->ready;
800d8ec: 28 22 00 8c lw r2,(r1+140)
_ISR_Disable( level );
800d8f0: 90 00 20 00 rcsr r4,IE 800d8f4: 34 03 ff fe mvi r3,-2 800d8f8: a0 83 18 00 and r3,r4,r3 800d8fc: d0 03 00 00 wcsr IE,r3
if ( !_Chain_Has_only_one_node( ready ) ) {
800d900: 28 46 00 00 lw r6,(r2+0) 800d904: 28 45 00 08 lw r5,(r2+8)
800d908: 44 c5 00 1a be r6,r5,800d970 <_Thread_Yield_processor+0x90> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next;
800d90c: 28 25 00 00 lw r5,(r1+0)
previous = the_node->previous;
800d910: 28 26 00 04 lw r6,(r1+4)
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
800d914: 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;
800d918: 58 c5 00 00 sw (r6+0),r5
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
800d91c: 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;
800d920: 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;
800d924: 28 45 00 08 lw r5,(r2+8)
the_chain->last = the_node;
800d928: 58 41 00 08 sw (r2+8),r1
old_last_node->next = the_node; the_node->previous = old_last_node;
800d92c: 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;
800d930: 58 a1 00 00 sw (r5+0),r1
_Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level );
800d934: d0 04 00 00 wcsr IE,r4 800d938: d0 03 00 00 wcsr IE,r3
if ( _Thread_Is_heir( executing ) )
800d93c: 78 03 08 02 mvhi r3,0x802 800d940: 38 63 aa 40 ori r3,r3,0xaa40 800d944: 28 65 00 00 lw r5,(r3+0)
800d948: 44 25 00 07 be r1,r5,800d964 <_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;
800d94c: 78 01 08 02 mvhi r1,0x802 800d950: 38 21 aa 80 ori r1,r1,0xaa80 800d954: 34 02 00 01 mvi r2,1 800d958: 30 22 00 00 sb (r1+0),r2
_ISR_Enable( level );
800d95c: d0 04 00 00 wcsr IE,r4
}
800d960: 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;
800d964: 28 42 00 00 lw r2,(r2+0) 800d968: 58 62 00 00 sw (r3+0),r2 800d96c: e3 ff ff f8 bi 800d94c <_Thread_Yield_processor+0x6c>
_Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) )
800d970: 78 02 08 02 mvhi r2,0x802 800d974: 38 42 aa 40 ori r2,r2,0xaa40 800d978: 28 42 00 00 lw r2,(r2+0)
800d97c: 5c 22 ff f4 bne r1,r2,800d94c <_Thread_Yield_processor+0x6c><== NEVER TAKEN
800d980: e3 ff ff f7 bi 800d95c <_Thread_Yield_processor+0x7c>
08004e10 <_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 ) {
8004e10: 37 9c ff ec addi sp,sp,-20 8004e14: 5b 8b 00 14 sw (sp+20),r11 8004e18: 5b 8c 00 10 sw (sp+16),r12 8004e1c: 5b 8d 00 0c sw (sp+12),r13 8004e20: 5b 8e 00 08 sw (sp+8),r14 8004e24: 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;
8004e28: 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 ) {
8004e2c: 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);
8004e30: 34 44 00 3c addi r4,r2,60 8004e34: 59 84 00 38 sw (r12+56),r4
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
8004e38: 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;
8004e3c: 34 04 00 00 mvi r4,0 8004e40: b8 20 68 00 mv r13,r1 8004e44: 59 84 00 3c sw (r12+60),r4
the_chain->last = _Chain_Head(the_chain);
8004e48: 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 ];
8004e4c: b9 60 08 00 mv r1,r11 8004e50: 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 ) {
8004e54: 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 ];
8004e58: fb ff ed 0e calli 8000290 <__lshrsi3> 8004e5c: b4 21 10 00 add r2,r1,r1 8004e60: b4 41 08 00 add r1,r2,r1 8004e64: 34 02 00 02 mvi r2,2 8004e68: fb ff ec e2 calli 80001f0 <__ashlsi3>
block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) )
8004e6c: 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 ];
8004e70: b5 a1 40 00 add r8,r13,r1
block_state = the_thread_queue->state;
8004e74: 29 a6 00 38 lw r6,(r13+56)
if ( _Thread_queue_Is_reverse_search( priority ) ) 8004e78: 5c 40 00 25 bne r2,r0,8004f0c <_Thread_queue_Enqueue_priority+0xfc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
8004e7c: 35 01 00 04 addi r1,r8,4
goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level );
8004e80: 34 0a ff fe mvi r10,-2 8004e84: 90 00 10 00 rcsr r2,IE 8004e88: a0 4a 48 00 and r9,r2,r10 8004e8c: d0 09 00 00 wcsr IE,r9
search_thread = (Thread_Control *) header->first;
8004e90: 29 04 00 00 lw r4,(r8+0)
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 8004e94: 44 81 00 69 be r4,r1,8005038 <_Thread_queue_Enqueue_priority+0x228> search_priority = search_thread->current_priority;
8004e98: 28 85 00 14 lw r5,(r4+20)
if ( priority <= search_priority ) 8004e9c: 50 ab 00 10 bgeu r5,r11,8004edc <_Thread_queue_Enqueue_priority+0xcc> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level );
8004ea0: d0 02 00 00 wcsr IE,r2 8004ea4: d0 09 00 00 wcsr IE,r9
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
8004ea8: 28 83 00 10 lw r3,(r4+16) 8004eac: a0 c3 18 00 and r3,r6,r3
8004eb0: 5c 60 00 09 bne r3,r0,8004ed4 <_Thread_queue_Enqueue_priority+0xc4><== ALWAYS TAKEN
8004eb4: e0 00 00 43 bi 8004fc0 <_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;
8004eb8: 28 85 00 14 lw r5,(r4+20)
if ( priority <= search_priority ) 8004ebc: 50 ab 00 08 bgeu r5,r11,8004edc <_Thread_queue_Enqueue_priority+0xcc> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level );
8004ec0: d0 02 00 00 wcsr IE,r2 8004ec4: d0 09 00 00 wcsr IE,r9
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
8004ec8: 28 87 00 10 lw r7,(r4+16) 8004ecc: a0 c7 38 00 and r7,r6,r7
8004ed0: 44 e0 00 3c be r7,r0,8004fc0 <_Thread_queue_Enqueue_priority+0x1b0><== NEVER TAKEN
_ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next;
8004ed4: 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 ) ) { 8004ed8: 5c 81 ff f8 bne r4,r1,8004eb8 <_Thread_queue_Enqueue_priority+0xa8> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state !=
8004edc: 29 a1 00 30 lw r1,(r13+48) 8004ee0: 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;
8004ee4: b8 40 18 00 mv r3,r2
} search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 8004ee8: 44 26 00 38 be r1,r6,8004fc8 <_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;
8004eec: 59 c3 00 00 sw (r14+0),r3
return the_thread_queue->sync_state; }
8004ef0: 2b 9d 00 04 lw ra,(sp+4) 8004ef4: 2b 8b 00 14 lw r11,(sp+20) 8004ef8: 2b 8c 00 10 lw r12,(sp+16) 8004efc: 2b 8d 00 0c lw r13,(sp+12) 8004f00: 2b 8e 00 08 lw r14,(sp+8) 8004f04: 37 9c 00 14 addi sp,sp,20 8004f08: c3 a0 00 00 ret 8004f0c: 78 01 08 01 mvhi r1,0x801 8004f10: 38 21 c0 c0 ori r1,r1,0xc0c0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level );
8004f14: 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;
8004f18: 40 25 00 00 lbu r5,(r1+0) 8004f1c: 34 a5 00 01 addi r5,r5,1
_ISR_Disable( level );
8004f20: 90 00 38 00 rcsr r7,IE 8004f24: a0 e3 48 00 and r9,r7,r3 8004f28: d0 09 00 00 wcsr IE,r9
search_thread = (Thread_Control *) header->last;
8004f2c: 29 04 00 08 lw r4,(r8+8)
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 8004f30: 5c 88 00 04 bne r4,r8,8004f40 <_Thread_queue_Enqueue_priority+0x130>
8004f34: e0 00 00 0c bi 8004f64 <_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 *)
8004f38: 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 ) ) { 8004f3c: 45 04 00 0a be r8,r4,8004f64 <_Thread_queue_Enqueue_priority+0x154> search_priority = search_thread->current_priority;
8004f40: 28 85 00 14 lw r5,(r4+20)
if ( priority >= search_priority ) 8004f44: 51 65 00 08 bgeu r11,r5,8004f64 <_Thread_queue_Enqueue_priority+0x154> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level );
8004f48: d0 07 00 00 wcsr IE,r7 8004f4c: d0 09 00 00 wcsr IE,r9
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
8004f50: 28 82 00 10 lw r2,(r4+16) 8004f54: a0 c2 10 00 and r2,r6,r2
8004f58: 5c 40 ff f8 bne r2,r0,8004f38 <_Thread_queue_Enqueue_priority+0x128><== ALWAYS TAKEN
_ISR_Enable( level );
8004f5c: d0 07 00 00 wcsr IE,r7 <== NOT EXECUTED
goto restart_reverse_search;
8004f60: e3 ff ff ee bi 8004f18 <_Thread_queue_Enqueue_priority+0x108><== NOT EXECUTED
} search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state !=
8004f64: 29 a1 00 30 lw r1,(r13+48) 8004f68: 34 02 00 01 mvi r2,1 8004f6c: b8 e0 18 00 mv r3,r7
8004f70: 5c 22 ff df bne r1,r2,8004eec <_Thread_queue_Enqueue_priority+0xdc> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
8004f74: 34 01 00 00 mvi r1,0 8004f78: 59 a1 00 30 sw (r13+48),r1
if ( priority == search_priority )
8004f7c: b8 e0 10 00 mv r2,r7
8004f80: 45 65 00 24 be r11,r5,8005010 <_Thread_queue_Enqueue_priority+0x200> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next;
8004f84: 28 81 00 00 lw r1,(r4+0)
the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node;
8004f88: 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;
8004f8c: 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;
8004f90: 59 81 00 00 sw (r12+0),r1
the_node->previous = search_node; search_node->next = the_node;
8004f94: 58 8c 00 00 sw (r4+0),r12
next_node->previous = the_node;
8004f98: 58 2c 00 04 sw (r1+4),r12
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
8004f9c: d0 07 00 00 wcsr IE,r7 8004fa0: 34 01 00 01 mvi r1,1
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
8004fa4: 2b 9d 00 04 lw ra,(sp+4) 8004fa8: 2b 8b 00 14 lw r11,(sp+20) 8004fac: 2b 8c 00 10 lw r12,(sp+16) 8004fb0: 2b 8d 00 0c lw r13,(sp+12) 8004fb4: 2b 8e 00 08 lw r14,(sp+8) 8004fb8: 37 9c 00 14 addi sp,sp,20 8004fbc: 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 );
8004fc0: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
goto restart_forward_search;
8004fc4: e3 ff ff b0 bi 8004e84 <_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;
8004fc8: 34 01 00 00 mvi r1,0 8004fcc: 59 a1 00 30 sw (r13+48),r1
if ( priority == search_priority ) 8004fd0: 45 65 00 10 be r11,r5,8005010 <_Thread_queue_Enqueue_priority+0x200> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous;
8004fd4: 28 81 00 04 lw r1,(r4+4)
the_node = (Chain_Node *) the_thread; the_node->next = search_node;
8004fd8: 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;
8004fdc: 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;
8004fe0: 59 81 00 04 sw (r12+4),r1
previous_node->next = the_node;
8004fe4: 58 2c 00 00 sw (r1+0),r12
search_node->previous = the_node;
8004fe8: 58 8c 00 04 sw (r4+4),r12
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
8004fec: d0 02 00 00 wcsr IE,r2 8004ff0: 34 01 00 01 mvi r1,1
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
8004ff4: 2b 9d 00 04 lw ra,(sp+4) 8004ff8: 2b 8b 00 14 lw r11,(sp+20) 8004ffc: 2b 8c 00 10 lw r12,(sp+16) 8005000: 2b 8d 00 0c lw r13,(sp+12) 8005004: 2b 8e 00 08 lw r14,(sp+8) 8005008: 37 9c 00 14 addi sp,sp,20 800500c: c3 a0 00 00 ret 8005010: 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;
8005014: 28 81 00 04 lw r1,(r4+4)
the_node = (Chain_Node *) the_thread; the_node->next = search_node;
8005018: 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;
800501c: 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;
8005020: 59 81 00 04 sw (r12+4),r1
previous_node->next = the_node;
8005024: 58 2c 00 00 sw (r1+0),r12
search_node->previous = the_node;
8005028: 58 8c 00 04 sw (r4+4),r12
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
800502c: d0 02 00 00 wcsr IE,r2 8005030: 34 01 00 01 mvi r1,1
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
8005034: e3 ff ff af bi 8004ef0 <_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 ) ) {
8005038: 34 05 ff ff mvi r5,-1 800503c: e3 ff ff a8 bi 8004edc <_Thread_queue_Enqueue_priority+0xcc>
080050cc <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) {
80050cc: 37 9c ff ec addi sp,sp,-20 80050d0: 5b 8b 00 10 sw (sp+16),r11 80050d4: 5b 8c 00 0c sw (sp+12),r12 80050d8: 5b 8d 00 08 sw (sp+8),r13 80050dc: 5b 9d 00 04 sw (sp+4),ra 80050e0: b8 20 58 00 mv r11,r1 80050e4: 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 )
80050e8: 44 20 00 04 be r1,r0,80050f8 <_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 ) {
80050ec: 28 22 00 34 lw r2,(r1+52) 80050f0: 34 01 00 01 mvi r1,1
80050f4: 44 41 00 07 be r2,r1,8005110 <_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 ); } }
80050f8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80050fc: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8005100: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8005104: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8005108: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 800510c: 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 );
8005110: 90 00 68 00 rcsr r13,IE 8005114: 34 01 ff fe mvi r1,-2 8005118: a1 a1 08 00 and r1,r13,r1 800511c: d0 01 00 00 wcsr IE,r1
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
8005120: 29 82 00 10 lw r2,(r12+16) 8005124: 78 01 00 03 mvhi r1,0x3 8005128: 38 21 be e0 ori r1,r1,0xbee0 800512c: a0 41 08 00 and r1,r2,r1
8005130: 5c 20 00 08 bne r1,r0,8005150 <_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 );
8005134: d0 0d 00 00 wcsr IE,r13 <== NOT EXECUTED
} }
8005138: 2b 9d 00 04 lw ra,(sp+4) 800513c: 2b 8b 00 10 lw r11,(sp+16) 8005140: 2b 8c 00 0c lw r12,(sp+12) 8005144: 2b 8d 00 08 lw r13,(sp+8) 8005148: 37 9c 00 14 addi sp,sp,20 800514c: c3 a0 00 00 ret 8005150: 34 03 00 01 mvi r3,1 8005154: 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 );
8005158: b9 60 08 00 mv r1,r11 800515c: b9 80 10 00 mv r2,r12 8005160: f8 00 11 83 calli 800976c <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
8005164: b9 60 08 00 mv r1,r11 8005168: b9 80 10 00 mv r2,r12 800516c: 37 83 00 14 addi r3,sp,20 8005170: fb ff ff 28 calli 8004e10 <_Thread_queue_Enqueue_priority>
} _ISR_Enable( level );
8005174: d0 0d 00 00 wcsr IE,r13 8005178: e3 ff ff f0 bi 8005138 <_Thread_queue_Requeue+0x6c>
0800517c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) {
800517c: 37 9c ff f8 addi sp,sp,-8 8005180: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location );
8005184: 37 82 00 08 addi r2,sp,8 8005188: fb ff fd 5e calli 8004700 <_Thread_Get>
switch ( location ) {
800518c: 2b 82 00 08 lw r2,(sp+8)
8005190: 5c 40 00 07 bne r2,r0,80051ac <_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 );
8005194: f8 00 11 c9 calli 80098b8 <_Thread_queue_Process_timeout>
*/ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1;
8005198: 78 01 08 01 mvhi r1,0x801 800519c: 38 21 c8 24 ori r1,r1,0xc824 80051a0: 28 22 00 00 lw r2,(r1+0) 80051a4: 34 42 ff ff addi r2,r2,-1 80051a8: 58 22 00 00 sw (r1+0),r2
_Thread_Unnest_dispatch(); break; } }
80051ac: 2b 9d 00 04 lw ra,(sp+4) 80051b0: 37 9c 00 08 addi sp,sp,8 80051b4: 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 7c ori r20,r20,0xed7c 8014a2c: 3a 73 ec bc ori r19,r19,0xecbc 8014a30: 3b 39 ec 2c ori r25,r25,0xec2c 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 5c calli 8019fd4 <_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 55 calli 8019fd4 <_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 75 calli 801a07c <_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 fe calli 8019edc <_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 62 calli 801a07c <_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 c1 calli 8019270 <_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 a2 calli 801a218 <_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 a0 calli 801a218 <_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 2c ori r2,r2,0xec2c 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 bc ori r2,r2,0xecbc
*/ 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 02 calli 801a07c <_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><== NEVER TAKEN
_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 7c ori r3,r3,0xed7c
*/ 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 e5 calli 801a07c <_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>
080056dc <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) {
80056dc: 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;
80056e0: 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;
80056e4: 28 41 00 00 lw r1,(r2+0)
/* Add the basics */ time->tv_sec += add->tv_sec;
80056e8: 28 a3 00 00 lw r3,(r5+0)
time->tv_nsec += add->tv_nsec;
80056ec: 28 a2 00 04 lw r2,(r5+4)
/* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
80056f0: 78 06 3b 9a mvhi r6,0x3b9a
) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec;
80056f4: b4 61 18 00 add r3,r3,r1
time->tv_nsec += add->tv_nsec;
80056f8: b4 82 10 00 add r2,r4,r2
) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec;
80056fc: 58 a3 00 00 sw (r5+0),r3
time->tv_nsec += add->tv_nsec;
8005700: 58 a2 00 04 sw (r5+4),r2
/* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
8005704: 38 c6 c9 ff ori r6,r6,0xc9ff
8005708: 50 c2 00 09 bgeu r6,r2,800572c <_Timespec_Add_to+0x50>
800570c: 78 04 c4 65 mvhi r4,0xc465
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
8005710: 38 84 36 00 ori r4,r4,0x3600 8005714: 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(
8005718: 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++;
800571c: 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 ) {
8005720: 54 46 ff fd bgu r2,r6,8005714 <_Timespec_Add_to+0x38> <== NEVER TAKEN
8005724: 58 a3 00 00 sw (r5+0),r3 8005728: 58 a2 00 04 sw (r5+4),r2
time->tv_sec++; seconds++; } return seconds; }
800572c: c3 a0 00 00 ret
080414ec <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec )
80414ec: 28 24 00 00 lw r4,(r1+0) 80414f0: 28 43 00 00 lw r3,(r2+0)
80414f4: 4c 64 00 03 bge r3,r4,8041500 <_Timespec_Greater_than+0x14>
80414f8: 34 01 00 01 mvi r1,1 80414fc: c3 a0 00 00 ret
return true; if ( lhs->tv_sec < rhs->tv_sec )
8041500: 4c 83 00 03 bge r4,r3,804150c <_Timespec_Greater_than+0x20><== ALWAYS TAKEN
8041504: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8041508: 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(
804150c: 28 23 00 04 lw r3,(r1+4) 8041510: 28 41 00 04 lw r1,(r2+4) 8041514: 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; }
8041518: c3 a0 00 00 ret
0800594c <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) {
800594c: 37 9c ff e8 addi sp,sp,-24 8005950: 5b 8b 00 18 sw (sp+24),r11 8005954: 5b 8c 00 14 sw (sp+20),r12 8005958: 5b 8d 00 10 sw (sp+16),r13 800595c: 5b 8e 00 0c sw (sp+12),r14 8005960: 5b 8f 00 08 sw (sp+8),r15 8005964: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ;
8005968: 78 0c 08 01 mvhi r12,0x801 800596c: 39 8c c9 cc ori r12,r12,0xc9cc 8005970: 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 ) {
8005974: b8 20 78 00 mv r15,r1 8005978: b8 60 70 00 mv r14,r3 800597c: 20 4d 00 ff andi r13,r2,0xff
Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ;
8005980: 45 6c 00 09 be r11,r12,80059a4 <_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 )
8005984: 29 64 00 30 lw r4,(r11+48)
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
8005988: b9 e0 08 00 mv r1,r15 800598c: b9 a0 10 00 mv r2,r13 8005990: 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 ) 8005994: 44 80 00 02 be r4,r0,800599c <_User_extensions_Fatal+0x50> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
8005998: 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 ) {
800599c: 29 6b 00 04 lw r11,(r11+4)
) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 80059a0: 5d 6c ff f9 bne r11,r12,8005984 <_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 ); } }
80059a4: 2b 9d 00 04 lw ra,(sp+4) 80059a8: 2b 8b 00 18 lw r11,(sp+24) 80059ac: 2b 8c 00 14 lw r12,(sp+20) 80059b0: 2b 8d 00 10 lw r13,(sp+16) 80059b4: 2b 8e 00 0c lw r14,(sp+12) 80059b8: 2b 8f 00 08 lw r15,(sp+8) 80059bc: 37 9c 00 18 addi sp,sp,24 80059c0: c3 a0 00 00 ret
08005784 <_User_extensions_Handler_initialization>: #include <rtems/score/userext.h> #include <rtems/score/wkspace.h> #include <string.h> void _User_extensions_Handler_initialization(void) {
8005784: 37 9c ff e8 addi sp,sp,-24 8005788: 5b 8b 00 18 sw (sp+24),r11 800578c: 5b 8c 00 14 sw (sp+20),r12 8005790: 5b 8d 00 10 sw (sp+16),r13 8005794: 5b 8e 00 0c sw (sp+12),r14 8005798: 5b 8f 00 08 sw (sp+8),r15 800579c: 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;
80057a0: 78 04 08 01 mvhi r4,0x801 80057a4: 38 84 c0 c4 ori r4,r4,0xc0c4
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
80057a8: 78 03 08 01 mvhi r3,0x801 80057ac: 78 01 08 01 mvhi r1,0x801 80057b0: 38 63 c9 cc ori r3,r3,0xc9cc 80057b4: 38 21 c8 28 ori r1,r1,0xc828
initial_extensions = Configuration.User_extension_table;
80057b8: 28 8c 00 3c lw r12,(r4+60)
the_chain->permanent_null = NULL;
80057bc: 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);
80057c0: 34 65 00 04 addi r5,r3,4 80057c4: 34 22 00 04 addi r2,r1,4 80057c8: 58 65 00 00 sw (r3+0),r5
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
80057cc: 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);
80057d0: 58 22 00 00 sw (r1+0),r2
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
80057d4: 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;
80057d8: 58 6d 00 04 sw (r3+4),r13 80057dc: 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;
80057e0: 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 ) { 80057e4: 45 8d 00 25 be r12,r13,8005878 <_User_extensions_Handler_initialization+0xf4> extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control )
80057e8: b5 ce 78 00 add r15,r14,r14 80057ec: b5 ee 78 00 add r15,r15,r14 80057f0: 34 02 00 04 mvi r2,4 80057f4: b9 e0 08 00 mv r1,r15 80057f8: fb ff ea 7e calli 80001f0 <__ashlsi3> 80057fc: b5 e1 78 00 add r15,r15,r1 8005800: 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 *)
8005804: b9 e0 08 00 mv r1,r15 8005808: f8 00 01 b8 calli 8005ee8 <_Workspace_Allocate_or_fatal_error>
_Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset (
800580c: b9 a0 10 00 mv r2,r13 8005810: 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 *)
8005814: b8 20 58 00 mv r11,r1
_Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset (
8005818: f8 00 1b ff calli 800c814 <memset>
extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) {
800581c: 45 cd 00 17 be r14,r13,8005878 <_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;
8005820: 29 81 00 00 lw r1,(r12+0) 8005824: 35 ad 00 01 addi r13,r13,1 8005828: 59 61 00 14 sw (r11+20),r1 800582c: 29 82 00 04 lw r2,(r12+4)
_User_extensions_Add_set( extension );
8005830: 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;
8005834: 59 62 00 18 sw (r11+24),r2 8005838: 29 82 00 08 lw r2,(r12+8) 800583c: 59 62 00 1c sw (r11+28),r2 8005840: 29 82 00 0c lw r2,(r12+12) 8005844: 59 62 00 20 sw (r11+32),r2 8005848: 29 82 00 10 lw r2,(r12+16) 800584c: 59 62 00 24 sw (r11+36),r2 8005850: 29 82 00 14 lw r2,(r12+20) 8005854: 59 62 00 28 sw (r11+40),r2 8005858: 29 82 00 18 lw r2,(r12+24) 800585c: 59 62 00 2c sw (r11+44),r2 8005860: 29 82 00 1c lw r2,(r12+28) 8005864: 35 8c 00 20 addi r12,r12,32 8005868: 59 62 00 30 sw (r11+48),r2
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++;
800586c: 35 6b 00 34 addi r11,r11,52
_User_extensions_Add_set( extension );
8005870: f8 00 10 b8 calli 8009b50 <_User_extensions_Add_set>
extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 8005874: 55 cd ff eb bgu r14,r13,8005820 <_User_extensions_Handler_initialization+0x9c> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } }
8005878: 2b 9d 00 04 lw ra,(sp+4) 800587c: 2b 8b 00 18 lw r11,(sp+24) 8005880: 2b 8c 00 14 lw r12,(sp+20) 8005884: 2b 8d 00 10 lw r13,(sp+16) 8005888: 2b 8e 00 0c lw r14,(sp+12) 800588c: 2b 8f 00 08 lw r15,(sp+8) 8005890: 37 9c 00 18 addi sp,sp,24 8005894: c3 a0 00 00 ret
08005898 <_User_extensions_Thread_begin>: #include <rtems/score/userext.h> void _User_extensions_Thread_begin ( Thread_Control *executing ) {
8005898: 37 9c ff f0 addi sp,sp,-16 800589c: 5b 8b 00 10 sw (sp+16),r11 80058a0: 5b 8c 00 0c sw (sp+12),r12 80058a4: 5b 8d 00 08 sw (sp+8),r13 80058a8: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ;
80058ac: 78 0c 08 01 mvhi r12,0x801 80058b0: 39 8c c9 cc ori r12,r12,0xc9cc 80058b4: 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;
80058b8: 35 8c 00 04 addi r12,r12,4
#include <rtems/score/userext.h> void _User_extensions_Thread_begin ( Thread_Control *executing ) {
80058bc: b8 20 68 00 mv r13,r1
Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ;
80058c0: 45 6c 00 07 be r11,r12,80058dc <_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 )
80058c4: 29 62 00 28 lw r2,(r11+40)
(*the_extension->Callouts.thread_begin)( executing );
80058c8: 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 ) 80058cc: 44 40 00 02 be r2,r0,80058d4 <_User_extensions_Thread_begin+0x3c> (*the_extension->Callouts.thread_begin)( executing );
80058d0: 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 ) {
80058d4: 29 6b 00 00 lw r11,(r11+0)
) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 80058d8: 5d 6c ff fb bne r11,r12,80058c4 <_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 ); } }
80058dc: 2b 9d 00 04 lw ra,(sp+4) 80058e0: 2b 8b 00 10 lw r11,(sp+16) 80058e4: 2b 8c 00 0c lw r12,(sp+12) 80058e8: 2b 8d 00 08 lw r13,(sp+8) 80058ec: 37 9c 00 10 addi sp,sp,16 80058f0: c3 a0 00 00 ret
080059c4 <_User_extensions_Thread_create>: #include <rtems/score/userext.h> bool _User_extensions_Thread_create ( Thread_Control *the_thread ) {
80059c4: 37 9c ff ec addi sp,sp,-20 80059c8: 5b 8b 00 14 sw (sp+20),r11 80059cc: 5b 8c 00 10 sw (sp+16),r12 80059d0: 5b 8d 00 0c sw (sp+12),r13 80059d4: 5b 8e 00 08 sw (sp+8),r14 80059d8: 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 ;
80059dc: 78 0d 08 01 mvhi r13,0x801 80059e0: 39 ad c9 cc ori r13,r13,0xc9cc 80059e4: 29 ab 00 00 lw r11,(r13+0) 80059e8: 35 ad 00 04 addi r13,r13,4
#include <rtems/score/userext.h> bool _User_extensions_Thread_create ( Thread_Control *the_thread ) {
80059ec: 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 ;
80059f0: 45 6d 00 0b be r11,r13,8005a1c <_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)(
80059f4: 78 0c 08 01 mvhi r12,0x801 80059f8: 39 8c c8 e0 ori r12,r12,0xc8e0
!_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 ) {
80059fc: 29 63 00 14 lw r3,(r11+20)
status = (*the_extension->Callouts.thread_create)(
8005a00: 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 ) { 8005a04: 44 60 00 04 be r3,r0,8005a14 <_User_extensions_Thread_create+0x50> status = (*the_extension->Callouts.thread_create)(
8005a08: 29 81 00 00 lw r1,(r12+0) 8005a0c: d8 60 00 00 call r3
_Thread_Executing, the_thread ); if ( !status ) 8005a10: 44 20 00 04 be r1,r0,8005a20 <_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 ) {
8005a14: 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 ; 8005a18: 5d 6d ff f9 bne r11,r13,80059fc <_User_extensions_Thread_create+0x38>
8005a1c: 34 01 00 01 mvi r1,1
return false; } } return true; }
8005a20: 2b 9d 00 04 lw ra,(sp+4) 8005a24: 2b 8b 00 14 lw r11,(sp+20) 8005a28: 2b 8c 00 10 lw r12,(sp+16) 8005a2c: 2b 8d 00 0c lw r13,(sp+12) 8005a30: 2b 8e 00 08 lw r14,(sp+8) 8005a34: 37 9c 00 14 addi sp,sp,20 8005a38: c3 a0 00 00 ret
08005a3c <_User_extensions_Thread_delete>: #include <rtems/score/userext.h> void _User_extensions_Thread_delete ( Thread_Control *the_thread ) {
8005a3c: 37 9c ff ec addi sp,sp,-20 8005a40: 5b 8b 00 14 sw (sp+20),r11 8005a44: 5b 8c 00 10 sw (sp+16),r12 8005a48: 5b 8d 00 0c sw (sp+12),r13 8005a4c: 5b 8e 00 08 sw (sp+8),r14 8005a50: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ;
8005a54: 78 0d 08 01 mvhi r13,0x801 8005a58: 39 ad c9 cc ori r13,r13,0xc9cc 8005a5c: 29 ab 00 08 lw r11,(r13+8)
#include <rtems/score/userext.h> void _User_extensions_Thread_delete ( Thread_Control *the_thread ) {
8005a60: b8 20 70 00 mv r14,r1
Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ;
8005a64: 45 6d 00 0a be r11,r13,8005a8c <_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)(
8005a68: 78 0c 08 01 mvhi r12,0x801 8005a6c: 39 8c c8 e0 ori r12,r12,0xc8e0
!_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 )
8005a70: 29 63 00 20 lw r3,(r11+32)
(*the_extension->Callouts.thread_delete)(
8005a74: 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 ) 8005a78: 44 60 00 03 be r3,r0,8005a84 <_User_extensions_Thread_delete+0x48> (*the_extension->Callouts.thread_delete)(
8005a7c: 29 81 00 00 lw r1,(r12+0) 8005a80: 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 ) {
8005a84: 29 6b 00 04 lw r11,(r11+4)
) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 8005a88: 5d 6d ff fa bne r11,r13,8005a70 <_User_extensions_Thread_delete+0x34> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } }
8005a8c: 2b 9d 00 04 lw ra,(sp+4) 8005a90: 2b 8b 00 14 lw r11,(sp+20) 8005a94: 2b 8c 00 10 lw r12,(sp+16) 8005a98: 2b 8d 00 0c lw r13,(sp+12) 8005a9c: 2b 8e 00 08 lw r14,(sp+8) 8005aa0: 37 9c 00 14 addi sp,sp,20 8005aa4: c3 a0 00 00 ret
080058f4 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) {
80058f4: 37 9c ff f0 addi sp,sp,-16 80058f8: 5b 8b 00 10 sw (sp+16),r11 80058fc: 5b 8c 00 0c sw (sp+12),r12 8005900: 5b 8d 00 08 sw (sp+8),r13 8005904: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ;
8005908: 78 0c 08 01 mvhi r12,0x801 800590c: 39 8c c9 cc ori r12,r12,0xc9cc 8005910: 29 8b 00 08 lw r11,(r12+8)
} void _User_extensions_Thread_exitted ( Thread_Control *executing ) {
8005914: b8 20 68 00 mv r13,r1
Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ;
8005918: 45 6c 00 07 be r11,r12,8005934 <_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 )
800591c: 29 62 00 2c lw r2,(r11+44)
(*the_extension->Callouts.thread_exitted)( executing );
8005920: 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 ) 8005924: 44 40 00 02 be r2,r0,800592c <_User_extensions_Thread_exitted+0x38> (*the_extension->Callouts.thread_exitted)( executing );
8005928: 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 ) {
800592c: 29 6b 00 04 lw r11,(r11+4)
) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 8005930: 5d 6c ff fb bne r11,r12,800591c <_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 ); } }
8005934: 2b 9d 00 04 lw ra,(sp+4) 8005938: 2b 8b 00 10 lw r11,(sp+16) 800593c: 2b 8c 00 0c lw r12,(sp+12) 8005940: 2b 8d 00 08 lw r13,(sp+8) 8005944: 37 9c 00 10 addi sp,sp,16 8005948: c3 a0 00 00 ret
08006b9c <_User_extensions_Thread_restart>: #include <rtems/score/userext.h> void _User_extensions_Thread_restart ( Thread_Control *the_thread ) {
8006b9c: 37 9c ff ec addi sp,sp,-20 8006ba0: 5b 8b 00 14 sw (sp+20),r11 8006ba4: 5b 8c 00 10 sw (sp+16),r12 8006ba8: 5b 8d 00 0c sw (sp+12),r13 8006bac: 5b 8e 00 08 sw (sp+8),r14 8006bb0: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ;
8006bb4: 78 0d 08 02 mvhi r13,0x802 8006bb8: 39 ad 1a 2c ori r13,r13,0x1a2c 8006bbc: 29 ab 00 00 lw r11,(r13+0) 8006bc0: 35 ad 00 04 addi r13,r13,4
#include <rtems/score/userext.h> void _User_extensions_Thread_restart ( Thread_Control *the_thread ) {
8006bc4: b8 20 70 00 mv r14,r1
Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ;
8006bc8: 45 6d 00 0a be r11,r13,8006bf0 <_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)(
8006bcc: 78 0c 08 02 mvhi r12,0x802 8006bd0: 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 )
8006bd4: 29 63 00 1c lw r3,(r11+28)
(*the_extension->Callouts.thread_restart)(
8006bd8: 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 ) 8006bdc: 44 60 00 03 be r3,r0,8006be8 <_User_extensions_Thread_restart+0x4c> (*the_extension->Callouts.thread_restart)(
8006be0: 29 81 00 00 lw r1,(r12+0) 8006be4: 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 ) {
8006be8: 29 6b 00 00 lw r11,(r11+0)
) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 8006bec: 5d 6d ff fa bne r11,r13,8006bd4 <_User_extensions_Thread_restart+0x38> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } }
8006bf0: 2b 9d 00 04 lw ra,(sp+4) 8006bf4: 2b 8b 00 14 lw r11,(sp+20) 8006bf8: 2b 8c 00 10 lw r12,(sp+16) 8006bfc: 2b 8d 00 0c lw r13,(sp+12) 8006c00: 2b 8e 00 08 lw r14,(sp+8) 8006c04: 37 9c 00 14 addi sp,sp,20 8006c08: c3 a0 00 00 ret
08005aa8 <_User_extensions_Thread_start>: #include <rtems/score/userext.h> void _User_extensions_Thread_start ( Thread_Control *the_thread ) {
8005aa8: 37 9c ff ec addi sp,sp,-20 8005aac: 5b 8b 00 14 sw (sp+20),r11 8005ab0: 5b 8c 00 10 sw (sp+16),r12 8005ab4: 5b 8d 00 0c sw (sp+12),r13 8005ab8: 5b 8e 00 08 sw (sp+8),r14 8005abc: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ;
8005ac0: 78 0d 08 01 mvhi r13,0x801 8005ac4: 39 ad c9 cc ori r13,r13,0xc9cc 8005ac8: 29 ab 00 00 lw r11,(r13+0) 8005acc: 35 ad 00 04 addi r13,r13,4
#include <rtems/score/userext.h> void _User_extensions_Thread_start ( Thread_Control *the_thread ) {
8005ad0: b8 20 70 00 mv r14,r1
Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ;
8005ad4: 45 6d 00 0a be r11,r13,8005afc <_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)(
8005ad8: 78 0c 08 01 mvhi r12,0x801 8005adc: 39 8c c8 e0 ori r12,r12,0xc8e0
!_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 )
8005ae0: 29 63 00 18 lw r3,(r11+24)
(*the_extension->Callouts.thread_start)(
8005ae4: 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 ) 8005ae8: 44 60 00 03 be r3,r0,8005af4 <_User_extensions_Thread_start+0x4c> (*the_extension->Callouts.thread_start)(
8005aec: 29 81 00 00 lw r1,(r12+0) 8005af0: 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 ) {
8005af4: 29 6b 00 00 lw r11,(r11+0)
) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 8005af8: 5d 6d ff fa bne r11,r13,8005ae0 <_User_extensions_Thread_start+0x38> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } }
8005afc: 2b 9d 00 04 lw ra,(sp+4) 8005b00: 2b 8b 00 14 lw r11,(sp+20) 8005b04: 2b 8c 00 10 lw r12,(sp+16) 8005b08: 2b 8d 00 0c lw r13,(sp+12) 8005b0c: 2b 8e 00 08 lw r14,(sp+8) 8005b10: 37 9c 00 14 addi sp,sp,20 8005b14: c3 a0 00 00 ret
08005b18 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) {
8005b18: 37 9c ff ec addi sp,sp,-20 8005b1c: 5b 8b 00 14 sw (sp+20),r11 8005b20: 5b 8c 00 10 sw (sp+16),r12 8005b24: 5b 8d 00 0c sw (sp+12),r13 8005b28: 5b 8e 00 08 sw (sp+8),r14 8005b2c: 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 ;
8005b30: 78 0c 08 01 mvhi r12,0x801 8005b34: 39 8c c8 28 ori r12,r12,0xc828 8005b38: 29 8b 00 00 lw r11,(r12+0) 8005b3c: 35 8c 00 04 addi r12,r12,4
void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) {
8005b40: b8 20 70 00 mv r14,r1 8005b44: 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 ;
8005b48: 45 6c 00 07 be r11,r12,8005b64 <_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 );
8005b4c: 29 63 00 08 lw r3,(r11+8) 8005b50: b9 c0 08 00 mv r1,r14 8005b54: b9 a0 10 00 mv r2,r13 8005b58: 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 ) {
8005b5c: 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 ; 8005b60: 5d 6c ff fb bne r11,r12,8005b4c <_User_extensions_Thread_switch+0x34> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } }
8005b64: 2b 9d 00 04 lw ra,(sp+4) 8005b68: 2b 8b 00 14 lw r11,(sp+20) 8005b6c: 2b 8c 00 10 lw r12,(sp+16) 8005b70: 2b 8d 00 0c lw r13,(sp+12) 8005b74: 2b 8e 00 08 lw r14,(sp+8) 8005b78: 37 9c 00 14 addi sp,sp,20 8005b7c: c3 a0 00 00 ret
08007f64 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) {
8007f64: 37 9c ff e4 addi sp,sp,-28 8007f68: 5b 8b 00 1c sw (sp+28),r11 8007f6c: 5b 8c 00 18 sw (sp+24),r12 8007f70: 5b 8d 00 14 sw (sp+20),r13 8007f74: 5b 8e 00 10 sw (sp+16),r14 8007f78: 5b 8f 00 0c sw (sp+12),r15 8007f7c: 5b 90 00 08 sw (sp+8),r16 8007f80: 5b 9d 00 04 sw (sp+4),ra 8007f84: b8 20 60 00 mv r12,r1 8007f88: b8 60 58 00 mv r11,r3
ISR_Level level; _ISR_Disable( level );
8007f8c: 90 00 20 00 rcsr r4,IE 8007f90: 34 01 ff fe mvi r1,-2 8007f94: a0 81 08 00 and r1,r4,r1 8007f98: 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));
8007f9c: 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;
8007fa0: 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 ) ) { 8007fa4: 44 2e 00 04 be r1,r14,8007fb4 <_Watchdog_Adjust+0x50> switch ( direction ) { 8007fa8: 44 40 00 11 be r2,r0,8007fec <_Watchdog_Adjust+0x88>
8007fac: 34 03 00 01 mvi r3,1
8007fb0: 44 43 00 0b be r2,r3,8007fdc <_Watchdog_Adjust+0x78> <== ALWAYS TAKEN
} break; } } _ISR_Enable( level );
8007fb4: d0 04 00 00 wcsr IE,r4
}
8007fb8: 2b 9d 00 04 lw ra,(sp+4) 8007fbc: 2b 8b 00 1c lw r11,(sp+28) 8007fc0: 2b 8c 00 18 lw r12,(sp+24) 8007fc4: 2b 8d 00 14 lw r13,(sp+20) 8007fc8: 2b 8e 00 10 lw r14,(sp+16) 8007fcc: 2b 8f 00 0c lw r15,(sp+12) 8007fd0: 2b 90 00 08 lw r16,(sp+8) 8007fd4: 37 9c 00 1c addi sp,sp,28 8007fd8: 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;
8007fdc: 28 22 00 10 lw r2,(r1+16) 8007fe0: b4 4b 58 00 add r11,r2,r11 8007fe4: 58 2b 00 10 sw (r1+16),r11
break;
8007fe8: e3 ff ff f3 bi 8007fb4 <_Watchdog_Adjust+0x50>
case WATCHDOG_FORWARD: while ( units ) {
8007fec: 44 62 ff f2 be r3,r2,8007fb4 <_Watchdog_Adjust+0x50> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
8007ff0: 28 2d 00 10 lw r13,(r1+16)
_Watchdog_First( header )->delta_interval -= units; break;
8007ff4: b8 80 18 00 mv r3,r4
} else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1;
8007ff8: 34 10 00 01 mvi r16,1
_ISR_Enable( level ); _Watchdog_Tickle( header ); _ISR_Disable( level );
8007ffc: 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 ) {
8008000: 51 6d 00 02 bgeu r11,r13,8008008 <_Watchdog_Adjust+0xa4> <== ALWAYS TAKEN
8008004: e0 00 00 11 bi 8008048 <_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;
8008008: 58 30 00 10 sw (r1+16),r16
_ISR_Enable( level );
800800c: d0 03 00 00 wcsr IE,r3
_Watchdog_Tickle( header );
8008010: b9 80 08 00 mv r1,r12 8008014: f8 00 00 b0 calli 80082d4 <_Watchdog_Tickle>
_ISR_Disable( level );
8008018: 90 00 10 00 rcsr r2,IE 800801c: a0 4f 08 00 and r1,r2,r15 8008020: 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));
8008024: 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;
8008028: 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 ) {
800802c: b8 40 18 00 mv r3,r2
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first );
8008030: b8 80 08 00 mv r1,r4
_Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 8008034: 45 c4 00 08 be r14,r4,8008054 <_Watchdog_Adjust+0xf0> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) {
8008038: 45 60 00 07 be r11,r0,8008054 <_Watchdog_Adjust+0xf0> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
800803c: 28 2d 00 10 lw r13,(r1+16)
8008040: 51 6d ff f2 bgeu r11,r13,8008008 <_Watchdog_Adjust+0xa4>
8008044: b8 60 20 00 mv r4,r3
_Watchdog_First( header )->delta_interval -= units;
8008048: c9 ab 58 00 sub r11,r13,r11 800804c: 58 2b 00 10 sw (r1+16),r11
break;
8008050: e3 ff ff d9 bi 8007fb4 <_Watchdog_Adjust+0x50>
switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) {
8008054: b8 40 20 00 mv r4,r2 8008058: e3 ff ff d7 bi 8007fb4 <_Watchdog_Adjust+0x50>
08005b80 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) {
8005b80: 37 9c ff f8 addi sp,sp,-8 8005b84: 5b 8b 00 08 sw (sp+8),r11 8005b88: 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;
8005b8c: 78 03 08 01 mvhi r3,0x801 8005b90: 38 63 c8 bc ori r3,r3,0xc8bc 8005b94: 28 69 00 00 lw r9,(r3+0)
_ISR_Disable( level );
8005b98: 90 00 30 00 rcsr r6,IE 8005b9c: 34 08 ff fe mvi r8,-2 8005ba0: a0 c8 40 00 and r8,r6,r8 8005ba4: 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 ) {
8005ba8: 28 43 00 08 lw r3,(r2+8)
8005bac: 5c 60 00 3e bne r3,r0,8005ca4 <_Watchdog_Insert+0x124> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++;
8005bb0: 78 0c 08 01 mvhi r12,0x801 8005bb4: 39 8c c9 70 ori r12,r12,0xc970 8005bb8: 29 83 00 00 lw r3,(r12+0)
if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED;
8005bbc: 34 0a 00 01 mvi r10,1 8005bc0: 78 07 08 01 mvhi r7,0x801
_Watchdog_Sync_count++;
8005bc4: b4 6a 18 00 add r3,r3,r10 8005bc8: 59 83 00 00 sw (r12+0),r3
if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED;
8005bcc: 58 4a 00 08 sw (r2+8),r10 8005bd0: 38 e7 c8 dc ori r7,r7,0xc8dc
_Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial;
8005bd4: 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 ;
8005bd8: 28 23 00 00 lw r3,(r1+0)
; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 8005bdc: 44 80 00 14 be r4,r0,8005c2c <_Watchdog_Insert+0xac>
8005be0: 28 65 00 00 lw r5,(r3+0)
8005be4: 44 a0 00 12 be r5,r0,8005c2c <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) {
8005be8: 28 65 00 10 lw r5,(r3+16)
8005bec: 54 a4 00 0e bgu r5,r4,8005c24 <_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 );
8005bf0: d0 06 00 00 wcsr IE,r6 8005bf4: d0 08 00 00 wcsr IE,r8
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
8005bf8: 28 4b 00 08 lw r11,(r2+8)
8005bfc: 5d 6a 00 19 bne r11,r10,8005c60 <_Watchdog_Insert+0xe0> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
8005c00: 28 eb 00 00 lw r11,(r7+0)
8005c04: 55 69 00 2d bgu r11,r9,8005cb8 <_Watchdog_Insert+0x138> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval;
8005c08: 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 );
8005c0c: 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 ) ) 8005c10: 44 80 00 07 be r4,r0,8005c2c <_Watchdog_Insert+0xac>
8005c14: 28 65 00 00 lw r5,(r3+0)
8005c18: 44 a0 00 05 be r5,r0,8005c2c <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) {
8005c1c: 28 65 00 10 lw r5,(r3+16)
8005c20: 50 85 00 19 bgeu r4,r5,8005c84 <_Watchdog_Insert+0x104> after->delta_interval -= delta_interval;
8005c24: c8 a4 28 00 sub r5,r5,r4 8005c28: 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 );
8005c2c: 28 63 00 04 lw r3,(r3+4)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
8005c30: 78 01 08 01 mvhi r1,0x801 8005c34: 38 21 c9 74 ori r1,r1,0xc974
} } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval;
8005c38: 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;
8005c3c: 28 24 00 00 lw r4,(r1+0)
) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next;
8005c40: 28 61 00 00 lw r1,(r3+0)
Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node;
8005c44: 58 43 00 04 sw (r2+4),r3
before_node = after_node->next; after_node->next = the_node;
8005c48: 58 62 00 00 sw (r3+0),r2
RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE;
8005c4c: 34 03 00 02 mvi r3,2 8005c50: 58 44 00 14 sw (r2+20),r4 8005c54: 58 43 00 08 sw (r2+8),r3
the_node->next = before_node; before_node->previous = the_node;
8005c58: 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;
8005c5c: 58 41 00 00 sw (r2+0),r1
exit_insert: _Watchdog_Sync_level = insert_isr_nest_level;
8005c60: 58 e9 00 00 sw (r7+0),r9
_Watchdog_Sync_count--;
8005c64: 29 81 00 00 lw r1,(r12+0) 8005c68: 34 21 ff ff addi r1,r1,-1 8005c6c: 59 81 00 00 sw (r12+0),r1
_ISR_Enable( level );
8005c70: d0 06 00 00 wcsr IE,r6
}
8005c74: 2b 8b 00 08 lw r11,(sp+8) 8005c78: 2b 8c 00 04 lw r12,(sp+4) 8005c7c: 37 9c 00 08 addi sp,sp,8 8005c80: 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 );
8005c84: d0 06 00 00 wcsr IE,r6 8005c88: d0 08 00 00 wcsr IE,r8
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
8005c8c: 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;
8005c90: 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 ) {
8005c94: 5d 6a ff f3 bne r11,r10,8005c60 <_Watchdog_Insert+0xe0> <== NEVER TAKEN
goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
8005c98: 28 e5 00 00 lw r5,(r7+0)
8005c9c: 54 a9 00 07 bgu r5,r9,8005cb8 <_Watchdog_Insert+0x138> <== NEVER TAKEN
8005ca0: e3 ff ff db bi 8005c0c <_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 );
8005ca4: d0 06 00 00 wcsr IE,r6
exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); }
8005ca8: 2b 8b 00 08 lw r11,(sp+8) 8005cac: 2b 8c 00 04 lw r12,(sp+4) 8005cb0: 37 9c 00 08 addi sp,sp,8 8005cb4: 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;
8005cb8: 58 e9 00 00 sw (r7+0),r9
goto restart;
8005cbc: e3 ff ff c6 bi 8005bd4 <_Watchdog_Insert+0x54>
08005d1c <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level );
8005d1c: 90 00 20 00 rcsr r4,IE 8005d20: 34 02 ff fe mvi r2,-2 8005d24: a0 82 10 00 and r2,r4,r2 8005d28: d0 02 00 00 wcsr IE,r2
previous_state = the_watchdog->state;
8005d2c: 28 22 00 08 lw r2,(r1+8)
switch ( previous_state ) {
8005d30: 34 03 00 01 mvi r3,1
8005d34: 44 43 00 28 be r2,r3,8005dd4 <_Watchdog_Remove+0xb8> 8005d38: 5c 40 00 08 bne r2,r0,8005d58 <_Watchdog_Remove+0x3c> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
8005d3c: 78 03 08 01 mvhi r3,0x801 8005d40: 38 63 c9 74 ori r3,r3,0xc974 8005d44: 28 63 00 00 lw r3,(r3+0) 8005d48: 58 23 00 18 sw (r1+24),r3
_ISR_Enable( level );
8005d4c: d0 04 00 00 wcsr IE,r4
return( previous_state ); }
8005d50: b8 40 08 00 mv r1,r2 8005d54: c3 a0 00 00 ret
Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) {
8005d58: 34 03 00 03 mvi r3,3
8005d5c: 54 43 ff f8 bgu r2,r3,8005d3c <_Watchdog_Remove+0x20> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next );
8005d60: 28 23 00 00 lw r3,(r1+0)
break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE;
8005d64: 34 05 00 00 mvi r5,0 8005d68: 58 25 00 08 sw (r1+8),r5
next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) )
8005d6c: 28 65 00 00 lw r5,(r3+0)
8005d70: 44 a0 00 05 be r5,r0,8005d84 <_Watchdog_Remove+0x68> next_watchdog->delta_interval += the_watchdog->delta_interval;
8005d74: 28 66 00 10 lw r6,(r3+16) 8005d78: 28 25 00 10 lw r5,(r1+16) 8005d7c: b4 c5 28 00 add r5,r6,r5 8005d80: 58 65 00 10 sw (r3+16),r5
if ( _Watchdog_Sync_count )
8005d84: 78 05 08 01 mvhi r5,0x801 8005d88: 38 a5 c9 70 ori r5,r5,0xc970 8005d8c: 28 a5 00 00 lw r5,(r5+0)
8005d90: 44 a0 00 07 be r5,r0,8005dac <_Watchdog_Remove+0x90> _Watchdog_Sync_level = _ISR_Nest_level;
8005d94: 78 05 08 01 mvhi r5,0x801 8005d98: 38 a5 c8 bc ori r5,r5,0xc8bc 8005d9c: 28 a6 00 00 lw r6,(r5+0) 8005da0: 78 05 08 01 mvhi r5,0x801 8005da4: 38 a5 c8 dc ori r5,r5,0xc8dc 8005da8: 58 a6 00 00 sw (r5+0),r6
{ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous;
8005dac: 28 25 00 04 lw r5,(r1+4)
next->previous = previous; previous->next = next;
8005db0: 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;
8005db4: 58 65 00 04 sw (r3+4),r5
_Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
8005db8: 78 03 08 01 mvhi r3,0x801 8005dbc: 38 63 c9 74 ori r3,r3,0xc974 8005dc0: 28 63 00 00 lw r3,(r3+0) 8005dc4: 58 23 00 18 sw (r1+24),r3
_ISR_Enable( level );
8005dc8: d0 04 00 00 wcsr IE,r4
return( previous_state ); }
8005dcc: b8 40 08 00 mv r1,r2 8005dd0: 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;
8005dd4: 34 03 00 00 mvi r3,0 8005dd8: 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;
8005ddc: 78 03 08 01 mvhi r3,0x801 8005de0: 38 63 c9 74 ori r3,r3,0xc974 8005de4: 28 63 00 00 lw r3,(r3+0) 8005de8: 58 23 00 18 sw (r1+24),r3
_ISR_Enable( level );
8005dec: d0 04 00 00 wcsr IE,r4
return( previous_state ); }
8005df0: b8 40 08 00 mv r1,r2 8005df4: c3 a0 00 00 ret
08007c9c <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) {
8007c9c: 37 9c ff ec addi sp,sp,-20 8007ca0: 5b 8b 00 14 sw (sp+20),r11 8007ca4: 5b 8c 00 10 sw (sp+16),r12 8007ca8: 5b 8d 00 0c sw (sp+12),r13 8007cac: 5b 8e 00 08 sw (sp+8),r14 8007cb0: 5b 9d 00 04 sw (sp+4),ra 8007cb4: b8 20 70 00 mv r14,r1 8007cb8: b8 40 60 00 mv r12,r2
ISR_Level level; Chain_Node *node; _ISR_Disable( level );
8007cbc: 90 00 68 00 rcsr r13,IE 8007cc0: 34 01 ff fe mvi r1,-2 8007cc4: a1 a1 08 00 and r1,r13,r1 8007cc8: d0 01 00 00 wcsr IE,r1
printk( "Watchdog Chain: %s %p\n", name, header );
8007ccc: 78 01 08 02 mvhi r1,0x802 8007cd0: b9 80 18 00 mv r3,r12 8007cd4: 38 21 06 88 ori r1,r1,0x688 8007cd8: b9 c0 10 00 mv r2,r14 8007cdc: fb ff eb dd calli 8002c50 <printk>
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
8007ce0: 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;
8007ce4: 35 8c 00 04 addi r12,r12,4
if ( !_Chain_Is_empty( header ) ) { 8007ce8: 45 6c 00 12 be r11,r12,8007d30 <_Watchdog_Report_chain+0x94> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch );
8007cec: b9 60 10 00 mv r2,r11 8007cf0: 34 01 00 00 mvi r1,0 8007cf4: f8 00 00 13 calli 8007d40 <_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 )
8007cf8: 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 ;
8007cfc: 5d 6c ff fc bne r11,r12,8007cec <_Watchdog_Report_chain+0x50><== NEVER TAKEN
{ Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name );
8007d00: 78 01 08 02 mvhi r1,0x802 8007d04: 38 21 06 a0 ori r1,r1,0x6a0 8007d08: b9 c0 10 00 mv r2,r14 8007d0c: fb ff eb d1 calli 8002c50 <printk>
} else { printk( "Chain is empty\n" ); } _ISR_Enable( level );
8007d10: d0 0d 00 00 wcsr IE,r13
}
8007d14: 2b 9d 00 04 lw ra,(sp+4) 8007d18: 2b 8b 00 14 lw r11,(sp+20) 8007d1c: 2b 8c 00 10 lw r12,(sp+16) 8007d20: 2b 8d 00 0c lw r13,(sp+12) 8007d24: 2b 8e 00 08 lw r14,(sp+8) 8007d28: 37 9c 00 14 addi sp,sp,20 8007d2c: c3 a0 00 00 ret
_Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" );
8007d30: 78 01 08 02 mvhi r1,0x802 8007d34: 38 21 06 b0 ori r1,r1,0x6b0 8007d38: fb ff eb c6 calli 8002c50 <printk> 8007d3c: e3 ff ff f5 bi 8007d10 <_Watchdog_Report_chain+0x74>
08005df8 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) {
8005df8: 37 9c ff e4 addi sp,sp,-28 8005dfc: 5b 8b 00 1c sw (sp+28),r11 8005e00: 5b 8c 00 18 sw (sp+24),r12 8005e04: 5b 8d 00 14 sw (sp+20),r13 8005e08: 5b 8e 00 10 sw (sp+16),r14 8005e0c: 5b 8f 00 0c sw (sp+12),r15 8005e10: 5b 90 00 08 sw (sp+8),r16 8005e14: 5b 9d 00 04 sw (sp+4),ra 8005e18: 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 );
8005e1c: 90 00 68 00 rcsr r13,IE 8005e20: 34 01 ff fe mvi r1,-2 8005e24: a1 a1 08 00 and r1,r13,r1 8005e28: 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));
8005e2c: 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;
8005e30: 35 8e 00 04 addi r14,r12,4
if ( _Chain_Is_empty( header ) ) 8005e34: 45 6e 00 2b be r11,r14,8005ee0 <_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) {
8005e38: 29 61 00 10 lw r1,(r11+16)
8005e3c: 5c 20 00 26 bne r1,r0,8005ed4 <_Watchdog_Tickle+0xdc> do { watchdog_state = _Watchdog_Remove( the_watchdog ); _ISR_Enable( level ); switch( watchdog_state ) {
8005e40: 34 10 00 02 mvi r16,2
case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level );
8005e44: 34 0f ff fe mvi r15,-2 8005e48: e0 00 00 0a bi 8005e70 <_Watchdog_Tickle+0x78> 8005e4c: 90 00 10 00 rcsr r2,IE 8005e50: a0 4f 08 00 and r1,r2,r15 8005e54: d0 01 00 00 wcsr IE,r1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first );
8005e58: 29 81 00 00 lw r1,(r12+0) 8005e5c: b8 40 68 00 mv r13,r2 8005e60: b8 20 58 00 mv r11,r1
the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) );
8005e64: 45 c1 00 12 be r14,r1,8005eac <_Watchdog_Tickle+0xb4> <== ALWAYS TAKEN
8005e68: 28 21 00 10 lw r1,(r1+16)
8005e6c: 5c 20 00 10 bne r1,r0,8005eac <_Watchdog_Tickle+0xb4> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog );
8005e70: b9 60 08 00 mv r1,r11 8005e74: fb ff ff aa calli 8005d1c <_Watchdog_Remove>
_ISR_Enable( level );
8005e78: d0 0d 00 00 wcsr IE,r13
switch( watchdog_state ) { 8005e7c: 5c 30 ff f4 bne r1,r16,8005e4c <_Watchdog_Tickle+0x54> case WATCHDOG_ACTIVE: (*the_watchdog->routine)(
8005e80: 29 62 00 24 lw r2,(r11+36) 8005e84: 29 63 00 1c lw r3,(r11+28) 8005e88: 29 61 00 20 lw r1,(r11+32) 8005e8c: d8 60 00 00 call r3
case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level );
8005e90: 90 00 10 00 rcsr r2,IE 8005e94: a0 4f 08 00 and r1,r2,r15 8005e98: d0 01 00 00 wcsr IE,r1 8005e9c: 29 81 00 00 lw r1,(r12+0) 8005ea0: b8 40 68 00 mv r13,r2 8005ea4: b8 20 58 00 mv r11,r1
the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8005ea8: 5d c1 ff f0 bne r14,r1,8005e68 <_Watchdog_Tickle+0x70> leave: _ISR_Enable(level);
8005eac: d0 02 00 00 wcsr IE,r2
}
8005eb0: 2b 9d 00 04 lw ra,(sp+4) 8005eb4: 2b 8b 00 1c lw r11,(sp+28) 8005eb8: 2b 8c 00 18 lw r12,(sp+24) 8005ebc: 2b 8d 00 14 lw r13,(sp+20) 8005ec0: 2b 8e 00 10 lw r14,(sp+16) 8005ec4: 2b 8f 00 0c lw r15,(sp+12) 8005ec8: 2b 90 00 08 lw r16,(sp+8) 8005ecc: 37 9c 00 1c addi sp,sp,28 8005ed0: 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--;
8005ed4: 34 21 ff ff addi r1,r1,-1 8005ed8: 59 61 00 10 sw (r11+16),r1
if ( the_watchdog->delta_interval != 0 ) 8005edc: 44 20 ff d9 be r1,r0,8005e40 <_Watchdog_Tickle+0x48> _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) );
8005ee0: b9 a0 10 00 mv r2,r13 8005ee4: e3 ff ff f2 bi 8005eac <_Watchdog_Tickle+0xb4>
08005ee8 <_Workspace_Allocate_or_fatal_error>: * _Workspace_Allocate_or_fatal_error */ void *_Workspace_Allocate_or_fatal_error( size_t size ) {
8005ee8: 37 9c ff fc addi sp,sp,-4 8005eec: 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 );
8005ef0: 34 03 00 00 mvi r3,0 8005ef4: b8 20 10 00 mv r2,r1 8005ef8: 78 01 08 01 mvhi r1,0x801 8005efc: 38 21 c8 48 ori r1,r1,0xc848 8005f00: b8 60 20 00 mv r4,r3 8005f04: f8 00 0b a8 calli 8008da4 <_Heap_Allocate_aligned_with_boundary>
__builtin_return_address( 1 ), memory ); #endif if ( memory == NULL )
8005f08: 44 20 00 04 be r1,r0,8005f18 <_Workspace_Allocate_or_fatal_error+0x30><== NEVER TAKEN
true, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; }
8005f0c: 2b 9d 00 04 lw ra,(sp+4) 8005f10: 37 9c 00 04 addi sp,sp,4 8005f14: c3 a0 00 00 ret
memory ); #endif if ( memory == NULL ) _Internal_error_Occurred(
8005f18: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8005f1c: 34 03 00 04 mvi r3,4 <== NOT EXECUTED 8005f20: fb ff f5 f7 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 cc ori r2,r2,0xedcc <== 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
0800b214 <rtems_io_read>: rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) {
800b214: 37 9c ff ec addi sp,sp,-20 800b218: 5b 8b 00 10 sw (sp+16),r11 800b21c: 5b 8c 00 0c sw (sp+12),r12 800b220: 5b 8d 00 08 sw (sp+8),r13 800b224: 5b 9d 00 04 sw (sp+4),ra
rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers )
800b228: 78 04 08 01 mvhi r4,0x801 800b22c: 38 84 ca 64 ori r4,r4,0xca64 800b230: 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 ) {
800b234: b8 20 58 00 mv r11,r1 800b238: b8 40 60 00 mv r12,r2
rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 800b23c: 54 81 00 08 bgu r4,r1,800b25c <rtems_io_read+0x48>
800b240: 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; }
800b244: 2b 9d 00 04 lw ra,(sp+4) 800b248: 2b 8b 00 10 lw r11,(sp+16) 800b24c: 2b 8c 00 0c lw r12,(sp+12) 800b250: 2b 8d 00 08 lw r13,(sp+8) 800b254: 37 9c 00 14 addi sp,sp,20 800b258: 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;
800b25c: 78 01 08 01 mvhi r1,0x801 800b260: 38 21 ca 68 ori r1,r1,0xca68 800b264: 28 2d 00 00 lw r13,(r1+0) 800b268: b5 6b 08 00 add r1,r11,r11 800b26c: b4 2b 08 00 add r1,r1,r11 800b270: 34 02 00 03 mvi r2,3 800b274: 5b 83 00 14 sw (sp+20),r3 800b278: fb ff d3 de calli 80001f0 <__ashlsi3> 800b27c: b5 a1 08 00 add r1,r13,r1 800b280: 28 24 00 0c lw r4,(r1+12)
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
800b284: 2b 83 00 14 lw r3,(sp+20) 800b288: b8 80 08 00 mv r1,r4
800b28c: 44 80 ff ee be r4,r0,800b244 <rtems_io_read+0x30> <== NEVER TAKEN
800b290: b9 60 08 00 mv r1,r11 800b294: b9 80 10 00 mv r2,r12 800b298: d8 80 00 00 call r4
}
800b29c: 2b 9d 00 04 lw ra,(sp+4) 800b2a0: 2b 8b 00 10 lw r11,(sp+16) 800b2a4: 2b 8c 00 0c lw r12,(sp+12) 800b2a8: 2b 8d 00 08 lw r13,(sp+8) 800b2ac: 37 9c 00 14 addi sp,sp,20 800b2b0: c3 a0 00 00 ret
08004e04 <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 ) {
8004e04: 37 9c ff ec addi sp,sp,-20 8004e08: 5b 8b 00 10 sw (sp+16),r11 8004e0c: 5b 8c 00 0c sw (sp+12),r12 8004e10: 5b 8d 00 08 sw (sp+8),r13 8004e14: 5b 9d 00 04 sw (sp+4),ra
rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() )
8004e18: 78 04 08 02 mvhi r4,0x802 8004e1c: 38 84 49 4c ori r4,r4,0x494c 8004e20: 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;
8004e24: 78 04 08 02 mvhi r4,0x802 8004e28: 38 84 4b 68 ori r4,r4,0x4b68
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 ) {
8004e2c: b8 20 58 00 mv r11,r1 8004e30: b8 40 60 00 mv r12,r2
rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() )
8004e34: 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;
8004e38: 28 82 00 00 lw r2,(r4+0)
if ( rtems_interrupt_is_in_progress() ) 8004e3c: 5c a0 00 08 bne r5,r0,8004e5c <rtems_io_register_driver+0x58> return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 8004e40: 44 65 00 52 be r3,r5,8004f88 <rtems_io_register_driver+0x184> return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit;
8004e44: 58 62 00 00 sw (r3+0),r2
if ( driver_table == NULL ) 8004e48: 45 80 00 50 be r12,r0,8004f88 <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;
8004e4c: 29 81 00 00 lw r1,(r12+0)
8004e50: 44 20 00 4c be r1,r0,8004f80 <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 ) 8004e54: 54 4b 00 08 bgu r2,r11,8004e74 <rtems_io_register_driver+0x70>
8004e58: 34 01 00 0a mvi r1,10
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); }
8004e5c: 2b 9d 00 04 lw ra,(sp+4) 8004e60: 2b 8b 00 10 lw r11,(sp+16) 8004e64: 2b 8c 00 0c lw r12,(sp+12) 8004e68: 2b 8d 00 08 lw r13,(sp+8) 8004e6c: 37 9c 00 14 addi sp,sp,20 8004e70: c3 a0 00 00 ret
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
8004e74: 78 01 08 02 mvhi r1,0x802 8004e78: 38 21 48 b4 ori r1,r1,0x48b4 8004e7c: 28 22 00 00 lw r2,(r1+0) 8004e80: 34 42 00 01 addi r2,r2,1 8004e84: 58 22 00 00 sw (r1+0),r2
if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 8004e88: 5d 60 00 2a bne r11,r0,8004f30 <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;
8004e8c: 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 ) {
8004e90: 44 8b 00 48 be r4,r11,8004fb0 <rtems_io_register_driver+0x1ac><== NEVER TAKEN
8004e94: 78 01 08 02 mvhi r1,0x802 8004e98: 38 21 4b 6c ori r1,r1,0x4b6c 8004e9c: 28 2d 00 00 lw r13,(r1+0) 8004ea0: 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;
8004ea4: 28 22 00 00 lw r2,(r1+0)
8004ea8: 44 40 00 3f be r2,r0,8004fa4 <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 ) {
8004eac: 35 6b 00 01 addi r11,r11,1 8004eb0: 34 21 00 18 addi r1,r1,24
8004eb4: 54 8b ff fc bgu r4,r11,8004ea4 <rtems_io_register_driver+0xa0> if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m;
8004eb8: 58 6b 00 00 sw (r3+0),r11
if ( m != n ) 8004ebc: 44 8b 00 3e be r4,r11,8004fb4 <rtems_io_register_driver+0x1b0>
8004ec0: b5 6b 08 00 add r1,r11,r11 8004ec4: b4 2b 08 00 add r1,r1,r11 8004ec8: 34 02 00 03 mvi r2,3 8004ecc: fb ff ef 46 calli 8000be4 <__ashlsi3> 8004ed0: b5 a1 08 00 add r1,r13,r1
} *registered_major = major; } _IO_Driver_address_table [major] = *driver_table;
8004ed4: 29 82 00 00 lw r2,(r12+0) 8004ed8: 58 22 00 00 sw (r1+0),r2 8004edc: 29 82 00 04 lw r2,(r12+4) 8004ee0: 58 22 00 04 sw (r1+4),r2 8004ee4: 29 82 00 08 lw r2,(r12+8) 8004ee8: 58 22 00 08 sw (r1+8),r2 8004eec: 29 82 00 0c lw r2,(r12+12) 8004ef0: 58 22 00 0c sw (r1+12),r2 8004ef4: 29 82 00 10 lw r2,(r12+16) 8004ef8: 58 22 00 10 sw (r1+16),r2 8004efc: 29 8c 00 14 lw r12,(r12+20) 8004f00: 58 2c 00 14 sw (r1+20),r12
_Thread_Enable_dispatch();
8004f04: f8 00 07 ca calli 8006e2c <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
8004f08: 34 02 00 00 mvi r2,0 8004f0c: b9 60 08 00 mv r1,r11 8004f10: b8 40 18 00 mv r3,r2 8004f14: f8 00 28 bc calli 800f204 <rtems_io_initialize>
}
8004f18: 2b 9d 00 04 lw ra,(sp+4) 8004f1c: 2b 8b 00 10 lw r11,(sp+16) 8004f20: 2b 8c 00 0c lw r12,(sp+12) 8004f24: 2b 8d 00 08 lw r13,(sp+8) 8004f28: 37 9c 00 14 addi sp,sp,20 8004f2c: 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;
8004f30: b5 6b 08 00 add r1,r11,r11 8004f34: 34 02 00 03 mvi r2,3 8004f38: 78 0d 08 02 mvhi r13,0x802 8004f3c: b4 2b 08 00 add r1,r1,r11 8004f40: 5b 83 00 14 sw (sp+20),r3 8004f44: 39 ad 4b 6c ori r13,r13,0x4b6c 8004f48: fb ff ef 27 calli 8000be4 <__ashlsi3> 8004f4c: 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;
8004f50: 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;
8004f54: 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;
8004f58: 28 22 00 00 lw r2,(r1+0)
8004f5c: 44 40 00 19 be r2,r0,8004fc0 <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();
8004f60: f8 00 07 b3 calli 8006e2c <_Thread_Enable_dispatch> 8004f64: 34 01 00 0c mvi r1,12
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); }
8004f68: 2b 9d 00 04 lw ra,(sp+4) 8004f6c: 2b 8b 00 10 lw r11,(sp+16) 8004f70: 2b 8c 00 0c lw r12,(sp+12) 8004f74: 2b 8d 00 08 lw r13,(sp+8) 8004f78: 37 9c 00 14 addi sp,sp,20 8004f7c: 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;
8004f80: 29 85 00 04 lw r5,(r12+4)
8004f84: 5c a1 ff b4 bne r5,r1,8004e54 <rtems_io_register_driver+0x50> _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL );
8004f88: 34 01 00 09 mvi r1,9
}
8004f8c: 2b 9d 00 04 lw ra,(sp+4) 8004f90: 2b 8b 00 10 lw r11,(sp+16) 8004f94: 2b 8c 00 0c lw r12,(sp+12) 8004f98: 2b 8d 00 08 lw r13,(sp+8) 8004f9c: 37 9c 00 14 addi sp,sp,20 8004fa0: 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;
8004fa4: 28 25 00 04 lw r5,(r1+4)
8004fa8: 5c a2 ff c1 bne r5,r2,8004eac <rtems_io_register_driver+0xa8>
8004fac: e3 ff ff c3 bi 8004eb8 <rtems_io_register_driver+0xb4>
if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m;
8004fb0: 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();
8004fb4: f8 00 07 9e calli 8006e2c <_Thread_Enable_dispatch> 8004fb8: 34 01 00 05 mvi r1,5
return sc;
8004fbc: e3 ff ff a8 bi 8004e5c <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;
8004fc0: 28 24 00 04 lw r4,(r1+4)
8004fc4: 5c 82 ff e7 bne r4,r2,8004f60 <rtems_io_register_driver+0x15c> if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major;
8004fc8: 58 6b 00 00 sw (r3+0),r11 8004fcc: e3 ff ff c2 bi 8004ed4 <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 2c ori r1,r1,0xec2c 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 74 ori r1,r1,0xea74 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 31 calli 8030218 <__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 74 ori r1,r1,0xea74 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>
08040960 <rtems_rate_monotonic_period>: rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) {
8040960: 37 9c ff e0 addi sp,sp,-32 8040964: 5b 8b 00 18 sw (sp+24),r11 8040968: 5b 8c 00 14 sw (sp+20),r12 804096c: 5b 8d 00 10 sw (sp+16),r13 8040970: 5b 8e 00 0c sw (sp+12),r14 8040974: 5b 8f 00 08 sw (sp+8),r15 8040978: 5b 9d 00 04 sw (sp+4),ra 804097c: b8 20 70 00 mv r14,r1 8040980: 78 01 08 07 mvhi r1,0x807 8040984: b8 40 68 00 mv r13,r2 8040988: 38 21 54 9c ori r1,r1,0x549c 804098c: b9 c0 10 00 mv r2,r14 8040990: 37 83 00 20 addi r3,sp,32 8040994: fb ff 29 11 calli 800add8 <_Objects_Get> 8040998: 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 ) {
804099c: 2b 81 00 20 lw r1,(sp+32)
80409a0: 44 20 00 0a be r1,r0,80409c8 <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;
80409a4: 34 01 00 04 mvi r1,4
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
80409a8: 2b 9d 00 04 lw ra,(sp+4) 80409ac: 2b 8b 00 18 lw r11,(sp+24) 80409b0: 2b 8c 00 14 lw r12,(sp+20) 80409b4: 2b 8d 00 10 lw r13,(sp+16) 80409b8: 2b 8e 00 0c lw r14,(sp+12) 80409bc: 2b 8f 00 08 lw r15,(sp+8) 80409c0: 37 9c 00 20 addi sp,sp,32 80409c4: c3 a0 00 00 ret
the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) {
80409c8: 78 0c 08 07 mvhi r12,0x807 80409cc: 39 8c 50 e0 ori r12,r12,0x50e0 80409d0: 29 62 00 40 lw r2,(r11+64) 80409d4: 29 81 00 00 lw r1,(r12+0)
80409d8: 44 41 00 0b be r2,r1,8040a04 <rtems_rate_monotonic_period+0xa4> _Thread_Enable_dispatch();
80409dc: fb ff 2b d5 calli 800b930 <_Thread_Enable_dispatch> 80409e0: 34 01 00 17 mvi r1,23
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
80409e4: 2b 9d 00 04 lw ra,(sp+4) 80409e8: 2b 8b 00 18 lw r11,(sp+24) 80409ec: 2b 8c 00 14 lw r12,(sp+20) 80409f0: 2b 8d 00 10 lw r13,(sp+16) 80409f4: 2b 8e 00 0c lw r14,(sp+12) 80409f8: 2b 8f 00 08 lw r15,(sp+8) 80409fc: 37 9c 00 20 addi sp,sp,32 8040a00: 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 ) { 8040a04: 45 a0 00 32 be r13,r0,8040acc <rtems_rate_monotonic_period+0x16c> } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level );
8040a08: 90 00 78 00 rcsr r15,IE 8040a0c: 34 01 ff fe mvi r1,-2 8040a10: a1 e1 08 00 and r1,r15,r1 8040a14: d0 01 00 00 wcsr IE,r1
switch ( the_period->state ) {
8040a18: 29 61 00 38 lw r1,(r11+56) 8040a1c: 34 02 00 02 mvi r2,2
8040a20: 44 22 00 30 be r1,r2,8040ae0 <rtems_rate_monotonic_period+0x180>
8040a24: 34 02 00 04 mvi r2,4
8040a28: 44 22 00 19 be r1,r2,8040a8c <rtems_rate_monotonic_period+0x12c>
8040a2c: 5c 20 ff de bne r1,r0,80409a4 <rtems_rate_monotonic_period+0x44><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level );
8040a30: d0 0f 00 00 wcsr IE,r15
/* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period );
8040a34: b9 60 08 00 mv r1,r11 8040a38: fb ff ff 1b calli 80406a4 <_Rate_monotonic_Initiate_statistics>
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
8040a3c: 78 02 08 04 mvhi r2,0x804
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
8040a40: 34 0c 00 00 mvi r12,0
the_watchdog->routine = routine;
8040a44: 38 42 0b 6c ori r2,r2,0xb6c
the_period->state = RATE_MONOTONIC_ACTIVE;
8040a48: 34 03 00 02 mvi r3,2
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8040a4c: 78 01 08 07 mvhi r1,0x807
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
8040a50: 59 62 00 2c sw (r11+44),r2
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8040a54: 38 21 51 00 ori r1,r1,0x5100 8040a58: 59 63 00 38 sw (r11+56),r3
void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id;
8040a5c: 59 6e 00 30 sw (r11+48),r14
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
8040a60: 59 6d 00 1c sw (r11+28),r13
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8040a64: 35 62 00 10 addi r2,r11,16
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
8040a68: 59 6c 00 18 sw (r11+24),r12
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
8040a6c: 59 6c 00 34 sw (r11+52),r12
_Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length;
8040a70: 59 6d 00 3c sw (r11+60),r13
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8040a74: fb ff 30 ec calli 800ce24 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch();
8040a78: b9 80 08 00 mv r1,r12 8040a7c: 5b 81 00 1c sw (sp+28),r1 8040a80: fb ff 2b ac calli 800b930 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
8040a84: 2b 81 00 1c lw r1,(sp+28) 8040a88: e3 ff ff d7 bi 80409e4 <rtems_rate_monotonic_period+0x84>
case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period );
8040a8c: b9 60 08 00 mv r1,r11 8040a90: fb ff ff 6a calli 8040838 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
8040a94: d0 0f 00 00 wcsr IE,r15
the_period->state = RATE_MONOTONIC_ACTIVE;
8040a98: 34 02 00 02 mvi r2,2 8040a9c: 78 01 08 07 mvhi r1,0x807 8040aa0: 59 62 00 38 sw (r11+56),r2 8040aa4: 38 21 51 00 ori r1,r1,0x5100 8040aa8: 35 62 00 10 addi r2,r11,16
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
8040aac: 59 6d 00 1c sw (r11+28),r13
the_period->next_length = length;
8040ab0: 59 6d 00 3c sw (r11+60),r13
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8040ab4: fb ff 30 dc calli 800ce24 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch();
8040ab8: 34 01 00 06 mvi r1,6 8040abc: 5b 81 00 1c sw (sp+28),r1 8040ac0: fb ff 2b 9c calli 800b930 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
8040ac4: 2b 81 00 1c lw r1,(sp+28) 8040ac8: e3 ff ff c7 bi 80409e4 <rtems_rate_monotonic_period+0x84>
_Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) {
8040acc: 29 61 00 38 lw r1,(r11+56) 8040ad0: 34 02 00 04 mvi r2,4
8040ad4: 50 41 00 1b bgeu r2,r1,8040b40 <rtems_rate_monotonic_period+0x1e0><== ALWAYS TAKEN
8040ad8: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8040adc: e3 ff ff e8 bi 8040a7c <rtems_rate_monotonic_period+0x11c> <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period );
8040ae0: b9 60 08 00 mv r1,r11 8040ae4: fb ff ff 55 calli 8040838 <_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;
8040ae8: 34 01 00 01 mvi r1,1
the_period->next_length = length;
8040aec: 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;
8040af0: 59 61 00 38 sw (r11+56),r1
the_period->next_length = length; _ISR_Enable( level );
8040af4: d0 0f 00 00 wcsr IE,r15
_Thread_Executing->Wait.id = the_period->Object.id;
8040af8: 29 81 00 00 lw r1,(r12+0) 8040afc: 29 63 00 08 lw r3,(r11+8)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
8040b00: 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;
8040b04: 58 23 00 20 sw (r1+32),r3
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
8040b08: fb ff 2e 82 calli 800c510 <_Thread_Set_state>
/* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level );
8040b0c: 90 00 08 00 rcsr r1,IE 8040b10: 34 02 ff fe mvi r2,-2 8040b14: a0 22 10 00 and r2,r1,r2 8040b18: d0 02 00 00 wcsr IE,r2
local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE;
8040b1c: 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;
8040b20: 29 62 00 38 lw r2,(r11+56)
the_period->state = RATE_MONOTONIC_ACTIVE;
8040b24: 59 63 00 38 sw (r11+56),r3
_ISR_Enable( level );
8040b28: 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 )
8040b2c: 34 01 00 03 mvi r1,3
8040b30: 44 41 00 0b be r2,r1,8040b5c <rtems_rate_monotonic_period+0x1fc><== NEVER TAKEN
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch();
8040b34: fb ff 2b 7f calli 800b930 <_Thread_Enable_dispatch> 8040b38: 34 01 00 00 mvi r1,0
return RTEMS_SUCCESSFUL;
8040b3c: e3 ff ff aa bi 80409e4 <rtems_rate_monotonic_period+0x84>
_Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) {
8040b40: 78 0b 08 06 mvhi r11,0x806 8040b44: 34 02 00 02 mvi r2,2 8040b48: fb ff 01 86 calli 8001160 <__ashlsi3> 8040b4c: 39 6b dd f4 ori r11,r11,0xddf4 8040b50: b5 61 08 00 add r1,r11,r1 8040b54: 28 21 00 00 lw r1,(r1+0) 8040b58: e3 ff ff c9 bi 8040a7c <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 );
8040b5c: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8040b60: 34 02 40 00 mvi r2,16384 <== NOT EXECUTED 8040b64: fb ff b5 84 calli 802e174 <_Thread_Clear_state> <== NOT EXECUTED 8040b68: e3 ff ff f3 bi 8040b34 <rtems_rate_monotonic_period+0x1d4> <== NOT EXECUTED
0802c714 <rtems_rate_monotonic_report_statistics_with_plugin>: */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) {
802c714: 37 9c ff 5c addi sp,sp,-164 802c718: 5b 8b 00 44 sw (sp+68),r11 802c71c: 5b 8c 00 40 sw (sp+64),r12 802c720: 5b 8d 00 3c sw (sp+60),r13 802c724: 5b 8e 00 38 sw (sp+56),r14 802c728: 5b 8f 00 34 sw (sp+52),r15 802c72c: 5b 90 00 30 sw (sp+48),r16 802c730: 5b 91 00 2c sw (sp+44),r17 802c734: 5b 92 00 28 sw (sp+40),r18 802c738: 5b 93 00 24 sw (sp+36),r19 802c73c: 5b 94 00 20 sw (sp+32),r20 802c740: 5b 95 00 1c sw (sp+28),r21 802c744: 5b 96 00 18 sw (sp+24),r22 802c748: 5b 97 00 14 sw (sp+20),r23 802c74c: 5b 98 00 10 sw (sp+16),r24 802c750: 5b 99 00 0c sw (sp+12),r25 802c754: 5b 9b 00 08 sw (sp+8),fp 802c758: 5b 9d 00 04 sw (sp+4),ra 802c75c: b8 40 68 00 mv r13,r2 802c760: 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 )
802c764: 44 40 00 2b be r2,r0,802c810 <rtems_rate_monotonic_report_statistics_with_plugin+0xfc><== NEVER TAKEN
return; (*print)( context, "Period information by period\n" );
802c768: 78 02 08 06 mvhi r2,0x806 802c76c: 38 42 a3 60 ori r2,r2,0xa360 802c770: d9 a0 00 00 call r13
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" );
802c774: 78 02 08 06 mvhi r2,0x806 802c778: 38 42 a3 80 ori r2,r2,0xa380 802c77c: b9 e0 08 00 mv r1,r15 802c780: d9 a0 00 00 call r13
(*print)( context, "--- Wall times are in seconds ---\n" );
802c784: 78 02 08 06 mvhi r2,0x806 802c788: 38 42 a3 a4 ori r2,r2,0xa3a4 802c78c: b9 e0 08 00 mv r1,r15 802c790: d9 a0 00 00 call r13
Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED "
802c794: 78 02 08 06 mvhi r2,0x806 802c798: 38 42 a3 c8 ori r2,r2,0xa3c8 802c79c: b9 e0 08 00 mv r1,r15 802c7a0: d9 a0 00 00 call r13
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " "
802c7a4: 78 02 08 06 mvhi r2,0x806 802c7a8: 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 ;
802c7ac: 78 0c 08 07 mvhi r12,0x807
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " "
802c7b0: 38 42 a4 14 ori r2,r2,0xa414
/* * 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 ;
802c7b4: 39 8c 54 9c ori r12,r12,0x549c
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " "
802c7b8: 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 ;
802c7bc: 29 81 00 0c lw r1,(r12+12) 802c7c0: 29 8b 00 08 lw r11,(r12+8)
802c7c4: 55 61 00 13 bgu r11,r1,802c810 <rtems_rate_monotonic_report_statistics_with_plugin+0xfc><== NEVER TAKEN
802c7c8: 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 );
802c7cc: 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 );
802c7d0: 37 91 00 a0 addi r17,sp,160
/* * Print part of report line that is not dependent on granularity */ (*print)( context,
802c7d4: 78 15 08 06 mvhi r21,0x806
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 );
802c7d8: 37 94 00 60 addi r20,sp,96 802c7dc: 37 92 00 98 addi r18,sp,152
(*print)( context,
802c7e0: 78 1b 08 06 mvhi fp,0x806
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);
802c7e4: 37 99 00 78 addi r25,sp,120
(*print)( context,
802c7e8: 78 18 08 06 mvhi r24,0x806
/* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" );
802c7ec: 78 13 08 06 mvhi r19,0x806
* 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 );
802c7f0: b9 60 08 00 mv r1,r11 802c7f4: ba 00 10 00 mv r2,r16 802c7f8: f8 00 4f 44 calli 8040508 <rtems_rate_monotonic_get_statistics> 802c7fc: b8 20 70 00 mv r14,r1
if ( status != RTEMS_SUCCESSFUL ) 802c800: 44 20 00 17 be r1,r0,802c85c <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 ;
802c804: 29 85 00 0c lw r5,(r12+12)
id <= _Rate_monotonic_Information.maximum_id ; id++ ) {
802c808: 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 ; 802c80c: 50 ab ff f9 bgeu r5,r11,802c7f0 <rtems_rate_monotonic_report_statistics_with_plugin+0xdc> the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } }
802c810: 2b 9d 00 04 lw ra,(sp+4) 802c814: 2b 8b 00 44 lw r11,(sp+68) 802c818: 2b 8c 00 40 lw r12,(sp+64) 802c81c: 2b 8d 00 3c lw r13,(sp+60) 802c820: 2b 8e 00 38 lw r14,(sp+56) 802c824: 2b 8f 00 34 lw r15,(sp+52) 802c828: 2b 90 00 30 lw r16,(sp+48) 802c82c: 2b 91 00 2c lw r17,(sp+44) 802c830: 2b 92 00 28 lw r18,(sp+40) 802c834: 2b 93 00 24 lw r19,(sp+36) 802c838: 2b 94 00 20 lw r20,(sp+32) 802c83c: 2b 95 00 1c lw r21,(sp+28) 802c840: 2b 96 00 18 lw r22,(sp+24) 802c844: 2b 97 00 14 lw r23,(sp+20) 802c848: 2b 98 00 10 lw r24,(sp+16) 802c84c: 2b 99 00 0c lw r25,(sp+12) 802c850: 2b 9b 00 08 lw fp,(sp+8) 802c854: 37 9c 00 a4 addi sp,sp,164 802c858: 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 );
802c85c: ba c0 10 00 mv r2,r22 802c860: b9 60 08 00 mv r1,r11 802c864: f8 00 4f 5c calli 80405d4 <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 );
802c868: 2b 81 00 80 lw r1,(sp+128) 802c86c: ba 20 18 00 mv r3,r17 802c870: 34 02 00 05 mvi r2,5 802c874: fb ff 70 75 calli 8008a48 <rtems_object_get_name>
/* * Print part of report line that is not dependent on granularity */ (*print)( context,
802c878: 2b 85 00 48 lw r5,(sp+72) 802c87c: 2b 86 00 4c lw r6,(sp+76) 802c880: ba a0 10 00 mv r2,r21 802c884: b9 60 18 00 mv r3,r11 802c888: 38 42 a4 60 ori r2,r2,0xa460 802c88c: b9 e0 08 00 mv r1,r15 802c890: ba 20 20 00 mv r4,r17 802c894: d9 a0 00 00 call r13
); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) {
802c898: 2b 85 00 48 lw r5,(sp+72)
(*print)( context, "\n" );
802c89c: 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 );
802c8a0: ba 40 18 00 mv r3,r18 802c8a4: ba 80 08 00 mv r1,r20
/* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" );
802c8a8: 38 42 bd fc ori r2,r2,0xbdfc
); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 802c8ac: 5c ae 00 04 bne r5,r14,802c8bc <rtems_rate_monotonic_report_statistics_with_plugin+0x1a8> (*print)( context, "\n" );
802c8b0: b9 e0 08 00 mv r1,r15 802c8b4: d9 a0 00 00 call r13
continue;
802c8b8: e3 ff ff d3 bi 802c804 <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 );
802c8bc: b8 a0 10 00 mv r2,r5 802c8c0: f8 00 08 02 calli 802e8c8 <_Timespec_Divide_by_integer>
(*print)( context,
802c8c4: 2b 81 00 54 lw r1,(sp+84) 802c8c8: 34 02 03 e8 mvi r2,1000 802c8cc: f8 00 dc 11 calli 8063910 <__divsi3> 802c8d0: b8 20 b8 00 mv r23,r1 802c8d4: 2b 81 00 5c lw r1,(sp+92) 802c8d8: 34 02 03 e8 mvi r2,1000 802c8dc: f8 00 dc 0d calli 8063910 <__divsi3> 802c8e0: b8 20 70 00 mv r14,r1 802c8e4: 2b 81 00 9c lw r1,(sp+156) 802c8e8: 34 02 03 e8 mvi r2,1000 802c8ec: f8 00 dc 09 calli 8063910 <__divsi3> 802c8f0: 2b 85 00 58 lw r5,(sp+88) 802c8f4: 2b 87 00 98 lw r7,(sp+152) 802c8f8: 2b 83 00 50 lw r3,(sp+80) 802c8fc: bb 60 10 00 mv r2,fp 802c900: b8 20 40 00 mv r8,r1 802c904: ba e0 20 00 mv r4,r23 802c908: b9 c0 30 00 mv r6,r14 802c90c: b9 e0 08 00 mv r1,r15 802c910: 38 42 a4 78 ori r2,r2,0xa478 802c914: 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);
802c918: 2b 82 00 48 lw r2,(sp+72) 802c91c: ba 40 18 00 mv r3,r18 802c920: bb 20 08 00 mv r1,r25 802c924: f8 00 07 e9 calli 802e8c8 <_Timespec_Divide_by_integer>
(*print)( context,
802c928: 2b 81 00 6c lw r1,(sp+108) 802c92c: 34 02 03 e8 mvi r2,1000 802c930: f8 00 db f8 calli 8063910 <__divsi3> 802c934: b8 20 b8 00 mv r23,r1 802c938: 2b 81 00 74 lw r1,(sp+116) 802c93c: 34 02 03 e8 mvi r2,1000 802c940: f8 00 db f4 calli 8063910 <__divsi3> 802c944: b8 20 70 00 mv r14,r1 802c948: 2b 81 00 9c lw r1,(sp+156) 802c94c: 34 02 03 e8 mvi r2,1000 802c950: f8 00 db f0 calli 8063910 <__divsi3> 802c954: 2b 83 00 68 lw r3,(sp+104) 802c958: 2b 85 00 70 lw r5,(sp+112) 802c95c: 2b 87 00 98 lw r7,(sp+152) 802c960: bb 00 10 00 mv r2,r24 802c964: b8 20 40 00 mv r8,r1 802c968: ba e0 20 00 mv r4,r23 802c96c: b9 e0 08 00 mv r1,r15 802c970: b9 c0 30 00 mv r6,r14 802c974: 38 42 a4 98 ori r2,r2,0xa498 802c978: d9 a0 00 00 call r13 802c97c: e3 ff ff a2 bi 802c804 <rtems_rate_monotonic_report_statistics_with_plugin+0xf0>
0802c9a4 <rtems_rate_monotonic_reset_all_statistics>: /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) {
802c9a4: 37 9c ff f4 addi sp,sp,-12 802c9a8: 5b 8b 00 0c sw (sp+12),r11 802c9ac: 5b 8c 00 08 sw (sp+8),r12 802c9b0: 5b 9d 00 04 sw (sp+4),ra
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
802c9b4: 78 01 08 07 mvhi r1,0x807 802c9b8: 38 21 50 24 ori r1,r1,0x5024 802c9bc: 28 22 00 00 lw r2,(r1+0) 802c9c0: 34 42 00 01 addi r2,r2,1 802c9c4: 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 ;
802c9c8: 78 0c 08 07 mvhi r12,0x807 802c9cc: 39 8c 54 9c ori r12,r12,0x549c 802c9d0: 29 8b 00 08 lw r11,(r12+8) 802c9d4: 29 81 00 0c lw r1,(r12+12)
802c9d8: 55 61 00 06 bgu r11,r1,802c9f0 <rtems_rate_monotonic_reset_all_statistics+0x4c><== NEVER TAKEN
id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id );
802c9dc: b9 60 08 00 mv r1,r11 802c9e0: f8 00 00 0a calli 802ca08 <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 ;
802c9e4: 29 81 00 0c lw r1,(r12+12)
id <= _Rate_monotonic_Information.maximum_id ; id++ ) {
802c9e8: 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 ; 802c9ec: 50 2b ff fc bgeu r1,r11,802c9dc <rtems_rate_monotonic_reset_all_statistics+0x38> } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch();
802c9f0: fb ff 7b d0 calli 800b930 <_Thread_Enable_dispatch>
}
802c9f4: 2b 9d 00 04 lw ra,(sp+4) 802c9f8: 2b 8b 00 0c lw r11,(sp+12) 802c9fc: 2b 8c 00 08 lw r12,(sp+8) 802ca00: 37 9c 00 0c addi sp,sp,12 802ca04: 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 e0 ori r11,r11,0xece0 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 f4 ori r1,r1,0xeaf4 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 c4 ori r2,r2,0xecc4 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 e8 ori r2,r2,0xece8 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 80 ori r1,r1,0xed80 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>
0800ae48 <rtems_task_mode>: rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) {
800ae48: 37 9c ff e0 addi sp,sp,-32 800ae4c: 5b 8b 00 20 sw (sp+32),r11 800ae50: 5b 8c 00 1c sw (sp+28),r12 800ae54: 5b 8d 00 18 sw (sp+24),r13 800ae58: 5b 8e 00 14 sw (sp+20),r14 800ae5c: 5b 8f 00 10 sw (sp+16),r15 800ae60: 5b 90 00 0c sw (sp+12),r16 800ae64: 5b 91 00 08 sw (sp+8),r17 800ae68: 5b 9d 00 04 sw (sp+4),ra 800ae6c: b8 40 68 00 mv r13,r2 800ae70: b8 60 80 00 mv r16,r3 800ae74: 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 )
800ae78: 34 02 00 09 mvi r2,9
800ae7c: 44 60 00 44 be r3,r0,800af8c <rtems_task_mode+0x144> return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing;
800ae80: 78 02 08 01 mvhi r2,0x801 800ae84: 38 42 c8 e0 ori r2,r2,0xc8e0 800ae88: 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;
800ae8c: 34 0e 00 00 mvi r14,0 800ae90: 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 ];
800ae94: 29 6c 01 24 lw r12,(r11+292)
asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 800ae98: 44 2e 00 55 be r1,r14,800afec <rtems_task_mode+0x1a4> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
800ae9c: 29 61 00 7c lw r1,(r11+124)
800aea0: 5c 20 00 4e bne r1,r0,800afd8 <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;
800aea4: 41 81 00 08 lbu r1,(r12+8) 800aea8: 34 11 00 00 mvi r17,0
800aeac: 44 31 00 43 be r1,r17,800afb8 <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();
800aeb0: fb ff ec b4 calli 8006180 <_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;
800aeb4: ba 21 88 00 or r17,r17,r1
old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode;
800aeb8: ba 2e 88 00 or r17,r17,r14 800aebc: 5a 11 00 00 sw (r16+0),r17
/* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK )
800aec0: 21 a1 01 00 andi r1,r13,0x100
800aec4: 44 20 00 07 be r1,r0,800aee0 <rtems_task_mode+0x98> executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
800aec8: b9 e0 08 00 mv r1,r15 800aecc: 34 02 00 08 mvi r2,8 800aed0: fb ff d4 f0 calli 8000290 <__lshrsi3> 800aed4: 18 21 00 01 xori r1,r1,0x1 800aed8: 20 21 00 01 andi r1,r1,0x1 800aedc: 31 61 00 75 sb (r11+117),r1
if ( mask & RTEMS_TIMESLICE_MASK ) {
800aee0: 21 a1 02 00 andi r1,r13,0x200
800aee4: 44 20 00 09 be r1,r0,800af08 <rtems_task_mode+0xc0> if ( _Modes_Is_timeslice(mode_set) ) {
800aee8: 21 e1 02 00 andi r1,r15,0x200
800aeec: 44 20 00 44 be r1,r0,800affc <rtems_task_mode+0x1b4> executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
800aef0: 78 01 08 01 mvhi r1,0x801 800aef4: 38 21 c7 b4 ori r1,r1,0xc7b4 800aef8: 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;
800aefc: 34 02 00 01 mvi r2,1 800af00: 59 62 00 7c sw (r11+124),r2
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
800af04: 59 61 00 78 sw (r11+120),r1
/* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK )
800af08: 21 a1 00 01 andi r1,r13,0x1
800af0c: 44 20 00 04 be r1,r0,800af1c <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 ) );
800af10: 19 e1 00 01 xori r1,r15,0x1 800af14: 20 21 00 01 andi r1,r1,0x1 800af18: d0 01 00 00 wcsr IE,r1
*/ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) {
800af1c: 21 ad 04 00 andi r13,r13,0x400
800af20: 45 a0 00 14 be r13,r0,800af70 <rtems_task_mode+0x128> * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode(
800af24: 34 02 00 0a mvi r2,10 800af28: b9 e0 08 00 mv r1,r15 800af2c: fb ff d4 d9 calli 8000290 <__lshrsi3>
if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal;
800af30: 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(
800af34: 18 21 00 01 xori r1,r1,0x1 800af38: 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; 800af3c: 44 41 00 0d be r2,r1,800af70 <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;
800af40: 31 81 00 08 sb (r12+8),r1
) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level );
800af44: 90 00 08 00 rcsr r1,IE 800af48: 34 02 ff fe mvi r2,-2 800af4c: a0 22 10 00 and r2,r1,r2 800af50: d0 02 00 00 wcsr IE,r2
_signals = information->signals_pending;
800af54: 29 82 00 18 lw r2,(r12+24)
information->signals_pending = information->signals_posted;
800af58: 29 83 00 14 lw r3,(r12+20)
information->signals_posted = _signals;
800af5c: 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;
800af60: 59 83 00 18 sw (r12+24),r3
information->signals_posted = _signals; _ISR_Enable( _level );
800af64: 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;
800af68: 29 81 00 14 lw r1,(r12+20)
800af6c: 5c 20 00 2e bne r1,r0,800b024 <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;
800af70: 34 0b 00 00 mvi r11,0
} } } if ( _System_state_Is_up( _System_state_Get() ) )
800af74: 78 01 08 01 mvhi r1,0x801 800af78: 38 21 c9 c0 ori r1,r1,0xc9c0 800af7c: 28 22 00 00 lw r2,(r1+0) 800af80: 34 01 00 03 mvi r1,3
800af84: 44 41 00 22 be r2,r1,800b00c <rtems_task_mode+0x1c4> <== ALWAYS TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch();
800af88: 34 02 00 00 mvi r2,0
return RTEMS_SUCCESSFUL; }
800af8c: b8 40 08 00 mv r1,r2 800af90: 2b 9d 00 04 lw ra,(sp+4) 800af94: 2b 8b 00 20 lw r11,(sp+32) 800af98: 2b 8c 00 1c lw r12,(sp+28) 800af9c: 2b 8d 00 18 lw r13,(sp+24) 800afa0: 2b 8e 00 14 lw r14,(sp+20) 800afa4: 2b 8f 00 10 lw r15,(sp+16) 800afa8: 2b 90 00 0c lw r16,(sp+12) 800afac: 2b 91 00 08 lw r17,(sp+8) 800afb0: 37 9c 00 20 addi sp,sp,32 800afb4: 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();
800afb8: fb ff ec 72 calli 8006180 <_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;
800afbc: 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;
800afc0: ba 21 88 00 or r17,r17,r1
old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode;
800afc4: ba 2e 88 00 or r17,r17,r14 800afc8: 5a 11 00 00 sw (r16+0),r17
/* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK )
800afcc: 21 a1 01 00 andi r1,r13,0x100
800afd0: 44 20 ff c4 be r1,r0,800aee0 <rtems_task_mode+0x98>
800afd4: e3 ff ff bd bi 800aec8 <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;
800afd8: 41 81 00 08 lbu r1,(r12+8) 800afdc: 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;
800afe0: 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; 800afe4: 5c 31 ff b3 bne r1,r17,800aeb0 <rtems_task_mode+0x68>
800afe8: e3 ff ff f4 bi 800afb8 <rtems_task_mode+0x170>
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
800afec: 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;
800aff0: 34 0e 01 00 mvi r14,256
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 800aff4: 44 20 ff ac be r1,r0,800aea4 <rtems_task_mode+0x5c>
800aff8: e3 ff ff f8 bi 800afd8 <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;
800affc: 59 61 00 7c sw (r11+124),r1
/* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK )
800b000: 21 a1 00 01 andi r1,r13,0x1
800b004: 44 20 ff c6 be r1,r0,800af1c <rtems_task_mode+0xd4>
800b008: e3 ff ff c2 bi 800af10 <rtems_task_mode+0xc8>
} } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
800b00c: f8 00 01 18 calli 800b46c <_Thread_Evaluate_mode>
800b010: 5c 20 00 02 bne r1,r0,800b018 <rtems_task_mode+0x1d0> 800b014: 45 61 ff dd be r11,r1,800af88 <rtems_task_mode+0x140> _Thread_Dispatch();
800b018: fb ff e5 36 calli 80044f0 <_Thread_Dispatch> 800b01c: 34 02 00 00 mvi r2,0 800b020: e3 ff ff db bi 800af8c <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;
800b024: 34 01 00 01 mvi r1,1 800b028: 31 61 00 74 sb (r11+116),r1 800b02c: b8 20 58 00 mv r11,r1 800b030: e3 ff ff d1 bi 800af74 <rtems_task_mode+0x12c>
08008f28 <rtems_task_set_priority>: rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) {
8008f28: 37 9c ff f0 addi sp,sp,-16 8008f2c: 5b 8b 00 0c sw (sp+12),r11 8008f30: 5b 8c 00 08 sw (sp+8),r12 8008f34: 5b 9d 00 04 sw (sp+4),ra 8008f38: b8 40 58 00 mv r11,r2 8008f3c: b8 60 60 00 mv r12,r3
register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 8008f40: 44 40 00 0c be r2,r0,8008f70 <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 ) &&
8008f44: 78 02 08 02 mvhi r2,0x802 8008f48: 38 42 50 c0 ori r2,r2,0x50c0 8008f4c: 40 42 00 00 lbu r2,(r2+0)
8008f50: 50 4b 00 08 bgeu r2,r11,8008f70 <rtems_task_set_priority+0x48>
8008f54: 34 04 00 13 mvi r4,19
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
8008f58: b8 80 08 00 mv r1,r4 8008f5c: 2b 9d 00 04 lw ra,(sp+4) 8008f60: 2b 8b 00 0c lw r11,(sp+12) 8008f64: 2b 8c 00 08 lw r12,(sp+8) 8008f68: 37 9c 00 10 addi sp,sp,16 8008f6c: 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 )
8008f70: 34 04 00 09 mvi r4,9
8008f74: 45 80 ff f9 be r12,r0,8008f58 <rtems_task_set_priority+0x30> return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location );
8008f78: 37 82 00 10 addi r2,sp,16 8008f7c: f8 00 0a 21 calli 800b800 <_Thread_Get>
switch ( location ) {
8008f80: 2b 82 00 10 lw r2,(sp+16) 8008f84: 34 04 00 04 mvi r4,4
8008f88: 5c 40 ff f4 bne r2,r0,8008f58 <rtems_task_set_priority+0x30> case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority;
8008f8c: 28 23 00 14 lw r3,(r1+20) 8008f90: 59 83 00 00 sw (r12+0),r3
if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 8008f94: 45 62 00 09 be r11,r2,8008fb8 <rtems_task_set_priority+0x90> the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 ||
8008f98: 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;
8008f9c: 58 2b 00 18 sw (r1+24),r11
if ( the_thread->resource_count == 0 || 8008fa0: 44 40 00 03 be r2,r0,8008fac <rtems_task_set_priority+0x84> the_thread->current_priority > new_priority )
8008fa4: 28 22 00 14 lw r2,(r1+20)
8008fa8: 51 62 00 04 bgeu r11,r2,8008fb8 <rtems_task_set_priority+0x90><== ALWAYS TAKEN
_Thread_Change_priority( the_thread, new_priority, false );
8008fac: b9 60 10 00 mv r2,r11 8008fb0: 34 03 00 00 mvi r3,0 8008fb4: f8 00 08 34 calli 800b084 <_Thread_Change_priority>
} _Thread_Enable_dispatch();
8008fb8: f8 00 09 f2 calli 800b780 <_Thread_Enable_dispatch> 8008fbc: 34 04 00 00 mvi r4,0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
8008fc0: b8 80 08 00 mv r1,r4 8008fc4: 2b 9d 00 04 lw ra,(sp+4) 8008fc8: 2b 8b 00 0c lw r11,(sp+12) 8008fcc: 2b 8c 00 08 lw r12,(sp+8) 8008fd0: 37 9c 00 10 addi sp,sp,16 8008fd4: c3 a0 00 00 ret
0802d0dc <rtems_task_variable_add>: rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) {
802d0dc: 37 9c ff ec addi sp,sp,-20 802d0e0: 5b 8b 00 10 sw (sp+16),r11 802d0e4: 5b 8c 00 0c sw (sp+12),r12 802d0e8: 5b 8d 00 08 sw (sp+8),r13 802d0ec: 5b 9d 00 04 sw (sp+4),ra 802d0f0: b8 40 58 00 mv r11,r2 802d0f4: b8 60 68 00 mv r13,r3
Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr )
802d0f8: 34 02 00 09 mvi r2,9
802d0fc: 45 60 00 07 be r11,r0,802d118 <rtems_task_variable_add+0x3c> return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location);
802d100: 37 82 00 14 addi r2,sp,20 802d104: fb ff 7a 18 calli 800b964 <_Thread_Get> 802d108: b8 20 60 00 mv r12,r1
switch (location) {
802d10c: 2b 81 00 14 lw r1,(sp+20) 802d110: 34 02 00 04 mvi r2,4
802d114: 44 20 00 08 be r1,r0,802d134 <rtems_task_variable_add+0x58> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
802d118: b8 40 08 00 mv r1,r2 802d11c: 2b 9d 00 04 lw ra,(sp+4) 802d120: 2b 8b 00 10 lw r11,(sp+16) 802d124: 2b 8c 00 0c lw r12,(sp+12) 802d128: 2b 8d 00 08 lw r13,(sp+8) 802d12c: 37 9c 00 14 addi sp,sp,20 802d130: 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;
802d134: 29 84 01 34 lw r4,(r12+308)
while (tvp) { 802d138: 44 81 00 08 be r4,r1,802d158 <rtems_task_variable_add+0x7c> if (tvp->ptr == ptr) {
802d13c: 28 81 00 04 lw r1,(r4+4)
802d140: 5c 2b 00 04 bne r1,r11,802d150 <rtems_task_variable_add+0x74>
802d144: e0 00 00 18 bi 802d1a4 <rtems_task_variable_add+0xc8> 802d148: 28 82 00 04 lw r2,(r4+4)
802d14c: 44 4b 00 16 be r2,r11,802d1a4 <rtems_task_variable_add+0xc8><== NEVER TAKEN
tvp->dtor = dtor; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next;
802d150: 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) { 802d154: 5c 80 ff fd bne r4,r0,802d148 <rtems_task_variable_add+0x6c> } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *)
802d158: 34 01 00 14 mvi r1,20 802d15c: fb ff 80 1b calli 800d1c8 <_Workspace_Allocate>
_Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 802d160: 44 20 00 1b be r1,r0,802d1cc <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;
802d164: 29 82 01 34 lw r2,(r12+308)
if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; new->ptr = ptr;
802d168: 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;
802d16c: 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;
802d170: 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;
802d174: 29 62 00 00 lw r2,(r11+0)
new->ptr = ptr; new->dtor = dtor;
802d178: 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;
802d17c: 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();
802d180: fb ff 79 ec calli 800b930 <_Thread_Enable_dispatch> 802d184: 34 02 00 00 mvi r2,0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
802d188: b8 40 08 00 mv r1,r2 802d18c: 2b 9d 00 04 lw ra,(sp+4) 802d190: 2b 8b 00 10 lw r11,(sp+16) 802d194: 2b 8c 00 0c lw r12,(sp+12) 802d198: 2b 8d 00 08 lw r13,(sp+8) 802d19c: 37 9c 00 14 addi sp,sp,20 802d1a0: 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;
802d1a4: 58 8d 00 10 sw (r4+16),r13
_Thread_Enable_dispatch();
802d1a8: fb ff 79 e2 calli 800b930 <_Thread_Enable_dispatch> 802d1ac: 34 02 00 00 mvi r2,0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
802d1b0: b8 40 08 00 mv r1,r2 802d1b4: 2b 9d 00 04 lw ra,(sp+4) 802d1b8: 2b 8b 00 10 lw r11,(sp+16) 802d1bc: 2b 8c 00 0c lw r12,(sp+12) 802d1c0: 2b 8d 00 08 lw r13,(sp+8) 802d1c4: 37 9c 00 14 addi sp,sp,20 802d1c8: 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();
802d1cc: fb ff 79 d9 calli 800b930 <_Thread_Enable_dispatch> 802d1d0: 34 02 00 1a mvi r2,26
return RTEMS_NO_MEMORY;
802d1d4: e3 ff ff d1 bi 802d118 <rtems_task_variable_add+0x3c>
0802d1d8 <rtems_task_variable_delete>: rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) {
802d1d8: 37 9c ff f4 addi sp,sp,-12 802d1dc: 5b 8b 00 08 sw (sp+8),r11 802d1e0: 5b 9d 00 04 sw (sp+4),ra 802d1e4: b8 40 58 00 mv r11,r2
Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr )
802d1e8: 34 02 00 09 mvi r2,9
802d1ec: 45 60 00 06 be r11,r0,802d204 <rtems_task_variable_delete+0x2c> return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location);
802d1f0: 37 82 00 0c addi r2,sp,12 802d1f4: fb ff 79 dc calli 800b964 <_Thread_Get>
switch (location) {
802d1f8: 2b 84 00 0c lw r4,(sp+12) 802d1fc: 34 02 00 04 mvi r2,4
802d200: 44 80 00 06 be r4,r0,802d218 <rtems_task_variable_delete+0x40> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
802d204: b8 40 08 00 mv r1,r2 802d208: 2b 9d 00 04 lw ra,(sp+4) 802d20c: 2b 8b 00 08 lw r11,(sp+8) 802d210: 37 9c 00 0c addi sp,sp,12 802d214: c3 a0 00 00 ret
the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables;
802d218: 28 23 01 34 lw r3,(r1+308)
while (tvp) { 802d21c: 44 64 00 09 be r3,r4,802d240 <rtems_task_variable_delete+0x68> if (tvp->ptr == ptr) {
802d220: 28 62 00 04 lw r2,(r3+4)
802d224: 5c 4b 00 04 bne r2,r11,802d234 <rtems_task_variable_delete+0x5c>
802d228: e0 00 00 18 bi 802d288 <rtems_task_variable_delete+0xb0> 802d22c: 28 64 00 04 lw r4,(r3+4)
802d230: 44 8b 00 0b be r4,r11,802d25c <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;
802d234: b8 60 10 00 mv r2,r3
} prev = tvp; tvp = (rtems_task_variable_t *)tvp->next;
802d238: 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) {
802d23c: 5c 60 ff fc bne r3,r0,802d22c <rtems_task_variable_delete+0x54><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch();
802d240: fb ff 79 bc calli 800b930 <_Thread_Enable_dispatch> 802d244: 34 02 00 09 mvi r2,9
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
802d248: b8 40 08 00 mv r1,r2 802d24c: 2b 9d 00 04 lw ra,(sp+4) 802d250: 2b 8b 00 08 lw r11,(sp+8) 802d254: 37 9c 00 0c addi sp,sp,12 802d258: 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;
802d25c: 28 64 00 00 lw r4,(r3+0) 802d260: 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 );
802d264: b8 60 10 00 mv r2,r3 802d268: f8 00 00 3b calli 802d354 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
802d26c: fb ff 79 b1 calli 800b930 <_Thread_Enable_dispatch> 802d270: 34 02 00 00 mvi r2,0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
802d274: b8 40 08 00 mv r1,r2 802d278: 2b 9d 00 04 lw ra,(sp+4) 802d27c: 2b 8b 00 08 lw r11,(sp+8) 802d280: 37 9c 00 0c addi sp,sp,12 802d284: 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;
802d288: 28 62 00 00 lw r2,(r3+0) 802d28c: 58 22 01 34 sw (r1+308),r2 802d290: e3 ff ff f5 bi 802d264 <rtems_task_variable_delete+0x8c>
0802d294 <rtems_task_variable_get>: rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) {
802d294: 37 9c ff f0 addi sp,sp,-16 802d298: 5b 8b 00 0c sw (sp+12),r11 802d29c: 5b 8c 00 08 sw (sp+8),r12 802d2a0: 5b 9d 00 04 sw (sp+4),ra 802d2a4: b8 40 58 00 mv r11,r2 802d2a8: b8 60 60 00 mv r12,r3
Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 802d2ac: 44 40 00 1d be r2,r0,802d320 <rtems_task_variable_get+0x8c> return RTEMS_INVALID_ADDRESS; if ( !result ) 802d2b0: 44 60 00 1c be r3,r0,802d320 <rtems_task_variable_get+0x8c> return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location);
802d2b4: 37 82 00 10 addi r2,sp,16 802d2b8: fb ff 79 ab calli 800b964 <_Thread_Get>
switch (location) {
802d2bc: 2b 82 00 10 lw r2,(sp+16)
return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location);
802d2c0: b8 20 18 00 mv r3,r1
switch (location) {
802d2c4: 34 01 00 04 mvi r1,4
802d2c8: 44 40 00 06 be r2,r0,802d2e0 <rtems_task_variable_get+0x4c> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
802d2cc: 2b 9d 00 04 lw ra,(sp+4) 802d2d0: 2b 8b 00 0c lw r11,(sp+12) 802d2d4: 2b 8c 00 08 lw r12,(sp+8) 802d2d8: 37 9c 00 10 addi sp,sp,16 802d2dc: c3 a0 00 00 ret
case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables;
802d2e0: 28 61 01 34 lw r1,(r3+308)
while (tvp) { 802d2e4: 5c 22 00 04 bne r1,r2,802d2f4 <rtems_task_variable_get+0x60>
802d2e8: e0 00 00 14 bi 802d338 <rtems_task_variable_get+0xa4>
*/ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next;
802d2ec: 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) {
802d2f0: 44 20 00 12 be r1,r0,802d338 <rtems_task_variable_get+0xa4><== NEVER TAKEN
if (tvp->ptr == ptr) {
802d2f4: 28 22 00 04 lw r2,(r1+4)
802d2f8: 5c 4b ff fd bne r2,r11,802d2ec <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;
802d2fc: 28 21 00 0c lw r1,(r1+12) 802d300: 59 81 00 00 sw (r12+0),r1
_Thread_Enable_dispatch();
802d304: fb ff 79 8b calli 800b930 <_Thread_Enable_dispatch> 802d308: 34 01 00 00 mvi r1,0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
802d30c: 2b 9d 00 04 lw ra,(sp+4) 802d310: 2b 8b 00 0c lw r11,(sp+12) 802d314: 2b 8c 00 08 lw r12,(sp+8) 802d318: 37 9c 00 10 addi sp,sp,16 802d31c: c3 a0 00 00 ret
return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS;
802d320: 34 01 00 09 mvi r1,9
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
802d324: 2b 9d 00 04 lw ra,(sp+4) 802d328: 2b 8b 00 0c lw r11,(sp+12) 802d32c: 2b 8c 00 08 lw r12,(sp+8) 802d330: 37 9c 00 10 addi sp,sp,16 802d334: c3 a0 00 00 ret
_Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch();
802d338: fb ff 79 7e calli 800b930 <_Thread_Enable_dispatch> 802d33c: 34 01 00 09 mvi r1,9
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
802d340: 2b 9d 00 04 lw ra,(sp+4) 802d344: 2b 8b 00 0c lw r11,(sp+12) 802d348: 2b 8c 00 08 lw r12,(sp+8) 802d34c: 37 9c 00 10 addi sp,sp,16 802d350: 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 78 ori r1,r1,0xee78 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 b4 calli 801a218 <_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 2c ori r3,r3,0xec2c 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 78 ori r1,r1,0xee78 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 78 ori r1,r1,0xee78 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 b8 ori r5,r5,0xeeb8 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 40 ori r5,r5,0xec40 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 bc ori r12,r12,0xecbc
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 78 ori r1,r1,0xee78 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 e2 calli 801a218 <_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>