=============================================================================== 08014e74 <_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 ) { 8014e74: 37 9c ff e4 addi sp,sp,-28 8014e78: 5b 8b 00 1c sw (sp+28),r11 8014e7c: 5b 8c 00 18 sw (sp+24),r12 8014e80: 5b 8d 00 14 sw (sp+20),r13 8014e84: 5b 8e 00 10 sw (sp+16),r14 8014e88: 5b 8f 00 0c sw (sp+12),r15 8014e8c: 5b 90 00 08 sw (sp+8),r16 8014e90: 5b 9d 00 04 sw (sp+4),ra 8014e94: b8 20 58 00 mv r11,r1 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 8014e98: 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 ) { 8014e9c: b8 60 70 00 mv r14,r3 8014ea0: b8 40 80 00 mv r16,r2 8014ea4: b8 c0 78 00 mv r15,r6 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 8014ea8: 50 23 00 03 bgeu r1,r3,8014eb4 <_CORE_message_queue_Broadcast+0x40><== ALWAYS TAKEN 8014eac: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8014eb0: e0 00 00 13 bi 8014efc <_CORE_message_queue_Broadcast+0x88><== NOT EXECUTED * 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 ) { 8014eb4: 29 63 00 48 lw r3,(r11+72) 8014eb8: 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))) { 8014ebc: b8 60 68 00 mv r13,r3 * 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 ) { 8014ec0: 44 61 00 08 be r3,r1,8014ee0 <_CORE_message_queue_Broadcast+0x6c> *count = 0; 8014ec4: 58 c1 00 00 sw (r6+0),r1 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 8014ec8: e0 00 00 0d bi 8014efc <_CORE_message_queue_Broadcast+0x88> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 8014ecc: 29 81 00 2c lw r1,(r12+44) */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 8014ed0: 35 ad 00 01 addi r13,r13,1 8014ed4: f8 00 26 ae calli 801e98c buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 8014ed8: 29 81 00 28 lw r1,(r12+40) 8014edc: 58 2e 00 00 sw (r1+0),r14 * 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))) { 8014ee0: b9 60 08 00 mv r1,r11 8014ee4: f8 00 0b d2 calli 8017e2c <_Thread_queue_Dequeue> 8014ee8: b8 20 60 00 mv r12,r1 8014eec: ba 00 10 00 mv r2,r16 8014ef0: b9 c0 18 00 mv r3,r14 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 8014ef4: 5c 20 ff f6 bne r1,r0,8014ecc <_CORE_message_queue_Broadcast+0x58> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 8014ef8: 59 ed 00 00 sw (r15+0),r13 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 8014efc: 2b 9d 00 04 lw ra,(sp+4) 8014f00: 2b 8b 00 1c lw r11,(sp+28) 8014f04: 2b 8c 00 18 lw r12,(sp+24) 8014f08: 2b 8d 00 14 lw r13,(sp+20) 8014f0c: 2b 8e 00 10 lw r14,(sp+16) 8014f10: 2b 8f 00 0c lw r15,(sp+12) 8014f14: 2b 90 00 08 lw r16,(sp+8) 8014f18: 37 9c 00 1c addi sp,sp,28 8014f1c: c3 a0 00 00 ret =============================================================================== 0800d7d0 <_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 ) { 800d7d0: 37 9c ff e8 addi sp,sp,-24 800d7d4: 5b 8b 00 18 sw (sp+24),r11 800d7d8: 5b 8c 00 14 sw (sp+20),r12 800d7dc: 5b 8d 00 10 sw (sp+16),r13 800d7e0: 5b 8e 00 0c sw (sp+12),r14 800d7e4: 5b 8f 00 08 sw (sp+8),r15 800d7e8: 5b 9d 00 04 sw (sp+4),ra 800d7ec: 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; 800d7f0: 34 01 00 00 mvi r1,0 800d7f4: 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; 800d7f8: 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; 800d7fc: 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)) { 800d800: 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 ) { 800d804: b8 60 68 00 mv r13,r3 800d808: 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)) { 800d80c: b8 80 60 00 mv r12,r4 800d810: 44 20 00 05 be r1,r0,800d824 <_CORE_message_queue_Initialize+0x54> allocated_message_size += sizeof(uint32_t); 800d814: 34 8c 00 04 addi r12,r4,4 allocated_message_size &= ~(sizeof(uint32_t) - 1); 800d818: 34 01 ff fc mvi r1,-4 800d81c: a1 81 60 00 and r12,r12,r1 } if (allocated_message_size < maximum_message_size) 800d820: 54 8c 00 1c bgu r4,r12,800d890 <_CORE_message_queue_Initialize+0xc0><== 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)); 800d824: 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 * 800d828: b9 c0 08 00 mv r1,r14 800d82c: b9 a0 10 00 mv r2,r13 800d830: f8 00 64 d8 calli 8026b90 <__mulsi3> (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 800d834: 55 81 00 17 bgu r12,r1,800d890 <_CORE_message_queue_Initialize+0xc0><== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 800d838: f8 00 0d 98 calli 8010e98 <_Workspace_Allocate> 800d83c: 59 61 00 5c sw (r11+92),r1 _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 800d840: 44 20 00 14 be r1,r0,800d890 <_CORE_message_queue_Initialize+0xc0> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 800d844: b8 20 10 00 mv r2,r1 800d848: b9 a0 18 00 mv r3,r13 800d84c: b9 c0 20 00 mv r4,r14 800d850: 35 61 00 60 addi r1,r11,96 800d854: f8 00 16 19 calli 80130b8 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 800d858: 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); 800d85c: 35 63 00 54 addi r3,r11,84 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 800d860: 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); 800d864: 59 63 00 50 sw (r11+80),r3 800d868: 64 42 00 01 cmpei r2,r2,1 the_chain->permanent_null = NULL; 800d86c: 34 03 00 00 mvi r3,0 800d870: 59 63 00 54 sw (r11+84),r3 the_chain->last = _Chain_Head(the_chain); 800d874: 59 61 00 58 sw (r11+88),r1 800d878: 34 03 00 80 mvi r3,128 800d87c: b9 60 08 00 mv r1,r11 800d880: 34 04 00 06 mvi r4,6 800d884: f8 00 0a 1c calli 80100f4 <_Thread_queue_Initialize> 800d888: 34 01 00 01 mvi r1,1 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 800d88c: e0 00 00 02 bi 800d894 <_CORE_message_queue_Initialize+0xc4> 800d890: 34 01 00 00 mvi r1,0 } 800d894: 2b 9d 00 04 lw ra,(sp+4) 800d898: 2b 8b 00 18 lw r11,(sp+24) 800d89c: 2b 8c 00 14 lw r12,(sp+20) 800d8a0: 2b 8d 00 10 lw r13,(sp+16) 800d8a4: 2b 8e 00 0c lw r14,(sp+12) 800d8a8: 2b 8f 00 08 lw r15,(sp+8) 800d8ac: 37 9c 00 18 addi sp,sp,24 800d8b0: c3 a0 00 00 ret =============================================================================== 0800d8b4 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 800d8b4: 37 9c ff f4 addi sp,sp,-12 800d8b8: 5b 8b 00 0c sw (sp+12),r11 800d8bc: 5b 8c 00 08 sw (sp+8),r12 800d8c0: 5b 9d 00 04 sw (sp+4),ra ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 800d8c4: 78 07 08 02 mvhi r7,0x802 800d8c8: 38 e7 aa 90 ori r7,r7,0xaa90 800d8cc: 28 e7 00 00 lw r7,(r7+0) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 800d8d0: b8 20 58 00 mv r11,r1 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 800d8d4: 34 01 00 00 mvi r1,0 800d8d8: 58 e1 00 34 sw (r7+52),r1 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 800d8dc: 20 a5 00 ff andi r5,r5,0xff 800d8e0: b8 60 08 00 mv r1,r3 CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 800d8e4: 90 00 40 00 rcsr r8,IE 800d8e8: 34 03 ff fe mvi r3,-2 800d8ec: a1 03 18 00 and r3,r8,r3 800d8f0: 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)); 800d8f4: 29 6c 00 50 lw r12,(r11+80) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 800d8f8: 35 63 00 54 addi r3,r11,84 800d8fc: 5d 83 00 03 bne r12,r3,800d908 <_CORE_message_queue_Seize+0x54> 800d900: 34 0c 00 00 mvi r12,0 800d904: e0 00 00 17 bi 800d960 <_CORE_message_queue_Seize+0xac> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 800d908: 29 83 00 00 lw r3,(r12+0) the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain); 800d90c: 35 69 00 50 addi r9,r11,80 Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 800d910: 59 63 00 50 sw (r11+80),r3 new_first->previous = _Chain_Head(the_chain); 800d914: 58 69 00 04 sw (r3+4),r9 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 800d918: 45 80 00 12 be r12,r0,800d960 <_CORE_message_queue_Seize+0xac><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 800d91c: 29 62 00 48 lw r2,(r11+72) 800d920: 34 42 ff ff addi r2,r2,-1 800d924: 59 62 00 48 sw (r11+72),r2 _ISR_Enable( level ); 800d928: d0 08 00 00 wcsr IE,r8 *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = 800d92c: 78 02 08 02 mvhi r2,0x802 800d930: 38 42 aa 90 ori r2,r2,0xaa90 800d934: 28 42 00 00 lw r2,(r2+0) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 800d938: 29 83 00 08 lw r3,(r12+8) _Thread_Executing->Wait.count = 800d93c: 34 05 00 00 mvi r5,0 800d940: 58 45 00 24 sw (r2+36),r5 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 800d944: 58 83 00 00 sw (r4+0),r3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 800d948: 35 82 00 0c addi r2,r12,12 800d94c: f8 00 22 60 calli 80162cc RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 800d950: 35 61 00 60 addi r1,r11,96 800d954: b9 80 10 00 mv r2,r12 800d958: fb ff ff 6e calli 800d710 <_Chain_Append> /* * There is not an API with blocking sends enabled. * So return immediately. */ _CORE_message_queue_Free_message_buffer(the_message_queue, the_message); return; 800d95c: e0 00 00 12 bi 800d9a4 <_CORE_message_queue_Seize+0xf0> return; } #endif } if ( !wait ) { 800d960: 5c ac 00 05 bne r5,r12,800d974 <_CORE_message_queue_Seize+0xc0> _ISR_Enable( level ); 800d964: d0 08 00 00 wcsr IE,r8 executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 800d968: 34 01 00 04 mvi r1,4 800d96c: 58 e1 00 34 sw (r7+52),r1 return; 800d970: e0 00 00 0d bi 800d9a4 <_CORE_message_queue_Seize+0xf0> RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 800d974: 34 03 00 01 mvi r3,1 800d978: 59 63 00 30 sw (r11+48),r3 _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 800d97c: 58 e4 00 28 sw (r7+40),r4 return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 800d980: 58 e2 00 20 sw (r7+32),r2 executing->Wait.return_argument_second.mutable_object = buffer; 800d984: 58 e1 00 2c sw (r7+44),r1 executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 800d988: 58 eb 00 44 sw (r7+68),r11 executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 800d98c: d0 08 00 00 wcsr IE,r8 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 800d990: 78 03 08 01 mvhi r3,0x801 800d994: b9 60 08 00 mv r1,r11 800d998: b8 c0 10 00 mv r2,r6 800d99c: 38 63 01 d4 ori r3,r3,0x1d4 800d9a0: f8 00 09 0d calli 800fdd4 <_Thread_queue_Enqueue_with_handler> } 800d9a4: 2b 9d 00 04 lw ra,(sp+4) 800d9a8: 2b 8b 00 0c lw r11,(sp+12) 800d9ac: 2b 8c 00 08 lw r12,(sp+8) 800d9b0: 37 9c 00 0c addi sp,sp,12 800d9b4: c3 a0 00 00 ret =============================================================================== 08002bec <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 8002bec: 37 9c ff e8 addi sp,sp,-24 8002bf0: 5b 8b 00 14 sw (sp+20),r11 8002bf4: 5b 8c 00 10 sw (sp+16),r12 8002bf8: 5b 8d 00 0c sw (sp+12),r13 8002bfc: 5b 8e 00 08 sw (sp+8),r14 8002c00: 5b 9d 00 04 sw (sp+4),ra _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 8002c04: 78 06 08 01 mvhi r6,0x801 8002c08: 38 c6 c8 2c ori r6,r6,0xc82c 8002c0c: 28 c6 00 00 lw r6,(r6+0) Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 8002c10: 5b 85 00 18 sw (sp+24),r5 8002c14: b8 20 58 00 mv r11,r1 8002c18: b8 40 70 00 mv r14,r2 8002c1c: b8 80 68 00 mv r13,r4 8002c20: 20 6c 00 ff andi r12,r3,0xff _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 8002c24: 44 c0 00 0b be r6,r0,8002c50 <_CORE_mutex_Seize+0x64> 8002c28: 45 80 00 0a be r12,r0,8002c50 <_CORE_mutex_Seize+0x64> <== NEVER TAKEN 8002c2c: 78 01 08 01 mvhi r1,0x801 8002c30: 38 21 c9 c8 ori r1,r1,0xc9c8 8002c34: 28 21 00 00 lw r1,(r1+0) 8002c38: 34 02 00 01 mvi r2,1 8002c3c: 50 41 00 05 bgeu r2,r1,8002c50 <_CORE_mutex_Seize+0x64> 8002c40: 34 01 00 00 mvi r1,0 8002c44: b8 20 10 00 mv r2,r1 8002c48: 34 03 00 13 mvi r3,19 8002c4c: f8 00 01 d4 calli 800339c <_Internal_error_Occurred> 8002c50: b9 60 08 00 mv r1,r11 8002c54: 37 82 00 18 addi r2,sp,24 8002c58: f8 00 15 4b calli 8008184 <_CORE_mutex_Seize_interrupt_trylock> 8002c5c: 44 20 00 19 be r1,r0,8002cc0 <_CORE_mutex_Seize+0xd4> 8002c60: 78 01 08 01 mvhi r1,0x801 8002c64: 38 21 c8 e8 ori r1,r1,0xc8e8 8002c68: 5d 80 00 07 bne r12,r0,8002c84 <_CORE_mutex_Seize+0x98> 8002c6c: 2b 82 00 18 lw r2,(sp+24) 8002c70: d0 02 00 00 wcsr IE,r2 8002c74: 28 21 00 00 lw r1,(r1+0) 8002c78: 34 02 00 01 mvi r2,1 8002c7c: 58 22 00 34 sw (r1+52),r2 8002c80: e0 00 00 10 bi 8002cc0 <_CORE_mutex_Seize+0xd4> 8002c84: 28 23 00 00 lw r3,(r1+0) 8002c88: 78 01 08 01 mvhi r1,0x801 8002c8c: 38 21 c8 2c ori r1,r1,0xc82c 8002c90: 58 6e 00 20 sw (r3+32),r14 8002c94: 28 22 00 00 lw r2,(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; 8002c98: 34 04 00 01 mvi r4,1 8002c9c: 59 64 00 30 sw (r11+48),r4 8002ca0: b4 44 10 00 add r2,r2,r4 8002ca4: 58 22 00 00 sw (r1+0),r2 8002ca8: 58 6b 00 44 sw (r3+68),r11 8002cac: 2b 81 00 18 lw r1,(sp+24) 8002cb0: d0 01 00 00 wcsr IE,r1 8002cb4: b9 60 08 00 mv r1,r11 8002cb8: b9 a0 10 00 mv r2,r13 8002cbc: fb ff ff ab calli 8002b68 <_CORE_mutex_Seize_interrupt_blocking> } 8002cc0: 2b 9d 00 04 lw ra,(sp+4) 8002cc4: 2b 8b 00 14 lw r11,(sp+20) 8002cc8: 2b 8c 00 10 lw r12,(sp+16) 8002ccc: 2b 8d 00 0c lw r13,(sp+12) 8002cd0: 2b 8e 00 08 lw r14,(sp+8) 8002cd4: 37 9c 00 18 addi sp,sp,24 8002cd8: c3 a0 00 00 ret =============================================================================== 08008184 <_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 ) { 8008184: 37 9c ff fc addi sp,sp,-4 8008188: 5b 9d 00 04 sw (sp+4),ra { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 800818c: 78 03 08 01 mvhi r3,0x801 8008190: 38 63 c8 e8 ori r3,r3,0xc8e8 8008194: 28 63 00 00 lw r3,(r3+0) executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 8008198: 34 04 00 00 mvi r4,0 800819c: 58 64 00 34 sw (r3+52),r4 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 80081a0: 28 25 00 50 lw r5,(r1+80) 80081a4: 44 a4 00 34 be r5,r4,8008274 <_CORE_mutex_Seize_interrupt_trylock+0xf0> the_mutex->lock = CORE_MUTEX_LOCKED; 80081a8: 58 24 00 50 sw (r1+80),r4 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 80081ac: 28 65 00 08 lw r5,(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; 80081b0: 28 24 00 48 lw r4,(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; 80081b4: 58 23 00 5c sw (r1+92),r3 the_mutex->holder_id = executing->Object.id; 80081b8: 58 25 00 60 sw (r1+96),r5 the_mutex->nest_count = 1; 80081bc: 34 05 00 01 mvi r5,1 80081c0: 58 25 00 54 sw (r1+84),r5 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 80081c4: 34 05 00 02 mvi r5,2 80081c8: 44 85 00 03 be r4,r5,80081d4 <_CORE_mutex_Seize_interrupt_trylock+0x50> 80081cc: 34 05 00 03 mvi r5,3 80081d0: 5c 85 00 06 bne r4,r5,80081e8 <_CORE_mutex_Seize_interrupt_trylock+0x64> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 80081d4: 28 65 00 1c lw r5,(r3+28) 80081d8: 34 a5 00 01 addi r5,r5,1 80081dc: 58 65 00 1c sw (r3+28),r5 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 80081e0: 34 05 00 03 mvi r5,3 80081e4: 44 85 00 04 be r4,r5,80081f4 <_CORE_mutex_Seize_interrupt_trylock+0x70> _ISR_Enable( *level_p ); 80081e8: 28 41 00 00 lw r1,(r2+0) 80081ec: d0 01 00 00 wcsr IE,r1 80081f0: e0 00 00 2d bi 80082a4 <_CORE_mutex_Seize_interrupt_trylock+0x120> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 80081f4: 28 25 00 4c lw r5,(r1+76) current = executing->current_priority; 80081f8: 28 64 00 14 lw r4,(r3+20) if ( current == ceiling ) { 80081fc: 5c 85 00 04 bne r4,r5,800820c <_CORE_mutex_Seize_interrupt_trylock+0x88> _ISR_Enable( *level_p ); 8008200: 28 41 00 00 lw r1,(r2+0) 8008204: d0 01 00 00 wcsr IE,r1 8008208: e0 00 00 27 bi 80082a4 <_CORE_mutex_Seize_interrupt_trylock+0x120> return 0; } if ( current > ceiling ) { 800820c: 50 a4 00 0e bgeu r5,r4,8008244 <_CORE_mutex_Seize_interrupt_trylock+0xc0> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8008210: 78 03 08 01 mvhi r3,0x801 8008214: 38 63 c8 2c ori r3,r3,0xc82c 8008218: 28 64 00 00 lw r4,(r3+0) 800821c: 34 84 00 01 addi r4,r4,1 8008220: 58 64 00 00 sw (r3+0),r4 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 8008224: 28 42 00 00 lw r2,(r2+0) 8008228: d0 02 00 00 wcsr IE,r2 _Thread_Change_priority( 800822c: 28 22 00 4c lw r2,(r1+76) 8008230: 28 21 00 5c lw r1,(r1+92) 8008234: 34 03 00 00 mvi r3,0 8008238: fb ff ee a7 calli 8003cd4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 800823c: fb ff f0 17 calli 8004298 <_Thread_Enable_dispatch> 8008240: e0 00 00 19 bi 80082a4 <_CORE_mutex_Seize_interrupt_trylock+0x120> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 8008244: 34 04 00 06 mvi r4,6 8008248: 58 64 00 34 sw (r3+52),r4 the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 800824c: 34 04 00 00 mvi r4,0 8008250: 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; 8008254: 34 04 00 01 mvi r4,1 8008258: 58 24 00 50 sw (r1+80),r4 the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 800825c: 28 61 00 1c lw r1,(r3+28) 8008260: 34 21 ff ff addi r1,r1,-1 8008264: 58 61 00 1c sw (r3+28),r1 _ISR_Enable( *level_p ); 8008268: 28 41 00 00 lw r1,(r2+0) 800826c: d0 01 00 00 wcsr IE,r1 8008270: e0 00 00 0d bi 80082a4 <_CORE_mutex_Seize_interrupt_trylock+0x120> /* * 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 ) ) { 8008274: 28 24 00 5c lw r4,(r1+92) 8008278: 5c 83 00 12 bne r4,r3,80082c0 <_CORE_mutex_Seize_interrupt_trylock+0x13c> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 800827c: 28 23 00 40 lw r3,(r1+64) 8008280: 44 60 00 04 be r3,r0,8008290 <_CORE_mutex_Seize_interrupt_trylock+0x10c> 8008284: 34 01 00 01 mvi r1,1 8008288: 5c 61 00 0e bne r3,r1,80082c0 <_CORE_mutex_Seize_interrupt_trylock+0x13c><== ALWAYS TAKEN 800828c: e0 00 00 08 bi 80082ac <_CORE_mutex_Seize_interrupt_trylock+0x128><== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 8008290: 28 23 00 54 lw r3,(r1+84) 8008294: 34 63 00 01 addi r3,r3,1 8008298: 58 23 00 54 sw (r1+84),r3 _ISR_Enable( *level_p ); 800829c: 28 41 00 00 lw r1,(r2+0) 80082a0: d0 01 00 00 wcsr IE,r1 80082a4: 34 01 00 00 mvi r1,0 80082a8: e0 00 00 07 bi 80082c4 <_CORE_mutex_Seize_interrupt_trylock+0x140> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 80082ac: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 80082b0: 58 81 00 34 sw (r4+52),r1 <== NOT EXECUTED _ISR_Enable( *level_p ); 80082b4: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 80082b8: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 80082bc: e3 ff ff fa bi 80082a4 <_CORE_mutex_Seize_interrupt_trylock+0x120><== NOT EXECUTED 80082c0: 34 01 00 01 mvi r1,1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 80082c4: 2b 9d 00 04 lw ra,(sp+4) 80082c8: 37 9c 00 04 addi sp,sp,4 80082cc: c3 a0 00 00 ret =============================================================================== 080082e8 <_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 ) { 80082e8: 37 9c ff f8 addi sp,sp,-8 80082ec: 5b 8b 00 08 sw (sp+8),r11 80082f0: 5b 9d 00 04 sw (sp+4),ra 80082f4: 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)) ) { 80082f8: fb ff f0 f6 calli 80046d0 <_Thread_queue_Dequeue> 80082fc: 34 02 00 00 mvi r2,0 8008300: 5c 22 00 0e bne r1,r2,8008338 <_CORE_semaphore_Surrender+0x50> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 8008304: 90 00 08 00 rcsr r1,IE 8008308: 34 02 ff fe mvi r2,-2 800830c: a0 22 10 00 and r2,r1,r2 8008310: d0 02 00 00 wcsr IE,r2 if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 8008314: 29 62 00 48 lw r2,(r11+72) 8008318: 29 63 00 40 lw r3,(r11+64) 800831c: 54 62 00 03 bgu r3,r2,8008328 <_CORE_semaphore_Surrender+0x40><== ALWAYS TAKEN 8008320: 34 02 00 04 mvi r2,4 <== NOT EXECUTED 8008324: e0 00 00 04 bi 8008334 <_CORE_semaphore_Surrender+0x4c> <== NOT EXECUTED the_semaphore->count += 1; 8008328: 34 42 00 01 addi r2,r2,1 800832c: 59 62 00 48 sw (r11+72),r2 8008330: 34 02 00 00 mvi r2,0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 8008334: d0 01 00 00 wcsr IE,r1 } return status; } 8008338: b8 40 08 00 mv r1,r2 800833c: 2b 9d 00 04 lw ra,(sp+4) 8008340: 2b 8b 00 08 lw r11,(sp+8) 8008344: 37 9c 00 08 addi sp,sp,8 8008348: c3 a0 00 00 ret =============================================================================== 0800d7f8 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 800d7f8: 37 9c ff f8 addi sp,sp,-8 800d7fc: 5b 8b 00 08 sw (sp+8),r11 800d800: 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; 800d804: 78 05 08 02 mvhi r5,0x802 800d808: 38 a5 39 78 ori r5,r5,0x3978 800d80c: 28 ab 00 00 lw r11,(r5+0) executing->Wait.return_code = RTEMS_SUCCESSFUL; 800d810: 34 05 00 00 mvi r5,0 800d814: 59 65 00 34 sw (r11+52),r5 api = executing->API_Extensions[ THREAD_API_RTEMS ]; 800d818: 29 67 01 24 lw r7,(r11+292) _ISR_Disable( level ); 800d81c: 90 00 30 00 rcsr r6,IE 800d820: 34 05 ff fe mvi r5,-2 800d824: a0 c5 28 00 and r5,r6,r5 800d828: d0 05 00 00 wcsr IE,r5 pending_events = api->pending_events; 800d82c: 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 ); 800d830: a0 28 28 00 and r5,r1,r8 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 800d834: 44 a0 00 09 be r5,r0,800d858 <_Event_Seize+0x60> 800d838: 44 a1 00 03 be r5,r1,800d844 <_Event_Seize+0x4c> 800d83c: 20 49 00 02 andi r9,r2,0x2 800d840: 45 20 00 06 be r9,r0,800d858 <_Event_Seize+0x60> <== NEVER TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 800d844: a4 a0 08 00 not r1,r5 800d848: a0 28 40 00 and r8,r1,r8 800d84c: 58 e8 00 00 sw (r7+0),r8 _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 800d850: d0 06 00 00 wcsr IE,r6 800d854: e0 00 00 06 bi 800d86c <_Event_Seize+0x74> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 800d858: 20 47 00 01 andi r7,r2,0x1 800d85c: 44 e0 00 06 be r7,r0,800d874 <_Event_Seize+0x7c> _ISR_Enable( level ); 800d860: d0 06 00 00 wcsr IE,r6 executing->Wait.return_code = RTEMS_UNSATISFIED; 800d864: 34 01 00 0d mvi r1,13 800d868: 59 61 00 34 sw (r11+52),r1 *event_out = seized_events; 800d86c: 58 85 00 00 sw (r4+0),r5 return; 800d870: e0 00 00 29 bi 800d914 <_Event_Seize+0x11c> */ 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; 800d874: 78 05 08 02 mvhi r5,0x802 800d878: 38 a5 3b b8 ori r5,r5,0x3bb8 800d87c: 34 07 00 01 mvi r7,1 800d880: 58 a7 00 00 sw (r5+0),r7 * 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; 800d884: 59 62 00 30 sw (r11+48),r2 executing->Wait.count = (uint32_t) event_in; 800d888: 59 61 00 24 sw (r11+36),r1 executing->Wait.return_argument = event_out; 800d88c: 59 64 00 28 sw (r11+40),r4 _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); 800d890: d0 06 00 00 wcsr IE,r6 if ( ticks ) { 800d894: 34 04 00 00 mvi r4,0 800d898: 44 64 00 0d be r3,r4,800d8cc <_Event_Seize+0xd4> _Watchdog_Initialize( 800d89c: 29 65 00 08 lw r5,(r11+8) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 800d8a0: 78 02 08 00 mvhi r2,0x800 800d8a4: 38 42 da e0 ori r2,r2,0xdae0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 800d8a8: 78 01 08 02 mvhi r1,0x802 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 800d8ac: 59 62 00 64 sw (r11+100),r2 the_watchdog->id = id; 800d8b0: 59 65 00 68 sw (r11+104),r5 the_watchdog->user_data = user_data; 800d8b4: 59 64 00 6c sw (r11+108),r4 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 800d8b8: 59 63 00 54 sw (r11+84),r3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 800d8bc: 59 64 00 50 sw (r11+80),r4 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 800d8c0: 38 21 39 98 ori r1,r1,0x3998 800d8c4: 35 62 00 48 addi r2,r11,72 800d8c8: fb ff e8 51 calli 8007a0c <_Watchdog_Insert> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 800d8cc: b9 60 08 00 mv r1,r11 800d8d0: 34 02 01 00 mvi r2,256 800d8d4: fb ff e6 5c calli 8007244 <_Thread_Set_state> _ISR_Disable( level ); 800d8d8: 90 00 18 00 rcsr r3,IE 800d8dc: 34 01 ff fe mvi r1,-2 800d8e0: a0 61 08 00 and r1,r3,r1 800d8e4: d0 01 00 00 wcsr IE,r1 sync_state = _Event_Sync_state; 800d8e8: 78 02 08 02 mvhi r2,0x802 800d8ec: 38 42 3b b8 ori r2,r2,0x3bb8 800d8f0: 28 41 00 00 lw r1,(r2+0) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 800d8f4: 34 04 00 00 mvi r4,0 800d8f8: 58 44 00 00 sw (r2+0),r4 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 800d8fc: 34 02 00 01 mvi r2,1 800d900: 5c 22 00 03 bne r1,r2,800d90c <_Event_Seize+0x114> _ISR_Enable( level ); 800d904: d0 03 00 00 wcsr IE,r3 return; 800d908: e0 00 00 03 bi 800d914 <_Event_Seize+0x11c> * 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 ); 800d90c: b9 60 10 00 mv r2,r11 800d910: f8 00 05 b5 calli 800efe4 <_Thread_blocking_operation_Cancel> } 800d914: 2b 9d 00 04 lw ra,(sp+4) 800d918: 2b 8b 00 08 lw r11,(sp+8) 800d91c: 37 9c 00 08 addi sp,sp,8 800d920: c3 a0 00 00 ret =============================================================================== 0800d98c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 800d98c: 37 9c ff f8 addi sp,sp,-8 800d990: 5b 8b 00 08 sw (sp+8),r11 800d994: 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 ]; 800d998: 28 24 01 24 lw r4,(r1+292) option_set = (rtems_option) the_thread->Wait.option; 800d99c: 28 28 00 30 lw r8,(r1+48) */ void _Event_Surrender( Thread_Control *the_thread ) { 800d9a0: 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 ); 800d9a4: 90 00 08 00 rcsr r1,IE 800d9a8: 34 07 ff fe mvi r7,-2 800d9ac: a0 27 38 00 and r7,r1,r7 800d9b0: d0 07 00 00 wcsr IE,r7 pending_events = api->pending_events; 800d9b4: 28 85 00 00 lw r5,(r4+0) event_condition = (rtems_event_set) the_thread->Wait.count; 800d9b8: 29 66 00 24 lw r6,(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 ); 800d9bc: a0 c5 10 00 and r2,r6,r5 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 800d9c0: 5c 40 00 03 bne r2,r0,800d9cc <_Event_Surrender+0x40> _ISR_Enable( level ); 800d9c4: d0 01 00 00 wcsr IE,r1 return; 800d9c8: e0 00 00 42 bi 800dad0 <_Event_Surrender+0x144> /* * 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() && 800d9cc: 78 03 08 02 mvhi r3,0x802 800d9d0: 38 63 39 54 ori r3,r3,0x3954 800d9d4: 28 63 00 00 lw r3,(r3+0) 800d9d8: 44 60 00 1d be r3,r0,800da4c <_Event_Surrender+0xc0> 800d9dc: 78 03 08 02 mvhi r3,0x802 800d9e0: 38 63 39 78 ori r3,r3,0x3978 800d9e4: 28 63 00 00 lw r3,(r3+0) 800d9e8: 5d 63 00 19 bne r11,r3,800da4c <_Event_Surrender+0xc0> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 800d9ec: 78 03 08 02 mvhi r3,0x802 800d9f0: 38 63 3b b8 ori r3,r3,0x3bb8 800d9f4: 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() && 800d9f8: 34 09 00 02 mvi r9,2 800d9fc: 45 49 00 04 be r10,r9,800da0c <_Event_Surrender+0x80> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 800da00: 28 69 00 00 lw r9,(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() && 800da04: 34 03 00 01 mvi r3,1 800da08: 5d 23 00 11 bne r9,r3,800da4c <_Event_Surrender+0xc0> <== 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) ) { 800da0c: 44 46 00 03 be r2,r6,800da18 <_Event_Surrender+0x8c> <== ALWAYS TAKEN 800da10: 21 08 00 02 andi r8,r8,0x2 <== NOT EXECUTED 800da14: 45 00 00 0c be r8,r0,800da44 <_Event_Surrender+0xb8> <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 800da18: a4 40 18 00 not r3,r2 800da1c: a0 65 28 00 and r5,r3,r5 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 800da20: 29 66 00 28 lw r6,(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 ); 800da24: 58 85 00 00 sw (r4+0),r5 the_thread->Wait.count = 0; 800da28: 34 04 00 00 mvi r4,0 *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 800da2c: 78 03 08 02 mvhi r3,0x802 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 800da30: 59 64 00 24 sw (r11+36),r4 *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 800da34: 38 63 3b b8 ori r3,r3,0x3bb8 ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 800da38: 58 c2 00 00 sw (r6+0),r2 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 800da3c: 34 02 00 03 mvi r2,3 800da40: 58 62 00 00 sw (r3+0),r2 } _ISR_Enable( level ); 800da44: d0 01 00 00 wcsr IE,r1 return; 800da48: e0 00 00 22 bi 800dad0 <_Event_Surrender+0x144> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 800da4c: 29 63 00 10 lw r3,(r11+16) 800da50: 20 63 01 00 andi r3,r3,0x100 800da54: 44 60 00 1e be r3,r0,800dacc <_Event_Surrender+0x140> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 800da58: 44 46 00 03 be r2,r6,800da64 <_Event_Surrender+0xd8> 800da5c: 21 08 00 02 andi r8,r8,0x2 800da60: 45 00 00 1b be r8,r0,800dacc <_Event_Surrender+0x140> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 800da64: a4 40 18 00 not r3,r2 800da68: a0 65 28 00 and r5,r3,r5 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 800da6c: 29 66 00 28 lw r6,(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 ); 800da70: 58 85 00 00 sw (r4+0),r5 the_thread->Wait.count = 0; 800da74: 34 03 00 00 mvi r3,0 800da78: 59 63 00 24 sw (r11+36),r3 *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 800da7c: 58 c2 00 00 sw (r6+0),r2 _ISR_Flash( level ); 800da80: d0 01 00 00 wcsr IE,r1 800da84: d0 07 00 00 wcsr IE,r7 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 800da88: 29 63 00 50 lw r3,(r11+80) 800da8c: 34 02 00 02 mvi r2,2 800da90: 44 62 00 05 be r3,r2,800daa4 <_Event_Surrender+0x118> _ISR_Enable( level ); 800da94: d0 01 00 00 wcsr IE,r1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 800da98: 78 02 10 03 mvhi r2,0x1003 800da9c: b9 60 08 00 mv r1,r11 800daa0: e0 00 00 08 bi 800dac0 <_Event_Surrender+0x134> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 800daa4: 34 02 00 03 mvi r2,3 800daa8: 59 62 00 50 sw (r11+80),r2 _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 800daac: d0 01 00 00 wcsr IE,r1 (void) _Watchdog_Remove( &the_thread->Timer ); 800dab0: 35 61 00 48 addi r1,r11,72 800dab4: fb ff e8 35 calli 8007b88 <_Watchdog_Remove> 800dab8: b9 60 08 00 mv r1,r11 800dabc: 78 02 10 03 mvhi r2,0x1003 800dac0: 38 42 ff f8 ori r2,r2,0xfff8 800dac4: f8 00 05 60 calli 800f044 <_Thread_Clear_state> 800dac8: e0 00 00 02 bi 800dad0 <_Event_Surrender+0x144> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 800dacc: d0 01 00 00 wcsr IE,r1 } 800dad0: 2b 9d 00 04 lw ra,(sp+4) 800dad4: 2b 8b 00 08 lw r11,(sp+8) 800dad8: 37 9c 00 08 addi sp,sp,8 800dadc: c3 a0 00 00 ret =============================================================================== 0800dae0 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 800dae0: 37 9c ff f8 addi sp,sp,-8 800dae4: 5b 9d 00 04 sw (sp+4),ra Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 800dae8: 37 82 00 08 addi r2,sp,8 800daec: fb ff e3 3b calli 80067d8 <_Thread_Get> switch ( location ) { 800daf0: 2b 82 00 08 lw r2,(sp+8) 800daf4: 5c 40 00 1d bne r2,r0,800db68 <_Event_Timeout+0x88> <== NEVER TAKEN * * 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 ); 800daf8: 90 00 18 00 rcsr r3,IE 800dafc: 34 02 ff fe mvi r2,-2 800db00: a0 62 10 00 and r2,r3,r2 800db04: d0 02 00 00 wcsr IE,r2 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 800db08: 78 02 08 02 mvhi r2,0x802 800db0c: 38 42 39 78 ori r2,r2,0x3978 800db10: 28 42 00 00 lw r2,(r2+0) _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 800db14: 34 04 00 00 mvi r4,0 800db18: 58 24 00 24 sw (r1+36),r4 if ( _Thread_Is_executing( the_thread ) ) { 800db1c: 5c 22 00 08 bne r1,r2,800db3c <_Event_Timeout+0x5c> <== ALWAYS TAKEN if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 800db20: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 800db24: 38 42 3b b8 ori r2,r2,0x3bb8 <== NOT EXECUTED 800db28: 28 45 00 00 lw r5,(r2+0) <== NOT EXECUTED 800db2c: 34 04 00 01 mvi r4,1 <== NOT EXECUTED 800db30: 5c a4 00 03 bne r5,r4,800db3c <_Event_Timeout+0x5c> <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 800db34: 34 04 00 02 mvi r4,2 <== NOT EXECUTED 800db38: 58 44 00 00 sw (r2+0),r4 <== NOT EXECUTED } the_thread->Wait.return_code = RTEMS_TIMEOUT; 800db3c: 34 02 00 06 mvi r2,6 800db40: 58 22 00 34 sw (r1+52),r2 _ISR_Enable( level ); 800db44: d0 03 00 00 wcsr IE,r3 800db48: 78 02 10 03 mvhi r2,0x1003 800db4c: 38 42 ff f8 ori r2,r2,0xfff8 800db50: f8 00 05 3d calli 800f044 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 800db54: 78 01 08 02 mvhi r1,0x802 800db58: 38 21 38 bc ori r1,r1,0x38bc 800db5c: 28 22 00 00 lw r2,(r1+0) 800db60: 34 42 ff ff addi r2,r2,-1 800db64: 58 22 00 00 sw (r1+0),r2 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 800db68: 2b 9d 00 04 lw ra,(sp+4) 800db6c: 37 9c 00 08 addi sp,sp,8 800db70: c3 a0 00 00 ret =============================================================================== 0800847c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 800847c: 37 9c ff b4 addi sp,sp,-76 8008480: 5b 8b 00 44 sw (sp+68),r11 8008484: 5b 8c 00 40 sw (sp+64),r12 8008488: 5b 8d 00 3c sw (sp+60),r13 800848c: 5b 8e 00 38 sw (sp+56),r14 8008490: 5b 8f 00 34 sw (sp+52),r15 8008494: 5b 90 00 30 sw (sp+48),r16 8008498: 5b 91 00 2c sw (sp+44),r17 800849c: 5b 92 00 28 sw (sp+40),r18 80084a0: 5b 93 00 24 sw (sp+36),r19 80084a4: 5b 94 00 20 sw (sp+32),r20 80084a8: 5b 95 00 1c sw (sp+28),r21 80084ac: 5b 96 00 18 sw (sp+24),r22 80084b0: 5b 97 00 14 sw (sp+20),r23 80084b4: 5b 98 00 10 sw (sp+16),r24 80084b8: 5b 99 00 0c sw (sp+12),r25 80084bc: 5b 9b 00 08 sw (sp+8),fp 80084c0: 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; 80084c4: 34 55 00 04 addi r21,r2,4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 80084c8: b8 40 68 00 mv r13,r2 80084cc: b8 20 60 00 mv r12,r1 80084d0: b8 60 78 00 mv r15,r3 80084d4: 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; 80084d8: 28 2e 00 08 lw r14,(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; 80084dc: 28 33 00 10 lw r19,(r1+16) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 80084e0: 54 55 00 59 bgu r2,r21,8008644 <_Heap_Allocate_aligned_with_boundary+0x1c8> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 80084e4: 44 80 00 04 be r4,r0,80084f4 <_Heap_Allocate_aligned_with_boundary+0x78> if ( boundary < alloc_size ) { 80084e8: 54 44 00 57 bgu r2,r4,8008644 <_Heap_Allocate_aligned_with_boundary+0x1c8> return NULL; } if ( alignment == 0 ) { 80084ec: 5c 60 00 02 bne r3,r0,80084f4 <_Heap_Allocate_aligned_with_boundary+0x78> 80084f0: ba 60 78 00 mv r15,r19 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; 80084f4: 34 01 00 04 mvi r1,4 80084f8: c8 2d 08 00 sub r1,r1,r13 80084fc: 5b 81 00 4c sw (sp+76),r1 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 8008500: 34 11 00 00 mvi r17,0 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; 8008504: 34 1b ff fe mvi fp,-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; 8008508: 36 79 00 07 addi r25,r19,7 /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 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; 800850c: 34 18 ff f8 mvi r24,-8 8008510: e0 00 00 3d bi 8008604 <_Heap_Allocate_aligned_with_boundary+0x188> /* * 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 ) { 8008514: 29 d0 00 04 lw r16,(r14+4) while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 8008518: 36 31 00 01 addi r17,r17,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 ) { 800851c: 52 b0 00 39 bgeu r21,r16,8008600 <_Heap_Allocate_aligned_with_boundary+0x184> 8008520: 35 d4 00 08 addi r20,r14,8 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 8008524: ba 80 58 00 mv r11,r20 if ( alignment == 0 ) { 8008528: 45 e0 00 35 be r15,r0,80085fc <_Heap_Allocate_aligned_with_boundary+0x180> 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; 800852c: 2b 81 00 4c lw r1,(sp+76) 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; 8008530: a2 1b 80 00 and r16,r16,fp uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 8008534: 29 96 00 14 lw r22,(r12+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; 8008538: b5 d0 80 00 add r16,r14,r16 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; 800853c: b4 30 58 00 add r11,r1,r16 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; 8008540: cb 36 18 00 sub r3,r25,r22 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 8008544: b9 60 08 00 mv r1,r11 8008548: b9 e0 10 00 mv r2,r15 800854c: b4 70 80 00 add r16,r3,r16 8008550: f8 00 43 06 calli 8019168 <__umodsi3> 8008554: c9 61 58 00 sub r11,r11,r1 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 ) { 8008558: 52 0b 00 05 bgeu r16,r11,800856c <_Heap_Allocate_aligned_with_boundary+0xf0> 800855c: ba 00 08 00 mv r1,r16 8008560: b9 e0 10 00 mv r2,r15 8008564: f8 00 43 01 calli 8019168 <__umodsi3> 8008568: ca 01 58 00 sub r11,r16,r1 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 800856c: 46 40 00 19 be r18,r0,80085d0 <_Heap_Allocate_aligned_with_boundary+0x154> /* 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; 8008570: b5 6d 80 00 add r16,r11,r13 8008574: ba 00 08 00 mv r1,r16 8008578: ba 40 10 00 mv r2,r18 800857c: f8 00 42 fb calli 8019168 <__umodsi3> 8008580: ca 01 18 00 sub r3,r16,r1 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 8008584: b6 8d 20 00 add r4,r20,r13 8008588: e0 00 00 0b bi 80085b4 <_Heap_Allocate_aligned_with_boundary+0x138> uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 800858c: 54 83 00 1d bgu r4,r3,8008600 <_Heap_Allocate_aligned_with_boundary+0x184> 8008590: 5b 84 00 48 sw (sp+72),r4 8008594: f8 00 42 f5 calli 8019168 <__umodsi3> 8008598: ca e1 58 00 sub r11,r23,r1 return 0; } alloc_begin = boundary_line - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 800859c: b5 6d 80 00 add r16,r11,r13 80085a0: ba 00 08 00 mv r1,r16 80085a4: ba 40 10 00 mv r2,r18 80085a8: f8 00 42 f0 calli 8019168 <__umodsi3> 80085ac: 2b 84 00 48 lw r4,(sp+72) 80085b0: ca 01 18 00 sub r3,r16,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 ) { 80085b4: f6 03 80 00 cmpgu r16,r16,r3 80085b8: f4 6b 28 00 cmpgu r5,r3,r11 if ( boundary_line < boundary_floor ) { return 0; } alloc_begin = boundary_line - alloc_size; 80085bc: c8 6d b8 00 sub r23,r3,r13 /* 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 ) { 80085c0: a2 05 80 00 and r16,r16,r5 80085c4: b9 e0 10 00 mv r2,r15 80085c8: ba e0 08 00 mv r1,r23 80085cc: 5e 00 ff f0 bne r16,r0,800858c <_Heap_Allocate_aligned_with_boundary+0x110> 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 ) { 80085d0: 56 8b 00 0c bgu r20,r11,8008600 <_Heap_Allocate_aligned_with_boundary+0x184> 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; 80085d4: cb 0e 80 00 sub r16,r24,r14 80085d8: b9 60 08 00 mv r1,r11 80085dc: ba 60 10 00 mv r2,r19 80085e0: b6 0b 80 00 add r16,r16,r11 80085e4: f8 00 42 e1 calli 8019168 <__umodsi3> 80085e8: ca 01 08 00 sub r1,r16,r1 if ( free_size >= min_block_size || free_size == 0 ) { 80085ec: f0 36 b0 00 cmpgeu r22,r1,r22 80085f0: 64 21 00 00 cmpei r1,r1,0 80085f4: b8 36 08 00 or r1,r1,r22 80085f8: 44 20 00 02 be r1,r0,8008600 <_Heap_Allocate_aligned_with_boundary+0x184> boundary ); } } if ( alloc_begin != 0 ) { 80085fc: 5d 60 00 05 bne r11,r0,8008610 <_Heap_Allocate_aligned_with_boundary+0x194><== ALWAYS TAKEN break; } block = block->next; 8008600: 29 ce 00 08 lw r14,(r14+8) if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 8008604: 5d cc ff c4 bne r14,r12,8008514 <_Heap_Allocate_aligned_with_boundary+0x98> 8008608: 34 0b 00 00 mvi r11,0 800860c: e0 00 00 09 bi 8008630 <_Heap_Allocate_aligned_with_boundary+0x1b4> block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 8008610: 29 81 00 4c lw r1,(r12+76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 8008614: b9 c0 10 00 mv r2,r14 8008618: b9 a0 20 00 mv r4,r13 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 800861c: b4 31 08 00 add r1,r1,r17 8008620: 59 81 00 4c sw (r12+76),r1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 8008624: b9 60 18 00 mv r3,r11 8008628: b9 80 08 00 mv r1,r12 800862c: fb ff ea fa calli 8003214 <_Heap_Block_allocate> uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 8008630: 29 81 00 44 lw r1,(r12+68) 8008634: 50 31 00 02 bgeu r1,r17,800863c <_Heap_Allocate_aligned_with_boundary+0x1c0> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 8008638: 59 91 00 44 sw (r12+68),r17 } return (void *) alloc_begin; 800863c: b9 60 08 00 mv r1,r11 8008640: e0 00 00 02 bi 8008648 <_Heap_Allocate_aligned_with_boundary+0x1cc> 8008644: 34 01 00 00 mvi r1,0 } 8008648: 2b 9d 00 04 lw ra,(sp+4) 800864c: 2b 8b 00 44 lw r11,(sp+68) 8008650: 2b 8c 00 40 lw r12,(sp+64) 8008654: 2b 8d 00 3c lw r13,(sp+60) 8008658: 2b 8e 00 38 lw r14,(sp+56) 800865c: 2b 8f 00 34 lw r15,(sp+52) 8008660: 2b 90 00 30 lw r16,(sp+48) 8008664: 2b 91 00 2c lw r17,(sp+44) 8008668: 2b 92 00 28 lw r18,(sp+40) 800866c: 2b 93 00 24 lw r19,(sp+36) 8008670: 2b 94 00 20 lw r20,(sp+32) 8008674: 2b 95 00 1c lw r21,(sp+28) 8008678: 2b 96 00 18 lw r22,(sp+24) 800867c: 2b 97 00 14 lw r23,(sp+20) 8008680: 2b 98 00 10 lw r24,(sp+16) 8008684: 2b 99 00 0c lw r25,(sp+12) 8008688: 2b 9b 00 08 lw fp,(sp+8) 800868c: 37 9c 00 4c addi sp,sp,76 8008690: c3 a0 00 00 ret =============================================================================== 0800e3d0 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800e3d0: 37 9c ff e8 addi sp,sp,-24 800e3d4: 5b 8b 00 18 sw (sp+24),r11 800e3d8: 5b 8c 00 14 sw (sp+20),r12 800e3dc: 5b 8d 00 10 sw (sp+16),r13 800e3e0: 5b 8e 00 0c sw (sp+12),r14 800e3e4: 5b 8f 00 08 sw (sp+8),r15 800e3e8: 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; 800e3ec: 28 2d 00 18 lw r13,(r1+24) uintptr_t const heap_area_end = heap->area_end; 800e3f0: 28 25 00 1c lw r5,(r1+28) Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800e3f4: 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; 800e3f8: f0 4d 68 00 cmpgeu r13,r2,r13 * 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 ) { 800e3fc: f4 a2 08 00 cmpgu r1,r5,r2 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800e400: b8 80 78 00 mv r15,r4 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; 800e404: a0 2d 68 00 and r13,r1,r13 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; 800e408: 29 6c 00 24 lw r12,(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; 800e40c: 34 01 00 01 mvi r1,1 800e410: 5d a0 00 26 bne r13,r0,800e4a8 <_Heap_Extend+0xd8> * 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 ) { 800e414: 34 01 00 02 mvi r1,2 800e418: 5c 45 00 24 bne r2,r5,800e4a8 <_Heap_Extend+0xd8> { 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; 800e41c: b4 62 18 00 add r3,r3,r2 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 800e420: c8 6c 70 00 sub r14,r3,r12 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 800e424: 29 62 00 10 lw r2,(r11+16) 800e428: 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; 800e42c: 59 63 00 1c sw (r11+28),r3 800e430: b9 c0 08 00 mv r1,r14 800e434: fb ff d7 cd calli 8004368 <__umodsi3> 800e438: c9 c1 08 00 sub r1,r14,r1 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; 800e43c: 59 e1 00 00 sw (r15+0),r1 if( extend_size >= heap->min_block_size ) { 800e440: 29 62 00 14 lw r2,(r11+20) 800e444: 50 22 00 02 bgeu r1,r2,800e44c <_Heap_Extend+0x7c> <== ALWAYS TAKEN 800e448: e0 00 00 17 bi 800e4a4 <_Heap_Extend+0xd4> <== NOT EXECUTED uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 800e44c: 29 84 00 04 lw r4,(r12+4) 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 = 800e450: 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); 800e454: b4 2c 10 00 add r2,r1,r12 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 800e458: 20 84 00 01 andi r4,r4,0x1 800e45c: b8 24 20 00 or r4,r1,r4 800e460: c8 62 18 00 sub r3,r3,r2 800e464: 59 84 00 04 sw (r12+4),r4 800e468: 38 63 00 01 ori r3,r3,0x1 800e46c: 58 43 00 04 sw (r2+4),r3 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 800e470: 29 65 00 2c lw r5,(r11+44) ++stats->used_blocks; 800e474: 29 64 00 40 lw r4,(r11+64) --stats->frees; /* Do not count subsequent call as actual free() */ 800e478: 29 63 00 50 lw r3,(r11+80) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 800e47c: b4 a1 08 00 add r1,r5,r1 ++stats->used_blocks; 800e480: 34 84 00 01 addi r4,r4,1 --stats->frees; /* Do not count subsequent call as actual free() */ 800e484: 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; 800e488: 59 62 00 24 sw (r11+36),r2 /* Statistics */ stats->size += extend_size; 800e48c: 59 61 00 2c sw (r11+44),r1 ++stats->used_blocks; 800e490: 59 64 00 40 sw (r11+64),r4 --stats->frees; /* Do not count subsequent call as actual free() */ 800e494: 59 63 00 50 sw (r11+80),r3 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 800e498: b9 60 08 00 mv r1,r11 800e49c: 35 82 00 08 addi r2,r12,8 800e4a0: fb ff e7 a0 calli 8008320 <_Heap_Free> 800e4a4: b9 a0 08 00 mv r1,r13 } return HEAP_EXTEND_SUCCESSFUL; } 800e4a8: 2b 9d 00 04 lw ra,(sp+4) 800e4ac: 2b 8b 00 18 lw r11,(sp+24) 800e4b0: 2b 8c 00 14 lw r12,(sp+20) 800e4b4: 2b 8d 00 10 lw r13,(sp+16) 800e4b8: 2b 8e 00 0c lw r14,(sp+12) 800e4bc: 2b 8f 00 08 lw r15,(sp+8) 800e4c0: 37 9c 00 18 addi sp,sp,24 800e4c4: c3 a0 00 00 ret =============================================================================== 08008694 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 8008694: 37 9c ff f4 addi sp,sp,-12 8008698: 5b 8b 00 0c sw (sp+12),r11 800869c: 5b 8c 00 08 sw (sp+8),r12 80086a0: 5b 9d 00 04 sw (sp+4),ra 80086a4: 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 ) 80086a8: 28 22 00 10 lw r2,(r1+16) 80086ac: b8 20 58 00 mv r11,r1 80086b0: b8 60 08 00 mv r1,r3 80086b4: 34 6c ff f8 addi r12,r3,-8 80086b8: f8 00 42 ac calli 8019168 <__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; 80086bc: 29 66 00 20 lw r6,(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 ) 80086c0: 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 80086c4: 50 26 00 03 bgeu r1,r6,80086d0 <_Heap_Free+0x3c> 80086c8: 34 02 00 00 mvi r2,0 80086cc: e0 00 00 03 bi 80086d8 <_Heap_Free+0x44> 80086d0: 29 62 00 24 lw r2,(r11+36) 80086d4: f0 41 10 00 cmpgeu r2,r2,r1 Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 80086d8: 44 40 00 66 be r2,r0,8008870 <_Heap_Free+0x1dc> - 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; 80086dc: 28 25 00 04 lw r5,(r1+4) 80086e0: 34 02 ff fe mvi r2,-2 80086e4: a0 a2 10 00 and r2,r5,r2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 80086e8: b4 22 18 00 add r3,r1,r2 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 80086ec: 50 66 00 03 bgeu r3,r6,80086f8 <_Heap_Free+0x64> <== ALWAYS TAKEN 80086f0: 34 04 00 00 mvi r4,0 <== NOT EXECUTED 80086f4: e0 00 00 03 bi 8008700 <_Heap_Free+0x6c> <== NOT EXECUTED 80086f8: 29 64 00 24 lw r4,(r11+36) 80086fc: f0 83 20 00 cmpgeu r4,r4,r3 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 8008700: 44 80 00 5c be r4,r0,8008870 <_Heap_Free+0x1dc> <== 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; 8008704: 28 64 00 04 lw r4,(r3+4) _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 8008708: 20 87 00 01 andi r7,r4,0x1 800870c: 44 e0 00 59 be r7,r0,8008870 <_Heap_Free+0x1dc> <== NEVER TAKEN return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 8008710: 29 68 00 24 lw r8,(r11+36) - 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; 8008714: 34 07 ff fe mvi r7,-2 8008718: a0 87 20 00 and r4,r4,r7 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 800871c: 34 07 00 00 mvi r7,0 8008720: 45 03 00 05 be r8,r3,8008734 <_Heap_Free+0xa0> 8008724: b4 64 38 00 add r7,r3,r4 8008728: 28 e7 00 04 lw r7,(r7+4) 800872c: 20 e7 00 01 andi r7,r7,0x1 8008730: 18 e7 00 01 xori r7,r7,0x1 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 8008734: 20 a5 00 01 andi r5,r5,0x1 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 8008738: 20 e7 00 ff andi r7,r7,0xff && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 800873c: 5c a0 00 23 bne r5,r0,80087c8 <_Heap_Free+0x134> uintptr_t const prev_size = block->prev_size; 8008740: 28 25 00 00 lw r5,(r1+0) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 8008744: c8 25 08 00 sub r1,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 8008748: f0 26 30 00 cmpgeu r6,r1,r6 800874c: f1 01 40 00 cmpgeu r8,r8,r1 8008750: c8 06 30 00 sub r6,r0,r6 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 8008754: a1 06 40 00 and r8,r8,r6 8008758: 45 00 00 46 be r8,r0,8008870 <_Heap_Free+0x1dc> <== 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) ) { 800875c: 28 26 00 04 lw r6,(r1+4) 8008760: 20 c6 00 01 andi r6,r6,0x1 8008764: 44 c0 00 43 be r6,r0,8008870 <_Heap_Free+0x1dc> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 8008768: 44 e0 00 0f be r7,r0,80087a4 <_Heap_Free+0x110> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 800876c: 29 68 00 38 lw r8,(r11+56) } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 8008770: 28 66 00 0c lw r6,(r3+12) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 8008774: 28 67 00 08 lw r7,(r3+8) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 8008778: b4 44 20 00 add r4,r2,r4 800877c: b4 85 28 00 add r5,r4,r5 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 8008780: 35 03 ff ff addi r3,r8,-1 8008784: 59 63 00 38 sw (r11+56),r3 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; 8008788: b4 25 20 00 add r4,r1,r5 if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 800878c: 38 a3 00 01 ori r3,r5,0x1 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 8008790: 58 e6 00 0c sw (r7+12),r6 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 8008794: 58 85 00 00 sw (r4+0),r5 if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 8008798: 58 23 00 04 sw (r1+4),r3 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 800879c: 58 c7 00 08 sw (r6+8),r7 80087a0: e0 00 00 29 bi 8008844 <_Heap_Free+0x1b0> 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; 80087a4: b4 45 28 00 add r5,r2,r5 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 80087a8: 38 a4 00 01 ori r4,r5,0x1 80087ac: 58 24 00 04 sw (r1+4),r4 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 80087b0: 28 64 00 04 lw r4,(r3+4) 80087b4: 34 01 ff fe mvi r1,-2 next_block->prev_size = size; 80087b8: 58 65 00 00 sw (r3+0),r5 _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; 80087bc: a0 81 08 00 and r1,r4,r1 80087c0: 58 61 00 04 sw (r3+4),r1 80087c4: e0 00 00 20 bi 8008844 <_Heap_Free+0x1b0> next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 80087c8: 44 e0 00 0d be r7,r0,80087fc <_Heap_Free+0x168> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 80087cc: 28 65 00 0c lw r5,(r3+12) RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 80087d0: 28 66 00 08 lw r6,(r3+8) uintptr_t const size = block_size + next_block_size; 80087d4: b4 82 18 00 add r3,r4,r2 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 80087d8: 58 25 00 0c sw (r1+12),r5 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 80087dc: 58 26 00 08 sw (r1+8),r6 _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; 80087e0: b4 23 38 00 add r7,r1,r3 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; 80087e4: 38 64 00 01 ori r4,r3,0x1 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 80087e8: 58 e3 00 00 sw (r7+0),r3 new_block->prev = prev; next->prev = new_block; 80087ec: 58 c1 00 0c sw (r6+12),r1 prev->next = new_block; 80087f0: 58 a1 00 08 sw (r5+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; 80087f4: 58 24 00 04 sw (r1+4),r4 80087f8: e0 00 00 13 bi 8008844 <_Heap_Free+0x1b0> 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; 80087fc: 38 44 00 01 ori r4,r2,0x1 8008800: 58 24 00 04 sw (r1+4),r4 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 8008804: 28 65 00 04 lw r5,(r3+4) 8008808: 34 04 ff fe mvi r4,-2 next_block->prev_size = block_size; 800880c: 58 62 00 00 sw (r3+0),r2 } 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; 8008810: a0 a4 20 00 and r4,r5,r4 8008814: 58 64 00 04 sw (r3+4),r4 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 8008818: 29 63 00 38 lw r3,(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; 800881c: 29 64 00 08 lw r4,(r11+8) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 8008820: 29 65 00 3c lw r5,(r11+60) new_block->next = next; new_block->prev = block_before; 8008824: 58 2b 00 0c sw (r1+12),r11 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 8008828: 58 24 00 08 sw (r1+8),r4 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; 800882c: 34 63 00 01 addi r3,r3,1 new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 8008830: 58 81 00 0c sw (r4+12),r1 { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 8008834: 59 61 00 08 sw (r11+8),r1 8008838: 59 63 00 38 sw (r11+56),r3 #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 800883c: 50 a3 00 02 bgeu r5,r3,8008844 <_Heap_Free+0x1b0> 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; 8008840: 59 63 00 3c sw (r11+60),r3 } } /* Statistics */ --stats->used_blocks; 8008844: 29 63 00 40 lw r3,(r11+64) ++stats->frees; 8008848: 29 61 00 50 lw r1,(r11+80) stats->free_size += block_size; 800884c: 29 64 00 30 lw r4,(r11+48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 8008850: 34 63 ff ff addi r3,r3,-1 ++stats->frees; 8008854: 34 21 00 01 addi r1,r1,1 stats->free_size += block_size; 8008858: b4 82 10 00 add r2,r4,r2 } } /* Statistics */ --stats->used_blocks; ++stats->frees; 800885c: 59 61 00 50 sw (r11+80),r1 stats->free_size += block_size; 8008860: 59 62 00 30 sw (r11+48),r2 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 8008864: 59 63 00 40 sw (r11+64),r3 ++stats->frees; stats->free_size += block_size; 8008868: 34 01 00 01 mvi r1,1 return( true ); 800886c: e0 00 00 02 bi 8008874 <_Heap_Free+0x1e0> 8008870: 34 01 00 00 mvi r1,0 } 8008874: 2b 9d 00 04 lw ra,(sp+4) 8008878: 2b 8b 00 0c lw r11,(sp+12) 800887c: 2b 8c 00 08 lw r12,(sp+8) 8008880: 37 9c 00 0c addi sp,sp,12 8008884: c3 a0 00 00 ret =============================================================================== 08019d04 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 8019d04: 37 9c ff f0 addi sp,sp,-16 8019d08: 5b 8b 00 10 sw (sp+16),r11 8019d0c: 5b 8c 00 0c sw (sp+12),r12 8019d10: 5b 8d 00 08 sw (sp+8),r13 8019d14: 5b 9d 00 04 sw (sp+4),ra 8019d18: 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 ) 8019d1c: 28 22 00 10 lw r2,(r1+16) 8019d20: b8 20 58 00 mv r11,r1 8019d24: b9 80 08 00 mv r1,r12 8019d28: b8 60 68 00 mv r13,r3 8019d2c: fb ff fd 0f calli 8019168 <__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; 8019d30: 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 ) 8019d34: 35 84 ff f8 addi r4,r12,-8 8019d38: 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 8019d3c: 50 82 00 03 bgeu r4,r2,8019d48 <_Heap_Size_of_alloc_area+0x44> 8019d40: 34 01 00 00 mvi r1,0 8019d44: e0 00 00 03 bi 8019d50 <_Heap_Size_of_alloc_area+0x4c> 8019d48: 29 61 00 24 lw r1,(r11+36) 8019d4c: f0 24 08 00 cmpgeu r1,r1,r4 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 8019d50: 44 20 00 13 be r1,r0,8019d9c <_Heap_Size_of_alloc_area+0x98> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 8019d54: 28 83 00 04 lw r3,(r4+4) 8019d58: 34 01 ff fe mvi r1,-2 8019d5c: a0 61 08 00 and r1,r3,r1 8019d60: b4 81 20 00 add 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 8019d64: 50 82 00 03 bgeu r4,r2,8019d70 <_Heap_Size_of_alloc_area+0x6c><== ALWAYS TAKEN 8019d68: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8019d6c: e0 00 00 03 bi 8019d78 <_Heap_Size_of_alloc_area+0x74> <== NOT EXECUTED 8019d70: 29 61 00 24 lw r1,(r11+36) 8019d74: f0 24 08 00 cmpgeu r1,r1,r4 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 8019d78: 44 20 00 09 be r1,r0,8019d9c <_Heap_Size_of_alloc_area+0x98><== NEVER TAKEN 8019d7c: 28 81 00 04 lw r1,(r4+4) 8019d80: 20 21 00 01 andi r1,r1,0x1 8019d84: 44 20 00 06 be r1,r0,8019d9c <_Heap_Size_of_alloc_area+0x98><== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 8019d88: c8 8c 20 00 sub r4,r4,r12 8019d8c: 34 84 00 04 addi r4,r4,4 8019d90: 59 a4 00 00 sw (r13+0),r4 8019d94: 34 01 00 01 mvi r1,1 return true; 8019d98: e0 00 00 02 bi 8019da0 <_Heap_Size_of_alloc_area+0x9c> 8019d9c: 34 01 00 00 mvi r1,0 } 8019da0: 2b 9d 00 04 lw ra,(sp+4) 8019da4: 2b 8b 00 10 lw r11,(sp+16) 8019da8: 2b 8c 00 0c lw r12,(sp+12) 8019dac: 2b 8d 00 08 lw r13,(sp+8) 8019db0: 37 9c 00 10 addi sp,sp,16 8019db4: c3 a0 00 00 ret =============================================================================== 08003bec <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 8003bec: 37 9c ff ac addi sp,sp,-84 8003bf0: 5b 8b 00 50 sw (sp+80),r11 8003bf4: 5b 8c 00 4c sw (sp+76),r12 8003bf8: 5b 8d 00 48 sw (sp+72),r13 8003bfc: 5b 8e 00 44 sw (sp+68),r14 8003c00: 5b 8f 00 40 sw (sp+64),r15 8003c04: 5b 90 00 3c sw (sp+60),r16 8003c08: 5b 91 00 38 sw (sp+56),r17 8003c0c: 5b 92 00 34 sw (sp+52),r18 8003c10: 5b 93 00 30 sw (sp+48),r19 8003c14: 5b 94 00 2c sw (sp+44),r20 8003c18: 5b 95 00 28 sw (sp+40),r21 8003c1c: 5b 96 00 24 sw (sp+36),r22 8003c20: 5b 97 00 20 sw (sp+32),r23 8003c24: 5b 98 00 1c sw (sp+28),r24 8003c28: 5b 99 00 18 sw (sp+24),r25 8003c2c: 5b 9b 00 14 sw (sp+20),fp 8003c30: 5b 9d 00 10 sw (sp+16),ra 8003c34: 20 63 00 ff andi r3,r3,0xff 8003c38: b8 20 68 00 mv r13,r1 8003c3c: b8 40 70 00 mv r14,r2 uintptr_t const page_size = heap->page_size; 8003c40: 28 2f 00 10 lw r15,(r1+16) uintptr_t const min_block_size = heap->min_block_size; 8003c44: 28 33 00 14 lw r19,(r1+20) Heap_Block *const last_block = heap->last_block; 8003c48: 28 32 00 24 lw r18,(r1+36) Heap_Block *block = heap->first_block; 8003c4c: 28 2b 00 20 lw r11,(r1+32) Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8003c50: 5c 60 00 04 bne r3,r0,8003c60 <_Heap_Walk+0x74> 8003c54: 78 0c 08 00 mvhi r12,0x800 8003c58: 39 8c 3b c8 ori r12,r12,0x3bc8 8003c5c: e0 00 00 03 bi 8003c68 <_Heap_Walk+0x7c> 8003c60: 78 0c 08 00 mvhi r12,0x800 8003c64: 39 8c 41 18 ori r12,r12,0x4118 if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003c68: 78 02 08 01 mvhi r2,0x801 8003c6c: 38 42 ea 10 ori r2,r2,0xea10 8003c70: 28 42 00 00 lw r2,(r2+0) 8003c74: 34 01 00 03 mvi r1,3 8003c78: 5c 41 01 0c bne r2,r1,80040a8 <_Heap_Walk+0x4bc> <== 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)( 8003c7c: 29 a1 00 08 lw r1,(r13+8) 8003c80: 29 a6 00 18 lw r6,(r13+24) 8003c84: 29 a7 00 1c lw r7,(r13+28) 8003c88: 5b 81 00 08 sw (sp+8),r1 8003c8c: 29 a1 00 0c lw r1,(r13+12) 8003c90: 78 03 08 01 mvhi r3,0x801 8003c94: 5b 92 00 04 sw (sp+4),r18 8003c98: 5b 81 00 0c sw (sp+12),r1 8003c9c: 38 63 b5 74 ori r3,r3,0xb574 8003ca0: b9 c0 08 00 mv r1,r14 8003ca4: 34 02 00 00 mvi r2,0 8003ca8: b9 e0 20 00 mv r4,r15 8003cac: ba 60 28 00 mv r5,r19 8003cb0: b9 60 40 00 mv r8,r11 8003cb4: d9 80 00 00 call r12 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 8003cb8: 5d e0 00 05 bne r15,r0,8003ccc <_Heap_Walk+0xe0> (*printer)( source, true, "page size is zero\n" ); 8003cbc: 78 03 08 01 mvhi r3,0x801 8003cc0: b9 c0 08 00 mv r1,r14 8003cc4: 38 63 b6 08 ori r3,r3,0xb608 8003cc8: e0 00 00 3b bi 8003db4 <_Heap_Walk+0x1c8> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 8003ccc: 21 f0 00 07 andi r16,r15,0x7 8003cd0: 46 00 00 06 be r16,r0,8003ce8 <_Heap_Walk+0xfc> (*printer)( 8003cd4: 78 03 08 01 mvhi r3,0x801 8003cd8: b9 c0 08 00 mv r1,r14 8003cdc: 38 63 b6 1c ori r3,r3,0xb61c 8003ce0: b9 e0 20 00 mv r4,r15 8003ce4: e0 00 01 09 bi 8004108 <_Heap_Walk+0x51c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 8003ce8: ba 60 08 00 mv r1,r19 8003cec: b9 e0 10 00 mv r2,r15 8003cf0: fb ff f3 f4 calli 8000cc0 <__umodsi3> 8003cf4: b8 20 88 00 mv r17,r1 8003cf8: 44 30 00 08 be r1,r16,8003d18 <_Heap_Walk+0x12c> (*printer)( 8003cfc: 78 03 08 01 mvhi r3,0x801 8003d00: b9 c0 08 00 mv r1,r14 8003d04: 38 63 b6 3c ori r3,r3,0xb63c 8003d08: ba 60 20 00 mv r4,r19 8003d0c: 34 02 00 01 mvi r2,1 8003d10: d9 80 00 00 call r12 8003d14: e0 00 00 5a bi 8003e7c <_Heap_Walk+0x290> ); return false; } if ( 8003d18: 35 61 00 08 addi r1,r11,8 8003d1c: b9 e0 10 00 mv r2,r15 8003d20: fb ff f3 e8 calli 8000cc0 <__umodsi3> 8003d24: b8 20 80 00 mv r16,r1 8003d28: 44 31 00 08 be r1,r17,8003d48 <_Heap_Walk+0x15c> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 8003d2c: 78 03 08 01 mvhi r3,0x801 8003d30: b9 c0 08 00 mv r1,r14 8003d34: 38 63 b6 60 ori r3,r3,0xb660 8003d38: b9 60 20 00 mv r4,r11 8003d3c: 34 02 00 01 mvi r2,1 8003d40: d9 80 00 00 call r12 8003d44: e0 00 00 92 bi 8003f8c <_Heap_Walk+0x3a0> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 8003d48: 29 71 00 04 lw r17,(r11+4) 8003d4c: 22 31 00 01 andi r17,r17,0x1 8003d50: 5e 21 00 07 bne r17,r1,8003d6c <_Heap_Walk+0x180> (*printer)( 8003d54: 78 03 08 01 mvhi r3,0x801 8003d58: b9 c0 08 00 mv r1,r14 8003d5c: 38 63 b6 94 ori r3,r3,0xb694 8003d60: 34 02 00 01 mvi r2,1 8003d64: d9 80 00 00 call r12 8003d68: e0 00 00 89 bi 8003f8c <_Heap_Walk+0x3a0> ); return false; } if ( first_block->prev_size != page_size ) { 8003d6c: 29 79 00 00 lw r25,(r11+0) 8003d70: 47 2f 00 07 be r25,r15,8003d8c <_Heap_Walk+0x1a0> (*printer)( 8003d74: 78 03 08 01 mvhi r3,0x801 8003d78: b9 c0 08 00 mv r1,r14 8003d7c: 38 63 b6 c4 ori r3,r3,0xb6c4 8003d80: bb 20 20 00 mv r4,r25 8003d84: b9 e0 28 00 mv r5,r15 8003d88: e0 00 00 3b bi 8003e74 <_Heap_Walk+0x288> ); return false; } if ( _Heap_Is_free( last_block ) ) { 8003d8c: 2a 41 00 04 lw r1,(r18+4) 8003d90: 34 02 ff fe mvi r2,-2 8003d94: a0 22 08 00 and r1,r1,r2 8003d98: b6 41 08 00 add r1,r18,r1 8003d9c: 28 2f 00 04 lw r15,(r1+4) 8003da0: 21 ef 00 01 andi r15,r15,0x1 8003da4: 5d f0 00 07 bne r15,r16,8003dc0 <_Heap_Walk+0x1d4> (*printer)( 8003da8: 78 03 08 01 mvhi r3,0x801 8003dac: b9 c0 08 00 mv r1,r14 8003db0: 38 63 b6 f0 ori r3,r3,0xb6f0 8003db4: 34 02 00 01 mvi r2,1 8003db8: d9 80 00 00 call r12 8003dbc: e0 00 00 a5 bi 8004050 <_Heap_Walk+0x464> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 8003dc0: 29 a4 00 08 lw r4,(r13+8) ); return false; } if ( _Heap_Is_used( free_block ) ) { 8003dc4: b8 40 a8 00 mv r21,r2 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 8003dc8: 29 b4 00 10 lw r20,(r13+16) 8003dcc: b9 a0 88 00 mv r17,r13 8003dd0: b8 80 b0 00 mv r22,r4 8003dd4: e0 00 00 2e bi 8003e8c <_Heap_Walk+0x2a0> 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 8003dd8: 29 a1 00 20 lw r1,(r13+32) 8003ddc: 34 0f 00 00 mvi r15,0 8003de0: 52 c1 00 02 bgeu r22,r1,8003de8 <_Heap_Walk+0x1fc> 8003de4: e0 00 00 03 bi 8003df0 <_Heap_Walk+0x204> 8003de8: 29 af 00 24 lw r15,(r13+36) 8003dec: f1 f6 78 00 cmpgeu r15,r15,r22 ); return false; } if ( 8003df0: 36 c1 00 08 addi r1,r22,8 8003df4: ba 80 10 00 mv r2,r20 const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 8003df8: 5d e0 00 06 bne r15,r0,8003e10 <_Heap_Walk+0x224> (*printer)( 8003dfc: 78 03 08 01 mvhi r3,0x801 8003e00: ba c0 20 00 mv r4,r22 8003e04: b9 c0 08 00 mv r1,r14 8003e08: 38 63 b7 08 ori r3,r3,0xb708 8003e0c: e0 00 00 8f bi 8004048 <_Heap_Walk+0x45c> ); return false; } if ( 8003e10: fb ff f3 ac calli 8000cc0 <__umodsi3> 8003e14: 44 20 00 06 be r1,r0,8003e2c <_Heap_Walk+0x240> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 8003e18: 78 03 08 01 mvhi r3,0x801 8003e1c: ba c0 20 00 mv r4,r22 8003e20: b9 c0 08 00 mv r1,r14 8003e24: 38 63 b7 28 ori r3,r3,0xb728 8003e28: e0 00 00 b8 bi 8004108 <_Heap_Walk+0x51c> ); return false; } if ( _Heap_Is_used( free_block ) ) { 8003e2c: 2a c3 00 04 lw r3,(r22+4) 8003e30: a0 75 18 00 and r3,r3,r21 8003e34: b6 c3 18 00 add r3,r22,r3 8003e38: 28 70 00 04 lw r16,(r3+4) 8003e3c: 22 10 00 01 andi r16,r16,0x1 8003e40: 46 01 00 07 be r16,r1,8003e5c <_Heap_Walk+0x270> (*printer)( 8003e44: 78 03 08 01 mvhi r3,0x801 8003e48: b8 20 78 00 mv r15,r1 8003e4c: ba c0 20 00 mv r4,r22 8003e50: b9 c0 08 00 mv r1,r14 8003e54: 38 63 b7 58 ori r3,r3,0xb758 8003e58: e0 00 00 7c bi 8004048 <_Heap_Walk+0x45c> ); return false; } if ( free_block->prev != prev_block ) { 8003e5c: 2a c5 00 0c lw r5,(r22+12) 8003e60: 44 b1 00 09 be r5,r17,8003e84 <_Heap_Walk+0x298> (*printer)( 8003e64: 78 03 08 01 mvhi r3,0x801 8003e68: ba c0 20 00 mv r4,r22 8003e6c: b9 c0 08 00 mv r1,r14 8003e70: 38 63 b7 74 ori r3,r3,0xb774 8003e74: 34 02 00 01 mvi r2,1 8003e78: d9 80 00 00 call r12 8003e7c: ba 00 08 00 mv r1,r16 8003e80: e0 00 00 8b bi 80040ac <_Heap_Walk+0x4c0> return false; } prev_block = free_block; free_block = free_block->next; 8003e84: ba c0 88 00 mv r17,r22 8003e88: 2a d6 00 08 lw r22,(r22+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 ) { 8003e8c: 5e cd ff d3 bne r22,r13,8003dd8 <_Heap_Walk+0x1ec> 8003e90: e0 00 00 7a bi 8004078 <_Heap_Walk+0x48c> - 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; 8003e94: 29 6f 00 04 lw r15,(r11+4) 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 ) { 8003e98: 21 e2 00 01 andi r2,r15,0x1 8003e9c: a1 fb 78 00 and r15,r15,fp RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 8003ea0: b5 6f 80 00 add r16,r11,r15 8003ea4: 44 40 00 09 be r2,r0,8003ec8 <_Heap_Walk+0x2dc> (*printer)( 8003ea8: 78 03 08 01 mvhi r3,0x801 8003eac: b9 c0 08 00 mv r1,r14 8003eb0: 34 02 00 00 mvi r2,0 8003eb4: 38 63 b7 a8 ori r3,r3,0xb7a8 8003eb8: b9 60 20 00 mv r4,r11 8003ebc: b9 e0 28 00 mv r5,r15 8003ec0: d9 80 00 00 call r12 8003ec4: e0 00 00 08 bi 8003ee4 <_Heap_Walk+0x2f8> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 8003ec8: 29 66 00 00 lw r6,(r11+0) 8003ecc: 78 03 08 01 mvhi r3,0x801 8003ed0: b9 c0 08 00 mv r1,r14 8003ed4: 38 63 b7 c0 ori r3,r3,0xb7c0 8003ed8: b9 60 20 00 mv r4,r11 8003edc: b9 e0 28 00 mv r5,r15 8003ee0: d9 80 00 00 call r12 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 8003ee4: 29 a1 00 20 lw r1,(r13+32) 8003ee8: 52 01 00 03 bgeu r16,r1,8003ef4 <_Heap_Walk+0x308> <== ALWAYS TAKEN 8003eec: 34 11 00 00 mvi r17,0 <== NOT EXECUTED 8003ef0: e0 00 00 03 bi 8003efc <_Heap_Walk+0x310> <== NOT EXECUTED 8003ef4: 29 b1 00 24 lw r17,(r13+36) 8003ef8: f2 30 88 00 cmpgeu r17,r17,r16 block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 8003efc: 5e 20 00 05 bne r17,r0,8003f10 <_Heap_Walk+0x324> (*printer)( 8003f00: 78 03 08 01 mvhi r3,0x801 8003f04: b9 c0 08 00 mv r1,r14 8003f08: 38 63 b7 e8 ori r3,r3,0xb7e8 8003f0c: e0 00 00 1c bi 8003f7c <_Heap_Walk+0x390> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 8003f10: b9 e0 08 00 mv r1,r15 8003f14: bb 20 10 00 mv r2,r25 8003f18: fb ff f3 6a calli 8000cc0 <__umodsi3> 8003f1c: b8 20 88 00 mv r17,r1 8003f20: 44 20 00 09 be r1,r0,8003f44 <_Heap_Walk+0x358> (*printer)( 8003f24: 78 03 08 01 mvhi r3,0x801 8003f28: b9 c0 08 00 mv r1,r14 8003f2c: 38 63 b8 18 ori r3,r3,0xb818 8003f30: b9 60 20 00 mv r4,r11 8003f34: b9 e0 28 00 mv r5,r15 8003f38: 34 02 00 01 mvi r2,1 8003f3c: d9 80 00 00 call r12 8003f40: e0 00 00 74 bi 8004110 <_Heap_Walk+0x524> ); return false; } if ( block_size < min_block_size ) { 8003f44: 51 f3 00 0a bgeu r15,r19,8003f6c <_Heap_Walk+0x380> (*printer)( 8003f48: 78 03 08 01 mvhi r3,0x801 8003f4c: b9 c0 08 00 mv r1,r14 8003f50: 38 63 b8 48 ori r3,r3,0xb848 8003f54: b9 60 20 00 mv r4,r11 8003f58: b9 e0 28 00 mv r5,r15 8003f5c: ba 60 30 00 mv r6,r19 8003f60: 34 02 00 01 mvi r2,1 8003f64: d9 80 00 00 call r12 8003f68: e0 00 00 09 bi 8003f8c <_Heap_Walk+0x3a0> ); return false; } if ( next_block_begin <= block_begin ) { 8003f6c: 56 0b 00 0a bgu r16,r11,8003f94 <_Heap_Walk+0x3a8> (*printer)( 8003f70: 78 03 08 01 mvhi r3,0x801 8003f74: b9 c0 08 00 mv r1,r14 8003f78: 38 63 b8 74 ori r3,r3,0xb874 8003f7c: b9 60 20 00 mv r4,r11 8003f80: ba 00 28 00 mv r5,r16 8003f84: 34 02 00 01 mvi r2,1 8003f88: d9 80 00 00 call r12 8003f8c: ba 20 08 00 mv r1,r17 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 8003f90: e0 00 00 47 bi 80040ac <_Heap_Walk+0x4c0> } if ( !_Heap_Is_prev_used( next_block ) ) { 8003f94: 2a 03 00 04 lw r3,(r16+4) 8003f98: 20 63 00 01 andi r3,r3,0x1 8003f9c: 5c 60 00 35 bne r3,r0,8004070 <_Heap_Walk+0x484> 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; 8003fa0: 29 6f 00 04 lw r15,(r11+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)( 8003fa4: 29 65 00 0c lw r5,(r11+12) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 8003fa8: 29 a1 00 08 lw r1,(r13+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; 8003fac: a1 fb 88 00 and r17,r15,fp 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; 8003fb0: 29 a3 00 0c lw r3,(r13+12) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 8003fb4: b5 71 50 00 add r10,r11,r17 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 8003fb8: ba a0 30 00 mv r6,r21 8003fbc: 44 a1 00 04 be r5,r1,8003fcc <_Heap_Walk+0x3e0> "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)" : ""), 8003fc0: ba 80 30 00 mv r6,r20 8003fc4: 5c ad 00 02 bne r5,r13,8003fcc <_Heap_Walk+0x3e0> 8003fc8: ba c0 30 00 mv r6,r22 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)( 8003fcc: 29 67 00 08 lw r7,(r11+8) 8003fd0: ba e0 40 00 mv r8,r23 8003fd4: 44 e3 00 04 be r7,r3,8003fe4 <_Heap_Walk+0x3f8> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 8003fd8: ba 80 40 00 mv r8,r20 8003fdc: 5c ed 00 02 bne r7,r13,8003fe4 <_Heap_Walk+0x3f8> 8003fe0: bb 00 40 00 mv r8,r24 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)( 8003fe4: 78 03 08 01 mvhi r3,0x801 8003fe8: 5b 8a 00 54 sw (sp+84),r10 8003fec: b9 c0 08 00 mv r1,r14 8003ff0: 34 02 00 00 mvi r2,0 8003ff4: 38 63 b8 d8 ori r3,r3,0xb8d8 8003ff8: b9 60 20 00 mv r4,r11 8003ffc: d9 80 00 00 call r12 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 8004000: 2b 8a 00 54 lw r10,(sp+84) 8004004: 29 46 00 00 lw r6,(r10+0) 8004008: 46 26 00 0a be r17,r6,8004030 <_Heap_Walk+0x444> (*printer)( 800400c: 78 03 08 01 mvhi r3,0x801 8004010: b9 c0 08 00 mv r1,r14 8004014: 38 63 b9 04 ori r3,r3,0xb904 8004018: b9 60 20 00 mv r4,r11 800401c: ba 20 28 00 mv r5,r17 8004020: b9 40 38 00 mv r7,r10 8004024: 34 02 00 01 mvi r2,1 8004028: d9 80 00 00 call r12 800402c: e0 00 00 39 bi 8004110 <_Heap_Walk+0x524> ); return false; } if ( !prev_used ) { 8004030: 21 ef 00 01 andi r15,r15,0x1 8004034: 5d e0 00 09 bne r15,r0,8004058 <_Heap_Walk+0x46c> (*printer)( 8004038: 78 03 08 01 mvhi r3,0x801 800403c: b9 c0 08 00 mv r1,r14 8004040: 38 63 b9 40 ori r3,r3,0xb940 8004044: b9 60 20 00 mv r4,r11 8004048: 34 02 00 01 mvi r2,1 800404c: d9 80 00 00 call r12 8004050: b9 e0 08 00 mv r1,r15 8004054: e0 00 00 16 bi 80040ac <_Heap_Walk+0x4c0> 8004058: 29 a3 00 08 lw r3,(r13+8) 800405c: e0 00 00 03 bi 8004068 <_Heap_Walk+0x47c> { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 8004060: 44 6b 00 04 be r3,r11,8004070 <_Heap_Walk+0x484> return true; } free_block = free_block->next; 8004064: 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 ) { 8004068: 5c 6d ff fe bne r3,r13,8004060 <_Heap_Walk+0x474> 800406c: e0 00 00 23 bi 80040f8 <_Heap_Walk+0x50c> 8004070: ba 00 58 00 mv r11,r16 8004074: e0 00 00 0c bi 80040a4 <_Heap_Walk+0x4b8> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 8004078: 78 18 08 01 mvhi r24,0x801 800407c: 78 14 08 01 mvhi r20,0x801 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)( 8004080: 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)" : ""), 8004084: 78 16 08 01 mvhi r22,0x801 8004088: 78 15 08 01 mvhi r21,0x801 block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 800408c: 3b 18 b8 cc ori r24,r24,0xb8cc 8004090: 3a 94 b9 3c ori r20,r20,0xb93c 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)( 8004094: 3a f7 b8 c0 ori r23,r23,0xb8c0 "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)" : ""), 8004098: 3a d6 b8 b4 ori r22,r22,0xb8b4 800409c: 3a b5 b8 a8 ori r21,r21,0xb8a8 - 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; 80040a0: 34 1b ff fe mvi fp,-2 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 80040a4: 5d 72 ff 7c bne r11,r18,8003e94 <_Heap_Walk+0x2a8> 80040a8: 34 01 00 01 mvi r1,1 block = next_block; } return true; } 80040ac: 2b 9d 00 10 lw ra,(sp+16) 80040b0: 2b 8b 00 50 lw r11,(sp+80) 80040b4: 2b 8c 00 4c lw r12,(sp+76) 80040b8: 2b 8d 00 48 lw r13,(sp+72) 80040bc: 2b 8e 00 44 lw r14,(sp+68) 80040c0: 2b 8f 00 40 lw r15,(sp+64) 80040c4: 2b 90 00 3c lw r16,(sp+60) 80040c8: 2b 91 00 38 lw r17,(sp+56) 80040cc: 2b 92 00 34 lw r18,(sp+52) 80040d0: 2b 93 00 30 lw r19,(sp+48) 80040d4: 2b 94 00 2c lw r20,(sp+44) 80040d8: 2b 95 00 28 lw r21,(sp+40) 80040dc: 2b 96 00 24 lw r22,(sp+36) 80040e0: 2b 97 00 20 lw r23,(sp+32) 80040e4: 2b 98 00 1c lw r24,(sp+28) 80040e8: 2b 99 00 18 lw r25,(sp+24) 80040ec: 2b 9b 00 14 lw fp,(sp+20) 80040f0: 37 9c 00 54 addi sp,sp,84 80040f4: c3 a0 00 00 ret return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 80040f8: 78 03 08 01 mvhi r3,0x801 80040fc: b9 c0 08 00 mv r1,r14 8004100: 38 63 b9 70 ori r3,r3,0xb970 8004104: b9 60 20 00 mv r4,r11 8004108: 34 02 00 01 mvi r2,1 800410c: d9 80 00 00 call r12 8004110: 34 01 00 00 mvi r1,0 8004114: e3 ff ff e6 bi 80040ac <_Heap_Walk+0x4c0> =============================================================================== 08002708 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 8002708: 37 9c ff e8 addi sp,sp,-24 800270c: 5b 8b 00 18 sw (sp+24),r11 8002710: 5b 8c 00 14 sw (sp+20),r12 8002714: 5b 8d 00 10 sw (sp+16),r13 8002718: 5b 8e 00 0c sw (sp+12),r14 800271c: 5b 8f 00 08 sw (sp+8),r15 8002720: 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; 8002724: 78 01 08 01 mvhi r1,0x801 8002728: 38 21 c0 c4 ori r1,r1,0xc0c4 drivers_in_table = Configuration.number_of_device_drivers; number_of_drivers = Configuration.maximum_drivers; 800272c: 28 2b 00 2c lw r11,(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; 8002730: 28 2d 00 30 lw r13,(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; 8002734: 28 2f 00 34 lw r15,(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 ) 8002738: 51 ab 00 02 bgeu r13,r11,8002740 <_IO_Manager_initialization+0x38> /* * 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 ) { 800273c: 5d 6d 00 08 bne r11,r13,800275c <_IO_Manager_initialization+0x54><== ALWAYS TAKEN _IO_Driver_address_table = driver_table; 8002740: 78 02 08 01 mvhi r2,0x801 _IO_Number_of_drivers = number_of_drivers; 8002744: 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; 8002748: 38 42 ca 70 ori r2,r2,0xca70 _IO_Number_of_drivers = number_of_drivers; 800274c: 38 21 ca 6c ori r1,r1,0xca6c * 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; 8002750: 58 4f 00 00 sw (r2+0),r15 _IO_Number_of_drivers = number_of_drivers; 8002754: 58 2d 00 00 sw (r1+0),r13 return; 8002758: e0 00 00 1b bi 80027c4 <_IO_Manager_initialization+0xbc> * 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 ) 800275c: b5 6b 08 00 add r1,r11,r11 8002760: 34 02 00 03 mvi r2,3 8002764: b4 2b 08 00 add r1,r1,r11 8002768: fb ff f6 a2 calli 80001f0 <__ashlsi3> 800276c: b8 20 60 00 mv r12,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 *) 8002770: f8 00 0c 56 calli 80058c8 <_Workspace_Allocate_or_fatal_error> 8002774: 78 04 08 01 mvhi r4,0x801 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 8002778: 78 05 08 01 mvhi r5,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 *) 800277c: 38 84 ca 70 ori r4,r4,0xca70 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 8002780: 38 a5 ca 6c ori r5,r5,0xca6c memset( 8002784: 34 02 00 00 mvi r2,0 8002788: b9 80 18 00 mv r3,r12 _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; 800278c: 58 ab 00 00 sw (r5+0),r11 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; 8002790: b8 40 60 00 mv r12,r2 /* * 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 *) 8002794: 58 81 00 00 sw (r4+0),r1 8002798: b8 20 70 00 mv r14,r1 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; 800279c: b9 80 58 00 mv r11,r12 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 80027a0: f8 00 24 fb calli 800bb8c _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 80027a4: e0 00 00 04 bi 80027b4 <_IO_Manager_initialization+0xac> _IO_Driver_address_table[index] = driver_table[index]; 80027a8: f8 00 24 9b calli 800ba14 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 80027ac: 35 6b 00 01 addi r11,r11,1 80027b0: 35 8c 00 18 addi r12,r12,24 _IO_Driver_address_table[index] = driver_table[index]; 80027b4: b5 cc 08 00 add r1,r14,r12 80027b8: b5 ec 10 00 add r2,r15,r12 80027bc: 34 03 00 18 mvi r3,24 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 80027c0: 55 ab ff fa bgu r13,r11,80027a8 <_IO_Manager_initialization+0xa0> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 80027c4: 2b 9d 00 04 lw ra,(sp+4) 80027c8: 2b 8b 00 18 lw r11,(sp+24) 80027cc: 2b 8c 00 14 lw r12,(sp+20) 80027d0: 2b 8d 00 10 lw r13,(sp+16) 80027d4: 2b 8e 00 0c lw r14,(sp+12) 80027d8: 2b 8f 00 08 lw r15,(sp+8) 80027dc: 37 9c 00 18 addi sp,sp,24 80027e0: c3 a0 00 00 ret =============================================================================== 080033d8 <_ISR_Handler_initialization>: * * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { 80033d8: 37 9c ff f4 addi sp,sp,-12 80033dc: 5b 8b 00 0c sw (sp+12),r11 80033e0: 5b 8c 00 08 sw (sp+8),r12 80033e4: 5b 9d 00 04 sw (sp+4),ra _ISR_Signals_to_thread_executing = false; 80033e8: 78 03 08 01 mvhi r3,0x801 _ISR_Nest_level = 0; 80033ec: 78 02 08 01 mvhi r2,0x801 * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; 80033f0: 34 04 00 00 mvi r4,0 80033f4: 38 63 c9 80 ori r3,r3,0xc980 _ISR_Nest_level = 0; 80033f8: 38 42 c8 c4 ori r2,r2,0xc8c4 * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; 80033fc: 30 64 00 00 sb (r3+0),r4 _ISR_Nest_level = 0; 8003400: 58 44 00 00 sw (r2+0),r4 #if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE) _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 8003404: 34 01 00 80 mvi r1,128 void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; _ISR_Nest_level = 0; 8003408: b8 80 60 00 mv r12,r4 #if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE) _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 800340c: f8 00 09 2f calli 80058c8 <_Workspace_Allocate_or_fatal_error> _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) 8003410: 78 0b 08 01 mvhi r11,0x801 8003414: 78 02 08 01 mvhi r2,0x801 8003418: 38 42 c0 bc ori r2,r2,0xc0bc 800341c: 39 6b c0 c4 ori r11,r11,0xc0c4 8003420: 28 44 00 00 lw r4,(r2+0) 8003424: 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( 8003428: 78 02 08 01 mvhi r2,0x801 800342c: 38 42 c8 a8 ori r2,r2,0xc8a8 8003430: 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) ) 8003434: 50 64 00 05 bgeu r3,r4,8003448 <_ISR_Handler_initialization+0x70><== ALWAYS TAKEN _Internal_error_Occurred( 8003438: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 800343c: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8003440: 34 03 00 05 mvi r3,5 <== NOT EXECUTED 8003444: fb ff ff d6 calli 800339c <_Internal_error_Occurred> <== NOT EXECUTED INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 8003448: b8 60 08 00 mv r1,r3 800344c: f8 00 09 1f calli 80058c8 <_Workspace_Allocate_or_fatal_error> Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 8003450: 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( 8003454: 78 02 08 01 mvhi r2,0x801 Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 8003458: 78 03 08 01 mvhi r3,0x801 800345c: 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( 8003460: 38 42 c8 3c ori r2,r2,0xc83c Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 8003464: 38 63 c7 c0 ori r3,r3,0xc7c0 8003468: 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( 800346c: 58 41 00 00 sw (r2+0),r1 #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } 8003470: 2b 9d 00 04 lw ra,(sp+4) 8003474: 2b 8b 00 0c lw r11,(sp+12) 8003478: 2b 8c 00 08 lw r12,(sp+8) 800347c: 37 9c 00 0c addi sp,sp,12 8003480: c3 a0 00 00 ret =============================================================================== 08003484 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 8003484: 37 9c ff ec addi sp,sp,-20 8003488: 5b 8b 00 14 sw (sp+20),r11 800348c: 5b 8c 00 10 sw (sp+16),r12 8003490: 5b 8d 00 0c sw (sp+12),r13 8003494: 5b 8e 00 08 sw (sp+8),r14 8003498: 5b 9d 00 04 sw (sp+4),ra 800349c: 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 ) 80034a0: 28 21 00 18 lw r1,(r1+24) 80034a4: b8 20 60 00 mv r12,r1 80034a8: 44 20 00 20 be r1,r0,8003528 <_Objects_Allocate+0xa4> <== NEVER TAKEN /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 80034ac: 35 6d 00 20 addi r13,r11,32 80034b0: b9 a0 08 00 mv r1,r13 80034b4: f8 00 13 11 calli 80080f8 <_Chain_Get> 80034b8: b8 20 60 00 mv r12,r1 if ( information->auto_extend ) { 80034bc: 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 ); 80034c0: b9 80 70 00 mv r14,r12 if ( information->auto_extend ) { 80034c4: 44 20 00 19 be r1,r0,8003528 <_Objects_Allocate+0xa4> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 80034c8: 5d 80 00 07 bne r12,r0,80034e4 <_Objects_Allocate+0x60> _Objects_Extend_information( information ); 80034cc: b9 60 08 00 mv r1,r11 80034d0: f8 00 00 1e calli 8003548 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 80034d4: b9 a0 08 00 mv r1,r13 80034d8: f8 00 13 08 calli 80080f8 <_Chain_Get> 80034dc: b8 20 60 00 mv r12,r1 } if ( the_object ) { 80034e0: 44 2e 00 12 be r1,r14,8003528 <_Objects_Allocate+0xa4> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 80034e4: 29 83 00 08 lw r3,(r12+8) 80034e8: 29 61 00 08 lw r1,(r11+8) _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 80034ec: 2d 62 00 14 lhu r2,(r11+20) } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 80034f0: 20 63 ff ff andi r3,r3,0xffff 80034f4: 20 21 ff ff andi r1,r1,0xffff _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 80034f8: c8 61 08 00 sub r1,r3,r1 80034fc: f8 00 57 0b calli 8019128 <__udivsi3> 8003500: 34 02 00 02 mvi r2,2 8003504: fb ff f3 3b calli 80001f0 <__ashlsi3> 8003508: 29 62 00 30 lw r2,(r11+48) information->inactive--; 800350c: 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 ]--; 8003510: b4 41 08 00 add r1,r2,r1 8003514: 28 22 00 00 lw r2,(r1+0) information->inactive--; 8003518: 34 63 ff ff addi r3,r3,-1 800351c: 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 ]--; 8003520: 34 42 ff ff addi r2,r2,-1 8003524: 58 22 00 00 sw (r1+0),r2 information->inactive--; } } return the_object; } 8003528: b9 80 08 00 mv r1,r12 800352c: 2b 9d 00 04 lw ra,(sp+4) 8003530: 2b 8b 00 14 lw r11,(sp+20) 8003534: 2b 8c 00 10 lw r12,(sp+16) 8003538: 2b 8d 00 0c lw r13,(sp+12) 800353c: 2b 8e 00 08 lw r14,(sp+8) 8003540: 37 9c 00 14 addi sp,sp,20 8003544: c3 a0 00 00 ret =============================================================================== 08003548 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 8003548: 37 9c ff c4 addi sp,sp,-60 800354c: 5b 8b 00 30 sw (sp+48),r11 8003550: 5b 8c 00 2c sw (sp+44),r12 8003554: 5b 8d 00 28 sw (sp+40),r13 8003558: 5b 8e 00 24 sw (sp+36),r14 800355c: 5b 8f 00 20 sw (sp+32),r15 8003560: 5b 90 00 1c sw (sp+28),r16 8003564: 5b 91 00 18 sw (sp+24),r17 8003568: 5b 92 00 14 sw (sp+20),r18 800356c: 5b 93 00 10 sw (sp+16),r19 8003570: 5b 94 00 0c sw (sp+12),r20 8003574: 5b 95 00 08 sw (sp+8),r21 8003578: 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 ); 800357c: 28 2e 00 08 lw r14,(r1+8) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 8003580: 28 2f 00 34 lw r15,(r1+52) */ void _Objects_Extend_information( Objects_Information *information ) { 8003584: 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 ); 8003588: 21 ce ff ff andi r14,r14,0xffff index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 800358c: b9 e0 68 00 mv r13,r15 8003590: b9 c0 60 00 mv r12,r14 8003594: b9 e0 88 00 mv r17,r15 8003598: 45 e0 00 0f be r15,r0,80035d4 <_Objects_Extend_information+0x8c> block_count = 0; else { block_count = information->maximum / information->allocation_size; 800359c: 2c 30 00 14 lhu r16,(r1+20) 80035a0: 2c 21 00 10 lhu r1,(r1+16) 80035a4: 34 0d 00 00 mvi r13,0 80035a8: ba 00 10 00 mv r2,r16 80035ac: f8 00 56 df calli 8019128 <__udivsi3> 80035b0: 20 31 ff ff andi r17,r1,0xffff 80035b4: b9 e0 08 00 mv r1,r15 for ( ; block < block_count; block++ ) { 80035b8: e0 00 00 06 bi 80035d0 <_Objects_Extend_information+0x88> if ( information->object_blocks[ block ] == NULL ) 80035bc: 28 22 00 00 lw r2,(r1+0) 80035c0: 34 21 00 04 addi r1,r1,4 80035c4: 44 40 00 04 be r2,r0,80035d4 <_Objects_Extend_information+0x8c> 80035c8: b5 90 60 00 add r12,r12,r16 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 80035cc: 35 ad 00 01 addi r13,r13,1 80035d0: 56 2d ff fb bgu r17,r13,80035bc <_Objects_Extend_information+0x74> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 80035d4: 2d 61 00 14 lhu r1,(r11+20) 80035d8: 2d 74 00 10 lhu r20,(r11+16) /* * 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 ) { 80035dc: 38 02 ff ff mvu r2,0xffff else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 80035e0: b4 34 a0 00 add r20,r1,r20 /* * 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 ) { 80035e4: 56 82 00 97 bgu r20,r2,8003840 <_Objects_Extend_information+0x2f8><== 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; 80035e8: 29 62 00 18 lw r2,(r11+24) 80035ec: f8 00 56 50 calli 8018f2c <__mulsi3> if ( information->auto_extend ) { 80035f0: 41 62 00 12 lbu r2,(r11+18) 80035f4: 44 40 00 05 be r2,r0,8003608 <_Objects_Extend_information+0xc0> new_object_block = _Workspace_Allocate( block_size ); 80035f8: f8 00 08 c3 calli 8005904 <_Workspace_Allocate> 80035fc: b8 20 78 00 mv r15,r1 if ( !new_object_block ) 8003600: 5c 20 00 04 bne r1,r0,8003610 <_Objects_Extend_information+0xc8> 8003604: e0 00 00 8f bi 8003840 <_Objects_Extend_information+0x2f8> return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 8003608: f8 00 08 b0 calli 80058c8 <_Workspace_Allocate_or_fatal_error> 800360c: 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 ) { 8003610: 2d 61 00 10 lhu r1,(r11+16) 8003614: 54 2c 00 60 bgu r1,r12,8003794 <_Objects_Extend_information+0x24c> */ /* * Up the block count and maximum */ block_count++; 8003618: 36 32 00 01 addi r18,r17,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 ); 800361c: b6 52 08 00 add r1,r18,r18 8003620: b6 8e 10 00 add r2,r20,r14 8003624: b4 32 08 00 add r1,r1,r18 8003628: b4 41 08 00 add r1,r2,r1 800362c: 34 02 00 02 mvi r2,2 8003630: fb ff f2 f0 calli 80001f0 <__ashlsi3> 8003634: f8 00 08 b4 calli 8005904 <_Workspace_Allocate> 8003638: b8 20 80 00 mv r16,r1 if ( !object_blocks ) { 800363c: 5c 20 00 04 bne r1,r0,800364c <_Objects_Extend_information+0x104> _Workspace_Free( new_object_block ); 8003640: b9 e0 08 00 mv r1,r15 8003644: f8 00 08 bb calli 8005930 <_Workspace_Free> return; 8003648: e0 00 00 7e bi 8003840 <_Objects_Extend_information+0x2f8> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 800364c: ba 40 08 00 mv r1,r18 8003650: 34 02 00 02 mvi r2,2 8003654: fb ff f2 e7 calli 80001f0 <__ashlsi3> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 8003658: 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); 800365c: b6 01 98 00 add r19,r16,r1 8003660: b6 61 90 00 add r18,r19,r1 8003664: 54 4e 00 05 bgu r2,r14,8003678 <_Objects_Extend_information+0x130> 8003668: 34 01 00 00 mvi r1,0 800366c: ba 40 10 00 mv r2,r18 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 8003670: b8 20 18 00 mv r3,r1 8003674: e0 00 00 19 bi 80036d8 <_Objects_Extend_information+0x190> * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); 8003678: ba 20 08 00 mv r1,r17 800367c: 34 02 00 02 mvi r2,2 8003680: fb ff f2 dc 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, 8003684: 29 62 00 34 lw r2,(r11+52) information->object_blocks, block_count * sizeof(void*) ); 8003688: b8 20 a8 00 mv r21,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, 800368c: ba a0 18 00 mv r3,r21 8003690: ba 00 08 00 mv r1,r16 8003694: f8 00 20 e0 calli 800ba14 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 8003698: 29 62 00 30 lw r2,(r11+48) 800369c: ba a0 18 00 mv r3,r21 80036a0: ba 60 08 00 mv r1,r19 80036a4: f8 00 20 dc calli 800ba14 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 80036a8: 2d 61 00 10 lhu r1,(r11+16) 80036ac: 34 02 00 02 mvi r2,2 80036b0: b5 c1 08 00 add r1,r14,r1 80036b4: fb ff f2 cf calli 80001f0 <__ashlsi3> 80036b8: 29 62 00 1c lw r2,(r11+28) 80036bc: b8 20 18 00 mv r3,r1 80036c0: ba 40 08 00 mv r1,r18 80036c4: f8 00 20 d4 calli 800ba14 80036c8: e0 00 00 05 bi 80036dc <_Objects_Extend_information+0x194> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 80036cc: 58 43 00 00 sw (r2+0),r3 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 80036d0: 34 21 00 01 addi r1,r1,1 80036d4: 34 42 00 04 addi r2,r2,4 80036d8: 55 c1 ff fd bgu r14,r1,80036cc <_Objects_Extend_information+0x184> } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 80036dc: ba 20 08 00 mv r1,r17 80036e0: 34 02 00 02 mvi r2,2 80036e4: fb ff f2 c3 calli 80001f0 <__ashlsi3> inactive_per_block[block_count] = 0; 80036e8: b6 61 10 00 add r2,r19,r1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 80036ec: 34 0e 00 00 mvi r14,0 80036f0: b6 01 08 00 add r1,r16,r1 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 80036f4: 2d 71 00 14 lhu r17,(r11+20) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 80036f8: 58 2e 00 00 sw (r1+0),r14 inactive_per_block[block_count] = 0; 80036fc: 58 4e 00 00 sw (r2+0),r14 for ( index=index_base ; index < ( information->allocation_size + index_base ); 8003700: b9 80 08 00 mv r1,r12 8003704: 34 02 00 02 mvi r2,2 8003708: fb ff f2 ba calli 80001f0 <__ashlsi3> 800370c: b5 91 88 00 add r17,r12,r17 8003710: b6 41 08 00 add r1,r18,r1 8003714: b9 80 10 00 mv r2,r12 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 8003718: e0 00 00 04 bi 8003728 <_Objects_Extend_information+0x1e0> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 800371c: 58 2e 00 00 sw (r1+0),r14 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 8003720: 34 42 00 01 addi r2,r2,1 8003724: 34 21 00 04 addi r1,r1,4 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 8003728: 56 22 ff fd bgu r17,r2,800371c <_Objects_Extend_information+0x1d4> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 800372c: 90 00 88 00 rcsr r17,IE 8003730: 34 01 ff fe mvi r1,-2 8003734: a2 21 08 00 and r1,r17,r1 8003738: 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( 800373c: 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; 8003740: 22 94 ff ff andi r20,r20,0xffff 8003744: 0d 74 00 10 sh (r11+16),r20 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 8003748: 59 73 00 30 sw (r11+48),r19 information->local_table = local_table; 800374c: 59 72 00 1c sw (r11+28),r18 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 8003750: 29 6e 00 34 lw r14,(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( 8003754: 34 02 00 18 mvi r2,24 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 8003758: 59 70 00 34 sw (r11+52),r16 information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 800375c: fb ff f2 a5 calli 80001f0 <__ashlsi3> 8003760: 78 02 00 01 mvhi r2,0x1 8003764: 38 42 00 00 ori r2,r2,0x0 8003768: b8 22 80 00 or r16,r1,r2 800376c: 2d 61 00 04 lhu r1,(r11+4) 8003770: 34 02 00 1b mvi r2,27 8003774: fb ff f2 9f calli 80001f0 <__ashlsi3> 8003778: ba 01 08 00 or r1,r16,r1 800377c: b8 34 a0 00 or r20,r1,r20 8003780: 59 74 00 0c sw (r11+12),r20 information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 8003784: d0 11 00 00 wcsr IE,r17 if ( old_tables ) 8003788: 45 c0 00 03 be r14,r0,8003794 <_Objects_Extend_information+0x24c> _Workspace_Free( old_tables ); 800378c: b9 c0 08 00 mv r1,r14 8003790: f8 00 08 68 calli 8005930 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 8003794: b9 a0 08 00 mv r1,r13 8003798: 34 02 00 02 mvi r2,2 800379c: fb ff f2 95 calli 80001f0 <__ashlsi3> 80037a0: b8 20 80 00 mv r16,r1 80037a4: 29 61 00 34 lw r1,(r11+52) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 80037a8: 2d 63 00 14 lhu r3,(r11+20) 80037ac: 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; 80037b0: b4 30 08 00 add r1,r1,r16 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 80037b4: 37 8e 00 34 addi r14,sp,52 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 80037b8: 58 2f 00 00 sw (r1+0),r15 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 80037bc: b9 e0 10 00 mv r2,r15 80037c0: b9 c0 08 00 mv r1,r14 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 80037c4: 78 0d 00 01 mvhi r13,0x1 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 80037c8: f8 00 12 5b calli 8008134 <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 80037cc: b9 c0 88 00 mv r17,r14 the_object->id = _Objects_Build_id( 80037d0: 39 ad 00 00 ori r13,r13,0x0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 80037d4: 35 6f 00 20 addi r15,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 ) { 80037d8: e0 00 00 0e bi 8003810 <_Objects_Extend_information+0x2c8> the_object->id = _Objects_Build_id( 80037dc: 29 61 00 00 lw r1,(r11+0) 80037e0: fb ff f2 84 calli 80001f0 <__ashlsi3> 80037e4: b8 2d 90 00 or r18,r1,r13 80037e8: 2d 61 00 04 lhu r1,(r11+4) 80037ec: 34 02 00 1b mvi r2,27 80037f0: fb ff f2 80 calli 80001f0 <__ashlsi3> 80037f4: ba 41 10 00 or r2,r18,r1 80037f8: b8 4c 10 00 or r2,r2,r12 80037fc: 59 c2 00 08 sw (r14+8),r2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 8003800: b9 e0 08 00 mv r1,r15 8003804: b9 c0 10 00 mv r2,r14 8003808: fb ff fc 97 calli 8002a64 <_Chain_Append> index++; 800380c: 35 8c 00 01 addi r12,r12,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 ) { 8003810: ba 20 08 00 mv r1,r17 8003814: f8 00 12 39 calli 80080f8 <_Chain_Get> 8003818: b8 20 70 00 mv r14,r1 the_object->id = _Objects_Build_id( 800381c: 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 ) { 8003820: 5c 20 ff ef bne r1,r0,80037dc <_Objects_Extend_information+0x294> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 8003824: 2d 62 00 14 lhu r2,(r11+20) information->inactive = 8003828: 2d 61 00 2c lhu r1,(r11+44) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 800382c: 29 63 00 30 lw r3,(r11+48) information->inactive = 8003830: b4 41 08 00 add r1,r2,r1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 8003834: b4 70 80 00 add r16,r3,r16 information->inactive = 8003838: 0d 61 00 2c sh (r11+44),r1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 800383c: 5a 02 00 00 sw (r16+0),r2 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 8003840: 2b 9d 00 04 lw ra,(sp+4) 8003844: 2b 8b 00 30 lw r11,(sp+48) 8003848: 2b 8c 00 2c lw r12,(sp+44) 800384c: 2b 8d 00 28 lw r13,(sp+40) 8003850: 2b 8e 00 24 lw r14,(sp+36) 8003854: 2b 8f 00 20 lw r15,(sp+32) 8003858: 2b 90 00 1c lw r16,(sp+28) 800385c: 2b 91 00 18 lw r17,(sp+24) 8003860: 2b 92 00 14 lw r18,(sp+20) 8003864: 2b 93 00 10 lw r19,(sp+16) 8003868: 2b 94 00 0c lw r20,(sp+12) 800386c: 2b 95 00 08 lw r21,(sp+8) 8003870: 37 9c 00 3c addi sp,sp,60 8003874: c3 a0 00 00 ret =============================================================================== 08003970 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 8003970: 37 9c ff f4 addi sp,sp,-12 8003974: 5b 8b 00 0c sw (sp+12),r11 8003978: 5b 8c 00 08 sw (sp+8),r12 800397c: 5b 9d 00 04 sw (sp+4),ra 8003980: b8 40 58 00 mv r11,r2 8003984: b8 20 60 00 mv r12,r1 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 8003988: 44 40 00 14 be r2,r0,80039d8 <_Objects_Get_information+0x68> /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 800398c: f8 00 13 bf calli 8008888 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 8003990: 44 20 00 12 be r1,r0,80039d8 <_Objects_Get_information+0x68> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 8003994: 55 61 00 11 bgu r11,r1,80039d8 <_Objects_Get_information+0x68> return NULL; if ( !_Objects_Information_table[ the_api ] ) 8003998: b9 80 08 00 mv r1,r12 800399c: 34 02 00 02 mvi r2,2 80039a0: 78 0c 08 01 mvhi r12,0x801 80039a4: 39 8c c7 c4 ori r12,r12,0xc7c4 80039a8: fb ff f2 12 calli 80001f0 <__ashlsi3> 80039ac: b5 81 08 00 add r1,r12,r1 80039b0: 28 2c 00 00 lw r12,(r1+0) 80039b4: 45 80 00 09 be r12,r0,80039d8 <_Objects_Get_information+0x68><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 80039b8: b9 60 08 00 mv r1,r11 80039bc: 34 02 00 02 mvi r2,2 80039c0: fb ff f2 0c calli 80001f0 <__ashlsi3> 80039c4: b5 81 08 00 add r1,r12,r1 80039c8: 28 21 00 00 lw r1,(r1+0) if ( !info ) 80039cc: 44 20 00 04 be r1,r0,80039dc <_Objects_Get_information+0x6c><== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 80039d0: 2c 22 00 10 lhu r2,(r1+16) 80039d4: 5c 40 00 02 bne r2,r0,80039dc <_Objects_Get_information+0x6c> 80039d8: 34 01 00 00 mvi r1,0 return NULL; #endif return info; } 80039dc: 2b 9d 00 04 lw ra,(sp+4) 80039e0: 2b 8b 00 0c lw r11,(sp+12) 80039e4: 2b 8c 00 08 lw r12,(sp+8) 80039e8: 37 9c 00 0c addi sp,sp,12 80039ec: c3 a0 00 00 ret =============================================================================== 08016da8 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 8016da8: 37 9c ff f4 addi sp,sp,-12 8016dac: 5b 8b 00 0c sw (sp+12),r11 8016db0: 5b 8c 00 08 sw (sp+8),r12 8016db4: 5b 9d 00 04 sw (sp+4),ra 8016db8: b8 20 20 00 mv r4,r1 /* * 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; 8016dbc: 28 21 00 08 lw r1,(r1+8) if ( information->maximum >= index ) { 8016dc0: 2c 85 00 10 lhu r5,(r4+16) Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 8016dc4: 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; 8016dc8: c8 41 08 00 sub r1,r2,r1 8016dcc: 34 21 00 01 addi r1,r1,1 if ( information->maximum >= index ) { 8016dd0: 54 25 00 0a bgu r1,r5,8016df8 <_Objects_Get_no_protection+0x50> if ( (the_object = information->local_table[ index ]) != NULL ) { 8016dd4: 28 8c 00 1c lw r12,(r4+28) 8016dd8: 34 02 00 02 mvi r2,2 8016ddc: fb ff dc 2f calli 800de98 <__ashlsi3> 8016de0: b5 81 08 00 add r1,r12,r1 8016de4: 28 21 00 00 lw r1,(r1+0) 8016de8: 44 20 00 04 be r1,r0,8016df8 <_Objects_Get_no_protection+0x50><== NEVER TAKEN *location = OBJECTS_LOCAL; 8016dec: 34 02 00 00 mvi r2,0 8016df0: 59 62 00 00 sw (r11+0),r2 return the_object; 8016df4: e0 00 00 04 bi 8016e04 <_Objects_Get_no_protection+0x5c> /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 8016df8: 34 01 00 01 mvi r1,1 8016dfc: 59 61 00 00 sw (r11+0),r1 8016e00: 34 01 00 00 mvi r1,0 return NULL; } 8016e04: 2b 9d 00 04 lw ra,(sp+4) 8016e08: 2b 8b 00 0c lw r11,(sp+12) 8016e0c: 2b 8c 00 08 lw r12,(sp+8) 8016e10: 37 9c 00 0c addi sp,sp,12 8016e14: c3 a0 00 00 ret =============================================================================== 0800538c <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 800538c: 37 9c ff ec addi sp,sp,-20 8005390: 5b 8b 00 10 sw (sp+16),r11 8005394: 5b 8c 00 0c sw (sp+12),r12 8005398: 5b 8d 00 08 sw (sp+8),r13 800539c: 5b 9d 00 04 sw (sp+4),ra 80053a0: b8 40 68 00 mv r13,r2 /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 80053a4: b8 20 58 00 mv r11,r1 80053a8: 5c 20 00 05 bne r1,r0,80053bc <_Objects_Id_to_name+0x30> 80053ac: 78 01 08 02 mvhi r1,0x802 80053b0: 38 21 19 40 ori r1,r1,0x1940 80053b4: 28 21 00 00 lw r1,(r1+0) 80053b8: 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); 80053bc: 34 02 00 18 mvi r2,24 80053c0: b9 60 08 00 mv r1,r11 80053c4: fb ff f0 ae calli 800167c <__lshrsi3> 80053c8: 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 ) 80053cc: 34 23 ff ff addi r3,r1,-1 80053d0: 34 02 00 03 mvi r2,3 80053d4: 54 62 00 13 bgu r3,r2,8005420 <_Objects_Id_to_name+0x94> 80053d8: e0 00 00 19 bi 800543c <_Objects_Id_to_name+0xb0> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 80053dc: 34 02 00 1b mvi r2,27 80053e0: b9 60 08 00 mv r1,r11 80053e4: fb ff f0 a6 calli 800167c <__lshrsi3> 80053e8: 34 02 00 02 mvi r2,2 80053ec: fb ff f0 7c calli 80015dc <__ashlsi3> 80053f0: b5 81 08 00 add r1,r12,r1 80053f4: 28 21 00 00 lw r1,(r1+0) if ( !information ) 80053f8: 44 20 00 0a be r1,r0,8005420 <_Objects_Id_to_name+0x94> <== 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 ); 80053fc: b9 60 10 00 mv r2,r11 8005400: 37 83 00 14 addi r3,sp,20 8005404: f8 00 14 e9 calli 800a7a8 <_Objects_Get> if ( !the_object ) 8005408: 44 20 00 06 be r1,r0,8005420 <_Objects_Id_to_name+0x94> return OBJECTS_INVALID_ID; *name = the_object->name; 800540c: 28 21 00 0c lw r1,(r1+12) 8005410: 59 a1 00 00 sw (r13+0),r1 _Thread_Enable_dispatch(); 8005414: f8 00 02 4d calli 8005d48 <_Thread_Enable_dispatch> 8005418: 34 01 00 00 mvi r1,0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 800541c: e0 00 00 02 bi 8005424 <_Objects_Id_to_name+0x98> 8005420: 34 01 00 03 mvi r1,3 } 8005424: 2b 9d 00 04 lw ra,(sp+4) 8005428: 2b 8b 00 10 lw r11,(sp+16) 800542c: 2b 8c 00 0c lw r12,(sp+12) 8005430: 2b 8d 00 08 lw r13,(sp+8) 8005434: 37 9c 00 14 addi sp,sp,20 8005438: c3 a0 00 00 ret the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 800543c: 78 0c 08 02 mvhi r12,0x802 8005440: 34 02 00 02 mvi r2,2 8005444: 39 8c 18 1c ori r12,r12,0x181c 8005448: fb ff f0 65 calli 80015dc <__ashlsi3> 800544c: b5 81 08 00 add r1,r12,r1 8005450: 28 2c 00 00 lw r12,(r1+0) 8005454: 5d 80 ff e2 bne r12,r0,80053dc <_Objects_Id_to_name+0x50> 8005458: e3 ff ff f2 bi 8005420 <_Objects_Id_to_name+0x94> =============================================================================== 080039f0 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 80039f0: 37 9c ff e4 addi sp,sp,-28 80039f4: 5b 8b 00 1c sw (sp+28),r11 80039f8: 5b 8c 00 18 sw (sp+24),r12 80039fc: 5b 8d 00 14 sw (sp+20),r13 8003a00: 5b 8e 00 10 sw (sp+16),r14 8003a04: 5b 8f 00 0c sw (sp+12),r15 8003a08: 5b 90 00 08 sw (sp+8),r16 8003a0c: 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; 8003a10: 34 06 00 00 mvi r6,0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 8003a14: b8 20 58 00 mv r11,r1 8003a18: 20 a5 ff ff andi r5,r5,0xffff 8003a1c: b8 40 78 00 mv r15,r2 uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 8003a20: 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; 8003a24: 0c 26 00 10 sh (r1+16),r6 #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; 8003a28: 0d 63 00 04 sh (r11+4),r3 information->size = size; information->local_table = 0; 8003a2c: 58 26 00 1c sw (r1+28),r6 information->inactive_per_block = 0; 8003a30: 58 26 00 30 sw (r1+48),r6 information->object_blocks = 0; 8003a34: 58 26 00 34 sw (r1+52),r6 information->inactive = 0; 8003a38: 0c 26 00 2c sh (r1+44),r6 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 8003a3c: 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; 8003a40: 78 10 08 01 mvhi r16,0x801 8003a44: 34 02 00 02 mvi r2,2 8003a48: b9 e0 08 00 mv r1,r15 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 8003a4c: b8 60 70 00 mv r14,r3 8003a50: b8 80 60 00 mv r12,r4 8003a54: b8 e0 68 00 mv r13,r7 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 8003a58: 3a 10 c7 c4 ori r16,r16,0xc7c4 8003a5c: fb ff f1 e5 calli 80001f0 <__ashlsi3> 8003a60: b6 01 08 00 add r1,r16,r1 8003a64: 28 30 00 00 lw r16,(r1+0) 8003a68: 34 02 00 02 mvi r2,2 8003a6c: b9 c0 08 00 mv r1,r14 8003a70: fb ff f1 e0 calli 80001f0 <__ashlsi3> 8003a74: b6 01 08 00 add r1,r16,r1 8003a78: 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; 8003a7c: 34 02 00 1f mvi r2,31 8003a80: b9 80 08 00 mv r1,r12 8003a84: fb ff f2 03 calli 8000290 <__lshrsi3> 8003a88: 20 23 00 ff andi r3,r1,0xff maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 8003a8c: 78 02 7f ff mvhi r2,0x7fff 8003a90: 38 42 ff ff ori r2,r2,0xffff _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 8003a94: 31 63 00 12 sb (r11+18),r3 (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 8003a98: a1 82 60 00 and r12,r12,r2 /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 8003a9c: 44 60 00 06 be r3,r0,8003ab4 <_Objects_Initialize_information+0xc4> 8003aa0: 5d 80 00 05 bne r12,r0,8003ab4 <_Objects_Initialize_information+0xc4> _Internal_error_Occurred( 8003aa4: b9 80 08 00 mv r1,r12 8003aa8: 34 02 00 01 mvi r2,1 8003aac: 34 03 00 14 mvi r3,20 8003ab0: fb ff fe 3b calli 800339c <_Internal_error_Occurred> 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; 8003ab4: 78 01 08 01 mvhi r1,0x801 8003ab8: 38 21 c6 20 ori r1,r1,0xc620 8003abc: 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 = 8003ac0: 34 02 00 18 mvi r2,24 8003ac4: b9 e0 08 00 mv r1,r15 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 8003ac8: 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 = 8003acc: fb ff f1 c9 calli 80001f0 <__ashlsi3> 8003ad0: 78 02 00 01 mvhi r2,0x1 8003ad4: 38 42 00 00 ori r2,r2,0x0 8003ad8: b8 22 78 00 or r15,r1,r2 8003adc: 34 02 00 1b mvi r2,27 8003ae0: b9 c0 08 00 mv r1,r14 8003ae4: fb ff f1 c3 calli 80001f0 <__ashlsi3> 8003ae8: 7d 83 00 00 cmpnei r3,r12,0 8003aec: b9 e1 08 00 or r1,r15,r1 8003af0: b8 23 08 00 or r1,r1,r3 8003af4: 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) ) 8003af8: 21 a2 00 03 andi r2,r13,0x3 8003afc: b9 a0 08 00 mv r1,r13 8003b00: 44 40 00 04 be r2,r0,8003b10 <_Objects_Initialize_information+0x120><== ALWAYS TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 8003b04: 35 ad 00 04 addi r13,r13,4 <== NOT EXECUTED 8003b08: 34 01 ff fc mvi r1,-4 <== NOT EXECUTED 8003b0c: a1 a1 08 00 and r1,r13,r1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8003b10: 35 63 00 24 addi r3,r11,36 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 8003b14: 35 62 00 20 addi r2,r11,32 ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 8003b18: 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; 8003b1c: 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); 8003b20: 59 63 00 20 sw (r11+32),r3 the_chain->permanent_null = NULL; 8003b24: 59 61 00 24 sw (r11+36),r1 the_chain->last = _Chain_Head(the_chain); 8003b28: 59 62 00 28 sw (r11+40),r2 _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 8003b2c: 45 81 00 03 be r12,r1,8003b38 <_Objects_Initialize_information+0x148> /* * 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 ); 8003b30: b9 60 08 00 mv r1,r11 8003b34: fb ff fe 85 calli 8003548 <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 8003b38: 2b 9d 00 04 lw ra,(sp+4) 8003b3c: 2b 8b 00 1c lw r11,(sp+28) 8003b40: 2b 8c 00 18 lw r12,(sp+24) 8003b44: 2b 8d 00 14 lw r13,(sp+20) 8003b48: 2b 8e 00 10 lw r14,(sp+16) 8003b4c: 2b 8f 00 0c lw r15,(sp+12) 8003b50: 2b 90 00 08 lw r16,(sp+8) 8003b54: 37 9c 00 1c addi sp,sp,28 8003b58: c3 a0 00 00 ret =============================================================================== 08007df0 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 8007df0: 37 9c ff f0 addi sp,sp,-16 8007df4: 5b 8b 00 0c sw (sp+12),r11 8007df8: 5b 8c 00 08 sw (sp+8),r12 8007dfc: 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 ]; 8007e00: 28 2b 01 24 lw r11,(r1+292) if ( !api ) 8007e04: 45 60 00 1b be r11,r0,8007e70 <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 8007e08: 90 00 08 00 rcsr r1,IE 8007e0c: 34 02 ff fe mvi r2,-2 8007e10: a0 22 10 00 and r2,r1,r2 8007e14: d0 02 00 00 wcsr IE,r2 signal_set = asr->signals_posted; asr->signals_posted = 0; 8007e18: 34 02 00 00 mvi r2,0 */ asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; 8007e1c: 29 6c 00 14 lw r12,(r11+20) asr->signals_posted = 0; 8007e20: 59 62 00 14 sw (r11+20),r2 _ISR_Enable( level ); 8007e24: d0 01 00 00 wcsr IE,r1 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 8007e28: 45 80 00 12 be r12,r0,8007e70 <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN return; asr->nest_level += 1; 8007e2c: 29 63 00 1c lw r3,(r11+28) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 8007e30: 29 61 00 10 lw r1,(r11+16) 8007e34: 38 02 ff ff mvu r2,0xffff if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 8007e38: 34 63 00 01 addi r3,r3,1 8007e3c: 59 63 00 1c sw (r11+28),r3 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 8007e40: 37 83 00 10 addi r3,sp,16 8007e44: f8 00 09 36 calli 800a31c (*asr->handler)( signal_set ); 8007e48: 29 62 00 0c lw r2,(r11+12) 8007e4c: b9 80 08 00 mv r1,r12 8007e50: d8 40 00 00 call r2 asr->nest_level -= 1; 8007e54: 29 63 00 1c lw r3,(r11+28) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 8007e58: 2b 81 00 10 lw r1,(sp+16) 8007e5c: 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; 8007e60: 34 63 ff ff addi r3,r3,-1 8007e64: 59 63 00 1c sw (r11+28),r3 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 8007e68: 37 83 00 10 addi r3,sp,16 8007e6c: f8 00 09 2c calli 800a31c } 8007e70: 2b 9d 00 04 lw ra,(sp+4) 8007e74: 2b 8b 00 0c lw r11,(sp+12) 8007e78: 2b 8c 00 08 lw r12,(sp+8) 8007e7c: 37 9c 00 10 addi sp,sp,16 8007e80: c3 a0 00 00 ret =============================================================================== 08003c38 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 8003c38: 37 9c ff f4 addi sp,sp,-12 8003c3c: 5b 8b 00 08 sw (sp+8),r11 8003c40: 5b 9d 00 04 sw (sp+4),ra 8003c44: b8 20 10 00 mv r2,r1 8003c48: 78 01 08 02 mvhi r1,0x802 8003c4c: 38 21 28 04 ori r1,r1,0x2804 8003c50: 37 83 00 0c addi r3,sp,12 8003c54: f8 00 07 b6 calli 8005b2c <_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 ) { 8003c58: 2b 82 00 0c lw r2,(sp+12) 8003c5c: b8 20 58 00 mv r11,r1 8003c60: 5c 40 00 21 bne r2,r0,8003ce4 <_Rate_monotonic_Timeout+0xac><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 8003c64: 28 21 00 40 lw r1,(r1+64) if ( _States_Is_waiting_for_period( the_thread->current_state ) && 8003c68: 28 23 00 10 lw r3,(r1+16) 8003c6c: 20 63 40 00 andi r3,r3,0x4000 8003c70: 44 62 00 08 be r3,r2,8003c90 <_Rate_monotonic_Timeout+0x58> the_thread->Wait.id == the_period->Object.id ) { 8003c74: 28 23 00 20 lw r3,(r1+32) 8003c78: 29 62 00 08 lw r2,(r11+8) 8003c7c: 5c 62 00 05 bne r3,r2,8003c90 <_Rate_monotonic_Timeout+0x58> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 8003c80: 78 02 10 03 mvhi r2,0x1003 8003c84: 38 42 ff f8 ori r2,r2,0xfff8 8003c88: f8 00 09 0f calli 80060c4 <_Thread_Clear_state> 8003c8c: e0 00 00 06 bi 8003ca4 <_Rate_monotonic_Timeout+0x6c> _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 ) { 8003c90: 29 62 00 38 lw r2,(r11+56) 8003c94: 34 01 00 01 mvi r1,1 8003c98: 5c 41 00 0c bne r2,r1,8003cc8 <_Rate_monotonic_Timeout+0x90> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 8003c9c: 34 01 00 03 mvi r1,3 8003ca0: 59 61 00 38 sw (r11+56),r1 _Rate_monotonic_Initiate_statistics( the_period ); 8003ca4: b9 60 08 00 mv r1,r11 8003ca8: fb ff fd f3 calli 8003474 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8003cac: 29 61 00 3c lw r1,(r11+60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8003cb0: 35 62 00 10 addi r2,r11,16 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8003cb4: 59 61 00 1c sw (r11+28),r1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8003cb8: 78 01 08 02 mvhi r1,0x802 8003cbc: 38 21 2a 18 ori r1,r1,0x2a18 8003cc0: f8 00 0f 9f calli 8007b3c <_Watchdog_Insert> 8003cc4: e0 00 00 03 bi 8003cd0 <_Rate_monotonic_Timeout+0x98> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 8003cc8: 34 01 00 04 mvi r1,4 8003ccc: 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; 8003cd0: 78 01 08 02 mvhi r1,0x802 8003cd4: 38 21 29 3c ori r1,r1,0x293c 8003cd8: 28 22 00 00 lw r2,(r1+0) 8003cdc: 34 42 ff ff addi r2,r2,-1 8003ce0: 58 22 00 00 sw (r1+0),r2 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 8003ce4: 2b 9d 00 04 lw ra,(sp+4) 8003ce8: 2b 8b 00 08 lw r11,(sp+8) 8003cec: 37 9c 00 0c addi sp,sp,12 8003cf0: c3 a0 00 00 ret =============================================================================== 080035ec <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 80035ec: 37 9c ff e4 addi sp,sp,-28 80035f0: 5b 8b 00 0c sw (sp+12),r11 80035f4: 5b 8c 00 08 sw (sp+8),r12 80035f8: 5b 9d 00 04 sw (sp+4),ra 80035fc: b8 20 58 00 mv r11,r1 /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 8003600: 28 21 00 54 lw r1,(r1+84) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 8003604: 29 62 00 38 lw r2,(r11+56) /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 8003608: 34 21 00 01 addi r1,r1,1 800360c: 59 61 00 54 sw (r11+84),r1 if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 8003610: 34 01 00 04 mvi r1,4 8003614: 5c 41 00 04 bne r2,r1,8003624 <_Rate_monotonic_Update_statistics+0x38> stats->missed_count++; 8003618: 29 61 00 58 lw r1,(r11+88) 800361c: 34 21 00 01 addi r1,r1,1 8003620: 59 61 00 58 sw (r11+88),r1 /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 8003624: 37 8c 00 18 addi r12,sp,24 8003628: b9 60 08 00 mv r1,r11 800362c: 37 82 00 10 addi r2,sp,16 8003630: b9 80 18 00 mv r3,r12 8003634: fb ff ff b5 calli 8003508 <_Rate_monotonic_Get_status> if (!valid_status) 8003638: 44 20 00 28 be r1,r0,80036d8 <_Rate_monotonic_Update_statistics+0xec><== NEVER TAKEN /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 800363c: b9 80 10 00 mv r2,r12 8003640: 35 61 00 6c addi r1,r11,108 8003644: f8 00 0f ed calli 80075f8 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 8003648: b9 80 08 00 mv r1,r12 800364c: 35 62 00 5c addi r2,r11,92 8003650: f8 00 10 47 calli 800776c <_Timespec_Less_than> 8003654: 44 20 00 05 be r1,r0,8003668 <_Rate_monotonic_Update_statistics+0x7c> stats->min_cpu_time = executed; 8003658: 2b 81 00 18 lw r1,(sp+24) 800365c: 59 61 00 5c sw (r11+92),r1 8003660: 2b 81 00 1c lw r1,(sp+28) 8003664: 59 61 00 60 sw (r11+96),r1 if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 8003668: 37 81 00 18 addi r1,sp,24 800366c: 35 62 00 64 addi r2,r11,100 8003670: f8 00 10 33 calli 800773c <_Timespec_Greater_than> 8003674: 44 20 00 05 be r1,r0,8003688 <_Rate_monotonic_Update_statistics+0x9c> stats->max_cpu_time = executed; 8003678: 2b 81 00 18 lw r1,(sp+24) 800367c: 59 61 00 64 sw (r11+100),r1 8003680: 2b 81 00 1c lw r1,(sp+28) 8003684: 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 ); 8003688: 37 8c 00 10 addi r12,sp,16 800368c: b9 80 10 00 mv r2,r12 8003690: 35 61 00 84 addi r1,r11,132 8003694: f8 00 0f d9 calli 80075f8 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 8003698: b9 80 08 00 mv r1,r12 800369c: 35 62 00 74 addi r2,r11,116 80036a0: f8 00 10 33 calli 800776c <_Timespec_Less_than> 80036a4: 44 20 00 05 be r1,r0,80036b8 <_Rate_monotonic_Update_statistics+0xcc> stats->min_wall_time = since_last_period; 80036a8: 2b 81 00 10 lw r1,(sp+16) 80036ac: 59 61 00 74 sw (r11+116),r1 80036b0: 2b 81 00 14 lw r1,(sp+20) 80036b4: 59 61 00 78 sw (r11+120),r1 if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 80036b8: 37 81 00 10 addi r1,sp,16 80036bc: 35 62 00 7c addi r2,r11,124 80036c0: f8 00 10 1f calli 800773c <_Timespec_Greater_than> 80036c4: 44 20 00 05 be r1,r0,80036d8 <_Rate_monotonic_Update_statistics+0xec> stats->max_wall_time = since_last_period; 80036c8: 2b 81 00 14 lw r1,(sp+20) 80036cc: 59 61 00 80 sw (r11+128),r1 80036d0: 2b 81 00 10 lw r1,(sp+16) 80036d4: 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 } 80036d8: 2b 9d 00 04 lw ra,(sp+4) 80036dc: 2b 8b 00 0c lw r11,(sp+12) 80036e0: 2b 8c 00 08 lw r12,(sp+8) 80036e4: 37 9c 00 1c addi sp,sp,28 80036e8: c3 a0 00 00 ret =============================================================================== 0800834c <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 800834c: 37 9c ff e4 addi sp,sp,-28 8008350: 5b 8b 00 0c sw (sp+12),r11 8008354: 5b 8c 00 08 sw (sp+8),r12 8008358: 5b 9d 00 04 sw (sp+4),ra 800835c: 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 ); 8008360: 90 00 60 00 rcsr r12,IE 8008364: 34 01 ff fe mvi r1,-2 8008368: a1 81 08 00 and r1,r12,r1 800836c: d0 01 00 00 wcsr IE,r1 now = _TOD_Now; 8008370: 78 02 08 01 mvhi r2,0x801 8008374: 38 42 c8 bc ori r2,r2,0xc8bc if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008378: 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; 800837c: 28 41 00 04 lw r1,(r2+4) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008380: 38 63 c9 cc ori r3,r3,0xc9cc /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 8008384: 28 42 00 00 lw r2,(r2+0) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008388: 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; 800838c: 5b 81 00 14 sw (sp+20),r1 8008390: 5b 82 00 10 sw (sp+16),r2 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008394: b8 60 20 00 mv r4,r3 8008398: 44 60 00 03 be r3,r0,80083a4 <_TOD_Get+0x58> <== ALWAYS TAKEN nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 800839c: d8 60 00 00 call r3 <== NOT EXECUTED 80083a0: b8 20 20 00 mv r4,r1 <== NOT EXECUTED _ISR_Enable( level ); 80083a4: d0 0c 00 00 wcsr IE,r12 _Timestamp_Set( &offset, 0, nanoseconds ); 80083a8: 34 03 00 00 mvi r3,0 _Timestamp_Add_to( &now, &offset ); 80083ac: 37 81 00 10 addi r1,sp,16 80083b0: 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 ); 80083b4: 5b 83 00 18 sw (sp+24),r3 80083b8: 5b 84 00 1c sw (sp+28),r4 _Timestamp_Add_to( &now, &offset ); 80083bc: fb ff f3 6a calli 8005164 <_Timespec_Add_to> _Timestamp_To_timespec( &now, time ); 80083c0: 2b 81 00 14 lw r1,(sp+20) 80083c4: 59 61 00 04 sw (r11+4),r1 80083c8: 2b 81 00 10 lw r1,(sp+16) 80083cc: 59 61 00 00 sw (r11+0),r1 } 80083d0: 2b 9d 00 04 lw ra,(sp+4) 80083d4: 2b 8b 00 0c lw r11,(sp+12) 80083d8: 2b 8c 00 08 lw r12,(sp+8) 80083dc: 37 9c 00 1c addi sp,sp,28 80083e0: c3 a0 00 00 ret =============================================================================== 080083e4 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( Timestamp_Control *uptime ) { 80083e4: 37 9c ff e4 addi sp,sp,-28 80083e8: 5b 8b 00 0c sw (sp+12),r11 80083ec: 5b 8c 00 08 sw (sp+8),r12 80083f0: 5b 9d 00 04 sw (sp+4),ra 80083f4: 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 ); 80083f8: 90 00 60 00 rcsr r12,IE 80083fc: 34 01 ff fe mvi r1,-2 8008400: a1 81 08 00 and r1,r12,r1 8008404: d0 01 00 00 wcsr IE,r1 up = _TOD_Uptime; 8008408: 78 02 08 01 mvhi r2,0x801 800840c: 38 42 c8 ac ori r2,r2,0xc8ac if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008410: 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; 8008414: 28 41 00 04 lw r1,(r2+4) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008418: 38 63 c9 cc ori r3,r3,0xc9cc /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 800841c: 28 42 00 00 lw r2,(r2+0) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8008420: 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; 8008424: 5b 81 00 14 sw (sp+20),r1 8008428: 5b 82 00 10 sw (sp+16),r2 if ( _Watchdog_Nanoseconds_since_tick_handler ) 800842c: b8 60 20 00 mv r4,r3 8008430: 44 60 00 03 be r3,r0,800843c <_TOD_Get_uptime+0x58> <== ALWAYS TAKEN nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 8008434: d8 60 00 00 call r3 <== NOT EXECUTED 8008438: b8 20 20 00 mv r4,r1 <== NOT EXECUTED _ISR_Enable( level ); 800843c: d0 0c 00 00 wcsr IE,r12 _Timestamp_Set( &offset, 0, nanoseconds ); 8008440: 34 03 00 00 mvi r3,0 _Timestamp_Add_to( &up, &offset ); 8008444: 37 81 00 10 addi r1,sp,16 8008448: 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 ); 800844c: 5b 83 00 18 sw (sp+24),r3 8008450: 5b 84 00 1c sw (sp+28),r4 _Timestamp_Add_to( &up, &offset ); 8008454: fb ff f3 44 calli 8005164 <_Timespec_Add_to> *uptime = up; 8008458: 2b 81 00 14 lw r1,(sp+20) 800845c: 59 61 00 04 sw (r11+4),r1 8008460: 2b 81 00 10 lw r1,(sp+16) 8008464: 59 61 00 00 sw (r11+0),r1 } 8008468: 2b 9d 00 04 lw ra,(sp+4) 800846c: 2b 8b 00 0c lw r11,(sp+12) 8008470: 2b 8c 00 08 lw r12,(sp+8) 8008474: 37 9c 00 1c addi sp,sp,28 8008478: c3 a0 00 00 ret =============================================================================== 0800380c <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 800380c: 37 9c ff f4 addi sp,sp,-12 8003810: 5b 8b 00 0c sw (sp+12),r11 8003814: 5b 8c 00 08 sw (sp+8),r12 8003818: 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(); 800381c: 78 02 08 02 mvhi r2,0x802 8003820: 38 42 20 c4 ori r2,r2,0x20c4 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 8003824: 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(); 8003828: 28 42 00 0c lw r2,(r2+12) if ((!the_tod) || 800382c: 44 20 00 22 be r1,r0,80038b4 <_TOD_Validate+0xa8> <== NEVER TAKEN (the_tod->ticks >= ticks_per_second) || 8003830: 78 01 00 0f mvhi r1,0xf 8003834: 38 21 42 40 ori r1,r1,0x4240 8003838: f8 00 6a 4d calli 801e16c <__udivsi3> 800383c: 29 62 00 18 lw r2,(r11+24) 8003840: 50 41 00 1d bgeu r2,r1,80038b4 <_TOD_Validate+0xa8> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 8003844: 29 62 00 14 lw r2,(r11+20) 8003848: 34 01 00 3b mvi r1,59 800384c: 54 41 00 1a bgu r2,r1,80038b4 <_TOD_Validate+0xa8> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 8003850: 29 62 00 10 lw r2,(r11+16) 8003854: 54 41 00 18 bgu r2,r1,80038b4 <_TOD_Validate+0xa8> (the_tod->hour >= TOD_HOURS_PER_DAY) || 8003858: 29 62 00 0c lw r2,(r11+12) 800385c: 34 01 00 17 mvi r1,23 8003860: 54 41 00 15 bgu r2,r1,80038b4 <_TOD_Validate+0xa8> (the_tod->month == 0) || 8003864: 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) || 8003868: 44 20 00 13 be r1,r0,80038b4 <_TOD_Validate+0xa8> <== NEVER TAKEN 800386c: 34 02 00 0c mvi r2,12 8003870: 54 22 00 11 bgu r1,r2,80038b4 <_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) || 8003874: 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) || 8003878: 34 03 07 c3 mvi r3,1987 800387c: 50 62 00 0e bgeu r3,r2,80038b4 <_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) ) 8003880: 29 6c 00 08 lw r12,(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) || 8003884: 45 80 00 0c be r12,r0,80038b4 <_TOD_Validate+0xa8> <== NEVER TAKEN 8003888: 78 0b 08 01 mvhi r11,0x801 (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 ) 800388c: 20 42 00 03 andi r2,r2,0x3 8003890: 39 6b fc 60 ori r11,r11,0xfc60 8003894: 5c 40 00 02 bne r2,r0,800389c <_TOD_Validate+0x90> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 8003898: 34 21 00 0d addi r1,r1,13 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 800389c: 34 02 00 02 mvi r2,2 80038a0: fb ff f6 62 calli 8001228 <__ashlsi3> 80038a4: b5 61 08 00 add r1,r11,r1 80038a8: 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( 80038ac: f0 2c 08 00 cmpgeu r1,r1,r12 80038b0: e0 00 00 02 bi 80038b8 <_TOD_Validate+0xac> 80038b4: 34 01 00 00 mvi r1,0 if ( the_tod->day > days_in_month ) return false; return true; } 80038b8: 2b 9d 00 04 lw ra,(sp+4) 80038bc: 2b 8b 00 0c lw r11,(sp+12) 80038c0: 2b 8c 00 08 lw r12,(sp+8) 80038c4: 37 9c 00 0c addi sp,sp,12 80038c8: c3 a0 00 00 ret =============================================================================== 08003cd4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 8003cd4: 37 9c ff ec addi sp,sp,-20 8003cd8: 5b 8b 00 14 sw (sp+20),r11 8003cdc: 5b 8c 00 10 sw (sp+16),r12 8003ce0: 5b 8d 00 0c sw (sp+12),r13 8003ce4: 5b 8e 00 08 sw (sp+8),r14 8003ce8: 5b 9d 00 04 sw (sp+4),ra 8003cec: b8 20 58 00 mv r11,r1 */ /* * Save original state */ original_state = the_thread->current_state; 8003cf0: 28 2e 00 10 lw r14,(r1+16) void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 8003cf4: b8 40 60 00 mv r12,r2 8003cf8: 20 6d 00 ff andi r13,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 ); 8003cfc: f8 00 04 83 calli 8004f08 <_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 ) 8003d00: 29 61 00 14 lw r1,(r11+20) 8003d04: 44 2c 00 04 be r1,r12,8003d14 <_Thread_Change_priority+0x40> _Thread_Set_priority( the_thread, new_priority ); 8003d08: b9 80 10 00 mv r2,r12 8003d0c: b9 60 08 00 mv r1,r11 8003d10: f8 00 03 db calli 8004c7c <_Thread_Set_priority> _ISR_Disable( level ); 8003d14: 90 00 60 00 rcsr r12,IE 8003d18: 34 05 ff fe mvi r5,-2 8003d1c: a1 85 28 00 and r5,r12,r5 8003d20: d0 05 00 00 wcsr IE,r5 /* * 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; 8003d24: 29 64 00 10 lw r4,(r11+16) if ( state != STATES_TRANSIENT ) { 8003d28: 34 01 00 04 mvi r1,4 8003d2c: 21 c2 00 04 andi r2,r14,0x4 8003d30: 44 81 00 0e be r4,r1,8003d68 <_Thread_Change_priority+0x94> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 8003d34: 5c 40 00 04 bne r2,r0,8003d44 <_Thread_Change_priority+0x70><== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 8003d38: 34 01 ff fb mvi r1,-5 8003d3c: a0 81 08 00 and r1,r4,r1 8003d40: 59 61 00 10 sw (r11+16),r1 _ISR_Enable( level ); 8003d44: d0 0c 00 00 wcsr IE,r12 if ( _States_Is_waiting_on_thread_queue( state ) ) { 8003d48: 78 01 00 03 mvhi r1,0x3 8003d4c: 38 21 be e0 ori r1,r1,0xbee0 8003d50: a0 81 08 00 and r1,r4,r1 8003d54: 44 20 00 5f be r1,r0,8003ed0 <_Thread_Change_priority+0x1fc> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 8003d58: 29 61 00 44 lw r1,(r11+68) 8003d5c: b9 60 10 00 mv r2,r11 8003d60: f8 00 03 94 calli 8004bb0 <_Thread_queue_Requeue> 8003d64: e0 00 00 5b bi 8003ed0 <_Thread_Change_priority+0x1fc> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 8003d68: 5c 40 00 1c bne r2,r0,8003dd8 <_Thread_Change_priority+0x104><== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8003d6c: 29 61 00 90 lw r1,(r11+144) 8003d70: 2d 63 00 96 lhu r3,(r11+150) _Priority_Major_bit_map |= the_priority_map->ready_major; 8003d74: 78 04 08 01 mvhi r4,0x801 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8003d78: 2c 26 00 00 lhu r6,(r1+0) _Priority_Major_bit_map |= the_priority_map->ready_major; 8003d7c: 38 84 c8 dc ori r4,r4,0xc8dc * 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 ); 8003d80: 59 62 00 10 sw (r11+16),r2 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8003d84: b8 c3 18 00 or r3,r6,r3 8003d88: 0c 23 00 00 sh (r1+0),r3 _Priority_Major_bit_map |= the_priority_map->ready_major; 8003d8c: 2c 83 00 00 lhu r3,(r4+0) 8003d90: 2d 66 00 94 lhu r6,(r11+148) 8003d94: 29 61 00 8c lw r1,(r11+140) 8003d98: b8 c3 18 00 or r3,r6,r3 8003d9c: 20 63 ff ff andi r3,r3,0xffff 8003da0: 0c 83 00 00 sh (r4+0),r3 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 8003da4: 45 a2 00 07 be r13,r2,8003dc0 <_Thread_Change_priority+0xec> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 8003da8: 28 22 00 00 lw r2,(r1+0) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 8003dac: 59 61 00 04 sw (r11+4),r1 before_node = after_node->next; after_node->next = the_node; 8003db0: 58 2b 00 00 sw (r1+0),r11 the_node->next = before_node; before_node->previous = the_node; 8003db4: 58 4b 00 04 sw (r2+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; 8003db8: 59 62 00 00 sw (r11+0),r2 8003dbc: e0 00 00 07 bi 8003dd8 <_Thread_Change_priority+0x104> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8003dc0: 34 22 00 04 addi r2,r1,4 8003dc4: 59 62 00 00 sw (r11+0),r2 old_last_node = the_chain->last; 8003dc8: 28 22 00 08 lw r2,(r1+8) the_chain->last = the_node; 8003dcc: 58 2b 00 08 sw (r1+8),r11 old_last_node->next = the_node; the_node->previous = old_last_node; 8003dd0: 59 62 00 04 sw (r11+4),r2 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; 8003dd4: 58 4b 00 00 sw (r2+0),r11 _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 8003dd8: d0 0c 00 00 wcsr IE,r12 8003ddc: d0 05 00 00 wcsr IE,r5 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 ); 8003de0: 78 01 08 01 mvhi r1,0x801 8003de4: 38 21 c8 dc ori r1,r1,0xc8dc 8003de8: 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; 8003dec: 78 02 08 01 mvhi r2,0x801 8003df0: 38 42 c7 b8 ori r2,r2,0xc7b8 8003df4: 78 0b 08 01 mvhi r11,0x801 8003df8: 28 4e 00 00 lw r14,(r2+0) 8003dfc: 20 21 ff ff andi r1,r1,0xffff 8003e00: 34 02 00 ff mvi r2,255 8003e04: 39 6b a3 a4 ori r11,r11,0xa3a4 8003e08: 54 22 00 05 bgu r1,r2,8003e1c <_Thread_Change_priority+0x148> 8003e0c: b5 61 58 00 add r11,r11,r1 8003e10: 41 6d 00 00 lbu r13,(r11+0) 8003e14: 35 ad 00 08 addi r13,r13,8 8003e18: e0 00 00 05 bi 8003e2c <_Thread_Change_priority+0x158> 8003e1c: 34 02 00 08 mvi r2,8 8003e20: fb ff f1 1c calli 8000290 <__lshrsi3> 8003e24: b5 61 58 00 add r11,r11,r1 8003e28: 41 6d 00 00 lbu r13,(r11+0) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 8003e2c: 78 02 08 01 mvhi r2,0x801 8003e30: b5 ad 08 00 add r1,r13,r13 8003e34: 38 42 c9 58 ori r2,r2,0xc958 8003e38: b4 41 10 00 add r2,r2,r1 8003e3c: 2c 41 00 00 lhu r1,(r2+0) 8003e40: 78 0b 08 01 mvhi r11,0x801 8003e44: 34 02 00 ff mvi r2,255 8003e48: 39 6b a3 a4 ori r11,r11,0xa3a4 8003e4c: 54 22 00 05 bgu r1,r2,8003e60 <_Thread_Change_priority+0x18c> 8003e50: b5 61 58 00 add r11,r11,r1 8003e54: 41 6b 00 00 lbu r11,(r11+0) 8003e58: 35 6b 00 08 addi r11,r11,8 8003e5c: e0 00 00 05 bi 8003e70 <_Thread_Change_priority+0x19c> 8003e60: 34 02 00 08 mvi r2,8 8003e64: fb ff f1 0b calli 8000290 <__lshrsi3> 8003e68: b5 61 58 00 add r11,r11,r1 8003e6c: 41 6b 00 00 lbu r11,(r11+0) * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 8003e70: 34 02 00 04 mvi r2,4 8003e74: b9 a0 08 00 mv r1,r13 8003e78: fb ff f0 de calli 80001f0 <__ashlsi3> 8003e7c: b5 61 08 00 add r1,r11,r1 8003e80: b4 21 10 00 add r2,r1,r1 8003e84: b4 41 08 00 add r1,r2,r1 8003e88: 34 02 00 02 mvi r2,2 8003e8c: fb ff f0 d9 calli 80001f0 <__ashlsi3> 8003e90: 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 ); 8003e94: 78 02 08 01 mvhi r2,0x801 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 8003e98: 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 ); 8003e9c: 38 42 c8 e8 ori r2,r2,0xc8e8 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 8003ea0: 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 ); 8003ea4: 28 42 00 00 lw r2,(r2+0) * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 8003ea8: 38 21 c8 b8 ori r1,r1,0xc8b8 8003eac: 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() && 8003eb0: 44 43 00 07 be r2,r3,8003ecc <_Thread_Change_priority+0x1f8> _Thread_Executing->is_preemptible ) 8003eb4: 40 41 00 75 lbu r1,(r2+117) 8003eb8: 44 20 00 05 be r1,r0,8003ecc <_Thread_Change_priority+0x1f8> _Context_Switch_necessary = true; 8003ebc: 78 01 08 01 mvhi r1,0x801 8003ec0: 38 21 c8 f8 ori r1,r1,0xc8f8 8003ec4: 34 02 00 01 mvi r2,1 8003ec8: 30 22 00 00 sb (r1+0),r2 _ISR_Enable( level ); 8003ecc: d0 0c 00 00 wcsr IE,r12 } 8003ed0: 2b 9d 00 04 lw ra,(sp+4) 8003ed4: 2b 8b 00 14 lw r11,(sp+20) 8003ed8: 2b 8c 00 10 lw r12,(sp+16) 8003edc: 2b 8d 00 0c lw r13,(sp+12) 8003ee0: 2b 8e 00 08 lw r14,(sp+8) 8003ee4: 37 9c 00 14 addi sp,sp,20 8003ee8: c3 a0 00 00 ret =============================================================================== 08008ba4 <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 8008ba4: 90 00 18 00 rcsr r3,IE 8008ba8: 34 05 ff fe mvi r5,-2 8008bac: a0 65 28 00 and r5,r3,r5 8008bb0: d0 05 00 00 wcsr IE,r5 current_state = the_thread->current_state; 8008bb4: 28 24 00 10 lw r4,(r1+16) if ( current_state & state ) { 8008bb8: a0 44 30 00 and r6,r2,r4 8008bbc: 44 c0 00 2b be r6,r0,8008c68 <_Thread_Clear_state+0xc4> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 8008bc0: a4 40 10 00 not r2,r2 8008bc4: a0 44 10 00 and r2,r2,r4 current_state = 8008bc8: 58 22 00 10 sw (r1+16),r2 the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 8008bcc: 5c 40 00 27 bne r2,r0,8008c68 <_Thread_Clear_state+0xc4> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8008bd0: 28 26 00 90 lw r6,(r1+144) 8008bd4: 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); 8008bd8: 28 24 00 8c lw r4,(r1+140) 8008bdc: 2c c8 00 00 lhu r8,(r6+0) _Priority_Major_bit_map |= the_priority_map->ready_major; 8008be0: 78 02 08 01 mvhi r2,0x801 8008be4: 38 42 c8 dc ori r2,r2,0xc8dc RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8008be8: b9 07 38 00 or r7,r8,r7 8008bec: 0c c7 00 00 sh (r6+0),r7 _Priority_Major_bit_map |= the_priority_map->ready_major; 8008bf0: 2c 47 00 00 lhu r7,(r2+0) 8008bf4: 2c 28 00 94 lhu r8,(r1+148) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8008bf8: 34 86 00 04 addi r6,r4,4 8008bfc: 58 26 00 00 sw (r1+0),r6 old_last_node = the_chain->last; 8008c00: 28 86 00 08 lw r6,(r4+8) 8008c04: b9 07 38 00 or r7,r8,r7 the_chain->last = the_node; 8008c08: 58 81 00 08 sw (r4+8),r1 8008c0c: 20 e4 ff ff andi r4,r7,0xffff 8008c10: 0c 44 00 00 sh (r2+0),r4 old_last_node->next = the_node; the_node->previous = old_last_node; 8008c14: 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; 8008c18: 58 c1 00 00 sw (r6+0),r1 _ISR_Flash( level ); 8008c1c: d0 03 00 00 wcsr IE,r3 8008c20: 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 ) { 8008c24: 78 02 08 01 mvhi r2,0x801 8008c28: 38 42 c8 b8 ori r2,r2,0xc8b8 8008c2c: 28 44 00 00 lw r4,(r2+0) 8008c30: 28 25 00 14 lw r5,(r1+20) 8008c34: 28 84 00 14 lw r4,(r4+20) 8008c38: 50 a4 00 0c bgeu r5,r4,8008c68 <_Thread_Clear_state+0xc4> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 8008c3c: 78 04 08 01 mvhi r4,0x801 8008c40: 38 84 c8 e8 ori r4,r4,0xc8e8 8008c44: 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; 8008c48: 58 41 00 00 sw (r2+0),r1 if ( _Thread_Executing->is_preemptible || 8008c4c: 40 81 00 75 lbu r1,(r4+117) 8008c50: 5c 20 00 02 bne r1,r0,8008c58 <_Thread_Clear_state+0xb4> 8008c54: 5c a1 00 05 bne r5,r1,8008c68 <_Thread_Clear_state+0xc4> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 8008c58: 78 01 08 01 mvhi r1,0x801 8008c5c: 38 21 c8 f8 ori r1,r1,0xc8f8 8008c60: 34 02 00 01 mvi r2,1 8008c64: 30 22 00 00 sb (r1+0),r2 } } } _ISR_Enable( level ); 8008c68: d0 03 00 00 wcsr IE,r3 } 8008c6c: c3 a0 00 00 ret =============================================================================== 0800bb58 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 800bb58: 37 9c ff f8 addi sp,sp,-8 800bb5c: 5b 9d 00 04 sw (sp+4),ra Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 800bb60: 37 82 00 08 addi r2,sp,8 800bb64: f8 00 00 a2 calli 800bdec <_Thread_Get> switch ( location ) { 800bb68: 2b 82 00 08 lw r2,(sp+8) 800bb6c: 5c 40 00 09 bne r2,r0,800bb90 <_Thread_Delay_ended+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 800bb70: 78 02 10 00 mvhi r2,0x1000 800bb74: 38 42 00 18 ori r2,r2,0x18 800bb78: fb ff ff 4e calli 800b8b0 <_Thread_Clear_state> 800bb7c: 78 01 08 02 mvhi r1,0x802 800bb80: 38 21 99 bc ori r1,r1,0x99bc 800bb84: 28 22 00 00 lw r2,(r1+0) 800bb88: 34 42 ff ff addi r2,r2,-1 800bb8c: 58 22 00 00 sw (r1+0),r2 | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 800bb90: 2b 9d 00 04 lw ra,(sp+4) 800bb94: 37 9c 00 08 addi sp,sp,8 800bb98: c3 a0 00 00 ret =============================================================================== 080040c8 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 80040c8: 37 9c ff b0 addi sp,sp,-80 80040cc: 5b 8b 00 40 sw (sp+64),r11 80040d0: 5b 8c 00 3c sw (sp+60),r12 80040d4: 5b 8d 00 38 sw (sp+56),r13 80040d8: 5b 8e 00 34 sw (sp+52),r14 80040dc: 5b 8f 00 30 sw (sp+48),r15 80040e0: 5b 90 00 2c sw (sp+44),r16 80040e4: 5b 91 00 28 sw (sp+40),r17 80040e8: 5b 92 00 24 sw (sp+36),r18 80040ec: 5b 93 00 20 sw (sp+32),r19 80040f0: 5b 94 00 1c sw (sp+28),r20 80040f4: 5b 95 00 18 sw (sp+24),r21 80040f8: 5b 96 00 14 sw (sp+20),r22 80040fc: 5b 97 00 10 sw (sp+16),r23 8004100: 5b 98 00 0c sw (sp+12),r24 8004104: 5b 99 00 08 sw (sp+8),r25 8004108: 5b 9d 00 04 sw (sp+4),ra Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 800410c: 78 01 08 01 mvhi r1,0x801 8004110: 38 21 c8 e8 ori r1,r1,0xc8e8 8004114: 28 2b 00 00 lw r11,(r1+0) _ISR_Disable( level ); 8004118: 90 00 20 00 rcsr r4,IE 800411c: 34 01 ff fe mvi r1,-2 8004120: a0 81 08 00 and r1,r4,r1 8004124: d0 01 00 00 wcsr IE,r1 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 8004128: 78 14 08 01 mvhi r20,0x801 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 800412c: 78 0f 08 01 mvhi r15,0x801 8004130: 78 0d 08 01 mvhi r13,0x801 heir = _Thread_Heir; 8004134: 78 12 08 01 mvhi r18,0x801 _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; _Thread_Executing = heir; 8004138: 78 0e 08 01 mvhi r14,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; 800413c: 78 11 08 01 mvhi r17,0x801 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 8004140: 78 10 08 01 mvhi r16,0x801 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 8004144: ba 80 98 00 mv r19,r20 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 8004148: 39 ef c8 f8 ori r15,r15,0xc8f8 800414c: 39 ad c8 2c ori r13,r13,0xc82c heir = _Thread_Heir; 8004150: 3a 52 c8 b8 ori r18,r18,0xc8b8 _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; _Thread_Executing = heir; 8004154: 39 ce c8 e8 ori r14,r14,0xc8e8 #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; 8004158: 3a 31 c7 bc ori r17,r17,0xc7bc #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 800415c: 3a 10 c8 b4 ori r16,r16,0xc8b4 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 8004160: 34 19 00 00 mvi r25,0 heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 8004164: 34 17 00 01 mvi r23,1 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 8004168: 37 96 00 4c addi r22,sp,76 _Timestamp_Subtract( 800416c: 37 95 00 44 addi r21,sp,68 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 8004170: 3a 73 c8 f0 ori r19,r19,0xc8f0 #endif #endif executing = _Thread_Executing; _ISR_Disable( level ); 8004174: 34 18 ff fe mvi r24,-2 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 8004178: e0 00 00 28 bi 8004218 <_Thread_Dispatch+0x150> heir = _Thread_Heir; 800417c: 2a 4c 00 00 lw r12,(r18+0) _Thread_Dispatch_disable_level = 1; 8004180: 59 b7 00 00 sw (r13+0),r23 _Context_Switch_necessary = false; 8004184: 31 f9 00 00 sb (r15+0),r25 _Thread_Executing = heir; #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 8004188: 29 81 00 7c lw r1,(r12+124) _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; _Thread_Executing = heir; 800418c: 59 cc 00 00 sw (r14+0),r12 #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 ) 8004190: 5c 37 00 03 bne r1,r23,800419c <_Thread_Dispatch+0xd4> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 8004194: 2a 21 00 00 lw r1,(r17+0) 8004198: 59 81 00 78 sw (r12+120),r1 _ISR_Enable( level ); 800419c: d0 04 00 00 wcsr IE,r4 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 80041a0: ba c0 08 00 mv r1,r22 80041a4: f8 00 10 90 calli 80083e4 <_TOD_Get_uptime> _Timestamp_Subtract( 80041a8: ba 80 08 00 mv r1,r20 80041ac: ba a0 18 00 mv r3,r21 80041b0: 38 21 c8 f0 ori r1,r1,0xc8f0 80041b4: ba c0 10 00 mv r2,r22 80041b8: f8 00 04 02 calli 80051c0 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 80041bc: ba a0 10 00 mv r2,r21 80041c0: 35 61 00 84 addi r1,r11,132 80041c4: f8 00 03 e8 calli 8005164 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 80041c8: 2b 83 00 4c lw r3,(sp+76) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 80041cc: 2a 04 00 00 lw r4,(r16+0) executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); 80041d0: b9 60 08 00 mv r1,r11 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 80041d4: 5a 63 00 00 sw (r19+0),r3 80041d8: 2b 83 00 50 lw r3,(sp+80) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); 80041dc: b9 80 10 00 mv r2,r12 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 80041e0: 5a 63 00 04 sw (r19+4),r3 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 80041e4: 44 80 00 05 be r4,r0,80041f8 <_Thread_Dispatch+0x130> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 80041e8: 28 83 00 00 lw r3,(r4+0) 80041ec: 59 63 01 20 sw (r11+288),r3 *_Thread_libc_reent = heir->libc_reent; 80041f0: 29 83 01 20 lw r3,(r12+288) 80041f4: 58 83 00 00 sw (r4+0),r3 } _User_extensions_Thread_switch( executing, heir ); 80041f8: f8 00 04 dc calli 8005568 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 80041fc: 35 61 00 cc addi r1,r11,204 8004200: 35 82 00 cc addi r2,r12,204 8004204: f8 00 05 f1 calli 80059c8 <_CPU_Context_switch> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 8004208: 29 cb 00 00 lw r11,(r14+0) _ISR_Disable( level ); 800420c: 90 00 20 00 rcsr r4,IE 8004210: a0 98 08 00 and r1,r4,r24 8004214: d0 01 00 00 wcsr IE,r1 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 8004218: 41 e5 00 00 lbu r5,(r15+0) 800421c: 20 a5 00 ff andi r5,r5,0xff 8004220: 5c a0 ff d7 bne r5,r0,800417c <_Thread_Dispatch+0xb4> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 8004224: 59 a5 00 00 sw (r13+0),r5 _ISR_Enable( level ); 8004228: d0 04 00 00 wcsr IE,r4 if ( _Thread_Do_post_task_switch_extension || 800422c: 78 01 08 01 mvhi r1,0x801 8004230: 38 21 c8 cc ori r1,r1,0xc8cc 8004234: 28 21 00 00 lw r1,(r1+0) 8004238: 5c 20 00 03 bne r1,r0,8004244 <_Thread_Dispatch+0x17c> <== NEVER TAKEN executing->do_post_task_switch_extension ) { 800423c: 41 62 00 74 lbu r2,(r11+116) 8004240: 44 41 00 04 be r2,r1,8004250 <_Thread_Dispatch+0x188> executing->do_post_task_switch_extension = false; 8004244: 34 01 00 00 mvi r1,0 8004248: 31 61 00 74 sb (r11+116),r1 _API_extensions_Run_postswitch(); 800424c: fb ff f9 95 calli 80028a0 <_API_extensions_Run_postswitch> } } 8004250: 2b 9d 00 04 lw ra,(sp+4) 8004254: 2b 8b 00 40 lw r11,(sp+64) 8004258: 2b 8c 00 3c lw r12,(sp+60) 800425c: 2b 8d 00 38 lw r13,(sp+56) 8004260: 2b 8e 00 34 lw r14,(sp+52) 8004264: 2b 8f 00 30 lw r15,(sp+48) 8004268: 2b 90 00 2c lw r16,(sp+44) 800426c: 2b 91 00 28 lw r17,(sp+40) 8004270: 2b 92 00 24 lw r18,(sp+36) 8004274: 2b 93 00 20 lw r19,(sp+32) 8004278: 2b 94 00 1c lw r20,(sp+28) 800427c: 2b 95 00 18 lw r21,(sp+24) 8004280: 2b 96 00 14 lw r22,(sp+20) 8004284: 2b 97 00 10 lw r23,(sp+16) 8004288: 2b 98 00 0c lw r24,(sp+12) 800428c: 2b 99 00 08 lw r25,(sp+8) 8004290: 37 9c 00 50 addi sp,sp,80 8004294: c3 a0 00 00 ret =============================================================================== 0800a8bc <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 800a8bc: 78 01 08 01 mvhi r1,0x801 800a8c0: 38 21 c8 e8 ori r1,r1,0xc8e8 800a8c4: 28 21 00 00 lw r1,(r1+0) if ( !_States_Is_ready( executing->current_state ) || 800a8c8: 28 22 00 10 lw r2,(r1+16) 800a8cc: 5c 40 00 07 bne r2,r0,800a8e8 <_Thread_Evaluate_mode+0x2c> <== NEVER TAKEN 800a8d0: 78 02 08 01 mvhi r2,0x801 800a8d4: 38 42 c8 b8 ori r2,r2,0xc8b8 800a8d8: 28 42 00 00 lw r2,(r2+0) 800a8dc: 44 22 00 09 be r1,r2,800a900 <_Thread_Evaluate_mode+0x44> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 800a8e0: 40 21 00 75 lbu r1,(r1+117) 800a8e4: 44 20 00 07 be r1,r0,800a900 <_Thread_Evaluate_mode+0x44> <== NEVER TAKEN _Context_Switch_necessary = true; 800a8e8: 78 01 08 01 mvhi r1,0x801 800a8ec: 38 21 c8 f8 ori r1,r1,0xc8f8 800a8f0: 34 02 00 01 mvi r2,1 800a8f4: 30 22 00 00 sb (r1+0),r2 800a8f8: b8 40 08 00 mv r1,r2 return true; 800a8fc: c3 a0 00 00 ret 800a900: 34 01 00 00 mvi r1,0 } return false; } 800a904: c3 a0 00 00 ret =============================================================================== 0800a908 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 800a908: 37 9c ff f4 addi sp,sp,-12 800a90c: 5b 8b 00 0c sw (sp+12),r11 800a910: 5b 8c 00 08 sw (sp+8),r12 800a914: 5b 9d 00 04 sw (sp+4),ra #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 800a918: 78 01 08 01 mvhi r1,0x801 800a91c: 38 21 c8 e8 ori r1,r1,0xc8e8 800a920: 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; 800a924: 29 61 00 b8 lw r1,(r11+184) _ISR_Set_level(level); 800a928: 64 21 00 00 cmpei r1,r1,0 800a92c: d0 01 00 00 wcsr IE,r1 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 800a930: 78 02 08 01 mvhi r2,0x801 800a934: 38 42 c6 30 ori r2,r2,0xc630 800a938: 40 4c 00 00 lbu r12,(r2+0) doneConstructors = 1; 800a93c: 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 ); 800a940: 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; 800a944: 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 ); 800a948: fb ff ea 65 calli 80052dc <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 800a94c: fb ff e6 53 calli 8004298 <_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) */ { 800a950: 5d 80 00 02 bne r12,r0,800a958 <_Thread_Handler+0x50> INIT_NAME (); 800a954: fb ff d5 ab calli 8000000 } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 800a958: 29 61 00 a0 lw r1,(r11+160) 800a95c: 5c 20 00 05 bne r1,r0,800a970 <_Thread_Handler+0x68> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 800a960: 29 62 00 9c lw r2,(r11+156) 800a964: 29 61 00 a8 lw r1,(r11+168) 800a968: d8 40 00 00 call r2 INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 800a96c: 59 61 00 28 sw (r11+40),r1 * 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 ); 800a970: b9 60 08 00 mv r1,r11 800a974: fb ff ea 71 calli 8005338 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 800a978: 34 01 00 00 mvi r1,0 800a97c: 34 02 00 01 mvi r2,1 800a980: 34 03 00 06 mvi r3,6 800a984: fb ff e2 86 calli 800339c <_Internal_error_Occurred> =============================================================================== 080045ac <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 80045ac: 37 9c ff f0 addi sp,sp,-16 80045b0: 5b 8b 00 10 sw (sp+16),r11 80045b4: 5b 8c 00 0c sw (sp+12),r12 80045b8: 5b 8d 00 08 sw (sp+8),r13 80045bc: 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; 80045c0: 78 01 08 01 mvhi r1,0x801 80045c4: 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) 80045c8: 28 22 00 20 lw r2,(r1+32) 80045cc: 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; 80045d0: 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) 80045d4: 64 42 00 00 cmpei r2,r2,0 80045d8: 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; 80045dc: 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) 80045e0: 99 22 48 00 xor r9,r9,r2 80045e4: b9 20 58 00 mv r11,r9 80045e8: 45 20 00 05 be r9,r0,80045fc <_Thread_Handler_initialization+0x50><== ALWAYS TAKEN == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 80045ec: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80045f0: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80045f4: 34 03 00 0f mvi r3,15 <== NOT EXECUTED 80045f8: fb ff fb 69 calli 800339c <_Internal_error_Occurred> <== NOT EXECUTED _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 80045fc: 78 0c 08 01 mvhi r12,0x801 8004600: 39 8c c0 c0 ori r12,r12,0xc0c0 8004604: 41 81 00 00 lbu r1,(r12+0) INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 8004608: 78 08 08 01 mvhi r8,0x801 _Thread_Executing = NULL; 800460c: 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( 8004610: 34 21 00 01 addi r1,r1,1 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; 8004614: 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; 8004618: 78 03 08 01 mvhi r3,0x801 _Thread_Maximum_extensions = maximum_extensions; 800461c: 78 07 08 01 mvhi r7,0x801 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 8004620: 78 06 08 01 mvhi r6,0x801 _Thread_Heir = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 8004624: 38 63 c8 cc ori r3,r3,0xc8cc _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; 8004628: 38 c6 c7 bc ori r6,r6,0xc7bc INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 800462c: 39 08 c8 f8 ori r8,r8,0xc8f8 _Thread_Executing = NULL; 8004630: 38 a5 c8 e8 ori r5,r5,0xc8e8 _Thread_Heir = NULL; 8004634: 38 84 c8 b8 ori r4,r4,0xc8b8 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 8004638: 38 e7 c8 c8 ori r7,r7,0xc8c8 _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 800463c: 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; 8004640: 58 ca 00 00 sw (r6+0),r10 _Thread_Heir = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 8004644: 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( 8004648: b4 41 08 00 add r1,r2,r1 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 800464c: 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( 8004650: 34 02 00 02 mvi r2,2 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 8004654: 58 ed 00 00 sw (r7+0),r13 true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; 8004658: 58 a9 00 00 sw (r5+0),r9 _Thread_Heir = NULL; 800465c: 58 89 00 00 sw (r4+0),r9 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004660: fb ff ee e4 calli 80001f0 <__ashlsi3> 8004664: f8 00 04 99 calli 80058c8 <_Workspace_Allocate_or_fatal_error> 8004668: 78 02 08 01 mvhi r2,0x801 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 800466c: 41 83 00 00 lbu r3,(r12+0) _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004670: 38 42 c7 b8 ori r2,r2,0xc7b8 8004674: 58 41 00 00 sw (r2+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; 8004678: 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); 800467c: 34 22 00 04 addi r2,r1,4 8004680: 58 22 00 00 sw (r1+0),r2 the_chain->permanent_null = NULL; 8004684: 58 26 00 04 sw (r1+4),r6 the_chain->last = _Chain_Head(the_chain); 8004688: 58 21 00 08 sw (r1+8),r1 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 800468c: 35 6b 00 01 addi r11,r11,1 8004690: 34 21 00 0c addi r1,r1,12 8004694: 50 6b ff fa bgeu r3,r11,800467c <_Thread_Handler_initialization+0xd0> /* * Initialize this class of objects. */ _Objects_Initialize_information( 8004698: 34 02 00 01 mvi r2,1 800469c: 78 01 08 01 mvhi r1,0x801 80046a0: 38 21 c9 88 ori r1,r1,0xc988 80046a4: b8 40 18 00 mv r3,r2 80046a8: b8 40 20 00 mv r4,r2 80046ac: 34 05 01 38 mvi r5,312 80046b0: 34 07 00 08 mvi r7,8 80046b4: fb ff fc cf calli 80039f0 <_Objects_Initialize_information> false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 80046b8: 2b 9d 00 04 lw ra,(sp+4) 80046bc: 2b 8b 00 10 lw r11,(sp+16) 80046c0: 2b 8c 00 0c lw r12,(sp+12) 80046c4: 2b 8d 00 08 lw r13,(sp+8) 80046c8: 37 9c 00 10 addi sp,sp,16 80046cc: c3 a0 00 00 ret =============================================================================== 080043bc <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 80043bc: 37 9c ff dc addi sp,sp,-36 80043c0: 5b 8b 00 24 sw (sp+36),r11 80043c4: 5b 8c 00 20 sw (sp+32),r12 80043c8: 5b 8d 00 1c sw (sp+28),r13 80043cc: 5b 8e 00 18 sw (sp+24),r14 80043d0: 5b 8f 00 14 sw (sp+20),r15 80043d4: 5b 90 00 10 sw (sp+16),r16 80043d8: 5b 91 00 0c sw (sp+12),r17 80043dc: 5b 92 00 08 sw (sp+8),r18 80043e0: 5b 9d 00 04 sw (sp+4),ra /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 80043e4: 34 0c 00 00 mvi r12,0 80043e8: 58 4c 01 24 sw (r2+292),r12 80043ec: 58 4c 01 28 sw (r2+296),r12 80043f0: 58 4c 01 2c sw (r2+300),r12 extensions_area = NULL; the_thread->libc_reent = NULL; 80043f4: 58 4c 01 20 sw (r2+288),r12 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 80043f8: b8 40 58 00 mv r11,r2 80043fc: b8 20 80 00 mv r16,r1 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 8004400: b8 40 08 00 mv r1,r2 8004404: b8 80 10 00 mv r2,r4 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 8004408: b8 80 68 00 mv r13,r4 800440c: b8 c0 70 00 mv r14,r6 8004410: b9 00 88 00 mv r17,r8 8004414: 20 f2 00 ff andi r18,r7,0xff /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 8004418: f8 00 02 e1 calli 8004f9c <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 800441c: f5 a1 20 00 cmpgu r4,r13,r1 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 8004420: b8 20 28 00 mv r5,r1 if ( !actual_stack_size || actual_stack_size < stack_size ) 8004424: e4 2c 08 00 cmpe r1,r1,r12 8004428: b9 80 18 00 mv r3,r12 800442c: b8 81 20 00 or r4,r4,r1 8004430: 5c 8c 00 53 bne r4,r12,800457c <_Thread_Initialize+0x1c0> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 8004434: 78 02 08 01 mvhi r2,0x801 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 8004438: 59 64 00 68 sw (r11+104),r4 800443c: 38 42 c8 c8 ori r2,r2,0xc8c8 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 8004440: 29 61 00 c8 lw r1,(r11+200) 8004444: 28 43 00 00 lw r3,(r2+0) the_stack->size = size; 8004448: 59 65 00 c0 sw (r11+192),r5 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 800444c: 59 61 00 c4 sw (r11+196),r1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 8004450: 59 64 00 50 sw (r11+80),r4 the_watchdog->routine = routine; 8004454: 59 64 00 64 sw (r11+100),r4 the_watchdog->id = id; the_watchdog->user_data = user_data; 8004458: 59 64 00 6c sw (r11+108),r4 800445c: b8 60 60 00 mv r12,r3 8004460: 44 64 00 07 be r3,r4,800447c <_Thread_Initialize+0xc0> extensions_area = _Workspace_Allocate( 8004464: 34 61 00 01 addi r1,r3,1 8004468: 34 02 00 02 mvi r2,2 800446c: fb ff ef 61 calli 80001f0 <__ashlsi3> 8004470: f8 00 05 25 calli 8005904 <_Workspace_Allocate> 8004474: b8 20 60 00 mv r12,r1 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 8004478: 44 20 00 2f be r1,r0,8004534 <_Thread_Initialize+0x178> goto failed; } the_thread->extensions = (void **) extensions_area; 800447c: 59 6c 01 30 sw (r11+304),r12 * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 8004480: 45 80 00 0e be r12,r0,80044b8 <_Thread_Initialize+0xfc> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 8004484: 78 02 08 01 mvhi r2,0x801 8004488: 38 42 c8 c8 ori r2,r2,0xc8c8 800448c: 34 03 00 00 mvi r3,0 8004490: 28 44 00 00 lw r4,(r2+0) the_thread->extensions[i] = NULL; 8004494: b8 60 08 00 mv r1,r3 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 8004498: b8 60 10 00 mv r2,r3 800449c: e0 00 00 06 bi 80044b4 <_Thread_Initialize+0xf8> the_thread->extensions[i] = NULL; 80044a0: 29 65 01 30 lw r5,(r11+304) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 80044a4: 34 42 00 01 addi r2,r2,1 the_thread->extensions[i] = NULL; 80044a8: b4 a3 28 00 add r5,r5,r3 80044ac: 58 a1 00 00 sw (r5+0),r1 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 80044b0: 34 63 00 04 addi r3,r3,4 80044b4: 50 82 ff fb bgeu r4,r2,80044a0 <_Thread_Initialize+0xe4> * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 80044b8: 2b 81 00 28 lw r1,(sp+40) } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 80044bc: 34 0d 00 00 mvi r13,0 #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 80044c0: 34 0f 00 01 mvi r15,1 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 80044c4: 59 61 00 b4 sw (r11+180),r1 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 80044c8: 2b 81 00 2c lw r1,(sp+44) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 80044cc: b9 c0 10 00 mv r2,r14 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 80044d0: 59 6e 00 18 sw (r11+24),r14 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 80044d4: 59 61 00 b8 sw (r11+184),r1 the_thread->resource_count = 0; #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; 80044d8: 59 6e 00 bc sw (r11+188),r14 _Thread_Set_priority( the_thread, priority ); 80044dc: b9 60 08 00 mv r1,r11 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 80044e0: 31 72 00 ac sb (r11+172),r18 the_thread->Start.budget_algorithm = budget_algorithm; 80044e4: 59 71 00 b0 sw (r11+176),r17 #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 80044e8: 59 6f 00 10 sw (r11+16),r15 the_thread->Wait.queue = NULL; 80044ec: 59 6d 00 44 sw (r11+68),r13 the_thread->resource_count = 0; 80044f0: 59 6d 00 1c sw (r11+28),r13 #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 80044f4: f8 00 01 e2 calli 8004c7c <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 80044f8: 29 61 00 08 lw r1,(r11+8) 80044fc: 2a 0e 00 1c lw r14,(r16+28) 8004500: 34 02 00 02 mvi r2,2 /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 8004504: 59 6d 00 88 sw (r11+136),r13 8004508: 59 6d 00 84 sw (r11+132),r13 800450c: 20 21 ff ff andi r1,r1,0xffff 8004510: fb ff ef 38 calli 80001f0 <__ashlsi3> 8004514: b5 c1 08 00 add r1,r14,r1 8004518: 58 2b 00 00 sw (r1+0),r11 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 800451c: 2b 81 00 30 lw r1,(sp+48) 8004520: 59 61 00 0c sw (r11+12),r1 * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 8004524: b9 60 08 00 mv r1,r11 8004528: f8 00 03 ba calli 8005410 <_User_extensions_Thread_create> if ( extension_status ) 800452c: b9 e0 18 00 mv r3,r15 8004530: 5c 2d 00 13 bne r1,r13,800457c <_Thread_Initialize+0x1c0> return true; failed: if ( the_thread->libc_reent ) 8004534: 29 61 01 20 lw r1,(r11+288) 8004538: 44 20 00 02 be r1,r0,8004540 <_Thread_Initialize+0x184> _Workspace_Free( the_thread->libc_reent ); 800453c: f8 00 04 fd calli 8005930 <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 8004540: 29 61 01 24 lw r1,(r11+292) 8004544: 44 20 00 02 be r1,r0,800454c <_Thread_Initialize+0x190> _Workspace_Free( the_thread->API_Extensions[i] ); 8004548: f8 00 04 fa calli 8005930 <_Workspace_Free> failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 800454c: 29 61 01 28 lw r1,(r11+296) 8004550: 44 20 00 02 be r1,r0,8004558 <_Thread_Initialize+0x19c> <== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 8004554: f8 00 04 f7 calli 8005930 <_Workspace_Free> <== NOT EXECUTED failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 8004558: 29 61 01 2c lw r1,(r11+300) 800455c: 44 20 00 02 be r1,r0,8004564 <_Thread_Initialize+0x1a8> <== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 8004560: f8 00 04 f4 calli 8005930 <_Workspace_Free> <== NOT EXECUTED if ( extensions_area ) 8004564: 45 80 00 03 be r12,r0,8004570 <_Thread_Initialize+0x1b4> (void) _Workspace_Free( extensions_area ); 8004568: b9 80 08 00 mv r1,r12 800456c: f8 00 04 f1 calli 8005930 <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 8004570: b9 60 08 00 mv r1,r11 8004574: f8 00 02 a7 calli 8005010 <_Thread_Stack_Free> 8004578: 34 03 00 00 mvi r3,0 return false; } 800457c: b8 60 08 00 mv r1,r3 8004580: 2b 9d 00 04 lw ra,(sp+4) 8004584: 2b 8b 00 24 lw r11,(sp+36) 8004588: 2b 8c 00 20 lw r12,(sp+32) 800458c: 2b 8d 00 1c lw r13,(sp+28) 8004590: 2b 8e 00 18 lw r14,(sp+24) 8004594: 2b 8f 00 14 lw r15,(sp+20) 8004598: 2b 90 00 10 lw r16,(sp+16) 800459c: 2b 91 00 0c lw r17,(sp+12) 80045a0: 2b 92 00 08 lw r18,(sp+8) 80045a4: 37 9c 00 24 addi sp,sp,36 80045a8: c3 a0 00 00 ret =============================================================================== 08009114 <_Thread_Reset_timeslice>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 8009114: 78 01 08 01 mvhi r1,0x801 8009118: 38 21 c8 e8 ori r1,r1,0xc8e8 800911c: 28 21 00 00 lw r1,(r1+0) ready = executing->ready; 8009120: 28 22 00 8c lw r2,(r1+140) _ISR_Disable( level ); 8009124: 90 00 20 00 rcsr r4,IE 8009128: 34 03 ff fe mvi r3,-2 800912c: a0 83 18 00 and r3,r4,r3 8009130: d0 03 00 00 wcsr IE,r3 if ( _Chain_Has_only_one_node( ready ) ) { 8009134: 28 46 00 00 lw r6,(r2+0) 8009138: 28 45 00 08 lw r5,(r2+8) 800913c: 5c c5 00 03 bne r6,r5,8009148 <_Thread_Reset_timeslice+0x34> _ISR_Enable( level ); 8009140: d0 04 00 00 wcsr IE,r4 return; 8009144: c3 a0 00 00 ret ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 8009148: 28 25 00 00 lw r5,(r1+0) previous = the_node->previous; 800914c: 28 26 00 04 lw r6,(r1+4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8009150: 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; 8009154: 58 c5 00 00 sw (r6+0),r5 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8009158: 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; 800915c: 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; 8009160: 28 45 00 08 lw r5,(r2+8) the_chain->last = the_node; 8009164: 58 41 00 08 sw (r2+8),r1 old_last_node->next = the_node; the_node->previous = old_last_node; 8009168: 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; 800916c: 58 a1 00 00 sw (r5+0),r1 } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 8009170: d0 04 00 00 wcsr IE,r4 8009174: d0 03 00 00 wcsr IE,r3 if ( _Thread_Is_heir( executing ) ) 8009178: 78 03 08 01 mvhi r3,0x801 800917c: 38 63 c8 b8 ori r3,r3,0xc8b8 8009180: 28 65 00 00 lw r5,(r3+0) 8009184: 5c 25 00 03 bne r1,r5,8009190 <_Thread_Reset_timeslice+0x7c><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 8009188: 28 42 00 00 lw r2,(r2+0) 800918c: 58 62 00 00 sw (r3+0),r2 _Context_Switch_necessary = true; 8009190: 78 01 08 01 mvhi r1,0x801 8009194: 38 21 c8 f8 ori r1,r1,0xc8f8 8009198: 34 02 00 01 mvi r2,1 800919c: 30 22 00 00 sb (r1+0),r2 _ISR_Enable( level ); 80091a0: d0 04 00 00 wcsr IE,r4 80091a4: c3 a0 00 00 ret =============================================================================== 08005c68 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 8005c68: 37 9c ff f0 addi sp,sp,-16 8005c6c: 5b 8b 00 08 sw (sp+8),r11 8005c70: 5b 9d 00 04 sw (sp+4),ra if ( !_States_Is_dormant( the_thread->current_state ) ) { 8005c74: 28 25 00 10 lw r5,(r1+16) 8005c78: 34 04 00 00 mvi r4,0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 8005c7c: b8 20 58 00 mv r11,r1 if ( !_States_Is_dormant( the_thread->current_state ) ) { 8005c80: 20 a5 00 01 andi r5,r5,0x1 8005c84: 5c a4 00 16 bne r5,r4,8005cdc <_Thread_Restart+0x74> _Thread_Set_transient( the_thread ); 8005c88: 5b 82 00 10 sw (sp+16),r2 8005c8c: 5b 83 00 0c sw (sp+12),r3 8005c90: f8 00 00 bb calli 8005f7c <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 8005c94: 2b 82 00 10 lw r2,(sp+16) 8005c98: 2b 83 00 0c lw r3,(sp+12) 8005c9c: b9 60 08 00 mv r1,r11 8005ca0: f8 00 11 a6 calli 800a338 <_Thread_Reset> _Thread_Load_environment( the_thread ); 8005ca4: b9 60 08 00 mv r1,r11 8005ca8: f8 00 10 7b calli 8009e94 <_Thread_Load_environment> _Thread_Ready( the_thread ); 8005cac: b9 60 08 00 mv r1,r11 8005cb0: f8 00 11 3e calli 800a1a8 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 8005cb4: b9 60 08 00 mv r1,r11 8005cb8: f8 00 02 53 calli 8006604 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 8005cbc: 78 01 08 02 mvhi r1,0x802 8005cc0: 38 21 09 40 ori r1,r1,0x940 8005cc4: 28 21 00 00 lw r1,(r1+0) 8005cc8: 34 04 00 01 mvi r4,1 8005ccc: 5d 61 00 04 bne r11,r1,8005cdc <_Thread_Restart+0x74> #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 ); 8005cd0: 35 61 00 cc addi r1,r11,204 8005cd4: f8 00 03 d1 calli 8006c18 <_CPU_Context_restore> 8005cd8: 34 04 00 01 mvi r4,1 <== NOT EXECUTED return true; } return false; } 8005cdc: b8 80 08 00 mv r1,r4 8005ce0: 2b 9d 00 04 lw ra,(sp+4) 8005ce4: 2b 8b 00 08 lw r11,(sp+8) 8005ce8: 37 9c 00 10 addi sp,sp,16 8005cec: c3 a0 00 00 ret =============================================================================== 0800a198 <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 800a198: 90 00 18 00 rcsr r3,IE 800a19c: 34 05 ff fe mvi r5,-2 800a1a0: a0 65 28 00 and r5,r3,r5 800a1a4: d0 05 00 00 wcsr IE,r5 _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 800a1a8: 28 22 00 10 lw r2,(r1+16) if ( current_state & STATES_SUSPENDED ) { 800a1ac: 20 44 00 02 andi r4,r2,0x2 800a1b0: 44 80 00 2b be r4,r0,800a25c <_Thread_Resume+0xc4> <== NEVER TAKEN 800a1b4: 34 04 ff fd mvi r4,-3 800a1b8: a0 44 10 00 and r2,r2,r4 current_state = 800a1bc: 58 22 00 10 sw (r1+16),r2 the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 800a1c0: 5c 40 00 27 bne r2,r0,800a25c <_Thread_Resume+0xc4> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 800a1c4: 28 26 00 90 lw r6,(r1+144) 800a1c8: 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); 800a1cc: 28 24 00 8c lw r4,(r1+140) 800a1d0: 2c c8 00 00 lhu r8,(r6+0) _Priority_Major_bit_map |= the_priority_map->ready_major; 800a1d4: 78 02 08 02 mvhi r2,0x802 800a1d8: 38 42 39 bc ori r2,r2,0x39bc RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 800a1dc: b9 07 38 00 or r7,r8,r7 800a1e0: 0c c7 00 00 sh (r6+0),r7 _Priority_Major_bit_map |= the_priority_map->ready_major; 800a1e4: 2c 47 00 00 lhu r7,(r2+0) 800a1e8: 2c 28 00 94 lhu r8,(r1+148) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 800a1ec: 34 86 00 04 addi r6,r4,4 800a1f0: 58 26 00 00 sw (r1+0),r6 old_last_node = the_chain->last; 800a1f4: 28 86 00 08 lw r6,(r4+8) 800a1f8: b9 07 38 00 or r7,r8,r7 the_chain->last = the_node; 800a1fc: 58 81 00 08 sw (r4+8),r1 800a200: 20 e4 ff ff andi r4,r7,0xffff 800a204: 0c 44 00 00 sh (r2+0),r4 old_last_node->next = the_node; the_node->previous = old_last_node; 800a208: 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; 800a20c: 58 c1 00 00 sw (r6+0),r1 _ISR_Flash( level ); 800a210: d0 03 00 00 wcsr IE,r3 800a214: d0 05 00 00 wcsr IE,r5 if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 800a218: 78 02 08 02 mvhi r2,0x802 800a21c: 38 42 39 98 ori r2,r2,0x3998 800a220: 28 44 00 00 lw r4,(r2+0) 800a224: 28 25 00 14 lw r5,(r1+20) 800a228: 28 84 00 14 lw r4,(r4+20) 800a22c: 50 a4 00 0c bgeu r5,r4,800a25c <_Thread_Resume+0xc4> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 800a230: 78 04 08 02 mvhi r4,0x802 800a234: 38 84 39 c8 ori r4,r4,0x39c8 800a238: 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; 800a23c: 58 41 00 00 sw (r2+0),r1 if ( _Thread_Executing->is_preemptible || 800a240: 40 81 00 75 lbu r1,(r4+117) 800a244: 5c 20 00 02 bne r1,r0,800a24c <_Thread_Resume+0xb4> 800a248: 5c a1 00 05 bne r5,r1,800a25c <_Thread_Resume+0xc4> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 800a24c: 78 01 08 02 mvhi r1,0x802 800a250: 38 21 39 d8 ori r1,r1,0x39d8 800a254: 34 02 00 01 mvi r2,1 800a258: 30 22 00 00 sb (r1+0),r2 } } } _ISR_Enable( level ); 800a25c: d0 03 00 00 wcsr IE,r3 } 800a260: c3 a0 00 00 ret =============================================================================== 0800ccc8 <_Thread_Yield_processor>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 800ccc8: 78 01 08 02 mvhi r1,0x802 800cccc: 38 21 9a 78 ori r1,r1,0x9a78 800ccd0: 28 21 00 00 lw r1,(r1+0) ready = executing->ready; 800ccd4: 28 22 00 8c lw r2,(r1+140) _ISR_Disable( level ); 800ccd8: 90 00 20 00 rcsr r4,IE 800ccdc: 34 05 ff fe mvi r5,-2 800cce0: a0 85 28 00 and r5,r4,r5 800cce4: d0 05 00 00 wcsr IE,r5 if ( !_Chain_Has_only_one_node( ready ) ) { 800cce8: 28 47 00 00 lw r7,(r2+0) 800ccec: 28 46 00 08 lw r6,(r2+8) 800ccf0: 78 03 08 02 mvhi r3,0x802 800ccf4: 38 63 9a 48 ori r3,r3,0x9a48 800ccf8: 44 e6 00 12 be r7,r6,800cd40 <_Thread_Yield_processor+0x78> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 800ccfc: 28 26 00 00 lw r6,(r1+0) previous = the_node->previous; 800cd00: 28 27 00 04 lw r7,(r1+4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 800cd04: 34 48 00 04 addi r8,r2,4 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 800cd08: 58 e6 00 00 sw (r7+0),r6 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 800cd0c: 58 28 00 00 sw (r1+0),r8 Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 800cd10: 58 c7 00 04 sw (r6+4),r7 ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 800cd14: 28 46 00 08 lw r6,(r2+8) the_chain->last = the_node; 800cd18: 58 41 00 08 sw (r2+8),r1 old_last_node->next = the_node; the_node->previous = old_last_node; 800cd1c: 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; 800cd20: 58 c1 00 00 sw (r6+0),r1 _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 800cd24: d0 04 00 00 wcsr IE,r4 800cd28: d0 05 00 00 wcsr IE,r5 if ( _Thread_Is_heir( executing ) ) 800cd2c: 28 65 00 00 lw r5,(r3+0) 800cd30: 5c 25 00 06 bne r1,r5,800cd48 <_Thread_Yield_processor+0x80><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 800cd34: 28 42 00 00 lw r2,(r2+0) 800cd38: 58 62 00 00 sw (r3+0),r2 800cd3c: e0 00 00 03 bi 800cd48 <_Thread_Yield_processor+0x80> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 800cd40: 28 62 00 00 lw r2,(r3+0) 800cd44: 44 22 00 05 be r1,r2,800cd58 <_Thread_Yield_processor+0x90><== ALWAYS TAKEN _Context_Switch_necessary = true; 800cd48: 78 01 08 02 mvhi r1,0x802 800cd4c: 38 21 9a 88 ori r1,r1,0x9a88 800cd50: 34 02 00 01 mvi r2,1 800cd54: 30 22 00 00 sb (r1+0),r2 _ISR_Enable( level ); 800cd58: d0 04 00 00 wcsr IE,r4 } 800cd5c: c3 a0 00 00 ret =============================================================================== 08004950 <_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 ) { 8004950: 37 9c ff ec addi sp,sp,-20 8004954: 5b 8b 00 14 sw (sp+20),r11 8004958: 5b 8c 00 10 sw (sp+16),r12 800495c: 5b 8d 00 0c sw (sp+12),r13 8004960: 5b 8e 00 08 sw (sp+8),r14 8004964: 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; 8004968: 28 4d 00 14 lw r13,(r2+20) Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 800496c: b8 40 58 00 mv r11,r2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8004970: 34 44 00 3c addi r4,r2,60 8004974: 59 64 00 38 sw (r11+56),r4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 8004978: 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; 800497c: 34 04 00 00 mvi r4,0 8004980: b8 20 60 00 mv r12,r1 8004984: 59 64 00 3c sw (r11+60),r4 the_chain->last = _Chain_Head(the_chain); 8004988: 59 62 00 40 sw (r11+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 ]; 800498c: b9 a0 08 00 mv r1,r13 8004990: 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 ) { 8004994: 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 ]; 8004998: fb ff ee 3e calli 8000290 <__lshrsi3> 800499c: b4 21 10 00 add r2,r1,r1 80049a0: b4 41 08 00 add r1,r2,r1 80049a4: 34 02 00 02 mvi r2,2 80049a8: fb ff ee 12 calli 80001f0 <__ashlsi3> block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 80049ac: 21 a2 00 20 andi r2,r13,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 ]; 80049b0: b5 81 08 00 add r1,r12,r1 block_state = the_thread_queue->state; 80049b4: 29 87 00 38 lw r7,(r12+56) if ( _Thread_queue_Is_reverse_search( priority ) ) 80049b8: 5c 40 00 23 bne r2,r0,8004a44 <_Thread_queue_Enqueue_priority+0xf4> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 80049bc: 34 28 00 04 addi r8,r1,4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 80049c0: 34 03 ff fe mvi r3,-2 80049c4: 90 00 20 00 rcsr r4,IE 80049c8: a0 83 30 00 and r6,r4,r3 80049cc: d0 06 00 00 wcsr IE,r6 search_thread = (Thread_Control *) header->first; 80049d0: 34 05 ff ff mvi r5,-1 80049d4: 28 22 00 00 lw r2,(r1+0) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 80049d8: e0 00 00 0b bi 8004a04 <_Thread_queue_Enqueue_priority+0xb4> search_priority = search_thread->current_priority; 80049dc: 28 45 00 14 lw r5,(r2+20) if ( priority <= search_priority ) 80049e0: 50 ad 00 0a bgeu r5,r13,8004a08 <_Thread_queue_Enqueue_priority+0xb8> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 80049e4: d0 04 00 00 wcsr IE,r4 80049e8: d0 06 00 00 wcsr IE,r6 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 80049ec: 28 49 00 10 lw r9,(r2+16) 80049f0: a0 e9 48 00 and r9,r7,r9 80049f4: 5d 20 00 03 bne r9,r0,8004a00 <_Thread_queue_Enqueue_priority+0xb0><== ALWAYS TAKEN _ISR_Enable( level ); 80049f8: d0 04 00 00 wcsr IE,r4 <== NOT EXECUTED goto restart_forward_search; 80049fc: e3 ff ff f2 bi 80049c4 <_Thread_queue_Enqueue_priority+0x74><== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 8004a00: 28 42 00 00 lw r2,(r2+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 ) ) { 8004a04: 5c 48 ff f6 bne r2,r8,80049dc <_Thread_queue_Enqueue_priority+0x8c> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 8004a08: 29 83 00 30 lw r3,(r12+48) 8004a0c: 34 01 00 01 mvi r1,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; 8004a10: b8 80 38 00 mv r7,r4 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 8004a14: 5c 61 00 3b bne r3,r1,8004b00 <_Thread_queue_Enqueue_priority+0x1b0><== NEVER TAKEN THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 8004a18: 34 01 00 00 mvi r1,0 8004a1c: 59 81 00 30 sw (r12+48),r1 if ( priority == search_priority ) 8004a20: 45 a5 00 2f be r13,r5,8004adc <_Thread_queue_Enqueue_priority+0x18c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 8004a24: 28 41 00 04 lw r1,(r2+4) the_node = (Chain_Node *) the_thread; the_node->next = search_node; 8004a28: 59 62 00 00 sw (r11+0),r2 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 8004a2c: 59 6c 00 44 sw (r11+68),r12 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; 8004a30: 59 61 00 04 sw (r11+4),r1 previous_node->next = the_node; 8004a34: 58 2b 00 00 sw (r1+0),r11 search_node->previous = the_node; 8004a38: 58 4b 00 04 sw (r2+4),r11 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 8004a3c: d0 04 00 00 wcsr IE,r4 8004a40: e0 00 00 25 bi 8004ad4 <_Thread_queue_Enqueue_priority+0x184> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 8004a44: 78 04 08 01 mvhi r4,0x801 8004a48: 38 84 c0 c0 ori r4,r4,0xc0c0 _ISR_Disable( level ); 8004a4c: 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; 8004a50: 40 86 00 00 lbu r6,(r4+0) 8004a54: 34 c6 00 01 addi r6,r6,1 _ISR_Disable( level ); 8004a58: 90 00 28 00 rcsr r5,IE 8004a5c: a0 a3 40 00 and r8,r5,r3 8004a60: d0 08 00 00 wcsr IE,r8 search_thread = (Thread_Control *) header->last; 8004a64: 28 22 00 08 lw r2,(r1+8) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 8004a68: e0 00 00 0b bi 8004a94 <_Thread_queue_Enqueue_priority+0x144> search_priority = search_thread->current_priority; 8004a6c: 28 46 00 14 lw r6,(r2+20) if ( priority >= search_priority ) 8004a70: 51 a6 00 0a bgeu r13,r6,8004a98 <_Thread_queue_Enqueue_priority+0x148> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 8004a74: d0 05 00 00 wcsr IE,r5 8004a78: d0 08 00 00 wcsr IE,r8 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8004a7c: 28 49 00 10 lw r9,(r2+16) 8004a80: a0 e9 48 00 and r9,r7,r9 8004a84: 5d 20 00 03 bne r9,r0,8004a90 <_Thread_queue_Enqueue_priority+0x140><== ALWAYS TAKEN _ISR_Enable( level ); 8004a88: d0 05 00 00 wcsr IE,r5 <== NOT EXECUTED goto restart_reverse_search; 8004a8c: e3 ff ff f1 bi 8004a50 <_Thread_queue_Enqueue_priority+0x100><== NOT EXECUTED } search_thread = (Thread_Control *) 8004a90: 28 42 00 04 lw r2,(r2+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 ) ) { 8004a94: 5c 41 ff f6 bne r2,r1,8004a6c <_Thread_queue_Enqueue_priority+0x11c> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 8004a98: 29 83 00 30 lw r3,(r12+48) 8004a9c: 34 01 00 01 mvi r1,1 8004aa0: b8 a0 38 00 mv r7,r5 8004aa4: 5c 61 00 17 bne r3,r1,8004b00 <_Thread_queue_Enqueue_priority+0x1b0><== NEVER TAKEN THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 8004aa8: 34 01 00 00 mvi r1,0 8004aac: 59 81 00 30 sw (r12+48),r1 if ( priority == search_priority ) 8004ab0: b8 a0 20 00 mv r4,r5 8004ab4: 45 a6 00 0a be r13,r6,8004adc <_Thread_queue_Enqueue_priority+0x18c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 8004ab8: 28 41 00 00 lw r1,(r2+0) the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 8004abc: 59 62 00 04 sw (r11+4),r2 search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 8004ac0: 59 6c 00 44 sw (r11+68),r12 search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 8004ac4: 59 61 00 00 sw (r11+0),r1 the_node->previous = search_node; search_node->next = the_node; 8004ac8: 58 4b 00 00 sw (r2+0),r11 next_node->previous = the_node; 8004acc: 58 2b 00 04 sw (r1+4),r11 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 8004ad0: d0 05 00 00 wcsr IE,r5 8004ad4: 34 01 00 01 mvi r1,1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 8004ad8: e0 00 00 0c bi 8004b08 <_Thread_queue_Enqueue_priority+0x1b8> 8004adc: 34 42 00 3c addi r2,r2,60 equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 8004ae0: 28 41 00 04 lw r1,(r2+4) the_node = (Chain_Node *) the_thread; the_node->next = search_node; 8004ae4: 59 62 00 00 sw (r11+0),r2 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 8004ae8: 59 6c 00 44 sw (r11+68),r12 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; 8004aec: 59 61 00 04 sw (r11+4),r1 previous_node->next = the_node; 8004af0: 58 2b 00 00 sw (r1+0),r11 search_node->previous = the_node; 8004af4: 58 4b 00 04 sw (r2+4),r11 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 8004af8: d0 04 00 00 wcsr IE,r4 8004afc: e3 ff ff f6 bi 8004ad4 <_Thread_queue_Enqueue_priority+0x184> * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; 8004b00: 29 81 00 30 lw r1,(r12+48) <== NOT EXECUTED * 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; 8004b04: 59 c7 00 00 sw (r14+0),r7 <== NOT EXECUTED return the_thread_queue->sync_state; } 8004b08: 2b 9d 00 04 lw ra,(sp+4) 8004b0c: 2b 8b 00 14 lw r11,(sp+20) 8004b10: 2b 8c 00 10 lw r12,(sp+16) 8004b14: 2b 8d 00 0c lw r13,(sp+12) 8004b18: 2b 8e 00 08 lw r14,(sp+8) 8004b1c: 37 9c 00 14 addi sp,sp,20 8004b20: c3 a0 00 00 ret =============================================================================== 08004bb0 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 8004bb0: 37 9c ff ec addi sp,sp,-20 8004bb4: 5b 8b 00 10 sw (sp+16),r11 8004bb8: 5b 8c 00 0c sw (sp+12),r12 8004bbc: 5b 8d 00 08 sw (sp+8),r13 8004bc0: 5b 9d 00 04 sw (sp+4),ra 8004bc4: b8 20 58 00 mv r11,r1 8004bc8: 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 ) 8004bcc: 44 20 00 17 be r1,r0,8004c28 <_Thread_queue_Requeue+0x78> <== 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 ) { 8004bd0: 28 22 00 34 lw r2,(r1+52) 8004bd4: 34 01 00 01 mvi r1,1 8004bd8: 5c 41 00 14 bne r2,r1,8004c28 <_Thread_queue_Requeue+0x78> <== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 8004bdc: 90 00 68 00 rcsr r13,IE 8004be0: 34 01 ff fe mvi r1,-2 8004be4: a1 a1 08 00 and r1,r13,r1 8004be8: d0 01 00 00 wcsr IE,r1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 8004bec: 29 82 00 10 lw r2,(r12+16) 8004bf0: 78 01 00 03 mvhi r1,0x3 8004bf4: 38 21 be e0 ori r1,r1,0xbee0 8004bf8: a0 41 08 00 and r1,r2,r1 8004bfc: 44 20 00 0a be r1,r0,8004c24 <_Thread_queue_Requeue+0x74> <== NEVER TAKEN 8004c00: 34 03 00 01 mvi r3,1 8004c04: 59 63 00 30 sw (r11+48),r3 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 8004c08: b9 60 08 00 mv r1,r11 8004c0c: b9 80 10 00 mv r2,r12 8004c10: f8 00 10 78 calli 8008df0 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 8004c14: b9 60 08 00 mv r1,r11 8004c18: b9 80 10 00 mv r2,r12 8004c1c: 37 83 00 14 addi r3,sp,20 8004c20: fb ff ff 4c calli 8004950 <_Thread_queue_Enqueue_priority> } _ISR_Enable( level ); 8004c24: d0 0d 00 00 wcsr IE,r13 } } 8004c28: 2b 9d 00 04 lw ra,(sp+4) 8004c2c: 2b 8b 00 10 lw r11,(sp+16) 8004c30: 2b 8c 00 0c lw r12,(sp+12) 8004c34: 2b 8d 00 08 lw r13,(sp+8) 8004c38: 37 9c 00 14 addi sp,sp,20 8004c3c: c3 a0 00 00 ret =============================================================================== 08004c40 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 8004c40: 37 9c ff f8 addi sp,sp,-8 8004c44: 5b 9d 00 04 sw (sp+4),ra Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 8004c48: 37 82 00 08 addi r2,sp,8 8004c4c: fb ff fd a0 calli 80042cc <_Thread_Get> switch ( location ) { 8004c50: 2b 82 00 08 lw r2,(sp+8) 8004c54: 5c 40 00 07 bne r2,r0,8004c70 <_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 ); 8004c58: f8 00 10 b3 calli 8008f24 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 8004c5c: 78 01 08 01 mvhi r1,0x801 8004c60: 38 21 c8 2c ori r1,r1,0xc82c 8004c64: 28 22 00 00 lw r2,(r1+0) 8004c68: 34 42 ff ff addi r2,r2,-1 8004c6c: 58 22 00 00 sw (r1+0),r2 _Thread_Unnest_dispatch(); break; } } 8004c70: 2b 9d 00 04 lw ra,(sp+4) 8004c74: 37 9c 00 08 addi sp,sp,8 8004c78: c3 a0 00 00 ret =============================================================================== 08014140 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 8014140: 37 9c ff a4 addi sp,sp,-92 8014144: 5b 8b 00 44 sw (sp+68),r11 8014148: 5b 8c 00 40 sw (sp+64),r12 801414c: 5b 8d 00 3c sw (sp+60),r13 8014150: 5b 8e 00 38 sw (sp+56),r14 8014154: 5b 8f 00 34 sw (sp+52),r15 8014158: 5b 90 00 30 sw (sp+48),r16 801415c: 5b 91 00 2c sw (sp+44),r17 8014160: 5b 92 00 28 sw (sp+40),r18 8014164: 5b 93 00 24 sw (sp+36),r19 8014168: 5b 94 00 20 sw (sp+32),r20 801416c: 5b 95 00 1c sw (sp+28),r21 8014170: 5b 96 00 18 sw (sp+24),r22 8014174: 5b 97 00 14 sw (sp+20),r23 8014178: 5b 98 00 10 sw (sp+16),r24 801417c: 5b 99 00 0c sw (sp+12),r25 8014180: 5b 9b 00 08 sw (sp+8),fp 8014184: 5b 9d 00 04 sw (sp+4),ra static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 8014188: 78 11 08 03 mvhi r17,0x803 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 801418c: b8 20 58 00 mv r11,r1 8014190: 37 82 00 54 addi r2,sp,84 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 8014194: 34 01 00 00 mvi r1,0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8014198: 37 96 00 58 addi r22,sp,88 801419c: 37 8e 00 48 addi r14,sp,72 80141a0: 37 92 00 4c addi r18,sp,76 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 80141a4: 78 10 08 03 mvhi r16,0x803 80141a8: 78 0d 08 03 mvhi r13,0x803 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 80141ac: 5b 96 00 54 sw (sp+84),r22 the_chain->permanent_null = NULL; 80141b0: 5b 81 00 58 sw (sp+88),r1 the_chain->last = _Chain_Head(the_chain); 80141b4: 5b 82 00 5c sw (sp+92),r2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 80141b8: 5b 92 00 48 sw (sp+72),r18 the_chain->permanent_null = NULL; 80141bc: 5b 81 00 4c sw (sp+76),r1 the_chain->last = _Chain_Head(the_chain); 80141c0: 5b 8e 00 50 sw (sp+80),r14 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 80141c4: 3a 31 dd 84 ori r17,r17,0xdd84 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 80141c8: 3a 10 dc c4 ori r16,r16,0xdcc4 */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 80141cc: b8 20 a8 00 mv r21,r1 80141d0: 39 ad dc 34 ori r13,r13,0xdc34 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 80141d4: 35 74 00 30 addi r20,r11,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 ); 80141d8: 35 6f 00 68 addi r15,r11,104 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 80141dc: 35 7b 00 08 addi fp,r11,8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 80141e0: 35 79 00 40 addi r25,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 ); 80141e4: 34 18 00 01 mvi r24,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 ) { 80141e8: 34 17 00 03 mvi r23,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 ); 80141ec: 34 13 ff fe mvi r19,-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; 80141f0: 37 81 00 54 addi r1,sp,84 80141f4: 59 61 00 78 sw (r11+120),r1 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 80141f8: 2a 22 00 00 lw r2,(r17+0) /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 80141fc: 29 63 00 3c lw r3,(r11+60) watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8014200: ba 80 08 00 mv r1,r20 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 8014204: 59 62 00 3c sw (r11+60),r2 _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8014208: c8 43 10 00 sub r2,r2,r3 801420c: b9 c0 18 00 mv r3,r14 8014210: f8 00 14 36 calli 80192e8 <_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; 8014214: 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(); 8014218: 2a 0c 00 00 lw r12,(r16+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 ) { 801421c: 50 4c 00 06 bgeu r2,r12,8014234 <_Timer_server_Body+0xf4> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8014220: c9 82 10 00 sub r2,r12,r2 8014224: b9 e0 08 00 mv r1,r15 8014228: b9 c0 18 00 mv r3,r14 801422c: f8 00 14 2f calli 80192e8 <_Watchdog_Adjust_to_chain> 8014230: e0 00 00 06 bi 8014248 <_Timer_server_Body+0x108> } else if ( snapshot < last_snapshot ) { 8014234: 51 82 00 05 bgeu r12,r2,8014248 <_Timer_server_Body+0x108> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 8014238: c8 4c 18 00 sub r3,r2,r12 801423c: b9 e0 08 00 mv r1,r15 8014240: 34 02 00 01 mvi r2,1 8014244: f8 00 13 f1 calli 8019208 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; 8014248: 59 6c 00 74 sw (r11+116),r12 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 801424c: 29 61 00 78 lw r1,(r11+120) 8014250: f8 00 02 ec calli 8014e00 <_Chain_Get> if ( timer == NULL ) { 8014254: 44 20 00 0b be r1,r0,8014280 <_Timer_server_Body+0x140> <== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 8014258: 28 23 00 38 lw r3,(r1+56) <== NOT EXECUTED 801425c: 5c 78 00 04 bne r3,r24,801426c <_Timer_server_Body+0x12c> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 8014260: 34 22 00 10 addi r2,r1,16 <== NOT EXECUTED 8014264: ba 80 08 00 mv r1,r20 <== NOT EXECUTED 8014268: e0 00 00 04 bi 8014278 <_Timer_server_Body+0x138> <== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 801426c: 5c 77 ff f8 bne r3,r23,801424c <_Timer_server_Body+0x10c> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 8014270: 34 22 00 10 addi r2,r1,16 <== NOT EXECUTED 8014274: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8014278: f8 00 14 47 calli 8019394 <_Watchdog_Insert> <== NOT EXECUTED 801427c: e3 ff ff f4 bi 801424c <_Timer_server_Body+0x10c> <== 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 ); 8014280: 90 00 10 00 rcsr r2,IE 8014284: a0 53 08 00 and r1,r2,r19 8014288: d0 01 00 00 wcsr IE,r1 if ( _Chain_Is_empty( insert_chain ) ) { 801428c: 2b 81 00 54 lw r1,(sp+84) 8014290: 5c 36 00 06 bne r1,r22,80142a8 <_Timer_server_Body+0x168> <== NEVER TAKEN ts->insert_chain = NULL; 8014294: 59 75 00 78 sw (r11+120),r21 _ISR_Enable( level ); 8014298: 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 ) ) { 801429c: 2b 81 00 48 lw r1,(sp+72) 80142a0: 5c 32 00 04 bne r1,r18,80142b0 <_Timer_server_Body+0x170> 80142a4: e0 00 00 17 bi 8014300 <_Timer_server_Body+0x1c0> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 80142a8: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED 80142ac: e3 ff ff d3 bi 80141f8 <_Timer_server_Body+0xb8> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 80142b0: 90 00 10 00 rcsr r2,IE 80142b4: a0 53 08 00 and r1,r2,r19 80142b8: 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)); 80142bc: 2b 84 00 48 lw r4,(sp+72) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 80142c0: 5c 92 00 03 bne r4,r18,80142cc <_Timer_server_Body+0x18c> 80142c4: 34 04 00 00 mvi r4,0 80142c8: e0 00 00 04 bi 80142d8 <_Timer_server_Body+0x198> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 80142cc: 28 83 00 00 lw r3,(r4+0) the_chain->first = new_first; 80142d0: 5b 83 00 48 sw (sp+72),r3 new_first->previous = _Chain_Head(the_chain); 80142d4: 58 6e 00 04 sw (r3+4),r14 watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 80142d8: 44 80 00 08 be r4,r0,80142f8 <_Timer_server_Body+0x1b8> watchdog->state = WATCHDOG_INACTIVE; 80142dc: 58 95 00 08 sw (r4+8),r21 _ISR_Enable( level ); 80142e0: 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 ); 80142e4: 28 82 00 24 lw r2,(r4+36) 80142e8: 28 83 00 1c lw r3,(r4+28) 80142ec: 28 81 00 20 lw r1,(r4+32) 80142f0: d8 60 00 00 call r3 } 80142f4: e3 ff ff ef bi 80142b0 <_Timer_server_Body+0x170> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 80142f8: d0 02 00 00 wcsr IE,r2 80142fc: e3 ff ff bd bi 80141f0 <_Timer_server_Body+0xb0> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 8014300: 34 01 00 00 mvi r1,0 8014304: 31 61 00 7c sb (r11+124),r1 8014308: 29 a1 00 00 lw r1,(r13+0) 801430c: 34 21 00 01 addi r1,r1,1 8014310: 59 a1 00 00 sw (r13+0),r1 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 8014314: 29 61 00 00 lw r1,(r11+0) 8014318: 34 02 00 08 mvi r2,8 801431c: f8 00 10 c2 calli 8018624 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 8014320: b9 60 08 00 mv r1,r11 8014324: fb ff ff 4d calli 8014058 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 8014328: b9 60 08 00 mv r1,r11 801432c: fb ff ff 68 calli 80140cc <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 8014330: f8 00 0d 9e calli 80179a8 <_Thread_Enable_dispatch> ts->active = true; 8014334: 34 01 00 01 mvi r1,1 8014338: 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 ); 801433c: bb 60 08 00 mv r1,fp 8014340: f8 00 14 74 calli 8019510 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 8014344: bb 20 08 00 mv r1,r25 8014348: f8 00 14 72 calli 8019510 <_Watchdog_Remove> 801434c: e3 ff ff a9 bi 80141f0 <_Timer_server_Body+0xb0> =============================================================================== 08014350 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 8014350: 37 9c ff f8 addi sp,sp,-8 8014354: 5b 8b 00 08 sw (sp+8),r11 8014358: 5b 9d 00 04 sw (sp+4),ra 801435c: b8 20 58 00 mv r11,r1 if ( ts->insert_chain == NULL ) { 8014360: 28 21 00 78 lw r1,(r1+120) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 8014364: b8 40 20 00 mv r4,r2 if ( ts->insert_chain == NULL ) { 8014368: 5c 20 00 47 bne r1,r0,8014484 <_Timer_server_Schedule_operation_method+0x134><== NEVER TAKEN 801436c: 78 01 08 03 mvhi r1,0x803 8014370: 38 21 dc 34 ori r1,r1,0xdc34 8014374: 28 22 00 00 lw r2,(r1+0) 8014378: 34 42 00 01 addi r2,r2,1 801437c: 58 22 00 00 sw (r1+0),r2 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 8014380: 28 81 00 38 lw r1,(r4+56) 8014384: 34 02 00 01 mvi r2,1 8014388: 5c 22 00 1d bne r1,r2,80143fc <_Timer_server_Schedule_operation_method+0xac> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 801438c: 90 00 18 00 rcsr r3,IE 8014390: 34 01 ff fe mvi r1,-2 8014394: a0 61 08 00 and r1,r3,r1 8014398: d0 01 00 00 wcsr IE,r1 snapshot = _Watchdog_Ticks_since_boot; 801439c: 78 02 08 03 mvhi r2,0x803 80143a0: 38 42 dd 84 ori r2,r2,0xdd84 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 80143a4: 29 61 00 30 lw r1,(r11+48) 80143a8: 28 45 00 00 lw r5,(r2+0) last_snapshot = ts->Interval_watchdogs.last_snapshot; 80143ac: 29 62 00 3c lw r2,(r11+60) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 80143b0: 35 66 00 34 addi r6,r11,52 80143b4: 44 26 00 08 be r1,r6,80143d4 <_Timer_server_Schedule_operation_method+0x84> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; 80143b8: 28 27 00 10 lw r7,(r1+16) first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 80143bc: c8 a2 10 00 sub r2,r5,r2 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { 80143c0: f4 e2 30 00 cmpgu r6,r7,r2 delta_interval -= delta; 80143c4: c8 e2 10 00 sub r2,r7,r2 * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { 80143c8: c8 06 30 00 sub r6,r0,r6 80143cc: a0 46 10 00 and r2,r2,r6 delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 80143d0: 58 22 00 10 sw (r1+16),r2 } ts->Interval_watchdogs.last_snapshot = snapshot; 80143d4: 59 65 00 3c sw (r11+60),r5 _ISR_Enable( level ); 80143d8: d0 03 00 00 wcsr IE,r3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 80143dc: 35 61 00 30 addi r1,r11,48 80143e0: 34 82 00 10 addi r2,r4,16 80143e4: f8 00 13 ec calli 8019394 <_Watchdog_Insert> if ( !ts->active ) { 80143e8: 41 61 00 7c lbu r1,(r11+124) 80143ec: 5c 20 00 24 bne r1,r0,801447c <_Timer_server_Schedule_operation_method+0x12c> _Timer_server_Reset_interval_system_watchdog( ts ); 80143f0: b9 60 08 00 mv r1,r11 80143f4: fb ff ff 19 calli 8014058 <_Timer_server_Reset_interval_system_watchdog> 80143f8: e0 00 00 21 bi 801447c <_Timer_server_Schedule_operation_method+0x12c> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 80143fc: 34 02 00 03 mvi r2,3 8014400: 5c 22 00 1f bne r1,r2,801447c <_Timer_server_Schedule_operation_method+0x12c> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 8014404: 90 00 38 00 rcsr r7,IE 8014408: 34 01 ff fe mvi r1,-2 801440c: a0 e1 08 00 and r1,r7,r1 8014410: 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)); 8014414: 29 62 00 68 lw r2,(r11+104) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 8014418: 78 01 08 03 mvhi r1,0x803 last_snapshot = ts->TOD_watchdogs.last_snapshot; 801441c: 29 66 00 74 lw r6,(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(); 8014420: 38 21 dc c4 ori r1,r1,0xdcc4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8014424: 35 63 00 6c addi r3,r11,108 8014428: 28 21 00 00 lw r1,(r1+0) 801442c: 44 43 00 0b be r2,r3,8014458 <_Timer_server_Schedule_operation_method+0x108> 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; 8014430: 28 45 00 10 lw r5,(r2+16) } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 8014434: b4 a6 18 00 add r3,r5,r6 delta_interval += delta; 8014438: c8 61 18 00 sub r3,r3,r1 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 ) { 801443c: 50 c1 00 06 bgeu r6,r1,8014454 <_Timer_server_Schedule_operation_method+0x104> /* * We advanced in time. */ delta = snapshot - last_snapshot; 8014440: c8 26 18 00 sub r3,r1,r6 if (delta_interval > delta) { 8014444: f4 a3 30 00 cmpgu r6,r5,r3 delta_interval -= delta; 8014448: c8 a3 18 00 sub r3,r5,r3 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { 801444c: c8 06 28 00 sub r5,r0,r6 8014450: a0 65 18 00 and r3,r3,r5 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 8014454: 58 43 00 10 sw (r2+16),r3 } ts->TOD_watchdogs.last_snapshot = snapshot; 8014458: 59 61 00 74 sw (r11+116),r1 _ISR_Enable( level ); 801445c: d0 07 00 00 wcsr IE,r7 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 8014460: 35 61 00 68 addi r1,r11,104 8014464: 34 82 00 10 addi r2,r4,16 8014468: f8 00 13 cb calli 8019394 <_Watchdog_Insert> if ( !ts->active ) { 801446c: 41 61 00 7c lbu r1,(r11+124) 8014470: 5c 20 00 03 bne r1,r0,801447c <_Timer_server_Schedule_operation_method+0x12c> _Timer_server_Reset_tod_system_watchdog( ts ); 8014474: b9 60 08 00 mv r1,r11 8014478: fb ff ff 15 calli 80140cc <_Timer_server_Reset_tod_system_watchdog> } } _Thread_Enable_dispatch(); 801447c: f8 00 0d 4b calli 80179a8 <_Thread_Enable_dispatch> 8014480: e0 00 00 03 bi 801448c <_Timer_server_Schedule_operation_method+0x13c> * 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 ); 8014484: 29 61 00 78 lw r1,(r11+120) <== NOT EXECUTED 8014488: f8 00 02 52 calli 8014dd0 <_Chain_Append> <== NOT EXECUTED } } 801448c: 2b 9d 00 04 lw ra,(sp+4) 8014490: 2b 8b 00 08 lw r11,(sp+8) 8014494: 37 9c 00 08 addi sp,sp,8 8014498: c3 a0 00 00 ret =============================================================================== 0800773c <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 800773c: 28 24 00 00 lw r4,(r1+0) 8007740: 28 43 00 00 lw r3,(r2+0) 8007744: 4c 64 00 03 bge r3,r4,8007750 <_Timespec_Greater_than+0x14> 8007748: 34 01 00 01 mvi r1,1 800774c: c3 a0 00 00 ret return true; if ( lhs->tv_sec < rhs->tv_sec ) 8007750: 4c 83 00 03 bge r4,r3,800775c <_Timespec_Greater_than+0x20><== ALWAYS TAKEN 8007754: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8007758: c3 a0 00 00 ret <== NOT EXECUTED #include #include #include bool _Timespec_Greater_than( 800775c: 28 23 00 04 lw r3,(r1+4) 8007760: 28 41 00 04 lw r1,(r2+4) 8007764: 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; } 8007768: c3 a0 00 00 ret =============================================================================== 080078c4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 80078c4: 37 9c ff e4 addi sp,sp,-28 80078c8: 5b 8b 00 1c sw (sp+28),r11 80078cc: 5b 8c 00 18 sw (sp+24),r12 80078d0: 5b 8d 00 14 sw (sp+20),r13 80078d4: 5b 8e 00 10 sw (sp+16),r14 80078d8: 5b 8f 00 0c sw (sp+12),r15 80078dc: 5b 90 00 08 sw (sp+8),r16 80078e0: 5b 9d 00 04 sw (sp+4),ra 80078e4: b8 20 60 00 mv r12,r1 80078e8: b8 40 20 00 mv r4,r2 80078ec: b8 60 58 00 mv r11,r3 ISR_Level level; _ISR_Disable( level ); 80078f0: 90 00 10 00 rcsr r2,IE 80078f4: 34 01 ff fe mvi r1,-2 80078f8: a0 41 08 00 and r1,r2,r1 80078fc: 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)); 8007900: 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; 8007904: 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 ) ) { 8007908: 44 2e 00 1d be r1,r14,800797c <_Watchdog_Adjust+0xb8> switch ( direction ) { 800790c: 44 80 00 04 be r4,r0,800791c <_Watchdog_Adjust+0x58> 8007910: 34 03 00 01 mvi r3,1 8007914: 5c 83 00 1a bne r4,r3,800797c <_Watchdog_Adjust+0xb8> <== NEVER TAKEN 8007918: e0 00 00 04 bi 8007928 <_Watchdog_Adjust+0x64> if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 800791c: 34 10 00 01 mvi r16,1 _ISR_Enable( level ); _Watchdog_Tickle( header ); _ISR_Disable( level ); 8007920: 34 0f ff fe mvi r15,-2 8007924: e0 00 00 15 bi 8007978 <_Watchdog_Adjust+0xb4> * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 8007928: 28 23 00 10 lw r3,(r1+16) 800792c: b4 6b 58 00 add r11,r3,r11 8007930: e0 00 00 05 bi 8007944 <_Watchdog_Adjust+0x80> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 8007934: 29 81 00 00 lw r1,(r12+0) break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 8007938: 28 2d 00 10 lw r13,(r1+16) 800793c: 51 6d 00 04 bgeu r11,r13,800794c <_Watchdog_Adjust+0x88> _Watchdog_First( header )->delta_interval -= units; 8007940: c9 ab 58 00 sub r11,r13,r11 8007944: 58 2b 00 10 sw (r1+16),r11 break; 8007948: e0 00 00 0d bi 800797c <_Watchdog_Adjust+0xb8> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 800794c: 58 30 00 10 sw (r1+16),r16 _ISR_Enable( level ); 8007950: d0 02 00 00 wcsr IE,r2 _Watchdog_Tickle( header ); 8007954: b9 80 08 00 mv r1,r12 8007958: f8 00 00 9e calli 8007bd0 <_Watchdog_Tickle> _ISR_Disable( level ); 800795c: 90 00 08 00 rcsr r1,IE 8007960: a0 2f 10 00 and r2,r1,r15 8007964: d0 02 00 00 wcsr IE,r2 if ( _Chain_Is_empty( header ) ) 8007968: 29 83 00 00 lw r3,(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; 800796c: c9 6d 58 00 sub r11,r11,r13 8007970: b8 20 10 00 mv r2,r1 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 8007974: 44 6e 00 02 be r3,r14,800797c <_Watchdog_Adjust+0xb8> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 8007978: 5d 60 ff ef bne r11,r0,8007934 <_Watchdog_Adjust+0x70> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 800797c: d0 02 00 00 wcsr IE,r2 } 8007980: 2b 9d 00 04 lw ra,(sp+4) 8007984: 2b 8b 00 1c lw r11,(sp+28) 8007988: 2b 8c 00 18 lw r12,(sp+24) 800798c: 2b 8d 00 14 lw r13,(sp+20) 8007990: 2b 8e 00 10 lw r14,(sp+16) 8007994: 2b 8f 00 0c lw r15,(sp+12) 8007998: 2b 90 00 08 lw r16,(sp+8) 800799c: 37 9c 00 1c addi sp,sp,28 80079a0: c3 a0 00 00 ret =============================================================================== 0800574c <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 800574c: 90 00 20 00 rcsr r4,IE 8005750: 34 02 ff fe mvi r2,-2 8005754: a0 82 10 00 and r2,r4,r2 8005758: d0 02 00 00 wcsr IE,r2 previous_state = the_watchdog->state; 800575c: 28 22 00 08 lw r2,(r1+8) switch ( previous_state ) { 8005760: 34 03 00 01 mvi r3,1 8005764: 44 43 00 05 be r2,r3,8005778 <_Watchdog_Remove+0x2c> <== NEVER TAKEN 8005768: 44 40 00 1e be r2,r0,80057e0 <_Watchdog_Remove+0x94> 800576c: 34 03 00 03 mvi r3,3 8005770: 54 43 00 1c bgu r2,r3,80057e0 <_Watchdog_Remove+0x94> <== NEVER TAKEN 8005774: e0 00 00 04 bi 8005784 <_Watchdog_Remove+0x38> /* * 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; 8005778: 34 03 00 00 mvi r3,0 800577c: 58 23 00 08 sw (r1+8),r3 break; 8005780: e0 00 00 18 bi 80057e0 <_Watchdog_Remove+0x94> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 8005784: 28 23 00 00 lw r3,(r1+0) case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 8005788: 34 05 00 00 mvi r5,0 800578c: 58 25 00 08 sw (r1+8),r5 next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 8005790: 28 65 00 00 lw r5,(r3+0) 8005794: 44 a0 00 05 be r5,r0,80057a8 <_Watchdog_Remove+0x5c> next_watchdog->delta_interval += the_watchdog->delta_interval; 8005798: 28 66 00 10 lw r6,(r3+16) 800579c: 28 25 00 10 lw r5,(r1+16) 80057a0: b4 c5 28 00 add r5,r6,r5 80057a4: 58 65 00 10 sw (r3+16),r5 if ( _Watchdog_Sync_count ) 80057a8: 78 03 08 01 mvhi r3,0x801 80057ac: 38 63 c9 78 ori r3,r3,0xc978 80057b0: 28 63 00 00 lw r3,(r3+0) 80057b4: 44 60 00 07 be r3,r0,80057d0 <_Watchdog_Remove+0x84> _Watchdog_Sync_level = _ISR_Nest_level; 80057b8: 78 03 08 01 mvhi r3,0x801 80057bc: 38 63 c8 c4 ori r3,r3,0xc8c4 80057c0: 28 65 00 00 lw r5,(r3+0) 80057c4: 78 03 08 01 mvhi r3,0x801 80057c8: 38 63 c8 e4 ori r3,r3,0xc8e4 80057cc: 58 65 00 00 sw (r3+0),r5 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 80057d0: 28 23 00 00 lw r3,(r1+0) previous = the_node->previous; 80057d4: 28 25 00 04 lw r5,(r1+4) next->previous = previous; previous->next = next; 80057d8: 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; 80057dc: 58 65 00 04 sw (r3+4),r5 _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 80057e0: 78 03 08 01 mvhi r3,0x801 80057e4: 38 63 c9 7c ori r3,r3,0xc97c 80057e8: 28 63 00 00 lw r3,(r3+0) 80057ec: 58 23 00 18 sw (r1+24),r3 _ISR_Enable( level ); 80057f0: d0 04 00 00 wcsr IE,r4 return( previous_state ); } 80057f4: b8 40 08 00 mv r1,r2 80057f8: c3 a0 00 00 ret =============================================================================== 080075b4 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 80075b4: 37 9c ff ec addi sp,sp,-20 80075b8: 5b 8b 00 14 sw (sp+20),r11 80075bc: 5b 8c 00 10 sw (sp+16),r12 80075c0: 5b 8d 00 0c sw (sp+12),r13 80075c4: 5b 8e 00 08 sw (sp+8),r14 80075c8: 5b 9d 00 04 sw (sp+4),ra 80075cc: b8 20 70 00 mv r14,r1 80075d0: b8 40 60 00 mv r12,r2 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 80075d4: 90 00 68 00 rcsr r13,IE 80075d8: 34 01 ff fe mvi r1,-2 80075dc: a1 a1 08 00 and r1,r13,r1 80075e0: d0 01 00 00 wcsr IE,r1 printk( "Watchdog Chain: %s %p\n", name, header ); 80075e4: 78 01 08 01 mvhi r1,0x801 80075e8: b9 80 18 00 mv r3,r12 80075ec: 38 21 f8 b8 ori r1,r1,0xf8b8 80075f0: b9 c0 10 00 mv r2,r14 80075f4: fb ff ed 2a calli 8002a9c */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 80075f8: 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; 80075fc: 35 8c 00 04 addi r12,r12,4 if ( !_Chain_Is_empty( header ) ) { 8007600: 45 6c 00 0b be r11,r12,800762c <_Watchdog_Report_chain+0x78> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 8007604: b9 60 10 00 mv r2,r11 8007608: 34 01 00 00 mvi r1,0 800760c: f8 00 00 13 calli 8007658 <_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 ) 8007610: 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 ; 8007614: 5d 6c ff fc bne r11,r12,8007604 <_Watchdog_Report_chain+0x50><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 8007618: 78 01 08 01 mvhi r1,0x801 800761c: 38 21 f8 d0 ori r1,r1,0xf8d0 8007620: b9 c0 10 00 mv r2,r14 8007624: fb ff ed 1e calli 8002a9c 8007628: e0 00 00 04 bi 8007638 <_Watchdog_Report_chain+0x84> } else { printk( "Chain is empty\n" ); 800762c: 78 01 08 01 mvhi r1,0x801 8007630: 38 21 f8 e0 ori r1,r1,0xf8e0 8007634: fb ff ed 1a calli 8002a9c } _ISR_Enable( level ); 8007638: d0 0d 00 00 wcsr IE,r13 } 800763c: 2b 9d 00 04 lw ra,(sp+4) 8007640: 2b 8b 00 14 lw r11,(sp+20) 8007644: 2b 8c 00 10 lw r12,(sp+16) 8007648: 2b 8d 00 0c lw r13,(sp+12) 800764c: 2b 8e 00 08 lw r14,(sp+8) 8007650: 37 9c 00 14 addi sp,sp,20 8007654: c3 a0 00 00 ret =============================================================================== 080057fc <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 80057fc: 37 9c ff e4 addi sp,sp,-28 8005800: 5b 8b 00 1c sw (sp+28),r11 8005804: 5b 8c 00 18 sw (sp+24),r12 8005808: 5b 8d 00 14 sw (sp+20),r13 800580c: 5b 8e 00 10 sw (sp+16),r14 8005810: 5b 8f 00 0c sw (sp+12),r15 8005814: 5b 90 00 08 sw (sp+8),r16 8005818: 5b 9d 00 04 sw (sp+4),ra 800581c: 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 ); 8005820: 90 00 08 00 rcsr r1,IE 8005824: 34 02 ff fe mvi r2,-2 8005828: a0 22 10 00 and r2,r1,r2 800582c: 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)); 8005830: 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; 8005834: 35 8e 00 04 addi r14,r12,4 if ( _Chain_Is_empty( header ) ) 8005838: 45 6e 00 1a be r11,r14,80058a0 <_Watchdog_Tickle+0xa4> * 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) { 800583c: 29 62 00 10 lw r2,(r11+16) 8005840: 44 40 00 04 be r2,r0,8005850 <_Watchdog_Tickle+0x54> the_watchdog->delta_interval--; 8005844: 34 42 ff ff addi r2,r2,-1 8005848: 59 62 00 10 sw (r11+16),r2 if ( the_watchdog->delta_interval != 0 ) 800584c: 5c 40 00 15 bne r2,r0,80058a0 <_Watchdog_Tickle+0xa4> 8005850: b8 20 68 00 mv r13,r1 do { watchdog_state = _Watchdog_Remove( the_watchdog ); _ISR_Enable( level ); switch( watchdog_state ) { 8005854: 34 10 00 02 mvi r16,2 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 8005858: 34 0f ff fe mvi r15,-2 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 800585c: b9 60 08 00 mv r1,r11 8005860: fb ff ff bb calli 800574c <_Watchdog_Remove> _ISR_Enable( level ); 8005864: d0 0d 00 00 wcsr IE,r13 switch( watchdog_state ) { 8005868: 5c 30 00 05 bne r1,r16,800587c <_Watchdog_Tickle+0x80> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 800586c: 29 62 00 24 lw r2,(r11+36) 8005870: 29 63 00 1c lw r3,(r11+28) 8005874: 29 61 00 20 lw r1,(r11+32) 8005878: d8 60 00 00 call r3 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 800587c: 90 00 08 00 rcsr r1,IE 8005880: a0 2f 10 00 and r2,r1,r15 8005884: d0 02 00 00 wcsr IE,r2 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 8005888: 29 82 00 00 lw r2,(r12+0) 800588c: b8 20 68 00 mv r13,r1 8005890: b8 40 58 00 mv r11,r2 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8005894: 44 4e 00 03 be r2,r14,80058a0 <_Watchdog_Tickle+0xa4> 8005898: 28 42 00 10 lw r2,(r2+16) 800589c: 44 40 ff f0 be r2,r0,800585c <_Watchdog_Tickle+0x60> leave: _ISR_Enable(level); 80058a0: d0 01 00 00 wcsr IE,r1 } 80058a4: 2b 9d 00 04 lw ra,(sp+4) 80058a8: 2b 8b 00 1c lw r11,(sp+28) 80058ac: 2b 8c 00 18 lw r12,(sp+24) 80058b0: 2b 8d 00 14 lw r13,(sp+20) 80058b4: 2b 8e 00 10 lw r14,(sp+16) 80058b8: 2b 8f 00 0c lw r15,(sp+12) 80058bc: 2b 90 00 08 lw r16,(sp+8) 80058c0: 37 9c 00 1c addi sp,sp,28 80058c4: c3 a0 00 00 ret =============================================================================== 080058c8 <_Workspace_Allocate_or_fatal_error>: * _Workspace_Allocate_or_fatal_error */ void *_Workspace_Allocate_or_fatal_error( size_t size ) { 80058c8: 37 9c ff fc addi sp,sp,-4 80058cc: 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 ); 80058d0: 34 03 00 00 mvi r3,0 80058d4: b8 20 10 00 mv r2,r1 80058d8: 78 01 08 01 mvhi r1,0x801 80058dc: 38 21 c8 50 ori r1,r1,0xc850 80058e0: b8 60 20 00 mv r4,r3 80058e4: f8 00 0a e6 calli 800847c <_Heap_Allocate_aligned_with_boundary> __builtin_return_address( 1 ), memory ); #endif if ( memory == NULL ) 80058e8: 5c 20 00 04 bne r1,r0,80058f8 <_Workspace_Allocate_or_fatal_error+0x30><== ALWAYS TAKEN _Internal_error_Occurred( 80058ec: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80058f0: 34 03 00 04 mvi r3,4 <== NOT EXECUTED 80058f4: fb ff f6 aa calli 800339c <_Internal_error_Occurred> <== NOT EXECUTED true, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; } 80058f8: 2b 9d 00 04 lw ra,(sp+4) 80058fc: 37 9c 00 04 addi sp,sp,4 8005900: c3 a0 00 00 ret =============================================================================== 0800355c : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 800355c: 37 9c ff c0 addi sp,sp,-64 8003560: 5b 8b 00 0c sw (sp+12),r11 8003564: 5b 8c 00 08 sw (sp+8),r12 8003568: 5b 9d 00 04 sw (sp+4),ra 800356c: b8 20 58 00 mv r11,r1 rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 8003570: 34 01 00 09 mvi r1,9 8003574: 45 60 00 2b be r11,r0,8003620 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 8003578: 78 01 08 02 mvhi r1,0x802 800357c: 38 21 a6 30 ori r1,r1,0xa630 8003580: 40 22 00 00 lbu r2,(r1+0) 8003584: 34 01 00 0b mvi r1,11 8003588: 44 40 00 26 be r2,r0,8003620 <== NEVER TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 800358c: 90 00 60 00 rcsr r12,IE 8003590: 34 01 ff fe mvi r1,-2 8003594: a1 81 08 00 and r1,r12,r1 8003598: d0 01 00 00 wcsr IE,r1 _TOD_Get( &now ); 800359c: 37 81 00 34 addi r1,sp,52 80035a0: f8 00 05 3a calli 8004a88 <_TOD_Get> _ISR_Enable(level); 80035a4: d0 0c 00 00 wcsr IE,r12 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 80035a8: 2b 81 00 34 lw r1,(sp+52) time->tv_usec = useconds; 80035ac: 34 02 03 e8 mvi r2,1000 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 80035b0: 5b 81 00 3c sw (sp+60),r1 time->tv_usec = useconds; 80035b4: 2b 81 00 38 lw r1,(sp+56) 80035b8: f8 00 6a 8e calli 801dff0 <__divsi3> 80035bc: 5b 81 00 40 sw (sp+64),r1 /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 80035c0: 37 82 00 10 addi r2,sp,16 80035c4: 37 81 00 3c addi r1,sp,60 80035c8: f8 00 29 3e calli 800dac0 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; 80035cc: 2b 81 00 1c lw r1,(sp+28) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 80035d0: 2b 83 00 24 lw r3,(sp+36) tmbuf->month = time.tm_mon + 1; 80035d4: 2b 82 00 20 lw r2,(sp+32) tmbuf->day = time.tm_mday; 80035d8: 59 61 00 08 sw (r11+8),r1 tmbuf->hour = time.tm_hour; 80035dc: 2b 81 00 18 lw r1,(sp+24) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 80035e0: 34 63 07 6c addi r3,r3,1900 tmbuf->month = time.tm_mon + 1; 80035e4: 34 42 00 01 addi r2,r2,1 tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; 80035e8: 59 61 00 0c sw (r11+12),r1 tmbuf->minute = time.tm_min; 80035ec: 2b 81 00 14 lw r1,(sp+20) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 80035f0: 59 63 00 00 sw (r11+0),r3 tmbuf->month = time.tm_mon + 1; 80035f4: 59 62 00 04 sw (r11+4),r2 tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; 80035f8: 59 61 00 10 sw (r11+16),r1 tmbuf->second = time.tm_sec; 80035fc: 2b 81 00 10 lw r1,(sp+16) 8003600: 59 61 00 14 sw (r11+20),r1 tmbuf->ticks = now.tv_usec / 8003604: 78 01 08 02 mvhi r1,0x802 8003608: 38 21 20 c4 ori r1,r1,0x20c4 800360c: 28 22 00 0c lw r2,(r1+12) 8003610: 2b 81 00 40 lw r1,(sp+64) 8003614: f8 00 6a d6 calli 801e16c <__udivsi3> 8003618: 59 61 00 18 sw (r11+24),r1 800361c: 34 01 00 00 mvi r1,0 rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; } 8003620: 2b 9d 00 04 lw ra,(sp+4) 8003624: 2b 8b 00 0c lw r11,(sp+12) 8003628: 2b 8c 00 08 lw r12,(sp+8) 800362c: 37 9c 00 40 addi sp,sp,64 8003630: c3 a0 00 00 ret =============================================================================== 0801013c : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 801013c: b8 20 18 00 mv r3,r1 if ( !routine ) 8010140: 34 01 00 09 mvi r1,9 8010144: 44 60 00 05 be r3,r0,8010158 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 8010148: 78 02 08 03 mvhi r2,0x803 <== NOT EXECUTED 801014c: 38 42 dd d4 ori r2,r2,0xddd4 <== NOT EXECUTED 8010150: 58 43 00 00 sw (r2+0),r3 <== NOT EXECUTED 8010154: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 8010158: c3 a0 00 00 ret =============================================================================== 08005284 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 8005284: 37 9c ff e4 addi sp,sp,-28 8005288: 5b 8b 00 1c sw (sp+28),r11 800528c: 5b 8c 00 18 sw (sp+24),r12 8005290: 5b 8d 00 14 sw (sp+20),r13 8005294: 5b 8e 00 10 sw (sp+16),r14 8005298: 5b 8f 00 0c sw (sp+12),r15 800529c: 5b 90 00 08 sw (sp+8),r16 80052a0: 5b 9d 00 04 sw (sp+4),ra 80052a4: b8 20 78 00 mv r15,r1 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 80052a8: 44 20 00 17 be r1,r0,8005304 <== NEVER TAKEN 80052ac: 78 0b 08 02 mvhi r11,0x802 80052b0: 39 6b a5 b8 ori r11,r11,0xa5b8 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 80052b4: 35 70 00 10 addi r16,r11,16 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 80052b8: 29 61 00 00 lw r1,(r11+0) 80052bc: 44 20 00 10 be r1,r0,80052fc continue; information = _Objects_Information_table[ api_index ][ 1 ]; 80052c0: 28 2c 00 04 lw r12,(r1+4) if ( !information ) 80052c4: 34 0e 00 04 mvi r14,4 80052c8: 34 0d 00 01 mvi r13,1 80052cc: 5d 80 00 0a bne r12,r0,80052f4 80052d0: e0 00 00 0b bi 80052fc continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 80052d4: 29 81 00 1c lw r1,(r12+28) information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 80052d8: 35 ad 00 01 addi r13,r13,1 the_thread = (Thread_Control *)information->local_table[ i ]; 80052dc: b4 2e 08 00 add r1,r1,r14 80052e0: 28 22 00 00 lw r2,(r1+0) information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 80052e4: 35 ce 00 04 addi r14,r14,4 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; (*routine)(the_thread); 80052e8: 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 ) 80052ec: 44 40 00 02 be r2,r0,80052f4 <== NEVER TAKEN continue; (*routine)(the_thread); 80052f0: d9 e0 00 00 call r15 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 80052f4: 2d 81 00 10 lhu r1,(r12+16) 80052f8: 50 2d ff f7 bgeu r1,r13,80052d4 80052fc: 35 6b 00 04 addi r11,r11,4 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 8005300: 5d 70 ff ee bne r11,r16,80052b8 (*routine)(the_thread); } } } 8005304: 2b 9d 00 04 lw ra,(sp+4) 8005308: 2b 8b 00 1c lw r11,(sp+28) 800530c: 2b 8c 00 18 lw r12,(sp+24) 8005310: 2b 8d 00 14 lw r13,(sp+20) 8005314: 2b 8e 00 10 lw r14,(sp+16) 8005318: 2b 8f 00 0c lw r15,(sp+12) 800531c: 2b 90 00 08 lw r16,(sp+8) 8005320: 37 9c 00 1c addi sp,sp,28 8005324: c3 a0 00 00 ret =============================================================================== 08011088 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 8011088: 37 9c ff dc addi sp,sp,-36 801108c: 5b 8b 00 24 sw (sp+36),r11 8011090: 5b 8c 00 20 sw (sp+32),r12 8011094: 5b 8d 00 1c sw (sp+28),r13 8011098: 5b 8e 00 18 sw (sp+24),r14 801109c: 5b 8f 00 14 sw (sp+20),r15 80110a0: 5b 90 00 10 sw (sp+16),r16 80110a4: 5b 91 00 0c sw (sp+12),r17 80110a8: 5b 92 00 08 sw (sp+8),r18 80110ac: 5b 9d 00 04 sw (sp+4),ra register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 80110b0: 34 07 00 03 mvi r7,3 uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 80110b4: b8 20 88 00 mv r17,r1 80110b8: b8 40 70 00 mv r14,r2 80110bc: b8 60 78 00 mv r15,r3 80110c0: b8 80 60 00 mv r12,r4 80110c4: b8 a0 90 00 mv r18,r5 80110c8: b8 c0 80 00 mv r16,r6 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 80110cc: 44 20 00 38 be r1,r0,80111ac return RTEMS_INVALID_NAME; if ( !starting_address ) 80110d0: 44 40 00 34 be r2,r0,80111a0 return RTEMS_INVALID_ADDRESS; if ( !id ) 80110d4: 44 c0 00 33 be r6,r0,80111a0 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 80110d8: 64 82 00 00 cmpei r2,r4,0 80110dc: 64 61 00 00 cmpei r1,r3,0 80110e0: b8 41 08 00 or r1,r2,r1 80110e4: 5c 20 00 31 bne r1,r0,80111a8 80110e8: 54 83 00 30 bgu r4,r3,80111a8 80110ec: 20 81 00 07 andi r1,r4,0x7 80110f0: 5c 20 00 2e bne r1,r0,80111a8 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 80110f4: 21 cd 00 07 andi r13,r14,0x7 80110f8: 5d a1 00 2a bne r13,r1,80111a0 80110fc: 78 02 08 03 mvhi r2,0x803 8011100: 38 42 dc 34 ori r2,r2,0xdc34 8011104: 28 41 00 00 lw r1,(r2+0) 8011108: 34 21 00 01 addi r1,r1,1 801110c: 58 41 00 00 sw (r2+0),r1 * 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 ); 8011110: 78 01 08 03 mvhi r1,0x803 8011114: 38 21 da 7c ori r1,r1,0xda7c 8011118: f8 00 15 86 calli 8016730 <_Objects_Allocate> 801111c: b8 20 58 00 mv r11,r1 _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 8011120: 5c 2d 00 04 bne r1,r13,8011130 _Thread_Enable_dispatch(); 8011124: f8 00 1a 21 calli 80179a8 <_Thread_Enable_dispatch> 8011128: 34 07 00 05 mvi r7,5 return RTEMS_TOO_MANY; 801112c: e0 00 00 20 bi 80111ac _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 8011130: 58 2e 00 10 sw (r1+16),r14 the_partition->length = length; 8011134: 58 2f 00 14 sw (r1+20),r15 the_partition->buffer_size = buffer_size; 8011138: 58 2c 00 18 sw (r1+24),r12 the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 801113c: b9 80 10 00 mv r2,r12 #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 8011140: 58 32 00 1c sw (r1+28),r18 the_partition->number_of_used_blocks = 0; 8011144: 58 2d 00 20 sw (r1+32),r13 _Chain_Initialize( &the_partition->Memory, starting_address, 8011148: b9 e0 08 00 mv r1,r15 801114c: f8 00 77 8f calli 802ef88 <__udivsi3> 8011150: 35 6f 00 24 addi r15,r11,36 8011154: b8 20 18 00 mv r3,r1 8011158: b9 80 20 00 mv r4,r12 801115c: b9 c0 10 00 mv r2,r14 8011160: b9 e0 08 00 mv r1,r15 8011164: f8 00 0f 36 calli 8014e3c <_Chain_Initialize> 8011168: 78 02 08 03 mvhi r2,0x803 801116c: 29 6c 00 08 lw r12,(r11+8) 8011170: 38 42 da 7c ori r2,r2,0xda7c 8011174: 28 4e 00 1c lw r14,(r2+28) 8011178: 21 81 ff ff andi r1,r12,0xffff 801117c: 34 02 00 02 mvi r2,2 8011180: fb ff f3 46 calli 800de98 <__ashlsi3> 8011184: b5 c1 08 00 add r1,r14,r1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 8011188: 59 71 00 0c sw (r11+12),r17 &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 801118c: 5a 0c 00 00 sw (r16+0),r12 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 8011190: 58 2b 00 00 sw (r1+0),r11 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 8011194: f8 00 1a 05 calli 80179a8 <_Thread_Enable_dispatch> 8011198: b9 a0 38 00 mv r7,r13 return RTEMS_SUCCESSFUL; 801119c: e0 00 00 04 bi 80111ac 80111a0: 34 07 00 09 mvi r7,9 80111a4: e0 00 00 02 bi 80111ac 80111a8: 34 07 00 08 mvi r7,8 } 80111ac: b8 e0 08 00 mv r1,r7 80111b0: 2b 9d 00 04 lw ra,(sp+4) 80111b4: 2b 8b 00 24 lw r11,(sp+36) 80111b8: 2b 8c 00 20 lw r12,(sp+32) 80111bc: 2b 8d 00 1c lw r13,(sp+28) 80111c0: 2b 8e 00 18 lw r14,(sp+24) 80111c4: 2b 8f 00 14 lw r15,(sp+20) 80111c8: 2b 90 00 10 lw r16,(sp+16) 80111cc: 2b 91 00 0c lw r17,(sp+12) 80111d0: 2b 92 00 08 lw r18,(sp+8) 80111d4: 37 9c 00 24 addi sp,sp,36 80111d8: c3 a0 00 00 ret =============================================================================== 08009f70 : rtems_status_code rtems_rate_monotonic_get_statistics( rtems_id id, rtems_rate_monotonic_period_statistics *statistics ) { 8009f70: 37 9c ff f0 addi sp,sp,-16 8009f74: 5b 8b 00 0c sw (sp+12),r11 8009f78: 5b 8c 00 08 sw (sp+8),r12 8009f7c: 5b 9d 00 04 sw (sp+4),ra 8009f80: b8 40 58 00 mv r11,r2 Objects_Locations location; Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics ) 8009f84: 34 03 00 09 mvi r3,9 rtems_status_code rtems_rate_monotonic_get_statistics( rtems_id id, rtems_rate_monotonic_period_statistics *statistics ) { 8009f88: b8 20 10 00 mv r2,r1 Objects_Locations location; Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics ) 8009f8c: 45 60 00 26 be r11,r0,800a024 8009f90: 78 01 08 02 mvhi r1,0x802 8009f94: 37 83 00 10 addi r3,sp,16 8009f98: 38 21 28 04 ori r1,r1,0x2804 8009f9c: fb ff ee e4 calli 8005b2c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 8009fa0: 2b 8c 00 10 lw r12,(sp+16) 8009fa4: 34 03 00 04 mvi r3,4 8009fa8: 5d 80 00 1f bne r12,r0,800a024 <== NEVER TAKEN case OBJECTS_LOCAL: dst = statistics; src = &the_period->Statistics; dst->count = src->count; 8009fac: 28 22 00 54 lw r2,(r1+84) 8009fb0: 59 62 00 00 sw (r11+0),r2 dst->missed_count = src->missed_count; 8009fb4: 28 22 00 58 lw r2,(r1+88) 8009fb8: 59 62 00 04 sw (r11+4),r2 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time ); 8009fbc: 28 22 00 5c lw r2,(r1+92) 8009fc0: 59 62 00 08 sw (r11+8),r2 8009fc4: 28 22 00 60 lw r2,(r1+96) 8009fc8: 59 62 00 0c sw (r11+12),r2 _Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time ); 8009fcc: 28 22 00 64 lw r2,(r1+100) 8009fd0: 59 62 00 10 sw (r11+16),r2 8009fd4: 28 22 00 68 lw r2,(r1+104) 8009fd8: 59 62 00 14 sw (r11+20),r2 _Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time ); 8009fdc: 28 22 00 6c lw r2,(r1+108) 8009fe0: 59 62 00 18 sw (r11+24),r2 8009fe4: 28 22 00 70 lw r2,(r1+112) 8009fe8: 59 62 00 1c sw (r11+28),r2 _Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time ); 8009fec: 28 22 00 74 lw r2,(r1+116) 8009ff0: 59 62 00 20 sw (r11+32),r2 8009ff4: 28 22 00 78 lw r2,(r1+120) 8009ff8: 59 62 00 24 sw (r11+36),r2 _Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time ); 8009ffc: 28 22 00 7c lw r2,(r1+124) 800a000: 59 62 00 28 sw (r11+40),r2 800a004: 28 22 00 80 lw r2,(r1+128) 800a008: 59 62 00 2c sw (r11+44),r2 _Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time ); 800a00c: 28 22 00 84 lw r2,(r1+132) 800a010: 59 62 00 30 sw (r11+48),r2 800a014: 28 21 00 88 lw r1,(r1+136) 800a018: 59 61 00 34 sw (r11+52),r1 dst->min_wall_time = src->min_wall_time; dst->max_wall_time = src->max_wall_time; dst->total_wall_time = src->total_wall_time; #endif _Thread_Enable_dispatch(); 800a01c: fb ff f1 23 calli 80064a8 <_Thread_Enable_dispatch> 800a020: b9 80 18 00 mv r3,r12 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 800a024: b8 60 08 00 mv r1,r3 800a028: 2b 9d 00 04 lw ra,(sp+4) 800a02c: 2b 8b 00 0c lw r11,(sp+12) 800a030: 2b 8c 00 08 lw r12,(sp+8) 800a034: 37 9c 00 10 addi sp,sp,16 800a038: c3 a0 00 00 ret =============================================================================== 080036ec : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 80036ec: 37 9c ff e8 addi sp,sp,-24 80036f0: 5b 8b 00 14 sw (sp+20),r11 80036f4: 5b 8c 00 10 sw (sp+16),r12 80036f8: 5b 8d 00 0c sw (sp+12),r13 80036fc: 5b 8e 00 08 sw (sp+8),r14 8003700: 5b 9d 00 04 sw (sp+4),ra 8003704: b8 20 70 00 mv r14,r1 RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 8003708: 78 01 08 02 mvhi r1,0x802 800370c: b8 40 60 00 mv r12,r2 8003710: 38 21 28 04 ori r1,r1,0x2804 8003714: b9 c0 10 00 mv r2,r14 8003718: 37 83 00 18 addi r3,sp,24 800371c: f8 00 09 04 calli 8005b2c <_Objects_Get> 8003720: 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 ) { 8003724: 2b 81 00 18 lw r1,(sp+24) 8003728: 5c 20 00 61 bne r1,r0,80038ac case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 800372c: 78 03 08 02 mvhi r3,0x802 8003730: 38 63 29 f8 ori r3,r3,0x29f8 8003734: 28 61 00 00 lw r1,(r3+0) 8003738: 29 62 00 40 lw r2,(r11+64) 800373c: 44 41 00 04 be r2,r1,800374c _Thread_Enable_dispatch(); 8003740: f8 00 0b 5a calli 80064a8 <_Thread_Enable_dispatch> 8003744: 34 0b 00 17 mvi r11,23 return RTEMS_NOT_OWNER_OF_RESOURCE; 8003748: e0 00 00 5a bi 80038b0 } if ( length == RTEMS_PERIOD_STATUS ) { 800374c: 5d 80 00 0d bne r12,r0,8003780 switch ( the_period->state ) { 8003750: 29 61 00 38 lw r1,(r11+56) 8003754: 34 02 00 04 mvi r2,4 8003758: 50 41 00 03 bgeu r2,r1,8003764 <== ALWAYS TAKEN 800375c: b9 80 58 00 mv r11,r12 <== NOT EXECUTED 8003760: e0 00 00 51 bi 80038a4 <== NOT EXECUTED 8003764: 78 0b 08 01 mvhi r11,0x801 8003768: 34 02 00 02 mvi r2,2 800376c: 39 6b f5 18 ori r11,r11,0xf518 8003770: fb ff f6 b7 calli 800124c <__ashlsi3> 8003774: b5 61 08 00 add r1,r11,r1 8003778: 28 2b 00 00 lw r11,(r1+0) 800377c: e0 00 00 4a bi 80038a4 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 8003780: 90 00 68 00 rcsr r13,IE 8003784: 34 01 ff fe mvi r1,-2 8003788: a1 a1 08 00 and r1,r13,r1 800378c: d0 01 00 00 wcsr IE,r1 switch ( the_period->state ) { 8003790: 29 63 00 38 lw r3,(r11+56) 8003794: 34 01 00 02 mvi r1,2 8003798: 44 61 00 18 be r3,r1,80037f8 800379c: 34 01 00 04 mvi r1,4 80037a0: 44 61 00 35 be r3,r1,8003874 80037a4: 5c 60 00 42 bne r3,r0,80038ac <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 80037a8: d0 0d 00 00 wcsr IE,r13 /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 80037ac: b9 60 08 00 mv r1,r11 80037b0: fb ff ff 31 calli 8003474 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 80037b4: 78 03 08 00 mvhi r3,0x800 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 80037b8: 34 0d 00 00 mvi r13,0 the_watchdog->routine = routine; 80037bc: 38 63 3c 38 ori r3,r3,0x3c38 the_period->state = RATE_MONOTONIC_ACTIVE; 80037c0: 34 02 00 02 mvi r2,2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 80037c4: 78 01 08 02 mvhi r1,0x802 80037c8: 59 62 00 38 sw (r11+56),r2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 80037cc: 59 63 00 2c sw (r11+44),r3 the_watchdog->id = id; 80037d0: 59 6e 00 30 sw (r11+48),r14 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 80037d4: 59 6c 00 1c sw (r11+28),r12 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 80037d8: 35 62 00 10 addi r2,r11,16 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 80037dc: 59 6d 00 18 sw (r11+24),r13 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 80037e0: 59 6d 00 34 sw (r11+52),r13 _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 80037e4: 59 6c 00 3c sw (r11+60),r12 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 80037e8: 38 21 2a 18 ori r1,r1,0x2a18 80037ec: f8 00 10 d4 calli 8007b3c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 80037f0: b9 a0 58 00 mv r11,r13 80037f4: e0 00 00 2c bi 80038a4 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 80037f8: b9 60 08 00 mv r1,r11 80037fc: fb ff ff 7c calli 80035ec <_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; 8003800: 34 01 00 01 mvi r1,1 the_period->next_length = length; 8003804: 59 6c 00 3c sw (r11+60),r12 /* * 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; 8003808: 59 61 00 38 sw (r11+56),r1 the_period->next_length = length; _ISR_Enable( level ); 800380c: d0 0d 00 00 wcsr IE,r13 _Thread_Executing->Wait.id = the_period->Object.id; 8003810: 78 01 08 02 mvhi r1,0x802 8003814: 38 21 29 f8 ori r1,r1,0x29f8 8003818: 28 21 00 00 lw r1,(r1+0) 800381c: 29 63 00 08 lw r3,(r11+8) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 8003820: 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; 8003824: 58 23 00 20 sw (r1+32),r3 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 8003828: f8 00 0d ca calli 8006f50 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 800382c: 90 00 08 00 rcsr r1,IE 8003830: 34 02 ff fe mvi r2,-2 8003834: a0 22 10 00 and r2,r1,r2 8003838: d0 02 00 00 wcsr IE,r2 local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 800383c: 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; 8003840: 29 62 00 38 lw r2,(r11+56) the_period->state = RATE_MONOTONIC_ACTIVE; 8003844: 59 63 00 38 sw (r11+56),r3 _ISR_Enable( level ); 8003848: 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 ) 800384c: 34 01 00 03 mvi r1,3 8003850: 5c 41 00 06 bne r2,r1,8003868 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 8003854: 78 01 08 02 mvhi r1,0x802 8003858: 38 21 29 f8 ori r1,r1,0x29f8 800385c: 28 21 00 00 lw r1,(r1+0) 8003860: 34 02 40 00 mvi r2,16384 8003864: f8 00 0a 18 calli 80060c4 <_Thread_Clear_state> _Thread_Enable_dispatch(); 8003868: f8 00 0b 10 calli 80064a8 <_Thread_Enable_dispatch> 800386c: 34 0b 00 00 mvi r11,0 return RTEMS_SUCCESSFUL; 8003870: e0 00 00 10 bi 80038b0 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 8003874: b9 60 08 00 mv r1,r11 8003878: fb ff ff 5d calli 80035ec <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 800387c: d0 0d 00 00 wcsr IE,r13 the_period->state = RATE_MONOTONIC_ACTIVE; 8003880: 34 02 00 02 mvi r2,2 8003884: 78 01 08 02 mvhi r1,0x802 8003888: 59 62 00 38 sw (r11+56),r2 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 800388c: 59 6c 00 1c sw (r11+28),r12 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8003890: 35 62 00 10 addi r2,r11,16 the_period->next_length = length; 8003894: 59 6c 00 3c sw (r11+60),r12 8003898: 38 21 2a 18 ori r1,r1,0x2a18 800389c: f8 00 10 a8 calli 8007b3c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 80038a0: 34 0b 00 06 mvi r11,6 80038a4: f8 00 0b 01 calli 80064a8 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 80038a8: e0 00 00 02 bi 80038b0 80038ac: 34 0b 00 04 mvi r11,4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 80038b0: b9 60 08 00 mv r1,r11 80038b4: 2b 9d 00 04 lw ra,(sp+4) 80038b8: 2b 8b 00 14 lw r11,(sp+20) 80038bc: 2b 8c 00 10 lw r12,(sp+16) 80038c0: 2b 8d 00 0c lw r13,(sp+12) 80038c4: 2b 8e 00 08 lw r14,(sp+8) 80038c8: 37 9c 00 18 addi sp,sp,24 80038cc: c3 a0 00 00 ret =============================================================================== 080038d0 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 80038d0: 37 9c ff 5c addi sp,sp,-164 80038d4: 5b 8b 00 44 sw (sp+68),r11 80038d8: 5b 8c 00 40 sw (sp+64),r12 80038dc: 5b 8d 00 3c sw (sp+60),r13 80038e0: 5b 8e 00 38 sw (sp+56),r14 80038e4: 5b 8f 00 34 sw (sp+52),r15 80038e8: 5b 90 00 30 sw (sp+48),r16 80038ec: 5b 91 00 2c sw (sp+44),r17 80038f0: 5b 92 00 28 sw (sp+40),r18 80038f4: 5b 93 00 24 sw (sp+36),r19 80038f8: 5b 94 00 20 sw (sp+32),r20 80038fc: 5b 95 00 1c sw (sp+28),r21 8003900: 5b 96 00 18 sw (sp+24),r22 8003904: 5b 97 00 14 sw (sp+20),r23 8003908: 5b 98 00 10 sw (sp+16),r24 800390c: 5b 99 00 0c sw (sp+12),r25 8003910: 5b 9b 00 08 sw (sp+8),fp 8003914: 5b 9d 00 04 sw (sp+4),ra 8003918: b8 40 58 00 mv r11,r2 800391c: b8 20 60 00 mv r12,r1 rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 8003920: 44 40 00 73 be r2,r0,8003aec <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 8003924: 78 02 08 01 mvhi r2,0x801 8003928: 38 42 f5 2c ori r2,r2,0xf52c 800392c: d9 60 00 00 call r11 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 8003930: 78 02 08 01 mvhi r2,0x801 8003934: 38 42 f5 4c ori r2,r2,0xf54c 8003938: b9 80 08 00 mv r1,r12 800393c: d9 60 00 00 call r11 (*print)( context, "--- Wall times are in seconds ---\n" ); 8003940: 78 02 08 01 mvhi r2,0x801 8003944: 38 42 f5 70 ori r2,r2,0xf570 8003948: b9 80 08 00 mv r1,r12 800394c: d9 60 00 00 call r11 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 8003950: 78 02 08 01 mvhi r2,0x801 8003954: 38 42 f5 94 ori r2,r2,0xf594 8003958: b9 80 08 00 mv r1,r12 800395c: d9 60 00 00 call r11 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 8003960: 78 02 08 01 mvhi r2,0x801 8003964: b9 80 08 00 mv r1,r12 8003968: 38 42 f5 e0 ori r2,r2,0xf5e0 800396c: d9 60 00 00 call r11 /* * 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 ; 8003970: 78 01 08 02 mvhi r1,0x802 8003974: 38 21 28 04 ori r1,r1,0x2804 8003978: b8 20 80 00 mv r16,r1 800397c: 28 2d 00 08 lw r13,(r1+8) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 8003980: 37 99 00 48 addi r25,sp,72 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 ); 8003984: 37 98 00 80 addi r24,sp,128 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 8003988: 37 8f 00 a0 addi r15,sp,160 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 800398c: 78 17 08 01 mvhi r23,0x801 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 ); 8003990: 37 96 00 60 addi r22,sp,96 8003994: 37 8e 00 98 addi r14,sp,152 (*print)( context, 8003998: 78 15 08 01 mvhi r21,0x801 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); 800399c: 37 94 00 78 addi r20,sp,120 (*print)( context, 80039a0: 78 13 08 01 mvhi r19,0x801 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 80039a4: 78 12 08 01 mvhi r18,0x801 /* * 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 ; 80039a8: e0 00 00 4d bi 8003adc id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 80039ac: f8 00 19 71 calli 8009f70 80039b0: b8 20 88 00 mv r17,r1 if ( status != RTEMS_SUCCESSFUL ) 80039b4: 5c 20 00 49 bne r1,r0,8003ad8 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 80039b8: bb 00 10 00 mv r2,r24 80039bc: b9 a0 08 00 mv r1,r13 80039c0: f8 00 19 9f calli 800a03c #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 80039c4: 2b 81 00 80 lw r1,(sp+128) 80039c8: b9 e0 18 00 mv r3,r15 80039cc: 34 02 00 05 mvi r2,5 80039d0: f8 00 00 c9 calli 8003cf4 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 80039d4: 2b 85 00 48 lw r5,(sp+72) 80039d8: 2b 86 00 4c lw r6,(sp+76) 80039dc: ba e0 10 00 mv r2,r23 80039e0: b9 a0 18 00 mv r3,r13 80039e4: 38 42 f6 2c ori r2,r2,0xf62c 80039e8: b9 80 08 00 mv r1,r12 80039ec: b9 e0 20 00 mv r4,r15 80039f0: d9 60 00 00 call r11 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 80039f4: 2b 85 00 48 lw r5,(sp+72) (*print)( context, "\n" ); 80039f8: ba 40 10 00 mv r2,r18 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 ); 80039fc: b9 c0 18 00 mv r3,r14 8003a00: ba c0 08 00 mv r1,r22 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 8003a04: 38 42 eb 20 ori r2,r2,0xeb20 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 8003a08: 5c b1 00 04 bne r5,r17,8003a18 (*print)( context, "\n" ); 8003a0c: b9 80 08 00 mv r1,r12 8003a10: d9 60 00 00 call r11 continue; 8003a14: e0 00 00 31 bi 8003ad8 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 ); 8003a18: b8 a0 10 00 mv r2,r5 8003a1c: f8 00 0f 0e calli 8007654 <_Timespec_Divide_by_integer> (*print)( context, 8003a20: 2b 81 00 54 lw r1,(sp+84) 8003a24: 34 02 03 e8 mvi r2,1000 8003a28: f8 00 68 5b calli 801db94 <__divsi3> 8003a2c: b8 20 d8 00 mv fp,r1 8003a30: 2b 81 00 5c lw r1,(sp+92) 8003a34: 34 02 03 e8 mvi r2,1000 8003a38: f8 00 68 57 calli 801db94 <__divsi3> 8003a3c: b8 20 88 00 mv r17,r1 8003a40: 2b 81 00 9c lw r1,(sp+156) 8003a44: 34 02 03 e8 mvi r2,1000 8003a48: f8 00 68 53 calli 801db94 <__divsi3> 8003a4c: 2b 85 00 58 lw r5,(sp+88) 8003a50: 2b 87 00 98 lw r7,(sp+152) 8003a54: 2b 83 00 50 lw r3,(sp+80) 8003a58: ba a0 10 00 mv r2,r21 8003a5c: b8 20 40 00 mv r8,r1 8003a60: bb 60 20 00 mv r4,fp 8003a64: ba 20 30 00 mv r6,r17 8003a68: 38 42 f6 44 ori r2,r2,0xf644 8003a6c: b9 80 08 00 mv r1,r12 8003a70: d9 60 00 00 call r11 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); 8003a74: 2b 82 00 48 lw r2,(sp+72) 8003a78: b9 c0 18 00 mv r3,r14 8003a7c: ba 80 08 00 mv r1,r20 8003a80: f8 00 0e f5 calli 8007654 <_Timespec_Divide_by_integer> (*print)( context, 8003a84: 2b 81 00 6c lw r1,(sp+108) 8003a88: 34 02 03 e8 mvi r2,1000 8003a8c: f8 00 68 42 calli 801db94 <__divsi3> 8003a90: b8 20 d8 00 mv fp,r1 8003a94: 2b 81 00 74 lw r1,(sp+116) 8003a98: 34 02 03 e8 mvi r2,1000 8003a9c: f8 00 68 3e calli 801db94 <__divsi3> 8003aa0: b8 20 88 00 mv r17,r1 8003aa4: 2b 81 00 9c lw r1,(sp+156) 8003aa8: 34 02 03 e8 mvi r2,1000 8003aac: f8 00 68 3a calli 801db94 <__divsi3> 8003ab0: 2b 83 00 68 lw r3,(sp+104) 8003ab4: 2b 85 00 70 lw r5,(sp+112) 8003ab8: 2b 87 00 98 lw r7,(sp+152) 8003abc: ba 60 10 00 mv r2,r19 8003ac0: b8 20 40 00 mv r8,r1 8003ac4: bb 60 20 00 mv r4,fp 8003ac8: b9 80 08 00 mv r1,r12 8003acc: ba 20 30 00 mv r6,r17 8003ad0: 38 42 f6 64 ori r2,r2,0xf664 8003ad4: d9 60 00 00 call r11 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 8003ad8: 35 ad 00 01 addi r13,r13,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 ; 8003adc: 2a 03 00 0c lw r3,(r16+12) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 8003ae0: b9 a0 08 00 mv r1,r13 8003ae4: bb 20 10 00 mv r2,r25 /* * 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 ; 8003ae8: 50 6d ff b1 bgeu r3,r13,80039ac the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 8003aec: 2b 9d 00 04 lw ra,(sp+4) 8003af0: 2b 8b 00 44 lw r11,(sp+68) 8003af4: 2b 8c 00 40 lw r12,(sp+64) 8003af8: 2b 8d 00 3c lw r13,(sp+60) 8003afc: 2b 8e 00 38 lw r14,(sp+56) 8003b00: 2b 8f 00 34 lw r15,(sp+52) 8003b04: 2b 90 00 30 lw r16,(sp+48) 8003b08: 2b 91 00 2c lw r17,(sp+44) 8003b0c: 2b 92 00 28 lw r18,(sp+40) 8003b10: 2b 93 00 24 lw r19,(sp+36) 8003b14: 2b 94 00 20 lw r20,(sp+32) 8003b18: 2b 95 00 1c lw r21,(sp+28) 8003b1c: 2b 96 00 18 lw r22,(sp+24) 8003b20: 2b 97 00 14 lw r23,(sp+20) 8003b24: 2b 98 00 10 lw r24,(sp+16) 8003b28: 2b 99 00 0c lw r25,(sp+12) 8003b2c: 2b 9b 00 08 lw fp,(sp+8) 8003b30: 37 9c 00 a4 addi sp,sp,164 8003b34: c3 a0 00 00 ret =============================================================================== 08012b50 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 8012b50: 37 9c ff f4 addi sp,sp,-12 8012b54: 5b 8b 00 08 sw (sp+8),r11 8012b58: 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 ) 8012b5c: 34 03 00 0a mvi r3,10 rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 8012b60: 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 ) 8012b64: 44 40 00 2e be r2,r0,8012c1c return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 8012b68: 37 82 00 0c addi r2,sp,12 8012b6c: f8 00 13 af calli 8017a28 <_Thread_Get> switch ( location ) { 8012b70: 2b 82 00 0c lw r2,(sp+12) 8012b74: 34 03 00 04 mvi r3,4 8012b78: 5c 40 00 29 bne r2,r0,8012c1c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 8012b7c: 28 23 01 24 lw r3,(r1+292) asr = &api->Signal; 8012b80: 28 64 00 0c lw r4,(r3+12) 8012b84: 44 82 00 24 be r4,r2,8012c14 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 8012b88: 40 62 00 08 lbu r2,(r3+8) 8012b8c: 44 40 00 17 be r2,r0,8012be8 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 8012b90: 90 00 10 00 rcsr r2,IE 8012b94: 34 04 ff fe mvi r4,-2 8012b98: a0 44 20 00 and r4,r2,r4 8012b9c: d0 04 00 00 wcsr IE,r4 *signal_set |= signals; 8012ba0: 28 64 00 14 lw r4,(r3+20) 8012ba4: b8 8b 58 00 or r11,r4,r11 8012ba8: 58 6b 00 14 sw (r3+20),r11 _ISR_Enable( _level ); 8012bac: d0 02 00 00 wcsr IE,r2 _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 ) ) 8012bb0: 78 02 08 03 mvhi r2,0x803 8012bb4: 38 42 dc cc ori r2,r2,0xdccc 8012bb8: 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; 8012bbc: 34 03 00 01 mvi r3,1 8012bc0: 30 23 00 74 sb (r1+116),r3 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 8012bc4: 44 40 00 11 be r2,r0,8012c08 8012bc8: 78 02 08 03 mvhi r2,0x803 8012bcc: 38 42 dc f0 ori r2,r2,0xdcf0 8012bd0: 28 42 00 00 lw r2,(r2+0) 8012bd4: 5c 22 00 0d bne r1,r2,8012c08 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 8012bd8: 78 01 08 03 mvhi r1,0x803 8012bdc: 38 21 dd 88 ori r1,r1,0xdd88 8012be0: 30 23 00 00 sb (r1+0),r3 8012be4: e0 00 00 09 bi 8012c08 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 8012be8: 90 00 08 00 rcsr r1,IE 8012bec: 34 02 ff fe mvi r2,-2 8012bf0: a0 22 10 00 and r2,r1,r2 8012bf4: d0 02 00 00 wcsr IE,r2 *signal_set |= signals; 8012bf8: 28 62 00 18 lw r2,(r3+24) 8012bfc: b8 4b 58 00 or r11,r2,r11 8012c00: 58 6b 00 18 sw (r3+24),r11 _ISR_Enable( _level ); 8012c04: d0 01 00 00 wcsr IE,r1 } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 8012c08: f8 00 13 68 calli 80179a8 <_Thread_Enable_dispatch> 8012c0c: 34 03 00 00 mvi r3,0 return RTEMS_SUCCESSFUL; 8012c10: e0 00 00 03 bi 8012c1c } _Thread_Enable_dispatch(); 8012c14: f8 00 13 65 calli 80179a8 <_Thread_Enable_dispatch> 8012c18: 34 03 00 0b mvi r3,11 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8012c1c: b8 60 08 00 mv r1,r3 8012c20: 2b 9d 00 04 lw ra,(sp+4) 8012c24: 2b 8b 00 08 lw r11,(sp+8) 8012c28: 37 9c 00 0c addi sp,sp,12 8012c2c: c3 a0 00 00 ret =============================================================================== 0800a31c : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 800a31c: 37 9c ff e0 addi sp,sp,-32 800a320: 5b 8b 00 20 sw (sp+32),r11 800a324: 5b 8c 00 1c sw (sp+28),r12 800a328: 5b 8d 00 18 sw (sp+24),r13 800a32c: 5b 8e 00 14 sw (sp+20),r14 800a330: 5b 8f 00 10 sw (sp+16),r15 800a334: 5b 90 00 0c sw (sp+12),r16 800a338: 5b 91 00 08 sw (sp+8),r17 800a33c: 5b 9d 00 04 sw (sp+4),ra ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 800a340: 34 04 00 09 mvi r4,9 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 800a344: b8 60 80 00 mv r16,r3 800a348: b8 20 68 00 mv r13,r1 800a34c: b8 40 70 00 mv r14,r2 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 800a350: 44 60 00 51 be r3,r0,800a494 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 800a354: 78 01 08 01 mvhi r1,0x801 800a358: 38 21 c8 e8 ori r1,r1,0xc8e8 800a35c: 28 2b 00 00 lw r11,(r1+0) api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 800a360: 34 0f 00 00 mvi r15,0 800a364: 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 ]; 800a368: 29 6c 01 24 lw r12,(r11+292) asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 800a36c: 5c 2f 00 02 bne r1,r15,800a374 800a370: 34 0f 01 00 mvi r15,256 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 800a374: 29 61 00 7c lw r1,(r11+124) 800a378: 44 20 00 02 be r1,r0,800a380 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 800a37c: 39 ef 02 00 ori r15,r15,0x200 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 800a380: 41 81 00 08 lbu r1,(r12+8) 800a384: 34 11 00 00 mvi r17,0 800a388: 5c 31 00 02 bne r1,r17,800a390 800a38c: 34 11 04 00 mvi r17,1024 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(); 800a390: fb ff ed f3 calli 8005b5c <_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; 800a394: ba 21 88 00 or r17,r17,r1 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 800a398: ba 2f 88 00 or r17,r17,r15 800a39c: 5a 11 00 00 sw (r16+0),r17 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 800a3a0: 21 c1 01 00 andi r1,r14,0x100 800a3a4: 44 20 00 07 be r1,r0,800a3c0 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 800a3a8: b9 a0 08 00 mv r1,r13 800a3ac: 34 02 00 08 mvi r2,8 800a3b0: fb ff d7 b8 calli 8000290 <__lshrsi3> 800a3b4: 18 21 00 01 xori r1,r1,0x1 800a3b8: 20 21 00 01 andi r1,r1,0x1 800a3bc: 31 61 00 75 sb (r11+117),r1 if ( mask & RTEMS_TIMESLICE_MASK ) { 800a3c0: 21 c1 02 00 andi r1,r14,0x200 800a3c4: 44 20 00 0b be r1,r0,800a3f0 if ( _Modes_Is_timeslice(mode_set) ) { 800a3c8: 21 a1 02 00 andi r1,r13,0x200 800a3cc: 44 20 00 08 be r1,r0,800a3ec executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 800a3d0: 78 01 08 01 mvhi r1,0x801 800a3d4: 38 21 c7 bc ori r1,r1,0xc7bc 800a3d8: 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; 800a3dc: 34 02 00 01 mvi r2,1 800a3e0: 59 62 00 7c sw (r11+124),r2 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 800a3e4: 59 61 00 78 sw (r11+120),r1 800a3e8: e0 00 00 02 bi 800a3f0 } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 800a3ec: 59 61 00 7c sw (r11+124),r1 /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 800a3f0: 21 c1 00 01 andi r1,r14,0x1 800a3f4: 44 20 00 04 be r1,r0,800a404 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 800a3f8: 19 a1 00 01 xori r1,r13,0x1 800a3fc: 20 21 00 01 andi r1,r1,0x1 800a400: d0 01 00 00 wcsr IE,r1 */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 800a404: 21 ce 04 00 andi r14,r14,0x400 800a408: 45 c0 00 18 be r14,r0,800a468 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 800a40c: 34 02 00 0a mvi r2,10 800a410: b9 a0 08 00 mv r1,r13 800a414: fb ff d7 9f calli 8000290 <__lshrsi3> if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 800a418: 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( 800a41c: 18 21 00 01 xori r1,r1,0x1 800a420: 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; 800a424: 44 41 00 11 be r2,r1,800a468 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; 800a428: 31 81 00 08 sb (r12+8),r1 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 800a42c: 90 00 08 00 rcsr r1,IE 800a430: 34 02 ff fe mvi r2,-2 800a434: a0 22 10 00 and r2,r1,r2 800a438: d0 02 00 00 wcsr IE,r2 _signals = information->signals_pending; 800a43c: 29 82 00 18 lw r2,(r12+24) information->signals_pending = information->signals_posted; 800a440: 29 83 00 14 lw r3,(r12+20) information->signals_posted = _signals; 800a444: 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; 800a448: 59 83 00 18 sw (r12+24),r3 information->signals_posted = _signals; _ISR_Enable( _level ); 800a44c: 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; 800a450: 29 81 00 14 lw r1,(r12+20) 800a454: 44 20 00 05 be r1,r0,800a468 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; 800a458: 34 01 00 01 mvi r1,1 800a45c: 31 61 00 74 sb (r11+116),r1 800a460: b8 20 58 00 mv r11,r1 800a464: e0 00 00 02 bi 800a46c 800a468: 34 0b 00 00 mvi r11,0 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 800a46c: 78 01 08 01 mvhi r1,0x801 800a470: 38 21 c9 c8 ori r1,r1,0xc9c8 800a474: 28 22 00 00 lw r2,(r1+0) 800a478: 34 01 00 03 mvi r1,3 800a47c: 5c 41 00 05 bne r2,r1,800a490 <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 800a480: f8 00 01 0f calli 800a8bc <_Thread_Evaluate_mode> 800a484: 5c 20 00 02 bne r1,r0,800a48c 800a488: 45 61 00 02 be r11,r1,800a490 _Thread_Dispatch(); 800a48c: fb ff e7 0f calli 80040c8 <_Thread_Dispatch> 800a490: 34 04 00 00 mvi r4,0 return RTEMS_SUCCESSFUL; } 800a494: b8 80 08 00 mv r1,r4 800a498: 2b 9d 00 04 lw ra,(sp+4) 800a49c: 2b 8b 00 20 lw r11,(sp+32) 800a4a0: 2b 8c 00 1c lw r12,(sp+28) 800a4a4: 2b 8d 00 18 lw r13,(sp+24) 800a4a8: 2b 8e 00 14 lw r14,(sp+20) 800a4ac: 2b 8f 00 10 lw r15,(sp+16) 800a4b0: 2b 90 00 0c lw r16,(sp+12) 800a4b4: 2b 91 00 08 lw r17,(sp+8) 800a4b8: 37 9c 00 20 addi sp,sp,32 800a4bc: c3 a0 00 00 ret =============================================================================== 080087a8 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 80087a8: 37 9c ff f0 addi sp,sp,-16 80087ac: 5b 8b 00 0c sw (sp+12),r11 80087b0: 5b 8c 00 08 sw (sp+8),r12 80087b4: 5b 9d 00 04 sw (sp+4),ra 80087b8: b8 40 58 00 mv r11,r2 80087bc: b8 60 60 00 mv r12,r3 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 80087c0: 44 40 00 07 be r2,r0,80087dc 80087c4: 78 02 08 02 mvhi r2,0x802 80087c8: 38 42 40 c0 ori r2,r2,0x40c0 80087cc: 40 42 00 00 lbu r2,(r2+0) 80087d0: 50 4b 00 03 bgeu r2,r11,80087dc 80087d4: 34 02 00 13 mvi r2,19 80087d8: e0 00 00 15 bi 800882c !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 80087dc: 34 02 00 09 mvi r2,9 80087e0: 45 80 00 13 be r12,r0,800882c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 80087e4: 37 82 00 10 addi r2,sp,16 80087e8: f8 00 09 8d calli 800ae1c <_Thread_Get> switch ( location ) { 80087ec: 2b 84 00 10 lw r4,(sp+16) 80087f0: 34 02 00 04 mvi r2,4 80087f4: 5c 80 00 0e bne r4,r0,800882c case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 80087f8: 28 22 00 14 lw r2,(r1+20) 80087fc: 59 82 00 00 sw (r12+0),r2 if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 8008800: 45 64 00 09 be r11,r4,8008824 the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 8008804: 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; 8008808: 58 2b 00 18 sw (r1+24),r11 if ( the_thread->resource_count == 0 || 800880c: 44 40 00 03 be r2,r0,8008818 the_thread->current_priority > new_priority ) 8008810: 28 22 00 14 lw r2,(r1+20) 8008814: 51 62 00 04 bgeu r11,r2,8008824 <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 8008818: b9 60 10 00 mv r2,r11 800881c: 34 03 00 00 mvi r3,0 8008820: f8 00 07 bb calli 800a70c <_Thread_Change_priority> } _Thread_Enable_dispatch(); 8008824: f8 00 09 5e calli 800ad9c <_Thread_Enable_dispatch> 8008828: 34 02 00 00 mvi r2,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 800882c: b8 40 08 00 mv r1,r2 8008830: 2b 9d 00 04 lw ra,(sp+4) 8008834: 2b 8b 00 0c lw r11,(sp+12) 8008838: 2b 8c 00 08 lw r12,(sp+8) 800883c: 37 9c 00 10 addi sp,sp,16 8008840: c3 a0 00 00 ret =============================================================================== 08013728 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 8013728: 37 9c ff f8 addi sp,sp,-8 801372c: 5b 9d 00 04 sw (sp+4),ra 8013730: b8 20 10 00 mv r2,r1 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 8013734: 78 01 08 03 mvhi r1,0x803 8013738: 37 83 00 08 addi r3,sp,8 801373c: 38 21 de 80 ori r1,r1,0xde80 8013740: f8 00 0d b6 calli 8016e18 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 8013744: 2b 83 00 08 lw r3,(sp+8) 8013748: 34 02 00 04 mvi r2,4 801374c: 5c 60 00 07 bne r3,r0,8013768 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 8013750: 28 23 00 38 lw r3,(r1+56) 8013754: 44 62 00 03 be r3,r2,8013760 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 8013758: 34 21 00 10 addi r1,r1,16 801375c: f8 00 17 6d calli 8019510 <_Watchdog_Remove> _Thread_Enable_dispatch(); 8013760: f8 00 10 92 calli 80179a8 <_Thread_Enable_dispatch> 8013764: 34 02 00 00 mvi r2,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8013768: b8 40 08 00 mv r1,r2 801376c: 2b 9d 00 04 lw ra,(sp+4) 8013770: 37 9c 00 08 addi sp,sp,8 8013774: c3 a0 00 00 ret =============================================================================== 08013d68 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 8013d68: 37 9c ff d8 addi sp,sp,-40 8013d6c: 5b 8b 00 24 sw (sp+36),r11 8013d70: 5b 8c 00 20 sw (sp+32),r12 8013d74: 5b 8d 00 1c sw (sp+28),r13 8013d78: 5b 8e 00 18 sw (sp+24),r14 8013d7c: 5b 8f 00 14 sw (sp+20),r15 8013d80: 5b 90 00 10 sw (sp+16),r16 8013d84: 5b 91 00 0c sw (sp+12),r17 8013d88: 5b 92 00 08 sw (sp+8),r18 8013d8c: 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; 8013d90: 78 05 08 03 mvhi r5,0x803 8013d94: 38 a5 de c0 ori r5,r5,0xdec0 8013d98: 28 ae 00 00 lw r14,(r5+0) rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 8013d9c: b8 20 88 00 mv r17,r1 8013da0: b8 40 58 00 mv r11,r2 8013da4: b8 60 78 00 mv r15,r3 8013da8: b8 80 90 00 mv r18,r4 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 8013dac: 34 05 00 0e mvi r5,14 8013db0: 45 c0 00 2e be r14,r0,8013e68 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 8013db4: 78 05 08 03 mvhi r5,0x803 8013db8: 38 a5 dc 48 ori r5,r5,0xdc48 8013dbc: 40 a1 00 00 lbu r1,(r5+0) 8013dc0: 34 05 00 0b mvi r5,11 8013dc4: 44 20 00 29 be r1,r0,8013e68 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 8013dc8: 34 05 00 09 mvi r5,9 8013dcc: 44 60 00 27 be r3,r0,8013e68 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 8013dd0: b8 40 08 00 mv r1,r2 8013dd4: fb ff f1 58 calli 8010334 <_TOD_Validate> 8013dd8: 44 20 00 23 be r1,r0,8013e64 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) 8013ddc: 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 ); 8013de0: b9 60 08 00 mv r1,r11 8013de4: fb ff f1 14 calli 8010234 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 8013de8: 39 8c dc c4 ori r12,r12,0xdcc4 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 8013dec: b8 20 80 00 mv r16,r1 if ( seconds <= _TOD_Seconds_since_epoch() ) 8013df0: 29 81 00 00 lw r1,(r12+0) 8013df4: 50 30 00 1c bgeu r1,r16,8013e64 8013df8: 78 01 08 03 mvhi r1,0x803 8013dfc: 38 21 de 80 ori r1,r1,0xde80 8013e00: ba 20 10 00 mv r2,r17 8013e04: 37 83 00 28 addi r3,sp,40 8013e08: f8 00 0c 04 calli 8016e18 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 8013e0c: 2b 8d 00 28 lw r13,(sp+40) 8013e10: b8 20 58 00 mv r11,r1 8013e14: 34 05 00 04 mvi r5,4 8013e18: 5d a0 00 14 bne r13,r0,8013e68 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 8013e1c: 34 21 00 10 addi r1,r1,16 8013e20: f8 00 15 bc calli 8019510 <_Watchdog_Remove> void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 8013e24: 59 71 00 30 sw (r11+48),r17 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(); 8013e28: 29 81 00 00 lw r1,(r12+0) (*timer_server->schedule_operation)( timer_server, the_timer ); 8013e2c: 29 c3 00 04 lw r3,(r14+4) 8013e30: b9 60 10 00 mv r2,r11 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(); 8013e34: ca 01 80 00 sub r16,r16,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; 8013e38: 34 01 00 03 mvi r1,3 8013e3c: 59 61 00 38 sw (r11+56),r1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 8013e40: 59 6f 00 2c sw (r11+44),r15 _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 ); 8013e44: b9 c0 08 00 mv r1,r14 the_watchdog->id = id; the_watchdog->user_data = user_data; 8013e48: 59 72 00 34 sw (r11+52),r18 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(); 8013e4c: 59 70 00 1c sw (r11+28),r16 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 8013e50: 59 6d 00 18 sw (r11+24),r13 (*timer_server->schedule_operation)( timer_server, the_timer ); 8013e54: d8 60 00 00 call r3 _Thread_Enable_dispatch(); 8013e58: f8 00 0e d4 calli 80179a8 <_Thread_Enable_dispatch> 8013e5c: b9 a0 28 00 mv r5,r13 return RTEMS_SUCCESSFUL; 8013e60: e0 00 00 02 bi 8013e68 8013e64: 34 05 00 14 mvi r5,20 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8013e68: b8 a0 08 00 mv r1,r5 8013e6c: 2b 9d 00 04 lw ra,(sp+4) 8013e70: 2b 8b 00 24 lw r11,(sp+36) 8013e74: 2b 8c 00 20 lw r12,(sp+32) 8013e78: 2b 8d 00 1c lw r13,(sp+28) 8013e7c: 2b 8e 00 18 lw r14,(sp+24) 8013e80: 2b 8f 00 14 lw r15,(sp+20) 8013e84: 2b 90 00 10 lw r16,(sp+16) 8013e88: 2b 91 00 0c lw r17,(sp+12) 8013e8c: 2b 92 00 08 lw r18,(sp+8) 8013e90: 37 9c 00 28 addi sp,sp,40 8013e94: c3 a0 00 00 ret