=============================================================================== ffc11694 : /** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick(); ffc11694: 3d 20 ff c3 lis r9,-61 ffc11698: 81 49 81 f4 lwz r10,-32268(r9) ticks = microseconds / microseconds_per_tick; ffc1169c: 7d 23 53 96 divwu r9,r3,r10 if ( (microseconds % microseconds_per_tick) != 0 ) ffc116a0: 7d 49 51 d6 mullw r10,r9,r10 ffc116a4: 7f 83 50 00 cmpw cr7,r3,r10 ffc116a8: 41 9e 00 08 beq- cr7,ffc116b0 <== ALWAYS TAKEN ticks += 1; ffc116ac: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED return ticks; } ffc116b0: 7d 23 4b 78 mr r3,r9 ffc116b4: 4e 80 00 20 blr =============================================================================== ffc0b750 : /** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick(); ffc0b750: 3d 20 ff c2 lis r9,-62 ffc0b754: 81 29 e9 e4 lwz r9,-5660(r9) ffc0b758: 3d 40 10 62 lis r10,4194 ffc0b75c: 61 4a 4d d3 ori r10,r10,19923 ffc0b760: 7d 49 50 16 mulhwu r10,r9,r10 ffc0b764: 55 4a d1 be rlwinm r10,r10,26,6,31 ticks = milliseconds / milliseconds_per_tick; ffc0b768: 7d 23 53 96 divwu r9,r3,r10 if ( (milliseconds % milliseconds_per_tick) != 0 ) ffc0b76c: 7d 49 51 d6 mullw r10,r9,r10 ffc0b770: 7f 83 50 00 cmpw cr7,r3,r10 ffc0b774: 41 9e 00 08 beq- cr7,ffc0b77c <== ALWAYS TAKEN ticks += 1; ffc0b778: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED return ticks; } ffc0b77c: 7d 23 4b 78 mr r3,r9 ffc0b780: 4e 80 00 20 blr =============================================================================== ffc0a604 <_API_extensions_Run_postdriver>: } } #endif void _API_extensions_Run_postdriver( void ) { ffc0a604: 94 21 ff f0 stwu r1,-16(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0a608: 3d 20 00 00 lis r9,0 ffc0a60c: 7c 08 02 a6 mflr r0 ffc0a610: 93 c1 00 08 stw r30,8(r1) ffc0a614: 3b c9 2d b4 addi r30,r9,11700 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc0a618: 3b de 00 04 addi r30,r30,4 } } #endif void _API_extensions_Run_postdriver( void ) { ffc0a61c: 93 e1 00 0c stw r31,12(r1) ffc0a620: 83 e9 2d b4 lwz r31,11700(r9) ffc0a624: 90 01 00 14 stw r0,20(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc0a628: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0a62c: 41 9e 00 1c beq- cr7,ffc0a648 <_API_extensions_Run_postdriver+0x44><== NEVER TAKEN * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); ffc0a630: 81 3f 00 08 lwz r9,8(r31) ffc0a634: 7d 29 03 a6 mtctr r9 ffc0a638: 4e 80 04 21 bctrl Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0a63c: 83 ff 00 00 lwz r31,0(r31) void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc0a640: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0a644: 40 9e ff ec bne+ cr7,ffc0a630 <_API_extensions_Run_postdriver+0x2c><== NEVER TAKEN #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } ffc0a648: 80 01 00 14 lwz r0,20(r1) ffc0a64c: 83 c1 00 08 lwz r30,8(r1) ffc0a650: 7c 08 03 a6 mtlr r0 ffc0a654: 83 e1 00 0c lwz r31,12(r1) ffc0a658: 38 21 00 10 addi r1,r1,16 ffc0a65c: 4e 80 00 20 blr =============================================================================== ffc14ecc <_CORE_message_queue_Initialize>: /* * Check if allocated_message_size is aligned to uintptr-size boundary. * If not, it will increase allocated_message_size to multiplicity of pointer * size. */ if (allocated_message_size & (sizeof(uintptr_t) - 1)) { ffc14ecc: 70 c9 00 03 andi. r9,r6,3 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 ) { ffc14ed0: 94 21 ff e0 stwu r1,-32(r1) ffc14ed4: 7c 08 02 a6 mflr r0 size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; ffc14ed8: 39 20 00 00 li r9,0 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { ffc14edc: 93 a1 00 14 stw r29,20(r1) ffc14ee0: 7c 9d 23 78 mr r29,r4 ffc14ee4: 93 e1 00 1c stw r31,28(r1) ffc14ee8: 7c 7f 1b 78 mr r31,r3 ffc14eec: 90 01 00 24 stw r0,36(r1) ffc14ef0: 93 c1 00 18 stw r30,24(r1) size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; ffc14ef4: 90 a3 00 44 stw r5,68(r3) the_message_queue->number_of_pending_messages = 0; ffc14ef8: 91 23 00 48 stw r9,72(r3) the_message_queue->maximum_message_size = maximum_message_size; ffc14efc: 90 c3 00 4c stw r6,76(r3) /* * Check if allocated_message_size is aligned to uintptr-size boundary. * If not, it will increase allocated_message_size to multiplicity of pointer * size. */ if (allocated_message_size & (sizeof(uintptr_t) - 1)) { ffc14f00: 41 82 00 34 beq- ffc14f34 <_CORE_message_queue_Initialize+0x68> allocated_message_size += sizeof(uintptr_t); ffc14f04: 39 26 00 04 addi r9,r6,4 allocated_message_size &= ~(sizeof(uintptr_t) - 1); ffc14f08: 55 29 00 3a rlwinm r9,r9,0,0,29 /* * Check for an overflow. It can occur while increasing allocated_message_size * to multiplicity of uintptr_t above. */ if (allocated_message_size < maximum_message_size) ffc14f0c: 7f 86 48 40 cmplw cr7,r6,r9 ffc14f10: 40 9d 00 28 ble- cr7,ffc14f38 <_CORE_message_queue_Initialize+0x6c> STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc14f14: 80 01 00 24 lwz r0,36(r1) /* * Check for an overflow. It can occur while increasing allocated_message_size * to multiplicity of uintptr_t above. */ if (allocated_message_size < maximum_message_size) return false; ffc14f18: 38 60 00 00 li r3,0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc14f1c: 83 a1 00 14 lwz r29,20(r1) ffc14f20: 7c 08 03 a6 mtlr r0 ffc14f24: 83 c1 00 18 lwz r30,24(r1) ffc14f28: 83 e1 00 1c lwz r31,28(r1) ffc14f2c: 38 21 00 20 addi r1,r1,32 ffc14f30: 4e 80 00 20 blr /* * Check if allocated_message_size is aligned to uintptr-size boundary. * If not, it will increase allocated_message_size to multiplicity of pointer * size. */ if (allocated_message_size & (sizeof(uintptr_t) - 1)) { ffc14f34: 7c c9 33 78 mr r9,r6 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( ffc14f38: 3b c9 00 10 addi r30,r9,16 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; ffc14f3c: 7d 45 f0 16 mulhwu r10,r5,r30 ffc14f40: 7d 65 f1 d6 mullw r11,r5,r30 if ( x > SIZE_MAX ) ffc14f44: 2f 8a 00 00 cmpwi cr7,r10,0 ffc14f48: 41 bd ff cc bgt- cr7,ffc14f14 <_CORE_message_queue_Initialize+0x48> /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); ffc14f4c: 7d 63 5b 78 mr r3,r11 ffc14f50: 90 a1 00 08 stw r5,8(r1) ffc14f54: 48 00 3a 11 bl ffc18964 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) ffc14f58: 2f 83 00 00 cmpwi cr7,r3,0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) ffc14f5c: 90 7f 00 5c stw r3,92(r31) _Workspace_Allocate( message_buffering_required ); ffc14f60: 7c 64 1b 78 mr r4,r3 if (the_message_queue->message_buffers == 0) ffc14f64: 80 a1 00 08 lwz r5,8(r1) ffc14f68: 41 be ff ac beq- cr7,ffc14f14 <_CORE_message_queue_Initialize+0x48><== NEVER TAKEN /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( ffc14f6c: 38 7f 00 60 addi r3,r31,96 ffc14f70: 7f c6 f3 78 mr r6,r30 ffc14f74: 4b ff ff 05 bl ffc14e78 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_priority( CORE_message_queue_Attributes *the_attribute ) { return ffc14f78: 80 9d 00 00 lwz r4,0(r29) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc14f7c: 39 5f 00 54 addi r10,r31,84 ffc14f80: 39 3f 00 50 addi r9,r31,80 head->next = tail; ffc14f84: 91 5f 00 50 stw r10,80(r31) allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc14f88: 68 84 00 01 xori r4,r4,1 head->previous = NULL; ffc14f8c: 39 40 00 00 li r10,0 tail->previous = head; ffc14f90: 91 3f 00 58 stw r9,88(r31) ffc14f94: 7c 84 00 34 cntlzw r4,r4 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; ffc14f98: 91 5f 00 54 stw r10,84(r31) ffc14f9c: 7f e3 fb 78 mr r3,r31 ffc14fa0: 54 84 d9 7e rlwinm r4,r4,27,5,31 ffc14fa4: 38 a0 00 80 li r5,128 ffc14fa8: 38 c0 00 06 li r6,6 ffc14fac: 48 00 2e 91 bl ffc17e3c <_Thread_queue_Initialize> STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc14fb0: 80 01 00 24 lwz r0,36(r1) ffc14fb4: 83 a1 00 14 lwz r29,20(r1) THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; ffc14fb8: 38 60 00 01 li r3,1 } ffc14fbc: 7c 08 03 a6 mtlr r0 ffc14fc0: 83 c1 00 18 lwz r30,24(r1) ffc14fc4: 83 e1 00 1c lwz r31,28(r1) ffc14fc8: 38 21 00 20 addi r1,r1,32 ffc14fcc: 4e 80 00 20 blr =============================================================================== ffc0a9ec <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc0a9ec: 94 21 ff d8 stwu r1,-40(r1) ffc0a9f0: 7c 08 02 a6 mflr r0 ffc0a9f4: 93 e1 00 24 stw r31,36(r1) * This routine returns true if thread dispatch indicates * that we are in a critical section. */ RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void) { if ( _Thread_Dispatch_disable_level == 0 ) ffc0a9f8: 3f e0 00 00 lis r31,0 ffc0a9fc: 81 3f 28 24 lwz r9,10276(r31) ffc0aa00: 93 61 00 14 stw r27,20(r1) ffc0aa04: 7c db 33 78 mr r27,r6 ffc0aa08: 2f 89 00 00 cmpwi cr7,r9,0 ffc0aa0c: 93 81 00 18 stw r28,24(r1) ffc0aa10: 7c 9c 23 78 mr r28,r4 ffc0aa14: 93 a1 00 1c stw r29,28(r1) ffc0aa18: 7c 7d 1b 78 mr r29,r3 ffc0aa1c: 93 c1 00 20 stw r30,32(r1) ffc0aa20: 7c be 2b 78 mr r30,r5 ffc0aa24: 90 01 00 2c stw r0,44(r1) ffc0aa28: 90 e1 00 08 stw r7,8(r1) ffc0aa2c: 41 9e 00 88 beq- cr7,ffc0aab4 <_CORE_mutex_Seize+0xc8> _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0aa30: 2f 85 00 00 cmpwi cr7,r5,0 ffc0aa34: 41 9e 00 d4 beq- cr7,ffc0ab08 <_CORE_mutex_Seize+0x11c> ffc0aa38: 3d 20 00 00 lis r9,0 ffc0aa3c: 81 29 28 4c lwz r9,10316(r9) ffc0aa40: 2b 89 00 01 cmplwi cr7,r9,1 ffc0aa44: 41 9d 00 d8 bgt- cr7,ffc0ab1c <_CORE_mutex_Seize+0x130> ffc0aa48: 38 81 00 08 addi r4,r1,8 ffc0aa4c: 48 00 52 29 bl ffc0fc74 <_CORE_mutex_Seize_interrupt_trylock> ffc0aa50: 2f 83 00 00 cmpwi cr7,r3,0 ffc0aa54: 41 9e 00 3c beq- cr7,ffc0aa90 <_CORE_mutex_Seize+0xa4> <== ALWAYS TAKEN ffc0aa58: 3d 20 00 00 lis r9,0 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc0aa5c: 81 5f 28 24 lwz r10,10276(r31) ffc0aa60: 81 29 2e 10 lwz r9,11792(r9) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc0aa64: 39 00 00 01 li r8,1 ffc0aa68: 91 1d 00 30 stw r8,48(r29) ++level; ffc0aa6c: 39 4a 00 01 addi r10,r10,1 ffc0aa70: 93 a9 00 44 stw r29,68(r9) ffc0aa74: 93 89 00 20 stw r28,32(r9) _Thread_Dispatch_disable_level = level; ffc0aa78: 91 5f 28 24 stw r10,10276(r31) ffc0aa7c: 81 21 00 08 lwz r9,8(r1) ffc0aa80: 7d 20 01 24 mtmsr r9 ffc0aa84: 7f a3 eb 78 mr r3,r29 ffc0aa88: 7f 64 db 78 mr r4,r27 ffc0aa8c: 4b ff fe 81 bl ffc0a90c <_CORE_mutex_Seize_interrupt_blocking> } ffc0aa90: 80 01 00 2c lwz r0,44(r1) ffc0aa94: 83 61 00 14 lwz r27,20(r1) ffc0aa98: 7c 08 03 a6 mtlr r0 ffc0aa9c: 83 81 00 18 lwz r28,24(r1) ffc0aaa0: 83 a1 00 1c lwz r29,28(r1) ffc0aaa4: 83 c1 00 20 lwz r30,32(r1) ffc0aaa8: 83 e1 00 24 lwz r31,36(r1) ffc0aaac: 38 21 00 28 addi r1,r1,40 ffc0aab0: 4e 80 00 20 blr bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0aab4: 38 81 00 08 addi r4,r1,8 ffc0aab8: 48 00 51 bd bl ffc0fc74 <_CORE_mutex_Seize_interrupt_trylock> ffc0aabc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0aac0: 41 be ff d0 beq- cr7,ffc0aa90 <_CORE_mutex_Seize+0xa4> ffc0aac4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0aac8: 40 be ff 90 bne- cr7,ffc0aa58 <_CORE_mutex_Seize+0x6c> ffc0aacc: 81 21 00 08 lwz r9,8(r1) ffc0aad0: 7d 20 01 24 mtmsr r9 } ffc0aad4: 80 01 00 2c lwz r0,44(r1) bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0aad8: 3d 20 00 00 lis r9,0 ffc0aadc: 81 29 2e 10 lwz r9,11792(r9) ffc0aae0: 39 40 00 01 li r10,1 } ffc0aae4: 7c 08 03 a6 mtlr r0 ffc0aae8: 83 61 00 14 lwz r27,20(r1) ffc0aaec: 83 81 00 18 lwz r28,24(r1) ffc0aaf0: 83 a1 00 1c lwz r29,28(r1) ffc0aaf4: 83 c1 00 20 lwz r30,32(r1) ffc0aaf8: 83 e1 00 24 lwz r31,36(r1) bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0aafc: 91 49 00 34 stw r10,52(r9) } ffc0ab00: 38 21 00 28 addi r1,r1,40 ffc0ab04: 4e 80 00 20 blr bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0ab08: 38 81 00 08 addi r4,r1,8 ffc0ab0c: 48 00 51 69 bl ffc0fc74 <_CORE_mutex_Seize_interrupt_trylock> ffc0ab10: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ab14: 40 9e ff b8 bne+ cr7,ffc0aacc <_CORE_mutex_Seize+0xe0> <== NEVER TAKEN ffc0ab18: 4b ff ff 78 b ffc0aa90 <_CORE_mutex_Seize+0xa4> ffc0ab1c: 38 60 00 00 li r3,0 ffc0ab20: 38 80 00 00 li r4,0 ffc0ab24: 38 a0 00 12 li r5,18 ffc0ab28: 48 00 07 f1 bl ffc0b318 <_Internal_error_Occurred> =============================================================================== ffc0acbc <_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 ) { ffc0acbc: 94 21 ff f0 stwu r1,-16(r1) ffc0acc0: 7c 08 02 a6 mflr r0 ffc0acc4: 93 e1 00 0c stw r31,12(r1) ffc0acc8: 7c 7f 1b 78 mr r31,r3 ffc0accc: 90 01 00 14 stw r0,20(r1) ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc0acd0: 48 00 21 65 bl ffc0ce34 <_Thread_queue_Dequeue> ffc0acd4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0acd8: 41 9e 00 1c beq- cr7,ffc0acf4 <_CORE_semaphore_Surrender+0x38> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0acdc: 80 01 00 14 lwz r0,20(r1) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0ace0: 38 60 00 00 li r3,0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0ace4: 83 e1 00 0c lwz r31,12(r1) ffc0ace8: 7c 08 03 a6 mtlr r0 ffc0acec: 38 21 00 10 addi r1,r1,16 ffc0acf0: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0acf4: 7d 00 00 a6 mfmsr r8 ffc0acf8: 7d 30 42 a6 mfsprg r9,0 ffc0acfc: 7d 09 48 78 andc r9,r8,r9 ffc0ad00: 7d 20 01 24 mtmsr r9 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) ffc0ad04: 81 3f 00 48 lwz r9,72(r31) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; ffc0ad08: 38 60 00 04 li r3,4 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) ffc0ad0c: 81 5f 00 40 lwz r10,64(r31) ffc0ad10: 7f 89 50 40 cmplw cr7,r9,r10 ffc0ad14: 40 9c 00 10 bge- cr7,ffc0ad24 <_CORE_semaphore_Surrender+0x68><== NEVER TAKEN the_semaphore->count += 1; ffc0ad18: 39 29 00 01 addi r9,r9,1 ffc0ad1c: 91 3f 00 48 stw r9,72(r31) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0ad20: 38 60 00 00 li r3,0 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0ad24: 7d 00 01 24 mtmsr r8 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0ad28: 80 01 00 14 lwz r0,20(r1) ffc0ad2c: 83 e1 00 0c lwz r31,12(r1) ffc0ad30: 7c 08 03 a6 mtlr r0 ffc0ad34: 38 21 00 10 addi r1,r1,16 ffc0ad38: 4e 80 00 20 blr =============================================================================== ffc0a7e4 <_Chain_Initialize>: Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc0a7e4: 2f 85 00 00 cmpwi cr7,r5,0 Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; ffc0a7e8: 39 20 00 00 li r9,0 size_t node_size ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc0a7ec: 39 03 00 04 addi r8,r3,4 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; ffc0a7f0: 91 23 00 04 stw r9,4(r3) while ( count-- ) { ffc0a7f4: 38 e5 ff ff addi r7,r5,-1 ffc0a7f8: 41 9e 00 38 beq- cr7,ffc0a830 <_Chain_Initialize+0x4c> <== NEVER TAKEN ffc0a7fc: 7c a9 03 a6 mtctr r5 ffc0a800: 7c 89 23 78 mr r9,r4 ffc0a804: 7c 6a 1b 78 mr r10,r3 current->next = next; ffc0a808: 91 2a 00 00 stw r9,0(r10) next->previous = current; ffc0a80c: 91 49 00 04 stw r10,4(r9) ffc0a810: 7d 2a 4b 78 mr r10,r9 current = next; next = (Chain_Node *) ffc0a814: 7d 29 32 14 add r9,r9,r6 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc0a818: 42 00 ff f0 bdnz+ ffc0a808 <_Chain_Initialize+0x24> #include #include #include #include void _Chain_Initialize( ffc0a81c: 7c c6 39 d6 mullw r6,r6,r7 ffc0a820: 7c c4 32 14 add r6,r4,r6 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; ffc0a824: 91 06 00 00 stw r8,0(r6) tail->previous = current; ffc0a828: 90 c3 00 08 stw r6,8(r3) ffc0a82c: 4e 80 00 20 blr ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; ffc0a830: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED ffc0a834: 4b ff ff f0 b ffc0a824 <_Chain_Initialize+0x40> <== NOT EXECUTED =============================================================================== ffc0952c <_Event_Surrender>: rtems_event_set event_in, Event_Control *event, Thread_blocking_operation_States *sync_state, States_Control wait_state ) { ffc0952c: 94 21 ff f0 stwu r1,-16(r1) ffc09530: 7c 08 02 a6 mflr r0 ffc09534: 90 01 00 14 stw r0,20(r1) ffc09538: 93 e1 00 0c stw r31,12(r1) ffc0953c: 7c 7f 1b 78 mr r31,r3 rtems_event_set pending_events; rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; option_set = the_thread->Wait.option; ffc09540: 81 63 00 30 lwz r11,48(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc09544: 7d 40 00 a6 mfmsr r10 ffc09548: 7d 30 42 a6 mfsprg r9,0 ffc0954c: 7d 49 48 78 andc r9,r10,r9 ffc09550: 7d 20 01 24 mtmsr r9 RTEMS_INLINE_ROUTINE void _Event_sets_Post( rtems_event_set the_new_events, rtems_event_set *the_event_set ) { *the_event_set |= the_new_events; ffc09554: 81 25 00 00 lwz r9,0(r5) ffc09558: 7c 84 4b 78 or r4,r4,r9 ffc0955c: 90 85 00 00 stw r4,0(r5) _ISR_Disable( level ); _Event_sets_Post( event_in, &event->pending_events ); pending_events = event->pending_events; event_condition = the_thread->Wait.count; ffc09560: 81 23 00 24 lwz r9,36(r3) seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { ffc09564: 7c 88 48 39 and. r8,r4,r9 ffc09568: 41 82 00 d4 beq- ffc0963c <_Event_Surrender+0x110> /* * 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() && ffc0956c: 3c 60 00 00 lis r3,0 ffc09570: 38 63 2e 00 addi r3,r3,11776 ffc09574: 80 03 00 08 lwz r0,8(r3) ffc09578: 2f 80 00 00 cmpwi cr7,r0,0 ffc0957c: 41 9e 00 10 beq- cr7,ffc0958c <_Event_Surrender+0x60> ffc09580: 80 63 00 10 lwz r3,16(r3) ffc09584: 7f 9f 18 00 cmpw cr7,r31,r3 ffc09588: 41 9e 00 74 beq- cr7,ffc095fc <_Event_Surrender+0xd0> RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); ffc0958c: 80 df 00 10 lwz r6,16(r31) } /* * Otherwise, this is a normal send to another thread */ if ( _States_Are_set( the_thread->current_state, wait_state ) ) { ffc09590: 7c e3 30 39 and. r3,r7,r6 ffc09594: 41 82 00 a8 beq- ffc0963c <_Event_Surrender+0x110> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { ffc09598: 7f 89 40 00 cmpw cr7,r9,r8 ffc0959c: 41 9e 00 0c beq- cr7,ffc095a8 <_Event_Surrender+0x7c> ffc095a0: 71 69 00 02 andi. r9,r11,2 ffc095a4: 41 82 00 98 beq- ffc0963c <_Event_Surrender+0x110> <== NEVER TAKEN event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc095a8: 81 3f 00 28 lwz r9,40(r31) RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); ffc095ac: 7c 84 40 78 andc r4,r4,r8 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; ffc095b0: 38 e0 00 00 li r7,0 /* * Otherwise, this is a normal send to another thread */ if ( _States_Are_set( the_thread->current_state, wait_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { event->pending_events = _Event_sets_Clear( ffc095b4: 90 85 00 00 stw r4,0(r5) pending_events, seized_events ); the_thread->Wait.count = 0; ffc095b8: 90 ff 00 24 stw r7,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc095bc: 91 09 00 00 stw r8,0(r9) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc095c0: 7d 20 00 a6 mfmsr r9 ffc095c4: 7d 40 01 24 mtmsr r10 ffc095c8: 7d 20 01 24 mtmsr r9 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc095cc: 81 3f 00 50 lwz r9,80(r31) ffc095d0: 2f 89 00 02 cmpwi cr7,r9,2 ffc095d4: 41 9e 00 80 beq- cr7,ffc09654 <_Event_Surrender+0x128> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc095d8: 7d 40 01 24 mtmsr r10 } return; } } _ISR_Enable( level ); } ffc095dc: 80 01 00 14 lwz r0,20(r1) RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc095e0: 7f e3 fb 78 mr r3,r31 ffc095e4: 3c 80 10 07 lis r4,4103 ffc095e8: 83 e1 00 0c lwz r31,12(r1) ffc095ec: 7c 08 03 a6 mtlr r0 ffc095f0: 60 84 ff f8 ori r4,r4,65528 ffc095f4: 38 21 00 10 addi r1,r1,16 ffc095f8: 48 00 2f 24 b ffc0c51c <_Thread_Clear_state> * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || ffc095fc: 80 66 00 00 lwz r3,0(r6) ffc09600: 38 63 ff ff addi r3,r3,-1 /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ffc09604: 2b 83 00 01 cmplwi cr7,r3,1 ffc09608: 41 9d ff 84 bgt+ cr7,ffc0958c <_Event_Surrender+0x60> ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { ffc0960c: 7f 89 40 00 cmpw cr7,r9,r8 ffc09610: 41 9e 00 0c beq- cr7,ffc0961c <_Event_Surrender+0xf0> ffc09614: 71 63 00 02 andi. r3,r11,2 ffc09618: 41 82 00 24 beq- ffc0963c <_Event_Surrender+0x110> <== NEVER TAKEN event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc0961c: 81 3f 00 28 lwz r9,40(r31) ffc09620: 7c 84 40 78 andc r4,r4,r8 if ( seized_events == event_condition || _Options_Is_any(option_set) ) { event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; ffc09624: 38 e0 00 00 li r7,0 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { event->pending_events = _Event_sets_Clear( ffc09628: 90 85 00 00 stw r4,0(r5) pending_events, seized_events ); the_thread->Wait.count = 0; ffc0962c: 90 ff 00 24 stw r7,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc09630: 91 09 00 00 stw r8,0(r9) *sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc09634: 39 20 00 03 li r9,3 ffc09638: 91 26 00 00 stw r9,0(r6) ffc0963c: 7d 40 01 24 mtmsr r10 } return; } } _ISR_Enable( level ); } ffc09640: 80 01 00 14 lwz r0,20(r1) ffc09644: 83 e1 00 0c lwz r31,12(r1) ffc09648: 7c 08 03 a6 mtlr r0 ffc0964c: 38 21 00 10 addi r1,r1,16 ffc09650: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc09654: 39 20 00 03 li r9,3 ffc09658: 91 3f 00 50 stw r9,80(r31) ffc0965c: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc09660: 38 7f 00 48 addi r3,r31,72 ffc09664: 48 00 45 15 bl ffc0db78 <_Watchdog_Remove> ffc09668: 4b ff ff 74 b ffc095dc <_Event_Surrender+0xb0> =============================================================================== ffc0966c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *arg ) { ffc0966c: 94 21 ff e0 stwu r1,-32(r1) ffc09670: 7c 08 02 a6 mflr r0 ffc09674: 93 e1 00 1c stw r31,28(r1) ffc09678: 7c 9f 23 78 mr r31,r4 ISR_Level level; Thread_blocking_operation_States *sync_state; sync_state = arg; the_thread = _Thread_Get( id, &location ); ffc0967c: 38 81 00 08 addi r4,r1,8 void _Event_Timeout( Objects_Id id, void *arg ) { ffc09680: 90 01 00 24 stw r0,36(r1) ISR_Level level; Thread_blocking_operation_States *sync_state; sync_state = arg; the_thread = _Thread_Get( id, &location ); ffc09684: 48 00 33 b5 bl ffc0ca38 <_Thread_Get> switch ( location ) { ffc09688: 81 21 00 08 lwz r9,8(r1) ffc0968c: 2f 89 00 00 cmpwi cr7,r9,0 ffc09690: 40 9e 00 50 bne- cr7,ffc096e0 <_Event_Timeout+0x74> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc09694: 7d 40 00 a6 mfmsr r10 ffc09698: 7d 10 42 a6 mfsprg r8,0 ffc0969c: 7d 48 40 78 andc r8,r10,r8 ffc096a0: 7d 00 01 24 mtmsr r8 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc096a4: 3d 00 00 00 lis r8,0 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { ffc096a8: 81 08 2e 10 lwz r8,11792(r8) _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; ffc096ac: 91 23 00 24 stw r9,36(r3) if ( _Thread_Is_executing( the_thread ) ) { ffc096b0: 7f 83 40 00 cmpw cr7,r3,r8 ffc096b4: 41 9e 00 40 beq- cr7,ffc096f4 <_Event_Timeout+0x88> if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) *sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; ffc096b8: 39 20 00 06 li r9,6 ffc096bc: 91 23 00 34 stw r9,52(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc096c0: 7d 40 01 24 mtmsr r10 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc096c4: 3c 80 10 07 lis r4,4103 ffc096c8: 60 84 ff f8 ori r4,r4,65528 ffc096cc: 48 00 2e 51 bl ffc0c51c <_Thread_Clear_state> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc096d0: 3d 20 00 00 lis r9,0 ffc096d4: 81 49 28 24 lwz r10,10276(r9) --level; ffc096d8: 39 4a ff ff addi r10,r10,-1 _Thread_Dispatch_disable_level = level; ffc096dc: 91 49 28 24 stw r10,10276(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc096e0: 80 01 00 24 lwz r0,36(r1) ffc096e4: 83 e1 00 1c lwz r31,28(r1) ffc096e8: 7c 08 03 a6 mtlr r0 ffc096ec: 38 21 00 20 addi r1,r1,32 ffc096f0: 4e 80 00 20 blr } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) ffc096f4: 81 3f 00 00 lwz r9,0(r31) ffc096f8: 2f 89 00 01 cmpwi cr7,r9,1 ffc096fc: 40 9e ff bc bne+ cr7,ffc096b8 <_Event_Timeout+0x4c> *sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc09700: 39 20 00 02 li r9,2 ffc09704: 91 3f 00 00 stw r9,0(r31) ffc09708: 4b ff ff b0 b ffc096b8 <_Event_Timeout+0x4c> =============================================================================== ffc0fdb0 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc0fdb0: 7c 87 23 78 mr r7,r4 ffc0fdb4: 7d 80 00 26 mfcr r12 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE ffc0fdb8: 38 84 00 04 addi r4,r4,4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc0fdbc: 94 21 ff e0 stwu r1,-32(r1) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { ffc0fdc0: 7f 87 20 40 cmplw cr7,r7,r4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc0fdc4: 7c 08 02 a6 mflr r0 ffc0fdc8: 93 a1 00 14 stw r29,20(r1) ffc0fdcc: 7c 7d 1b 78 mr r29,r3 ffc0fdd0: 90 01 00 24 stw r0,36(r1) ffc0fdd4: 93 61 00 0c stw r27,12(r1) ffc0fdd8: 93 81 00 10 stw r28,16(r1) ffc0fddc: 93 c1 00 18 stw r30,24(r1) ffc0fde0: 93 e1 00 1c stw r31,28(r1) ffc0fde4: 91 81 00 08 stw r12,8(r1) Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; ffc0fde8: 81 63 00 10 lwz r11,16(r3) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { ffc0fdec: 41 9d 01 c8 bgt- cr7,ffc0ffb4 <_Heap_Allocate_aligned_with_boundary+0x204> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { ffc0fdf0: 2c 06 00 00 cmpwi r6,0 ffc0fdf4: 40 82 01 a8 bne- ffc0ff9c <_Heap_Allocate_aligned_with_boundary+0x1ec> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0fdf8: 81 3d 00 08 lwz r9,8(r29) do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc0fdfc: 7f 9d 48 00 cmpw cr7,r29,r9 ffc0fe00: 41 9e 01 e4 beq- cr7,ffc0ffe4 <_Heap_Allocate_aligned_with_boundary+0x234> * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { if ( alignment == 0 ) { ffc0fe04: 2c 85 00 00 cmpwi cr1,r5,0 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc0fe08: 3b c0 00 00 li r30,0 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size ffc0fe0c: 3b 6b 00 07 addi r27,r11,7 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; ffc0fe10: 23 87 00 04 subfic r28,r7,4 ffc0fe14: 48 00 00 24 b ffc0fe38 <_Heap_Allocate_aligned_with_boundary+0x88> * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { if ( alignment == 0 ) { ffc0fe18: 40 86 00 7c bne- cr1,ffc0fe94 <_Heap_Allocate_aligned_with_boundary+0xe4> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0fe1c: 3b e9 00 08 addi r31,r9,8 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { ffc0fe20: 2f 9f 00 00 cmpwi cr7,r31,0 ); } } /* Statistics */ ++search_count; ffc0fe24: 3b de 00 01 addi r30,r30,1 if ( alloc_begin != 0 ) { ffc0fe28: 40 9e 01 38 bne- cr7,ffc0ff60 <_Heap_Allocate_aligned_with_boundary+0x1b0> break; } block = block->next; ffc0fe2c: 81 29 00 08 lwz r9,8(r9) do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc0fe30: 7f 9d 48 00 cmpw cr7,r29,r9 ffc0fe34: 41 9e 00 20 beq- cr7,ffc0fe54 <_Heap_Allocate_aligned_with_boundary+0xa4> /* * 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 ) { ffc0fe38: 81 49 00 04 lwz r10,4(r9) ffc0fe3c: 7f 84 50 40 cmplw cr7,r4,r10 ffc0fe40: 41 bc ff d8 blt- cr7,ffc0fe18 <_Heap_Allocate_aligned_with_boundary+0x68> if ( alloc_begin != 0 ) { break; } block = block->next; ffc0fe44: 81 29 00 08 lwz r9,8(r9) ); } } /* Statistics */ ++search_count; ffc0fe48: 3b de 00 01 addi r30,r30,1 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc0fe4c: 7f 9d 48 00 cmpw cr7,r29,r9 ffc0fe50: 40 9e ff e8 bne+ cr7,ffc0fe38 <_Heap_Allocate_aligned_with_boundary+0x88> ); } } /* Statistics */ ++search_count; ffc0fe54: 38 60 00 00 li r3,0 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { ffc0fe58: 81 3d 00 44 lwz r9,68(r29) ffc0fe5c: 7f 89 f0 40 cmplw cr7,r9,r30 ffc0fe60: 40 9c 00 08 bge- cr7,ffc0fe68 <_Heap_Allocate_aligned_with_boundary+0xb8> stats->max_search = search_count; ffc0fe64: 93 dd 00 44 stw r30,68(r29) } return (void *) alloc_begin; } ffc0fe68: 80 01 00 24 lwz r0,36(r1) ffc0fe6c: 81 81 00 08 lwz r12,8(r1) ffc0fe70: 7c 08 03 a6 mtlr r0 ffc0fe74: 83 61 00 0c lwz r27,12(r1) ffc0fe78: 83 81 00 10 lwz r28,16(r1) ffc0fe7c: 7d 80 81 20 mtcrf 8,r12 ffc0fe80: 83 a1 00 14 lwz r29,20(r1) ffc0fe84: 83 c1 00 18 lwz r30,24(r1) ffc0fe88: 83 e1 00 1c lwz r31,28(r1) ffc0fe8c: 38 21 00 20 addi r1,r1,32 ffc0fe90: 4e 80 00 20 blr - 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; ffc0fe94: 55 4a 00 3c rlwinm r10,r10,0,0,30 ffc0fe98: 80 1d 00 14 lwz r0,20(r29) uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; ffc0fe9c: 7d 49 52 14 add r10,r9,r10 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; ffc0fea0: 7f fc 52 14 add r31,r28,r10 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0fea4: 7f ff 2b 96 divwu r31,r31,r5 ffc0fea8: 7f ff 29 d6 mullw r31,r31,r5 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; ffc0feac: 7d 00 d8 50 subf r8,r0,r27 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size ffc0feb0: 7d 48 52 14 add r10,r8,r10 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 ) { ffc0feb4: 7f 8a f8 40 cmplw cr7,r10,r31 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0feb8: 39 89 00 08 addi r12,r9,8 ffc0febc: 40 9c 00 0c bge- cr7,ffc0fec8 <_Heap_Allocate_aligned_with_boundary+0x118> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0fec0: 7d 4a 2b 96 divwu r10,r10,r5 ffc0fec4: 7f ea 29 d6 mullw r31,r10,r5 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { ffc0fec8: 41 82 00 60 beq- ffc0ff28 <_Heap_Allocate_aligned_with_boundary+0x178> /* 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; ffc0fecc: 7d 1f 3a 14 add r8,r31,r7 ffc0fed0: 7d 48 33 96 divwu r10,r8,r6 ffc0fed4: 7d 4a 31 d6 mullw r10,r10,r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; ffc0fed8: 7c 6c 3a 14 add r3,r12,r7 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc0fedc: 7f 9f 50 40 cmplw cr7,r31,r10 ffc0fee0: 40 9c 00 48 bge- cr7,ffc0ff28 <_Heap_Allocate_aligned_with_boundary+0x178> ffc0fee4: 7f 88 50 40 cmplw cr7,r8,r10 ffc0fee8: 40 9d 00 40 ble- cr7,ffc0ff28 <_Heap_Allocate_aligned_with_boundary+0x178> if ( boundary_line < boundary_floor ) { ffc0feec: 7f 83 50 40 cmplw cr7,r3,r10 ffc0fef0: 40 bd 00 10 ble+ cr7,ffc0ff00 <_Heap_Allocate_aligned_with_boundary+0x150> ffc0fef4: 48 00 00 a0 b ffc0ff94 <_Heap_Allocate_aligned_with_boundary+0x1e4> /* 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 ) { ffc0fef8: 40 91 00 30 ble- cr4,ffc0ff28 <_Heap_Allocate_aligned_with_boundary+0x178> if ( boundary_line < boundary_floor ) { ffc0fefc: 41 99 00 98 bgt- cr6,ffc0ff94 <_Heap_Allocate_aligned_with_boundary+0x1e4><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; ffc0ff00: 7f e7 50 50 subf r31,r7,r10 ffc0ff04: 7f ff 2b 96 divwu r31,r31,r5 ffc0ff08: 7f ff 29 d6 mullw r31,r31,r5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; ffc0ff0c: 7d 1f 3a 14 add r8,r31,r7 ffc0ff10: 7d 48 33 96 divwu r10,r8,r6 ffc0ff14: 7d 4a 31 d6 mullw r10,r10,r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc0ff18: 7f 9f 50 40 cmplw cr7,r31,r10 ffc0ff1c: 7e 08 50 40 cmplw cr4,r8,r10 if ( boundary_line < boundary_floor ) { ffc0ff20: 7f 03 50 40 cmplw cr6,r3,r10 /* 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 ) { ffc0ff24: 41 9c ff d4 blt+ cr7,ffc0fef8 <_Heap_Allocate_aligned_with_boundary+0x148> 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 ) { ffc0ff28: 7f 8c f8 40 cmplw cr7,r12,r31 ffc0ff2c: 41 9d 00 68 bgt- cr7,ffc0ff94 <_Heap_Allocate_aligned_with_boundary+0x1e4> ffc0ff30: 7d 5f 5b 96 divwu r10,r31,r11 ffc0ff34: 7d 4a 59 d6 mullw r10,r10,r11 ffc0ff38: 21 09 ff f8 subfic r8,r9,-8 uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; ffc0ff3c: 7d 48 52 14 add r10,r8,r10 if ( free_size >= min_block_size || free_size == 0 ) { ffc0ff40: 7f 80 50 40 cmplw cr7,r0,r10 ffc0ff44: 40 bd fe dc ble- cr7,ffc0fe20 <_Heap_Allocate_aligned_with_boundary+0x70> 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 ) { if ( boundary_line < boundary_floor ) { return 0; ffc0ff48: 31 4a ff ff addic r10,r10,-1 ffc0ff4c: 7d 4a 51 10 subfe r10,r10,r10 ffc0ff50: 7f ff 50 38 and r31,r31,r10 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { ffc0ff54: 2f 9f 00 00 cmpwi cr7,r31,0 ); } } /* Statistics */ ++search_count; ffc0ff58: 3b de 00 01 addi r30,r30,1 if ( alloc_begin != 0 ) { ffc0ff5c: 41 9e fe d0 beq+ cr7,ffc0fe2c <_Heap_Allocate_aligned_with_boundary+0x7c> search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc0ff60: 81 5d 00 48 lwz r10,72(r29) stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc0ff64: 7f a3 eb 78 mr r3,r29 } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; ffc0ff68: 81 1d 00 4c lwz r8,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc0ff6c: 7d 24 4b 78 mr r4,r9 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc0ff70: 39 4a 00 01 addi r10,r10,1 stats->searches += search_count; ffc0ff74: 7d 08 f2 14 add r8,r8,r30 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc0ff78: 91 5d 00 48 stw r10,72(r29) stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc0ff7c: 7f e5 fb 78 mr r5,r31 } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; ffc0ff80: 91 1d 00 4c stw r8,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc0ff84: 7c e6 3b 78 mr r6,r7 ffc0ff88: 4b ff b2 25 bl ffc0b1ac <_Heap_Block_allocate> ffc0ff8c: 7f e3 fb 78 mr r3,r31 ffc0ff90: 4b ff fe c8 b ffc0fe58 <_Heap_Allocate_aligned_with_boundary+0xa8> 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 ) { if ( boundary_line < boundary_floor ) { return 0; ffc0ff94: 3b e0 00 00 li r31,0 ffc0ff98: 4b ff fe 88 b ffc0fe20 <_Heap_Allocate_aligned_with_boundary+0x70> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { ffc0ff9c: 7f 87 30 40 cmplw cr7,r7,r6 ffc0ffa0: 41 9d 00 14 bgt- cr7,ffc0ffb4 <_Heap_Allocate_aligned_with_boundary+0x204> return NULL; } if ( alignment == 0 ) { ffc0ffa4: 2f 85 00 00 cmpwi cr7,r5,0 ffc0ffa8: 40 be fe 50 bne- cr7,ffc0fdf8 <_Heap_Allocate_aligned_with_boundary+0x48> alignment = page_size; ffc0ffac: 7d 65 5b 78 mr r5,r11 ffc0ffb0: 4b ff fe 48 b ffc0fdf8 <_Heap_Allocate_aligned_with_boundary+0x48> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } ffc0ffb4: 80 01 00 24 lwz r0,36(r1) uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { /* Integer overflow occured */ return NULL; ffc0ffb8: 38 60 00 00 li r3,0 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } ffc0ffbc: 81 81 00 08 lwz r12,8(r1) ffc0ffc0: 7c 08 03 a6 mtlr r0 ffc0ffc4: 83 61 00 0c lwz r27,12(r1) ffc0ffc8: 83 81 00 10 lwz r28,16(r1) ffc0ffcc: 7d 80 81 20 mtcrf 8,r12 ffc0ffd0: 83 a1 00 14 lwz r29,20(r1) ffc0ffd4: 83 c1 00 18 lwz r30,24(r1) ffc0ffd8: 83 e1 00 1c lwz r31,28(r1) ffc0ffdc: 38 21 00 20 addi r1,r1,32 ffc0ffe0: 4e 80 00 20 blr do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc0ffe4: 3b c0 00 00 li r30,0 ffc0ffe8: 4b ff fe 6c b ffc0fe54 <_Heap_Allocate_aligned_with_boundary+0xa4> =============================================================================== ffc0fb44 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t unused __attribute__((unused)) ) { ffc0fb44: 94 21 ff c0 stwu r1,-64(r1) ffc0fb48: 7d 80 00 26 mfcr r12 ffc0fb4c: 7c 08 02 a6 mflr r0 Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; ffc0fb50: 39 20 00 00 li r9,0 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t unused __attribute__((unused)) ) { ffc0fb54: 93 a1 00 34 stw r29,52(r1) Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; ffc0fb58: 7f a4 2a 14 add r29,r4,r5 uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { ffc0fb5c: 7f 84 e8 40 cmplw cr7,r4,r29 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t unused __attribute__((unused)) ) { ffc0fb60: 90 01 00 44 stw r0,68(r1) ffc0fb64: 93 41 00 28 stw r26,40(r1) ffc0fb68: 93 61 00 2c stw r27,44(r1) ffc0fb6c: 93 81 00 30 stw r28,48(r1) ffc0fb70: 93 c1 00 38 stw r30,56(r1) ffc0fb74: 7c 7e 1b 78 mr r30,r3 ffc0fb78: 93 e1 00 3c stw r31,60(r1) ffc0fb7c: 7c 9f 23 78 mr r31,r4 ffc0fb80: 93 01 00 20 stw r24,32(r1) ffc0fb84: 93 21 00 24 stw r25,36(r1) ffc0fb88: 91 81 00 1c stw r12,28(r1) Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; ffc0fb8c: 83 63 00 20 lwz r27,32(r3) Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; ffc0fb90: 91 21 00 0c stw r9,12(r1) Heap_Block *extend_last_block = NULL; ffc0fb94: 91 21 00 08 stw r9,8(r1) uintptr_t const page_size = heap->page_size; ffc0fb98: 83 83 00 10 lwz r28,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc0fb9c: 80 c3 00 14 lwz r6,20(r3) uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; ffc0fba0: 83 43 00 30 lwz r26,48(r3) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { ffc0fba4: 40 9d 00 40 ble- cr7,ffc0fbe4 <_Heap_Extend+0xa0> /* Statistics */ stats->size += extended_size; return extended_size; } ffc0fba8: 80 01 00 44 lwz r0,68(r1) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { return 0; ffc0fbac: 38 60 00 00 li r3,0 /* Statistics */ stats->size += extended_size; return extended_size; } ffc0fbb0: 81 81 00 1c lwz r12,28(r1) ffc0fbb4: 7c 08 03 a6 mtlr r0 ffc0fbb8: 83 01 00 20 lwz r24,32(r1) ffc0fbbc: 83 21 00 24 lwz r25,36(r1) ffc0fbc0: 7d 80 81 20 mtcrf 8,r12 ffc0fbc4: 83 41 00 28 lwz r26,40(r1) ffc0fbc8: 83 61 00 2c lwz r27,44(r1) ffc0fbcc: 83 81 00 30 lwz r28,48(r1) ffc0fbd0: 83 a1 00 34 lwz r29,52(r1) ffc0fbd4: 83 c1 00 38 lwz r30,56(r1) ffc0fbd8: 83 e1 00 3c lwz r31,60(r1) ffc0fbdc: 38 21 00 40 addi r1,r1,64 ffc0fbe0: 4e 80 00 20 blr if ( extend_area_end < extend_area_begin ) { return 0; } extend_area_ok = _Heap_Get_first_and_last_block( ffc0fbe4: 7c 83 23 78 mr r3,r4 ffc0fbe8: 38 e1 00 0c addi r7,r1,12 ffc0fbec: 7c a4 2b 78 mr r4,r5 ffc0fbf0: 39 01 00 08 addi r8,r1,8 ffc0fbf4: 7f 85 e3 78 mr r5,r28 ffc0fbf8: 4b ff af dd bl ffc0abd4 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc0fbfc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0fc00: 41 be ff a8 beq- cr7,ffc0fba8 <_Heap_Extend+0x64> ffc0fc04: 7f 69 db 78 mr r9,r27 ffc0fc08: 3b 00 00 00 li r24,0 ffc0fc0c: 38 a0 00 00 li r5,0 ffc0fc10: 3b 20 00 00 li r25,0 ffc0fc14: 38 c0 00 00 li r6,0 ffc0fc18: 48 00 00 38 b ffc0fc50 <_Heap_Extend+0x10c> return 0; } if ( extend_area_end == sub_area_begin ) { merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { ffc0fc1c: 7f 9d 50 40 cmplw cr7,r29,r10 ffc0fc20: 40 9c 00 08 bge- cr7,ffc0fc28 <_Heap_Extend+0xe4> ffc0fc24: 7d 25 4b 78 mr r5,r9 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc0fc28: 7f 8a f8 00 cmpw cr7,r10,r31 ffc0fc2c: 41 9e 00 64 beq- cr7,ffc0fc90 <_Heap_Extend+0x14c> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { ffc0fc30: 7f 9f 50 40 cmplw cr7,r31,r10 ffc0fc34: 40 9d 00 08 ble- cr7,ffc0fc3c <_Heap_Extend+0xf8> 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 ) ffc0fc38: 7d 18 43 78 mr r24,r8 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0fc3c: 81 28 00 04 lwz r9,4(r8) ffc0fc40: 55 29 00 3c rlwinm r9,r9,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0fc44: 7d 29 42 14 add r9,r9,r8 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); ffc0fc48: 7f 9b 48 00 cmpw cr7,r27,r9 ffc0fc4c: 41 9e 00 60 beq- cr7,ffc0fcac <_Heap_Extend+0x168> return 0; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; ffc0fc50: 7f 89 d8 00 cmpw cr7,r9,r27 ffc0fc54: 41 9e 01 a4 beq- cr7,ffc0fdf8 <_Heap_Extend+0x2b4> ffc0fc58: 7d 27 4b 78 mr r7,r9 uintptr_t const sub_area_end = start_block->prev_size; ffc0fc5c: 81 49 00 00 lwz r10,0(r9) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0fc60: 7d 0a e3 96 divwu r8,r10,r28 Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( ffc0fc64: 7f 9f 50 40 cmplw cr7,r31,r10 ffc0fc68: 7d 08 e1 d6 mullw r8,r8,r28 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc0fc6c: 39 08 ff f8 addi r8,r8,-8 ffc0fc70: 40 9c 00 0c bge- cr7,ffc0fc7c <_Heap_Extend+0x138> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ffc0fc74: 7f 87 e8 40 cmplw cr7,r7,r29 ffc0fc78: 41 bc ff 30 blt- cr7,ffc0fba8 <_Heap_Extend+0x64> ) { return 0; } if ( extend_area_end == sub_area_begin ) { ffc0fc7c: 7f 87 e8 00 cmpw cr7,r7,r29 ffc0fc80: 40 9e ff 9c bne+ cr7,ffc0fc1c <_Heap_Extend+0xd8> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc0fc84: 7f 8a f8 00 cmpw cr7,r10,r31 sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return 0; } if ( extend_area_end == sub_area_begin ) { ffc0fc88: 7d 26 4b 78 mr r6,r9 merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc0fc8c: 40 9e ff a4 bne+ cr7,ffc0fc30 <_Heap_Extend+0xec> <== ALWAYS TAKEN start_block->prev_size = extend_area_end; ffc0fc90: 93 a9 00 00 stw r29,0(r9) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) ffc0fc94: 7d 19 43 78 mr r25,r8 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0fc98: 81 28 00 04 lwz r9,4(r8) ffc0fc9c: 55 29 00 3c rlwinm r9,r9,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0fca0: 7d 29 42 14 add r9,r9,r8 } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); ffc0fca4: 7f 9b 48 00 cmpw cr7,r27,r9 ffc0fca8: 40 9e ff a8 bne+ cr7,ffc0fc50 <_Heap_Extend+0x10c> <== NEVER TAKEN if ( extend_area_begin < heap->area_begin ) { ffc0fcac: 81 3e 00 18 lwz r9,24(r30) ffc0fcb0: 7f 9f 48 40 cmplw cr7,r31,r9 ffc0fcb4: 41 9c 01 4c blt- cr7,ffc0fe00 <_Heap_Extend+0x2bc> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { ffc0fcb8: 81 3e 00 1c lwz r9,28(r30) ffc0fcbc: 7f 9d 48 40 cmplw cr7,r29,r9 ffc0fcc0: 40 9d 00 08 ble- cr7,ffc0fcc8 <_Heap_Extend+0x184> heap->area_end = extend_area_end; ffc0fcc4: 93 be 00 1c stw r29,28(r30) extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc0fcc8: 81 1e 00 20 lwz r8,32(r30) } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; ffc0fccc: 81 21 00 0c lwz r9,12(r1) ffc0fcd0: 81 41 00 08 lwz r10,8(r1) extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc0fcd4: 7f 88 48 40 cmplw cr7,r8,r9 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; ffc0fcd8: 93 a9 00 00 stw r29,0(r9) heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = ffc0fcdc: 7d 09 50 50 subf r8,r9,r10 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; ffc0fce0: 61 07 00 01 ori r7,r8,1 _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; ffc0fce4: 91 0a 00 00 stw r8,0(r10) extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = ffc0fce8: 90 e9 00 04 stw r7,4(r9) extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; ffc0fcec: 38 e0 00 00 li r7,0 ffc0fcf0: 90 ea 00 04 stw r7,4(r10) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc0fcf4: 40 9d 01 40 ble- cr7,ffc0fe34 <_Heap_Extend+0x2f0> <== ALWAYS TAKEN heap->first_block = extend_first_block; ffc0fcf8: 91 3e 00 20 stw r9,32(r30) } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { ffc0fcfc: 2e 06 00 00 cmpwi cr4,r6,0 ffc0fd00: 41 92 01 48 beq- cr4,ffc0fe48 <_Heap_Extend+0x304> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; ffc0fd04: 81 3e 00 10 lwz r9,16(r30) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); ffc0fd08: 3b ff 00 08 addi r31,r31,8 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; ffc0fd0c: 7d 5f 4b 96 divwu r10,r31,r9 ffc0fd10: 7d 4a 49 d6 mullw r10,r10,r9 if ( remainder != 0 ) { ffc0fd14: 7d 0a f8 51 subf. r8,r10,r31 ffc0fd18: 41 82 00 0c beq- ffc0fd24 <_Heap_Extend+0x1e0> <== NEVER TAKEN return value - remainder + alignment; ffc0fd1c: 7f ff 4a 14 add r31,r31,r9 ffc0fd20: 7f e8 f8 50 subf r31,r8,r31 uintptr_t const new_first_block_begin = ffc0fd24: 38 9f ff f8 addi r4,r31,-8 uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; ffc0fd28: 81 26 00 00 lwz r9,0(r6) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = ffc0fd2c: 7c c4 30 50 subf r6,r4,r6 first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; ffc0fd30: 60 c6 00 01 ori r6,r6,1 uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; ffc0fd34: 91 3f ff f8 stw r9,-8(r31) new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Free_block( heap, new_first_block ); ffc0fd38: 7f c3 f3 78 mr r3,r30 uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; ffc0fd3c: 90 c4 00 04 stw r6,4(r4) _Heap_Free_block( heap, new_first_block ); ffc0fd40: 4b ff fd 95 bl ffc0fad4 <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { ffc0fd44: 2f 99 00 00 cmpwi cr7,r25,0 ffc0fd48: 41 9e 01 18 beq- cr7,ffc0fe60 <_Heap_Extend+0x31c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0fd4c: 81 5e 00 10 lwz r10,16(r30) ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, ffc0fd50: 39 3d ff f8 addi r9,r29,-8 uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( ffc0fd54: 7d 39 48 50 subf r9,r25,r9 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) ffc0fd58: 81 19 00 04 lwz r8,4(r25) ffc0fd5c: 7d 29 53 96 divwu r9,r9,r10 ffc0fd60: 7d 29 51 d6 mullw r9,r9,r10 | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); ffc0fd64: 7f c3 f3 78 mr r3,r30 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) ffc0fd68: 7d 09 40 50 subf r8,r9,r8 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = ffc0fd6c: 7d 49 ca 14 add r10,r9,r25 (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; ffc0fd70: 61 08 00 01 ori r8,r8,1 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = ffc0fd74: 91 0a 00 04 stw r8,4(r10) (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); ffc0fd78: 7f 24 cb 78 mr r4,r25 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0fd7c: 81 59 00 04 lwz r10,4(r25) ffc0fd80: 55 4a 07 fe clrlwi r10,r10,31 block->size_and_flag = size | flag; ffc0fd84: 7d 29 53 78 or r9,r9,r10 ffc0fd88: 91 39 00 04 stw r9,4(r25) ffc0fd8c: 4b ff fd 49 bl ffc0fad4 <_Heap_Free_block> /* Statistics */ stats->size += extended_size; return extended_size; } ffc0fd90: 81 3e 00 24 lwz r9,36(r30) * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( ffc0fd94: 81 1e 00 20 lwz r8,32(r30) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0fd98: 81 49 00 04 lwz r10,4(r9) * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( ffc0fd9c: 7d 09 40 50 subf r8,r9,r8 ffc0fda0: 80 01 00 44 lwz r0,68(r1) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0fda4: 55 4a 07 fe clrlwi r10,r10,31 ffc0fda8: 81 81 00 1c lwz r12,28(r1) block->size_and_flag = size | flag; ffc0fdac: 7d 4a 43 78 or r10,r10,r8 ffc0fdb0: 7c 08 03 a6 mtlr r0 ffc0fdb4: 91 49 00 04 stw r10,4(r9) ffc0fdb8: 7d 80 81 20 mtcrf 8,r12 _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; ffc0fdbc: 80 7e 00 30 lwz r3,48(r30) /* Statistics */ stats->size += extended_size; ffc0fdc0: 81 3e 00 2c lwz r9,44(r30) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; ffc0fdc4: 7c 7a 18 50 subf r3,r26,r3 /* Statistics */ stats->size += extended_size; return extended_size; } ffc0fdc8: 83 01 00 20 lwz r24,32(r1) _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; ffc0fdcc: 7d 29 1a 14 add r9,r9,r3 return extended_size; } ffc0fdd0: 83 21 00 24 lwz r25,36(r1) _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; ffc0fdd4: 91 3e 00 2c stw r9,44(r30) return extended_size; } ffc0fdd8: 83 41 00 28 lwz r26,40(r1) ffc0fddc: 83 61 00 2c lwz r27,44(r1) ffc0fde0: 83 81 00 30 lwz r28,48(r1) ffc0fde4: 83 a1 00 34 lwz r29,52(r1) ffc0fde8: 83 c1 00 38 lwz r30,56(r1) ffc0fdec: 83 e1 00 3c lwz r31,60(r1) ffc0fdf0: 38 21 00 40 addi r1,r1,64 ffc0fdf4: 4e 80 00 20 blr return 0; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; ffc0fdf8: 80 fe 00 18 lwz r7,24(r30) ffc0fdfc: 4b ff fe 60 b ffc0fc5c <_Heap_Extend+0x118> extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc0fe00: 81 1e 00 20 lwz r8,32(r30) } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; ffc0fe04: 81 21 00 0c lwz r9,12(r1) ffc0fe08: 81 41 00 08 lwz r10,8(r1) extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc0fe0c: 7f 88 48 40 cmplw cr7,r8,r9 start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { heap->area_begin = extend_area_begin; ffc0fe10: 93 fe 00 18 stw r31,24(r30) } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = ffc0fe14: 7d 09 50 50 subf r8,r9,r10 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; ffc0fe18: 61 07 00 01 ori r7,r8,1 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; ffc0fe1c: 93 a9 00 00 stw r29,0(r9) extend_first_block->size_and_flag = ffc0fe20: 90 e9 00 04 stw r7,4(r9) extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; ffc0fe24: 38 e0 00 00 li r7,0 extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; ffc0fe28: 91 0a 00 00 stw r8,0(r10) extend_last_block->size_and_flag = 0; ffc0fe2c: 90 ea 00 04 stw r7,4(r10) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc0fe30: 41 bd fe c8 bgt- cr7,ffc0fcf8 <_Heap_Extend+0x1b4> <== ALWAYS TAKEN heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { ffc0fe34: 81 3e 00 24 lwz r9,36(r30) ffc0fe38: 7f 89 50 40 cmplw cr7,r9,r10 ffc0fe3c: 40 bc fe c0 bge- cr7,ffc0fcfc <_Heap_Extend+0x1b8> heap->last_block = extend_last_block; ffc0fe40: 91 5e 00 24 stw r10,36(r30) ffc0fe44: 4b ff fe b8 b ffc0fcfc <_Heap_Extend+0x1b8> } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { ffc0fe48: 2f 85 00 00 cmpwi cr7,r5,0 ffc0fe4c: 41 be fe f8 beq- cr7,ffc0fd44 <_Heap_Extend+0x200> { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; ffc0fe50: 7c aa 28 50 subf r5,r10,r5 ffc0fe54: 60 a5 00 01 ori r5,r5,1 ) { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = ffc0fe58: 90 aa 00 04 stw r5,4(r10) ffc0fe5c: 4b ff fe e8 b ffc0fd44 <_Heap_Extend+0x200> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { ffc0fe60: 2f 98 00 00 cmpwi cr7,r24,0 ffc0fe64: 41 9e 00 2c beq- cr7,ffc0fe90 <_Heap_Extend+0x34c> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0fe68: 81 38 00 04 lwz r9,4(r24) ffc0fe6c: 55 2a 07 fe clrlwi r10,r9,31 ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); ffc0fe70: 81 21 00 0c lwz r9,12(r1) ffc0fe74: 7d 38 48 50 subf r9,r24,r9 block->size_and_flag = size | flag; ffc0fe78: 7d 4a 4b 78 or r10,r10,r9 } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( ffc0fe7c: 81 21 00 08 lwz r9,8(r1) ffc0fe80: 91 58 00 04 stw r10,4(r24) uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; ffc0fe84: 81 49 00 04 lwz r10,4(r9) ffc0fe88: 61 4a 00 01 ori r10,r10,1 ffc0fe8c: 91 49 00 04 stw r10,4(r9) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc0fe90: 40 92 ff 00 bne+ cr4,ffc0fd90 <_Heap_Extend+0x24c> _Heap_Free_block( heap, extend_first_block ); ffc0fe94: 80 81 00 0c lwz r4,12(r1) ffc0fe98: 7f c3 f3 78 mr r3,r30 ffc0fe9c: 4b ff fc 39 bl ffc0fad4 <_Heap_Free_block> ffc0fea0: 4b ff fe f0 b ffc0fd90 <_Heap_Extend+0x24c> =============================================================================== ffc0ffec <_Heap_Free>: /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { ffc0ffec: 2c 04 00 00 cmpwi r4,0 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc0fff0: 7c 69 1b 78 mr r9,r3 /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { ffc0fff4: 41 82 00 dc beq- ffc100d0 <_Heap_Free+0xe4> ffc0fff8: 81 03 00 10 lwz r8,16(r3) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block ffc0fffc: 80 e3 00 20 lwz r7,32(r3) alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; ffc10000: 38 60 00 00 li r3,0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10004: 7d 44 43 96 divwu r10,r4,r8 ffc10008: 7d 4a 41 d6 mullw r10,r10,r8 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc1000c: 39 4a ff f8 addi r10,r10,-8 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc10010: 7f 8a 38 40 cmplw cr7,r10,r7 ffc10014: 4d 9c 00 20 bltlr cr7 ffc10018: 80 c9 00 24 lwz r6,36(r9) ffc1001c: 7f 8a 30 40 cmplw cr7,r10,r6 ffc10020: 40 9d 00 08 ble- cr7,ffc10028 <_Heap_Free+0x3c> <== ALWAYS TAKEN ffc10024: 4e 80 00 20 blr <== NOT EXECUTED --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10028: 81 6a 00 04 lwz r11,4(r10) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc1002c: 55 65 00 3c rlwinm r5,r11,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc10030: 7d 05 52 14 add r8,r5,r10 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc10034: 7f 87 40 40 cmplw cr7,r7,r8 ffc10038: 41 9d 00 94 bgt- cr7,ffc100cc <_Heap_Free+0xe0> <== NEVER TAKEN ffc1003c: 7f 86 40 40 cmplw cr7,r6,r8 ffc10040: 41 9c 00 88 blt- cr7,ffc100c8 <_Heap_Free+0xdc> <== NEVER TAKEN ffc10044: 80 88 00 04 lwz r4,4(r8) return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { ffc10048: 70 80 00 01 andi. r0,r4,1 ffc1004c: 41 82 00 8c beq- ffc100d8 <_Heap_Free+0xec> return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); ffc10050: 7f 86 40 00 cmpw cr7,r6,r8 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc10054: 54 84 00 3c rlwinm r4,r4,0,0,30 ffc10058: 41 9e 00 84 beq- cr7,ffc100dc <_Heap_Free+0xf0> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc1005c: 7c 68 22 14 add r3,r8,r4 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc10060: 80 63 00 04 lwz r3,4(r3) return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); ffc10064: 70 60 00 01 andi. r0,r3,1 ffc10068: 40 82 00 74 bne- ffc100dc <_Heap_Free+0xf0> if ( !_Heap_Is_prev_used( block ) ) { ffc1006c: 71 60 00 01 andi. r0,r11,1 ffc10070: 41 82 01 50 beq- ffc101c0 <_Heap_Free+0x1d4> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10074: 80 e8 00 08 lwz r7,8(r8) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; ffc10078: 7c 84 2a 14 add r4,r4,r5 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc1007c: 81 08 00 0c lwz r8,12(r8) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc10080: 60 86 00 01 ori r6,r4,1 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; ffc10084: 90 ea 00 08 stw r7,8(r10) new_block->prev = prev; ffc10088: 91 0a 00 0c stw r8,12(r10) next->prev = new_block; prev->next = new_block; ffc1008c: 91 48 00 08 stw r10,8(r8) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; ffc10090: 91 47 00 0c stw r10,12(r7) ffc10094: 90 ca 00 04 stw r6,4(r10) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; ffc10098: 7c 84 51 2e stwx r4,r4,r10 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc1009c: 81 09 00 40 lwz r8,64(r9) ++stats->frees; stats->free_size += block_size; return( true ); ffc100a0: 38 60 00 01 li r3,1 } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc100a4: 81 49 00 50 lwz r10,80(r9) stats->free_size += block_size; ffc100a8: 80 e9 00 30 lwz r7,48(r9) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc100ac: 39 08 ff ff addi r8,r8,-1 ++stats->frees; ffc100b0: 39 4a 00 01 addi r10,r10,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc100b4: 91 09 00 40 stw r8,64(r9) ++stats->frees; stats->free_size += block_size; ffc100b8: 7c a7 2a 14 add r5,r7,r5 } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc100bc: 91 49 00 50 stw r10,80(r9) stats->free_size += block_size; ffc100c0: 90 a9 00 30 stw r5,48(r9) return( true ); ffc100c4: 4e 80 00 20 blr ffc100c8: 4e 80 00 20 blr <== NOT EXECUTED ffc100cc: 4e 80 00 20 blr <== NOT EXECUTED * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { return true; ffc100d0: 38 60 00 01 li r3,1 ffc100d4: 4e 80 00 20 blr ffc100d8: 4e 80 00 20 blr next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { ffc100dc: 71 63 00 01 andi. r3,r11,1 ffc100e0: 40 82 00 28 bne- ffc10108 <_Heap_Free+0x11c> if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block ffc100e4: 39 80 00 00 li r12,0 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { uintptr_t const prev_size = block->prev_size; ffc100e8: 80 0a 00 00 lwz r0,0(r10) alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; ffc100ec: 38 60 00 00 li r3,0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc100f0: 7d 60 50 50 subf r11,r0,r10 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc100f4: 7f 87 58 40 cmplw cr7,r7,r11 ffc100f8: 4d 9d 00 20 bgtlr cr7 ffc100fc: 7f 86 58 40 cmplw cr7,r6,r11 ffc10100: 40 9c 00 54 bge- cr7,ffc10154 <_Heap_Free+0x168> <== ALWAYS TAKEN ffc10104: 4e 80 00 20 blr <== NOT EXECUTED 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; ffc10108: 80 e9 00 38 lwz r7,56(r9) 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; ffc1010c: 60 a4 00 01 ori r4,r5,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { ffc10110: 80 c9 00 3c lwz r6,60(r9) block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc10114: 38 e7 00 01 addi r7,r7,1 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; ffc10118: 90 8a 00 04 stw r4,4(r10) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { ffc1011c: 7f 87 30 40 cmplw cr7,r7,r6 } 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; ffc10120: 80 88 00 04 lwz r4,4(r8) RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc10124: 80 c9 00 08 lwz r6,8(r9) ffc10128: 54 84 00 3c rlwinm r4,r4,0,0,30 new_block->next = next; new_block->prev = block_before; ffc1012c: 91 2a 00 0c stw r9,12(r10) Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; ffc10130: 90 ca 00 08 stw r6,8(r10) ffc10134: 90 88 00 04 stw r4,4(r8) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; ffc10138: 91 46 00 0c stw r10,12(r6) next_block->prev_size = block_size; ffc1013c: 7c a5 51 2e stwx r5,r5,r10 { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; ffc10140: 91 49 00 08 stw r10,8(r9) /* Statistics */ ++stats->free_blocks; ffc10144: 90 e9 00 38 stw r7,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc10148: 40 bd ff 54 ble- cr7,ffc1009c <_Heap_Free+0xb0> stats->max_free_blocks = stats->free_blocks; ffc1014c: 90 e9 00 3c stw r7,60(r9) ffc10150: 4b ff ff 4c b ffc1009c <_Heap_Free+0xb0> 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; ffc10154: 80 eb 00 04 lwz r7,4(r11) 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) ) { ffc10158: 70 e6 00 01 andi. r6,r7,1 ffc1015c: 41 82 00 60 beq- ffc101bc <_Heap_Free+0x1d0> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ ffc10160: 2f 8c 00 00 cmpwi cr7,r12,0 ffc10164: 41 9e 00 38 beq- cr7,ffc1019c <_Heap_Free+0x1b0> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc10168: 80 c9 00 38 lwz r6,56(r9) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc1016c: 7c 05 02 14 add r0,r5,r0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10170: 80 e8 00 08 lwz r7,8(r8) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc10174: 7c 80 22 14 add r4,r0,r4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10178: 81 48 00 0c lwz r10,12(r8) } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc1017c: 38 c6 ff ff addi r6,r6,-1 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc10180: 60 88 00 01 ori r8,r4,1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; ffc10184: 90 ea 00 08 stw r7,8(r10) next->prev = prev; ffc10188: 91 47 00 0c stw r10,12(r7) } 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; ffc1018c: 90 c9 00 38 stw r6,56(r9) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc10190: 91 0b 00 04 stw r8,4(r11) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; ffc10194: 7c 84 59 2e stwx r4,r4,r11 ffc10198: 4b ff ff 04 b ffc1009c <_Heap_Free+0xb0> } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; ffc1019c: 7c 05 02 14 add r0,r5,r0 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc101a0: 60 07 00 01 ori r7,r0,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; ffc101a4: 7c 05 51 2e stwx r0,r5,r10 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc101a8: 90 eb 00 04 stw r7,4(r11) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc101ac: 80 e8 00 04 lwz r7,4(r8) ffc101b0: 54 e7 00 3c rlwinm r7,r7,0,0,30 ffc101b4: 90 e8 00 04 stw r7,4(r8) ffc101b8: 4b ff fe e4 b ffc1009c <_Heap_Free+0xb0> ffc101bc: 4e 80 00 20 blr <== NOT EXECUTED if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block ffc101c0: 39 80 00 01 li r12,1 ffc101c4: 4b ff ff 24 b ffc100e8 <_Heap_Free+0xfc> =============================================================================== ffc15408 <_Heap_Get_free_information>: return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc15408: 81 23 00 08 lwz r9,8(r3) ) { Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; ffc1540c: 39 40 00 00 li r10,0 ffc15410: 91 44 00 00 stw r10,0(r4) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); ffc15414: 38 e0 00 01 li r7,1 ffc15418: 7f 83 48 00 cmpw cr7,r3,r9 { Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; info->largest = 0; ffc1541c: 91 44 00 04 stw r10,4(r4) info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); ffc15420: 38 c0 00 00 li r6,0 ffc15424: 39 00 00 00 li r8,0 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; info->largest = 0; info->total = 0; ffc15428: 91 44 00 08 stw r10,8(r4) for(the_block = _Heap_Free_list_first(the_heap); ffc1542c: 40 be 00 10 bne+ cr7,ffc1543c <_Heap_Get_free_information+0x34><== ALWAYS TAKEN ffc15430: 4e 80 00 20 blr <== NOT EXECUTED ffc15434: 80 c4 00 04 lwz r6,4(r4) ffc15438: 7c a7 2b 78 mr r7,r5 - 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; ffc1543c: 81 49 00 04 lwz r10,4(r9) ffc15440: 38 a7 00 01 addi r5,r7,1 ffc15444: 55 4a 00 3c rlwinm r10,r10,0,0,30 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; if ( info->largest < the_size ) ffc15448: 7f 8a 30 40 cmplw cr7,r10,r6 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; ffc1544c: 7d 08 52 14 add r8,r8,r10 if ( info->largest < the_size ) ffc15450: 40 9d 00 08 ble- cr7,ffc15458 <_Heap_Get_free_information+0x50> info->largest = the_size; ffc15454: 91 44 00 04 stw r10,4(r4) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) ffc15458: 81 29 00 08 lwz r9,8(r9) info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); ffc1545c: 7f 83 48 00 cmpw cr7,r3,r9 ffc15460: 40 9e ff d4 bne+ cr7,ffc15434 <_Heap_Get_free_information+0x2c> ffc15464: 90 e4 00 00 stw r7,0(r4) ffc15468: 91 04 00 08 stw r8,8(r4) ffc1546c: 4e 80 00 20 blr =============================================================================== ffc0d3f0 <_Heap_Greedy_allocate>: Heap_Block *_Heap_Greedy_allocate( Heap_Control *heap, const uintptr_t *block_sizes, size_t block_count ) { ffc0d3f0: 94 21 ff e0 stwu r1,-32(r1) ffc0d3f4: 7c 08 02 a6 mflr r0 ffc0d3f8: 93 61 00 0c stw r27,12(r1) Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { ffc0d3fc: 7c bb 2b 79 mr. r27,r5 Heap_Block *_Heap_Greedy_allocate( Heap_Control *heap, const uintptr_t *block_sizes, size_t block_count ) { ffc0d400: 93 c1 00 18 stw r30,24(r1) ffc0d404: 7c 7e 1b 78 mr r30,r3 ffc0d408: 90 01 00 24 stw r0,36(r1) ffc0d40c: 93 81 00 10 stw r28,16(r1) ffc0d410: 93 a1 00 14 stw r29,20(r1) ffc0d414: 93 e1 00 1c stw r31,28(r1) Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { ffc0d418: 41 82 00 e0 beq- ffc0d4f8 <_Heap_Greedy_allocate+0x108> #include "config.h" #endif #include Heap_Block *_Heap_Greedy_allocate( ffc0d41c: 3b 84 ff fc addi r28,r4,-4 Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { ffc0d420: 3b e0 00 00 li r31,0 const uintptr_t *block_sizes, size_t block_count ) { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *allocated_blocks = NULL; ffc0d424: 3b a0 00 00 li r29,0 * @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 ); ffc0d428: 84 9c 00 04 lwzu r4,4(r28) ffc0d42c: 7f c3 f3 78 mr r3,r30 ffc0d430: 38 a0 00 00 li r5,0 ffc0d434: 38 c0 00 00 li r6,0 ffc0d438: 48 00 85 b9 bl ffc159f0 <_Heap_Allocate_aligned_with_boundary> Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { ffc0d43c: 3b ff 00 01 addi r31,r31,1 void *next = _Heap_Allocate( heap, block_sizes [i] ); if ( next != NULL ) { ffc0d440: 2c 03 00 00 cmpwi r3,0 Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { ffc0d444: 7f 9f d8 00 cmpw cr7,r31,r27 void *next = _Heap_Allocate( heap, block_sizes [i] ); if ( next != NULL ) { ffc0d448: 41 82 00 1c beq- ffc0d464 <_Heap_Greedy_allocate+0x74> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0d44c: 81 3e 00 10 lwz r9,16(r30) ffc0d450: 7c 63 4b 96 divwu r3,r3,r9 ffc0d454: 7d 23 49 d6 mullw r9,r3,r9 Heap_Block *next_block = _Heap_Block_of_alloc_area( (uintptr_t) next, heap->page_size ); next_block->next = allocated_blocks; ffc0d458: 93 a9 00 00 stw r29,0(r9) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc0d45c: 39 29 ff f8 addi r9,r9,-8 ffc0d460: 7d 3d 4b 78 mr r29,r9 Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { ffc0d464: 40 9e ff c4 bne+ cr7,ffc0d428 <_Heap_Greedy_allocate+0x38> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0d468: 83 fe 00 08 lwz r31,8(r30) next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { ffc0d46c: 7f 9e f8 00 cmpw cr7,r30,r31 ffc0d470: 41 9e 00 90 beq- cr7,ffc0d500 <_Heap_Greedy_allocate+0x110><== NEVER TAKEN ffc0d474: 3b 80 00 00 li r28,0 ffc0d478: 48 00 00 08 b ffc0d480 <_Heap_Greedy_allocate+0x90> ffc0d47c: 7d 3f 4b 78 mr r31,r9 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0d480: 80 df 00 04 lwz r6,4(r31) _Heap_Block_allocate( ffc0d484: 7f e4 fb 78 mr r4,r31 ffc0d488: 38 bf 00 08 addi r5,r31,8 ffc0d48c: 54 c6 00 3c rlwinm r6,r6,0,0,30 ffc0d490: 7f c3 f3 78 mr r3,r30 ffc0d494: 38 c6 ff f8 addi r6,r6,-8 ffc0d498: 48 00 03 e5 bl ffc0d87c <_Heap_Block_allocate> current, _Heap_Alloc_area_of_block( current ), _Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE ); current->next = blocks; ffc0d49c: 93 9f 00 08 stw r28,8(r31) ffc0d4a0: 7f fc fb 78 mr r28,r31 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0d4a4: 81 3e 00 08 lwz r9,8(r30) next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { ffc0d4a8: 7f 9e 48 00 cmpw cr7,r30,r9 ffc0d4ac: 40 9e ff d0 bne+ cr7,ffc0d47c <_Heap_Greedy_allocate+0x8c> current->next = blocks; blocks = current; } while ( allocated_blocks != NULL ) { ffc0d4b0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0d4b4: 41 9e 00 1c beq- cr7,ffc0d4d0 <_Heap_Greedy_allocate+0xe0> current = allocated_blocks; allocated_blocks = allocated_blocks->next; ffc0d4b8: 7f a4 eb 78 mr r4,r29 ffc0d4bc: 87 a4 00 08 lwzu r29,8(r4) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); ffc0d4c0: 7f c3 f3 78 mr r3,r30 ffc0d4c4: 48 00 87 69 bl ffc15c2c <_Heap_Free> current->next = blocks; blocks = current; } while ( allocated_blocks != NULL ) { ffc0d4c8: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0d4cc: 40 9e ff ec bne+ cr7,ffc0d4b8 <_Heap_Greedy_allocate+0xc8> allocated_blocks = allocated_blocks->next; _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); } return blocks; } ffc0d4d0: 80 01 00 24 lwz r0,36(r1) ffc0d4d4: 7f e3 fb 78 mr r3,r31 ffc0d4d8: 83 61 00 0c lwz r27,12(r1) ffc0d4dc: 7c 08 03 a6 mtlr r0 ffc0d4e0: 83 81 00 10 lwz r28,16(r1) ffc0d4e4: 83 a1 00 14 lwz r29,20(r1) ffc0d4e8: 83 c1 00 18 lwz r30,24(r1) ffc0d4ec: 83 e1 00 1c lwz r31,28(r1) ffc0d4f0: 38 21 00 20 addi r1,r1,32 ffc0d4f4: 4e 80 00 20 blr const uintptr_t *block_sizes, size_t block_count ) { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *allocated_blocks = NULL; ffc0d4f8: 3b a0 00 00 li r29,0 ffc0d4fc: 4b ff ff 6c b ffc0d468 <_Heap_Greedy_allocate+0x78> next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { ffc0d500: 3b e0 00 00 li r31,0 <== NOT EXECUTED ffc0d504: 4b ff ff c4 b ffc0d4c8 <_Heap_Greedy_allocate+0xd8> <== NOT EXECUTED =============================================================================== ffc0d508 <_Heap_Greedy_free>: void _Heap_Greedy_free( Heap_Control *heap, Heap_Block *blocks ) { while ( blocks != NULL ) { ffc0d508: 2c 04 00 00 cmpwi r4,0 void _Heap_Greedy_free( Heap_Control *heap, Heap_Block *blocks ) { ffc0d50c: 94 21 ff f0 stwu r1,-16(r1) ffc0d510: 7c 08 02 a6 mflr r0 ffc0d514: 93 c1 00 08 stw r30,8(r1) ffc0d518: 7c 7e 1b 78 mr r30,r3 ffc0d51c: 90 01 00 14 stw r0,20(r1) ffc0d520: 93 e1 00 0c stw r31,12(r1) while ( blocks != NULL ) { ffc0d524: 41 82 00 1c beq- ffc0d540 <_Heap_Greedy_free+0x38> <== NEVER TAKEN Heap_Block *current = blocks; blocks = blocks->next; ffc0d528: 87 e4 00 08 lwzu r31,8(r4) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); ffc0d52c: 7f c3 f3 78 mr r3,r30 ffc0d530: 48 00 86 fd bl ffc15c2c <_Heap_Free> void _Heap_Greedy_free( Heap_Control *heap, Heap_Block *blocks ) { while ( blocks != NULL ) { ffc0d534: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0d538: 7f e4 fb 78 mr r4,r31 ffc0d53c: 40 9e ff ec bne+ cr7,ffc0d528 <_Heap_Greedy_free+0x20> Heap_Block *current = blocks; blocks = blocks->next; _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); } } ffc0d540: 80 01 00 14 lwz r0,20(r1) ffc0d544: 83 c1 00 08 lwz r30,8(r1) ffc0d548: 7c 08 03 a6 mtlr r0 ffc0d54c: 83 e1 00 0c lwz r31,12(r1) ffc0d550: 38 21 00 10 addi r1,r1,16 ffc0d554: 4e 80 00 20 blr =============================================================================== ffc154dc <_Heap_Iterate>: void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { ffc154dc: 94 21 ff e8 stwu r1,-24(r1) ffc154e0: 7c 08 02 a6 mflr r0 ffc154e4: 90 01 00 1c stw r0,28(r1) ffc154e8: 93 c1 00 10 stw r30,16(r1) Heap_Block *current = heap->first_block; ffc154ec: 81 23 00 20 lwz r9,32(r3) Heap_Block *end = heap->last_block; ffc154f0: 83 c3 00 24 lwz r30,36(r3) void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { ffc154f4: 93 81 00 08 stw r28,8(r1) ffc154f8: 7c 9c 23 78 mr r28,r4 Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { ffc154fc: 7f 89 f0 00 cmpw cr7,r9,r30 void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { ffc15500: 93 a1 00 0c stw r29,12(r1) ffc15504: 7c bd 2b 78 mr r29,r5 ffc15508: 93 e1 00 14 stw r31,20(r1) Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { ffc1550c: 40 be 00 0c bne+ cr7,ffc15518 <_Heap_Iterate+0x3c> <== ALWAYS TAKEN ffc15510: 48 00 00 3c b ffc1554c <_Heap_Iterate+0x70> <== NOT EXECUTED ffc15514: 41 9a 00 38 beq- cr6,ffc1554c <_Heap_Iterate+0x70> ffc15518: 81 49 00 04 lwz r10,4(r9) uintptr_t size = _Heap_Block_size( current ); Heap_Block *next = _Heap_Block_at( current, size ); bool used = _Heap_Is_prev_used( next ); stop = (*visitor)( current, size, used, visitor_arg ); ffc1551c: 7d 23 4b 78 mr r3,r9 ffc15520: 7f a6 eb 78 mr r6,r29 ffc15524: 7f 89 03 a6 mtctr r28 ffc15528: 55 44 00 3c rlwinm r4,r10,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc1552c: 7f e9 22 14 add r31,r9,r4 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc15530: 80 bf 00 04 lwz r5,4(r31) ffc15534: 54 a5 07 fe clrlwi r5,r5,31 ffc15538: 4e 80 04 21 bctrl ffc1553c: 7f e9 fb 78 mr r9,r31 { Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { ffc15540: 2f 83 00 00 cmpwi cr7,r3,0 ffc15544: 7f 1e f8 00 cmpw cr6,r30,r31 ffc15548: 41 9e ff cc beq+ cr7,ffc15514 <_Heap_Iterate+0x38> <== ALWAYS TAKEN stop = (*visitor)( current, size, used, visitor_arg ); current = next; } } ffc1554c: 80 01 00 1c lwz r0,28(r1) ffc15550: 83 81 00 08 lwz r28,8(r1) ffc15554: 7c 08 03 a6 mtlr r0 ffc15558: 83 a1 00 0c lwz r29,12(r1) ffc1555c: 83 c1 00 10 lwz r30,16(r1) ffc15560: 83 e1 00 14 lwz r31,20(r1) ffc15564: 38 21 00 18 addi r1,r1,24 ffc15568: 4e 80 00 20 blr =============================================================================== ffc1d2a4 <_Heap_Size_of_alloc_area>: RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc1d2a4: 81 23 00 10 lwz r9,16(r3) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block ffc1d2a8: 81 43 00 20 lwz r10,32(r3) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc1d2ac: 7d 04 4b 96 divwu r8,r4,r9 ffc1d2b0: 7d 28 49 d6 mullw r9,r8,r9 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc1d2b4: 39 29 ff f8 addi r9,r9,-8 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc1d2b8: 7f 89 50 40 cmplw cr7,r9,r10 ffc1d2bc: 41 9c 00 50 blt- cr7,ffc1d30c <_Heap_Size_of_alloc_area+0x68> ffc1d2c0: 81 03 00 24 lwz r8,36(r3) ffc1d2c4: 7f 89 40 40 cmplw cr7,r9,r8 ffc1d2c8: 41 9d 00 44 bgt- cr7,ffc1d30c <_Heap_Size_of_alloc_area+0x68> - 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; ffc1d2cc: 80 e9 00 04 lwz r7,4(r9) ffc1d2d0: 54 e7 00 3c rlwinm r7,r7,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc1d2d4: 7d 27 4a 14 add r9,r7,r9 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; ffc1d2d8: 7f 8a 48 40 cmplw cr7,r10,r9 ffc1d2dc: 41 9d 00 30 bgt- cr7,ffc1d30c <_Heap_Size_of_alloc_area+0x68><== NEVER TAKEN ffc1d2e0: 7f 88 48 40 cmplw cr7,r8,r9 ffc1d2e4: 41 9c 00 28 blt- cr7,ffc1d30c <_Heap_Size_of_alloc_area+0x68><== 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; ffc1d2e8: 81 49 00 04 lwz r10,4(r9) 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 ) ) { return false; ffc1d2ec: 38 60 00 00 li r3,0 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ffc1d2f0: 71 48 00 01 andi. r8,r10,1 ffc1d2f4: 41 82 00 20 beq- ffc1d314 <_Heap_Size_of_alloc_area+0x70><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; ffc1d2f8: 20 84 00 04 subfic r4,r4,4 ffc1d2fc: 7d 24 4a 14 add r9,r4,r9 ffc1d300: 91 25 00 00 stw r9,0(r5) return true; ffc1d304: 38 60 00 01 li r3,1 ffc1d308: 4e 80 00 20 blr 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 ) ) { return false; ffc1d30c: 38 60 00 00 li r3,0 ffc1d310: 4e 80 00 20 blr } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } ffc1d314: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0b91c <_Heap_Walk>: uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc0b91c: 2f 85 00 00 cmpwi cr7,r5,0 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { ffc0b920: 94 21 ff a0 stwu r1,-96(r1) ffc0b924: 7c 08 02 a6 mflr r0 ffc0b928: 91 c1 00 18 stw r14,24(r1) ffc0b92c: 90 01 00 64 stw r0,100(r1) ffc0b930: 92 e1 00 3c stw r23,60(r1) ffc0b934: 93 01 00 40 stw r24,64(r1) ffc0b938: 7c 98 23 78 mr r24,r4 ffc0b93c: 93 41 00 48 stw r26,72(r1) ffc0b940: 93 61 00 4c stw r27,76(r1) ffc0b944: 93 e1 00 5c stw r31,92(r1) ffc0b948: 7c 7f 1b 78 mr r31,r3 ffc0b94c: 91 e1 00 1c stw r15,28(r1) ffc0b950: 92 01 00 20 stw r16,32(r1) ffc0b954: 92 21 00 24 stw r17,36(r1) ffc0b958: 92 41 00 28 stw r18,40(r1) ffc0b95c: 92 61 00 2c stw r19,44(r1) ffc0b960: 92 81 00 30 stw r20,48(r1) ffc0b964: 92 a1 00 34 stw r21,52(r1) ffc0b968: 92 c1 00 38 stw r22,56(r1) ffc0b96c: 93 21 00 44 stw r25,68(r1) ffc0b970: 93 81 00 50 stw r28,80(r1) ffc0b974: 93 a1 00 54 stw r29,84(r1) ffc0b978: 93 c1 00 58 stw r30,88(r1) uintptr_t const page_size = heap->page_size; ffc0b97c: 83 63 00 10 lwz r27,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc0b980: 81 c3 00 14 lwz r14,20(r3) Heap_Block *const first_block = heap->first_block; ffc0b984: 83 43 00 20 lwz r26,32(r3) Heap_Block *const last_block = heap->last_block; ffc0b988: 82 e3 00 24 lwz r23,36(r3) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc0b98c: 41 9e 00 78 beq- cr7,ffc0ba04 <_Heap_Walk+0xe8> if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b990: 3d 20 00 00 lis r9,0 ffc0b994: 81 29 28 08 lwz r9,10248(r9) uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc0b998: 3f 20 ff c1 lis r25,-63 ffc0b99c: 3b 39 b8 1c addi r25,r25,-18404 if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b9a0: 2f 89 00 03 cmpwi cr7,r9,3 return true; ffc0b9a4: 38 60 00 01 li r3,1 Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b9a8: 41 9e 00 78 beq- cr7,ffc0ba20 <_Heap_Walk+0x104> <== ALWAYS TAKEN block = next_block; } while ( block != first_block ); return true; } ffc0b9ac: 80 01 00 64 lwz r0,100(r1) ffc0b9b0: 81 c1 00 18 lwz r14,24(r1) ffc0b9b4: 7c 08 03 a6 mtlr r0 ffc0b9b8: 81 e1 00 1c lwz r15,28(r1) ffc0b9bc: 82 01 00 20 lwz r16,32(r1) ffc0b9c0: 82 21 00 24 lwz r17,36(r1) ffc0b9c4: 82 41 00 28 lwz r18,40(r1) ffc0b9c8: 82 61 00 2c lwz r19,44(r1) ffc0b9cc: 82 81 00 30 lwz r20,48(r1) ffc0b9d0: 82 a1 00 34 lwz r21,52(r1) ffc0b9d4: 82 c1 00 38 lwz r22,56(r1) ffc0b9d8: 82 e1 00 3c lwz r23,60(r1) ffc0b9dc: 83 01 00 40 lwz r24,64(r1) ffc0b9e0: 83 21 00 44 lwz r25,68(r1) ffc0b9e4: 83 41 00 48 lwz r26,72(r1) ffc0b9e8: 83 61 00 4c lwz r27,76(r1) ffc0b9ec: 83 81 00 50 lwz r28,80(r1) ffc0b9f0: 83 a1 00 54 lwz r29,84(r1) ffc0b9f4: 83 c1 00 58 lwz r30,88(r1) ffc0b9f8: 83 e1 00 5c lwz r31,92(r1) ffc0b9fc: 38 21 00 60 addi r1,r1,96 ffc0ba00: 4e 80 00 20 blr Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0ba04: 3d 20 00 00 lis r9,0 ffc0ba08: 81 29 28 08 lwz r9,10248(r9) uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc0ba0c: 3f 20 ff c1 lis r25,-63 ffc0ba10: 3b 39 b8 18 addi r25,r25,-18408 if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0ba14: 2f 89 00 03 cmpwi cr7,r9,3 return true; ffc0ba18: 38 60 00 01 li r3,1 Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0ba1c: 40 9e ff 90 bne+ cr7,ffc0b9ac <_Heap_Walk+0x90> 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)( ffc0ba20: 80 ff 00 08 lwz r7,8(r31) ffc0ba24: 3c a0 ff c2 lis r5,-62 ffc0ba28: 81 5f 00 0c lwz r10,12(r31) ffc0ba2c: 7f 03 c3 78 mr r3,r24 ffc0ba30: 81 1f 00 18 lwz r8,24(r31) ffc0ba34: 38 80 00 00 li r4,0 ffc0ba38: 81 3f 00 1c lwz r9,28(r31) ffc0ba3c: 38 a5 98 ac addi r5,r5,-26452 ffc0ba40: 90 e1 00 0c stw r7,12(r1) ffc0ba44: 7f 66 db 78 mr r6,r27 ffc0ba48: 7d c7 73 78 mr r7,r14 ffc0ba4c: 7f 29 03 a6 mtctr r25 ffc0ba50: 91 41 00 10 stw r10,16(r1) ffc0ba54: 7f 4a d3 78 mr r10,r26 ffc0ba58: 92 e1 00 08 stw r23,8(r1) ffc0ba5c: 4c c6 31 82 crclr 4*cr1+eq ffc0ba60: 4e 80 04 21 bctrl heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { ffc0ba64: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0ba68: 41 9e 00 a4 beq- cr7,ffc0bb0c <_Heap_Walk+0x1f0> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { ffc0ba6c: 73 67 00 07 andi. r7,r27,7 ffc0ba70: 40 82 00 c0 bne- ffc0bb30 <_Heap_Walk+0x214> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0ba74: 7d 2e db 96 divwu r9,r14,r27 ffc0ba78: 7d 29 d9 d6 mullw r9,r9,r27 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { ffc0ba7c: 7f 8e 48 00 cmpw cr7,r14,r9 ffc0ba80: 40 9e 00 d8 bne- cr7,ffc0bb58 <_Heap_Walk+0x23c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0ba84: 39 3a 00 08 addi r9,r26,8 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0ba88: 7d 49 db 96 divwu r10,r9,r27 ffc0ba8c: 7d 4a d9 d6 mullw r10,r10,r27 ); return false; } if ( ffc0ba90: 7f 89 50 00 cmpw cr7,r9,r10 ffc0ba94: 40 9e 00 ec bne- cr7,ffc0bb80 <_Heap_Walk+0x264> block = next_block; } while ( block != first_block ); return true; } ffc0ba98: 83 9a 00 04 lwz r28,4(r26) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { ffc0ba9c: 73 90 00 01 andi. r16,r28,1 ffc0baa0: 41 82 01 08 beq- ffc0bba8 <_Heap_Walk+0x28c> - 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; ffc0baa4: 81 37 00 04 lwz r9,4(r23) ffc0baa8: 55 29 00 3c rlwinm r9,r9,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0baac: 7d 37 4a 14 add r9,r23,r9 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0bab0: 81 49 00 04 lwz r10,4(r9) ); return false; } if ( _Heap_Is_free( last_block ) ) { ffc0bab4: 71 47 00 01 andi. r7,r10,1 ffc0bab8: 41 82 00 30 beq- ffc0bae8 <_Heap_Walk+0x1cc> ); return false; } if ( ffc0babc: 7f 9a 48 00 cmpw cr7,r26,r9 ffc0bac0: 41 9e 01 0c beq- cr7,ffc0bbcc <_Heap_Walk+0x2b0> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( ffc0bac4: 3c a0 ff c2 lis r5,-62 ffc0bac8: 7f 29 03 a6 mtctr r25 ffc0bacc: 7f 03 c3 78 mr r3,r24 ffc0bad0: 38 80 00 01 li r4,1 ffc0bad4: 38 a5 9a 14 addi r5,r5,-26092 ffc0bad8: 4c c6 31 82 crclr 4*cr1+eq ffc0badc: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bae0: 38 60 00 00 li r3,0 ffc0bae4: 4b ff fe c8 b ffc0b9ac <_Heap_Walk+0x90> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( ffc0bae8: 3c a0 ff c2 lis r5,-62 ffc0baec: 7f 29 03 a6 mtctr r25 ffc0baf0: 7f 03 c3 78 mr r3,r24 ffc0baf4: 38 80 00 01 li r4,1 ffc0baf8: 38 a5 99 fc addi r5,r5,-26116 ffc0bafc: 4c c6 31 82 crclr 4*cr1+eq ffc0bb00: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bb04: 38 60 00 00 li r3,0 ffc0bb08: 4b ff fe a4 b ffc0b9ac <_Heap_Walk+0x90> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); ffc0bb0c: 3c a0 ff c2 lis r5,-62 ffc0bb10: 7f 29 03 a6 mtctr r25 ffc0bb14: 7f 03 c3 78 mr r3,r24 ffc0bb18: 38 80 00 01 li r4,1 ffc0bb1c: 38 a5 99 40 addi r5,r5,-26304 ffc0bb20: 4c c6 31 82 crclr 4*cr1+eq ffc0bb24: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bb28: 38 60 00 00 li r3,0 ffc0bb2c: 4b ff fe 80 b ffc0b9ac <_Heap_Walk+0x90> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( ffc0bb30: 3c a0 ff c2 lis r5,-62 ffc0bb34: 7f 29 03 a6 mtctr r25 ffc0bb38: 7f 03 c3 78 mr r3,r24 ffc0bb3c: 38 80 00 01 li r4,1 ffc0bb40: 38 a5 99 54 addi r5,r5,-26284 ffc0bb44: 7f 66 db 78 mr r6,r27 ffc0bb48: 4c c6 31 82 crclr 4*cr1+eq ffc0bb4c: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bb50: 38 60 00 00 li r3,0 ffc0bb54: 4b ff fe 58 b ffc0b9ac <_Heap_Walk+0x90> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( ffc0bb58: 3c a0 ff c2 lis r5,-62 ffc0bb5c: 7f 29 03 a6 mtctr r25 ffc0bb60: 7f 03 c3 78 mr r3,r24 ffc0bb64: 38 80 00 01 li r4,1 ffc0bb68: 38 a5 99 74 addi r5,r5,-26252 ffc0bb6c: 7d c6 73 78 mr r6,r14 ffc0bb70: 4c c6 31 82 crclr 4*cr1+eq ffc0bb74: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bb78: 38 60 00 00 li r3,0 ffc0bb7c: 4b ff fe 30 b ffc0b9ac <_Heap_Walk+0x90> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( ffc0bb80: 3c a0 ff c2 lis r5,-62 ffc0bb84: 7f 29 03 a6 mtctr r25 ffc0bb88: 7f 03 c3 78 mr r3,r24 ffc0bb8c: 38 80 00 01 li r4,1 ffc0bb90: 38 a5 99 98 addi r5,r5,-26216 ffc0bb94: 7f 46 d3 78 mr r6,r26 ffc0bb98: 4c c6 31 82 crclr 4*cr1+eq ffc0bb9c: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bba0: 38 60 00 00 li r3,0 ffc0bba4: 4b ff fe 08 b ffc0b9ac <_Heap_Walk+0x90> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( ffc0bba8: 3c a0 ff c2 lis r5,-62 ffc0bbac: 7f 29 03 a6 mtctr r25 ffc0bbb0: 7f 03 c3 78 mr r3,r24 ffc0bbb4: 38 80 00 01 li r4,1 ffc0bbb8: 38 a5 99 cc addi r5,r5,-26164 ffc0bbbc: 4c c6 31 82 crclr 4*cr1+eq ffc0bbc0: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bbc4: 38 60 00 00 li r3,0 ffc0bbc8: 4b ff fd e4 b ffc0b9ac <_Heap_Walk+0x90> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0bbcc: 80 df 00 08 lwz r6,8(r31) int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; ffc0bbd0: 80 9f 00 10 lwz r4,16(r31) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { ffc0bbd4: 7f 9f 30 00 cmpw cr7,r31,r6 block = next_block; } while ( block != first_block ); return true; } ffc0bbd8: 81 3f 00 20 lwz r9,32(r31) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { ffc0bbdc: 41 9e 00 30 beq- cr7,ffc0bc0c <_Heap_Walk+0x2f0> 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; ffc0bbe0: 7f 89 30 40 cmplw cr7,r9,r6 ffc0bbe4: 40 9d 03 14 ble- cr7,ffc0bef8 <_Heap_Walk+0x5dc> <== ALWAYS TAKEN if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( ffc0bbe8: 3c a0 ff c2 lis r5,-62 ffc0bbec: 7f 29 03 a6 mtctr r25 ffc0bbf0: 7f 03 c3 78 mr r3,r24 ffc0bbf4: 38 80 00 01 li r4,1 ffc0bbf8: 38 a5 9a 44 addi r5,r5,-26044 ffc0bbfc: 4c c6 31 82 crclr 4*cr1+eq ffc0bc00: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bc04: 38 60 00 00 li r3,0 ffc0bc08: 4b ff fd a4 b ffc0b9ac <_Heap_Walk+0x90> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0bc0c: 3e 80 ff c2 lis r20,-62 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc0bc10: 3e a0 ff c2 lis r21,-62 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0bc14: 3e 60 ff c2 lis r19,-62 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0bc18: 7f 5d d3 78 mr r29,r26 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0bc1c: 3a 94 9c 60 addi r20,r20,-25504 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc0bc20: 3a b5 9c 48 addi r21,r21,-25528 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)( ffc0bc24: 3a 73 9b a4 addi r19,r19,-25692 ffc0bc28: 3e 20 ff c2 lis r17,-62 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0bc2c: 3e c0 ff c2 lis r22,-62 ffc0bc30: 3d e0 ff c2 lis r15,-62 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0bc34: 3e 40 ff c2 lis r18,-62 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0bc38: 57 9c 00 3c rlwinm r28,r28,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0bc3c: 7f dc ea 14 add r30,r28,r29 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0bc40: 7f 89 f0 40 cmplw cr7,r9,r30 ffc0bc44: 40 9d 00 30 ble- cr7,ffc0bc74 <_Heap_Walk+0x358> <== ALWAYS TAKEN Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( ffc0bc48: 3c a0 ff c2 lis r5,-62 ffc0bc4c: 7f 03 c3 78 mr r3,r24 ffc0bc50: 38 80 00 01 li r4,1 ffc0bc54: 38 a5 9a e4 addi r5,r5,-25884 return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( ffc0bc58: 7f a6 eb 78 mr r6,r29 ffc0bc5c: 7f 29 03 a6 mtctr r25 ffc0bc60: 7f c7 f3 78 mr r7,r30 ffc0bc64: 4c c6 31 82 crclr 4*cr1+eq ffc0bc68: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bc6c: 38 60 00 00 li r3,0 ffc0bc70: 4b ff fd 3c b ffc0b9ac <_Heap_Walk+0x90> ffc0bc74: 81 3f 00 24 lwz r9,36(r31) ffc0bc78: 7f 89 f0 40 cmplw cr7,r9,r30 ffc0bc7c: 41 bc ff cc blt- cr7,ffc0bc48 <_Heap_Walk+0x32c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0bc80: 7d 5c db 96 divwu r10,r28,r27 ffc0bc84: 7d 4a d9 d6 mullw r10,r10,r27 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; ffc0bc88: 7f a9 ba 78 xor r9,r29,r23 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc0bc8c: 7f 9c 50 00 cmpw cr7,r28,r10 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; ffc0bc90: 7d 29 00 34 cntlzw r9,r9 ffc0bc94: 55 29 d9 7e rlwinm r9,r9,27,5,31 ffc0bc98: 69 29 00 01 xori r9,r9,1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc0bc9c: 41 9e 00 5c beq- cr7,ffc0bcf8 <_Heap_Walk+0x3dc> ffc0bca0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bca4: 40 9e 02 28 bne- cr7,ffc0becc <_Heap_Walk+0x5b0> 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; ffc0bca8: 81 3e 00 04 lwz r9,4(r30) ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0bcac: 71 27 00 01 andi. r7,r9,1 ffc0bcb0: 41 82 00 d4 beq- ffc0bd84 <_Heap_Walk+0x468> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { ffc0bcb4: 2f 90 00 00 cmpwi cr7,r16,0 ffc0bcb8: 41 9e 00 a4 beq- cr7,ffc0bd5c <_Heap_Walk+0x440> (*printer)( ffc0bcbc: 7f 03 c3 78 mr r3,r24 ffc0bcc0: 7f 29 03 a6 mtctr r25 ffc0bcc4: 38 80 00 00 li r4,0 ffc0bcc8: 7e a5 ab 78 mr r5,r21 ffc0bccc: 7f a6 eb 78 mr r6,r29 ffc0bcd0: 7f 87 e3 78 mr r7,r28 ffc0bcd4: 4c c6 31 82 crclr 4*cr1+eq ffc0bcd8: 4e 80 04 21 bctrl block->prev_size ); } block = next_block; } while ( block != first_block ); ffc0bcdc: 7f 9a f0 00 cmpw cr7,r26,r30 ffc0bce0: 41 9e 01 68 beq- cr7,ffc0be48 <_Heap_Walk+0x52c> ffc0bce4: 83 9e 00 04 lwz r28,4(r30) ffc0bce8: 7f dd f3 78 mr r29,r30 ffc0bcec: 81 3f 00 20 lwz r9,32(r31) ffc0bcf0: 57 90 07 fe clrlwi r16,r28,31 ffc0bcf4: 4b ff ff 44 b ffc0bc38 <_Heap_Walk+0x31c> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { ffc0bcf8: 7f 8e e0 40 cmplw cr7,r14,r28 ffc0bcfc: 40 9d 00 3c ble- cr7,ffc0bd38 <_Heap_Walk+0x41c> ffc0bd00: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bd04: 41 9e ff a4 beq+ cr7,ffc0bca8 <_Heap_Walk+0x38c> <== NEVER TAKEN (*printer)( ffc0bd08: 3c a0 ff c2 lis r5,-62 ffc0bd0c: 7f 29 03 a6 mtctr r25 ffc0bd10: 7f 03 c3 78 mr r3,r24 ffc0bd14: 38 80 00 01 li r4,1 ffc0bd18: 38 a5 9b 44 addi r5,r5,-25788 ffc0bd1c: 7f a6 eb 78 mr r6,r29 ffc0bd20: 7f 87 e3 78 mr r7,r28 ffc0bd24: 7d c8 73 78 mr r8,r14 ffc0bd28: 4c c6 31 82 crclr 4*cr1+eq ffc0bd2c: 4e 80 04 21 bctrl block, block_size, min_block_size ); return false; ffc0bd30: 38 60 00 00 li r3,0 ffc0bd34: 4b ff fc 78 b ffc0b9ac <_Heap_Walk+0x90> } if ( next_block_begin <= block_begin && is_not_last_block ) { ffc0bd38: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0bd3c: 41 bc ff 6c blt- cr7,ffc0bca8 <_Heap_Walk+0x38c> ffc0bd40: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bd44: 41 9e ff 64 beq+ cr7,ffc0bca8 <_Heap_Walk+0x38c> (*printer)( ffc0bd48: 3c a0 ff c2 lis r5,-62 ffc0bd4c: 7f 03 c3 78 mr r3,r24 ffc0bd50: 38 80 00 01 li r4,1 ffc0bd54: 38 a5 9b 70 addi r5,r5,-25744 ffc0bd58: 4b ff ff 00 b ffc0bc58 <_Heap_Walk+0x33c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0bd5c: 7f a6 eb 78 mr r6,r29 ffc0bd60: 81 1d 00 00 lwz r8,0(r29) ffc0bd64: 7f 03 c3 78 mr r3,r24 ffc0bd68: 7f 29 03 a6 mtctr r25 ffc0bd6c: 38 80 00 00 li r4,0 ffc0bd70: 7e 85 a3 78 mr r5,r20 ffc0bd74: 7f 87 e3 78 mr r7,r28 ffc0bd78: 4c c6 31 82 crclr 4*cr1+eq ffc0bd7c: 4e 80 04 21 bctrl ffc0bd80: 4b ff ff 5c b ffc0bcdc <_Heap_Walk+0x3c0> false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? ffc0bd84: 81 1d 00 0c lwz r8,12(r29) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0bd88: 81 3f 00 08 lwz r9,8(r31) 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; ffc0bd8c: 80 ff 00 0c lwz r7,12(r31) ffc0bd90: 7f 89 40 00 cmpw cr7,r9,r8 ffc0bd94: 41 9e 00 f4 beq- cr7,ffc0be88 <_Heap_Walk+0x56c> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0bd98: 7f 9f 40 00 cmpw cr7,r31,r8 ffc0bd9c: 41 9e 00 fc beq- cr7,ffc0be98 <_Heap_Walk+0x57c> ffc0bda0: 39 36 9c 14 addi r9,r22,-25580 block->next, block->next == last_free_block ? ffc0bda4: 81 5d 00 08 lwz r10,8(r29) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0bda8: 7f 87 50 00 cmpw cr7,r7,r10 ffc0bdac: 41 9e 00 d4 beq- cr7,ffc0be80 <_Heap_Walk+0x564> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0bdb0: 7f 9f 50 00 cmpw cr7,r31,r10 ffc0bdb4: 41 9e 00 dc beq- cr7,ffc0be90 <_Heap_Walk+0x574> ffc0bdb8: 38 f6 9c 14 addi r7,r22,-25580 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)( ffc0bdbc: 90 e1 00 08 stw r7,8(r1) ffc0bdc0: 7f 03 c3 78 mr r3,r24 ffc0bdc4: 38 80 00 00 li r4,0 ffc0bdc8: 7f 29 03 a6 mtctr r25 ffc0bdcc: 7e 65 9b 78 mr r5,r19 ffc0bdd0: 7f a6 eb 78 mr r6,r29 ffc0bdd4: 7f 87 e3 78 mr r7,r28 ffc0bdd8: 4c c6 31 82 crclr 4*cr1+eq ffc0bddc: 4e 80 04 21 bctrl block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { ffc0bde0: 81 1e 00 00 lwz r8,0(r30) ffc0bde4: 7f 9c 40 00 cmpw cr7,r28,r8 ffc0bde8: 40 9e 00 68 bne- cr7,ffc0be50 <_Heap_Walk+0x534> ); return false; } if ( !prev_used ) { ffc0bdec: 2f 90 00 00 cmpwi cr7,r16,0 ffc0bdf0: 41 9e 00 b4 beq- cr7,ffc0bea4 <_Heap_Walk+0x588> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0bdf4: 81 3f 00 08 lwz r9,8(r31) ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { ffc0bdf8: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0bdfc: 41 9e 00 24 beq- cr7,ffc0be20 <_Heap_Walk+0x504> <== NEVER TAKEN if ( free_block == block ) { ffc0be00: 7f 9d 48 00 cmpw cr7,r29,r9 ffc0be04: 40 be 00 0c bne+ cr7,ffc0be10 <_Heap_Walk+0x4f4> ffc0be08: 4b ff fe d4 b ffc0bcdc <_Heap_Walk+0x3c0> ffc0be0c: 41 ba fe d0 beq- cr6,ffc0bcdc <_Heap_Walk+0x3c0> return true; } free_block = free_block->next; ffc0be10: 81 29 00 08 lwz r9,8(r9) ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { ffc0be14: 7f 9f 48 00 cmpw cr7,r31,r9 if ( free_block == block ) { ffc0be18: 7f 1d 48 00 cmpw cr6,r29,r9 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { ffc0be1c: 40 9e ff f0 bne+ cr7,ffc0be0c <_Heap_Walk+0x4f0> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0be20: 3c a0 ff c2 lis r5,-62 ffc0be24: 7f 29 03 a6 mtctr r25 ffc0be28: 7f 03 c3 78 mr r3,r24 ffc0be2c: 38 80 00 01 li r4,1 ffc0be30: 38 a5 9c 88 addi r5,r5,-25464 ffc0be34: 7f a6 eb 78 mr r6,r29 ffc0be38: 4c c6 31 82 crclr 4*cr1+eq ffc0be3c: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0be40: 38 60 00 00 li r3,0 ffc0be44: 4b ff fb 68 b ffc0b9ac <_Heap_Walk+0x90> } block = next_block; } while ( block != first_block ); return true; ffc0be48: 38 60 00 01 li r3,1 ffc0be4c: 4b ff fb 60 b ffc0b9ac <_Heap_Walk+0x90> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( ffc0be50: 3c a0 ff c2 lis r5,-62 ffc0be54: 7f 29 03 a6 mtctr r25 ffc0be58: 7f 03 c3 78 mr r3,r24 ffc0be5c: 38 80 00 01 li r4,1 ffc0be60: 38 a5 9b dc addi r5,r5,-25636 ffc0be64: 7f a6 eb 78 mr r6,r29 ffc0be68: 7f 87 e3 78 mr r7,r28 ffc0be6c: 7f c9 f3 78 mr r9,r30 ffc0be70: 4c c6 31 82 crclr 4*cr1+eq ffc0be74: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0be78: 38 60 00 00 li r3,0 ffc0be7c: 4b ff fb 30 b ffc0b9ac <_Heap_Walk+0x90> 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)( ffc0be80: 38 f1 98 90 addi r7,r17,-26480 ffc0be84: 4b ff ff 38 b ffc0bdbc <_Heap_Walk+0x4a0> ffc0be88: 39 32 98 74 addi r9,r18,-26508 ffc0be8c: 4b ff ff 18 b ffc0bda4 <_Heap_Walk+0x488> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0be90: 38 ef 98 a0 addi r7,r15,-26464 ffc0be94: 4b ff ff 28 b ffc0bdbc <_Heap_Walk+0x4a0> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0be98: 3d 40 ff c2 lis r10,-62 ffc0be9c: 39 2a 98 84 addi r9,r10,-26492 ffc0bea0: 4b ff ff 04 b ffc0bda4 <_Heap_Walk+0x488> return false; } if ( !prev_used ) { (*printer)( ffc0bea4: 3c a0 ff c2 lis r5,-62 ffc0bea8: 7f 29 03 a6 mtctr r25 ffc0beac: 7f 03 c3 78 mr r3,r24 ffc0beb0: 38 80 00 01 li r4,1 ffc0beb4: 38 a5 9c 18 addi r5,r5,-25576 ffc0beb8: 7f a6 eb 78 mr r6,r29 ffc0bebc: 4c c6 31 82 crclr 4*cr1+eq ffc0bec0: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bec4: 38 60 00 00 li r3,0 ffc0bec8: 4b ff fa e4 b ffc0b9ac <_Heap_Walk+0x90> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( ffc0becc: 3c a0 ff c2 lis r5,-62 ffc0bed0: 7f 29 03 a6 mtctr r25 ffc0bed4: 7f 03 c3 78 mr r3,r24 ffc0bed8: 38 80 00 01 li r4,1 ffc0bedc: 38 a5 9b 14 addi r5,r5,-25836 ffc0bee0: 7f a6 eb 78 mr r6,r29 ffc0bee4: 7f 87 e3 78 mr r7,r28 ffc0bee8: 4c c6 31 82 crclr 4*cr1+eq ffc0beec: 4e 80 04 21 bctrl "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; ffc0bef0: 38 60 00 00 li r3,0 ffc0bef4: 4b ff fa b8 b ffc0b9ac <_Heap_Walk+0x90> 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; ffc0bef8: 80 bf 00 24 lwz r5,36(r31) ffc0befc: 7f 85 30 40 cmplw cr7,r5,r6 ffc0bf00: 41 bc fc e8 blt- cr7,ffc0bbe8 <_Heap_Walk+0x2cc> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0bf04: 39 46 00 08 addi r10,r6,8 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0bf08: 7d 0a 23 96 divwu r8,r10,r4 ffc0bf0c: 7d 08 21 d6 mullw r8,r8,r4 ); return false; } if ( ffc0bf10: 7f 8a 40 00 cmpw cr7,r10,r8 ffc0bf14: 40 9e 00 cc bne- cr7,ffc0bfe0 <_Heap_Walk+0x6c4> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0bf18: 81 46 00 04 lwz r10,4(r6) ffc0bf1c: 55 4a 00 3c rlwinm r10,r10,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc0bf20: 7d 46 52 14 add r10,r6,r10 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; ffc0bf24: 81 4a 00 04 lwz r10,4(r10) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0bf28: 71 47 00 01 andi. r7,r10,1 ffc0bf2c: 40 82 00 90 bne- ffc0bfbc <_Heap_Walk+0x6a0> <== NEVER TAKEN ffc0bf30: 7f e8 fb 78 mr r8,r31 ffc0bf34: 7c c3 33 78 mr r3,r6 ffc0bf38: 48 00 00 54 b ffc0bf8c <_Heap_Walk+0x670> return false; } prev_block = free_block; free_block = free_block->next; ffc0bf3c: 80 c6 00 08 lwz r6,8(r6) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { ffc0bf40: 7f 9f 30 00 cmpw cr7,r31,r6 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0bf44: 7f 06 48 40 cmplw cr6,r6,r9 ffc0bf48: 7c 86 28 40 cmplw cr1,r6,r5 ffc0bf4c: 41 be fc c0 beq- cr7,ffc0bc0c <_Heap_Walk+0x2f0> ffc0bf50: 41 b8 fc 98 blt- cr6,ffc0bbe8 <_Heap_Walk+0x2cc> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0bf54: 39 46 00 08 addi r10,r6,8 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0bf58: 41 a5 fc 90 bgt- cr1,ffc0bbe8 <_Heap_Walk+0x2cc> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0bf5c: 7c ea 23 96 divwu r7,r10,r4 ffc0bf60: 7c e7 21 d6 mullw r7,r7,r4 ffc0bf64: 7c 68 1b 78 mr r8,r3 ); return false; } if ( ffc0bf68: 7f 8a 38 00 cmpw cr7,r10,r7 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0bf6c: 7c c3 33 78 mr r3,r6 ); return false; } if ( ffc0bf70: 40 9e 00 70 bne- cr7,ffc0bfe0 <_Heap_Walk+0x6c4> - 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; ffc0bf74: 81 46 00 04 lwz r10,4(r6) ffc0bf78: 55 4a 00 3c rlwinm r10,r10,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc0bf7c: 7d 46 52 14 add r10,r6,r10 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; ffc0bf80: 81 4a 00 04 lwz r10,4(r10) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0bf84: 71 47 00 01 andi. r7,r10,1 ffc0bf88: 40 82 00 34 bne- ffc0bfbc <_Heap_Walk+0x6a0> ); return false; } if ( free_block->prev != prev_block ) { ffc0bf8c: 80 e6 00 0c lwz r7,12(r6) ffc0bf90: 7f 87 40 00 cmpw cr7,r7,r8 ffc0bf94: 41 9e ff a8 beq+ cr7,ffc0bf3c <_Heap_Walk+0x620> (*printer)( ffc0bf98: 3c a0 ff c2 lis r5,-62 ffc0bf9c: 7f 29 03 a6 mtctr r25 ffc0bfa0: 7f 03 c3 78 mr r3,r24 ffc0bfa4: 38 80 00 01 li r4,1 ffc0bfa8: 38 a5 9a b0 addi r5,r5,-25936 ffc0bfac: 4c c6 31 82 crclr 4*cr1+eq ffc0bfb0: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bfb4: 38 60 00 00 li r3,0 ffc0bfb8: 4b ff f9 f4 b ffc0b9ac <_Heap_Walk+0x90> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( ffc0bfbc: 3c a0 ff c2 lis r5,-62 ffc0bfc0: 7f 29 03 a6 mtctr r25 ffc0bfc4: 7f 03 c3 78 mr r3,r24 ffc0bfc8: 38 80 00 01 li r4,1 ffc0bfcc: 38 a5 9a 94 addi r5,r5,-25964 ffc0bfd0: 4c c6 31 82 crclr 4*cr1+eq ffc0bfd4: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bfd8: 38 60 00 00 li r3,0 ffc0bfdc: 4b ff f9 d0 b ffc0b9ac <_Heap_Walk+0x90> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( ffc0bfe0: 3c a0 ff c2 lis r5,-62 ffc0bfe4: 7f 29 03 a6 mtctr r25 ffc0bfe8: 7f 03 c3 78 mr r3,r24 ffc0bfec: 38 80 00 01 li r4,1 ffc0bff0: 38 a5 9a 64 addi r5,r5,-26012 ffc0bff4: 4c c6 31 82 crclr 4*cr1+eq ffc0bff8: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bffc: 38 60 00 00 li r3,0 ffc0c000: 4b ff f9 ac b ffc0b9ac <_Heap_Walk+0x90> =============================================================================== ffc0b81c <_Heap_Walk_print>: /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b81c: 94 21 ff 88 stwu r1,-120(r1) ffc0b820: 7c 08 02 a6 mflr r0 ffc0b824: 7c 6b 1b 78 mr r11,r3 ffc0b828: 90 01 00 7c stw r0,124(r1) ffc0b82c: 93 e1 00 74 stw r31,116(r1) ffc0b830: 90 c1 00 1c stw r6,28(r1) ffc0b834: 90 e1 00 20 stw r7,32(r1) ffc0b838: 91 01 00 24 stw r8,36(r1) ffc0b83c: 91 21 00 28 stw r9,40(r1) ffc0b840: 91 41 00 2c stw r10,44(r1) ffc0b844: 40 86 00 24 bne- cr1,ffc0b868 <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN ffc0b848: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc0b84c: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc0b850: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0b854: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0b858: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0b85c: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0b860: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0b864: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list ap; if ( error ) { ffc0b868: 2f 84 00 00 cmpwi cr7,r4,0 { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b86c: 7c bf 2b 78 mr r31,r5 va_list ap; if ( error ) { ffc0b870: 40 9e 00 58 bne- cr7,ffc0b8c8 <_Heap_Walk_print+0xac> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); ffc0b874: 3c 60 ff c2 lis r3,-62 ffc0b878: 7d 64 5b 78 mr r4,r11 ffc0b87c: 38 63 98 68 addi r3,r3,-26520 ffc0b880: 4c c6 31 82 crclr 4*cr1+eq ffc0b884: 4b ff a5 ed bl ffc05e70 } va_start( ap, fmt ); ffc0b888: 39 20 00 03 li r9,3 ffc0b88c: 99 21 00 08 stb r9,8(r1) ffc0b890: 39 20 00 00 li r9,0 vprintk( fmt, ap ); ffc0b894: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b898: 99 21 00 09 stb r9,9(r1) ffc0b89c: 39 21 00 80 addi r9,r1,128 vprintk( fmt, ap ); ffc0b8a0: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b8a4: 91 21 00 0c stw r9,12(r1) ffc0b8a8: 39 21 00 10 addi r9,r1,16 ffc0b8ac: 91 21 00 10 stw r9,16(r1) vprintk( fmt, ap ); ffc0b8b0: 4b ff d6 e9 bl ffc08f98 va_end( ap ); } ffc0b8b4: 80 01 00 7c lwz r0,124(r1) ffc0b8b8: 83 e1 00 74 lwz r31,116(r1) ffc0b8bc: 7c 08 03 a6 mtlr r0 ffc0b8c0: 38 21 00 78 addi r1,r1,120 ffc0b8c4: 4e 80 00 20 blr static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { va_list ap; if ( error ) { printk( "FAIL[%d]: ", source ); ffc0b8c8: 3c 60 ff c2 lis r3,-62 ffc0b8cc: 7d 64 5b 78 mr r4,r11 ffc0b8d0: 38 63 98 5c addi r3,r3,-26532 ffc0b8d4: 4c c6 31 82 crclr 4*cr1+eq ffc0b8d8: 4b ff a5 99 bl ffc05e70 } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b8dc: 39 20 00 03 li r9,3 ffc0b8e0: 99 21 00 08 stb r9,8(r1) ffc0b8e4: 39 20 00 00 li r9,0 vprintk( fmt, ap ); ffc0b8e8: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b8ec: 99 21 00 09 stb r9,9(r1) ffc0b8f0: 39 21 00 80 addi r9,r1,128 vprintk( fmt, ap ); ffc0b8f4: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b8f8: 91 21 00 0c stw r9,12(r1) ffc0b8fc: 39 21 00 10 addi r9,r1,16 ffc0b900: 91 21 00 10 stw r9,16(r1) vprintk( fmt, ap ); ffc0b904: 4b ff d6 95 bl ffc08f98 va_end( ap ); } ffc0b908: 80 01 00 7c lwz r0,124(r1) ffc0b90c: 83 e1 00 74 lwz r31,116(r1) ffc0b910: 7c 08 03 a6 mtlr r0 ffc0b914: 38 21 00 78 addi r1,r1,120 ffc0b918: 4e 80 00 20 blr =============================================================================== ffc0a4c8 <_IO_Initialize_all_drivers>: void _IO_Initialize_all_drivers( void ) { ffc0a4c8: 94 21 ff f0 stwu r1,-16(r1) ffc0a4cc: 7c 08 02 a6 mflr r0 ffc0a4d0: 93 c1 00 08 stw r30,8(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc0a4d4: 3f c0 00 00 lis r30,0 ffc0a4d8: 81 3e 28 5c lwz r9,10332(r30) for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } void _IO_Initialize_all_drivers( void ) { ffc0a4dc: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc0a4e0: 2f 89 00 00 cmpwi cr7,r9,0 for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } void _IO_Initialize_all_drivers( void ) { ffc0a4e4: 93 e1 00 0c stw r31,12(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc0a4e8: 41 9e 00 2c beq- cr7,ffc0a514 <_IO_Initialize_all_drivers+0x4c><== NEVER TAKEN ffc0a4ec: 3b e0 00 00 li r31,0 ffc0a4f0: 3b de 28 5c addi r30,r30,10332 (void) rtems_io_initialize( major, 0, NULL ); ffc0a4f4: 7f e3 fb 78 mr r3,r31 ffc0a4f8: 38 80 00 00 li r4,0 ffc0a4fc: 38 a0 00 00 li r5,0 ffc0a500: 48 00 57 0d bl ffc0fc0c void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc0a504: 81 3e 00 00 lwz r9,0(r30) ffc0a508: 3b ff 00 01 addi r31,r31,1 ffc0a50c: 7f 89 f8 40 cmplw cr7,r9,r31 ffc0a510: 41 9d ff e4 bgt+ cr7,ffc0a4f4 <_IO_Initialize_all_drivers+0x2c> (void) rtems_io_initialize( major, 0, NULL ); } ffc0a514: 80 01 00 14 lwz r0,20(r1) ffc0a518: 83 c1 00 08 lwz r30,8(r1) ffc0a51c: 7c 08 03 a6 mtlr r0 ffc0a520: 83 e1 00 0c lwz r31,12(r1) ffc0a524: 38 21 00 10 addi r1,r1,16 ffc0a528: 4e 80 00 20 blr =============================================================================== ffc0a3b4 <_IO_Manager_initialization>: #include #include void _IO_Manager_initialization(void) { ffc0a3b4: 94 21 ff e0 stwu r1,-32(r1) uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = rtems_configuration_get_device_driver_table(); ffc0a3b8: 3d 20 ff c2 lis r9,-62 ffc0a3bc: 39 29 d5 38 addi r9,r9,-10952 #include #include void _IO_Manager_initialization(void) { ffc0a3c0: 7c 08 02 a6 mflr r0 ffc0a3c4: 93 a1 00 14 stw r29,20(r1) ffc0a3c8: 93 c1 00 18 stw r30,24(r1) uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = rtems_configuration_get_device_driver_table(); drivers_in_table = rtems_configuration_get_number_of_device_drivers(); number_of_drivers = rtems_configuration_get_maximum_drivers(); ffc0a3cc: 83 a9 00 34 lwz r29,52(r9) rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = rtems_configuration_get_device_driver_table(); drivers_in_table = rtems_configuration_get_number_of_device_drivers(); ffc0a3d0: 83 c9 00 38 lwz r30,56(r9) #include #include void _IO_Manager_initialization(void) { ffc0a3d4: 93 e1 00 1c stw r31,28(r1) /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) ffc0a3d8: 7f 9e e8 40 cmplw cr7,r30,r29 #include #include void _IO_Manager_initialization(void) { ffc0a3dc: 90 01 00 24 stw r0,36(r1) ffc0a3e0: 93 61 00 0c stw r27,12(r1) ffc0a3e4: 93 81 00 10 stw r28,16(r1) uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = rtems_configuration_get_device_driver_table(); ffc0a3e8: 83 e9 00 3c lwz r31,60(r9) /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) ffc0a3ec: 40 9c 00 a8 bge- cr7,ffc0a494 <_IO_Manager_initialization+0xe0> * 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 ) ffc0a3f0: 1f 7d 00 18 mulli r27,r29,24 * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( ffc0a3f4: 7f 63 db 78 mr r3,r27 ffc0a3f8: 48 00 3a e9 bl ffc0dee0 <_Workspace_Allocate_or_fatal_error> /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) ffc0a3fc: 3f 80 00 00 lis r28,0 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; ffc0a400: 3d 20 00 00 lis r9,0 /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) ffc0a404: 90 7c 28 60 stw r3,10336(r28) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( ffc0a408: 38 80 00 00 li r4,0 ffc0a40c: 7f 65 db 78 mr r5,r27 _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; ffc0a410: 93 a9 28 5c stw r29,10332(r9) memset( ffc0a414: 48 00 8a 5d bl ffc12e70 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc0a418: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0a41c: 41 9e 00 54 beq- cr7,ffc0a470 <_IO_Manager_initialization+0xbc><== NEVER TAKEN ffc0a420: 80 fc 28 60 lwz r7,10336(r28) #include #include #include void _IO_Manager_initialization(void) ffc0a424: 1d 7e 00 18 mulli r11,r30,24 ffc0a428: 39 00 00 00 li r8,0 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; ffc0a42c: 7f e9 fb 78 mr r9,r31 ffc0a430: 7c 69 40 6e lwzux r3,r9,r8 ffc0a434: 7d 47 42 14 add r10,r7,r8 ffc0a438: 80 c9 00 0c lwz r6,12(r9) ffc0a43c: 80 89 00 04 lwz r4,4(r9) ffc0a440: 80 a9 00 08 lwz r5,8(r9) ffc0a444: 7c 67 41 2e stwx r3,r7,r8 ffc0a448: 39 08 00 18 addi r8,r8,24 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc0a44c: 7f 88 58 00 cmpw cr7,r8,r11 _IO_Driver_address_table[index] = driver_table[index]; ffc0a450: 90 8a 00 04 stw r4,4(r10) ffc0a454: 90 aa 00 08 stw r5,8(r10) ffc0a458: 90 ca 00 0c stw r6,12(r10) ffc0a45c: 80 c9 00 10 lwz r6,16(r9) ffc0a460: 81 29 00 14 lwz r9,20(r9) ffc0a464: 90 ca 00 10 stw r6,16(r10) ffc0a468: 91 2a 00 14 stw r9,20(r10) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc0a46c: 40 9e ff c0 bne+ cr7,ffc0a42c <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; } ffc0a470: 80 01 00 24 lwz r0,36(r1) ffc0a474: 83 61 00 0c lwz r27,12(r1) ffc0a478: 7c 08 03 a6 mtlr r0 ffc0a47c: 83 81 00 10 lwz r28,16(r1) ffc0a480: 83 a1 00 14 lwz r29,20(r1) ffc0a484: 83 c1 00 18 lwz r30,24(r1) ffc0a488: 83 e1 00 1c lwz r31,28(r1) ffc0a48c: 38 21 00 20 addi r1,r1,32 ffc0a490: 4e 80 00 20 blr ffc0a494: 80 01 00 24 lwz r0,36(r1) * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; ffc0a498: 3d 20 00 00 lis r9,0 ffc0a49c: 93 e9 28 60 stw r31,10336(r9) _IO_Number_of_drivers = number_of_drivers; ffc0a4a0: 3d 20 00 00 lis r9,0 sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } ffc0a4a4: 7c 08 03 a6 mtlr r0 ffc0a4a8: 83 61 00 0c lwz r27,12(r1) ffc0a4ac: 83 81 00 10 lwz r28,16(r1) ffc0a4b0: 83 a1 00 14 lwz r29,20(r1) ffc0a4b4: 83 e1 00 1c lwz r31,28(r1) * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; _IO_Number_of_drivers = number_of_drivers; ffc0a4b8: 93 c9 28 5c stw r30,10332(r9) sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } ffc0a4bc: 83 c1 00 18 lwz r30,24(r1) ffc0a4c0: 38 21 00 20 addi r1,r1,32 ffc0a4c4: 4e 80 00 20 blr =============================================================================== ffc0b318 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0b318: 94 21 ff d8 stwu r1,-40(r1) ffc0b31c: 7c 08 02 a6 mflr r0 ffc0b320: 93 e1 00 24 stw r31,36(r1) ffc0b324: 7c 9f 23 78 mr r31,r4 Internal_errors_t error ) { User_extensions_Fatal_context ctx = { source, is_internal, error }; _User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor ); ffc0b328: 3c 80 ff c1 lis r4,-63 ffc0b32c: 93 c1 00 20 stw r30,32(r1) ffc0b330: 38 84 d8 34 addi r4,r4,-10188 ffc0b334: 7c 7e 1b 78 mr r30,r3 ffc0b338: 38 61 00 08 addi r3,r1,8 ffc0b33c: 93 a1 00 1c stw r29,28(r1) ffc0b340: 7c bd 2b 78 mr r29,r5 ffc0b344: 90 01 00 2c stw r0,44(r1) Internal_errors_Source source, bool is_internal, Internal_errors_t error ) { User_extensions_Fatal_context ctx = { source, is_internal, error }; ffc0b348: 93 c1 00 08 stw r30,8(r1) ffc0b34c: 9b e1 00 0c stb r31,12(r1) ffc0b350: 90 a1 00 10 stw r5,16(r1) _User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor ); ffc0b354: 48 00 25 05 bl ffc0d858 <_User_extensions_Iterate> _User_extensions_Fatal( the_source, is_internal, the_error ); _Internal_errors_What_happened.the_source = the_source; ffc0b358: 3d 40 00 00 lis r10,0 ffc0b35c: 39 2a 2d ec addi r9,r10,11756 ffc0b360: 93 ca 2d ec stw r30,11756(r10) _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc0b364: 7f a3 eb 78 mr r3,r29 ) { _User_extensions_Fatal( the_source, is_internal, the_error ); _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; ffc0b368: 9b e9 00 04 stb r31,4(r9) RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc0b36c: 39 40 00 05 li r10,5 _Internal_errors_What_happened.the_error = the_error; ffc0b370: 93 a9 00 08 stw r29,8(r9) ffc0b374: 3d 20 00 00 lis r9,0 ffc0b378: 91 49 28 4c stw r10,10316(r9) _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc0b37c: 4b ff 88 8d bl ffc03c08 <_BSP_Fatal_error> ffc0b380: 48 00 00 00 b ffc0b380 <_Internal_error_Occurred+0x68><== NOT EXECUTED =============================================================================== ffc0b398 <_Objects_Allocate>: #endif Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0b398: 94 21 ff f0 stwu r1,-16(r1) ffc0b39c: 7c 08 02 a6 mflr r0 ffc0b3a0: 90 01 00 14 stw r0,20(r1) * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) ffc0b3a4: 81 23 00 18 lwz r9,24(r3) #endif Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0b3a8: 93 e1 00 0c stw r31,12(r1) ffc0b3ac: 7c 7f 1b 78 mr r31,r3 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) ffc0b3b0: 2f 89 00 00 cmpwi cr7,r9,0 #endif Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0b3b4: 93 c1 00 08 stw r30,8(r1) * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) ffc0b3b8: 41 9e 00 88 beq- cr7,ffc0b440 <_Objects_Allocate+0xa8> <== 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 ); ffc0b3bc: 3b c3 00 20 addi r30,r3,32 ffc0b3c0: 7f c3 f3 78 mr r3,r30 ffc0b3c4: 4b ff f3 e1 bl ffc0a7a4 <_Chain_Get> if ( information->auto_extend ) { ffc0b3c8: 89 3f 00 12 lbz r9,18(r31) ffc0b3cc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b3d0: 41 9e 00 40 beq- cr7,ffc0b410 <_Objects_Allocate+0x78> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { ffc0b3d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b3d8: 41 9e 00 50 beq- cr7,ffc0b428 <_Objects_Allocate+0x90> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0b3dc: a1 03 00 0a lhz r8,10(r3) ffc0b3e0: a1 3f 00 0a lhz r9,10(r31) _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; ffc0b3e4: a1 5f 00 14 lhz r10,20(r31) } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0b3e8: 7d 29 40 50 subf r9,r9,r8 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; ffc0b3ec: a0 ff 00 2c lhz r7,44(r31) if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; ffc0b3f0: 7d 29 53 96 divwu r9,r9,r10 information->inactive_per_block[ block ]--; ffc0b3f4: 81 5f 00 30 lwz r10,48(r31) ffc0b3f8: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0b3fc: 7d 0a 48 2e lwzx r8,r10,r9 information->inactive--; ffc0b400: 38 e7 ff ff addi r7,r7,-1 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc0b404: 39 08 ff ff addi r8,r8,-1 ffc0b408: 7d 0a 49 2e stwx r8,r10,r9 information->inactive--; ffc0b40c: b0 ff 00 2c sth r7,44(r31) ); } #endif return the_object; } ffc0b410: 80 01 00 14 lwz r0,20(r1) ffc0b414: 83 c1 00 08 lwz r30,8(r1) ffc0b418: 7c 08 03 a6 mtlr r0 ffc0b41c: 83 e1 00 0c lwz r31,12(r1) ffc0b420: 38 21 00 10 addi r1,r1,16 ffc0b424: 4e 80 00 20 blr * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); ffc0b428: 7f e3 fb 78 mr r3,r31 ffc0b42c: 48 00 00 49 bl ffc0b474 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc0b430: 7f c3 f3 78 mr r3,r30 ffc0b434: 4b ff f3 71 bl ffc0a7a4 <_Chain_Get> } if ( the_object ) { ffc0b438: 2c 03 00 00 cmpwi r3,0 ffc0b43c: 40 a2 ff a0 bne- ffc0b3dc <_Objects_Allocate+0x44> ); } #endif return the_object; } ffc0b440: 80 01 00 14 lwz r0,20(r1) * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) return NULL; ffc0b444: 38 60 00 00 li r3,0 ); } #endif return the_object; } ffc0b448: 83 c1 00 08 lwz r30,8(r1) ffc0b44c: 7c 08 03 a6 mtlr r0 ffc0b450: 83 e1 00 0c lwz r31,12(r1) ffc0b454: 38 21 00 10 addi r1,r1,16 ffc0b458: 4e 80 00 20 blr =============================================================================== ffc0b474 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { ffc0b474: 94 21 ff c0 stwu r1,-64(r1) ffc0b478: 7c 08 02 a6 mflr r0 ffc0b47c: 90 01 00 44 stw r0,68(r1) minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0b480: 81 23 00 34 lwz r9,52(r3) */ void _Objects_Extend_information( Objects_Information *information ) { ffc0b484: 93 41 00 28 stw r26,40(r1) minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0b488: 2f 89 00 00 cmpwi cr7,r9,0 */ void _Objects_Extend_information( Objects_Information *information ) { ffc0b48c: 93 61 00 2c stw r27,44(r1) ffc0b490: 93 e1 00 3c stw r31,60(r1) ffc0b494: 7c 7f 1b 78 mr r31,r3 ffc0b498: 92 c1 00 18 stw r22,24(r1) ffc0b49c: 92 e1 00 1c stw r23,28(r1) ffc0b4a0: 93 01 00 20 stw r24,32(r1) ffc0b4a4: 93 21 00 24 stw r25,36(r1) ffc0b4a8: 93 81 00 30 stw r28,48(r1) ffc0b4ac: 93 a1 00 34 stw r29,52(r1) ffc0b4b0: 93 c1 00 38 stw r30,56(r1) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc0b4b4: a3 63 00 0a lhz r27,10(r3) ffc0b4b8: a3 43 00 10 lhz r26,16(r3) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0b4bc: 41 9e 02 74 beq- cr7,ffc0b730 <_Objects_Extend_information+0x2bc> block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc0b4c0: a1 03 00 14 lhz r8,20(r3) ffc0b4c4: 7f 9a 43 96 divwu r28,r26,r8 for ( ; block < block_count; block++ ) { ffc0b4c8: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0b4cc: 41 9e 02 bc beq- cr7,ffc0b788 <_Objects_Extend_information+0x314><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { ffc0b4d0: 81 49 00 00 lwz r10,0(r9) ffc0b4d4: 7d 07 43 78 mr r7,r8 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc0b4d8: 7f 7e db 78 mr r30,r27 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc0b4dc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0b4e0: 41 9e 02 bc beq- cr7,ffc0b79c <_Objects_Extend_information+0x328><== NEVER TAKEN * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0b4e4: 3b a0 00 00 li r29,0 ffc0b4e8: 7f 89 03 a6 mtctr r28 ffc0b4ec: 48 00 00 10 b ffc0b4fc <_Objects_Extend_information+0x88> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc0b4f0: 85 49 00 04 lwzu r10,4(r9) ffc0b4f4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0b4f8: 41 9e 02 0c beq- cr7,ffc0b704 <_Objects_Extend_information+0x290> do_extend = false; break; } else index_base += information->allocation_size; ffc0b4fc: 7f de 42 14 add r30,r30,r8 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc0b500: 3b bd 00 01 addi r29,r29,1 ffc0b504: 42 00 ff ec bdnz+ ffc0b4f0 <_Objects_Extend_information+0x7c> /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; ffc0b508: 3b 20 00 01 li r25,1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; ffc0b50c: 7f 5a 3a 14 add r26,r26,r7 /* * 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 ) { ffc0b510: 2b 9a ff ff cmplwi cr7,r26,65535 ffc0b514: 41 9d 01 b8 bgt- cr7,ffc0b6cc <_Objects_Extend_information+0x258> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { ffc0b518: 89 3f 00 12 lbz r9,18(r31) /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; ffc0b51c: 80 7f 00 18 lwz r3,24(r31) if ( information->auto_extend ) { ffc0b520: 2f 89 00 00 cmpwi cr7,r9,0 /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; ffc0b524: 7c 67 19 d6 mullw r3,r7,r3 if ( information->auto_extend ) { ffc0b528: 41 9e 01 e4 beq- cr7,ffc0b70c <_Objects_Extend_information+0x298> new_object_block = _Workspace_Allocate( block_size ); ffc0b52c: 48 00 29 8d bl ffc0deb8 <_Workspace_Allocate> if ( !new_object_block ) ffc0b530: 7c 77 1b 79 mr. r23,r3 ffc0b534: 41 82 01 98 beq- ffc0b6cc <_Objects_Extend_information+0x258> } /* * Do we need to grow the tables? */ if ( do_extend ) { ffc0b538: 2f 99 00 00 cmpwi cr7,r25,0 ffc0b53c: 41 9e 01 0c beq- cr7,ffc0b648 <_Objects_Extend_information+0x1d4> * 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 *)); if ( information->auto_extend ) { ffc0b540: 89 3f 00 12 lbz r9,18(r31) */ /* * Up the block count and maximum */ block_count++; ffc0b544: 3a dc 00 01 addi r22,r28,1 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc0b548: 1c 76 00 03 mulli r3,r22,3 ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { ffc0b54c: 2f 89 00 00 cmpwi cr7,r9,0 /* * 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 *)); ffc0b550: 7c 7a 1a 14 add r3,r26,r3 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc0b554: 7c 63 da 14 add r3,r3,r27 block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * ffc0b558: 54 63 10 3a rlwinm r3,r3,2,0,29 (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { ffc0b55c: 40 9e 01 bc bne- cr7,ffc0b718 <_Objects_Extend_information+0x2a4> if ( !object_blocks ) { _Workspace_Free( new_object_block ); return; } } else { object_blocks = _Workspace_Allocate_or_fatal_error( block_size ); ffc0b560: 48 00 29 81 bl ffc0dee0 <_Workspace_Allocate_or_fatal_error> ffc0b564: 7c 79 1b 78 mr r25,r3 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0b568: a1 3f 00 10 lhz r9,16(r31) /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( object_blocks, block_count * sizeof(void*) ); ffc0b56c: 56 d6 10 3a rlwinm r22,r22,2,0,29 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc0b570: 7f 19 b2 14 add r24,r25,r22 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0b574: 7f 9b 48 40 cmplw cr7,r27,r9 ffc0b578: 7e d8 b2 14 add r22,r24,r22 ffc0b57c: 41 9c 01 cc blt- cr7,ffc0b748 <_Objects_Extend_information+0x2d4> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0b580: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0b584: 41 9e 00 28 beq- cr7,ffc0b5ac <_Objects_Extend_information+0x138><== NEVER TAKEN local_table[ index ] = NULL; ffc0b588: 57 68 10 3a rlwinm r8,r27,2,0,29 ffc0b58c: 39 08 ff fc addi r8,r8,-4 ffc0b590: 55 08 f0 be rlwinm r8,r8,30,2,31 ffc0b594: 39 08 00 01 addi r8,r8,1 ffc0b598: 7d 09 03 a6 mtctr r8 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc0b59c: 39 36 ff fc addi r9,r22,-4 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; ffc0b5a0: 39 40 00 00 li r10,0 ffc0b5a4: 95 49 00 04 stwu r10,4(r9) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0b5a8: 42 00 ff fc bdnz+ ffc0b5a4 <_Objects_Extend_information+0x130> ffc0b5ac: 57 9c 10 3a rlwinm r28,r28,2,0,29 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0b5b0: a1 5f 00 14 lhz r10,20(r31) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0b5b4: 39 20 00 00 li r9,0 ffc0b5b8: 7d 39 e1 2e stwx r9,r25,r28 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0b5bc: 7d 1e 52 14 add r8,r30,r10 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0b5c0: 7f 9e 40 40 cmplw cr7,r30,r8 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; ffc0b5c4: 7d 38 e1 2e stwx r9,r24,r28 for ( index=index_base ; ffc0b5c8: 40 9c 00 34 bge- cr7,ffc0b5fc <_Objects_Extend_information+0x188><== NEVER TAKEN * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc0b5cc: 55 47 10 3a rlwinm r7,r10,2,0,29 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0b5d0: 38 e7 ff fc addi r7,r7,-4 ffc0b5d4: 54 e7 f0 be rlwinm r7,r7,30,2,31 ffc0b5d8: 38 e7 00 01 addi r7,r7,1 ffc0b5dc: 7c e9 03 a6 mtctr r7 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc0b5e0: 57 c8 10 3a rlwinm r8,r30,2,0,29 ffc0b5e4: 7d 16 42 14 add r8,r22,r8 ffc0b5e8: 39 20 00 00 li r9,0 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0b5ec: 39 40 00 00 li r10,0 ffc0b5f0: 7d 48 49 2e stwx r10,r8,r9 ffc0b5f4: 39 29 00 04 addi r9,r9,4 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0b5f8: 42 00 ff f8 bdnz+ ffc0b5f0 <_Objects_Extend_information+0x17c> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0b5fc: 7d 40 00 a6 mfmsr r10 ffc0b600: 7d 30 42 a6 mfsprg r9,0 ffc0b604: 7d 49 48 78 andc r9,r10,r9 ffc0b608: 7d 20 01 24 mtmsr r9 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0b60c: 81 3f 00 00 lwz r9,0(r31) information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0b610: a1 1f 00 04 lhz r8,4(r31) ffc0b614: 55 29 c0 0e rlwinm r9,r9,24,0,7 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; ffc0b618: 80 7f 00 34 lwz r3,52(r31) (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0b61c: 55 08 d8 08 rlwinm r8,r8,27,0,4 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; ffc0b620: 93 1f 00 30 stw r24,48(r31) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0b624: 65 29 00 01 oris r9,r9,1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0b628: 7d 29 43 78 or r9,r9,r8 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; ffc0b62c: 93 3f 00 34 stw r25,52(r31) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0b630: 7d 29 d3 78 or r9,r9,r26 information->inactive_per_block = inactive_per_block; information->local_table = local_table; ffc0b634: 92 df 00 1c stw r22,28(r31) information->maximum = (Objects_Maximum) maximum; ffc0b638: b3 5f 00 10 sth r26,16(r31) information->maximum_id = _Objects_Build_id( ffc0b63c: 91 3f 00 0c stw r9,12(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0b640: 7d 40 01 24 mtmsr r10 information->maximum ); _ISR_Enable( level ); _Workspace_Free( old_tables ); ffc0b644: 48 00 28 8d bl ffc0ded0 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0b648: 81 3f 00 34 lwz r9,52(r31) ffc0b64c: 57 bd 10 3a rlwinm r29,r29,2,0,29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0b650: a0 bf 00 14 lhz r5,20(r31) ffc0b654: 38 61 00 08 addi r3,r1,8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0b658: 7e e9 e9 2e stwx r23,r9,r29 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0b65c: 3b 9f 00 20 addi r28,r31,32 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0b660: 81 3f 00 34 lwz r9,52(r31) ffc0b664: 80 df 00 18 lwz r6,24(r31) ffc0b668: 7c 89 e8 2e lwzx r4,r9,r29 ffc0b66c: 4b ff f1 79 bl ffc0a7e4 <_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 ) { ffc0b670: 48 00 00 2c b ffc0b69c <_Objects_Extend_information+0x228> ffc0b674: 81 5f 00 00 lwz r10,0(r31) the_object->id = _Objects_Build_id( ffc0b678: a1 1f 00 04 lhz r8,4(r31) ffc0b67c: 55 4a c0 0e rlwinm r10,r10,24,0,7 ffc0b680: 65 4a 00 01 oris r10,r10,1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0b684: 55 08 d8 08 rlwinm r8,r8,27,0,4 ffc0b688: 7d 4a 43 78 or r10,r10,r8 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0b68c: 7d 4a f3 78 or r10,r10,r30 ffc0b690: 91 49 00 08 stw r10,8(r9) index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; ffc0b694: 3b de 00 01 addi r30,r30,1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0b698: 4b ff f0 dd bl ffc0a774 <_Chain_Append> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc0b69c: 38 61 00 08 addi r3,r1,8 ffc0b6a0: 4b ff f1 05 bl ffc0a7a4 <_Chain_Get> ffc0b6a4: 7c 69 1b 79 mr. r9,r3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0b6a8: 7f 83 e3 78 mr r3,r28 ffc0b6ac: 7d 24 4b 78 mr r4,r9 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc0b6b0: 40 82 ff c4 bne+ ffc0b674 <_Objects_Extend_information+0x200> index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0b6b4: a1 1f 00 2c lhz r8,44(r31) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0b6b8: a1 3f 00 14 lhz r9,20(r31) ffc0b6bc: 81 5f 00 30 lwz r10,48(r31) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0b6c0: 7d 09 42 14 add r8,r9,r8 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0b6c4: 7d 2a e9 2e stwx r9,r10,r29 information->inactive = ffc0b6c8: b1 1f 00 2c sth r8,44(r31) (Objects_Maximum)(information->inactive + information->allocation_size); } ffc0b6cc: 80 01 00 44 lwz r0,68(r1) ffc0b6d0: 82 c1 00 18 lwz r22,24(r1) ffc0b6d4: 7c 08 03 a6 mtlr r0 ffc0b6d8: 82 e1 00 1c lwz r23,28(r1) ffc0b6dc: 83 01 00 20 lwz r24,32(r1) ffc0b6e0: 83 21 00 24 lwz r25,36(r1) ffc0b6e4: 83 41 00 28 lwz r26,40(r1) ffc0b6e8: 83 61 00 2c lwz r27,44(r1) ffc0b6ec: 83 81 00 30 lwz r28,48(r1) ffc0b6f0: 83 a1 00 34 lwz r29,52(r1) ffc0b6f4: 83 c1 00 38 lwz r30,56(r1) ffc0b6f8: 83 e1 00 3c lwz r31,60(r1) ffc0b6fc: 38 21 00 40 addi r1,r1,64 ffc0b700: 4e 80 00 20 blr else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; ffc0b704: 3b 20 00 00 li r25,0 ffc0b708: 4b ff fe 04 b ffc0b50c <_Objects_Extend_information+0x98> if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); ffc0b70c: 48 00 27 d5 bl ffc0dee0 <_Workspace_Allocate_or_fatal_error> ffc0b710: 7c 77 1b 78 mr r23,r3 ffc0b714: 4b ff fe 24 b ffc0b538 <_Objects_Extend_information+0xc4> */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { object_blocks = _Workspace_Allocate( block_size ); ffc0b718: 48 00 27 a1 bl ffc0deb8 <_Workspace_Allocate> if ( !object_blocks ) { ffc0b71c: 7c 79 1b 79 mr. r25,r3 ffc0b720: 40 82 fe 48 bne+ ffc0b568 <_Objects_Extend_information+0xf4> _Workspace_Free( new_object_block ); ffc0b724: 7e e3 bb 78 mr r3,r23 ffc0b728: 48 00 27 a9 bl ffc0ded0 <_Workspace_Free> ffc0b72c: 4b ff ff a0 b ffc0b6cc <_Objects_Extend_information+0x258> ffc0b730: a0 e3 00 14 lhz r7,20(r3) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc0b734: 7f 7e db 78 mr r30,r27 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; ffc0b738: 3b 20 00 01 li r25,1 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0b73c: 3b a0 00 00 li r29,0 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; ffc0b740: 3b 80 00 00 li r28,0 ffc0b744: 4b ff fd c8 b ffc0b50c <_Objects_Extend_information+0x98> * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); ffc0b748: 57 9c 10 3a rlwinm r28,r28,2,0,29 /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, ffc0b74c: 80 9f 00 34 lwz r4,52(r31) ffc0b750: 7f 85 e3 78 mr r5,r28 ffc0b754: 7f 23 cb 78 mr r3,r25 ffc0b758: 48 00 76 25 bl ffc12d7c information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, ffc0b75c: 80 9f 00 30 lwz r4,48(r31) ffc0b760: 7f 85 e3 78 mr r5,r28 ffc0b764: 7f 03 c3 78 mr r3,r24 ffc0b768: 48 00 76 15 bl ffc12d7c information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc0b76c: a0 bf 00 10 lhz r5,16(r31) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0b770: 80 9f 00 1c lwz r4,28(r31) ffc0b774: 7e c3 b3 78 mr r3,r22 information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc0b778: 7c a5 da 14 add r5,r5,r27 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0b77c: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0b780: 48 00 75 fd bl ffc12d7c ffc0b784: 4b ff fe 2c b ffc0b5b0 <_Objects_Extend_information+0x13c> ffc0b788: 7d 07 43 78 mr r7,r8 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc0b78c: 7f 7e db 78 mr r30,r27 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; ffc0b790: 3b 20 00 01 li r25,1 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0b794: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc0b798: 4b ff fd 74 b ffc0b50c <_Objects_Extend_information+0x98><== NOT EXECUTED else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; ffc0b79c: 3b 20 00 00 li r25,0 <== NOT EXECUTED * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0b7a0: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc0b7a4: 4b ff fd 68 b ffc0b50c <_Objects_Extend_information+0x98><== NOT EXECUTED =============================================================================== ffc0b874 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0b874: 94 21 ff f0 stwu r1,-16(r1) ffc0b878: 7c 08 02 a6 mflr r0 ffc0b87c: 93 e1 00 0c stw r31,12(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0b880: 7c 9f 23 79 mr. r31,r4 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0b884: 90 01 00 14 stw r0,20(r1) ffc0b888: 93 c1 00 08 stw r30,8(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0b88c: 41 82 00 68 beq- ffc0b8f4 <_Objects_Get_information+0x80> ffc0b890: 7c 7e 1b 78 mr r30,r3 /* * 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 ); ffc0b894: 48 00 49 35 bl ffc101c8 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) ffc0b898: 2c 03 00 00 cmpwi r3,0 ffc0b89c: 41 82 00 58 beq- ffc0b8f4 <_Objects_Get_information+0x80> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) ffc0b8a0: 7f 83 f8 40 cmplw cr7,r3,r31 ffc0b8a4: 41 9c 00 50 blt- cr7,ffc0b8f4 <_Objects_Get_information+0x80> return NULL; if ( !_Objects_Information_table[ the_api ] ) ffc0b8a8: 3d 20 00 00 lis r9,0 ffc0b8ac: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0b8b0: 39 29 2b f8 addi r9,r9,11256 ffc0b8b4: 7d 29 f0 2e lwzx r9,r9,r30 ffc0b8b8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b8bc: 41 9e 00 38 beq- cr7,ffc0b8f4 <_Objects_Get_information+0x80><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; ffc0b8c0: 57 ff 10 3a rlwinm r31,r31,2,0,29 ffc0b8c4: 7c 69 f8 2e lwzx r3,r9,r31 if ( !info ) ffc0b8c8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b8cc: 41 9e 00 28 beq- cr7,ffc0b8f4 <_Objects_Get_information+0x80><== 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 ) ffc0b8d0: a1 23 00 10 lhz r9,16(r3) ffc0b8d4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b8d8: 41 9e 00 1c beq- cr7,ffc0b8f4 <_Objects_Get_information+0x80> return NULL; #endif return info; } ffc0b8dc: 80 01 00 14 lwz r0,20(r1) ffc0b8e0: 83 c1 00 08 lwz r30,8(r1) ffc0b8e4: 7c 08 03 a6 mtlr r0 ffc0b8e8: 83 e1 00 0c lwz r31,12(r1) ffc0b8ec: 38 21 00 10 addi r1,r1,16 ffc0b8f0: 4e 80 00 20 blr ffc0b8f4: 80 01 00 14 lwz r0,20(r1) { Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; ffc0b8f8: 38 60 00 00 li r3,0 if ( info->maximum == 0 ) return NULL; #endif return info; } ffc0b8fc: 83 c1 00 08 lwz r30,8(r1) ffc0b900: 7c 08 03 a6 mtlr r0 ffc0b904: 83 e1 00 0c lwz r31,12(r1) ffc0b908: 38 21 00 10 addi r1,r1,16 ffc0b90c: 4e 80 00 20 blr =============================================================================== ffc1ad14 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc1ad14: 94 21 ff d8 stwu r1,-40(r1) ffc1ad18: 7c 08 02 a6 mflr r0 ffc1ad1c: 93 a1 00 1c stw r29,28(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc1ad20: 7c 9d 23 79 mr. r29,r4 char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc1ad24: 90 01 00 2c stw r0,44(r1) ffc1ad28: 93 c1 00 20 stw r30,32(r1) ffc1ad2c: 93 e1 00 24 stw r31,36(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc1ad30: 41 82 01 04 beq- ffc1ae34 <_Objects_Get_name_as_string+0x120> return NULL; if ( name == NULL ) ffc1ad34: 2f 85 00 00 cmpwi cr7,r5,0 ffc1ad38: 7c bf 2b 78 mr r31,r5 ffc1ad3c: 41 9e 00 f8 beq- cr7,ffc1ae34 <_Objects_Get_name_as_string+0x120> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc1ad40: 2f 83 00 00 cmpwi cr7,r3,0 ffc1ad44: 7c 7e 1b 78 mr r30,r3 ffc1ad48: 41 9e 00 dc beq- cr7,ffc1ae24 <_Objects_Get_name_as_string+0x110> information = _Objects_Get_information_id( tmpId ); ffc1ad4c: 7f c3 f3 78 mr r3,r30 ffc1ad50: 4b ff 78 c9 bl ffc12618 <_Objects_Get_information_id> if ( !information ) ffc1ad54: 2f 83 00 00 cmpwi cr7,r3,0 ffc1ad58: 41 9e 00 dc beq- cr7,ffc1ae34 <_Objects_Get_name_as_string+0x120> return NULL; the_object = _Objects_Get( information, tmpId, &location ); ffc1ad5c: 7f c4 f3 78 mr r4,r30 ffc1ad60: 38 a1 00 10 addi r5,r1,16 ffc1ad64: 4b ff 79 d1 bl ffc12734 <_Objects_Get> switch ( location ) { ffc1ad68: 81 21 00 10 lwz r9,16(r1) ffc1ad6c: 2f 89 00 00 cmpwi cr7,r9,0 ffc1ad70: 40 9e 00 c4 bne- cr7,ffc1ae34 <_Objects_Get_name_as_string+0x120> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc1ad74: 2f 9d 00 01 cmpwi cr7,r29,1 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; ffc1ad78: 81 43 00 0c lwz r10,12(r3) lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; ffc1ad7c: 99 21 00 0c stb r9,12(r1) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; ffc1ad80: 55 47 84 3e rlwinm r7,r10,16,16,31 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc1ad84: 55 49 46 3e rlwinm r9,r10,8,24,31 lname[ 1 ] = (u32_name >> 16) & 0xff; ffc1ad88: 98 e1 00 09 stb r7,9(r1) lname[ 2 ] = (u32_name >> 8) & 0xff; ffc1ad8c: 55 48 c2 3e rlwinm r8,r10,24,8,31 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc1ad90: 99 21 00 08 stb r9,8(r1) lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; ffc1ad94: 99 01 00 0a stb r8,10(r1) lname[ 3 ] = (u32_name >> 0) & 0xff; ffc1ad98: 99 41 00 0b stb r10,11(r1) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc1ad9c: 41 9e 00 bc beq- cr7,ffc1ae58 <_Objects_Get_name_as_string+0x144><== NEVER TAKEN ffc1ada0: 2f 89 00 00 cmpwi cr7,r9,0 ffc1ada4: 41 9e 00 b4 beq- cr7,ffc1ae58 <_Objects_Get_name_as_string+0x144> ffc1ada8: 3d 60 00 00 lis r11,0 *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc1adac: 3b bd ff ff addi r29,r29,-1 * This method objects the name of an object and returns its name * in the form of a C string. It attempts to be careful about * overflowing the user's string and about returning unprintable characters. */ char *_Objects_Get_name_as_string( ffc1adb0: 38 e1 00 08 addi r7,r1,8 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc1adb4: 7f a9 03 a6 mtctr r29 * This method objects the name of an object and returns its name * in the form of a C string. It attempts to be careful about * overflowing the user's string and about returning unprintable characters. */ char *_Objects_Get_name_as_string( ffc1adb8: 7f ea fb 78 mr r10,r31 ffc1adbc: 39 6b 29 64 addi r11,r11,10596 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc1adc0: 38 c0 ff 97 li r6,-105 ffc1adc4: 48 00 00 10 b ffc1add4 <_Objects_Get_name_as_string+0xc0> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc1adc8: 8d 27 00 01 lbzu r9,1(r7) ffc1adcc: 2f 89 00 00 cmpwi cr7,r9,0 ffc1add0: 41 9e 00 28 beq- cr7,ffc1adf8 <_Objects_Get_name_as_string+0xe4> *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc1add4: 81 0b 00 00 lwz r8,0(r11) ffc1add8: 7d 08 4a 14 add r8,r8,r9 ffc1addc: 89 08 00 01 lbz r8,1(r8) ffc1ade0: 7d 05 30 39 and. r5,r8,r6 ffc1ade4: 40 82 00 08 bne- ffc1adec <_Objects_Get_name_as_string+0xd8> ffc1ade8: 39 20 00 2a li r9,42 ffc1adec: 99 2a 00 00 stb r9,0(r10) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc1adf0: 39 4a 00 01 addi r10,r10,1 ffc1adf4: 42 00 ff d4 bdnz+ ffc1adc8 <_Objects_Get_name_as_string+0xb4> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; ffc1adf8: 39 20 00 00 li r9,0 ffc1adfc: 99 2a 00 00 stb r9,0(r10) _Thread_Enable_dispatch(); ffc1ae00: 4b ff 8a 71 bl ffc13870 <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } ffc1ae04: 80 01 00 2c lwz r0,44(r1) ffc1ae08: 7f e3 fb 78 mr r3,r31 ffc1ae0c: 83 a1 00 1c lwz r29,28(r1) ffc1ae10: 7c 08 03 a6 mtlr r0 ffc1ae14: 83 c1 00 20 lwz r30,32(r1) ffc1ae18: 83 e1 00 24 lwz r31,36(r1) ffc1ae1c: 38 21 00 28 addi r1,r1,40 ffc1ae20: 4e 80 00 20 blr return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc1ae24: 3d 20 00 00 lis r9,0 ffc1ae28: 81 29 37 30 lwz r9,14128(r9) ffc1ae2c: 83 c9 00 08 lwz r30,8(r9) ffc1ae30: 4b ff ff 1c b ffc1ad4c <_Objects_Get_name_as_string+0x38> _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } ffc1ae34: 80 01 00 2c lwz r0,44(r1) #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; ffc1ae38: 3b e0 00 00 li r31,0 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } ffc1ae3c: 7f e3 fb 78 mr r3,r31 ffc1ae40: 83 a1 00 1c lwz r29,28(r1) ffc1ae44: 7c 08 03 a6 mtlr r0 ffc1ae48: 83 c1 00 20 lwz r30,32(r1) ffc1ae4c: 83 e1 00 24 lwz r31,36(r1) ffc1ae50: 38 21 00 28 addi r1,r1,40 ffc1ae54: 4e 80 00 20 blr s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc1ae58: 7f ea fb 78 mr r10,r31 ffc1ae5c: 4b ff ff 9c b ffc1adf8 <_Objects_Get_name_as_string+0xe4> =============================================================================== ffc1dea8 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { ffc1dea8: 94 21 ff e8 stwu r1,-24(r1) ffc1deac: 7c 08 02 a6 mflr r0 ffc1deb0: 93 a1 00 0c stw r29,12(r1) Objects_Control *object; Objects_Id next_id; if ( !information ) ffc1deb4: 7c 7d 1b 79 mr. r29,r3 Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { ffc1deb8: 90 01 00 1c stw r0,28(r1) ffc1debc: 93 81 00 08 stw r28,8(r1) ffc1dec0: 93 c1 00 10 stw r30,16(r1) ffc1dec4: 93 e1 00 14 stw r31,20(r1) Objects_Control *object; Objects_Id next_id; if ( !information ) ffc1dec8: 41 82 00 d8 beq- ffc1dfa0 <_Objects_Get_next+0xf8> return NULL; if ( !location_p ) ffc1decc: 2f 85 00 00 cmpwi cr7,r5,0 ffc1ded0: 7c be 2b 78 mr r30,r5 ffc1ded4: 41 9e 00 cc beq- cr7,ffc1dfa0 <_Objects_Get_next+0xf8> return NULL; if ( !next_id_p ) ffc1ded8: 2f 86 00 00 cmpwi cr7,r6,0 ffc1dedc: 7c dc 33 78 mr r28,r6 ffc1dee0: 41 9e 00 c0 beq- cr7,ffc1dfa0 <_Objects_Get_next+0xf8> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) ffc1dee4: 54 89 04 3e clrlwi r9,r4,16 ffc1dee8: 2f 89 00 00 cmpwi cr7,r9,0 next_id = information->minimum_id; else next_id = id; ffc1deec: 7c 9f 23 78 mr r31,r4 return NULL; if ( !next_id_p ) return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) ffc1def0: 41 9e 00 58 beq- cr7,ffc1df48 <_Objects_Get_next+0xa0> else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc1def4: a1 5d 00 10 lhz r10,16(r29) ffc1def8: 57 e9 04 3e clrlwi r9,r31,16 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1defc: 7f e4 fb 78 mr r4,r31 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc1df00: 7f 8a 48 40 cmplw cr7,r10,r9 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1df04: 7f a3 eb 78 mr r3,r29 ffc1df08: 7f c5 f3 78 mr r5,r30 next_id++; ffc1df0c: 3b ff 00 01 addi r31,r31,1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc1df10: 41 9c 00 5c blt- cr7,ffc1df6c <_Objects_Get_next+0xc4> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1df14: 4b ff 48 21 bl ffc12734 <_Objects_Get> next_id++; } while (*location_p != OBJECTS_LOCAL); ffc1df18: 81 3e 00 00 lwz r9,0(r30) ffc1df1c: 2f 89 00 00 cmpwi cr7,r9,0 ffc1df20: 40 9e ff d4 bne+ cr7,ffc1def4 <_Objects_Get_next+0x4c> *next_id_p = next_id; ffc1df24: 93 fc 00 00 stw r31,0(r28) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } ffc1df28: 80 01 00 1c lwz r0,28(r1) ffc1df2c: 83 81 00 08 lwz r28,8(r1) ffc1df30: 7c 08 03 a6 mtlr r0 ffc1df34: 83 a1 00 0c lwz r29,12(r1) ffc1df38: 83 c1 00 10 lwz r30,16(r1) ffc1df3c: 83 e1 00 14 lwz r31,20(r1) ffc1df40: 38 21 00 18 addi r1,r1,24 ffc1df44: 4e 80 00 20 blr if ( !next_id_p ) return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) next_id = information->minimum_id; ffc1df48: 83 fd 00 08 lwz r31,8(r29) *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1df4c: 7f a3 eb 78 mr r3,r29 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc1df50: a1 5d 00 10 lhz r10,16(r29) *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1df54: 7f c5 f3 78 mr r5,r30 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc1df58: 57 e9 04 3e clrlwi r9,r31,16 ffc1df5c: 7f 8a 48 40 cmplw cr7,r10,r9 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1df60: 7f e4 fb 78 mr r4,r31 next_id++; ffc1df64: 3b ff 00 01 addi r31,r31,1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc1df68: 40 9c ff ac bge+ cr7,ffc1df14 <_Objects_Get_next+0x6c> <== ALWAYS TAKEN return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } ffc1df6c: 80 01 00 1c lwz r0,28(r1) do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; ffc1df70: 39 20 00 01 li r9,1 ffc1df74: 91 3e 00 00 stw r9,0(r30) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; ffc1df78: 39 20 ff ff li r9,-1 return 0; } ffc1df7c: 7c 08 03 a6 mtlr r0 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; ffc1df80: 38 60 00 00 li r3,0 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; ffc1df84: 91 3c 00 00 stw r9,0(r28) return 0; } ffc1df88: 83 81 00 08 lwz r28,8(r1) ffc1df8c: 83 a1 00 0c lwz r29,12(r1) ffc1df90: 83 c1 00 10 lwz r30,16(r1) ffc1df94: 83 e1 00 14 lwz r31,20(r1) ffc1df98: 38 21 00 18 addi r1,r1,24 ffc1df9c: 4e 80 00 20 blr { Objects_Control *object; Objects_Id next_id; if ( !information ) return NULL; ffc1dfa0: 38 60 00 00 li r3,0 ffc1dfa4: 4b ff ff 84 b ffc1df28 <_Objects_Get_next+0x80> =============================================================================== ffc207e8 <_Objects_Get_no_protection>: /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; ffc207e8: 81 23 00 08 lwz r9,8(r3) if ( information->maximum >= index ) { ffc207ec: a1 43 00 10 lhz r10,16(r3) /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; ffc207f0: 21 29 00 01 subfic r9,r9,1 ffc207f4: 7c 89 22 14 add r4,r9,r4 if ( information->maximum >= index ) { ffc207f8: 7f 84 50 40 cmplw cr7,r4,r10 ffc207fc: 41 9d 00 24 bgt- cr7,ffc20820 <_Objects_Get_no_protection+0x38> if ( (the_object = information->local_table[ index ]) != NULL ) { ffc20800: 81 23 00 1c lwz r9,28(r3) ffc20804: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc20808: 7c 69 20 2e lwzx r3,r9,r4 ffc2080c: 2f 83 00 00 cmpwi cr7,r3,0 ffc20810: 41 9e 00 10 beq- cr7,ffc20820 <_Objects_Get_no_protection+0x38><== NEVER TAKEN *location = OBJECTS_LOCAL; ffc20814: 39 20 00 00 li r9,0 ffc20818: 91 25 00 00 stw r9,0(r5) return the_object; ffc2081c: 4e 80 00 20 blr /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; ffc20820: 39 20 00 01 li r9,1 ffc20824: 91 25 00 00 stw r9,0(r5) return NULL; ffc20828: 38 60 00 00 li r3,0 } ffc2082c: 4e 80 00 20 blr =============================================================================== ffc127c4 <_Objects_Id_to_name>: /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc127c4: 7c 69 1b 79 mr. r9,r3 Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc127c8: 94 21 ff e0 stwu r1,-32(r1) ffc127cc: 7c 08 02 a6 mflr r0 ffc127d0: 93 e1 00 1c stw r31,28(r1) ffc127d4: 7c 9f 23 78 mr r31,r4 ffc127d8: 90 01 00 24 stw r0,36(r1) /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc127dc: 40 82 00 10 bne- ffc127ec <_Objects_Id_to_name+0x28> ffc127e0: 3d 20 00 00 lis r9,0 ffc127e4: 81 29 37 30 lwz r9,14128(r9) ffc127e8: 81 29 00 08 lwz r9,8(r9) */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); ffc127ec: 55 2a 47 7e rlwinm r10,r9,8,29,31 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) ffc127f0: 39 0a ff ff addi r8,r10,-1 ffc127f4: 2b 88 00 02 cmplwi cr7,r8,2 ffc127f8: 41 9d 00 54 bgt- cr7,ffc1284c <_Objects_Id_to_name+0x88> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) ffc127fc: 3d 00 00 00 lis r8,0 ffc12800: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc12804: 39 08 34 d8 addi r8,r8,13528 ffc12808: 7d 48 50 2e lwzx r10,r8,r10 ffc1280c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc12810: 41 9e 00 3c beq- cr7,ffc1284c <_Objects_Id_to_name+0x88> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; ffc12814: 55 28 3e 7a rlwinm r8,r9,7,25,29 ffc12818: 7c 6a 40 2e lwzx r3,r10,r8 if ( !information ) ffc1281c: 2f 83 00 00 cmpwi cr7,r3,0 ffc12820: 41 9e 00 2c beq- cr7,ffc1284c <_Objects_Id_to_name+0x88><== 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 ); ffc12824: 7d 24 4b 78 mr r4,r9 ffc12828: 38 a1 00 08 addi r5,r1,8 ffc1282c: 4b ff ff 09 bl ffc12734 <_Objects_Get> if ( !the_object ) ffc12830: 2c 03 00 00 cmpwi r3,0 ffc12834: 41 82 00 18 beq- ffc1284c <_Objects_Id_to_name+0x88> return OBJECTS_INVALID_ID; *name = the_object->name; ffc12838: 81 23 00 0c lwz r9,12(r3) ffc1283c: 91 3f 00 00 stw r9,0(r31) _Thread_Enable_dispatch(); ffc12840: 48 00 10 31 bl ffc13870 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc12844: 38 60 00 00 li r3,0 ffc12848: 48 00 00 08 b ffc12850 <_Objects_Id_to_name+0x8c> tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; ffc1284c: 38 60 00 03 li r3,3 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc12850: 80 01 00 24 lwz r0,36(r1) ffc12854: 83 e1 00 1c lwz r31,28(r1) ffc12858: 7c 08 03 a6 mtlr r0 ffc1285c: 38 21 00 20 addi r1,r1,32 ffc12860: 4e 80 00 20 blr =============================================================================== ffc0bb80 <_Objects_Shrink_information>: #include void _Objects_Shrink_information( Objects_Information *information ) { ffc0bb80: 94 21 ff e8 stwu r1,-24(r1) ffc0bb84: 7c 08 02 a6 mflr r0 ffc0bb88: 90 01 00 1c stw r0,28(r1) ffc0bb8c: 93 e1 00 14 stw r31,20(r1) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / ffc0bb90: a0 e3 00 10 lhz r7,16(r3) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); ffc0bb94: a3 e3 00 0a lhz r31,10(r3) block_count = (information->maximum - index_base) / ffc0bb98: a1 43 00 14 lhz r10,20(r3) ffc0bb9c: 7c ff 38 50 subf r7,r31,r7 #include void _Objects_Shrink_information( Objects_Information *information ) { ffc0bba0: 93 81 00 08 stw r28,8(r1) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / ffc0bba4: 7c e7 53 96 divwu r7,r7,r10 #include void _Objects_Shrink_information( Objects_Information *information ) { ffc0bba8: 93 a1 00 0c stw r29,12(r1) ffc0bbac: 93 c1 00 10 stw r30,16(r1) index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0bbb0: 2f 87 00 00 cmpwi cr7,r7,0 #include void _Objects_Shrink_information( Objects_Information *information ) { ffc0bbb4: 7c 7c 1b 78 mr r28,r3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0bbb8: 41 9e 00 3c beq- cr7,ffc0bbf4 <_Objects_Shrink_information+0x74><== NEVER TAKEN if ( information->inactive_per_block[ block ] == ffc0bbbc: 81 03 00 30 lwz r8,48(r3) ffc0bbc0: 81 28 00 00 lwz r9,0(r8) ffc0bbc4: 7f 8a 48 00 cmpw cr7,r10,r9 ffc0bbc8: 41 9e 00 4c beq- cr7,ffc0bc14 <_Objects_Shrink_information+0x94><== NEVER TAKEN index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0bbcc: 39 20 00 00 li r9,0 ffc0bbd0: 7c e9 03 a6 mtctr r7 ffc0bbd4: 48 00 00 14 b ffc0bbe8 <_Objects_Shrink_information+0x68> if ( information->inactive_per_block[ block ] == ffc0bbd8: 84 e8 00 04 lwzu r7,4(r8) #include #include #include #include void _Objects_Shrink_information( ffc0bbdc: 55 3d 10 3a rlwinm r29,r9,2,0,29 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == ffc0bbe0: 7f 8a 38 00 cmpw cr7,r10,r7 ffc0bbe4: 41 9e 00 34 beq- cr7,ffc0bc18 <_Objects_Shrink_information+0x98> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0bbe8: 39 29 00 01 addi r9,r9,1 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; ffc0bbec: 7f ff 52 14 add r31,r31,r10 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0bbf0: 42 00 ff e8 bdnz+ ffc0bbd8 <_Objects_Shrink_information+0x58> return; } index_base += information->allocation_size; } } ffc0bbf4: 80 01 00 1c lwz r0,28(r1) ffc0bbf8: 83 81 00 08 lwz r28,8(r1) ffc0bbfc: 7c 08 03 a6 mtlr r0 ffc0bc00: 83 a1 00 0c lwz r29,12(r1) ffc0bc04: 83 c1 00 10 lwz r30,16(r1) ffc0bc08: 83 e1 00 14 lwz r31,20(r1) ffc0bc0c: 38 21 00 18 addi r1,r1,24 ffc0bc10: 4e 80 00 20 blr index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == ffc0bc14: 3b a0 00 00 li r29,0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0bc18: 80 7c 00 20 lwz r3,32(r28) ffc0bc1c: 48 00 00 10 b ffc0bc2c <_Objects_Shrink_information+0xac> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0bc20: 2f 9e 00 00 cmpwi cr7,r30,0 index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; ffc0bc24: 7f c3 f3 78 mr r3,r30 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0bc28: 41 9e 00 34 beq- cr7,ffc0bc5c <_Objects_Shrink_information+0xdc> * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); ffc0bc2c: a1 43 00 0a lhz r10,10(r3) /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; ffc0bc30: 83 c3 00 00 lwz r30,0(r3) if ((index >= index_base) && ffc0bc34: 7f 8a f8 40 cmplw cr7,r10,r31 ffc0bc38: 41 bc ff e8 blt- cr7,ffc0bc20 <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { ffc0bc3c: a1 1c 00 14 lhz r8,20(r28) ffc0bc40: 7d 1f 42 14 add r8,r31,r8 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && ffc0bc44: 7f 8a 40 40 cmplw cr7,r10,r8 ffc0bc48: 40 9c ff d8 bge+ cr7,ffc0bc20 <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); ffc0bc4c: 48 00 40 01 bl ffc0fc4c <_Chain_Extract> } } while ( the_object ); ffc0bc50: 2f 9e 00 00 cmpwi cr7,r30,0 index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; ffc0bc54: 7f c3 f3 78 mr r3,r30 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0bc58: 40 9e ff d4 bne+ cr7,ffc0bc2c <_Objects_Shrink_information+0xac><== ALWAYS TAKEN /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); ffc0bc5c: 81 3c 00 34 lwz r9,52(r28) ffc0bc60: 7c 69 e8 2e lwzx r3,r9,r29 ffc0bc64: 48 00 22 6d bl ffc0ded0 <_Workspace_Free> information->object_blocks[ block ] = NULL; ffc0bc68: 81 3c 00 34 lwz r9,52(r28) return; } index_base += information->allocation_size; } } ffc0bc6c: 80 01 00 1c lwz r0,28(r1) _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0bc70: a1 1c 00 2c lhz r8,44(r28) return; } index_base += information->allocation_size; } } ffc0bc74: 7c 08 03 a6 mtlr r0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc0bc78: 7f c9 e9 2e stwx r30,r9,r29 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0bc7c: a1 5c 00 14 lhz r10,20(r28) * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; ffc0bc80: 81 3c 00 30 lwz r9,48(r28) information->inactive -= information->allocation_size; ffc0bc84: 7d 4a 40 50 subf r10,r10,r8 return; } index_base += information->allocation_size; } } ffc0bc88: 83 e1 00 14 lwz r31,20(r1) * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; ffc0bc8c: 7f c9 e9 2e stwx r30,r9,r29 information->inactive -= information->allocation_size; ffc0bc90: b1 5c 00 2c sth r10,44(r28) return; } index_base += information->allocation_size; } } ffc0bc94: 83 a1 00 0c lwz r29,12(r1) ffc0bc98: 83 81 00 08 lwz r28,8(r1) ffc0bc9c: 83 c1 00 10 lwz r30,16(r1) ffc0bca0: 38 21 00 18 addi r1,r1,24 ffc0bca4: 4e 80 00 20 blr =============================================================================== ffc0c8c0 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0c8c0: 94 21 ff e8 stwu r1,-24(r1) ffc0c8c4: 7c 08 02 a6 mflr r0 ffc0c8c8: 93 c1 00 10 stw r30,16(r1) RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; ffc0c8cc: 7c 9e 23 79 mr. r30,r4 */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0c8d0: 90 01 00 1c stw r0,28(r1) ffc0c8d4: 93 81 00 08 stw r28,8(r1) ffc0c8d8: 93 a1 00 0c stw r29,12(r1) ffc0c8dc: 93 e1 00 14 stw r31,20(r1) RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; ffc0c8e0: 41 82 01 14 beq- ffc0c9f4 <_RBTree_Extract_unprotected+0x134> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { ffc0c8e4: 81 23 00 08 lwz r9,8(r3) ffc0c8e8: 7c 7c 1b 78 mr r28,r3 ffc0c8ec: 7f 89 f0 00 cmpw cr7,r9,r30 ffc0c8f0: 41 9e 01 6c beq- cr7,ffc0ca5c <_RBTree_Extract_unprotected+0x19c> the_rbtree->first[RBT_LEFT] = next; } /* Check if max needs to be updated. min=max for 1 element trees so * do not use else if here. */ if (the_node == the_rbtree->first[RBT_RIGHT]) { ffc0c8f4: 81 3c 00 0c lwz r9,12(r28) ffc0c8f8: 7f 89 f0 00 cmpw cr7,r9,r30 ffc0c8fc: 41 9e 01 74 beq- cr7,ffc0ca70 <_RBTree_Extract_unprotected+0x1b0> * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { ffc0c900: 83 fe 00 04 lwz r31,4(r30) ffc0c904: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0c908: 41 9e 01 88 beq- cr7,ffc0ca90 <_RBTree_Extract_unprotected+0x1d0> ffc0c90c: 81 3e 00 08 lwz r9,8(r30) ffc0c910: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c914: 40 be 00 0c bne+ cr7,ffc0c920 <_RBTree_Extract_unprotected+0x60> ffc0c918: 48 00 01 0c b ffc0ca24 <_RBTree_Extract_unprotected+0x164> target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; ffc0c91c: 7d 3f 4b 78 mr r31,r9 ffc0c920: 81 3f 00 08 lwz r9,8(r31) ffc0c924: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c928: 40 9e ff f4 bne+ cr7,ffc0c91c <_RBTree_Extract_unprotected+0x5c> * target's position (target is the right child of target->parent) * when target vacates it. if there is no child, then target->parent * should become NULL. This may cause the coloring to be violated. * For now we store the color of the node being deleted in victim_color. */ leaf = target->child[RBT_LEFT]; ffc0c92c: 83 bf 00 04 lwz r29,4(r31) if(leaf) { ffc0c930: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0c934: 41 9e 01 50 beq- cr7,ffc0ca84 <_RBTree_Extract_unprotected+0x1c4> leaf->parent = target->parent; ffc0c938: 81 3f 00 00 lwz r9,0(r31) ffc0c93c: 91 3d 00 00 stw r9,0(r29) } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; ffc0c940: 80 ff 00 00 lwz r7,0(r31) target->parent->child[dir] = leaf; /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; ffc0c944: 81 1e 00 00 lwz r8,0(r30) } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; ffc0c948: 81 27 00 04 lwz r9,4(r7) leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; ffc0c94c: 81 5f 00 0c lwz r10,12(r31) dir = target != target->parent->child[0]; ffc0c950: 7f e9 4a 78 xor r9,r31,r9 ffc0c954: 7d 29 00 34 cntlzw r9,r9 ffc0c958: 55 29 d9 7e rlwinm r9,r9,27,5,31 ffc0c95c: 69 29 00 01 xori r9,r9,1 target->parent->child[dir] = leaf; ffc0c960: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0c964: 7c e7 4a 14 add r7,r7,r9 ffc0c968: 93 a7 00 04 stw r29,4(r7) /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; ffc0c96c: 81 28 00 04 lwz r9,4(r8) ffc0c970: 7f c9 4a 78 xor r9,r30,r9 ffc0c974: 7d 29 00 34 cntlzw r9,r9 ffc0c978: 55 29 d9 7e rlwinm r9,r9,27,5,31 ffc0c97c: 69 29 00 01 xori r9,r9,1 the_node->parent->child[dir] = target; ffc0c980: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0c984: 7d 08 4a 14 add r8,r8,r9 ffc0c988: 93 e8 00 04 stw r31,4(r8) /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; ffc0c98c: 81 3e 00 08 lwz r9,8(r30) ffc0c990: 91 3f 00 08 stw r9,8(r31) if (the_node->child[RBT_RIGHT]) ffc0c994: 81 3e 00 08 lwz r9,8(r30) ffc0c998: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c99c: 41 9e 00 08 beq- cr7,ffc0c9a4 <_RBTree_Extract_unprotected+0xe4><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; ffc0c9a0: 93 e9 00 00 stw r31,0(r9) target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; ffc0c9a4: 81 3e 00 04 lwz r9,4(r30) ffc0c9a8: 91 3f 00 04 stw r9,4(r31) if (the_node->child[RBT_LEFT]) ffc0c9ac: 81 3e 00 04 lwz r9,4(r30) ffc0c9b0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c9b4: 41 9e 00 08 beq- cr7,ffc0c9bc <_RBTree_Extract_unprotected+0xfc> the_node->child[RBT_LEFT]->parent = target; ffc0c9b8: 93 e9 00 00 stw r31,0(r9) /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; ffc0c9bc: 81 1e 00 00 lwz r8,0(r30) target->color = the_node->color; ffc0c9c0: 81 3e 00 0c lwz r9,12(r30) /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; ffc0c9c4: 91 1f 00 00 stw r8,0(r31) target->color = the_node->color; ffc0c9c8: 91 3f 00 0c stw r9,12(r31) /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ ffc0c9cc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c9d0: 41 9e 00 44 beq- cr7,ffc0ca14 <_RBTree_Extract_unprotected+0x154> /* Wipe the_node */ _RBTree_Set_off_rbtree(the_node); /* set root to black, if it exists */ if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK; ffc0c9d4: 81 5c 00 04 lwz r10,4(r28) */ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree( RBTree_Node *node ) { node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL; ffc0c9d8: 39 20 00 00 li r9,0 ffc0c9dc: 91 3e 00 08 stw r9,8(r30) ffc0c9e0: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c9e4: 91 3e 00 04 stw r9,4(r30) ffc0c9e8: 91 3e 00 00 stw r9,0(r30) ffc0c9ec: 41 9e 00 08 beq- cr7,ffc0c9f4 <_RBTree_Extract_unprotected+0x134> ffc0c9f0: 91 2a 00 0c stw r9,12(r10) } ffc0c9f4: 80 01 00 1c lwz r0,28(r1) ffc0c9f8: 83 81 00 08 lwz r28,8(r1) ffc0c9fc: 7c 08 03 a6 mtlr r0 ffc0ca00: 83 a1 00 0c lwz r29,12(r1) ffc0ca04: 83 c1 00 10 lwz r30,16(r1) ffc0ca08: 83 e1 00 14 lwz r31,20(r1) ffc0ca0c: 38 21 00 18 addi r1,r1,24 ffc0ca10: 4e 80 00 20 blr * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ if (leaf) { ffc0ca14: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0ca18: 41 be ff bc beq- cr7,ffc0c9d4 <_RBTree_Extract_unprotected+0x114> leaf->color = RBT_BLACK; /* case 2 */ ffc0ca1c: 91 5d 00 0c stw r10,12(r29) ffc0ca20: 4b ff ff b4 b ffc0c9d4 <_RBTree_Extract_unprotected+0x114> * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { ffc0ca24: 7f fd fb 78 mr r29,r31 * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; ffc0ca28: 81 3e 00 00 lwz r9,0(r30) ffc0ca2c: 91 3d 00 00 stw r9,0(r29) _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; ffc0ca30: 81 1e 00 00 lwz r8,0(r30) leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; ffc0ca34: 81 5e 00 0c lwz r10,12(r30) /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; ffc0ca38: 81 28 00 04 lwz r9,4(r8) ffc0ca3c: 7f c9 4a 78 xor r9,r30,r9 ffc0ca40: 7d 29 00 34 cntlzw r9,r9 ffc0ca44: 55 29 d9 7e rlwinm r9,r9,27,5,31 ffc0ca48: 69 29 00 01 xori r9,r9,1 the_node->parent->child[dir] = leaf; ffc0ca4c: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0ca50: 7d 08 4a 14 add r8,r8,r9 ffc0ca54: 93 a8 00 04 stw r29,4(r8) ffc0ca58: 4b ff ff 74 b ffc0c9cc <_RBTree_Extract_unprotected+0x10c> */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected( const RBTree_Node *node ) { return _RBTree_Next_unprotected( node, RBT_RIGHT ); ffc0ca5c: 7f c3 f3 78 mr r3,r30 ffc0ca60: 38 80 00 01 li r4,1 ffc0ca64: 48 00 04 99 bl ffc0cefc <_RBTree_Next_unprotected> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { RBTree_Node *next; next = _RBTree_Successor_unprotected(the_node); the_rbtree->first[RBT_LEFT] = next; ffc0ca68: 90 7c 00 08 stw r3,8(r28) ffc0ca6c: 4b ff fe 88 b ffc0c8f4 <_RBTree_Extract_unprotected+0x34> */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected( const RBTree_Node *node ) { return _RBTree_Next_unprotected( node, RBT_LEFT ); ffc0ca70: 7f c3 f3 78 mr r3,r30 ffc0ca74: 38 80 00 00 li r4,0 ffc0ca78: 48 00 04 85 bl ffc0cefc <_RBTree_Next_unprotected> /* Check if max needs to be updated. min=max for 1 element trees so * do not use else if here. */ if (the_node == the_rbtree->first[RBT_RIGHT]) { RBTree_Node *previous; previous = _RBTree_Predecessor_unprotected(the_node); the_rbtree->first[RBT_RIGHT] = previous; ffc0ca7c: 90 7c 00 0c stw r3,12(r28) ffc0ca80: 4b ff fe 80 b ffc0c900 <_RBTree_Extract_unprotected+0x40> leaf = target->child[RBT_LEFT]; if(leaf) { leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); ffc0ca84: 7f e3 fb 78 mr r3,r31 ffc0ca88: 4b ff fb 2d bl ffc0c5b4 <_RBTree_Extract_validate_unprotected> ffc0ca8c: 4b ff fe b4 b ffc0c940 <_RBTree_Extract_unprotected+0x80> * the_node's location in the tree. This may cause the coloring to be * violated. We will fix it later. * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; ffc0ca90: 83 be 00 08 lwz r29,8(r30) if( leaf ) { ffc0ca94: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0ca98: 40 9e ff 90 bne+ cr7,ffc0ca28 <_RBTree_Extract_unprotected+0x168> leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); ffc0ca9c: 7f c3 f3 78 mr r3,r30 ffc0caa0: 4b ff fb 15 bl ffc0c5b4 <_RBTree_Extract_validate_unprotected> ffc0caa4: 4b ff ff 8c b ffc0ca30 <_RBTree_Extract_unprotected+0x170> =============================================================================== ffc0c5b4 <_RBTree_Extract_validate_unprotected>: ) { RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; ffc0c5b4: 81 23 00 00 lwz r9,0(r3) if(!parent->parent) return; ffc0c5b8: 81 49 00 00 lwz r10,0(r9) ffc0c5bc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c5c0: 4d 9e 00 20 beqlr cr7 { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) ffc0c5c4: 81 49 00 04 lwz r10,4(r9) ffc0c5c8: 7f 83 50 00 cmpw cr7,r3,r10 ffc0c5cc: 41 9e 02 d0 beq- cr7,ffc0c89c <_RBTree_Extract_validate_unprotected+0x2e8> * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; ffc0c5d0: 38 80 00 00 li r4,0 } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; ffc0c5d4: 38 c0 00 01 li r6,1 ffc0c5d8: 48 00 00 90 b ffc0c668 <_RBTree_Extract_validate_unprotected+0xb4> if(!parent->parent) return; sibling = _RBTree_Sibling(the_node); /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { ffc0c5dc: 81 09 00 00 lwz r8,0(r9) ffc0c5e0: 2f 88 00 00 cmpwi cr7,r8,0 ffc0c5e4: 41 9e 00 90 beq- cr7,ffc0c674 <_RBTree_Extract_validate_unprotected+0xc0> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0c5e8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c5ec: 41 9e 00 10 beq- cr7,ffc0c5fc <_RBTree_Extract_validate_unprotected+0x48><== NEVER TAKEN ffc0c5f0: 80 ea 00 0c lwz r7,12(r10) ffc0c5f4: 2f 87 00 01 cmpwi cr7,r7,1 ffc0c5f8: 41 9e 01 68 beq- cr7,ffc0c760 <_RBTree_Extract_validate_unprotected+0x1ac> _RBTree_Rotate(parent, dir); sibling = parent->child[_RBTree_Opposite_direction(dir)]; } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && ffc0c5fc: 81 0a 00 08 lwz r8,8(r10) ffc0c600: 2f 88 00 00 cmpwi cr7,r8,0 ffc0c604: 41 9e 00 10 beq- cr7,ffc0c614 <_RBTree_Extract_validate_unprotected+0x60> ffc0c608: 81 08 00 0c lwz r8,12(r8) ffc0c60c: 2f 88 00 01 cmpwi cr7,r8,1 ffc0c610: 41 9e 00 7c beq- cr7,ffc0c68c <_RBTree_Extract_validate_unprotected+0xd8> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { ffc0c614: 81 0a 00 04 lwz r8,4(r10) ffc0c618: 2f 88 00 00 cmpwi cr7,r8,0 ffc0c61c: 41 9e 00 10 beq- cr7,ffc0c62c <_RBTree_Extract_validate_unprotected+0x78> ffc0c620: 81 08 00 0c lwz r8,12(r8) ffc0c624: 2f 88 00 01 cmpwi cr7,r8,1 ffc0c628: 41 9e 00 64 beq- cr7,ffc0c68c <_RBTree_Extract_validate_unprotected+0xd8> sibling->color = RBT_RED; ffc0c62c: 90 ca 00 0c stw r6,12(r10) ffc0c630: 81 49 00 0c lwz r10,12(r9) ffc0c634: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0c638: 41 9e 02 6c beq- cr7,ffc0c8a4 <_RBTree_Extract_validate_unprotected+0x2f0> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; ffc0c63c: 81 09 00 00 lwz r8,0(r9) RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; ffc0c640: 2f 88 00 00 cmpwi cr7,r8,0 ffc0c644: 41 9e 01 b0 beq- cr7,ffc0c7f4 <_RBTree_Extract_validate_unprotected+0x240><== NEVER TAKEN if(!(the_node->parent->parent)) return NULL; ffc0c648: 81 48 00 00 lwz r10,0(r8) ffc0c64c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c650: 41 9e 01 a4 beq- cr7,ffc0c7f4 <_RBTree_Extract_validate_unprotected+0x240> if(the_node == the_node->parent->child[RBT_LEFT]) ffc0c654: 81 48 00 04 lwz r10,4(r8) ffc0c658: 7f 89 50 00 cmpw cr7,r9,r10 ffc0c65c: 41 9e 01 a0 beq- cr7,ffc0c7fc <_RBTree_Extract_validate_unprotected+0x248> ffc0c660: 7d 23 4b 78 mr r3,r9 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; ffc0c664: 7d 09 43 78 mr r9,r8 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0c668: 81 03 00 0c lwz r8,12(r3) ffc0c66c: 2f 88 00 01 cmpwi cr7,r8,1 ffc0c670: 40 9e ff 6c bne+ cr7,ffc0c5dc <_RBTree_Extract_validate_unprotected+0x28> sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; ffc0c674: 81 23 00 00 lwz r9,0(r3) ffc0c678: 81 29 00 00 lwz r9,0(r9) ffc0c67c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c680: 4c be 00 20 bnelr+ cr7 ffc0c684: 91 23 00 0c stw r9,12(r3) ffc0c688: 4e 80 00 20 blr * cases, either the_node is to the left or the right of the parent. * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; ffc0c68c: 81 09 00 04 lwz r8,4(r9) ffc0c690: 7c 68 42 78 xor r8,r3,r8 ffc0c694: 7d 08 00 34 cntlzw r8,r8 ffc0c698: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc0c69c: 69 08 00 01 xori r8,r8,1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); ffc0c6a0: 69 07 00 01 xori r7,r8,1 if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { ffc0c6a4: 54 e7 10 3a rlwinm r7,r7,2,0,29 ffc0c6a8: 7c ca 3a 14 add r6,r10,r7 ffc0c6ac: 80 c6 00 04 lwz r6,4(r6) */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0c6b0: 2f 86 00 00 cmpwi cr7,r6,0 ffc0c6b4: 41 9e 00 10 beq- cr7,ffc0c6c4 <_RBTree_Extract_validate_unprotected+0x110> ffc0c6b8: 80 a6 00 0c lwz r5,12(r6) ffc0c6bc: 2f 85 00 01 cmpwi cr7,r5,1 ffc0c6c0: 41 9e 01 4c beq- cr7,ffc0c80c <_RBTree_Extract_validate_unprotected+0x258> sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; ffc0c6c4: 55 08 10 3a rlwinm r8,r8,2,0,29 ffc0c6c8: 7c aa 42 14 add r5,r10,r8 ffc0c6cc: 80 c5 00 04 lwz r6,4(r5) * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { sibling->color = RBT_RED; ffc0c6d0: 38 80 00 01 li r4,1 ffc0c6d4: 90 8a 00 0c stw r4,12(r10) sibling->child[dir]->color = RBT_BLACK; ffc0c6d8: 38 80 00 00 li r4,0 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; ffc0c6dc: 2f 86 00 00 cmpwi cr7,r6,0 ffc0c6e0: 90 86 00 0c stw r4,12(r6) ffc0c6e4: 41 9e 00 54 beq- cr7,ffc0c738 <_RBTree_Extract_validate_unprotected+0x184><== NEVER TAKEN c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; ffc0c6e8: 7c 86 3a 14 add r4,r6,r7 ffc0c6ec: 81 64 00 04 lwz r11,4(r4) ffc0c6f0: 91 65 00 04 stw r11,4(r5) if (c->child[dir]) ffc0c6f4: 80 a4 00 04 lwz r5,4(r4) ffc0c6f8: 2f 85 00 00 cmpwi cr7,r5,0 ffc0c6fc: 41 9e 00 08 beq- cr7,ffc0c704 <_RBTree_Extract_validate_unprotected+0x150> c->child[dir]->parent = the_node; ffc0c700: 91 45 00 00 stw r10,0(r5) c->child[dir] = the_node; ffc0c704: 7c a6 3a 14 add r5,r6,r7 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c708: 80 8a 00 00 lwz r4,0(r10) the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0c70c: 91 45 00 04 stw r10,4(r5) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c710: 80 a4 00 04 lwz r5,4(r4) c->parent = the_node->parent; ffc0c714: 90 86 00 00 stw r4,0(r6) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c718: 7d 45 2a 78 xor r5,r10,r5 ffc0c71c: 7c a5 00 34 cntlzw r5,r5 c->parent = the_node->parent; the_node->parent = c; ffc0c720: 90 ca 00 00 stw r6,0(r10) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c724: 54 a5 d9 7e rlwinm r5,r5,27,5,31 ffc0c728: 68 a5 00 01 xori r5,r5,1 ffc0c72c: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0c730: 7c 84 2a 14 add r4,r4,r5 ffc0c734: 90 c4 00 04 stw r6,4(r4) _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; ffc0c738: 7d 49 3a 14 add r10,r9,r7 } sibling->color = parent->color; ffc0c73c: 80 c9 00 0c lwz r6,12(r9) dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; ffc0c740: 80 aa 00 04 lwz r5,4(r10) ffc0c744: 7d 45 3a 14 add r10,r5,r7 } sibling->color = parent->color; ffc0c748: 90 c5 00 0c stw r6,12(r5) ffc0c74c: 80 8a 00 04 lwz r4,4(r10) parent->color = RBT_BLACK; ffc0c750: 39 40 00 00 li r10,0 ffc0c754: 91 49 00 0c stw r10,12(r9) sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; ffc0c758: 91 44 00 0c stw r10,12(r4) ffc0c75c: 48 00 00 d8 b ffc0c834 <_RBTree_Extract_validate_unprotected+0x280> * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; ffc0c760: 80 a9 00 04 lwz r5,4(r9) * then rotate parent left, making the sibling be the_node's grandparent. * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; ffc0c764: 90 e9 00 0c stw r7,12(r9) sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; ffc0c768: 7c 67 2a 78 xor r7,r3,r5 ffc0c76c: 7c e7 00 34 cntlzw r7,r7 * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; ffc0c770: 90 8a 00 0c stw r4,12(r10) dir = the_node != parent->child[0]; ffc0c774: 54 e7 d9 7e rlwinm r7,r7,27,5,31 ffc0c778: 68 e0 00 01 xori r0,r7,1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); ffc0c77c: 68 0b 00 01 xori r11,r0,1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; ffc0c780: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc0c784: 7c a9 5a 14 add r5,r9,r11 ffc0c788: 80 e5 00 04 lwz r7,4(r5) ffc0c78c: 2f 87 00 00 cmpwi cr7,r7,0 ffc0c790: 41 9e 00 74 beq- cr7,ffc0c804 <_RBTree_Extract_validate_unprotected+0x250><== NEVER TAKEN c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; ffc0c794: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c798: 7d 47 02 14 add r10,r7,r0 ffc0c79c: 81 8a 00 04 lwz r12,4(r10) ffc0c7a0: 91 85 00 04 stw r12,4(r5) if (c->child[dir]) ffc0c7a4: 81 4a 00 04 lwz r10,4(r10) ffc0c7a8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c7ac: 41 9e 00 0c beq- cr7,ffc0c7b8 <_RBTree_Extract_validate_unprotected+0x204><== NEVER TAKEN c->child[dir]->parent = the_node; ffc0c7b0: 91 2a 00 00 stw r9,0(r10) ffc0c7b4: 81 09 00 00 lwz r8,0(r9) c->child[dir] = the_node; ffc0c7b8: 7d 47 02 14 add r10,r7,r0 the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; ffc0c7bc: 91 07 00 00 stw r8,0(r7) ffc0c7c0: 7d 69 5a 14 add r11,r9,r11 the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0c7c4: 91 2a 00 04 stw r9,4(r10) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c7c8: 81 48 00 04 lwz r10,4(r8) c->parent = the_node->parent; the_node->parent = c; ffc0c7cc: 90 e9 00 00 stw r7,0(r9) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c7d0: 7d 2a 52 78 xor r10,r9,r10 ffc0c7d4: 7d 4a 00 34 cntlzw r10,r10 ffc0c7d8: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc0c7dc: 69 4a 00 01 xori r10,r10,1 ffc0c7e0: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc0c7e4: 7d 08 52 14 add r8,r8,r10 ffc0c7e8: 90 e8 00 04 stw r7,4(r8) ffc0c7ec: 81 4b 00 04 lwz r10,4(r11) ffc0c7f0: 4b ff fe 0c b ffc0c5fc <_RBTree_Extract_validate_unprotected+0x48> RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; ffc0c7f4: 39 40 00 00 li r10,0 ffc0c7f8: 4b ff fe 68 b ffc0c660 <_RBTree_Extract_validate_unprotected+0xac> if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; ffc0c7fc: 81 48 00 08 lwz r10,8(r8) ffc0c800: 4b ff fe 60 b ffc0c660 <_RBTree_Extract_validate_unprotected+0xac> RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; ffc0c804: 39 40 00 00 li r10,0 <== NOT EXECUTED ffc0c808: 4b ff fd f4 b ffc0c5fc <_RBTree_Extract_validate_unprotected+0x48><== NOT EXECUTED ffc0c80c: 7c a9 3a 14 add r5,r9,r7 sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; } sibling->color = parent->color; ffc0c810: 81 69 00 0c lwz r11,12(r9) ffc0c814: 80 a5 00 04 lwz r5,4(r5) parent->color = RBT_BLACK; ffc0c818: 38 80 00 00 li r4,0 sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; } sibling->color = parent->color; ffc0c81c: 91 6a 00 0c stw r11,12(r10) ffc0c820: 2f 85 00 00 cmpwi cr7,r5,0 parent->color = RBT_BLACK; ffc0c824: 90 89 00 0c stw r4,12(r9) sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; ffc0c828: 90 86 00 0c stw r4,12(r6) ffc0c82c: 41 be fe 48 beq- cr7,ffc0c674 <_RBTree_Extract_validate_unprotected+0xc0><== NEVER TAKEN ffc0c830: 55 08 10 3a rlwinm r8,r8,2,0,29 c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; ffc0c834: 7d 45 42 14 add r10,r5,r8 ffc0c838: 80 ca 00 04 lwz r6,4(r10) ffc0c83c: 7c e9 3a 14 add r7,r9,r7 ffc0c840: 90 c7 00 04 stw r6,4(r7) if (c->child[dir]) ffc0c844: 81 4a 00 04 lwz r10,4(r10) ffc0c848: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c84c: 41 9e 00 08 beq- cr7,ffc0c854 <_RBTree_Extract_validate_unprotected+0x2a0> c->child[dir]->parent = the_node; ffc0c850: 91 2a 00 00 stw r9,0(r10) c->child[dir] = the_node; ffc0c854: 7d 05 42 14 add r8,r5,r8 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c858: 80 e9 00 00 lwz r7,0(r9) the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0c85c: 91 28 00 04 stw r9,4(r8) the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; ffc0c860: 90 e5 00 00 stw r7,0(r5) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c864: 81 47 00 04 lwz r10,4(r7) c->parent = the_node->parent; the_node->parent = c; ffc0c868: 90 a9 00 00 stw r5,0(r9) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c86c: 7d 2a 52 78 xor r10,r9,r10 _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; ffc0c870: 81 23 00 00 lwz r9,0(r3) ffc0c874: 7d 4a 00 34 cntlzw r10,r10 ffc0c878: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc0c87c: 81 29 00 00 lwz r9,0(r9) ffc0c880: 69 4a 00 01 xori r10,r10,1 ffc0c884: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc0c888: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c88c: 7c e7 52 14 add r7,r7,r10 ffc0c890: 90 a7 00 04 stw r5,4(r7) ffc0c894: 4c be 00 20 bnelr+ cr7 ffc0c898: 4b ff fd ec b ffc0c684 <_RBTree_Extract_validate_unprotected+0xd0><== NOT EXECUTED if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; ffc0c89c: 81 49 00 08 lwz r10,8(r9) ffc0c8a0: 4b ff fd 30 b ffc0c5d0 <_RBTree_Extract_validate_unprotected+0x1c> /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; ffc0c8a4: 39 40 00 00 li r10,0 ffc0c8a8: 91 49 00 0c stw r10,12(r9) sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; ffc0c8ac: 81 23 00 00 lwz r9,0(r3) ffc0c8b0: 81 29 00 00 lwz r9,0(r9) ffc0c8b4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c8b8: 4c be 00 20 bnelr+ cr7 ffc0c8bc: 4b ff fd c8 b ffc0c684 <_RBTree_Extract_validate_unprotected+0xd0><== NOT EXECUTED =============================================================================== ffc0cc64 <_RBTree_Find>: RBTree_Node *_RBTree_Find( RBTree_Control *the_rbtree, RBTree_Node *search_node ) { ffc0cc64: 94 21 ff e0 stwu r1,-32(r1) ffc0cc68: 7c 08 02 a6 mflr r0 ffc0cc6c: 90 01 00 24 stw r0,36(r1) ffc0cc70: 93 c1 00 18 stw r30,24(r1) ffc0cc74: 7c 7e 1b 78 mr r30,r3 ffc0cc78: 93 61 00 0c stw r27,12(r1) ffc0cc7c: 93 81 00 10 stw r28,16(r1) ffc0cc80: 93 a1 00 14 stw r29,20(r1) ffc0cc84: 93 e1 00 1c stw r31,28(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0cc88: 7f 60 00 a6 mfmsr r27 ffc0cc8c: 7d 30 42 a6 mfsprg r9,0 ffc0cc90: 7f 69 48 78 andc r9,r27,r9 ffc0cc94: 7d 20 01 24 mtmsr r9 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; ffc0cc98: 83 e3 00 04 lwz r31,4(r3) RBTree_Node* found = NULL; int compare_result; while (iter_node) { ffc0cc9c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0cca0: 41 9e 00 b0 beq- cr7,ffc0cd50 <_RBTree_Find+0xec> <== NEVER TAKEN ffc0cca4: 7c 9d 23 78 mr r29,r4 ffc0cca8: 3b 80 00 00 li r28,0 compare_result = the_rbtree->compare_function(the_node, iter_node); ffc0ccac: 81 3e 00 10 lwz r9,16(r30) ffc0ccb0: 7f e4 fb 78 mr r4,r31 ffc0ccb4: 7f a3 eb 78 mr r3,r29 ffc0ccb8: 7d 29 03 a6 mtctr r9 ffc0ccbc: 4e 80 04 21 bctrl if ( _RBTree_Is_equal( compare_result ) ) { ffc0ccc0: 2c 03 00 00 cmpwi r3,0 RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater( int compare_result ) { return compare_result > 0; ffc0ccc4: 7c 6a fe 70 srawi r10,r3,31 ffc0ccc8: 7d 23 50 50 subf r9,r3,r10 break; } RBTree_Direction dir = (RBTree_Direction) _RBTree_Is_greater( compare_result ); iter_node = iter_node->child[dir]; ffc0cccc: 55 29 1f 7a rlwinm r9,r9,3,29,29 ffc0ccd0: 7d 3f 4a 14 add r9,r31,r9 RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( _RBTree_Is_equal( compare_result ) ) { ffc0ccd4: 40 82 00 14 bne- ffc0cce8 <_RBTree_Find+0x84> found = iter_node; if ( the_rbtree->is_unique ) ffc0ccd8: 89 5e 00 14 lbz r10,20(r30) ffc0ccdc: 7f fc fb 78 mr r28,r31 ffc0cce0: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0cce4: 40 9e 00 3c bne- cr7,ffc0cd20 <_RBTree_Find+0xbc> break; } RBTree_Direction dir = (RBTree_Direction) _RBTree_Is_greater( compare_result ); iter_node = iter_node->child[dir]; ffc0cce8: 83 e9 00 04 lwz r31,4(r9) ) { RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { ffc0ccec: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0ccf0: 40 9e ff bc bne+ cr7,ffc0ccac <_RBTree_Find+0x48> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0ccf4: 7f 60 01 24 mtmsr r27 return_node = NULL; _ISR_Disable( level ); return_node = _RBTree_Find_unprotected( the_rbtree, search_node ); _ISR_Enable( level ); return return_node; } ffc0ccf8: 80 01 00 24 lwz r0,36(r1) ffc0ccfc: 7f 83 e3 78 mr r3,r28 ffc0cd00: 83 61 00 0c lwz r27,12(r1) ffc0cd04: 7c 08 03 a6 mtlr r0 ffc0cd08: 83 81 00 10 lwz r28,16(r1) ffc0cd0c: 83 a1 00 14 lwz r29,20(r1) ffc0cd10: 83 c1 00 18 lwz r30,24(r1) ffc0cd14: 83 e1 00 1c lwz r31,28(r1) ffc0cd18: 38 21 00 20 addi r1,r1,32 ffc0cd1c: 4e 80 00 20 blr compare_result = the_rbtree->compare_function(the_node, iter_node); if ( _RBTree_Is_equal( compare_result ) ) { found = iter_node; if ( the_rbtree->is_unique ) ffc0cd20: 7f fc fb 78 mr r28,r31 ffc0cd24: 7f 60 01 24 mtmsr r27 ffc0cd28: 80 01 00 24 lwz r0,36(r1) ffc0cd2c: 7f 83 e3 78 mr r3,r28 ffc0cd30: 83 61 00 0c lwz r27,12(r1) ffc0cd34: 7c 08 03 a6 mtlr r0 ffc0cd38: 83 81 00 10 lwz r28,16(r1) ffc0cd3c: 83 a1 00 14 lwz r29,20(r1) ffc0cd40: 83 c1 00 18 lwz r30,24(r1) ffc0cd44: 83 e1 00 1c lwz r31,28(r1) ffc0cd48: 38 21 00 20 addi r1,r1,32 ffc0cd4c: 4e 80 00 20 blr RBTree_Control *the_rbtree, RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; ffc0cd50: 3b 80 00 00 li r28,0 <== NOT EXECUTED ffc0cd54: 4b ff ff a0 b ffc0ccf4 <_RBTree_Find+0x90> <== NOT EXECUTED =============================================================================== ffc0d200 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { ffc0d200: 94 21 ff e8 stwu r1,-24(r1) ffc0d204: 7c 08 02 a6 mflr r0 ffc0d208: 93 a1 00 0c stw r29,12(r1) size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; ffc0d20c: 7c 7d 1b 79 mr. r29,r3 void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { ffc0d210: 90 01 00 1c stw r0,28(r1) ffc0d214: 93 81 00 08 stw r28,8(r1) ffc0d218: 93 c1 00 10 stw r30,16(r1) ffc0d21c: 93 e1 00 14 stw r31,20(r1) size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; ffc0d220: 41 82 00 4c beq- ffc0d26c <_RBTree_Initialize+0x6c> <== NEVER TAKEN /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { ffc0d224: 2f 86 00 00 cmpwi cr7,r6,0 { the_rbtree->permanent_null = NULL; the_rbtree->root = NULL; the_rbtree->first[0] = NULL; the_rbtree->first[1] = NULL; the_rbtree->compare_function = compare_function; ffc0d228: 90 9d 00 10 stw r4,16(r29) RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; ffc0d22c: 39 20 00 00 li r9,0 ffc0d230: 7c df 33 78 mr r31,r6 ffc0d234: 91 3d 00 00 stw r9,0(r29) the_rbtree->root = NULL; ffc0d238: 91 3d 00 04 stw r9,4(r29) the_rbtree->first[0] = NULL; ffc0d23c: 91 3d 00 08 stw r9,8(r29) the_rbtree->first[1] = NULL; ffc0d240: 91 3d 00 0c stw r9,12(r29) the_rbtree->compare_function = compare_function; the_rbtree->is_unique = is_unique; ffc0d244: 99 1d 00 14 stb r8,20(r29) ffc0d248: 41 9e 00 24 beq- cr7,ffc0d26c <_RBTree_Initialize+0x6c> <== NEVER TAKEN ffc0d24c: 7c fc 3b 78 mr r28,r7 ffc0d250: 7c be 2b 78 mr r30,r5 _RBTree_Insert_unprotected(the_rbtree, next); ffc0d254: 7f c4 f3 78 mr r4,r30 ffc0d258: 7f a3 eb 78 mr r3,r29 ffc0d25c: 4b ff fb 55 bl ffc0cdb0 <_RBTree_Insert_unprotected> /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { ffc0d260: 37 ff ff ff addic. r31,r31,-1 #include #include #include #include void _RBTree_Initialize( ffc0d264: 7f de e2 14 add r30,r30,r28 /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { ffc0d268: 40 82 ff ec bne+ ffc0d254 <_RBTree_Initialize+0x54> _RBTree_Insert_unprotected(the_rbtree, next); next = (RBTree_Node *) _Addresses_Add_offset( (void *) next, node_size ); } } ffc0d26c: 80 01 00 1c lwz r0,28(r1) ffc0d270: 83 81 00 08 lwz r28,8(r1) ffc0d274: 7c 08 03 a6 mtlr r0 ffc0d278: 83 a1 00 0c lwz r29,12(r1) ffc0d27c: 83 c1 00 10 lwz r30,16(r1) ffc0d280: 83 e1 00 14 lwz r31,20(r1) ffc0d284: 38 21 00 18 addi r1,r1,24 ffc0d288: 4e 80 00 20 blr =============================================================================== ffc0cae4 <_RBTree_Insert_unprotected>: */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0cae4: 94 21 ff e0 stwu r1,-32(r1) ffc0cae8: 7c 08 02 a6 mflr r0 ffc0caec: 93 e1 00 1c stw r31,28(r1) if(!the_node) return (RBTree_Node*)-1; ffc0caf0: 7c 9f 23 79 mr. r31,r4 */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0caf4: 90 01 00 24 stw r0,36(r1) ffc0caf8: 93 41 00 08 stw r26,8(r1) ffc0cafc: 93 61 00 0c stw r27,12(r1) ffc0cb00: 93 81 00 10 stw r28,16(r1) ffc0cb04: 93 a1 00 14 stw r29,20(r1) ffc0cb08: 93 c1 00 18 stw r30,24(r1) if(!the_node) return (RBTree_Node*)-1; ffc0cb0c: 41 82 02 b8 beq- ffc0cdc4 <_RBTree_Insert_unprotected+0x2e0> RBTree_Node *iter_node = the_rbtree->root; ffc0cb10: 83 a3 00 04 lwz r29,4(r3) ffc0cb14: 7c 7c 1b 78 mr r28,r3 int compare_result; if (!iter_node) { /* special case: first node inserted */ ffc0cb18: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0cb1c: 40 be 00 0c bne+ cr7,ffc0cb28 <_RBTree_Insert_unprotected+0x44> ffc0cb20: 48 00 02 dc b ffc0cdfc <_RBTree_Insert_unprotected+0x318> (dir && _RBTree_Is_greater(compare_result)) ) { the_rbtree->first[dir] = the_node; } break; } else { iter_node = iter_node->child[dir]; ffc0cb24: 7f dd f3 78 mr r29,r30 the_node->parent = (RBTree_Node *) the_rbtree; the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); ffc0cb28: 81 3c 00 10 lwz r9,16(r28) ffc0cb2c: 7f a4 eb 78 mr r4,r29 ffc0cb30: 7f e3 fb 78 mr r3,r31 ffc0cb34: 7d 29 03 a6 mtctr r9 ffc0cb38: 4e 80 04 21 bctrl if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) ffc0cb3c: 89 5c 00 14 lbz r10,20(r28) return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); ffc0cb40: 7c 7a 18 f8 not r26,r3 the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) ffc0cb44: 2f 0a 00 00 cmpwi cr6,r10,0 return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); ffc0cb48: 57 5a 0f fe rlwinm r26,r26,1,31,31 if (!iter_node->child[dir]) { ffc0cb4c: 57 5b 10 3a rlwinm r27,r26,2,0,29 ffc0cb50: 7d 3d da 14 add r9,r29,r27 the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) ffc0cb54: 2f 83 00 00 cmpwi cr7,r3,0 return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { ffc0cb58: 39 09 00 04 addi r8,r9,4 the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) ffc0cb5c: 41 9a 00 08 beq- cr6,ffc0cb64 <_RBTree_Insert_unprotected+0x80> ffc0cb60: 41 9e 02 94 beq- cr7,ffc0cdf4 <_RBTree_Insert_unprotected+0x310> return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { ffc0cb64: 83 c9 00 04 lwz r30,4(r9) ffc0cb68: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0cb6c: 40 9e ff b8 bne+ cr7,ffc0cb24 <_RBTree_Insert_unprotected+0x40> the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; the_node->color = RBT_RED; ffc0cb70: 39 20 00 01 li r9,1 compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; ffc0cb74: 93 df 00 08 stw r30,8(r31) RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; ffc0cb78: 7d 5c da 14 add r10,r28,r27 the_node->color = RBT_RED; ffc0cb7c: 91 3f 00 0c stw r9,12(r31) iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ compare_result = the_rbtree->compare_function( ffc0cb80: 7f e3 fb 78 mr r3,r31 ffc0cb84: 81 3c 00 10 lwz r9,16(r28) compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; ffc0cb88: 93 df 00 04 stw r30,4(r31) the_node->color = RBT_RED; iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ compare_result = the_rbtree->compare_function( ffc0cb8c: 7d 29 03 a6 mtctr r9 return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; the_node->color = RBT_RED; iter_node->child[dir] = the_node; ffc0cb90: 93 e8 00 00 stw r31,0(r8) the_node->parent = iter_node; ffc0cb94: 93 bf 00 00 stw r29,0(r31) /* update min/max */ compare_result = the_rbtree->compare_function( ffc0cb98: 80 8a 00 08 lwz r4,8(r10) ffc0cb9c: 4e 80 04 21 bctrl the_node, _RBTree_First(the_rbtree, dir) ); if ( (!dir && _RBTree_Is_lesser(compare_result)) || ffc0cba0: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0cba4: 40 9e 00 60 bne- cr7,ffc0cc04 <_RBTree_Insert_unprotected+0x120> ffc0cba8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cbac: 41 9c 00 60 blt- cr7,ffc0cc0c <_RBTree_Insert_unprotected+0x128> /* ensure node is on the same branch direction as parent */ if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; ffc0cbb0: 38 80 00 00 li r4,0 g->color = RBT_RED; ffc0cbb4: 38 60 00 01 li r3,1 _ISR_Disable( level ); return_node = _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); return return_node; } ffc0cbb8: 81 3f 00 00 lwz r9,0(r31) */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( const RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; ffc0cbbc: 81 49 00 00 lwz r10,0(r9) ffc0cbc0: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0cbc4: 7d 46 53 78 mr r6,r10 ffc0cbc8: 41 9e 01 b0 beq- cr7,ffc0cd78 <_RBTree_Insert_unprotected+0x294> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0cbcc: 81 09 00 0c lwz r8,12(r9) ffc0cbd0: 2f 88 00 01 cmpwi cr7,r8,1 ffc0cbd4: 41 9e 00 44 beq- cr7,ffc0cc18 <_RBTree_Insert_unprotected+0x134> /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } ffc0cbd8: 80 01 00 24 lwz r0,36(r1) ffc0cbdc: 7f c3 f3 78 mr r3,r30 ffc0cbe0: 83 41 00 08 lwz r26,8(r1) ffc0cbe4: 7c 08 03 a6 mtlr r0 ffc0cbe8: 83 61 00 0c lwz r27,12(r1) ffc0cbec: 83 81 00 10 lwz r28,16(r1) ffc0cbf0: 83 a1 00 14 lwz r29,20(r1) ffc0cbf4: 83 c1 00 18 lwz r30,24(r1) ffc0cbf8: 83 e1 00 1c lwz r31,28(r1) ffc0cbfc: 38 21 00 20 addi r1,r1,32 ffc0cc00: 4e 80 00 20 blr compare_result = the_rbtree->compare_function( the_node, _RBTree_First(the_rbtree, dir) ); if ( (!dir && _RBTree_Is_lesser(compare_result)) || (dir && _RBTree_Is_greater(compare_result)) ) { ffc0cc04: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cc08: 40 bd ff a8 ble- cr7,ffc0cbb0 <_RBTree_Insert_unprotected+0xcc> the_rbtree->first[dir] = the_node; ffc0cc0c: 7f 9c da 14 add r28,r28,r27 ffc0cc10: 93 fc 00 08 stw r31,8(r28) ffc0cc14: 4b ff ff 9c b ffc0cbb0 <_RBTree_Insert_unprotected+0xcc> ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(!(the_node->parent->parent->parent)) return NULL; ffc0cc18: 81 0a 00 00 lwz r8,0(r10) ffc0cc1c: 80 ea 00 04 lwz r7,4(r10) ffc0cc20: 2f 88 00 00 cmpwi cr7,r8,0 ffc0cc24: 41 9e 00 24 beq- cr7,ffc0cc48 <_RBTree_Insert_unprotected+0x164><== NEVER TAKEN { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) ffc0cc28: 7f 89 38 00 cmpw cr7,r9,r7 ffc0cc2c: 7c e8 3b 78 mr r8,r7 ffc0cc30: 41 9e 01 8c beq- cr7,ffc0cdbc <_RBTree_Insert_unprotected+0x2d8> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0cc34: 2f 88 00 00 cmpwi cr7,r8,0 ffc0cc38: 41 9e 00 10 beq- cr7,ffc0cc48 <_RBTree_Insert_unprotected+0x164> ffc0cc3c: 80 a8 00 0c lwz r5,12(r8) ffc0cc40: 2f 85 00 01 cmpwi cr7,r5,1 ffc0cc44: 41 9e 01 64 beq- cr7,ffc0cda8 <_RBTree_Insert_unprotected+0x2c4> the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; ffc0cc48: 81 09 00 04 lwz r8,4(r9) RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0cc4c: 7d 27 3a 78 xor r7,r9,r7 ffc0cc50: 7c e7 00 34 cntlzw r7,r7 the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; ffc0cc54: 7f e8 42 78 xor r8,r31,r8 ffc0cc58: 7d 08 00 34 cntlzw r8,r8 RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0cc5c: 54 e7 d9 7e rlwinm r7,r7,27,5,31 the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; ffc0cc60: 55 08 d9 7e rlwinm r8,r8,27,5,31 RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0cc64: 68 e7 00 01 xori r7,r7,1 the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; ffc0cc68: 69 08 00 01 xori r8,r8,1 RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { ffc0cc6c: 7f 88 38 00 cmpw cr7,r8,r7 ffc0cc70: 41 9e 00 7c beq- cr7,ffc0ccec <_RBTree_Insert_unprotected+0x208> */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); ffc0cc74: 68 e5 00 01 xori r5,r7,1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; ffc0cc78: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0cc7c: 7c a9 2a 14 add r5,r9,r5 ffc0cc80: 81 05 00 04 lwz r8,4(r5) ffc0cc84: 54 eb 10 3a rlwinm r11,r7,2,0,29 ffc0cc88: 2f 88 00 00 cmpwi cr7,r8,0 ffc0cc8c: 41 9e 00 54 beq- cr7,ffc0cce0 <_RBTree_Insert_unprotected+0x1fc><== NEVER TAKEN c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; ffc0cc90: 7f a8 5a 14 add r29,r8,r11 ffc0cc94: 80 1d 00 04 lwz r0,4(r29) ffc0cc98: 90 05 00 04 stw r0,4(r5) if (c->child[dir]) ffc0cc9c: 80 bd 00 04 lwz r5,4(r29) ffc0cca0: 2f 85 00 00 cmpwi cr7,r5,0 ffc0cca4: 41 9e 00 0c beq- cr7,ffc0ccb0 <_RBTree_Insert_unprotected+0x1cc> c->child[dir]->parent = the_node; ffc0cca8: 91 25 00 00 stw r9,0(r5) ffc0ccac: 81 49 00 00 lwz r10,0(r9) c->child[dir] = the_node; ffc0ccb0: 7c a8 5a 14 add r5,r8,r11 the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; ffc0ccb4: 91 48 00 00 stw r10,0(r8) the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0ccb8: 91 25 00 04 stw r9,4(r5) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0ccbc: 80 aa 00 04 lwz r5,4(r10) c->parent = the_node->parent; the_node->parent = c; ffc0ccc0: 91 09 00 00 stw r8,0(r9) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0ccc4: 7d 25 2a 78 xor r5,r9,r5 ffc0ccc8: 7c a5 00 34 cntlzw r5,r5 ffc0cccc: 54 a5 d9 7e rlwinm r5,r5,27,5,31 ffc0ccd0: 68 a5 00 01 xori r5,r5,1 ffc0ccd4: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0ccd8: 7d 4a 2a 14 add r10,r10,r5 ffc0ccdc: 91 0a 00 04 stw r8,4(r10) _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; ffc0cce0: 7f ff 5a 14 add r31,r31,r11 ffc0cce4: 83 ff 00 04 lwz r31,4(r31) ffc0cce8: 81 3f 00 00 lwz r9,0(r31) } the_node->parent->color = RBT_BLACK; g->color = RBT_RED; /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); ffc0ccec: 20 e7 00 01 subfic r7,r7,1 /* ensure node is on the same branch direction as parent */ if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; ffc0ccf0: 90 89 00 0c stw r4,12(r9) ffc0ccf4: 68 e8 00 01 xori r8,r7,1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; ffc0ccf8: 55 08 10 3a rlwinm r8,r8,2,0,29 g->color = RBT_RED; ffc0ccfc: 90 66 00 0c stw r3,12(r6) ffc0cd00: 7d 06 42 14 add r8,r6,r8 ffc0cd04: 81 48 00 04 lwz r10,4(r8) ffc0cd08: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0cd0c: 41 be fe ac beq- cr7,ffc0cbb8 <_RBTree_Insert_unprotected+0xd4><== NEVER TAKEN c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; ffc0cd10: 54 e7 10 3a rlwinm r7,r7,2,0,29 ffc0cd14: 7d 2a 3a 14 add r9,r10,r7 ffc0cd18: 80 a9 00 04 lwz r5,4(r9) ffc0cd1c: 90 a8 00 04 stw r5,4(r8) if (c->child[dir]) ffc0cd20: 81 29 00 04 lwz r9,4(r9) ffc0cd24: 2f 89 00 00 cmpwi cr7,r9,0 ffc0cd28: 41 9e 00 08 beq- cr7,ffc0cd30 <_RBTree_Insert_unprotected+0x24c> c->child[dir]->parent = the_node; ffc0cd2c: 90 c9 00 00 stw r6,0(r9) c->child[dir] = the_node; ffc0cd30: 7c ea 3a 14 add r7,r10,r7 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0cd34: 81 06 00 00 lwz r8,0(r6) the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0cd38: 90 c7 00 04 stw r6,4(r7) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0cd3c: 81 28 00 04 lwz r9,4(r8) c->parent = the_node->parent; ffc0cd40: 91 0a 00 00 stw r8,0(r10) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0cd44: 7c c9 4a 78 xor r9,r6,r9 ffc0cd48: 7d 29 00 34 cntlzw r9,r9 c->parent = the_node->parent; the_node->parent = c; ffc0cd4c: 91 46 00 00 stw r10,0(r6) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0cd50: 55 29 d9 7e rlwinm r9,r9,27,5,31 ffc0cd54: 69 29 00 01 xori r9,r9,1 ffc0cd58: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0cd5c: 7d 08 4a 14 add r8,r8,r9 ffc0cd60: 91 48 00 04 stw r10,4(r8) _ISR_Disable( level ); return_node = _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); return return_node; } ffc0cd64: 81 3f 00 00 lwz r9,0(r31) */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( const RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; ffc0cd68: 81 49 00 00 lwz r10,0(r9) ffc0cd6c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0cd70: 7d 46 53 78 mr r6,r10 ffc0cd74: 40 9e fe 58 bne+ cr7,ffc0cbcc <_RBTree_Insert_unprotected+0xe8><== ALWAYS TAKEN /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } ffc0cd78: 80 01 00 24 lwz r0,36(r1) ffc0cd7c: 7f c3 f3 78 mr r3,r30 /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; ffc0cd80: 91 5f 00 0c stw r10,12(r31) /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } ffc0cd84: 7c 08 03 a6 mtlr r0 ffc0cd88: 83 41 00 08 lwz r26,8(r1) ffc0cd8c: 83 61 00 0c lwz r27,12(r1) ffc0cd90: 83 81 00 10 lwz r28,16(r1) ffc0cd94: 83 a1 00 14 lwz r29,20(r1) ffc0cd98: 83 c1 00 18 lwz r30,24(r1) ffc0cd9c: 83 e1 00 1c lwz r31,28(r1) ffc0cda0: 38 21 00 20 addi r1,r1,32 ffc0cda4: 4e 80 00 20 blr u = _RBTree_Parent_sibling(the_node); g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; ffc0cda8: 90 89 00 0c stw r4,12(r9) u->color = RBT_BLACK; g->color = RBT_RED; ffc0cdac: 7d 5f 53 78 mr r31,r10 g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; ffc0cdb0: 90 88 00 0c stw r4,12(r8) g->color = RBT_RED; ffc0cdb4: 90 aa 00 0c stw r5,12(r10) ffc0cdb8: 4b ff fe 00 b ffc0cbb8 <_RBTree_Insert_unprotected+0xd4> if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; ffc0cdbc: 81 0a 00 08 lwz r8,8(r10) ffc0cdc0: 4b ff fe 74 b ffc0cc34 <_RBTree_Insert_unprotected+0x150> /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } ffc0cdc4: 80 01 00 24 lwz r0,36(r1) RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { if(!the_node) return (RBTree_Node*)-1; ffc0cdc8: 3b c0 ff ff li r30,-1 /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } ffc0cdcc: 7f c3 f3 78 mr r3,r30 ffc0cdd0: 83 41 00 08 lwz r26,8(r1) ffc0cdd4: 7c 08 03 a6 mtlr r0 ffc0cdd8: 83 61 00 0c lwz r27,12(r1) ffc0cddc: 83 81 00 10 lwz r28,16(r1) ffc0cde0: 83 a1 00 14 lwz r29,20(r1) ffc0cde4: 83 c1 00 18 lwz r30,24(r1) ffc0cde8: 83 e1 00 1c lwz r31,28(r1) ffc0cdec: 38 21 00 20 addi r1,r1,32 ffc0cdf0: 4e 80 00 20 blr the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) ffc0cdf4: 7f be eb 78 mr r30,r29 ffc0cdf8: 4b ff fd e0 b ffc0cbd8 <_RBTree_Insert_unprotected+0xf4> RBTree_Node *iter_node = the_rbtree->root; int compare_result; if (!iter_node) { /* special case: first node inserted */ the_node->color = RBT_BLACK; ffc0cdfc: 93 bf 00 0c stw r29,12(r31) } /* while(iter_node) */ /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; ffc0ce00: 3b c0 00 00 li r30,0 RBTree_Node *iter_node = the_rbtree->root; int compare_result; if (!iter_node) { /* special case: first node inserted */ the_node->color = RBT_BLACK; the_rbtree->root = the_node; ffc0ce04: 93 e3 00 04 stw r31,4(r3) the_rbtree->first[0] = the_rbtree->first[1] = the_node; ffc0ce08: 93 e3 00 0c stw r31,12(r3) ffc0ce0c: 93 e3 00 08 stw r31,8(r3) the_node->parent = (RBTree_Node *) the_rbtree; ffc0ce10: 90 7f 00 00 stw r3,0(r31) the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; ffc0ce14: 93 bf 00 08 stw r29,8(r31) ffc0ce18: 93 bf 00 04 stw r29,4(r31) ffc0ce1c: 4b ff fd bc b ffc0cbd8 <_RBTree_Insert_unprotected+0xf4> =============================================================================== ffc0ce5c <_RBTree_Iterate_unprotected>: const RBTree_Control *rbtree, RBTree_Direction dir, RBTree_Visitor visitor, void *visitor_arg ) { ffc0ce5c: 94 21 ff e0 stwu r1,-32(r1) ffc0ce60: 7c 08 02 a6 mflr r0 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); ffc0ce64: 7c 89 00 34 cntlzw r9,r4 ffc0ce68: 55 29 d9 7e rlwinm r9,r9,27,5,31 ffc0ce6c: 90 01 00 24 stw r0,36(r1) RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; ffc0ce70: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0ce74: 7c 63 4a 14 add r3,r3,r9 ffc0ce78: 93 e1 00 1c stw r31,28(r1) ffc0ce7c: 83 e3 00 08 lwz r31,8(r3) ffc0ce80: 93 a1 00 14 stw r29,20(r1) RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { ffc0ce84: 2f 9f 00 00 cmpwi cr7,r31,0 const RBTree_Control *rbtree, RBTree_Direction dir, RBTree_Visitor visitor, void *visitor_arg ) { ffc0ce88: 93 61 00 0c stw r27,12(r1) ffc0ce8c: 7c bb 2b 78 mr r27,r5 ffc0ce90: 93 81 00 10 stw r28,16(r1) ffc0ce94: 7c dc 33 78 mr r28,r6 ffc0ce98: 93 c1 00 18 stw r30,24(r1) */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); ffc0ce9c: 7c 9e 23 78 mr r30,r4 RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { ffc0cea0: 41 9e 00 38 beq- cr7,ffc0ced8 <_RBTree_Iterate_unprotected+0x7c> stop = (*visitor)( current, dir, visitor_arg ); ffc0cea4: 7f e3 fb 78 mr r3,r31 ffc0cea8: 7f 69 03 a6 mtctr r27 ffc0ceac: 7f 85 e3 78 mr r5,r28 ffc0ceb0: 7f c4 f3 78 mr r4,r30 ffc0ceb4: 4e 80 04 21 bctrl current = _RBTree_Next_unprotected( current, dir ); ffc0ceb8: 7f c4 f3 78 mr r4,r30 RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { stop = (*visitor)( current, dir, visitor_arg ); ffc0cebc: 7c 7d 1b 78 mr r29,r3 current = _RBTree_Next_unprotected( current, dir ); ffc0cec0: 7f e3 fb 78 mr r3,r31 ffc0cec4: 48 00 00 39 bl ffc0cefc <_RBTree_Next_unprotected> { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { ffc0cec8: 2f 1d 00 00 cmpwi cr6,r29,0 stop = (*visitor)( current, dir, visitor_arg ); current = _RBTree_Next_unprotected( current, dir ); ffc0cecc: 7c 7f 1b 78 mr r31,r3 { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { ffc0ced0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ced4: 41 9a ff cc beq+ cr6,ffc0cea0 <_RBTree_Iterate_unprotected+0x44><== ALWAYS TAKEN stop = (*visitor)( current, dir, visitor_arg ); current = _RBTree_Next_unprotected( current, dir ); } } ffc0ced8: 80 01 00 24 lwz r0,36(r1) ffc0cedc: 83 61 00 0c lwz r27,12(r1) ffc0cee0: 7c 08 03 a6 mtlr r0 ffc0cee4: 83 81 00 10 lwz r28,16(r1) ffc0cee8: 83 a1 00 14 lwz r29,20(r1) ffc0ceec: 83 c1 00 18 lwz r30,24(r1) ffc0cef0: 83 e1 00 1c lwz r31,28(r1) ffc0cef4: 38 21 00 20 addi r1,r1,32 ffc0cef8: 4e 80 00 20 blr =============================================================================== ffc0ae30 <_RTEMS_signal_Post_switch_hook>: #include #include #include static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing ) { ffc0ae30: 94 21 ff e0 stwu r1,-32(r1) ffc0ae34: 7c 08 02 a6 mflr r0 ffc0ae38: 90 01 00 24 stw r0,36(r1) ffc0ae3c: 93 e1 00 1c stw r31,28(r1) RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc0ae40: 83 e3 01 48 lwz r31,328(r3) #include #include #include static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing ) { ffc0ae44: 93 c1 00 18 stw r30,24(r1) ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; if ( !api ) ffc0ae48: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0ae4c: 41 9e 00 2c beq- cr7,ffc0ae78 <_RTEMS_signal_Post_switch_hook+0x48><== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0ae50: 7d 20 00 a6 mfmsr r9 ffc0ae54: 7d 50 42 a6 mfsprg r10,0 ffc0ae58: 7d 2a 50 78 andc r10,r9,r10 ffc0ae5c: 7d 40 01 24 mtmsr r10 asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; asr->signals_posted = 0; ffc0ae60: 39 40 00 00 li r10,0 */ asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; ffc0ae64: 83 df 00 14 lwz r30,20(r31) asr->signals_posted = 0; ffc0ae68: 91 5f 00 14 stw r10,20(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0ae6c: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ ffc0ae70: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0ae74: 40 9e 00 1c bne- cr7,ffc0ae90 <_RTEMS_signal_Post_switch_hook+0x60> (*asr->handler)( signal_set ); asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); } ffc0ae78: 80 01 00 24 lwz r0,36(r1) ffc0ae7c: 83 c1 00 18 lwz r30,24(r1) ffc0ae80: 7c 08 03 a6 mtlr r0 ffc0ae84: 83 e1 00 1c lwz r31,28(r1) ffc0ae88: 38 21 00 20 addi r1,r1,32 ffc0ae8c: 4e 80 00 20 blr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; ffc0ae90: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0ae94: 38 80 00 00 li r4,0 ffc0ae98: 80 7f 00 10 lwz r3,16(r31) ffc0ae9c: 38 a1 00 08 addi r5,r1,8 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; ffc0aea0: 39 29 00 01 addi r9,r9,1 ffc0aea4: 91 3f 00 1c stw r9,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0aea8: 60 84 ff ff ori r4,r4,65535 ffc0aeac: 48 00 05 69 bl ffc0b414 (*asr->handler)( signal_set ); ffc0aeb0: 81 3f 00 0c lwz r9,12(r31) ffc0aeb4: 7f c3 f3 78 mr r3,r30 ffc0aeb8: 7d 29 03 a6 mtctr r9 ffc0aebc: 4e 80 04 21 bctrl asr->nest_level -= 1; ffc0aec0: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0aec4: 80 61 00 08 lwz r3,8(r1) ffc0aec8: 38 80 00 00 li r4,0 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; ffc0aecc: 39 29 ff ff addi r9,r9,-1 ffc0aed0: 91 3f 00 1c stw r9,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0aed4: 38 a1 00 08 addi r5,r1,8 ffc0aed8: 60 84 ff ff ori r4,r4,65535 ffc0aedc: 48 00 05 39 bl ffc0b414 } ffc0aee0: 80 01 00 24 lwz r0,36(r1) ffc0aee4: 83 c1 00 18 lwz r30,24(r1) ffc0aee8: 7c 08 03 a6 mtlr r0 ffc0aeec: 83 e1 00 1c lwz r31,28(r1) ffc0aef0: 38 21 00 20 addi r1,r1,32 ffc0aef4: 4e 80 00 20 blr =============================================================================== ffc09fd8 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09fd8: 94 21 ff d8 stwu r1,-40(r1) ffc09fdc: 7c 08 02 a6 mflr r0 rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc09fe0: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09fe4: 90 01 00 2c stw r0,44(r1) rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc09fe8: 39 29 20 04 addi r9,r9,8196 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09fec: 93 e1 00 24 stw r31,36(r1) rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc09ff0: 83 e9 00 2c lwz r31,44(r9) * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09ff4: 93 a1 00 1c stw r29,28(r1) maximum = Configuration_RTEMS_API.number_of_initialization_tasks; /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc09ff8: 2f 9f 00 00 cmpwi cr7,r31,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09ffc: 93 c1 00 20 stw r30,32(r1) /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; maximum = Configuration_RTEMS_API.number_of_initialization_tasks; ffc0a000: 83 a9 00 28 lwz r29,40(r9) /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc0a004: 41 9e 00 5c beq- cr7,ffc0a060 <_RTEMS_tasks_Initialize_user_tasks_body+0x88> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc0a008: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a00c: 3b c0 00 00 li r30,0 ffc0a010: 41 9e 00 50 beq- cr7,ffc0a060 <_RTEMS_tasks_Initialize_user_tasks_body+0x88><== NEVER TAKEN return_value = rtems_task_create( ffc0a014: 80 bf 00 04 lwz r5,4(r31) ffc0a018: 39 01 00 08 addi r8,r1,8 ffc0a01c: 80 7f 00 00 lwz r3,0(r31) ffc0a020: 80 9f 00 08 lwz r4,8(r31) ffc0a024: 80 df 00 14 lwz r6,20(r31) ffc0a028: 80 ff 00 0c lwz r7,12(r31) ffc0a02c: 4b ff fc ed bl ffc09d18 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) ffc0a030: 7c 65 1b 79 mr. r5,r3 ffc0a034: 40 82 00 48 bne- ffc0a07c <_RTEMS_tasks_Initialize_user_tasks_body+0xa4> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( ffc0a038: 80 bf 00 18 lwz r5,24(r31) ffc0a03c: 80 61 00 08 lwz r3,8(r1) ffc0a040: 80 9f 00 10 lwz r4,16(r31) ffc0a044: 48 00 00 45 bl ffc0a088 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) ffc0a048: 7c 65 1b 79 mr. r5,r3 ffc0a04c: 40 82 00 30 bne- ffc0a07c <_RTEMS_tasks_Initialize_user_tasks_body+0xa4> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc0a050: 3b de 00 01 addi r30,r30,1 ffc0a054: 7f 9e e8 00 cmpw cr7,r30,r29 ffc0a058: 3b ff 00 1c addi r31,r31,28 ffc0a05c: 40 9e ff b8 bne+ cr7,ffc0a014 <_RTEMS_tasks_Initialize_user_tasks_body+0x3c><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } ffc0a060: 80 01 00 2c lwz r0,44(r1) ffc0a064: 83 a1 00 1c lwz r29,28(r1) ffc0a068: 7c 08 03 a6 mtlr r0 ffc0a06c: 83 c1 00 20 lwz r30,32(r1) ffc0a070: 83 e1 00 24 lwz r31,36(r1) ffc0a074: 38 21 00 28 addi r1,r1,40 ffc0a078: 4e 80 00 20 blr id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); ffc0a07c: 38 60 00 01 li r3,1 ffc0a080: 38 80 00 01 li r4,1 ffc0a084: 48 00 12 95 bl ffc0b318 <_Internal_error_Occurred> =============================================================================== ffc0f948 <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; ffc0f948: 81 23 01 54 lwz r9,340(r3) while (tvp) { ffc0f94c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f950: 41 9e 00 24 beq- cr7,ffc0f974 <_RTEMS_tasks_Switch_extension+0x2c> tvp->tval = *tvp->ptr; ffc0f954: 81 49 00 04 lwz r10,4(r9) *tvp->ptr = tvp->gval; ffc0f958: 81 09 00 08 lwz r8,8(r9) * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; ffc0f95c: 80 ea 00 00 lwz r7,0(r10) ffc0f960: 90 e9 00 0c stw r7,12(r9) *tvp->ptr = tvp->gval; ffc0f964: 91 0a 00 00 stw r8,0(r10) tvp = (rtems_task_variable_t *)tvp->next; ffc0f968: 81 29 00 00 lwz r9,0(r9) /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { ffc0f96c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f970: 40 9e ff e4 bne+ cr7,ffc0f954 <_RTEMS_tasks_Switch_extension+0xc><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; ffc0f974: 81 24 01 54 lwz r9,340(r4) while (tvp) { ffc0f978: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f97c: 4d 9e 00 20 beqlr cr7 tvp->gval = *tvp->ptr; ffc0f980: 81 49 00 04 lwz r10,4(r9) *tvp->ptr = tvp->tval; ffc0f984: 81 09 00 0c lwz r8,12(r9) tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; ffc0f988: 80 ea 00 00 lwz r7,0(r10) ffc0f98c: 90 e9 00 08 stw r7,8(r9) *tvp->ptr = tvp->tval; ffc0f990: 91 0a 00 00 stw r8,0(r10) tvp = (rtems_task_variable_t *)tvp->next; ffc0f994: 81 29 00 00 lwz r9,0(r9) *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { ffc0f998: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f99c: 40 9e ff e4 bne+ cr7,ffc0f980 <_RTEMS_tasks_Switch_extension+0x38><== NEVER TAKEN ffc0f9a0: 4e 80 00 20 blr =============================================================================== ffc3e0e8 <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { ffc3e0e8: 94 21 ff d8 stwu r1,-40(r1) ffc3e0ec: 7c 08 02 a6 mflr r0 ffc3e0f0: 93 81 00 18 stw r28,24(r1) ffc3e0f4: 7c 9c 23 78 mr r28,r4 */ static inline void _TOD_Get_uptime( Timestamp_Control *time ) { _TOD_Get_with_nanoseconds( time, &_TOD.uptime ); ffc3e0f8: 3c 80 00 00 lis r4,0 ffc3e0fc: 90 01 00 2c stw r0,44(r1) ffc3e100: 38 84 63 48 addi r4,r4,25416 ffc3e104: 93 c1 00 20 stw r30,32(r1) ffc3e108: 7c 7e 1b 78 mr r30,r3 ffc3e10c: 38 61 00 08 addi r3,r1,8 ffc3e110: 93 a1 00 1c stw r29,28(r1) ffc3e114: 93 e1 00 24 stw r31,36(r1) ffc3e118: 7c bf 2b 78 mr r31,r5 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; ffc3e11c: 83 be 00 40 lwz r29,64(r30) ffc3e120: 4b fc c4 d9 bl ffc0a5f8 <_TOD_Get_with_nanoseconds> * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc3e124: 3c e0 00 00 lis r7,0 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; ffc3e128: 81 1e 00 50 lwz r8,80(r30) ffc3e12c: 38 e7 65 60 addi r7,r7,25952 ffc3e130: 81 3e 00 54 lwz r9,84(r30) ffc3e134: 81 47 00 10 lwz r10,16(r7) /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( ffc3e138: 81 61 00 0c lwz r11,12(r1) * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc3e13c: 7f 8a e8 00 cmpw cr7,r10,r29 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( ffc3e140: 81 41 00 08 lwz r10,8(r1) ffc3e144: 7d 29 58 10 subfc r9,r9,r11 ffc3e148: 7d 08 51 10 subfe r8,r8,r10 ffc3e14c: 91 1c 00 00 stw r8,0(r28) ffc3e150: 91 3c 00 04 stw r9,4(r28) #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; ffc3e154: 81 1d 00 80 lwz r8,128(r29) ffc3e158: 81 3d 00 84 lwz r9,132(r29) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc3e15c: 41 9e 00 28 beq- cr7,ffc3e184 <_Rate_monotonic_Get_status+0x9c> if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; ffc3e160: 38 60 00 01 li r3,1 } ffc3e164: 80 01 00 2c lwz r0,44(r1) ffc3e168: 83 81 00 18 lwz r28,24(r1) ffc3e16c: 7c 08 03 a6 mtlr r0 ffc3e170: 83 a1 00 1c lwz r29,28(r1) ffc3e174: 83 c1 00 20 lwz r30,32(r1) ffc3e178: 83 e1 00 24 lwz r31,36(r1) ffc3e17c: 38 21 00 28 addi r1,r1,40 ffc3e180: 4e 80 00 20 blr ffc3e184: 80 87 00 20 lwz r4,32(r7) ffc3e188: 80 a7 00 24 lwz r5,36(r7) case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc3e18c: 80 de 00 48 lwz r6,72(r30) ffc3e190: 7d 65 58 10 subfc r11,r5,r11 ffc3e194: 7d 44 51 10 subfe r10,r4,r10 ffc3e198: 80 fe 00 4c lwz r7,76(r30) static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; ffc3e19c: 7d 29 58 14 addc r9,r9,r11 ffc3e1a0: 7d 08 51 14 adde r8,r8,r10 /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) ffc3e1a4: 7f 86 40 00 cmpw cr7,r6,r8 ffc3e1a8: 41 9d 00 44 bgt- cr7,ffc3e1ec <_Rate_monotonic_Get_status+0x104><== NEVER TAKEN ffc3e1ac: 41 9e 00 38 beq- cr7,ffc3e1e4 <_Rate_monotonic_Get_status+0xfc> return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } ffc3e1b0: 80 01 00 2c lwz r0,44(r1) const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; ffc3e1b4: 7d 27 48 10 subfc r9,r7,r9 ffc3e1b8: 7d 06 41 10 subfe r8,r6,r8 ffc3e1bc: 91 1f 00 00 stw r8,0(r31) ffc3e1c0: 7c 08 03 a6 mtlr r0 if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; ffc3e1c4: 38 60 00 01 li r3,1 ffc3e1c8: 91 3f 00 04 stw r9,4(r31) } ffc3e1cc: 83 81 00 18 lwz r28,24(r1) ffc3e1d0: 83 a1 00 1c lwz r29,28(r1) ffc3e1d4: 83 c1 00 20 lwz r30,32(r1) ffc3e1d8: 83 e1 00 24 lwz r31,36(r1) ffc3e1dc: 38 21 00 28 addi r1,r1,40 ffc3e1e0: 4e 80 00 20 blr /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) ffc3e1e4: 7f 87 48 40 cmplw cr7,r7,r9 ffc3e1e8: 40 9d ff c8 ble+ cr7,ffc3e1b0 <_Rate_monotonic_Get_status+0xc8> return false; ffc3e1ec: 38 60 00 00 li r3,0 ffc3e1f0: 4b ff ff 74 b ffc3e164 <_Rate_monotonic_Get_status+0x7c> =============================================================================== ffc3e650 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { ffc3e650: 94 21 ff e0 stwu r1,-32(r1) ffc3e654: 7c 08 02 a6 mflr r0 ffc3e658: 7c 64 1b 78 mr r4,r3 ffc3e65c: 3c 60 00 00 lis r3,0 ffc3e660: 90 01 00 24 stw r0,36(r1) ffc3e664: 38 63 67 e0 addi r3,r3,26592 ffc3e668: 38 a1 00 08 addi r5,r1,8 ffc3e66c: 93 e1 00 1c stw r31,28(r1) ffc3e670: 4b fc cb cd bl ffc0b23c <_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 ) { ffc3e674: 81 21 00 08 lwz r9,8(r1) ffc3e678: 2f 89 00 00 cmpwi cr7,r9,0 ffc3e67c: 40 9e 00 4c bne- cr7,ffc3e6c8 <_Rate_monotonic_Timeout+0x78><== NEVER TAKEN ffc3e680: 7c 7f 1b 78 mr r31,r3 case OBJECTS_LOCAL: the_thread = the_period->owner; ffc3e684: 80 63 00 40 lwz r3,64(r3) */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_PERIOD); ffc3e688: 81 23 00 10 lwz r9,16(r3) if ( _States_Is_waiting_for_period( the_thread->current_state ) && ffc3e68c: 71 2a 40 00 andi. r10,r9,16384 ffc3e690: 41 82 00 14 beq- ffc3e6a4 <_Rate_monotonic_Timeout+0x54> ffc3e694: 81 43 00 20 lwz r10,32(r3) ffc3e698: 81 3f 00 08 lwz r9,8(r31) ffc3e69c: 7f 8a 48 00 cmpw cr7,r10,r9 ffc3e6a0: 41 9e 00 68 beq- cr7,ffc3e708 <_Rate_monotonic_Timeout+0xb8> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { ffc3e6a4: 81 3f 00 38 lwz r9,56(r31) ffc3e6a8: 2f 89 00 01 cmpwi cr7,r9,1 ffc3e6ac: 41 9e 00 30 beq- cr7,ffc3e6dc <_Rate_monotonic_Timeout+0x8c> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; ffc3e6b0: 39 20 00 04 li r9,4 ffc3e6b4: 91 3f 00 38 stw r9,56(r31) * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc3e6b8: 3d 20 00 00 lis r9,0 ffc3e6bc: 81 49 34 80 lwz r10,13440(r9) --level; ffc3e6c0: 39 4a ff ff addi r10,r10,-1 _Thread_Dispatch_disable_level = level; ffc3e6c4: 91 49 34 80 stw r10,13440(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc3e6c8: 80 01 00 24 lwz r0,36(r1) ffc3e6cc: 83 e1 00 1c lwz r31,28(r1) ffc3e6d0: 7c 08 03 a6 mtlr r0 ffc3e6d4: 38 21 00 20 addi r1,r1,32 ffc3e6d8: 4e 80 00 20 blr _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; ffc3e6dc: 39 20 00 03 li r9,3 ffc3e6e0: 91 3f 00 38 stw r9,56(r31) _Rate_monotonic_Initiate_statistics( the_period ); ffc3e6e4: 7f e3 fb 78 mr r3,r31 ffc3e6e8: 4b ff fc 5d bl ffc3e344 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc3e6ec: 81 3f 00 3c lwz r9,60(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc3e6f0: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc3e6f4: 91 3f 00 1c stw r9,28(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc3e6f8: 38 63 64 88 addi r3,r3,25736 ffc3e6fc: 38 9f 00 10 addi r4,r31,16 ffc3e700: 4b fc ea d5 bl ffc0d1d4 <_Watchdog_Insert> ffc3e704: 4b ff ff b4 b ffc3e6b8 <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc3e708: 3c 80 10 07 lis r4,4103 ffc3e70c: 60 84 ff f8 ori r4,r4,65528 ffc3e710: 4b fc d6 31 bl ffc0bd40 <_Thread_Clear_state> ffc3e714: 4b ff ff d0 b ffc3e6e4 <_Rate_monotonic_Timeout+0x94> =============================================================================== ffc3e1f4 <_Rate_monotonic_Update_statistics>: } static void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { ffc3e1f4: 94 21 ff e0 stwu r1,-32(r1) ffc3e1f8: 7c 08 02 a6 mflr r0 ffc3e1fc: 90 01 00 24 stw r0,36(r1) * Update the counts. */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) ffc3e200: 81 43 00 38 lwz r10,56(r3) /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; ffc3e204: 81 23 00 58 lwz r9,88(r3) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) ffc3e208: 2f 8a 00 04 cmpwi cr7,r10,4 } static void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { ffc3e20c: 93 e1 00 1c stw r31,28(r1) /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; ffc3e210: 39 29 00 01 addi r9,r9,1 } static void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { ffc3e214: 7c 7f 1b 78 mr r31,r3 /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; ffc3e218: 91 23 00 58 stw r9,88(r3) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) ffc3e21c: 41 9e 00 cc beq- cr7,ffc3e2e8 <_Rate_monotonic_Update_statistics+0xf4> stats->missed_count++; /* * Grab status for time statistics. */ valid_status = ffc3e220: 7f e3 fb 78 mr r3,r31 ffc3e224: 38 81 00 08 addi r4,r1,8 ffc3e228: 38 a1 00 10 addi r5,r1,16 ffc3e22c: 4b ff fe bd bl ffc3e0e8 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) ffc3e230: 2f 83 00 00 cmpwi cr7,r3,0 ffc3e234: 41 9e 00 8c beq- cr7,ffc3e2c0 <_Rate_monotonic_Update_statistics+0xcc> /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); ffc3e238: 81 41 00 10 lwz r10,16(r1) if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) ffc3e23c: 80 ff 00 60 lwz r7,96(r31) static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; ffc3e240: 81 1f 00 70 lwz r8,112(r31) ffc3e244: 7f 87 50 00 cmpw cr7,r7,r10 ffc3e248: 81 3f 00 74 lwz r9,116(r31) /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); ffc3e24c: 81 61 00 14 lwz r11,20(r1) ffc3e250: 7d 29 58 14 addc r9,r9,r11 ffc3e254: 7d 08 51 14 adde r8,r8,r10 ffc3e258: 91 1f 00 70 stw r8,112(r31) ffc3e25c: 91 3f 00 74 stw r9,116(r31) if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) ffc3e260: 40 9d 00 74 ble- cr7,ffc3e2d4 <_Rate_monotonic_Update_statistics+0xe0> stats->min_cpu_time = executed; ffc3e264: 91 5f 00 60 stw r10,96(r31) ffc3e268: 91 7f 00 64 stw r11,100(r31) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) ffc3e26c: 81 3f 00 68 lwz r9,104(r31) ffc3e270: 7f 89 50 00 cmpw cr7,r9,r10 ffc3e274: 41 9c 00 c4 blt- cr7,ffc3e338 <_Rate_monotonic_Update_statistics+0x144><== NEVER TAKEN ffc3e278: 41 9e 00 b4 beq- cr7,ffc3e32c <_Rate_monotonic_Update_statistics+0x138><== ALWAYS TAKEN /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); ffc3e27c: 81 41 00 08 lwz r10,8(r1) if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) ffc3e280: 80 ff 00 78 lwz r7,120(r31) ffc3e284: 81 1f 00 88 lwz r8,136(r31) ffc3e288: 7f 87 50 00 cmpw cr7,r7,r10 ffc3e28c: 81 3f 00 8c lwz r9,140(r31) /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); ffc3e290: 81 61 00 0c lwz r11,12(r1) ffc3e294: 7d 29 58 14 addc r9,r9,r11 ffc3e298: 7d 08 51 14 adde r8,r8,r10 ffc3e29c: 91 1f 00 88 stw r8,136(r31) ffc3e2a0: 91 3f 00 8c stw r9,140(r31) if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) ffc3e2a4: 41 9d 00 60 bgt- cr7,ffc3e304 <_Rate_monotonic_Update_statistics+0x110> ffc3e2a8: 41 9e 00 50 beq- cr7,ffc3e2f8 <_Rate_monotonic_Update_statistics+0x104><== ALWAYS TAKEN stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) ffc3e2ac: 81 3f 00 80 lwz r9,128(r31) ffc3e2b0: 7f 89 50 00 cmpw cr7,r9,r10 ffc3e2b4: 40 9c 00 64 bge- cr7,ffc3e318 <_Rate_monotonic_Update_statistics+0x124><== ALWAYS TAKEN stats->max_wall_time = since_last_period; ffc3e2b8: 91 5f 00 80 stw r10,128(r31) ffc3e2bc: 91 7f 00 84 stw r11,132(r31) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } ffc3e2c0: 80 01 00 24 lwz r0,36(r1) ffc3e2c4: 83 e1 00 1c lwz r31,28(r1) ffc3e2c8: 7c 08 03 a6 mtlr r0 ffc3e2cc: 38 21 00 20 addi r1,r1,32 ffc3e2d0: 4e 80 00 20 blr * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) ffc3e2d4: 40 be ff 98 bne- cr7,ffc3e26c <_Rate_monotonic_Update_statistics+0x78><== NEVER TAKEN ffc3e2d8: 81 3f 00 64 lwz r9,100(r31) ffc3e2dc: 7f 89 58 40 cmplw cr7,r9,r11 ffc3e2e0: 40 bd ff 8c ble- cr7,ffc3e26c <_Rate_monotonic_Update_statistics+0x78> ffc3e2e4: 4b ff ff 80 b ffc3e264 <_Rate_monotonic_Update_statistics+0x70> */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; ffc3e2e8: 81 23 00 5c lwz r9,92(r3) ffc3e2ec: 39 29 00 01 addi r9,r9,1 ffc3e2f0: 91 23 00 5c stw r9,92(r3) ffc3e2f4: 4b ff ff 2c b ffc3e220 <_Rate_monotonic_Update_statistics+0x2c> * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) ffc3e2f8: 81 3f 00 7c lwz r9,124(r31) ffc3e2fc: 7f 89 58 40 cmplw cr7,r9,r11 ffc3e300: 40 bd ff ac ble- cr7,ffc3e2ac <_Rate_monotonic_Update_statistics+0xb8> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) ffc3e304: 81 3f 00 80 lwz r9,128(r31) */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; ffc3e308: 91 5f 00 78 stw r10,120(r31) if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) ffc3e30c: 7f 89 50 00 cmpw cr7,r9,r10 */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; ffc3e310: 91 7f 00 7c stw r11,124(r31) if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) ffc3e314: 41 9c ff a4 blt+ cr7,ffc3e2b8 <_Rate_monotonic_Update_statistics+0xc4><== NEVER TAKEN ffc3e318: 40 be ff a8 bne- cr7,ffc3e2c0 <_Rate_monotonic_Update_statistics+0xcc> ffc3e31c: 81 3f 00 84 lwz r9,132(r31) ffc3e320: 7f 89 58 40 cmplw cr7,r9,r11 ffc3e324: 41 9c ff 94 blt+ cr7,ffc3e2b8 <_Rate_monotonic_Update_statistics+0xc4> ffc3e328: 4b ff ff 98 b ffc3e2c0 <_Rate_monotonic_Update_statistics+0xcc> _Timestamp_Add_to( &stats->total_cpu_time, &executed ); if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) stats->min_cpu_time = executed; if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) ffc3e32c: 81 3f 00 6c lwz r9,108(r31) ffc3e330: 7f 89 58 40 cmplw cr7,r9,r11 ffc3e334: 40 bc ff 48 bge- cr7,ffc3e27c <_Rate_monotonic_Update_statistics+0x88> stats->max_cpu_time = executed; ffc3e338: 91 5f 00 68 stw r10,104(r31) ffc3e33c: 91 7f 00 6c stw r11,108(r31) ffc3e340: 4b ff ff 3c b ffc3e27c <_Rate_monotonic_Update_statistics+0x88> =============================================================================== ffc0c8d8 <_Scheduler_CBS_Allocate>: #include void *_Scheduler_CBS_Allocate( Thread_Control *the_thread ) { ffc0c8d8: 94 21 ff f0 stwu r1,-16(r1) ffc0c8dc: 7c 08 02 a6 mflr r0 ffc0c8e0: 93 e1 00 0c stw r31,12(r1) ffc0c8e4: 7c 7f 1b 78 mr r31,r3 void *sched; Scheduler_CBS_Per_thread *schinfo; sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); ffc0c8e8: 38 60 00 1c li r3,28 #include void *_Scheduler_CBS_Allocate( Thread_Control *the_thread ) { ffc0c8ec: 90 01 00 14 stw r0,20(r1) void *sched; Scheduler_CBS_Per_thread *schinfo; sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); ffc0c8f0: 48 00 22 3d bl ffc0eb2c <_Workspace_Allocate> if ( sched ) { ffc0c8f4: 2c 03 00 00 cmpwi r3,0 ffc0c8f8: 41 82 00 1c beq- ffc0c914 <_Scheduler_CBS_Allocate+0x3c><== NEVER TAKEN the_thread->scheduler_info = sched; schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info); schinfo->edf_per_thread.thread = the_thread; schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; ffc0c8fc: 39 40 00 02 li r10,2 void *sched; Scheduler_CBS_Per_thread *schinfo; sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); if ( sched ) { the_thread->scheduler_info = sched; ffc0c900: 90 7f 00 88 stw r3,136(r31) schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info); schinfo->edf_per_thread.thread = the_thread; schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; ffc0c904: 91 43 00 14 stw r10,20(r3) schinfo->cbs_server = NULL; ffc0c908: 39 40 00 00 li r10,0 sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); if ( sched ) { the_thread->scheduler_info = sched; schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info); schinfo->edf_per_thread.thread = the_thread; ffc0c90c: 93 e3 00 00 stw r31,0(r3) schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; schinfo->cbs_server = NULL; ffc0c910: 91 43 00 18 stw r10,24(r3) } return sched; } ffc0c914: 80 01 00 14 lwz r0,20(r1) ffc0c918: 83 e1 00 0c lwz r31,12(r1) ffc0c91c: 7c 08 03 a6 mtlr r0 ffc0c920: 38 21 00 10 addi r1,r1,16 ffc0c924: 4e 80 00 20 blr =============================================================================== ffc0e340 <_Scheduler_CBS_Budget_callout>: Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { ffc0e340: 94 21 ff e0 stwu r1,-32(r1) ffc0e344: 7c 08 02 a6 mflr r0 ffc0e348: 90 01 00 24 stw r0,36(r1) Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server_id server_id; /* Put violating task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; ffc0e34c: 80 83 00 ac lwz r4,172(r3) if ( the_thread->real_priority != new_priority ) ffc0e350: 81 23 00 18 lwz r9,24(r3) Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { ffc0e354: 93 e1 00 1c stw r31,28(r1) ffc0e358: 7c 7f 1b 78 mr r31,r3 Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server_id server_id; /* Put violating task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; if ( the_thread->real_priority != new_priority ) ffc0e35c: 7f 89 20 00 cmpw cr7,r9,r4 ffc0e360: 41 9e 00 08 beq- cr7,ffc0e368 <_Scheduler_CBS_Budget_callout+0x28><== NEVER TAKEN the_thread->real_priority = new_priority; ffc0e364: 90 83 00 18 stw r4,24(r3) if ( the_thread->current_priority != new_priority ) ffc0e368: 81 3f 00 14 lwz r9,20(r31) ffc0e36c: 7f 89 20 00 cmpw cr7,r9,r4 ffc0e370: 41 9e 00 10 beq- cr7,ffc0e380 <_Scheduler_CBS_Budget_callout+0x40><== NEVER TAKEN _Thread_Change_priority(the_thread, new_priority, true); ffc0e374: 7f e3 fb 78 mr r3,r31 ffc0e378: 38 a0 00 01 li r5,1 ffc0e37c: 48 00 06 fd bl ffc0ea78 <_Thread_Change_priority> /* Invoke callback function if any. */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; ffc0e380: 83 ff 00 88 lwz r31,136(r31) if ( sched_info->cbs_server->cbs_budget_overrun ) { ffc0e384: 81 3f 00 18 lwz r9,24(r31) ffc0e388: 81 49 00 0c lwz r10,12(r9) ffc0e38c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0e390: 41 9e 00 24 beq- cr7,ffc0e3b4 <_Scheduler_CBS_Budget_callout+0x74><== NEVER TAKEN _Scheduler_CBS_Get_server_id( ffc0e394: 80 69 00 00 lwz r3,0(r9) ffc0e398: 38 81 00 08 addi r4,r1,8 ffc0e39c: 4b ff ff 4d bl ffc0e2e8 <_Scheduler_CBS_Get_server_id> sched_info->cbs_server->task_id, &server_id ); sched_info->cbs_server->cbs_budget_overrun( server_id ); ffc0e3a0: 81 3f 00 18 lwz r9,24(r31) ffc0e3a4: 80 61 00 08 lwz r3,8(r1) ffc0e3a8: 81 29 00 0c lwz r9,12(r9) ffc0e3ac: 7d 29 03 a6 mtctr r9 ffc0e3b0: 4e 80 04 21 bctrl } } ffc0e3b4: 80 01 00 24 lwz r0,36(r1) ffc0e3b8: 83 e1 00 1c lwz r31,28(r1) ffc0e3bc: 7c 08 03 a6 mtlr r0 ffc0e3c0: 38 21 00 20 addi r1,r1,32 ffc0e3c4: 4e 80 00 20 blr =============================================================================== ffc0dcfc <_Scheduler_CBS_Cleanup>: #include #include #include int _Scheduler_CBS_Cleanup (void) { ffc0dcfc: 94 21 ff e8 stwu r1,-24(r1) ffc0dd00: 7c 08 02 a6 mflr r0 ffc0dd04: 93 c1 00 10 stw r30,16(r1) unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0dd08: 3f c0 00 00 lis r30,0 ffc0dd0c: 81 3e 27 94 lwz r9,10132(r30) #include #include #include int _Scheduler_CBS_Cleanup (void) { ffc0dd10: 90 01 00 1c stw r0,28(r1) unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0dd14: 2f 89 00 00 cmpwi cr7,r9,0 #include #include #include int _Scheduler_CBS_Cleanup (void) { ffc0dd18: 93 a1 00 0c stw r29,12(r1) ffc0dd1c: 93 e1 00 14 stw r31,20(r1) unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0dd20: 41 9e 00 68 beq- cr7,ffc0dd88 <_Scheduler_CBS_Cleanup+0x8c><== NEVER TAKEN ffc0dd24: 3f a0 00 00 lis r29,0 ffc0dd28: 81 5d 28 b0 lwz r10,10416(r29) ffc0dd2c: 3b e0 00 00 li r31,0 ffc0dd30: 3b de 27 94 addi r30,r30,10132 if ( _Scheduler_CBS_Server_list[ i ] ) ffc0dd34: 57 e9 10 3a rlwinm r9,r31,2,0,29 ffc0dd38: 7d 2a 48 2e lwzx r9,r10,r9 _Scheduler_CBS_Destroy_server( i ); ffc0dd3c: 7f e3 fb 78 mr r3,r31 int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0dd40: 3b ff 00 01 addi r31,r31,1 if ( _Scheduler_CBS_Server_list[ i ] ) ffc0dd44: 2f 89 00 00 cmpwi cr7,r9,0 ffc0dd48: 41 9e 00 0c beq- cr7,ffc0dd54 <_Scheduler_CBS_Cleanup+0x58> _Scheduler_CBS_Destroy_server( i ); ffc0dd4c: 48 00 01 95 bl ffc0dee0 <_Scheduler_CBS_Destroy_server> ffc0dd50: 81 5d 28 b0 lwz r10,10416(r29) int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0dd54: 81 3e 00 00 lwz r9,0(r30) ffc0dd58: 7f 89 f8 40 cmplw cr7,r9,r31 ffc0dd5c: 41 9d ff d8 bgt+ cr7,ffc0dd34 <_Scheduler_CBS_Cleanup+0x38> if ( _Scheduler_CBS_Server_list[ i ] ) _Scheduler_CBS_Destroy_server( i ); } _Workspace_Free( _Scheduler_CBS_Server_list ); ffc0dd60: 7d 43 53 78 mr r3,r10 ffc0dd64: 48 00 28 55 bl ffc105b8 <_Workspace_Free> return SCHEDULER_CBS_OK; } ffc0dd68: 80 01 00 1c lwz r0,28(r1) ffc0dd6c: 83 a1 00 0c lwz r29,12(r1) ffc0dd70: 38 60 00 00 li r3,0 ffc0dd74: 7c 08 03 a6 mtlr r0 ffc0dd78: 83 c1 00 10 lwz r30,16(r1) ffc0dd7c: 83 e1 00 14 lwz r31,20(r1) ffc0dd80: 38 21 00 18 addi r1,r1,24 ffc0dd84: 4e 80 00 20 blr ffc0dd88: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0dd8c: 81 49 28 b0 lwz r10,10416(r9) <== NOT EXECUTED ffc0dd90: 4b ff ff d0 b ffc0dd60 <_Scheduler_CBS_Cleanup+0x64> <== NOT EXECUTED =============================================================================== ffc0dd94 <_Scheduler_CBS_Create_server>: int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { ffc0dd94: 94 21 ff e0 stwu r1,-32(r1) ffc0dd98: 7c 08 02 a6 mflr r0 ffc0dd9c: 90 01 00 24 stw r0,36(r1) unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || ffc0dda0: 81 23 00 04 lwz r9,4(r3) int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { ffc0dda4: 93 e1 00 1c stw r31,28(r1) ffc0dda8: 7c 7f 1b 78 mr r31,r3 unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || ffc0ddac: 2f 89 00 00 cmpwi cr7,r9,0 int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { ffc0ddb0: 93 41 00 08 stw r26,8(r1) ffc0ddb4: 93 61 00 0c stw r27,12(r1) ffc0ddb8: 93 81 00 10 stw r28,16(r1) ffc0ddbc: 93 a1 00 14 stw r29,20(r1) ffc0ddc0: 93 c1 00 18 stw r30,24(r1) unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || ffc0ddc4: 40 9d 01 0c ble- cr7,ffc0ded0 <_Scheduler_CBS_Create_server+0x13c> ffc0ddc8: 81 23 00 00 lwz r9,0(r3) ffc0ddcc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ddd0: 40 9d 01 00 ble- cr7,ffc0ded0 <_Scheduler_CBS_Create_server+0x13c> params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0ddd4: 3d 20 00 00 lis r9,0 ffc0ddd8: 81 09 27 94 lwz r8,10132(r9) ffc0dddc: 2f 88 00 00 cmpwi cr7,r8,0 ffc0dde0: 41 9e 00 44 beq- cr7,ffc0de24 <_Scheduler_CBS_Create_server+0x90><== NEVER TAKEN if ( !_Scheduler_CBS_Server_list[i] ) ffc0dde4: 3f 80 00 00 lis r28,0 ffc0dde8: 83 dc 28 b0 lwz r30,10416(r28) ffc0ddec: 7c 9b 23 78 mr r27,r4 ffc0ddf0: 7c bd 2b 78 mr r29,r5 ffc0ddf4: 81 3e 00 00 lwz r9,0(r30) ffc0ddf8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ddfc: 41 9e 00 c8 beq- cr7,ffc0dec4 <_Scheduler_CBS_Create_server+0x130> ffc0de00: 7f ca f3 78 mr r10,r30 ffc0de04: 7d 09 03 a6 mtctr r8 ffc0de08: 39 20 00 00 li r9,0 ffc0de0c: 48 00 00 10 b ffc0de1c <_Scheduler_CBS_Create_server+0x88> ffc0de10: 85 0a 00 04 lwzu r8,4(r10) ffc0de14: 2f 88 00 00 cmpwi cr7,r8,0 ffc0de18: 41 9e 00 38 beq- cr7,ffc0de50 <_Scheduler_CBS_Create_server+0xbc> params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0de1c: 39 29 00 01 addi r9,r9,1 ffc0de20: 42 00 ff f0 bdnz+ ffc0de10 <_Scheduler_CBS_Create_server+0x7c> if ( !_Scheduler_CBS_Server_list[i] ) break; } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; ffc0de24: 38 60 ff e6 li r3,-26 the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } ffc0de28: 80 01 00 24 lwz r0,36(r1) ffc0de2c: 83 41 00 08 lwz r26,8(r1) ffc0de30: 7c 08 03 a6 mtlr r0 ffc0de34: 83 61 00 0c lwz r27,12(r1) ffc0de38: 83 81 00 10 lwz r28,16(r1) ffc0de3c: 83 a1 00 14 lwz r29,20(r1) ffc0de40: 83 c1 00 18 lwz r30,24(r1) ffc0de44: 83 e1 00 1c lwz r31,28(r1) ffc0de48: 38 21 00 20 addi r1,r1,32 ffc0de4c: 4e 80 00 20 blr ffc0de50: 55 3a 10 3a rlwinm r26,r9,2,0,29 } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; ffc0de54: 91 3d 00 00 stw r9,0(r29) _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); ffc0de58: 38 60 00 10 li r3,16 ffc0de5c: 48 00 27 45 bl ffc105a0 <_Workspace_Allocate> the_server = _Scheduler_CBS_Server_list[*server_id]; ffc0de60: 81 3d 00 00 lwz r9,0(r29) if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) ffc0de64: 7c 7e d1 2e stwx r3,r30,r26 _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; ffc0de68: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0de6c: 81 5c 28 b0 lwz r10,10416(r28) ffc0de70: 7d 2a 48 2e lwzx r9,r10,r9 if ( !the_server ) ffc0de74: 2f 89 00 00 cmpwi cr7,r9,0 ffc0de78: 41 9e 00 60 beq- cr7,ffc0ded8 <_Scheduler_CBS_Create_server+0x144><== NEVER TAKEN the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } ffc0de7c: 80 01 00 24 lwz r0,36(r1) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; ffc0de80: 38 60 00 00 li r3,0 _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; ffc0de84: 81 5f 00 00 lwz r10,0(r31) the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } ffc0de88: 7c 08 03 a6 mtlr r0 _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; ffc0de8c: 81 7f 00 04 lwz r11,4(r31) ffc0de90: 91 49 00 04 stw r10,4(r9) the_server->task_id = -1; ffc0de94: 39 40 ff ff li r10,-1 the_server->cbs_budget_overrun = budget_overrun_callback; ffc0de98: 93 69 00 0c stw r27,12(r9) return SCHEDULER_CBS_OK; } ffc0de9c: 83 41 00 08 lwz r26,8(r1) ffc0dea0: 83 61 00 0c lwz r27,12(r1) ffc0dea4: 83 81 00 10 lwz r28,16(r1) ffc0dea8: 83 a1 00 14 lwz r29,20(r1) ffc0deac: 83 c1 00 18 lwz r30,24(r1) ffc0deb0: 83 e1 00 1c lwz r31,28(r1) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; ffc0deb4: 91 69 00 08 stw r11,8(r9) the_server->task_id = -1; ffc0deb8: 91 49 00 00 stw r10,0(r9) the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } ffc0debc: 38 21 00 20 addi r1,r1,32 ffc0dec0: 4e 80 00 20 blr params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( !_Scheduler_CBS_Server_list[i] ) ffc0dec4: 3b 40 00 00 li r26,0 ffc0dec8: 39 20 00 00 li r9,0 ffc0decc: 4b ff ff 88 b ffc0de54 <_Scheduler_CBS_Create_server+0xc0> if ( params->budget <= 0 || params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; ffc0ded0: 38 60 ff ee li r3,-18 ffc0ded4: 4b ff ff 54 b ffc0de28 <_Scheduler_CBS_Create_server+0x94> *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; ffc0ded8: 38 60 ff ef li r3,-17 <== NOT EXECUTED ffc0dedc: 4b ff ff 4c b ffc0de28 <_Scheduler_CBS_Create_server+0x94><== NOT EXECUTED =============================================================================== ffc0df84 <_Scheduler_CBS_Detach_thread>: int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { ffc0df84: 94 21 ff d8 stwu r1,-40(r1) ffc0df88: 7c 08 02 a6 mflr r0 ffc0df8c: 93 c1 00 20 stw r30,32(r1) ffc0df90: 7c 9e 23 78 mr r30,r4 Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); ffc0df94: 38 81 00 08 addi r4,r1,8 int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { ffc0df98: 93 a1 00 1c stw r29,28(r1) ffc0df9c: 7c 7d 1b 78 mr r29,r3 Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); ffc0dfa0: 7f c3 f3 78 mr r3,r30 int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { ffc0dfa4: 93 e1 00 24 stw r31,36(r1) ffc0dfa8: 90 01 00 2c stw r0,44(r1) Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); ffc0dfac: 48 00 11 75 bl ffc0f120 <_Thread_Get> /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { ffc0dfb0: 7c 7f 1b 79 mr. r31,r3 ffc0dfb4: 41 82 00 88 beq- ffc0e03c <_Scheduler_CBS_Detach_thread+0xb8> _Thread_Enable_dispatch(); ffc0dfb8: 48 00 11 4d bl ffc0f104 <_Thread_Enable_dispatch> } if ( server_id >= _Scheduler_CBS_Maximum_servers ) ffc0dfbc: 3d 20 00 00 lis r9,0 ffc0dfc0: 81 29 27 94 lwz r9,10132(r9) ffc0dfc4: 7f 9d 48 40 cmplw cr7,r29,r9 ffc0dfc8: 40 9c 00 74 bge- cr7,ffc0e03c <_Scheduler_CBS_Detach_thread+0xb8> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) ffc0dfcc: 3d 20 00 00 lis r9,0 ffc0dfd0: 81 29 28 b0 lwz r9,10416(r9) ffc0dfd4: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc0dfd8: 7d 29 e8 2e lwzx r9,r9,r29 ffc0dfdc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0dfe0: 41 9e 00 7c beq- cr7,ffc0e05c <_Scheduler_CBS_Detach_thread+0xd8> return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) ffc0dfe4: 81 49 00 00 lwz r10,0(r9) ffc0dfe8: 7f 8a f0 00 cmpw cr7,r10,r30 ffc0dfec: 40 9e 00 50 bne- cr7,ffc0e03c <_Scheduler_CBS_Detach_thread+0xb8><== NEVER TAKEN _Scheduler_CBS_Server_list[server_id]->task_id = -1; sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; ffc0dff0: 80 df 00 a0 lwz r6,160(r31) return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; ffc0dff4: 38 a0 ff ff li r5,-1 sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; ffc0dff8: 80 ff 00 a4 lwz r7,164(r31) the_thread->is_preemptible = the_thread->Start.is_preemptible; return SCHEDULER_CBS_OK; ffc0dffc: 38 60 00 00 li r3,0 sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->is_preemptible = the_thread->Start.is_preemptible; ffc0e000: 89 1f 00 9c lbz r8,156(r31) if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; ffc0e004: 81 5f 00 88 lwz r10,136(r31) return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; ffc0e008: 90 a9 00 00 stw r5,0(r9) sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; ffc0e00c: 39 20 00 00 li r9,0 ffc0e010: 91 2a 00 18 stw r9,24(r10) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; ffc0e014: 90 df 00 78 stw r6,120(r31) the_thread->budget_callout = the_thread->Start.budget_callout; ffc0e018: 90 ff 00 7c stw r7,124(r31) the_thread->is_preemptible = the_thread->Start.is_preemptible; ffc0e01c: 99 1f 00 70 stb r8,112(r31) return SCHEDULER_CBS_OK; } ffc0e020: 80 01 00 2c lwz r0,44(r1) ffc0e024: 83 a1 00 1c lwz r29,28(r1) ffc0e028: 7c 08 03 a6 mtlr r0 ffc0e02c: 83 c1 00 20 lwz r30,32(r1) ffc0e030: 83 e1 00 24 lwz r31,36(r1) ffc0e034: 38 21 00 28 addi r1,r1,40 ffc0e038: 4e 80 00 20 blr ffc0e03c: 80 01 00 2c lwz r0,44(r1) if ( the_thread ) { _Thread_Enable_dispatch(); } if ( server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; ffc0e040: 38 60 ff ee li r3,-18 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->is_preemptible = the_thread->Start.is_preemptible; return SCHEDULER_CBS_OK; } ffc0e044: 83 a1 00 1c lwz r29,28(r1) ffc0e048: 7c 08 03 a6 mtlr r0 ffc0e04c: 83 c1 00 20 lwz r30,32(r1) ffc0e050: 83 e1 00 24 lwz r31,36(r1) ffc0e054: 38 21 00 28 addi r1,r1,40 ffc0e058: 4e 80 00 20 blr return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) return SCHEDULER_CBS_ERROR_NOSERVER; ffc0e05c: 38 60 ff e7 li r3,-25 ffc0e060: 4b ff ff c0 b ffc0e020 <_Scheduler_CBS_Detach_thread+0x9c> =============================================================================== ffc0e2e8 <_Scheduler_CBS_Get_server_id>: rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0e2e8: 3d 20 00 00 lis r9,0 ffc0e2ec: 81 29 27 94 lwz r9,10132(r9) ffc0e2f0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e2f4: 41 9e 00 38 beq- cr7,ffc0e32c <_Scheduler_CBS_Get_server_id+0x44><== NEVER TAKEN #include #include #include #include int _Scheduler_CBS_Get_server_id ( ffc0e2f8: 3d 40 00 00 lis r10,0 rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0e2fc: 7d 29 03 a6 mtctr r9 #include #include #include #include int _Scheduler_CBS_Get_server_id ( ffc0e300: 81 4a 28 b0 lwz r10,10416(r10) rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0e304: 39 00 00 00 li r8,0 #include #include #include #include int _Scheduler_CBS_Get_server_id ( ffc0e308: 39 4a ff fc addi r10,r10,-4 Scheduler_CBS_Server_id *server_id ) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( _Scheduler_CBS_Server_list[i] && ffc0e30c: 85 2a 00 04 lwzu r9,4(r10) ffc0e310: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e314: 41 9e 00 10 beq- cr7,ffc0e324 <_Scheduler_CBS_Get_server_id+0x3c> ffc0e318: 81 29 00 00 lwz r9,0(r9) ffc0e31c: 7f 89 18 00 cmpw cr7,r9,r3 ffc0e320: 41 9e 00 14 beq- cr7,ffc0e334 <_Scheduler_CBS_Get_server_id+0x4c> rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0e324: 39 08 00 01 addi r8,r8,1 ffc0e328: 42 00 ff e4 bdnz+ ffc0e30c <_Scheduler_CBS_Get_server_id+0x24> _Scheduler_CBS_Server_list[i]->task_id == task_id ) { *server_id = i; return SCHEDULER_CBS_OK; } } return SCHEDULER_CBS_ERROR_NOSERVER; ffc0e32c: 38 60 ff e7 li r3,-25 } ffc0e330: 4e 80 00 20 blr { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( _Scheduler_CBS_Server_list[i] && _Scheduler_CBS_Server_list[i]->task_id == task_id ) { *server_id = i; ffc0e334: 91 04 00 00 stw r8,0(r4) return SCHEDULER_CBS_OK; ffc0e338: 38 60 00 00 li r3,0 ffc0e33c: 4e 80 00 20 blr =============================================================================== ffc0e3c8 <_Scheduler_CBS_Initialize>: int _Scheduler_CBS_Initialize(void) { ffc0e3c8: 94 21 ff f0 stwu r1,-16(r1) ffc0e3cc: 7c 08 02 a6 mflr r0 ffc0e3d0: 93 e1 00 0c stw r31,12(r1) unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); ffc0e3d4: 3f e0 00 00 lis r31,0 ffc0e3d8: 80 7f 27 94 lwz r3,10132(r31) sched_info->cbs_server->cbs_budget_overrun( server_id ); } } int _Scheduler_CBS_Initialize(void) { ffc0e3dc: 90 01 00 14 stw r0,20(r1) unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( ffc0e3e0: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0e3e4: 48 00 21 bd bl ffc105a0 <_Workspace_Allocate> ffc0e3e8: 3d 00 00 00 lis r8,0 _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) ffc0e3ec: 2f 83 00 00 cmpwi cr7,r3,0 } int _Scheduler_CBS_Initialize(void) { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( ffc0e3f0: 90 68 28 b0 stw r3,10416(r8) _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) ffc0e3f4: 41 9e 00 4c beq- cr7,ffc0e440 <_Scheduler_CBS_Initialize+0x78><== NEVER TAKEN return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { ffc0e3f8: 81 5f 27 94 lwz r10,10132(r31) ffc0e3fc: 39 20 00 00 li r9,0 _Scheduler_CBS_Server_list[i] = NULL; ffc0e400: 38 e0 00 00 li r7,0 unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { ffc0e404: 2f 8a 00 00 cmpwi cr7,r10,0 _Scheduler_CBS_Server_list[i] = NULL; ffc0e408: 7d 49 03 a6 mtctr r10 unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { ffc0e40c: 40 be 00 0c bne+ cr7,ffc0e418 <_Scheduler_CBS_Initialize+0x50><== ALWAYS TAKEN ffc0e410: 48 00 00 18 b ffc0e428 <_Scheduler_CBS_Initialize+0x60><== NOT EXECUTED ffc0e414: 80 68 28 b0 lwz r3,10416(r8) _Scheduler_CBS_Server_list[i] = NULL; ffc0e418: 55 2a 10 3a rlwinm r10,r9,2,0,29 ffc0e41c: 7c e3 51 2e stwx r7,r3,r10 unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { ffc0e420: 39 29 00 01 addi r9,r9,1 ffc0e424: 42 00 ff f0 bdnz+ ffc0e414 <_Scheduler_CBS_Initialize+0x4c> _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; ffc0e428: 38 60 00 00 li r3,0 } ffc0e42c: 80 01 00 14 lwz r0,20(r1) ffc0e430: 83 e1 00 0c lwz r31,12(r1) ffc0e434: 7c 08 03 a6 mtlr r0 ffc0e438: 38 21 00 10 addi r1,r1,16 ffc0e43c: 4e 80 00 20 blr { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; ffc0e440: 38 60 ff ef li r3,-17 <== NOT EXECUTED ffc0e444: 4b ff ff e8 b ffc0e42c <_Scheduler_CBS_Initialize+0x64><== NOT EXECUTED =============================================================================== ffc0c928 <_Scheduler_CBS_Release_job>: Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; if (deadline) { ffc0c928: 2c 04 00 00 cmpwi r4,0 { Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; ffc0c92c: 81 23 00 88 lwz r9,136(r3) ) { Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = ffc0c930: 81 29 00 18 lwz r9,24(r9) (Scheduler_CBS_Server *) sched_info->cbs_server; if (deadline) { /* Initializing or shifting deadline. */ if (serv_info) ffc0c934: 2f 89 00 00 cmpwi cr7,r9,0 Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; if (deadline) { ffc0c938: 41 82 00 30 beq- ffc0c968 <_Scheduler_CBS_Release_job+0x40> /* Initializing or shifting deadline. */ if (serv_info) ffc0c93c: 41 9e 00 38 beq- cr7,ffc0c974 <_Scheduler_CBS_Release_job+0x4c> new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) ffc0c940: 3d 40 00 00 lis r10,0 ffc0c944: 80 8a 28 a4 lwz r4,10404(r10) ffc0c948: 81 49 00 04 lwz r10,4(r9) ffc0c94c: 7c 84 52 14 add r4,r4,r10 ffc0c950: 54 84 00 7e clrlwi r4,r4,1 new_priority = the_thread->Start.initial_priority; } /* Budget replenishment for the next job. */ if (serv_info) the_thread->cpu_time_budget = serv_info->parameters.budget; ffc0c954: 81 29 00 08 lwz r9,8(r9) ffc0c958: 91 23 00 74 stw r9,116(r3) the_thread->real_priority = new_priority; ffc0c95c: 90 83 00 18 stw r4,24(r3) _Thread_Change_priority(the_thread, new_priority, true); ffc0c960: 38 a0 00 01 li r5,1 ffc0c964: 48 00 05 8c b ffc0cef0 <_Thread_Change_priority> new_priority = (_Watchdog_Ticks_since_boot + deadline) & ~SCHEDULER_EDF_PRIO_MSB; } else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; ffc0c968: 80 83 00 ac lwz r4,172(r3) } /* Budget replenishment for the next job. */ if (serv_info) ffc0c96c: 40 9e ff e8 bne+ cr7,ffc0c954 <_Scheduler_CBS_Release_job+0x2c><== ALWAYS TAKEN ffc0c970: 4b ff ff ec b ffc0c95c <_Scheduler_CBS_Release_job+0x34><== NOT EXECUTED /* Initializing or shifting deadline. */ if (serv_info) new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) & ~SCHEDULER_EDF_PRIO_MSB; else new_priority = (_Watchdog_Ticks_since_boot + deadline) ffc0c974: 3d 20 00 00 lis r9,0 ffc0c978: 81 29 28 a4 lwz r9,10404(r9) ffc0c97c: 7c 84 4a 14 add r4,r4,r9 ffc0c980: 54 84 00 7e clrlwi r4,r4,1 ffc0c984: 4b ff ff d8 b ffc0c95c <_Scheduler_CBS_Release_job+0x34> =============================================================================== ffc0c988 <_Scheduler_CBS_Unblock>: #include void _Scheduler_CBS_Unblock( Thread_Control *the_thread ) { ffc0c988: 94 21 ff f0 stwu r1,-16(r1) ffc0c98c: 7c 08 02 a6 mflr r0 ffc0c990: 93 e1 00 0c stw r31,12(r1) ffc0c994: 7c 7f 1b 78 mr r31,r3 ffc0c998: 90 01 00 14 stw r0,20(r1) ffc0c99c: 93 c1 00 08 stw r30,8(r1) Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server *serv_info; Priority_Control new_priority; _Scheduler_EDF_Enqueue(the_thread); ffc0c9a0: 48 00 01 6d bl ffc0cb0c <_Scheduler_EDF_Enqueue> /* TODO: flash critical section? */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; ffc0c9a4: 81 3f 00 88 lwz r9,136(r31) ffc0c9a8: 81 29 00 18 lwz r9,24(r9) * Late unblock rule for deadline-driven tasks. The remaining time to * deadline must be sufficient to serve the remaining computation time * without increased utilization of this task. It might cause a deadline * miss of another task. */ if (serv_info) { ffc0c9ac: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c9b0: 41 9e 00 58 beq- cr7,ffc0ca08 <_Scheduler_CBS_Unblock+0x80> time_t deadline = serv_info->parameters.deadline; time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - ffc0c9b4: 3d 00 00 00 lis r8,0 ffc0c9b8: 81 5f 00 18 lwz r10,24(r31) ffc0c9bc: 81 08 28 a4 lwz r8,10404(r8) _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { ffc0c9c0: 80 c9 00 04 lwz r6,4(r9) ffc0c9c4: 80 e9 00 08 lwz r7,8(r9) */ if (serv_info) { time_t deadline = serv_info->parameters.deadline; time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - ffc0c9c8: 7d 08 50 50 subf r8,r8,r10 _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { ffc0c9cc: 81 3f 00 74 lwz r9,116(r31) ffc0c9d0: 7d 08 31 d6 mullw r8,r8,r6 ffc0c9d4: 7d 27 49 d6 mullw r9,r7,r9 ffc0c9d8: 7f 88 48 00 cmpw cr7,r8,r9 ffc0c9dc: 40 9d 00 2c ble- cr7,ffc0ca08 <_Scheduler_CBS_Unblock+0x80> /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; ffc0c9e0: 80 9f 00 ac lwz r4,172(r31) if ( the_thread->real_priority != new_priority ) ffc0c9e4: 7f 8a 20 00 cmpw cr7,r10,r4 ffc0c9e8: 41 9e 00 08 beq- cr7,ffc0c9f0 <_Scheduler_CBS_Unblock+0x68> the_thread->real_priority = new_priority; ffc0c9ec: 90 9f 00 18 stw r4,24(r31) if ( the_thread->current_priority != new_priority ) ffc0c9f0: 80 7f 00 14 lwz r3,20(r31) ffc0c9f4: 7f 83 20 00 cmpw cr7,r3,r4 ffc0c9f8: 41 9e 00 14 beq- cr7,ffc0ca0c <_Scheduler_CBS_Unblock+0x84> _Thread_Change_priority(the_thread, new_priority, true); ffc0c9fc: 7f e3 fb 78 mr r3,r31 ffc0ca00: 38 a0 00 01 li r5,1 ffc0ca04: 48 00 04 ed bl ffc0cef0 <_Thread_Change_priority> ffc0ca08: 80 7f 00 14 lwz r3,20(r31) * 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 ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, ffc0ca0c: 3f c0 00 00 lis r30,0 ffc0ca10: 3b de 2e 80 addi r30,r30,11904 ffc0ca14: 3d 40 00 00 lis r10,0 ffc0ca18: 81 3e 00 14 lwz r9,20(r30) ffc0ca1c: 81 4a 20 b0 lwz r10,8368(r10) ffc0ca20: 80 89 00 14 lwz r4,20(r9) ffc0ca24: 7d 49 03 a6 mtctr r10 ffc0ca28: 4e 80 04 21 bctrl ffc0ca2c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ca30: 40 9d 00 20 ble- cr7,ffc0ca50 <_Scheduler_CBS_Unblock+0xc8> _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0ca34: 81 3e 00 10 lwz r9,16(r30) * 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 ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; ffc0ca38: 93 fe 00 14 stw r31,20(r30) if ( _Thread_Executing->is_preemptible || ffc0ca3c: 89 29 00 70 lbz r9,112(r9) ffc0ca40: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ca44: 41 9e 00 24 beq- cr7,ffc0ca68 <_Scheduler_CBS_Unblock+0xe0> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; ffc0ca48: 39 20 00 01 li r9,1 ffc0ca4c: 99 3e 00 0c stb r9,12(r30) } } ffc0ca50: 80 01 00 14 lwz r0,20(r1) ffc0ca54: 83 c1 00 08 lwz r30,8(r1) ffc0ca58: 7c 08 03 a6 mtlr r0 ffc0ca5c: 83 e1 00 0c lwz r31,12(r1) ffc0ca60: 38 21 00 10 addi r1,r1,16 ffc0ca64: 4e 80 00 20 blr * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0ca68: 81 3f 00 14 lwz r9,20(r31) ffc0ca6c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ca70: 41 9e ff d8 beq+ cr7,ffc0ca48 <_Scheduler_CBS_Unblock+0xc0><== NEVER TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } ffc0ca74: 80 01 00 14 lwz r0,20(r1) ffc0ca78: 83 c1 00 08 lwz r30,8(r1) ffc0ca7c: 7c 08 03 a6 mtlr r0 ffc0ca80: 83 e1 00 0c lwz r31,12(r1) ffc0ca84: 38 21 00 10 addi r1,r1,16 ffc0ca88: 4e 80 00 20 blr =============================================================================== ffc0c8d8 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { ffc0c8d8: 94 21 ff f0 stwu r1,-16(r1) ffc0c8dc: 7c 08 02 a6 mflr r0 ffc0c8e0: 93 e1 00 0c stw r31,12(r1) ffc0c8e4: 7c 7f 1b 78 mr r31,r3 void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); ffc0c8e8: 38 60 00 18 li r3,24 #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { ffc0c8ec: 90 01 00 14 stw r0,20(r1) void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); ffc0c8f0: 48 00 21 b1 bl ffc0eaa0 <_Workspace_Allocate> if ( sched ) { ffc0c8f4: 2c 03 00 00 cmpwi r3,0 ffc0c8f8: 41 82 00 14 beq- ffc0c90c <_Scheduler_EDF_Allocate+0x34><== NEVER TAKEN the_thread->scheduler_info = sched; schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; ffc0c8fc: 39 40 00 02 li r10,2 Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); if ( sched ) { the_thread->scheduler_info = sched; ffc0c900: 90 7f 00 88 stw r3,136(r31) schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; ffc0c904: 93 e3 00 00 stw r31,0(r3) schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; ffc0c908: 91 43 00 14 stw r10,20(r3) } return sched; } ffc0c90c: 80 01 00 14 lwz r0,20(r1) ffc0c910: 83 e1 00 0c lwz r31,12(r1) ffc0c914: 7c 08 03 a6 mtlr r0 ffc0c918: 38 21 00 10 addi r1,r1,16 ffc0c91c: 4e 80 00 20 blr =============================================================================== ffc0cb28 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { ffc0cb28: 94 21 ff f0 stwu r1,-16(r1) ffc0cb2c: 7c 08 02 a6 mflr r0 ffc0cb30: 93 e1 00 0c stw r31,12(r1) * 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 ( _Scheduler_Is_priority_lower_than( ffc0cb34: 3f e0 00 00 lis r31,0 ffc0cb38: 3b ff 2e 80 addi r31,r31,11904 #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { ffc0cb3c: 90 01 00 14 stw r0,20(r1) ffc0cb40: 93 c1 00 08 stw r30,8(r1) ffc0cb44: 7c 7e 1b 78 mr r30,r3 _Scheduler_EDF_Enqueue(the_thread); ffc0cb48: 4b ff fe 59 bl ffc0c9a0 <_Scheduler_EDF_Enqueue> ffc0cb4c: 3d 20 00 00 lis r9,0 * 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 ( _Scheduler_Is_priority_lower_than( ffc0cb50: 81 5f 00 14 lwz r10,20(r31) ffc0cb54: 81 29 20 b0 lwz r9,8368(r9) ffc0cb58: 80 6a 00 14 lwz r3,20(r10) ffc0cb5c: 80 9e 00 14 lwz r4,20(r30) ffc0cb60: 7d 29 03 a6 mtctr r9 ffc0cb64: 4e 80 04 21 bctrl ffc0cb68: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cb6c: 41 9c 00 1c blt- cr7,ffc0cb88 <_Scheduler_EDF_Unblock+0x60> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } ffc0cb70: 80 01 00 14 lwz r0,20(r1) ffc0cb74: 83 c1 00 08 lwz r30,8(r1) ffc0cb78: 7c 08 03 a6 mtlr r0 ffc0cb7c: 83 e1 00 0c lwz r31,12(r1) ffc0cb80: 38 21 00 10 addi r1,r1,16 ffc0cb84: 4e 80 00 20 blr */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0cb88: 81 3f 00 10 lwz r9,16(r31) * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; ffc0cb8c: 93 df 00 14 stw r30,20(r31) if ( _Thread_Executing->is_preemptible || ffc0cb90: 89 29 00 70 lbz r9,112(r9) ffc0cb94: 2f 89 00 00 cmpwi cr7,r9,0 ffc0cb98: 41 9e 00 24 beq- cr7,ffc0cbbc <_Scheduler_EDF_Unblock+0x94> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; ffc0cb9c: 39 20 00 01 li r9,1 ffc0cba0: 99 3f 00 0c stb r9,12(r31) } } ffc0cba4: 80 01 00 14 lwz r0,20(r1) ffc0cba8: 83 c1 00 08 lwz r30,8(r1) ffc0cbac: 7c 08 03 a6 mtlr r0 ffc0cbb0: 83 e1 00 0c lwz r31,12(r1) ffc0cbb4: 38 21 00 10 addi r1,r1,16 ffc0cbb8: 4e 80 00 20 blr */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0cbbc: 81 3e 00 14 lwz r9,20(r30) ffc0cbc0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0cbc4: 40 be ff ac bne- cr7,ffc0cb70 <_Scheduler_EDF_Unblock+0x48><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; ffc0cbc8: 39 20 00 01 li r9,1 <== NOT EXECUTED ffc0cbcc: 99 3f 00 0c stb r9,12(r31) <== NOT EXECUTED ffc0cbd0: 4b ff ff d4 b ffc0cba4 <_Scheduler_EDF_Unblock+0x7c> <== NOT EXECUTED =============================================================================== ffc0bdbc <_Scheduler_priority_Block>: ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; ffc0bdbc: 81 43 00 88 lwz r10,136(r3) ready = sched_info->ready_chain; ffc0bdc0: 81 2a 00 00 lwz r9,0(r10) if ( _Chain_Has_only_one_node( ready ) ) { ffc0bdc4: 80 e9 00 00 lwz r7,0(r9) ffc0bdc8: 81 09 00 08 lwz r8,8(r9) ffc0bdcc: 7f 87 40 00 cmpw cr7,r7,r8 ffc0bdd0: 41 9e 00 40 beq- cr7,ffc0be10 <_Scheduler_priority_Block+0x54> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0bdd4: 81 23 00 00 lwz r9,0(r3) previous = the_node->previous; ffc0bdd8: 81 43 00 04 lwz r10,4(r3) next->previous = previous; ffc0bddc: 91 49 00 04 stw r10,4(r9) previous->next = next; ffc0bde0: 91 2a 00 00 stw r9,0(r10) RTEMS_INLINE_ROUTINE bool _Thread_Is_heir ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Heir ); ffc0bde4: 3d 20 00 00 lis r9,0 ffc0bde8: 39 29 2e 00 addi r9,r9,11776 { _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) ffc0bdec: 81 49 00 14 lwz r10,20(r9) ffc0bdf0: 7f 83 50 00 cmpw cr7,r3,r10 ffc0bdf4: 41 9e 00 64 beq- cr7,ffc0be58 <_Scheduler_priority_Block+0x9c> _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) ffc0bdf8: 81 49 00 10 lwz r10,16(r9) ffc0bdfc: 7f 83 50 00 cmpw cr7,r3,r10 ffc0be00: 4c be 00 20 bnelr+ cr7 _Thread_Dispatch_necessary = true; ffc0be04: 39 40 00 01 li r10,1 ffc0be08: 99 49 00 0c stb r10,12(r9) ffc0be0c: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0be10: 81 0a 00 04 lwz r8,4(r10) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc0be14: 38 a9 00 04 addi r5,r9,4 ffc0be18: 80 ea 00 14 lwz r7,20(r10) ffc0be1c: 80 c8 00 00 lwz r6,0(r8) head->next = tail; ffc0be20: 90 a9 00 00 stw r5,0(r9) ffc0be24: 7c c7 38 38 and r7,r6,r7 if ( *the_priority_map->minor == 0 ) ffc0be28: 2f 87 00 00 cmpwi cr7,r7,0 head->previous = NULL; tail->previous = head; ffc0be2c: 91 29 00 08 stw r9,8(r9) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; ffc0be30: 38 c0 00 00 li r6,0 ffc0be34: 90 c9 00 04 stw r6,4(r9) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0be38: 90 e8 00 00 stw r7,0(r8) if ( *the_priority_map->minor == 0 ) ffc0be3c: 40 be ff a8 bne- cr7,ffc0bde4 <_Scheduler_priority_Block+0x28> _Priority_Major_bit_map &= the_priority_map->block_major; ffc0be40: 3d 20 00 00 lis r9,0 ffc0be44: 81 4a 00 10 lwz r10,16(r10) ffc0be48: 81 09 28 50 lwz r8,10320(r9) ffc0be4c: 7d 0a 50 38 and r10,r8,r10 ffc0be50: 91 49 28 50 stw r10,10320(r9) ffc0be54: 4b ff ff 90 b ffc0bde4 <_Scheduler_priority_Block+0x28> RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0be58: 3d 60 00 00 lis r11,0 * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( (Chain_Control *) _Scheduler.information ffc0be5c: 3d 40 00 00 lis r10,0 ffc0be60: 81 0b 28 50 lwz r8,10320(r11) ffc0be64: 80 ea 20 80 lwz r7,8320(r10) ffc0be68: 7d 04 00 34 cntlzw r4,r8 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0be6c: 3c a0 00 00 lis r5,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0be70: 91 0b 28 50 stw r8,10320(r11) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0be74: 38 a5 2e 40 addi r5,r5,11840 ffc0be78: 54 86 10 3a rlwinm r6,r4,2,0,29 ffc0be7c: 7d 45 30 2e lwzx r10,r5,r6 ffc0be80: 7d 48 00 34 cntlzw r8,r10 return (_Priority_Bits_index( major ) << 4) + ffc0be84: 54 84 20 36 rlwinm r4,r4,4,0,27 { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0be88: 7d 45 31 2e stwx r10,r5,r6 return (_Priority_Bits_index( major ) << 4) + ffc0be8c: 7d 04 42 14 add r8,r4,r8 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0be90: 1d 08 00 0c mulli r8,r8,12 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0be94: 7d 47 40 2e lwzx r10,r7,r8 ffc0be98: 7c c7 42 14 add r6,r7,r8 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0be9c: 39 06 00 04 addi r8,r6,4 ffc0bea0: 7f 8a 40 00 cmpw cr7,r10,r8 ffc0bea4: 41 9e 00 0c beq- cr7,ffc0beb0 <_Scheduler_priority_Block+0xf4><== NEVER TAKEN * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0bea8: 91 49 00 14 stw r10,20(r9) ffc0beac: 4b ff ff 4c b ffc0bdf8 <_Scheduler_priority_Block+0x3c> Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc0beb0: 39 40 00 00 li r10,0 <== NOT EXECUTED * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0beb4: 91 49 00 14 stw r10,20(r9) <== NOT EXECUTED ffc0beb8: 4b ff ff 40 b ffc0bdf8 <_Scheduler_priority_Block+0x3c><== NOT EXECUTED =============================================================================== ffc0c078 <_Scheduler_priority_Schedule>: RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0c078: 3c 80 00 00 lis r4,0 * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( (Chain_Control *) _Scheduler.information ffc0c07c: 3d 20 00 00 lis r9,0 ffc0c080: 81 44 28 50 lwz r10,10320(r4) ffc0c084: 81 09 20 80 lwz r8,8320(r9) ffc0c088: 7d 45 00 34 cntlzw r5,r10 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0c08c: 3c c0 00 00 lis r6,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0c090: 91 44 28 50 stw r10,10320(r4) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0c094: 38 c6 2e 40 addi r6,r6,11840 ffc0c098: 54 a7 10 3a rlwinm r7,r5,2,0,29 ffc0c09c: 7d 26 38 2e lwzx r9,r6,r7 ffc0c0a0: 7d 24 00 34 cntlzw r4,r9 return (_Priority_Bits_index( major ) << 4) + ffc0c0a4: 54 aa 20 36 rlwinm r10,r5,4,0,27 { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0c0a8: 7d 26 39 2e stwx r9,r6,r7 return (_Priority_Bits_index( major ) << 4) + ffc0c0ac: 7d 4a 22 14 add r10,r10,r4 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0c0b0: 1d 4a 00 0c mulli r10,r10,12 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0c0b4: 7d 28 50 2e lwzx r9,r8,r10 ffc0c0b8: 7c e8 52 14 add r7,r8,r10 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0c0bc: 39 47 00 04 addi r10,r7,4 ffc0c0c0: 7f 89 50 00 cmpw cr7,r9,r10 ffc0c0c4: 41 9e 00 10 beq- cr7,ffc0c0d4 <_Scheduler_priority_Schedule+0x5c><== NEVER TAKEN * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0c0c8: 3d 40 00 00 lis r10,0 ffc0c0cc: 91 2a 2e 14 stw r9,11796(r10) ffc0c0d0: 4e 80 00 20 blr Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc0c0d4: 39 20 00 00 li r9,0 <== NOT EXECUTED * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0c0d8: 3d 40 00 00 lis r10,0 <== NOT EXECUTED ffc0c0dc: 91 2a 2e 14 stw r9,11796(r10) <== NOT EXECUTED ffc0c0e0: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0ca68 <_Scheduler_simple_Ready_queue_enqueue_first>: { Chain_Control *ready; Chain_Node *the_node; Thread_Control *current; ready = (Chain_Control *)_Scheduler.information; ffc0ca68: 3d 20 00 00 lis r9,0 */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { ffc0ca6c: 81 03 00 14 lwz r8,20(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0ca70: 81 29 20 80 lwz r9,8320(r9) ffc0ca74: 81 29 00 00 lwz r9,0(r9) ffc0ca78: 81 49 00 14 lwz r10,20(r9) ffc0ca7c: 7f 8a 40 40 cmplw cr7,r10,r8 ffc0ca80: 40 9c 00 14 bge- cr7,ffc0ca94 <_Scheduler_simple_Ready_queue_enqueue_first+0x2c> * Do NOT need to check for end of chain because there is always * at least one task on the ready chain -- the IDLE task. It can * never block, should never attempt to obtain a semaphore or mutex, * and thus will always be there. */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { ffc0ca84: 81 29 00 00 lwz r9,0(r9) current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { ffc0ca88: 81 49 00 14 lwz r10,20(r9) ffc0ca8c: 7f 8a 40 40 cmplw cr7,r10,r8 ffc0ca90: 41 9c ff f4 blt+ cr7,ffc0ca84 <_Scheduler_simple_Ready_queue_enqueue_first+0x1c><== NEVER TAKEN current = (Thread_Control *)current->Object.Node.previous; ffc0ca94: 81 29 00 04 lwz r9,4(r9) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0ca98: 81 49 00 00 lwz r10,0(r9) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0ca9c: 91 23 00 04 stw r9,4(r3) before_node = after_node->next; after_node->next = the_node; ffc0caa0: 90 69 00 00 stw r3,0(r9) the_node->next = before_node; before_node->previous = the_node; ffc0caa4: 90 6a 00 04 stw r3,4(r10) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0caa8: 91 43 00 00 stw r10,0(r3) ffc0caac: 4e 80 00 20 blr =============================================================================== ffc0a960 <_TOD_Validate>: uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc0a960: 7c 69 1b 79 mr. r9,r3 { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); ffc0a964: 3d 40 ff c2 lis r10,-62 ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / ffc0a968: 81 4a fd 64 lwz r10,-668(r10) ffc0a96c: 3d 00 00 0f lis r8,15 ffc0a970: 61 08 42 40 ori r8,r8,16960 ffc0a974: 7c e8 53 96 divwu r7,r8,r10 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc0a978: 41 82 00 90 beq- ffc0aa08 <_TOD_Validate+0xa8> <== NEVER TAKEN ffc0a97c: 81 49 00 18 lwz r10,24(r9) (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) ) return false; ffc0a980: 38 60 00 00 li r3,0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc0a984: 7f 87 50 40 cmplw cr7,r7,r10 ffc0a988: 4c 9d 00 20 blelr cr7 (the_tod->ticks >= ticks_per_second) || ffc0a98c: 81 49 00 14 lwz r10,20(r9) ffc0a990: 2b 8a 00 3b cmplwi cr7,r10,59 ffc0a994: 4d 9d 00 20 bgtlr cr7 (the_tod->second >= TOD_SECONDS_PER_MINUTE) || ffc0a998: 81 49 00 10 lwz r10,16(r9) ffc0a99c: 2b 8a 00 3b cmplwi cr7,r10,59 ffc0a9a0: 4d 9d 00 20 bgtlr cr7 (the_tod->minute >= TOD_MINUTES_PER_HOUR) || ffc0a9a4: 81 49 00 0c lwz r10,12(r9) ffc0a9a8: 2b 8a 00 17 cmplwi cr7,r10,23 ffc0a9ac: 4d 9d 00 20 bgtlr cr7 (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || ffc0a9b0: 81 49 00 04 lwz r10,4(r9) rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || ffc0a9b4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0a9b8: 4d 9e 00 20 beqlr cr7 (the_tod->month == 0) || ffc0a9bc: 2b 8a 00 0c cmplwi cr7,r10,12 ffc0a9c0: 4d 9d 00 20 bgtlr cr7 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || ffc0a9c4: 81 09 00 00 lwz r8,0(r9) (the_tod->ticks >= ticks_per_second) || (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) || ffc0a9c8: 2b 88 07 c3 cmplwi cr7,r8,1987 ffc0a9cc: 4c 9d 00 20 blelr cr7 (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) ffc0a9d0: 81 29 00 08 lwz r9,8(r9) (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) || ffc0a9d4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a9d8: 4d 9e 00 20 beqlr cr7 (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) ffc0a9dc: 71 07 00 03 andi. r7,r8,3 ffc0a9e0: 40 82 00 30 bne- ffc0aa10 <_TOD_Validate+0xb0> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; ffc0a9e4: 39 4a 00 0d addi r10,r10,13 ffc0a9e8: 3d 00 ff c2 lis r8,-62 ffc0a9ec: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc0a9f0: 39 08 15 b0 addi r8,r8,5552 ffc0a9f4: 7c 68 50 2e lwzx r3,r8,r10 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; if ( the_tod->day > days_in_month ) ffc0a9f8: 7c 69 18 10 subfc r3,r9,r3 ffc0a9fc: 38 60 00 00 li r3,0 ffc0aa00: 7c 63 19 14 adde r3,r3,r3 ffc0aa04: 4e 80 00 20 blr (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) ) return false; ffc0aa08: 38 60 00 00 li r3,0 <== NOT EXECUTED if ( the_tod->day > days_in_month ) return false; return true; } ffc0aa0c: 4e 80 00 20 blr <== NOT EXECUTED return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; ffc0aa10: 3d 00 ff c2 lis r8,-62 ffc0aa14: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc0aa18: 39 08 15 b0 addi r8,r8,5552 ffc0aa1c: 7c 68 50 2e lwzx r3,r8,r10 ffc0aa20: 4b ff ff d8 b ffc0a9f8 <_TOD_Validate+0x98> =============================================================================== ffc0c390 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { ffc0c390: 94 21 ff e8 stwu r1,-24(r1) ffc0c394: 7c 08 02 a6 mflr r0 ffc0c398: 90 01 00 1c stw r0,28(r1) ffc0c39c: 93 e1 00 14 stw r31,20(r1) ffc0c3a0: 7c 7f 1b 78 mr r31,r3 ffc0c3a4: 93 81 00 08 stw r28,8(r1) ffc0c3a8: 7c bc 2b 78 mr r28,r5 ffc0c3ac: 93 a1 00 0c stw r29,12(r1) ffc0c3b0: 93 c1 00 10 stw r30,16(r1) ffc0c3b4: 7c 9e 23 78 mr r30,r4 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; ffc0c3b8: 83 a3 00 10 lwz r29,16(r3) /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); ffc0c3bc: 48 00 11 bd bl ffc0d578 <_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 ) ffc0c3c0: 81 3f 00 14 lwz r9,20(r31) ffc0c3c4: 7f 89 f0 00 cmpw cr7,r9,r30 ffc0c3c8: 41 9e 00 10 beq- cr7,ffc0c3d8 <_Thread_Change_priority+0x48> _Thread_Set_priority( the_thread, new_priority ); ffc0c3cc: 7f e3 fb 78 mr r3,r31 ffc0c3d0: 7f c4 f3 78 mr r4,r30 ffc0c3d4: 48 00 11 19 bl ffc0d4ec <_Thread_Set_priority> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0c3d8: 7f c0 00 a6 mfmsr r30 ffc0c3dc: 7d 30 42 a6 mfsprg r9,0 ffc0c3e0: 7f c9 48 78 andc r9,r30,r9 ffc0c3e4: 7d 20 01 24 mtmsr r9 /* * 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; ffc0c3e8: 81 3f 00 10 lwz r9,16(r31) if ( state != STATES_TRANSIENT ) { ffc0c3ec: 2f 89 00 04 cmpwi cr7,r9,4 ffc0c3f0: 41 9e 00 84 beq- cr7,ffc0c474 <_Thread_Change_priority+0xe4> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) ffc0c3f4: 73 a8 00 04 andi. r8,r29,4 ffc0c3f8: 41 82 00 38 beq- ffc0c430 <_Thread_Change_priority+0xa0><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c3fc: 7f c0 01 24 mtmsr r30 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); ffc0c400: 3d 40 00 03 lis r10,3 <== NOT EXECUTED ffc0c404: 61 4a be e0 ori r10,r10,48864 <== NOT EXECUTED the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0c408: 7d 28 50 39 and. r8,r9,r10 <== NOT EXECUTED ffc0c40c: 40 82 00 40 bne- ffc0c44c <_Thread_Change_priority+0xbc><== NOT EXECUTED if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0c410: 80 01 00 1c lwz r0,28(r1) ffc0c414: 83 81 00 08 lwz r28,8(r1) ffc0c418: 7c 08 03 a6 mtlr r0 ffc0c41c: 83 a1 00 0c lwz r29,12(r1) ffc0c420: 83 c1 00 10 lwz r30,16(r1) ffc0c424: 83 e1 00 14 lwz r31,20(r1) ffc0c428: 38 21 00 18 addi r1,r1,24 ffc0c42c: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); ffc0c430: 55 2a 07 b8 rlwinm r10,r9,0,30,28 */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc0c434: 91 5f 00 10 stw r10,16(r31) ffc0c438: 7f c0 01 24 mtmsr r30 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); ffc0c43c: 3d 40 00 03 lis r10,3 ffc0c440: 61 4a be e0 ori r10,r10,48864 _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0c444: 7d 28 50 39 and. r8,r9,r10 ffc0c448: 41 82 ff c8 beq+ ffc0c410 <_Thread_Change_priority+0x80> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0c44c: 80 01 00 1c lwz r0,28(r1) /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc0c450: 7f e4 fb 78 mr r4,r31 ffc0c454: 80 7f 00 44 lwz r3,68(r31) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0c458: 7c 08 03 a6 mtlr r0 ffc0c45c: 83 81 00 08 lwz r28,8(r1) ffc0c460: 83 a1 00 0c lwz r29,12(r1) ffc0c464: 83 c1 00 10 lwz r30,16(r1) ffc0c468: 83 e1 00 14 lwz r31,20(r1) ffc0c46c: 38 21 00 18 addi r1,r1,24 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc0c470: 48 00 0f 84 b ffc0d3f4 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { ffc0c474: 73 a9 00 04 andi. r9,r29,4 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); ffc0c478: 3f a0 00 00 lis r29,0 ffc0c47c: 3b bd 20 80 addi r29,r29,8320 ffc0c480: 40 82 00 20 bne- ffc0c4a0 <_Thread_Change_priority+0x110><== NEVER TAKEN * 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 ); if ( prepend_it ) ffc0c484: 2f 9c 00 00 cmpwi cr7,r28,0 * 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 ); ffc0c488: 91 3f 00 10 stw r9,16(r31) if ( prepend_it ) ffc0c48c: 41 9e 00 7c beq- cr7,ffc0c508 <_Thread_Change_priority+0x178> ffc0c490: 81 3d 00 28 lwz r9,40(r29) ffc0c494: 7f e3 fb 78 mr r3,r31 ffc0c498: 7d 29 03 a6 mtctr r9 ffc0c49c: 4e 80 04 21 bctrl static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0c4a0: 7d 20 00 a6 mfmsr r9 ffc0c4a4: 7f c0 01 24 mtmsr r30 ffc0c4a8: 7d 20 01 24 mtmsr r9 * This kernel routine implements the scheduling decision logic for * the scheduler. It does NOT dispatch. */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) { _Scheduler.Operations.schedule(); ffc0c4ac: 81 3d 00 08 lwz r9,8(r29) ffc0c4b0: 7d 29 03 a6 mtctr r9 ffc0c4b4: 4e 80 04 21 bctrl * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); ffc0c4b8: 3d 20 00 00 lis r9,0 ffc0c4bc: 39 29 2e 00 addi r9,r9,11776 ffc0c4c0: 81 49 00 10 lwz r10,16(r9) * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(); if ( !_Thread_Is_executing_also_the_heir() && ffc0c4c4: 81 09 00 14 lwz r8,20(r9) ffc0c4c8: 7f 8a 40 00 cmpw cr7,r10,r8 ffc0c4cc: 41 9e 00 18 beq- cr7,ffc0c4e4 <_Thread_Change_priority+0x154> ffc0c4d0: 89 4a 00 70 lbz r10,112(r10) ffc0c4d4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c4d8: 41 9e 00 0c beq- cr7,ffc0c4e4 <_Thread_Change_priority+0x154> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; ffc0c4dc: 39 40 00 01 li r10,1 ffc0c4e0: 99 49 00 0c stb r10,12(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c4e4: 7f c0 01 24 mtmsr r30 _ISR_Enable( level ); } ffc0c4e8: 80 01 00 1c lwz r0,28(r1) ffc0c4ec: 83 81 00 08 lwz r28,8(r1) ffc0c4f0: 7c 08 03 a6 mtlr r0 ffc0c4f4: 83 a1 00 0c lwz r29,12(r1) ffc0c4f8: 83 c1 00 10 lwz r30,16(r1) ffc0c4fc: 83 e1 00 14 lwz r31,20(r1) ffc0c500: 38 21 00 18 addi r1,r1,24 ffc0c504: 4e 80 00 20 blr */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); ffc0c508: 81 3d 00 24 lwz r9,36(r29) ffc0c50c: 7f e3 fb 78 mr r3,r31 ffc0c510: 7d 29 03 a6 mtctr r9 ffc0c514: 4e 80 04 21 bctrl ffc0c518: 4b ff ff 88 b ffc0c4a0 <_Thread_Change_priority+0x110> =============================================================================== ffc0c788 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c788: 94 21 ff e8 stwu r1,-24(r1) ffc0c78c: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c790: 38 81 00 08 addi r4,r1,8 void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c794: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c798: 48 00 02 a1 bl ffc0ca38 <_Thread_Get> switch ( location ) { ffc0c79c: 81 21 00 08 lwz r9,8(r1) ffc0c7a0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c7a4: 40 9e 00 20 bne- cr7,ffc0c7c4 <_Thread_Delay_ended+0x3c><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( ffc0c7a8: 3c 80 10 00 lis r4,4096 ffc0c7ac: 60 84 00 18 ori r4,r4,24 ffc0c7b0: 4b ff fd 6d bl ffc0c51c <_Thread_Clear_state> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc0c7b4: 3d 20 00 00 lis r9,0 ffc0c7b8: 81 49 28 24 lwz r10,10276(r9) --level; ffc0c7bc: 39 4a ff ff addi r10,r10,-1 _Thread_Dispatch_disable_level = level; ffc0c7c0: 91 49 28 24 stw r10,10276(r9) | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } ffc0c7c4: 80 01 00 1c lwz r0,28(r1) ffc0c7c8: 38 21 00 18 addi r1,r1,24 ffc0c7cc: 7c 08 03 a6 mtlr r0 ffc0c7d0: 4e 80 00 20 blr =============================================================================== ffc0c7d4 <_Thread_Dispatch>: #if defined(RTEMS_SMP) #include #endif void _Thread_Dispatch( void ) { ffc0c7d4: 94 21 ff b8 stwu r1,-72(r1) ffc0c7d8: 7c 08 02 a6 mflr r0 ffc0c7dc: 93 81 00 38 stw r28,56(r1) #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; ffc0c7e0: 3f 80 00 00 lis r28,0 ffc0c7e4: 3b 9c 2e 00 addi r28,r28,11776 #if defined(RTEMS_SMP) #include #endif void _Thread_Dispatch( void ) { ffc0c7e8: 93 e1 00 44 stw r31,68(r1) ffc0c7ec: 90 01 00 4c stw r0,76(r1) ffc0c7f0: 92 81 00 18 stw r20,24(r1) ffc0c7f4: 92 a1 00 1c stw r21,28(r1) ffc0c7f8: 92 c1 00 20 stw r22,32(r1) ffc0c7fc: 92 e1 00 24 stw r23,36(r1) ffc0c800: 93 01 00 28 stw r24,40(r1) ffc0c804: 93 21 00 2c stw r25,44(r1) ffc0c808: 93 41 00 30 stw r26,48(r1) ffc0c80c: 93 61 00 34 stw r27,52(r1) ffc0c810: 93 a1 00 3c stw r29,60(r1) ffc0c814: 93 c1 00 40 stw r30,64(r1) #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; ffc0c818: 83 fc 00 10 lwz r31,16(r28) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0c81c: 7d 20 00 a6 mfmsr r9 ffc0c820: 7d 50 42 a6 mfsprg r10,0 ffc0c824: 7d 2a 50 78 andc r10,r9,r10 ffc0c828: 7d 40 01 24 mtmsr r10 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc0c82c: 89 5c 00 0c lbz r10,12(r28) ffc0c830: 3f 60 00 00 lis r27,0 ffc0c834: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c838: 41 9e 01 58 beq- cr7,ffc0c990 <_Thread_Dispatch+0x1bc> heir = _Thread_Heir; ffc0c83c: 83 dc 00 14 lwz r30,20(r28) * This routine sets thread dispatch level to the * value passed in. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value) { _Thread_Dispatch_disable_level = value; ffc0c840: 39 40 00 01 li r10,1 ffc0c844: 3f 60 00 00 lis r27,0 /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) ffc0c848: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0c84c: 91 5b 28 24 stw r10,10276(r27) while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; ffc0c850: 39 40 00 00 li r10,0 _Thread_Executing = heir; ffc0c854: 93 dc 00 10 stw r30,16(r28) while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; ffc0c858: 99 5c 00 0c stb r10,12(r28) /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) ffc0c85c: 41 9e 01 34 beq- cr7,ffc0c990 <_Thread_Dispatch+0x1bc> ffc0c860: 3f 40 00 00 lis r26,0 ffc0c864: 3b 5a 22 08 addi r26,r26,8712 ffc0c868: 3f 00 00 00 lis r24,0 ffc0c86c: 3f 20 00 00 lis r25,0 ffc0c870: 3b 18 2b e8 addi r24,r24,11240 ffc0c874: 3b 39 28 2c addi r25,r25,10284 ffc0c878: 3b ba 00 04 addi r29,r26,4 #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; ffc0c87c: 3e a0 00 00 lis r21,0 ffc0c880: 3a c0 00 01 li r22,1 while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; ffc0c884: 3a e0 00 00 li r23,0 */ #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) ffc0c888: 81 5e 00 78 lwz r10,120(r30) ffc0c88c: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0c890: 41 9e 01 80 beq- cr7,ffc0ca10 <_Thread_Dispatch+0x23c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c894: 7d 20 01 24 mtmsr r9 */ static inline void _TOD_Get_uptime( Timestamp_Control *time ) { _TOD_Get_with_nanoseconds( time, &_TOD.uptime ); ffc0c898: 38 61 00 08 addi r3,r1,8 ffc0c89c: 7f 04 c3 78 mr r4,r24 ffc0c8a0: 4b ff e4 9d bl ffc0ad3c <_TOD_Get_with_nanoseconds> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c8a4: 80 b9 00 00 lwz r5,0(r25) const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; ffc0c8a8: 80 dc 00 20 lwz r6,32(r28) ffc0c8ac: 2f 85 00 00 cmpwi cr7,r5,0 ffc0c8b0: 80 fc 00 24 lwz r7,36(r28) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( ffc0c8b4: 81 41 00 08 lwz r10,8(r1) ffc0c8b8: 81 61 00 0c lwz r11,12(r1) static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; ffc0c8bc: 81 1f 00 80 lwz r8,128(r31) ffc0c8c0: 81 3f 00 84 lwz r9,132(r31) const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; ffc0c8c4: 7c e7 58 10 subfc r7,r7,r11 ffc0c8c8: 7c c6 51 10 subfe r6,r6,r10 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; ffc0c8cc: 7d 29 38 14 addc r9,r9,r7 ffc0c8d0: 7d 08 31 14 adde r8,r8,r6 ffc0c8d4: 91 1f 00 80 stw r8,128(r31) ffc0c8d8: 91 3f 00 84 stw r9,132(r31) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0c8dc: 91 5c 00 20 stw r10,32(r28) ffc0c8e0: 91 7c 00 24 stw r11,36(r28) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c8e4: 41 9e 00 14 beq- cr7,ffc0c8f8 <_Thread_Dispatch+0x124> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; ffc0c8e8: 81 25 00 00 lwz r9,0(r5) ffc0c8ec: 91 3f 01 44 stw r9,324(r31) *_Thread_libc_reent = heir->libc_reent; ffc0c8f0: 81 3e 01 44 lwz r9,324(r30) ffc0c8f4: 91 25 00 00 stw r9,0(r5) */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0c8f8: 82 9a 00 00 lwz r20,0(r26) { const Chain_Control *chain = &_User_extensions_Switches_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { ffc0c8fc: 7f 94 e8 00 cmpw cr7,r20,r29 ffc0c900: 41 9e 00 24 beq- cr7,ffc0c924 <_Thread_Dispatch+0x150> <== NEVER TAKEN const User_extensions_Switch_control *extension = (const User_extensions_Switch_control *) node; (*extension->thread_switch)( executing, heir ); ffc0c904: 81 34 00 08 lwz r9,8(r20) ffc0c908: 7f e3 fb 78 mr r3,r31 ffc0c90c: 7f c4 f3 78 mr r4,r30 ffc0c910: 7d 29 03 a6 mtctr r9 ffc0c914: 4e 80 04 21 bctrl #ifdef RTEMS_SMP _Thread_Unnest_dispatch(); #endif _API_extensions_Run_post_switch( executing ); } ffc0c918: 82 94 00 00 lwz r20,0(r20) { const Chain_Control *chain = &_User_extensions_Switches_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { ffc0c91c: 7f 94 e8 00 cmpw cr7,r20,r29 ffc0c920: 40 9e ff e4 bne+ cr7,ffc0c904 <_Thread_Dispatch+0x130> * operations. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE ) if ( executing->fp_context != NULL ) ffc0c924: 81 3f 01 40 lwz r9,320(r31) ffc0c928: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c92c: 41 9e 00 0c beq- cr7,ffc0c938 <_Thread_Dispatch+0x164> _Context_Save_fp( &executing->fp_context ); ffc0c930: 38 7f 01 40 addi r3,r31,320 ffc0c934: 48 00 ff 6d bl ffc1c8a0 <_CPU_Context_save_fp> #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); ffc0c938: 38 7f 00 c0 addi r3,r31,192 ffc0c93c: 38 9e 00 c0 addi r4,r30,192 ffc0c940: 48 01 00 e1 bl ffc1ca20 <_CPU_Context_switch> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); _Thread_Allocated_fp = executing; } #else if ( executing->fp_context != NULL ) ffc0c944: 81 3f 01 40 lwz r9,320(r31) ffc0c948: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c94c: 41 9e 00 0c beq- cr7,ffc0c958 <_Thread_Dispatch+0x184> _Context_Restore_fp( &executing->fp_context ); ffc0c950: 38 7f 01 40 addi r3,r31,320 ffc0c954: 48 01 00 0d bl ffc1c960 <_CPU_Context_restore_fp> #endif #endif executing = _Thread_Executing; ffc0c958: 83 fc 00 10 lwz r31,16(r28) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0c95c: 7d 20 00 a6 mfmsr r9 ffc0c960: 7d 50 42 a6 mfsprg r10,0 ffc0c964: 7d 2a 50 78 andc r10,r9,r10 ffc0c968: 7d 40 01 24 mtmsr r10 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc0c96c: 89 5c 00 0c lbz r10,12(r28) ffc0c970: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c974: 41 9e 00 1c beq- cr7,ffc0c990 <_Thread_Dispatch+0x1bc> heir = _Thread_Heir; ffc0c978: 83 dc 00 14 lwz r30,20(r28) ffc0c97c: 92 db 28 24 stw r22,10276(r27) /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) ffc0c980: 7f 9e f8 00 cmpw cr7,r30,r31 while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; ffc0c984: 9a fc 00 0c stb r23,12(r28) _Thread_Executing = heir; ffc0c988: 93 dc 00 10 stw r30,16(r28) /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) ffc0c98c: 40 9e fe fc bne+ cr7,ffc0c888 <_Thread_Dispatch+0xb4> <== ALWAYS TAKEN ffc0c990: 39 40 00 00 li r10,0 ffc0c994: 91 5b 28 24 stw r10,10276(r27) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c998: 7d 20 01 24 mtmsr r9 ffc0c99c: 3d 20 00 00 lis r9,0 ffc0c9a0: 3b a9 2d 10 addi r29,r9,11536 ffc0c9a4: 83 c9 2d 10 lwz r30,11536(r9) { const Chain_Control *chain = &_API_extensions_Post_switch_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { ffc0c9a8: 3b bd 00 04 addi r29,r29,4 ffc0c9ac: 7f 9e e8 00 cmpw cr7,r30,r29 ffc0c9b0: 41 9e 00 20 beq- cr7,ffc0c9d0 <_Thread_Dispatch+0x1fc> const API_extensions_Post_switch_control *post_switch = (const API_extensions_Post_switch_control *) node; (*post_switch->hook)( executing ); ffc0c9b4: 81 3e 00 08 lwz r9,8(r30) ffc0c9b8: 7f e3 fb 78 mr r3,r31 ffc0c9bc: 7d 29 03 a6 mtctr r9 ffc0c9c0: 4e 80 04 21 bctrl #ifdef RTEMS_SMP _Thread_Unnest_dispatch(); #endif _API_extensions_Run_post_switch( executing ); } ffc0c9c4: 83 de 00 00 lwz r30,0(r30) { const Chain_Control *chain = &_API_extensions_Post_switch_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { ffc0c9c8: 7f 9e e8 00 cmpw cr7,r30,r29 ffc0c9cc: 40 9e ff e8 bne+ cr7,ffc0c9b4 <_Thread_Dispatch+0x1e0> <== NEVER TAKEN ffc0c9d0: 80 01 00 4c lwz r0,76(r1) ffc0c9d4: 82 81 00 18 lwz r20,24(r1) ffc0c9d8: 7c 08 03 a6 mtlr r0 ffc0c9dc: 82 a1 00 1c lwz r21,28(r1) ffc0c9e0: 82 c1 00 20 lwz r22,32(r1) ffc0c9e4: 82 e1 00 24 lwz r23,36(r1) ffc0c9e8: 83 01 00 28 lwz r24,40(r1) ffc0c9ec: 83 21 00 2c lwz r25,44(r1) ffc0c9f0: 83 41 00 30 lwz r26,48(r1) ffc0c9f4: 83 61 00 34 lwz r27,52(r1) ffc0c9f8: 83 81 00 38 lwz r28,56(r1) ffc0c9fc: 83 a1 00 3c lwz r29,60(r1) ffc0ca00: 83 c1 00 40 lwz r30,64(r1) ffc0ca04: 83 e1 00 44 lwz r31,68(r1) ffc0ca08: 38 21 00 48 addi r1,r1,72 ffc0ca0c: 4e 80 00 20 blr #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; ffc0ca10: 81 55 28 20 lwz r10,10272(r21) ffc0ca14: 91 5e 00 74 stw r10,116(r30) ffc0ca18: 4b ff fe 7c b ffc0c894 <_Thread_Dispatch+0xc0> =============================================================================== ffc11e9c <_Thread_Handler>: #define INIT_NAME __main #define EXECUTE_GLOBAL_CONSTRUCTORS #endif void _Thread_Handler( void ) { ffc11e9c: 94 21 ff f0 stwu r1,-16(r1) ffc11ea0: 7c 08 02 a6 mflr r0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; ffc11ea4: 3d 20 00 00 lis r9,0 #define INIT_NAME __main #define EXECUTE_GLOBAL_CONSTRUCTORS #endif void _Thread_Handler( void ) { ffc11ea8: 90 01 00 14 stw r0,20(r1) ffc11eac: 93 e1 00 0c stw r31,12(r1) #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; ffc11eb0: 83 e9 2e 10 lwz r31,11792(r9) #define INIT_NAME __main #define EXECUTE_GLOBAL_CONSTRUCTORS #endif void _Thread_Handler( void ) { ffc11eb4: 93 c1 00 08 stw r30,8(r1) /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; ffc11eb8: 81 5f 00 a8 lwz r10,168(r31) } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc11ebc: 39 20 00 00 li r9,0 ffc11ec0: 7d 20 00 a6 mfmsr r9 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc11ec4: 71 48 00 01 andi. r8,r10,1 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; __asm__ volatile ( ffc11ec8: 7d 50 42 a6 mfsprg r10,0 ffc11ecc: 40 82 00 64 bne- ffc11f30 <_Thread_Handler+0x94> msr |= ppc_interrupt_get_disable_mask(); ffc11ed0: 7d 49 4b 78 or r9,r10,r9 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc11ed4: 7d 20 01 24 mtmsr r9 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; ffc11ed8: 3d 20 00 00 lis r9,0 ffc11edc: 8b c9 29 c8 lbz r30,10696(r9) ); } static inline void _User_extensions_Thread_begin( Thread_Control *executing ) { _User_extensions_Iterate( ffc11ee0: 3c 80 ff c1 lis r4,-63 doneConstructors = true; ffc11ee4: 39 40 00 01 li r10,1 ffc11ee8: 7f e3 fb 78 mr r3,r31 ffc11eec: 99 49 29 c8 stb r10,10696(r9) ffc11ef0: 38 84 d8 0c addi r4,r4,-10228 ffc11ef4: 4b ff b9 65 bl ffc0d858 <_User_extensions_Iterate> _User_extensions_Thread_begin( executing ); /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc11ef8: 4b ff ab 25 bl ffc0ca1c <_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 (doCons) /* && (volatile void *)_init) */ { ffc11efc: 2f 9e 00 00 cmpwi cr7,r30,0 ffc11f00: 41 9e 00 38 beq- cr7,ffc11f38 <_Thread_Handler+0x9c> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc11f04: 81 3f 00 90 lwz r9,144(r31) ffc11f08: 2f 89 00 00 cmpwi cr7,r9,0 ffc11f0c: 41 9e 00 34 beq- cr7,ffc11f40 <_Thread_Handler+0xa4> <== ALWAYS TAKEN } } static inline void _User_extensions_Thread_exitted( Thread_Control *executing ) { _User_extensions_Iterate( ffc11f10: 3c 80 ff c1 lis r4,-63 ffc11f14: 7f e3 fb 78 mr r3,r31 ffc11f18: 38 84 d8 20 addi r4,r4,-10208 ffc11f1c: 4b ff b9 3d bl ffc0d858 <_User_extensions_Iterate> * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); _Internal_error_Occurred( ffc11f20: 38 60 00 00 li r3,0 ffc11f24: 38 80 00 01 li r4,1 ffc11f28: 38 a0 00 05 li r5,5 ffc11f2c: 4b ff 93 ed bl ffc0b318 <_Internal_error_Occurred> _CPU_MSR_GET(msr); if (!(level & CPU_MODES_INTERRUPT_MASK)) { msr |= ppc_interrupt_get_disable_mask(); } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc11f30: 7d 29 50 78 andc r9,r9,r10 ffc11f34: 4b ff ff a0 b ffc11ed4 <_Thread_Handler+0x38> * _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 (doCons) /* && (volatile void *)_init) */ { INIT_NAME (); ffc11f38: 48 00 b5 a5 bl ffc1d4dc <_init> ffc11f3c: 4b ff ff c8 b ffc11f04 <_Thread_Handler+0x68> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( ffc11f40: 81 3f 00 8c lwz r9,140(r31) ffc11f44: 80 7f 00 98 lwz r3,152(r31) ffc11f48: 7d 29 03 a6 mtctr r9 ffc11f4c: 4e 80 04 21 bctrl #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = ffc11f50: 90 7f 00 28 stw r3,40(r31) ffc11f54: 4b ff ff bc b ffc11f10 <_Thread_Handler+0x74> =============================================================================== ffc0cd64 <_Thread_Handler_initialization>: #include #endif void _Thread_Handler_initialization(void) { uint32_t ticks_per_timeslice = ffc0cd64: 3d 20 ff c2 lis r9,-62 #if defined(RTEMS_SMP) #include #endif void _Thread_Handler_initialization(void) { ffc0cd68: 94 21 ff f0 stwu r1,-16(r1) uint32_t ticks_per_timeslice = ffc0cd6c: 39 29 d5 38 addi r9,r9,-10952 #if defined(RTEMS_SMP) #include #endif void _Thread_Handler_initialization(void) { ffc0cd70: 7c 08 02 a6 mflr r0 #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || ffc0cd74: 81 49 00 28 lwz r10,40(r9) #if defined(RTEMS_SMP) #include #endif void _Thread_Handler_initialization(void) { ffc0cd78: 93 c1 00 08 stw r30,8(r1) #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || ffc0cd7c: 2f 8a 00 00 cmpwi cr7,r10,0 #if defined(RTEMS_SMP) #include #endif void _Thread_Handler_initialization(void) { ffc0cd80: 93 e1 00 0c stw r31,12(r1) ffc0cd84: 90 01 00 14 stw r0,20(r1) uint32_t ticks_per_timeslice = ffc0cd88: 83 e9 00 14 lwz r31,20(r9) rtems_configuration_get_ticks_per_timeslice(); uint32_t maximum_extensions = ffc0cd8c: 83 c9 00 08 lwz r30,8(r9) rtems_configuration_get_maximum_extensions(); rtems_stack_allocate_init_hook stack_allocate_init_hook = ffc0cd90: 81 49 00 24 lwz r10,36(r9) #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || ffc0cd94: 41 9e 00 90 beq- cr7,ffc0ce24 <_Thread_Handler_initialization+0xc0><== NEVER TAKEN ffc0cd98: 81 09 00 2c lwz r8,44(r9) ffc0cd9c: 2f 88 00 00 cmpwi cr7,r8,0 ffc0cda0: 41 9e 00 84 beq- cr7,ffc0ce24 <_Thread_Handler_initialization+0xc0> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); if ( stack_allocate_init_hook != NULL ) ffc0cda4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0cda8: 41 9e 00 10 beq- cr7,ffc0cdb8 <_Thread_Handler_initialization+0x54> (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); ffc0cdac: 80 69 00 04 lwz r3,4(r9) ffc0cdb0: 7d 49 03 a6 mtctr r10 ffc0cdb4: 4e 80 04 21 bctrl _Thread_Dispatch_necessary = false; ffc0cdb8: 3d 60 00 00 lis r11,0 ffc0cdbc: 39 6b 2e 00 addi r11,r11,11776 ffc0cdc0: 38 00 00 00 li r0,0 ffc0cdc4: 98 0b 00 0c stb r0,12(r11) _Thread_Executing = NULL; ffc0cdc8: 39 40 00 00 li r10,0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0cdcc: 3c 60 00 00 lis r3,0 false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc0cdd0: 80 01 00 14 lwz r0,20(r1) #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0cdd4: 38 63 2d 74 addi r3,r3,11636 if ( stack_allocate_init_hook != NULL ) (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); _Thread_Dispatch_necessary = false; _Thread_Executing = NULL; ffc0cdd8: 91 4b 00 10 stw r10,16(r11) #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0cddc: 38 80 00 01 li r4,1 false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc0cde0: 7c 08 03 a6 mtlr r0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0cde4: 38 a0 00 01 li r5,1 if ( stack_allocate_init_hook != NULL ) (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); _Thread_Dispatch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; ffc0cde8: 91 4b 00 14 stw r10,20(r11) #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; ffc0cdec: 3d 60 00 00 lis r11,0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0cdf0: 38 c0 00 01 li r6,1 _Thread_Dispatch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; ffc0cdf4: 91 4b 28 28 stw r10,10280(r11) #endif _Thread_Maximum_extensions = maximum_extensions; ffc0cdf8: 3d 40 00 00 lis r10,0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0cdfc: 38 e0 01 58 li r7,344 _Thread_Heir = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Maximum_extensions = maximum_extensions; ffc0ce00: 93 ca 28 30 stw r30,10288(r10) _Thread_Ticks_per_timeslice = ticks_per_timeslice; ffc0ce04: 3d 40 00 00 lis r10,0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0ce08: 39 00 00 00 li r8,0 false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc0ce0c: 83 c1 00 08 lwz r30,8(r1) #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0ce10: 39 20 00 08 li r9,8 _Thread_Allocated_fp = NULL; #endif _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; ffc0ce14: 93 ea 28 20 stw r31,10272(r10) false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc0ce18: 83 e1 00 0c lwz r31,12(r1) ffc0ce1c: 38 21 00 10 addi r1,r1,16 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0ce20: 4b ff eb f0 b ffc0ba10 <_Objects_Initialize_information> _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || rtems_configuration_get_stack_free_hook() == NULL) _Internal_error_Occurred( ffc0ce24: 38 60 00 00 li r3,0 ffc0ce28: 38 80 00 01 li r4,1 ffc0ce2c: 38 a0 00 0e li r5,14 ffc0ce30: 4b ff e4 e9 bl ffc0b318 <_Internal_error_Occurred> =============================================================================== ffc0cad0 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0cad0: 94 21 ff c0 stwu r1,-64(r1) ffc0cad4: 7c 08 02 a6 mflr r0 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0cad8: 38 a0 00 00 li r5,0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0cadc: 90 01 00 44 stw r0,68(r1) ffc0cae0: 93 01 00 20 stw r24,32(r1) ffc0cae4: 7c f8 3b 78 mr r24,r7 ffc0cae8: 93 21 00 24 stw r25,36(r1) ffc0caec: 7d 59 53 78 mr r25,r10 ffc0caf0: 93 41 00 28 stw r26,40(r1) ffc0caf4: 93 61 00 2c stw r27,44(r1) ffc0caf8: 7c 7b 1b 78 mr r27,r3 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0cafc: 7c 83 23 78 mr r3,r4 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0cb00: 93 81 00 30 stw r28,48(r1) ffc0cb04: 7d 3c 4b 78 mr r28,r9 ffc0cb08: 93 a1 00 34 stw r29,52(r1) ffc0cb0c: 7d 1d 43 78 mr r29,r8 ffc0cb10: 93 c1 00 38 stw r30,56(r1) ffc0cb14: 7c de 33 78 mr r30,r6 ffc0cb18: 93 e1 00 3c stw r31,60(r1) ffc0cb1c: 7c 9f 23 78 mr r31,r4 ffc0cb20: 80 c1 00 50 lwz r6,80(r1) ffc0cb24: 92 e1 00 1c stw r23,28(r1) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0cb28: 90 a4 01 48 stw r5,328(r4) ffc0cb2c: 90 a4 01 4c stw r5,332(r4) extensions_area = NULL; the_thread->libc_reent = NULL; ffc0cb30: 90 a4 01 44 stw r5,324(r4) /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0cb34: 7f c4 f3 78 mr r4,r30 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0cb38: 83 46 00 00 lwz r26,0(r6) /* * 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 ); ffc0cb3c: 48 00 0a 99 bl ffc0d5d4 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0cb40: 7c 66 1b 79 mr. r6,r3 ffc0cb44: 41 82 01 74 beq- ffc0ccb8 <_Thread_Initialize+0x1e8> ffc0cb48: 7f 9e 30 40 cmplw cr7,r30,r6 return false; /* stack allocation failed */ ffc0cb4c: 38 60 00 00 li r3,0 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0cb50: 41 9d 01 34 bgt- cr7,ffc0cc84 <_Thread_Initialize+0x1b4><== NEVER TAKEN /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0cb54: 2f 98 00 00 cmpwi cr7,r24,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0cb58: 81 3f 00 bc lwz r9,188(r31) the_stack->size = size; ffc0cb5c: 90 df 00 b0 stw r6,176(r31) extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; ffc0cb60: 3b c0 00 00 li r30,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0cb64: 91 3f 00 b4 stw r9,180(r31) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0cb68: 40 9e 01 88 bne- cr7,ffc0ccf0 <_Thread_Initialize+0x220> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0cb6c: 3e e0 00 00 lis r23,0 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; ffc0cb70: 93 df 01 40 stw r30,320(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0cb74: 39 20 00 00 li r9,0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0cb78: 81 57 28 30 lwz r10,10288(r23) if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; ffc0cb7c: 93 df 00 b8 stw r30,184(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0cb80: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0cb84: 91 3f 00 50 stw r9,80(r31) the_watchdog->routine = routine; ffc0cb88: 91 3f 00 64 stw r9,100(r31) the_watchdog->id = id; ffc0cb8c: 91 3f 00 68 stw r9,104(r31) the_watchdog->user_data = user_data; ffc0cb90: 91 3f 00 6c stw r9,108(r31) ffc0cb94: 40 9e 01 78 bne- cr7,ffc0cd0c <_Thread_Initialize+0x23c> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0cb98: 91 5f 01 50 stw r10,336(r31) * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0cb9c: 3b 00 00 00 li r24,0 } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; ffc0cba0: 39 20 00 00 li r9,0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0cba4: 81 41 00 48 lwz r10,72(r1) } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; ffc0cba8: 91 3f 00 44 stw r9,68(r31) #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; ffc0cbac: 3a e0 00 01 li r23,1 */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); ffc0cbb0: 7f e3 fb 78 mr r3,r31 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; ffc0cbb4: 91 3f 00 1c stw r9,28(r31) ffc0cbb8: 3d 20 00 00 lis r9,0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0cbbc: 91 5f 00 a4 stw r10,164(r31) ffc0cbc0: 81 29 20 98 lwz r9,8344(r9) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0cbc4: 81 41 00 4c lwz r10,76(r1) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; ffc0cbc8: 9b 9f 00 9c stb r28,156(r31) ffc0cbcc: 7d 29 03 a6 mtctr r9 the_thread->Start.budget_algorithm = budget_algorithm; ffc0cbd0: 93 3f 00 a0 stw r25,160(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0cbd4: 91 5f 00 a8 stw r10,168(r31) the_thread->current_state = STATES_DORMANT; ffc0cbd8: 92 ff 00 10 stw r23,16(r31) the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; ffc0cbdc: 93 bf 00 18 stw r29,24(r31) the_thread->Start.initial_priority = priority; ffc0cbe0: 93 bf 00 ac stw r29,172(r31) ffc0cbe4: 4e 80 04 21 bctrl sched =_Scheduler_Allocate( the_thread ); if ( !sched ) ffc0cbe8: 7c 7c 1b 79 mr. r28,r3 ffc0cbec: 41 82 00 5c beq- ffc0cc48 <_Thread_Initialize+0x178> goto failed; _Thread_Set_priority( the_thread, priority ); ffc0cbf0: 7f e3 fb 78 mr r3,r31 ffc0cbf4: 7f a4 eb 78 mr r4,r29 ffc0cbf8: 48 00 08 f5 bl ffc0d4ec <_Thread_Set_priority> Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( ffc0cbfc: a1 3f 00 0a lhz r9,10(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0cc00: 81 1b 00 1c lwz r8,28(r27) static inline void _Timestamp64_implementation_Set_to_zero( Timestamp64_Control *_time ) { *_time = 0; ffc0cc04: 39 40 00 00 li r10,0 ffc0cc08: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0cc0c: 91 5f 00 80 stw r10,128(r31) ffc0cc10: 39 60 00 00 li r11,0 ffc0cc14: 91 7f 00 84 stw r11,132(r31) static inline bool _User_extensions_Thread_create( Thread_Control *created ) { User_extensions_Thread_create_context ctx = { created, true }; _User_extensions_Iterate( &ctx, _User_extensions_Thread_create_visitor ); ffc0cc18: 3c 80 ff c1 lis r4,-63 ffc0cc1c: 38 61 00 08 addi r3,r1,8 ffc0cc20: 7f e8 49 2e stwx r31,r8,r9 ffc0cc24: 38 84 d7 60 addi r4,r4,-10400 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0cc28: 93 5f 00 0c stw r26,12(r31) * @{ */ static inline bool _User_extensions_Thread_create( Thread_Control *created ) { User_extensions_Thread_create_context ctx = { created, true }; ffc0cc2c: 93 e1 00 08 stw r31,8(r1) ffc0cc30: 9a e1 00 0c stb r23,12(r1) _User_extensions_Iterate( &ctx, _User_extensions_Thread_create_visitor ); ffc0cc34: 48 00 0c 25 bl ffc0d858 <_User_extensions_Iterate> * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; ffc0cc38: 38 60 00 01 li r3,1 return ctx.ok; ffc0cc3c: 89 21 00 0c lbz r9,12(r1) * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) ffc0cc40: 2f 89 00 00 cmpwi cr7,r9,0 ffc0cc44: 40 9e 00 40 bne- cr7,ffc0cc84 <_Thread_Initialize+0x1b4> return true; failed: _Workspace_Free( the_thread->libc_reent ); ffc0cc48: 80 7f 01 44 lwz r3,324(r31) ffc0cc4c: 48 00 12 85 bl ffc0ded0 <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); ffc0cc50: 80 7f 01 48 lwz r3,328(r31) ffc0cc54: 48 00 12 7d bl ffc0ded0 <_Workspace_Free> ffc0cc58: 80 7f 01 4c lwz r3,332(r31) ffc0cc5c: 48 00 12 75 bl ffc0ded0 <_Workspace_Free> _Workspace_Free( extensions_area ); ffc0cc60: 7f 03 c3 78 mr r3,r24 ffc0cc64: 48 00 12 6d bl ffc0ded0 <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); ffc0cc68: 7f c3 f3 78 mr r3,r30 ffc0cc6c: 48 00 12 65 bl ffc0ded0 <_Workspace_Free> #endif _Workspace_Free( sched ); ffc0cc70: 7f 83 e3 78 mr r3,r28 ffc0cc74: 48 00 12 5d bl ffc0ded0 <_Workspace_Free> _Thread_Stack_Free( the_thread ); ffc0cc78: 7f e3 fb 78 mr r3,r31 ffc0cc7c: 48 00 09 e9 bl ffc0d664 <_Thread_Stack_Free> return false; ffc0cc80: 38 60 00 00 li r3,0 } ffc0cc84: 80 01 00 44 lwz r0,68(r1) ffc0cc88: 82 e1 00 1c lwz r23,28(r1) ffc0cc8c: 7c 08 03 a6 mtlr r0 ffc0cc90: 83 01 00 20 lwz r24,32(r1) ffc0cc94: 83 21 00 24 lwz r25,36(r1) ffc0cc98: 83 41 00 28 lwz r26,40(r1) ffc0cc9c: 83 61 00 2c lwz r27,44(r1) ffc0cca0: 83 81 00 30 lwz r28,48(r1) ffc0cca4: 83 a1 00 34 lwz r29,52(r1) ffc0cca8: 83 c1 00 38 lwz r30,56(r1) ffc0ccac: 83 e1 00 3c lwz r31,60(r1) ffc0ccb0: 38 21 00 40 addi r1,r1,64 ffc0ccb4: 4e 80 00 20 blr ffc0ccb8: 80 01 00 44 lwz r0,68(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 ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ ffc0ccbc: 38 60 00 00 li r3,0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } ffc0ccc0: 82 e1 00 1c lwz r23,28(r1) ffc0ccc4: 7c 08 03 a6 mtlr r0 ffc0ccc8: 83 01 00 20 lwz r24,32(r1) ffc0cccc: 83 21 00 24 lwz r25,36(r1) ffc0ccd0: 83 41 00 28 lwz r26,40(r1) ffc0ccd4: 83 61 00 2c lwz r27,44(r1) ffc0ccd8: 83 81 00 30 lwz r28,48(r1) ffc0ccdc: 83 a1 00 34 lwz r29,52(r1) ffc0cce0: 83 c1 00 38 lwz r30,56(r1) ffc0cce4: 83 e1 00 3c lwz r31,60(r1) ffc0cce8: 38 21 00 40 addi r1,r1,64 ffc0ccec: 4e 80 00 20 blr /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); ffc0ccf0: 38 60 01 08 li r3,264 ffc0ccf4: 48 00 11 c5 bl ffc0deb8 <_Workspace_Allocate> if ( !fp_area ) ffc0ccf8: 7c 7e 1b 79 mr. r30,r3 ffc0ccfc: 40 82 fe 70 bne+ ffc0cb6c <_Thread_Initialize+0x9c> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0cd00: 3b 00 00 00 li r24,0 size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; ffc0cd04: 3b 80 00 00 li r28,0 ffc0cd08: 4b ff ff 40 b ffc0cc48 <_Thread_Initialize+0x178> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( ffc0cd0c: 38 6a 00 01 addi r3,r10,1 ffc0cd10: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0cd14: 48 00 11 a5 bl ffc0deb8 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) ffc0cd18: 7c 78 1b 79 mr. r24,r3 ffc0cd1c: 41 82 00 40 beq- ffc0cd5c <_Thread_Initialize+0x28c> goto failed; } the_thread->extensions = (void **) extensions_area; ffc0cd20: 93 1f 01 50 stw r24,336(r31) ffc0cd24: 7f 05 c3 78 mr r5,r24 * 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++ ) ffc0cd28: 38 c0 00 00 li r6,0 ffc0cd2c: 80 17 28 30 lwz r0,10288(r23) (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0cd30: 38 e0 00 00 li r7,0 * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; ffc0cd34: 39 60 00 00 li r11,0 ffc0cd38: 48 00 00 08 b ffc0cd40 <_Thread_Initialize+0x270> ffc0cd3c: 80 bf 01 50 lwz r5,336(r31) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0cd40: 38 e7 00 01 addi r7,r7,1 ffc0cd44: 7f 87 00 40 cmplw cr7,r7,r0 the_thread->extensions[i] = NULL; ffc0cd48: 54 c6 10 3a rlwinm r6,r6,2,0,29 ffc0cd4c: 7d 65 31 2e stwx r11,r5,r6 * 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++ ) ffc0cd50: 7c e6 3b 78 mr r6,r7 ffc0cd54: 40 9d ff e8 ble+ cr7,ffc0cd3c <_Thread_Initialize+0x26c> ffc0cd58: 4b ff fe 48 b ffc0cba0 <_Thread_Initialize+0xd0> size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; ffc0cd5c: 3b 80 00 00 li r28,0 ffc0cd60: 4b ff fe e8 b ffc0cc48 <_Thread_Initialize+0x178> =============================================================================== ffc0deb0 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0deb0: 94 21 ff e8 stwu r1,-24(r1) ffc0deb4: 7c 08 02 a6 mflr r0 ffc0deb8: 90 01 00 1c stw r0,28(r1) */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); ffc0debc: 81 23 00 10 lwz r9,16(r3) ffc0dec0: 93 e1 00 14 stw r31,20(r1) ffc0dec4: 7c 7f 1b 78 mr r31,r3 if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0dec8: 71 2a 00 01 andi. r10,r9,1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0decc: 93 c1 00 10 stw r30,16(r1) if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0ded0: 41 82 00 20 beq- ffc0def0 <_Thread_Restart+0x40> _Thread_Restart_self(); return true; } return false; ffc0ded4: 38 60 00 00 li r3,0 } ffc0ded8: 80 01 00 1c lwz r0,28(r1) ffc0dedc: 83 c1 00 10 lwz r30,16(r1) ffc0dee0: 7c 08 03 a6 mtlr r0 ffc0dee4: 83 e1 00 14 lwz r31,20(r1) ffc0dee8: 38 21 00 18 addi r1,r1,24 ffc0deec: 4e 80 00 20 blr Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); ffc0def0: 90 81 00 08 stw r4,8(r1) RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0def4: 3f c0 00 00 lis r30,0 ffc0def8: 3b de 2e 20 addi r30,r30,11808 ffc0defc: 90 a1 00 0c stw r5,12(r1) ffc0df00: 48 00 00 f1 bl ffc0dff0 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); ffc0df04: 7f e3 fb 78 mr r3,r31 ffc0df08: 80 81 00 08 lwz r4,8(r1) ffc0df0c: 80 a1 00 0c lwz r5,12(r1) ffc0df10: 48 00 30 9d bl ffc10fac <_Thread_Reset> _Thread_Load_environment( the_thread ); ffc0df14: 7f e3 fb 78 mr r3,r31 ffc0df18: 48 00 2d 51 bl ffc10c68 <_Thread_Load_environment> _Thread_Ready( the_thread ); ffc0df1c: 7f e3 fb 78 mr r3,r31 ffc0df20: 48 00 30 3d bl ffc10f5c <_Thread_Ready> ); } static inline void _User_extensions_Thread_restart( Thread_Control *restarted ) { _User_extensions_Iterate( ffc0df24: 3c 80 ff c1 lis r4,-63 ffc0df28: 7f e3 fb 78 mr r3,r31 ffc0df2c: 38 84 e2 70 addi r4,r4,-7568 ffc0df30: 48 00 03 a1 bl ffc0e2d0 <_User_extensions_Iterate> _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) ffc0df34: 81 3e 00 10 lwz r9,16(r30) _Thread_Restart_self(); return true; ffc0df38: 38 60 00 01 li r3,1 _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) ffc0df3c: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0df40: 40 9e ff 98 bne+ cr7,ffc0ded8 <_Thread_Restart+0x28> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) ffc0df44: 81 3f 01 40 lwz r9,320(r31) ffc0df48: 2f 89 00 00 cmpwi cr7,r9,0 ffc0df4c: 41 9e 00 0c beq- cr7,ffc0df58 <_Thread_Restart+0xa8> <== NEVER TAKEN _Context_Restore_fp( &_Thread_Executing->fp_context ); ffc0df50: 38 7f 01 40 addi r3,r31,320 ffc0df54: 48 00 f5 2d bl ffc1d480 <_CPU_Context_restore_fp> #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); ffc0df58: 80 7e 00 10 lwz r3,16(r30) ffc0df5c: 38 63 00 c0 addi r3,r3,192 ffc0df60: 48 00 f6 b5 bl ffc1d614 <_CPU_Context_restore> =============================================================================== ffc0d3f4 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0d3f4: 94 21 ff d8 stwu r1,-40(r1) ffc0d3f8: 7c 08 02 a6 mflr r0 ffc0d3fc: 93 e1 00 24 stw r31,36(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0d400: 7c 7f 1b 79 mr. r31,r3 void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0d404: 90 01 00 2c stw r0,44(r1) ffc0d408: 93 a1 00 1c stw r29,28(r1) ffc0d40c: 93 c1 00 20 stw r30,32(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0d410: 41 82 00 10 beq- ffc0d420 <_Thread_queue_Requeue+0x2c> <== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { ffc0d414: 81 3f 00 34 lwz r9,52(r31) ffc0d418: 2f 89 00 01 cmpwi cr7,r9,1 ffc0d41c: 41 9e 00 20 beq- cr7,ffc0d43c <_Thread_queue_Requeue+0x48><== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } ffc0d420: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc0d424: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc0d428: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0d42c: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc0d430: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc0d434: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc0d438: 4e 80 00 20 blr <== NOT EXECUTED ffc0d43c: 7c 9e 23 78 mr r30,r4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0d440: 7f a0 00 a6 mfmsr r29 ffc0d444: 7d 50 42 a6 mfsprg r10,0 ffc0d448: 7f aa 50 78 andc r10,r29,r10 ffc0d44c: 7d 40 01 24 mtmsr r10 ffc0d450: 3d 00 00 03 lis r8,3 ffc0d454: 81 44 00 10 lwz r10,16(r4) ffc0d458: 61 08 be e0 ori r8,r8,48864 Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { ffc0d45c: 7d 07 50 39 and. r7,r8,r10 ffc0d460: 40 82 00 24 bne- ffc0d484 <_Thread_queue_Requeue+0x90> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0d464: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } ffc0d468: 80 01 00 2c lwz r0,44(r1) ffc0d46c: 83 a1 00 1c lwz r29,28(r1) ffc0d470: 7c 08 03 a6 mtlr r0 ffc0d474: 83 c1 00 20 lwz r30,32(r1) ffc0d478: 83 e1 00 24 lwz r31,36(r1) ffc0d47c: 38 21 00 28 addi r1,r1,40 ffc0d480: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc0d484: 91 3f 00 30 stw r9,48(r31) ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); ffc0d488: 38 a0 00 01 li r5,1 ffc0d48c: 48 00 2f 11 bl ffc1039c <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); ffc0d490: 7f e3 fb 78 mr r3,r31 ffc0d494: 7f c4 f3 78 mr r4,r30 ffc0d498: 38 a1 00 08 addi r5,r1,8 ffc0d49c: 4b ff fc 69 bl ffc0d104 <_Thread_queue_Enqueue_priority> ffc0d4a0: 7f a0 01 24 mtmsr r29 ffc0d4a4: 4b ff ff c4 b ffc0d468 <_Thread_queue_Requeue+0x74> =============================================================================== ffc0d4a8 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0d4a8: 94 21 ff e8 stwu r1,-24(r1) ffc0d4ac: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0d4b0: 38 81 00 08 addi r4,r1,8 void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0d4b4: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0d4b8: 4b ff f5 81 bl ffc0ca38 <_Thread_Get> switch ( location ) { ffc0d4bc: 81 21 00 08 lwz r9,8(r1) ffc0d4c0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d4c4: 40 9e 00 18 bne- cr7,ffc0d4dc <_Thread_queue_Timeout+0x34><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); ffc0d4c8: 48 00 2f d1 bl ffc10498 <_Thread_queue_Process_timeout> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc0d4cc: 3d 20 00 00 lis r9,0 ffc0d4d0: 81 49 28 24 lwz r10,10276(r9) --level; ffc0d4d4: 39 4a ff ff addi r10,r10,-1 _Thread_Dispatch_disable_level = level; ffc0d4d8: 91 49 28 24 stw r10,10276(r9) _Thread_Unnest_dispatch(); break; } } ffc0d4dc: 80 01 00 1c lwz r0,28(r1) ffc0d4e0: 38 21 00 18 addi r1,r1,24 ffc0d4e4: 7c 08 03 a6 mtlr r0 ffc0d4e8: 4e 80 00 20 blr =============================================================================== ffc1d878 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1d878: 94 21 ff 98 stwu r1,-104(r1) ffc1d87c: 7c 08 02 a6 mflr r0 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; ffc1d880: 39 20 00 00 li r9,0 ffc1d884: 92 c1 00 40 stw r22,64(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1d888: 3a c1 00 14 addi r22,r1,20 ffc1d88c: 93 01 00 48 stw r24,72(r1) ffc1d890: 3b 01 00 0c addi r24,r1,12 ffc1d894: 93 61 00 54 stw r27,84(r1) ffc1d898: 3b 61 00 18 addi r27,r1,24 ffc1d89c: 93 a1 00 5c stw r29,92(r1) head->previous = NULL; tail->previous = head; ffc1d8a0: 3b a1 00 08 addi r29,r1,8 ffc1d8a4: 92 a1 00 3c stw r21,60(r1) ffc1d8a8: 3e a0 00 00 lis r21,0 ffc1d8ac: 3a b5 28 f8 addi r21,r21,10488 ffc1d8b0: 93 21 00 4c stw r25,76(r1) ffc1d8b4: 3f 20 00 00 lis r25,0 ffc1d8b8: 3b 39 29 18 addi r25,r25,10520 ffc1d8bc: 93 41 00 50 stw r26,80(r1) ffc1d8c0: 3f 40 00 00 lis r26,0 ffc1d8c4: 3b 5a 70 00 addi r26,r26,28672 ffc1d8c8: 90 01 00 6c stw r0,108(r1) ffc1d8cc: 92 01 00 28 stw r16,40(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1d8d0: 93 61 00 14 stw r27,20(r1) head->previous = NULL; ffc1d8d4: 91 21 00 18 stw r9,24(r1) tail->previous = head; ffc1d8d8: 92 c1 00 1c stw r22,28(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1d8dc: 93 01 00 08 stw r24,8(r1) head->previous = NULL; ffc1d8e0: 91 21 00 0c stw r9,12(r1) tail->previous = head; ffc1d8e4: 93 a1 00 10 stw r29,16(r1) ffc1d8e8: 92 21 00 2c stw r17,44(r1) ffc1d8ec: 3a 23 00 08 addi r17,r3,8 ffc1d8f0: 92 41 00 30 stw r18,48(r1) ffc1d8f4: 3a 43 00 40 addi r18,r3,64 ffc1d8f8: 92 61 00 34 stw r19,52(r1) * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; ffc1d8fc: 3a 60 00 00 li r19,0 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1d900: 92 81 00 38 stw r20,56(r1) _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; ffc1d904: 3a 80 00 01 li r20,1 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1d908: 92 e1 00 44 stw r23,68(r1) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; ffc1d90c: 3a e0 00 00 li r23,0 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1d910: 93 81 00 58 stw r28,88(r1) ffc1d914: 3b 83 00 30 addi r28,r3,48 ffc1d918: 93 c1 00 60 stw r30,96(r1) ffc1d91c: 3b c3 00 68 addi r30,r3,104 ffc1d920: 93 e1 00 64 stw r31,100(r1) ffc1d924: 7c 7f 1b 78 mr r31,r3 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; ffc1d928: 92 df 00 78 stw r22,120(r31) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc1d92c: 81 39 00 00 lwz r9,0(r25) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1d930: 7f 83 e3 78 mr r3,r28 Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc1d934: 80 9f 00 3c lwz r4,60(r31) watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1d938: 7f a5 eb 78 mr r5,r29 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; ffc1d93c: 91 3f 00 3c stw r9,60(r31) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1d940: 7c 84 48 50 subf r4,r4,r9 ffc1d944: 48 00 50 e5 bl ffc22a28 <_Watchdog_Adjust_to_chain> ffc1d948: 80 7a 00 00 lwz r3,0(r26) ffc1d94c: 80 9a 00 04 lwz r4,4(r26) ffc1d950: 3c c0 3b 9a lis r6,15258 ffc1d954: 38 a0 00 00 li r5,0 ffc1d958: 60 c6 ca 00 ori r6,r6,51712 ffc1d95c: 48 01 4e 69 bl ffc327c4 <__divdi3> Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc1d960: 80 bf 00 74 lwz r5,116(r31) ffc1d964: 7c 90 23 78 mr r16,r4 /* * 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 ) { ffc1d968: 7f 84 28 40 cmplw cr7,r4,r5 ffc1d96c: 41 9d 00 94 bgt- cr7,ffc1da00 <_Timer_server_Body+0x188> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { ffc1d970: 41 9c 00 6c blt- cr7,ffc1d9dc <_Timer_server_Body+0x164> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; ffc1d974: 92 1f 00 74 stw r16,116(r31) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc1d978: 80 7f 00 78 lwz r3,120(r31) ffc1d97c: 48 00 0a d9 bl ffc1e454 <_Chain_Get> if ( timer == NULL ) { ffc1d980: 7c 64 1b 79 mr. r4,r3 ffc1d984: 41 82 00 34 beq- ffc1d9b8 <_Timer_server_Body+0x140> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1d988: 81 24 00 38 lwz r9,56(r4) ffc1d98c: 2f 89 00 01 cmpwi cr7,r9,1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1d990: 2f 09 00 03 cmpwi cr6,r9,3 static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1d994: 41 9e 00 5c beq- cr7,ffc1d9f0 <_Timer_server_Body+0x178> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1d998: 40 9a ff e0 bne+ cr6,ffc1d978 <_Timer_server_Body+0x100><== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1d99c: 38 84 00 10 addi r4,r4,16 ffc1d9a0: 7f c3 f3 78 mr r3,r30 ffc1d9a4: 48 00 51 29 bl ffc22acc <_Watchdog_Insert> } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc1d9a8: 80 7f 00 78 lwz r3,120(r31) ffc1d9ac: 48 00 0a a9 bl ffc1e454 <_Chain_Get> if ( timer == NULL ) { ffc1d9b0: 7c 64 1b 79 mr. r4,r3 ffc1d9b4: 40 82 ff d4 bne+ ffc1d988 <_Timer_server_Body+0x110> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1d9b8: 7d 40 00 a6 mfmsr r10 ffc1d9bc: 7d 30 42 a6 mfsprg r9,0 ffc1d9c0: 7d 49 48 78 andc r9,r10,r9 ffc1d9c4: 7d 20 01 24 mtmsr r9 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ffc1d9c8: 81 21 00 14 lwz r9,20(r1) ffc1d9cc: 7f 89 d8 00 cmpw cr7,r9,r27 ffc1d9d0: 41 9e 00 44 beq- cr7,ffc1da14 <_Timer_server_Body+0x19c><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1d9d4: 7d 40 01 24 mtmsr r10 <== NOT EXECUTED ffc1d9d8: 4b ff ff 54 b ffc1d92c <_Timer_server_Body+0xb4> <== NOT EXECUTED /* * 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 ); ffc1d9dc: 7f c3 f3 78 mr r3,r30 ffc1d9e0: 38 80 00 01 li r4,1 ffc1d9e4: 7c b0 28 50 subf r5,r16,r5 ffc1d9e8: 48 00 4f 2d bl ffc22914 <_Watchdog_Adjust> ffc1d9ec: 4b ff ff 88 b ffc1d974 <_Timer_server_Body+0xfc> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1d9f0: 7f 83 e3 78 mr r3,r28 ffc1d9f4: 38 84 00 10 addi r4,r4,16 ffc1d9f8: 48 00 50 d5 bl ffc22acc <_Watchdog_Insert> ffc1d9fc: 4b ff ff 7c b ffc1d978 <_Timer_server_Body+0x100> /* * 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 ); ffc1da00: 7c 85 20 50 subf r4,r5,r4 ffc1da04: 7f c3 f3 78 mr r3,r30 ffc1da08: 7f a5 eb 78 mr r5,r29 ffc1da0c: 48 00 50 1d bl ffc22a28 <_Watchdog_Adjust_to_chain> ffc1da10: 4b ff ff 64 b ffc1d974 <_Timer_server_Body+0xfc> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; ffc1da14: 90 9f 00 78 stw r4,120(r31) ffc1da18: 7d 40 01 24 mtmsr r10 _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 ) ) { ffc1da1c: 81 21 00 08 lwz r9,8(r1) ffc1da20: 7f 89 c0 00 cmpw cr7,r9,r24 ffc1da24: 40 be 00 30 bne+ cr7,ffc1da54 <_Timer_server_Body+0x1dc> ffc1da28: 48 00 00 50 b ffc1da78 <_Timer_server_Body+0x200> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; ffc1da2c: 81 49 00 00 lwz r10,0(r9) head->next = new_first; new_first->previous = head; ffc1da30: 93 aa 00 04 stw r29,4(r10) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; ffc1da34: 91 41 00 08 stw r10,8(r1) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; ffc1da38: 92 e9 00 08 stw r23,8(r9) ffc1da3c: 7d 00 01 24 mtmsr r8 /* * 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 ); ffc1da40: 81 49 00 1c lwz r10,28(r9) ffc1da44: 80 69 00 20 lwz r3,32(r9) ffc1da48: 80 89 00 24 lwz r4,36(r9) ffc1da4c: 7d 49 03 a6 mtctr r10 ffc1da50: 4e 80 04 21 bctrl static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1da54: 7d 00 00 a6 mfmsr r8 ffc1da58: 7d 30 42 a6 mfsprg r9,0 ffc1da5c: 7d 09 48 78 andc r9,r8,r9 ffc1da60: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc1da64: 81 21 00 08 lwz r9,8(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) ffc1da68: 7f 89 c0 00 cmpw cr7,r9,r24 ffc1da6c: 40 9e ff c0 bne+ cr7,ffc1da2c <_Timer_server_Body+0x1b4> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1da70: 7d 00 01 24 mtmsr r8 ffc1da74: 4b ff fe b4 b ffc1d928 <_Timer_server_Body+0xb0> } } else { ts->active = false; ffc1da78: 9a 7f 00 7c stb r19,124(r31) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc1da7c: 81 35 00 00 lwz r9,0(r21) ++level; ffc1da80: 39 29 00 01 addi r9,r9,1 _Thread_Dispatch_disable_level = level; ffc1da84: 91 35 00 00 stw r9,0(r21) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); ffc1da88: 80 7f 00 00 lwz r3,0(r31) ffc1da8c: 38 80 00 08 li r4,8 ffc1da90: 48 00 49 d5 bl ffc22464 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1da94: 7f e3 fb 78 mr r3,r31 ffc1da98: 4b ff fb 21 bl ffc1d5b8 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); ffc1da9c: 7f e3 fb 78 mr r3,r31 ffc1daa0: 4b ff fb a9 bl ffc1d648 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); ffc1daa4: 48 00 3e 29 bl ffc218cc <_Thread_Enable_dispatch> ts->active = true; ffc1daa8: 9a 9f 00 7c stb r20,124(r31) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc1daac: 7e 23 8b 78 mr r3,r17 ffc1dab0: 48 00 51 e5 bl ffc22c94 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc1dab4: 7e 43 93 78 mr r3,r18 ffc1dab8: 48 00 51 dd bl ffc22c94 <_Watchdog_Remove> ffc1dabc: 4b ff fe 6c b ffc1d928 <_Timer_server_Body+0xb0> =============================================================================== ffc1d6d8 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1d6d8: 94 21 ff e8 stwu r1,-24(r1) ffc1d6dc: 7c 08 02 a6 mflr r0 ffc1d6e0: 90 01 00 1c stw r0,28(r1) if ( ts->insert_chain == NULL ) { ffc1d6e4: 81 23 00 78 lwz r9,120(r3) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1d6e8: 93 e1 00 14 stw r31,20(r1) ffc1d6ec: 7c 7f 1b 78 mr r31,r3 if ( ts->insert_chain == NULL ) { ffc1d6f0: 2f 89 00 00 cmpwi cr7,r9,0 static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1d6f4: 93 a1 00 0c stw r29,12(r1) ffc1d6f8: 93 c1 00 10 stw r30,16(r1) if ( ts->insert_chain == NULL ) { ffc1d6fc: 41 9e 00 24 beq- cr7,ffc1d720 <_Timer_server_Schedule_operation_method+0x48> * 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 ); } } ffc1d700: 80 01 00 1c lwz r0,28(r1) ffc1d704: 83 a1 00 0c lwz r29,12(r1) ffc1d708: 7c 08 03 a6 mtlr r0 ffc1d70c: 83 c1 00 10 lwz r30,16(r1) ffc1d710: 83 e1 00 14 lwz r31,20(r1) * 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 ); ffc1d714: 80 63 00 78 lwz r3,120(r3) } } ffc1d718: 38 21 00 18 addi r1,r1,24 * 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 ); ffc1d71c: 48 00 0d 08 b ffc1e424 <_Chain_Append> * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc1d720: 3d 20 00 00 lis r9,0 ffc1d724: 81 49 28 f8 lwz r10,10488(r9) ffc1d728: 7c 9e 23 78 mr r30,r4 ++level; ffc1d72c: 39 4a 00 01 addi r10,r10,1 _Thread_Dispatch_disable_level = level; ffc1d730: 91 49 28 f8 stw r10,10488(r9) * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1d734: 81 24 00 38 lwz r9,56(r4) ffc1d738: 2f 89 00 01 cmpwi cr7,r9,1 ffc1d73c: 41 9e 00 bc beq- cr7,ffc1d7f8 <_Timer_server_Schedule_operation_method+0x120> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1d740: 2f 89 00 03 cmpwi cr7,r9,3 ffc1d744: 41 9e 00 20 beq- cr7,ffc1d764 <_Timer_server_Schedule_operation_method+0x8c> * 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 ); } } ffc1d748: 80 01 00 1c lwz r0,28(r1) ffc1d74c: 83 a1 00 0c lwz r29,12(r1) ffc1d750: 7c 08 03 a6 mtlr r0 ffc1d754: 83 c1 00 10 lwz r30,16(r1) ffc1d758: 83 e1 00 14 lwz r31,20(r1) ffc1d75c: 38 21 00 18 addi r1,r1,24 if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); ffc1d760: 48 00 41 6c b ffc218cc <_Thread_Enable_dispatch> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1d764: 7f a0 00 a6 mfmsr r29 ffc1d768: 7d 30 42 a6 mfsprg r9,0 ffc1d76c: 7f a9 48 78 andc r9,r29,r9 ffc1d770: 7d 20 01 24 mtmsr r9 /* * 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(); ffc1d774: 3d 20 00 00 lis r9,0 ffc1d778: 39 29 70 00 addi r9,r9,28672 ffc1d77c: 80 69 00 00 lwz r3,0(r9) ffc1d780: 3c c0 3b 9a lis r6,15258 ffc1d784: 80 89 00 04 lwz r4,4(r9) ffc1d788: 38 a0 00 00 li r5,0 ffc1d78c: 60 c6 ca 00 ori r6,r6,51712 ffc1d790: 48 01 50 35 bl ffc327c4 <__divdi3> */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc1d794: 81 3f 00 68 lwz r9,104(r31) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc1d798: 39 5f 00 6c addi r10,r31,108 last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { ffc1d79c: 7f 89 50 00 cmpw cr7,r9,r10 * 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(); last_snapshot = ts->TOD_watchdogs.last_snapshot; ffc1d7a0: 81 5f 00 74 lwz r10,116(r31) if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { ffc1d7a4: 41 9e 00 28 beq- cr7,ffc1d7cc <_Timer_server_Schedule_operation_method+0xf4> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { ffc1d7a8: 7f 84 50 40 cmplw cr7,r4,r10 _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; ffc1d7ac: 80 e9 00 10 lwz r7,16(r9) if ( snapshot > last_snapshot ) { ffc1d7b0: 40 9d 00 bc ble- cr7,ffc1d86c <_Timer_server_Schedule_operation_method+0x194> /* * We advanced in time. */ delta = snapshot - last_snapshot; ffc1d7b4: 7d 4a 20 50 subf r10,r10,r4 if (delta_interval > delta) { ffc1d7b8: 7f 87 50 40 cmplw cr7,r7,r10 delta_interval -= delta; } else { delta_interval = 0; ffc1d7bc: 39 00 00 00 li r8,0 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { ffc1d7c0: 40 9d 00 08 ble- cr7,ffc1d7c8 <_Timer_server_Schedule_operation_method+0xf0><== NEVER TAKEN delta_interval -= delta; ffc1d7c4: 7d 0a 38 50 subf r8,r10,r7 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; ffc1d7c8: 91 09 00 10 stw r8,16(r9) } ts->TOD_watchdogs.last_snapshot = snapshot; ffc1d7cc: 90 9f 00 74 stw r4,116(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1d7d0: 7f a0 01 24 mtmsr r29 _ISR_Enable( level ); _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1d7d4: 38 7f 00 68 addi r3,r31,104 ffc1d7d8: 38 9e 00 10 addi r4,r30,16 ffc1d7dc: 48 00 52 f1 bl ffc22acc <_Watchdog_Insert> if ( !ts->active ) { ffc1d7e0: 89 3f 00 7c lbz r9,124(r31) ffc1d7e4: 2f 89 00 00 cmpwi cr7,r9,0 ffc1d7e8: 40 9e ff 60 bne+ cr7,ffc1d748 <_Timer_server_Schedule_operation_method+0x70> _Timer_server_Reset_tod_system_watchdog( ts ); ffc1d7ec: 7f e3 fb 78 mr r3,r31 ffc1d7f0: 4b ff fe 59 bl ffc1d648 <_Timer_server_Reset_tod_system_watchdog> ffc1d7f4: 4b ff ff 54 b ffc1d748 <_Timer_server_Schedule_operation_method+0x70> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1d7f8: 7c a0 00 a6 mfmsr r5 ffc1d7fc: 7d 30 42 a6 mfsprg r9,0 ffc1d800: 7c a9 48 78 andc r9,r5,r9 ffc1d804: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc1d808: 81 23 00 30 lwz r9,48(r3) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc1d80c: 39 43 00 34 addi r10,r3,52 * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; last_snapshot = ts->Interval_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc1d810: 7f 89 50 00 cmpw cr7,r9,r10 /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; ffc1d814: 3d 40 00 00 lis r10,0 ffc1d818: 81 4a 29 18 lwz r10,10520(r10) last_snapshot = ts->Interval_watchdogs.last_snapshot; ffc1d81c: 80 e3 00 3c lwz r7,60(r3) if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc1d820: 41 9e 00 20 beq- cr7,ffc1d840 <_Timer_server_Schedule_operation_method+0x168> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; ffc1d824: 80 c9 00 10 lwz r6,16(r9) first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; ffc1d828: 7c e7 50 50 subf r7,r7,r10 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; ffc1d82c: 39 00 00 00 li r8,0 * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { ffc1d830: 7f 87 30 40 cmplw cr7,r7,r6 ffc1d834: 40 9c 00 08 bge- cr7,ffc1d83c <_Timer_server_Schedule_operation_method+0x164> delta_interval -= delta; ffc1d838: 7d 07 30 50 subf r8,r7,r6 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; ffc1d83c: 91 09 00 10 stw r8,16(r9) } ts->Interval_watchdogs.last_snapshot = snapshot; ffc1d840: 91 5f 00 3c stw r10,60(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1d844: 7c a0 01 24 mtmsr r5 _ISR_Enable( level ); _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1d848: 38 7f 00 30 addi r3,r31,48 ffc1d84c: 38 9e 00 10 addi r4,r30,16 ffc1d850: 48 00 52 7d bl ffc22acc <_Watchdog_Insert> if ( !ts->active ) { ffc1d854: 89 3f 00 7c lbz r9,124(r31) ffc1d858: 2f 89 00 00 cmpwi cr7,r9,0 ffc1d85c: 40 9e fe ec bne+ cr7,ffc1d748 <_Timer_server_Schedule_operation_method+0x70> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1d860: 7f e3 fb 78 mr r3,r31 ffc1d864: 4b ff fd 55 bl ffc1d5b8 <_Timer_server_Reset_interval_system_watchdog> ffc1d868: 4b ff fe e0 b ffc1d748 <_Timer_server_Schedule_operation_method+0x70> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; ffc1d86c: 7d 47 52 14 add r10,r7,r10 delta_interval += delta; ffc1d870: 7d 04 50 50 subf r8,r4,r10 ffc1d874: 4b ff ff 54 b ffc1d7c8 <_Timer_server_Schedule_operation_method+0xf0> =============================================================================== ffc0da64 <_Timespec_Add_to>: { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0da64: 81 24 00 04 lwz r9,4(r4) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0da68: 3c e0 3b 9a lis r7,15258 { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0da6c: 81 03 00 04 lwz r8,4(r3) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0da70: 60 e7 c9 ff ori r7,r7,51711 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; ffc0da74: 81 44 00 00 lwz r10,0(r4) /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0da78: 7d 08 4a 14 add r8,r8,r9 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0da7c: 80 c3 00 00 lwz r6,0(r3) time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0da80: 7f 88 38 40 cmplw cr7,r8,r7 { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0da84: 91 03 00 04 stw r8,4(r3) ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0da88: 7c c6 52 14 add r6,r6,r10 time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0da8c: 7d 09 43 78 mr r9,r8 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0da90: 90 c3 00 00 stw r6,0(r3) time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0da94: 40 9d 00 2c ble- cr7,ffc0dac0 <_Timespec_Add_to+0x5c> ffc0da98: 38 c6 00 01 addi r6,r6,1 #include #include #include #include uint32_t _Timespec_Add_to( ffc0da9c: 7c ca 30 50 subf r6,r10,r6 time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ffc0daa0: 3d 29 c4 65 addis r9,r9,-15259 ffc0daa4: 39 29 36 00 addi r9,r9,13824 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0daa8: 7f 89 38 40 cmplw cr7,r9,r7 #include #include #include #include uint32_t _Timespec_Add_to( ffc0daac: 7d 06 52 14 add r8,r6,r10 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; seconds++; ffc0dab0: 39 4a 00 01 addi r10,r10,1 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0dab4: 41 9d ff ec bgt+ cr7,ffc0daa0 <_Timespec_Add_to+0x3c> <== NEVER TAKEN ffc0dab8: 91 23 00 04 stw r9,4(r3) ffc0dabc: 91 03 00 00 stw r8,0(r3) time->tv_sec++; seconds++; } return seconds; } ffc0dac0: 7d 43 53 78 mr r3,r10 ffc0dac4: 4e 80 00 20 blr =============================================================================== ffc0f504 <_Timestamp64_Divide>: const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { ffc0f504: 94 21 ff e8 stwu r1,-24(r1) ffc0f508: 7c 08 02 a6 mflr r0 ffc0f50c: 90 01 00 1c stw r0,28(r1) Timestamp64_Control answer; if ( *_rhs == 0 ) { ffc0f510: 81 44 00 00 lwz r10,0(r4) ffc0f514: 81 24 00 04 lwz r9,4(r4) const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { ffc0f518: 93 c1 00 10 stw r30,16(r1) ffc0f51c: 7c be 2b 78 mr r30,r5 Timestamp64_Control answer; if ( *_rhs == 0 ) { ffc0f520: 7d 48 4b 79 or. r8,r10,r9 const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { ffc0f524: 93 e1 00 14 stw r31,20(r1) ffc0f528: 7c df 33 78 mr r31,r6 ffc0f52c: 93 81 00 08 stw r28,8(r1) ffc0f530: 93 a1 00 0c stw r29,12(r1) Timestamp64_Control answer; if ( *_rhs == 0 ) { ffc0f534: 41 82 00 80 beq- ffc0f5b4 <_Timestamp64_Divide+0xb0> <== NEVER TAKEN * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; ffc0f538: 80 c3 00 04 lwz r6,4(r3) ffc0f53c: 3d 00 00 01 lis r8,1 ffc0f540: 80 e3 00 00 lwz r7,0(r3) ffc0f544: 61 08 86 a0 ori r8,r8,34464 ffc0f548: 7c 68 30 16 mulhwu r3,r8,r6 ffc0f54c: 7c e8 39 d6 mullw r7,r8,r7 ffc0f550: 7c 88 31 d6 mullw r4,r8,r6 ffc0f554: 7d 45 53 78 mr r5,r10 ffc0f558: 7d 26 4b 78 mr r6,r9 ffc0f55c: 7c 67 1a 14 add r3,r7,r3 ffc0f560: 48 00 eb 41 bl ffc1e0a0 <__divdi3> *_ival_percentage = answer / 1000; ffc0f564: 38 a0 00 00 li r5,0 ffc0f568: 38 c0 03 e8 li r6,1000 * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; ffc0f56c: 7c 7c 1b 78 mr r28,r3 ffc0f570: 7c 9d 23 78 mr r29,r4 *_ival_percentage = answer / 1000; ffc0f574: 48 00 eb 2d bl ffc1e0a0 <__divdi3> ffc0f578: 90 9e 00 00 stw r4,0(r30) *_fval_percentage = answer % 1000; ffc0f57c: 7f 83 e3 78 mr r3,r28 ffc0f580: 7f a4 eb 78 mr r4,r29 ffc0f584: 38 a0 00 00 li r5,0 ffc0f588: 38 c0 03 e8 li r6,1000 ffc0f58c: 48 00 ef 39 bl ffc1e4c4 <__moddi3> } ffc0f590: 80 01 00 1c lwz r0,28(r1) */ answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; *_fval_percentage = answer % 1000; ffc0f594: 90 9f 00 00 stw r4,0(r31) } ffc0f598: 7c 08 03 a6 mtlr r0 ffc0f59c: 83 81 00 08 lwz r28,8(r1) ffc0f5a0: 83 a1 00 0c lwz r29,12(r1) ffc0f5a4: 83 c1 00 10 lwz r30,16(r1) ffc0f5a8: 83 e1 00 14 lwz r31,20(r1) ffc0f5ac: 38 21 00 18 addi r1,r1,24 ffc0f5b0: 4e 80 00 20 blr ffc0f5b4: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ) { Timestamp64_Control answer; if ( *_rhs == 0 ) { *_ival_percentage = 0; ffc0f5b8: 91 05 00 00 stw r8,0(r5) <== NOT EXECUTED answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; *_fval_percentage = answer % 1000; } ffc0f5bc: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0f5c0: 83 81 00 08 lwz r28,8(r1) <== NOT EXECUTED ffc0f5c4: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc0f5c8: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc0f5cc: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED { Timestamp64_Control answer; if ( *_rhs == 0 ) { *_ival_percentage = 0; *_fval_percentage = 0; ffc0f5d0: 91 06 00 00 stw r8,0(r6) <== NOT EXECUTED answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; *_fval_percentage = answer % 1000; } ffc0f5d4: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc0f5d8: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0d858 <_User_extensions_Iterate>: void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { ffc0d858: 94 21 ff e0 stwu r1,-32(r1) Thread_Control *executing = _Thread_Executing; const User_extensions_Table *callouts_current = ffc0d85c: 3d 20 ff c2 lis r9,-62 ffc0d860: 39 29 d5 38 addi r9,r9,-10952 void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { ffc0d864: 7c 08 02 a6 mflr r0 ffc0d868: 93 61 00 0c stw r27,12(r1) Thread_Control *executing = _Thread_Executing; const User_extensions_Table *callouts_current = rtems_configuration_get_user_extension_table(); const User_extensions_Table *callouts_end = callouts_current + rtems_configuration_get_number_of_initial_extensions(); ffc0d86c: 83 69 00 40 lwz r27,64(r9) void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { ffc0d870: 93 e1 00 1c stw r31,28(r1) Thread_Control *executing = _Thread_Executing; const User_extensions_Table *callouts_current = rtems_configuration_get_user_extension_table(); const User_extensions_Table *callouts_end = callouts_current + rtems_configuration_get_number_of_initial_extensions(); ffc0d874: 57 7b 28 34 rlwinm r27,r27,5,0,26 void *arg, User_extensions_Visitor visitor ) { Thread_Control *executing = _Thread_Executing; const User_extensions_Table *callouts_current = ffc0d878: 83 e9 00 44 lwz r31,68(r9) void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { Thread_Control *executing = _Thread_Executing; ffc0d87c: 3d 20 00 00 lis r9,0 void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { ffc0d880: 93 81 00 10 stw r28,16(r1) ffc0d884: 7c 9c 23 78 mr r28,r4 Thread_Control *executing = _Thread_Executing; const User_extensions_Table *callouts_current = rtems_configuration_get_user_extension_table(); const User_extensions_Table *callouts_end = ffc0d888: 7f 7f da 14 add r27,r31,r27 callouts_current + rtems_configuration_get_number_of_initial_extensions(); const Chain_Node *node; const Chain_Node *tail; while ( callouts_current != callouts_end ) { ffc0d88c: 7f 9f d8 00 cmpw cr7,r31,r27 void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { ffc0d890: 93 a1 00 14 stw r29,20(r1) ffc0d894: 7c 7d 1b 78 mr r29,r3 ffc0d898: 93 c1 00 18 stw r30,24(r1) ffc0d89c: 90 01 00 24 stw r0,36(r1) Thread_Control *executing = _Thread_Executing; ffc0d8a0: 83 c9 2e 10 lwz r30,11792(r9) const User_extensions_Table *callouts_end = callouts_current + rtems_configuration_get_number_of_initial_extensions(); const Chain_Node *node; const Chain_Node *tail; while ( callouts_current != callouts_end ) { ffc0d8a4: 41 9e 00 24 beq- cr7,ffc0d8c8 <_User_extensions_Iterate+0x70><== NEVER TAKEN (*visitor)( executing, arg, callouts_current ); ffc0d8a8: 7f e5 fb 78 mr r5,r31 ffc0d8ac: 7f 89 03 a6 mtctr r28 ffc0d8b0: 7f c3 f3 78 mr r3,r30 ffc0d8b4: 7f a4 eb 78 mr r4,r29 ++callouts_current; ffc0d8b8: 3b ff 00 20 addi r31,r31,32 callouts_current + rtems_configuration_get_number_of_initial_extensions(); const Chain_Node *node; const Chain_Node *tail; while ( callouts_current != callouts_end ) { (*visitor)( executing, arg, callouts_current ); ffc0d8bc: 4e 80 04 21 bctrl const User_extensions_Table *callouts_end = callouts_current + rtems_configuration_get_number_of_initial_extensions(); const Chain_Node *node; const Chain_Node *tail; while ( callouts_current != callouts_end ) { ffc0d8c0: 7f 9b f8 00 cmpw cr7,r27,r31 ffc0d8c4: 40 9e ff e4 bne+ cr7,ffc0d8a8 <_User_extensions_Iterate+0x50> */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0d8c8: 3d 20 00 00 lis r9,0 ffc0d8cc: 3b 69 21 fc addi r27,r9,8700 ffc0d8d0: 83 e9 21 fc lwz r31,8700(r9) */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail( const Chain_Control *the_chain ) { return &the_chain->Tail.Node; ffc0d8d4: 3b 7b 00 04 addi r27,r27,4 ++callouts_current; } node = _Chain_Immutable_first( &_User_extensions_List ); tail = _Chain_Immutable_tail( &_User_extensions_List ); while ( node != tail ) { ffc0d8d8: 7f 9f d8 00 cmpw cr7,r31,r27 ffc0d8dc: 41 9e 00 24 beq- cr7,ffc0d900 <_User_extensions_Iterate+0xa8> const User_extensions_Control *extension = (const User_extensions_Control *) node; (*visitor)( executing, arg, &extension->Callouts ); ffc0d8e0: 38 bf 00 14 addi r5,r31,20 ffc0d8e4: 7f 89 03 a6 mtctr r28 ffc0d8e8: 7f c3 f3 78 mr r3,r30 ffc0d8ec: 7f a4 eb 78 mr r4,r29 ffc0d8f0: 4e 80 04 21 bctrl node = _Chain_Immutable_next( node ); } } ffc0d8f4: 83 ff 00 00 lwz r31,0(r31) ++callouts_current; } node = _Chain_Immutable_first( &_User_extensions_List ); tail = _Chain_Immutable_tail( &_User_extensions_List ); while ( node != tail ) { ffc0d8f8: 7f 9f d8 00 cmpw cr7,r31,r27 ffc0d8fc: 40 9e ff e4 bne+ cr7,ffc0d8e0 <_User_extensions_Iterate+0x88> (*visitor)( executing, arg, &extension->Callouts ); node = _Chain_Immutable_next( node ); } } ffc0d900: 80 01 00 24 lwz r0,36(r1) ffc0d904: 83 61 00 0c lwz r27,12(r1) ffc0d908: 7c 08 03 a6 mtlr r0 ffc0d90c: 83 81 00 10 lwz r28,16(r1) ffc0d910: 83 a1 00 14 lwz r29,20(r1) ffc0d914: 83 c1 00 18 lwz r30,24(r1) ffc0d918: 83 e1 00 1c lwz r31,28(r1) ffc0d91c: 38 21 00 20 addi r1,r1,32 ffc0d920: 4e 80 00 20 blr =============================================================================== ffc0f894 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { ffc0f894: 94 21 ff e8 stwu r1,-24(r1) ffc0f898: 7c 08 02 a6 mflr r0 ffc0f89c: 90 01 00 1c stw r0,28(r1) ffc0f8a0: 93 c1 00 10 stw r30,16(r1) ffc0f8a4: 7c 7e 1b 78 mr r30,r3 ffc0f8a8: 93 81 00 08 stw r28,8(r1) ffc0f8ac: 93 a1 00 0c stw r29,12(r1) ffc0f8b0: 93 e1 00 14 stw r31,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0f8b4: 7d 40 00 a6 mfmsr r10 ffc0f8b8: 7d 30 42 a6 mfsprg r9,0 ffc0f8bc: 7d 49 48 78 andc r9,r10,r9 ffc0f8c0: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0f8c4: 81 23 00 00 lwz r9,0(r3) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0f8c8: 3b a3 00 04 addi r29,r3,4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { ffc0f8cc: 7f 89 e8 00 cmpw cr7,r9,r29 ffc0f8d0: 41 9e 00 70 beq- cr7,ffc0f940 <_Watchdog_Adjust+0xac> switch ( direction ) { ffc0f8d4: 2f 84 00 00 cmpwi cr7,r4,0 ffc0f8d8: 7c bf 2b 78 mr r31,r5 ffc0f8dc: 40 9e 00 88 bne- cr7,ffc0f964 <_Watchdog_Adjust+0xd0> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f8e0: 2f 85 00 00 cmpwi cr7,r5,0 ffc0f8e4: 41 9e 00 5c beq- cr7,ffc0f940 <_Watchdog_Adjust+0xac> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f8e8: 81 09 00 10 lwz r8,16(r9) _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0f8ec: 3b 80 00 01 li r28,1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f8f0: 7f 85 40 40 cmplw cr7,r5,r8 ffc0f8f4: 40 bc 00 18 bge+ cr7,ffc0f90c <_Watchdog_Adjust+0x78> <== ALWAYS TAKEN ffc0f8f8: 48 00 00 a4 b ffc0f99c <_Watchdog_Adjust+0x108> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f8fc: 41 9a 00 44 beq- cr6,ffc0f940 <_Watchdog_Adjust+0xac> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f900: 81 09 00 10 lwz r8,16(r9) ffc0f904: 7f 88 f8 40 cmplw cr7,r8,r31 ffc0f908: 41 9d 00 94 bgt- cr7,ffc0f99c <_Watchdog_Adjust+0x108> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0f90c: 93 89 00 10 stw r28,16(r9) while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; ffc0f910: 7f e8 f8 50 subf r31,r8,r31 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0f914: 7d 40 01 24 mtmsr r10 _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); _Watchdog_Tickle( header ); ffc0f918: 7f c3 f3 78 mr r3,r30 ffc0f91c: 48 00 03 25 bl ffc0fc40 <_Watchdog_Tickle> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0f920: 7d 40 00 a6 mfmsr r10 ffc0f924: 7d 30 42 a6 mfsprg r9,0 ffc0f928: 7d 49 48 78 andc r9,r10,r9 ffc0f92c: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0f930: 81 3e 00 00 lwz r9,0(r30) switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f934: 2f 1f 00 00 cmpwi cr6,r31,0 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0f938: 7f 9d 48 00 cmpw cr7,r29,r9 ffc0f93c: 40 9e ff c0 bne+ cr7,ffc0f8fc <_Watchdog_Adjust+0x68> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0f940: 7d 40 01 24 mtmsr r10 } } _ISR_Enable( level ); } ffc0f944: 80 01 00 1c lwz r0,28(r1) ffc0f948: 83 81 00 08 lwz r28,8(r1) ffc0f94c: 7c 08 03 a6 mtlr r0 ffc0f950: 83 a1 00 0c lwz r29,12(r1) ffc0f954: 83 c1 00 10 lwz r30,16(r1) ffc0f958: 83 e1 00 14 lwz r31,20(r1) ffc0f95c: 38 21 00 18 addi r1,r1,24 ffc0f960: 4e 80 00 20 blr * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ffc0f964: 2f 84 00 01 cmpwi cr7,r4,1 ffc0f968: 40 9e ff d8 bne+ cr7,ffc0f940 <_Watchdog_Adjust+0xac> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; ffc0f96c: 81 09 00 10 lwz r8,16(r9) ffc0f970: 7f e8 2a 14 add r31,r8,r5 ffc0f974: 93 e9 00 10 stw r31,16(r9) ffc0f978: 7d 40 01 24 mtmsr r10 } } _ISR_Enable( level ); } ffc0f97c: 80 01 00 1c lwz r0,28(r1) ffc0f980: 83 81 00 08 lwz r28,8(r1) ffc0f984: 7c 08 03 a6 mtlr r0 ffc0f988: 83 a1 00 0c lwz r29,12(r1) ffc0f98c: 83 c1 00 10 lwz r30,16(r1) ffc0f990: 83 e1 00 14 lwz r31,20(r1) ffc0f994: 38 21 00 18 addi r1,r1,24 ffc0f998: 4e 80 00 20 blr _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; ffc0f99c: 7d 1f 40 50 subf r8,r31,r8 ffc0f9a0: 91 09 00 10 stw r8,16(r9) break; ffc0f9a4: 4b ff ff 9c b ffc0f940 <_Watchdog_Adjust+0xac> =============================================================================== ffc22a28 <_Watchdog_Adjust_to_chain>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc22a28: 7d 60 00 a6 mfmsr r11 ffc22a2c: 7d 30 42 a6 mfsprg r9,0 ffc22a30: 7d 69 48 78 andc r9,r11,r9 ffc22a34: 7d 20 01 24 mtmsr r9 { Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; _ISR_Disable( level ); ffc22a38: 81 23 00 00 lwz r9,0(r3) ffc22a3c: 38 c3 00 04 addi r6,r3,4 /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; first->delta_interval = 0; ffc22a40: 39 80 00 00 li r12,0 ffc22a44: 38 05 00 04 addi r0,r5,4 Watchdog_Control *first; _ISR_Disable( level ); while ( 1 ) { if ( _Chain_Is_empty( header ) ) { ffc22a48: 7f 86 48 00 cmpw cr7,r6,r9 ffc22a4c: 41 9e 00 68 beq- cr7,ffc22ab4 <_Watchdog_Adjust_to_chain+0x8c> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { ffc22a50: 81 49 00 10 lwz r10,16(r9) ffc22a54: 7f 84 50 40 cmplw cr7,r4,r10 ffc22a58: 41 9c 00 64 blt- cr7,ffc22abc <_Watchdog_Adjust_to_chain+0x94> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; first->delta_interval = 0; ffc22a5c: 91 89 00 10 stw r12,16(r9) /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; ffc22a60: 7c 8a 20 50 subf r4,r10,r4 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc22a64: 81 49 00 00 lwz r10,0(r9) previous = the_node->previous; ffc22a68: 80 e9 00 04 lwz r7,4(r9) next->previous = previous; ffc22a6c: 90 ea 00 04 stw r7,4(r10) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; ffc22a70: 81 05 00 08 lwz r8,8(r5) Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; ffc22a74: 91 47 00 00 stw r10,0(r7) ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; ffc22a78: 90 09 00 00 stw r0,0(r9) tail->previous = the_node; old_last->next = the_node; ffc22a7c: 91 28 00 00 stw r9,0(r8) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; ffc22a80: 91 25 00 08 stw r9,8(r5) old_last->next = the_node; the_node->previous = old_last; ffc22a84: 91 09 00 04 stw r8,4(r9) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc22a88: 7d 20 00 a6 mfmsr r9 ffc22a8c: 7d 60 01 24 mtmsr r11 ffc22a90: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc22a94: 81 23 00 00 lwz r9,0(r3) _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); if ( _Chain_Is_empty( header ) ) ffc22a98: 7f 86 48 00 cmpw cr7,r6,r9 ffc22a9c: 41 be ff ac beq- cr7,ffc22a48 <_Watchdog_Adjust_to_chain+0x20> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) ffc22aa0: 81 49 00 10 lwz r10,16(r9) ffc22aa4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc22aa8: 41 9e ff bc beq+ cr7,ffc22a64 <_Watchdog_Adjust_to_chain+0x3c> Watchdog_Control *first; _ISR_Disable( level ); while ( 1 ) { if ( _Chain_Is_empty( header ) ) { ffc22aac: 7f 86 48 00 cmpw cr7,r6,r9 ffc22ab0: 40 9e ff a0 bne+ cr7,ffc22a50 <_Watchdog_Adjust_to_chain+0x28><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc22ab4: 7d 60 01 24 mtmsr r11 ffc22ab8: 4e 80 00 20 blr /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; ffc22abc: 7d 44 50 50 subf r10,r4,r10 ffc22ac0: 91 49 00 10 stw r10,16(r9) ffc22ac4: 7d 60 01 24 mtmsr r11 ffc22ac8: 4e 80 00 20 blr =============================================================================== ffc0d9b0 <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; ffc0d9b0: 3d 20 00 00 lis r9,0 ffc0d9b4: 80 c9 2e 08 lwz r6,11784(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0d9b8: 7c e0 00 a6 mfmsr r7 ffc0d9bc: 7d 30 42 a6 mfsprg r9,0 ffc0d9c0: 7c e9 48 78 andc r9,r7,r9 ffc0d9c4: 7d 20 01 24 mtmsr r9 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { ffc0d9c8: 81 24 00 08 lwz r9,8(r4) ffc0d9cc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d9d0: 40 9e 01 04 bne- cr7,ffc0dad4 <_Watchdog_Insert+0x124> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; ffc0d9d4: 3d 60 00 00 lis r11,0 ffc0d9d8: 81 2b 28 40 lwz r9,10304(r11) if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; ffc0d9dc: 39 40 00 01 li r10,1 ffc0d9e0: 91 44 00 08 stw r10,8(r4) ffc0d9e4: 3d 80 00 00 lis r12,0 _Watchdog_Sync_count++; ffc0d9e8: 39 29 00 01 addi r9,r9,1 ffc0d9ec: 91 2b 28 40 stw r9,10304(r11) restart: delta_interval = the_watchdog->initial; ffc0d9f0: 81 24 00 0c lwz r9,12(r4) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0d9f4: 81 43 00 00 lwz r10,0(r3) for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d9f8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d9fc: 41 9e 00 98 beq- cr7,ffc0da94 <_Watchdog_Insert+0xe4> ffc0da00: 81 0a 00 00 lwz r8,0(r10) ffc0da04: 2f 88 00 00 cmpwi cr7,r8,0 ffc0da08: 41 9e 00 8c beq- cr7,ffc0da94 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0da0c: 81 0a 00 10 lwz r8,16(r10) ffc0da10: 7f 89 40 40 cmplw cr7,r9,r8 ffc0da14: 41 9c 00 c8 blt- cr7,ffc0dadc <_Watchdog_Insert+0x12c> after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0da18: 7d 28 48 50 subf r9,r8,r9 static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0da1c: 7d 00 00 a6 mfmsr r8 ffc0da20: 7c e0 01 24 mtmsr r7 ffc0da24: 7d 00 01 24 mtmsr r8 _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0da28: 81 04 00 08 lwz r8,8(r4) ffc0da2c: 2f 88 00 01 cmpwi cr7,r8,1 ffc0da30: 40 9e 00 94 bne- cr7,ffc0dac4 <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0da34: 81 0c 28 38 lwz r8,10296(r12) ffc0da38: 38 ac 28 38 addi r5,r12,10296 ffc0da3c: 7f 86 40 40 cmplw cr7,r6,r8 ffc0da40: 40 bc 00 48 bge+ cr7,ffc0da88 <_Watchdog_Insert+0xd8> ffc0da44: 48 00 00 d4 b ffc0db18 <_Watchdog_Insert+0x168> for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0da48: 81 0a 00 00 lwz r8,0(r10) ffc0da4c: 2f 88 00 00 cmpwi cr7,r8,0 ffc0da50: 41 9e 00 44 beq- cr7,ffc0da94 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0da54: 81 0a 00 10 lwz r8,16(r10) ffc0da58: 7f 88 48 40 cmplw cr7,r8,r9 ffc0da5c: 41 9d 00 80 bgt- cr7,ffc0dadc <_Watchdog_Insert+0x12c> after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0da60: 7d 28 48 50 subf r9,r8,r9 ffc0da64: 7d 00 00 a6 mfmsr r8 ffc0da68: 7c e0 01 24 mtmsr r7 ffc0da6c: 7d 00 01 24 mtmsr r8 _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0da70: 81 04 00 08 lwz r8,8(r4) ffc0da74: 2f 88 00 01 cmpwi cr7,r8,1 ffc0da78: 40 9e 00 4c bne- cr7,ffc0dac4 <_Watchdog_Insert+0x114> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0da7c: 81 05 00 00 lwz r8,0(r5) ffc0da80: 7f 86 40 40 cmplw cr7,r6,r8 ffc0da84: 41 9c 00 94 blt- cr7,ffc0db18 <_Watchdog_Insert+0x168> <== NEVER TAKEN for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0da88: 2f 89 00 00 cmpwi cr7,r9,0 exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } ffc0da8c: 81 4a 00 00 lwz r10,0(r10) for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0da90: 40 9e ff b8 bne+ cr7,ffc0da48 <_Watchdog_Insert+0x98> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0da94: 81 4a 00 04 lwz r10,4(r10) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0da98: 3c a0 00 00 lis r5,0 ffc0da9c: 80 a5 28 44 lwz r5,10308(r5) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; ffc0daa0: 38 60 00 02 li r3,2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0daa4: 81 0a 00 00 lwz r8,0(r10) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0daa8: 91 44 00 04 stw r10,4(r4) ffc0daac: 90 64 00 08 stw r3,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0dab0: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; ffc0dab4: 90 8a 00 00 stw r4,0(r10) the_node->next = before_node; before_node->previous = the_node; ffc0dab8: 90 88 00 04 stw r4,4(r8) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0dabc: 91 04 00 00 stw r8,0(r4) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0dac0: 90 a4 00 14 stw r5,20(r4) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; ffc0dac4: 90 cc 28 38 stw r6,10296(r12) _Watchdog_Sync_count--; ffc0dac8: 81 2b 28 40 lwz r9,10304(r11) ffc0dacc: 39 29 ff ff addi r9,r9,-1 ffc0dad0: 91 2b 28 40 stw r9,10304(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0dad4: 7c e0 01 24 mtmsr r7 ffc0dad8: 4e 80 00 20 blr if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; ffc0dadc: 7d 09 40 50 subf r8,r9,r8 ffc0dae0: 91 0a 00 10 stw r8,16(r10) the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0dae4: 3c a0 00 00 lis r5,0 ffc0dae8: 38 60 00 02 li r3,2 _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0daec: 81 4a 00 04 lwz r10,4(r10) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0daf0: 80 a5 28 44 lwz r5,10308(r5) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0daf4: 81 0a 00 00 lwz r8,0(r10) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0daf8: 91 44 00 04 stw r10,4(r4) ffc0dafc: 90 64 00 08 stw r3,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0db00: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; ffc0db04: 90 8a 00 00 stw r4,0(r10) the_node->next = before_node; before_node->previous = the_node; ffc0db08: 90 88 00 04 stw r4,4(r8) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0db0c: 91 04 00 00 stw r8,0(r4) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0db10: 90 a4 00 14 stw r5,20(r4) ffc0db14: 4b ff ff b0 b ffc0dac4 <_Watchdog_Insert+0x114> if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; ffc0db18: 90 cc 28 38 stw r6,10296(r12) goto restart; ffc0db1c: 4b ff fe d4 b ffc0d9f0 <_Watchdog_Insert+0x40> =============================================================================== ffc0db78 <_Watchdog_Remove>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0db78: 7d 40 00 a6 mfmsr r10 ffc0db7c: 7d 30 42 a6 mfsprg r9,0 ffc0db80: 7d 49 48 78 andc r9,r10,r9 ffc0db84: 7d 20 01 24 mtmsr r9 ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; ffc0db88: 81 23 00 08 lwz r9,8(r3) switch ( previous_state ) { ffc0db8c: 2f 89 00 01 cmpwi cr7,r9,1 ffc0db90: 41 9e 00 98 beq- cr7,ffc0dc28 <_Watchdog_Remove+0xb0> ffc0db94: 2b 89 00 01 cmplwi cr7,r9,1 ffc0db98: 40 9c 00 1c bge- cr7,ffc0dbb4 <_Watchdog_Remove+0x3c> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0db9c: 3d 00 00 00 lis r8,0 ffc0dba0: 81 08 28 44 lwz r8,10308(r8) ffc0dba4: 91 03 00 18 stw r8,24(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0dba8: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); return( previous_state ); } ffc0dbac: 7d 23 4b 78 mr r3,r9 ffc0dbb0: 4e 80 00 20 blr Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { ffc0dbb4: 2b 89 00 03 cmplwi cr7,r9,3 ffc0dbb8: 41 bd ff e4 bgt- cr7,ffc0db9c <_Watchdog_Remove+0x24> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; ffc0dbbc: 39 00 00 00 li r8,0 ffc0dbc0: 91 03 00 08 stw r8,8(r3) } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } ffc0dbc4: 81 03 00 00 lwz r8,0(r3) case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) ffc0dbc8: 80 e8 00 00 lwz r7,0(r8) ffc0dbcc: 2f 87 00 00 cmpwi cr7,r7,0 ffc0dbd0: 41 9e 00 14 beq- cr7,ffc0dbe4 <_Watchdog_Remove+0x6c> next_watchdog->delta_interval += the_watchdog->delta_interval; ffc0dbd4: 80 c8 00 10 lwz r6,16(r8) ffc0dbd8: 80 e3 00 10 lwz r7,16(r3) ffc0dbdc: 7c e6 3a 14 add r7,r6,r7 ffc0dbe0: 90 e8 00 10 stw r7,16(r8) if ( _Watchdog_Sync_count ) ffc0dbe4: 3c e0 00 00 lis r7,0 ffc0dbe8: 80 e7 28 40 lwz r7,10304(r7) ffc0dbec: 2f 87 00 00 cmpwi cr7,r7,0 ffc0dbf0: 41 9e 00 14 beq- cr7,ffc0dc04 <_Watchdog_Remove+0x8c> _Watchdog_Sync_level = _ISR_Nest_level; ffc0dbf4: 3c e0 00 00 lis r7,0 ffc0dbf8: 80 c7 2e 08 lwz r6,11784(r7) ffc0dbfc: 3c e0 00 00 lis r7,0 ffc0dc00: 90 c7 28 38 stw r6,10296(r7) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0dc04: 80 e3 00 04 lwz r7,4(r3) next->previous = previous; ffc0dc08: 90 e8 00 04 stw r7,4(r8) previous->next = next; ffc0dc0c: 91 07 00 00 stw r8,0(r7) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0dc10: 3d 00 00 00 lis r8,0 ffc0dc14: 81 08 28 44 lwz r8,10308(r8) ffc0dc18: 91 03 00 18 stw r8,24(r3) ffc0dc1c: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); return( previous_state ); } ffc0dc20: 7d 23 4b 78 mr r3,r9 ffc0dc24: 4e 80 00 20 blr /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; ffc0dc28: 39 00 00 00 li r8,0 ffc0dc2c: 91 03 00 08 stw r8,8(r3) _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0dc30: 3d 00 00 00 lis r8,0 ffc0dc34: 81 08 28 44 lwz r8,10308(r8) ffc0dc38: 91 03 00 18 stw r8,24(r3) ffc0dc3c: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); return( previous_state ); } ffc0dc40: 7d 23 4b 78 mr r3,r9 ffc0dc44: 4e 80 00 20 blr =============================================================================== ffc0f0f0 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { ffc0f0f0: 94 21 ff e8 stwu r1,-24(r1) ffc0f0f4: 7c 08 02 a6 mflr r0 ffc0f0f8: 93 a1 00 0c stw r29,12(r1) ffc0f0fc: 7c 7d 1b 78 mr r29,r3 ffc0f100: 93 c1 00 10 stw r30,16(r1) ffc0f104: 7c 9e 23 78 mr r30,r4 ffc0f108: 90 01 00 1c stw r0,28(r1) ffc0f10c: 93 81 00 08 stw r28,8(r1) ffc0f110: 93 e1 00 14 stw r31,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0f114: 7f 80 00 a6 mfmsr r28 ffc0f118: 7d 30 42 a6 mfsprg r9,0 ffc0f11c: 7f 89 48 78 andc r9,r28,r9 ffc0f120: 7d 20 01 24 mtmsr r9 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); ffc0f124: 3c 60 ff c2 lis r3,-62 ffc0f128: 7f c5 f3 78 mr r5,r30 ffc0f12c: 38 63 0b 60 addi r3,r3,2912 ffc0f130: 7f a4 eb 78 mr r4,r29 ffc0f134: 4c c6 31 82 crclr 4*cr1+eq ffc0f138: 4b ff 76 6d bl ffc067a4 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0f13c: 83 fe 00 00 lwz r31,0(r30) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0f140: 3b de 00 04 addi r30,r30,4 if ( !_Chain_Is_empty( header ) ) { ffc0f144: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0f148: 41 9e 00 54 beq- cr7,ffc0f19c <_Watchdog_Report_chain+0xac> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); ffc0f14c: 7f e4 fb 78 mr r4,r31 ffc0f150: 38 60 00 00 li r3,0 ffc0f154: 48 00 00 5d bl ffc0f1b0 <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; node != _Chain_Tail(header) ; node = node->next ) ffc0f158: 83 ff 00 00 lwz r31,0(r31) Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; ffc0f15c: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0f160: 40 9e ff ec bne+ cr7,ffc0f14c <_Watchdog_Report_chain+0x5c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); ffc0f164: 3c 60 ff c2 lis r3,-62 ffc0f168: 38 63 0b 78 addi r3,r3,2936 ffc0f16c: 7f a4 eb 78 mr r4,r29 ffc0f170: 4c c6 31 82 crclr 4*cr1+eq ffc0f174: 4b ff 76 31 bl ffc067a4 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0f178: 7f 80 01 24 mtmsr r28 } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } ffc0f17c: 80 01 00 1c lwz r0,28(r1) ffc0f180: 83 81 00 08 lwz r28,8(r1) ffc0f184: 7c 08 03 a6 mtlr r0 ffc0f188: 83 a1 00 0c lwz r29,12(r1) ffc0f18c: 83 c1 00 10 lwz r30,16(r1) ffc0f190: 83 e1 00 14 lwz r31,20(r1) ffc0f194: 38 21 00 18 addi r1,r1,24 ffc0f198: 4e 80 00 20 blr _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); ffc0f19c: 3c 60 ff c2 lis r3,-62 ffc0f1a0: 38 63 0b 88 addi r3,r3,2952 ffc0f1a4: 4c c6 31 82 crclr 4*cr1+eq ffc0f1a8: 4b ff 75 fd bl ffc067a4 ffc0f1ac: 4b ff ff cc b ffc0f178 <_Watchdog_Report_chain+0x88> =============================================================================== ffc0dc48 <_Watchdog_Tickle>: #include void _Watchdog_Tickle( Chain_Control *header ) { ffc0dc48: 94 21 ff e8 stwu r1,-24(r1) ffc0dc4c: 7c 08 02 a6 mflr r0 ffc0dc50: 90 01 00 1c stw r0,28(r1) ffc0dc54: 93 a1 00 0c stw r29,12(r1) ffc0dc58: 7c 7d 1b 78 mr r29,r3 ffc0dc5c: 93 81 00 08 stw r28,8(r1) ffc0dc60: 93 c1 00 10 stw r30,16(r1) ffc0dc64: 93 e1 00 14 stw r31,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0dc68: 7f c0 00 a6 mfmsr r30 ffc0dc6c: 7d 30 42 a6 mfsprg r9,0 ffc0dc70: 7f c9 48 78 andc r9,r30,r9 ffc0dc74: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0dc78: 83 e3 00 00 lwz r31,0(r3) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0dc7c: 3b 83 00 04 addi r28,r3,4 * volatile data - till, 2003/7 */ _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0dc80: 7f 9f e0 00 cmpw cr7,r31,r28 ffc0dc84: 41 9e 00 20 beq- cr7,ffc0dca4 <_Watchdog_Tickle+0x5c> * 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) { ffc0dc88: 81 3f 00 10 lwz r9,16(r31) ffc0dc8c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0dc90: 41 9e 00 74 beq- cr7,ffc0dd04 <_Watchdog_Tickle+0xbc> <== NEVER TAKEN the_watchdog->delta_interval--; ffc0dc94: 39 29 ff ff addi r9,r9,-1 if ( the_watchdog->delta_interval != 0 ) ffc0dc98: 2f 89 00 00 cmpwi cr7,r9,0 * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { the_watchdog->delta_interval--; ffc0dc9c: 91 3f 00 10 stw r9,16(r31) if ( the_watchdog->delta_interval != 0 ) ffc0dca0: 41 be 00 64 beq+ cr7,ffc0dd04 <_Watchdog_Tickle+0xbc> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0dca4: 7f c0 01 24 mtmsr r30 } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } ffc0dca8: 80 01 00 1c lwz r0,28(r1) ffc0dcac: 83 81 00 08 lwz r28,8(r1) ffc0dcb0: 7c 08 03 a6 mtlr r0 ffc0dcb4: 83 a1 00 0c lwz r29,12(r1) ffc0dcb8: 83 c1 00 10 lwz r30,16(r1) ffc0dcbc: 83 e1 00 14 lwz r31,20(r1) ffc0dcc0: 38 21 00 18 addi r1,r1,24 ffc0dcc4: 4e 80 00 20 blr _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( ffc0dcc8: 81 3f 00 1c lwz r9,28(r31) ffc0dccc: 80 7f 00 20 lwz r3,32(r31) ffc0dcd0: 80 9f 00 24 lwz r4,36(r31) ffc0dcd4: 7d 29 03 a6 mtctr r9 ffc0dcd8: 4e 80 04 21 bctrl static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0dcdc: 7f c0 00 a6 mfmsr r30 ffc0dce0: 7d 30 42 a6 mfsprg r9,0 ffc0dce4: 7f c9 48 78 andc r9,r30,r9 ffc0dce8: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0dcec: 83 fd 00 00 lwz r31,0(r29) _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); ffc0dcf0: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0dcf4: 41 be ff b0 beq- cr7,ffc0dca4 <_Watchdog_Tickle+0x5c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && ffc0dcf8: 81 3f 00 10 lwz r9,16(r31) ffc0dcfc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0dd00: 40 be ff a4 bne- cr7,ffc0dca4 <_Watchdog_Tickle+0x5c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); ffc0dd04: 7f e3 fb 78 mr r3,r31 ffc0dd08: 4b ff fe 71 bl ffc0db78 <_Watchdog_Remove> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0dd0c: 7f c0 01 24 mtmsr r30 _ISR_Enable( level ); switch( watchdog_state ) { ffc0dd10: 2f 83 00 02 cmpwi cr7,r3,2 ffc0dd14: 40 9e ff c8 bne+ cr7,ffc0dcdc <_Watchdog_Tickle+0x94> ffc0dd18: 4b ff ff b0 b ffc0dcc8 <_Watchdog_Tickle+0x80> =============================================================================== ffc0dd1c <_Workspace_Handler_initialization>: size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); ffc0dd1c: 3d 40 ff c2 lis r10,-62 void _Workspace_Handler_initialization( Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { ffc0dd20: 7d 80 00 26 mfcr r12 Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); ffc0dd24: 39 2a d5 38 addi r9,r10,-10952 void _Workspace_Handler_initialization( Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { ffc0dd28: 94 21 ff d0 stwu r1,-48(r1) ffc0dd2c: 7c 08 02 a6 mflr r0 Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); ffc0dd30: 89 09 00 32 lbz r8,50(r9) void _Workspace_Handler_initialization( Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { ffc0dd34: 93 21 00 14 stw r25,20(r1) ffc0dd38: 7c b9 2b 78 mr r25,r5 Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); ffc0dd3c: 2f 88 00 00 cmpwi cr7,r8,0 void _Workspace_Handler_initialization( Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { ffc0dd40: 93 61 00 1c stw r27,28(r1) ffc0dd44: 7c 9b 23 78 mr r27,r4 ffc0dd48: 93 81 00 20 stw r28,32(r1) ffc0dd4c: 90 01 00 34 stw r0,52(r1) Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); ffc0dd50: 83 8a d5 38 lwz r28,-10952(r10) ffc0dd54: 39 40 00 00 li r10,0 void _Workspace_Handler_initialization( Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { ffc0dd58: 93 01 00 10 stw r24,16(r1) ffc0dd5c: 93 41 00 18 stw r26,24(r1) ffc0dd60: 93 a1 00 24 stw r29,36(r1) ffc0dd64: 93 c1 00 28 stw r30,40(r1) ffc0dd68: 93 e1 00 2c stw r31,44(r1) ffc0dd6c: 91 81 00 0c stw r12,12(r1) Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); ffc0dd70: 40 9e 00 08 bne- cr7,ffc0dd78 <_Workspace_Handler_initialization+0x5c> ffc0dd74: 81 49 00 04 lwz r10,4(r9) bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { ffc0dd78: 2f 9b 00 00 cmpwi cr7,r27,0 size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); ffc0dd7c: 7f 8a e2 14 add r28,r10,r28 bool do_zero = rtems_configuration_get_do_zero_of_workspace(); ffc0dd80: 89 49 00 30 lbz r10,48(r9) bool unified = rtems_configuration_get_unified_work_area(); ffc0dd84: 89 29 00 31 lbz r9,49(r9) uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { ffc0dd88: 41 9e 00 a0 beq- cr7,ffc0de28 <_Workspace_Handler_initialization+0x10c><== NEVER TAKEN ffc0dd8c: 2e 0a 00 00 cmpwi cr4,r10,0 if ( area->size > overhead ) { uintptr_t space_available; uintptr_t size; if ( unified ) { ffc0dd90: 2d 89 00 00 cmpwi cr3,r9,0 Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; ffc0dd94: 3f 40 ff c1 lis r26,-63 } else { size = 0; } } space_available = (*init_or_extend)( ffc0dd98: 3f 00 00 00 lis r24,0 ffc0dd9c: 7c 7f 1b 78 mr r31,r3 bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { ffc0dda0: 3b a0 00 00 li r29,0 Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; ffc0dda4: 3b 5a b0 08 addi r26,r26,-20472 } else { size = 0; } } space_available = (*init_or_extend)( ffc0dda8: 3b 18 2c 94 addi r24,r24,11412 size_t i; for (i = 0; i < area_count; ++i) { Heap_Area *area = &areas [i]; if ( do_zero ) { ffc0ddac: 40 92 00 bc bne- cr4,ffc0de68 <_Workspace_Handler_initialization+0x14c> memset( area->begin, 0, area->size ); } if ( area->size > overhead ) { ffc0ddb0: 83 df 00 04 lwz r30,4(r31) ffc0ddb4: 2b 9e 00 16 cmplwi cr7,r30,22 ffc0ddb8: 40 9d 00 60 ble- cr7,ffc0de18 <_Workspace_Handler_initialization+0xfc> uintptr_t space_available; uintptr_t size; if ( unified ) { ffc0ddbc: 40 8e 00 1c bne- cr3,ffc0ddd8 <_Workspace_Handler_initialization+0xbc> size = area->size; } else { if ( remaining > 0 ) { ffc0ddc0: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0ddc4: 41 9e 00 b8 beq- cr7,ffc0de7c <_Workspace_Handler_initialization+0x160><== NEVER TAKEN size = remaining < area->size - overhead ? ffc0ddc8: 39 3e ff ea addi r9,r30,-22 remaining + overhead : area->size; ffc0ddcc: 7f 89 e0 40 cmplw cr7,r9,r28 ffc0ddd0: 40 9d 00 08 ble- cr7,ffc0ddd8 <_Workspace_Handler_initialization+0xbc><== NEVER TAKEN ffc0ddd4: 3b dc 00 16 addi r30,r28,22 } else { size = 0; } } space_available = (*init_or_extend)( ffc0ddd8: 7f c5 f3 78 mr r5,r30 ffc0dddc: 80 9f 00 00 lwz r4,0(r31) ffc0dde0: 7f 03 c3 78 mr r3,r24 ffc0dde4: 7f 49 03 a6 mtctr r26 ffc0dde8: 38 c0 00 08 li r6,8 ffc0ddec: 4e 80 04 21 bctrl area->begin, size, page_size ); area->begin = (char *) area->begin + size; ffc0ddf0: 81 5f 00 00 lwz r10,0(r31) area->size -= size; if ( space_available < remaining ) { ffc0ddf4: 7f 83 e0 40 cmplw cr7,r3,r28 size, page_size ); area->begin = (char *) area->begin + size; area->size -= size; ffc0ddf8: 81 3f 00 04 lwz r9,4(r31) area->begin, size, page_size ); area->begin = (char *) area->begin + size; ffc0ddfc: 7d 4a f2 14 add r10,r10,r30 area->size -= size; ffc0de00: 7f de 48 50 subf r30,r30,r9 area->begin, size, page_size ); area->begin = (char *) area->begin + size; ffc0de04: 91 5f 00 00 stw r10,0(r31) area->size -= size; ffc0de08: 93 df 00 04 stw r30,4(r31) if ( space_available < remaining ) { ffc0de0c: 40 9c 00 90 bge- cr7,ffc0de9c <_Workspace_Handler_initialization+0x180><== ALWAYS TAKEN remaining -= space_available; ffc0de10: 7f 83 e0 50 subf r28,r3,r28 <== NOT EXECUTED } else { remaining = 0; } init_or_extend = extend; ffc0de14: 7f 3a cb 78 mr r26,r25 <== NOT EXECUTED bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { ffc0de18: 3b bd 00 01 addi r29,r29,1 ffc0de1c: 7f 9d d8 00 cmpw cr7,r29,r27 ffc0de20: 3b ff 00 08 addi r31,r31,8 ffc0de24: 40 9e ff 88 bne+ cr7,ffc0ddac <_Workspace_Handler_initialization+0x90><== NEVER TAKEN init_or_extend = extend; } } if ( remaining > 0 ) { ffc0de28: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0de2c: 40 9e 00 7c bne- cr7,ffc0dea8 <_Workspace_Handler_initialization+0x18c> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } } ffc0de30: 80 01 00 34 lwz r0,52(r1) ffc0de34: 81 81 00 0c lwz r12,12(r1) ffc0de38: 7c 08 03 a6 mtlr r0 ffc0de3c: 83 01 00 10 lwz r24,16(r1) ffc0de40: 83 21 00 14 lwz r25,20(r1) ffc0de44: 7d 81 81 20 mtcrf 24,r12 ffc0de48: 83 41 00 18 lwz r26,24(r1) ffc0de4c: 83 61 00 1c lwz r27,28(r1) ffc0de50: 83 81 00 20 lwz r28,32(r1) ffc0de54: 83 a1 00 24 lwz r29,36(r1) ffc0de58: 83 c1 00 28 lwz r30,40(r1) ffc0de5c: 83 e1 00 2c lwz r31,44(r1) ffc0de60: 38 21 00 30 addi r1,r1,48 ffc0de64: 4e 80 00 20 blr for (i = 0; i < area_count; ++i) { Heap_Area *area = &areas [i]; if ( do_zero ) { memset( area->begin, 0, area->size ); ffc0de68: 80 7f 00 00 lwz r3,0(r31) ffc0de6c: 38 80 00 00 li r4,0 ffc0de70: 80 bf 00 04 lwz r5,4(r31) ffc0de74: 48 00 4f fd bl ffc12e70 ffc0de78: 4b ff ff 38 b ffc0ddb0 <_Workspace_Handler_initialization+0x94> } else { size = 0; } } space_available = (*init_or_extend)( ffc0de7c: 7f 49 03 a6 mtctr r26 <== NOT EXECUTED ffc0de80: 7f 03 c3 78 mr r3,r24 <== NOT EXECUTED ffc0de84: 80 9f 00 00 lwz r4,0(r31) <== NOT EXECUTED ffc0de88: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc0de8c: 38 c0 00 08 li r6,8 <== NOT EXECUTED remaining -= space_available; } else { remaining = 0; } init_or_extend = extend; ffc0de90: 7f 3a cb 78 mr r26,r25 <== NOT EXECUTED } else { size = 0; } } space_available = (*init_or_extend)( ffc0de94: 4e 80 04 21 bctrl <== NOT EXECUTED ffc0de98: 4b ff ff 80 b ffc0de18 <_Workspace_Handler_initialization+0xfc><== NOT EXECUTED remaining -= space_available; } else { remaining = 0; } init_or_extend = extend; ffc0de9c: 7f 3a cb 78 mr r26,r25 area->size -= size; if ( space_available < remaining ) { remaining -= space_available; } else { remaining = 0; ffc0dea0: 3b 80 00 00 li r28,0 ffc0dea4: 4b ff ff 74 b ffc0de18 <_Workspace_Handler_initialization+0xfc> init_or_extend = extend; } } if ( remaining > 0 ) { _Internal_error_Occurred( ffc0dea8: 38 60 00 00 li r3,0 ffc0deac: 38 80 00 01 li r4,1 ffc0deb0: 38 a0 00 02 li r5,2 ffc0deb4: 4b ff d4 65 bl ffc0b318 <_Internal_error_Occurred> =============================================================================== ffc0d864 <_Workspace_String_duplicate>: char *_Workspace_String_duplicate( const char *string, size_t len ) { ffc0d864: 94 21 ff e8 stwu r1,-24(r1) ffc0d868: 7c 08 02 a6 mflr r0 ffc0d86c: 93 a1 00 0c stw r29,12(r1) ffc0d870: 7c 7d 1b 78 mr r29,r3 char *dup = _Workspace_Allocate(len + 1); ffc0d874: 38 64 00 01 addi r3,r4,1 char *_Workspace_String_duplicate( const char *string, size_t len ) { ffc0d878: 93 c1 00 10 stw r30,16(r1) ffc0d87c: 93 e1 00 14 stw r31,20(r1) ffc0d880: 7c 9f 23 78 mr r31,r4 ffc0d884: 90 01 00 1c stw r0,28(r1) char *dup = _Workspace_Allocate(len + 1); ffc0d888: 4b ff ff 6d bl ffc0d7f4 <_Workspace_Allocate> if (dup != NULL) { ffc0d88c: 7c 7e 1b 79 mr. r30,r3 ffc0d890: 41 82 00 18 beq- ffc0d8a8 <_Workspace_String_duplicate+0x44><== NEVER TAKEN dup [len] = '\0'; ffc0d894: 39 20 00 00 li r9,0 ffc0d898: 7d 3e f9 ae stbx r9,r30,r31 memcpy(dup, string, len); ffc0d89c: 7f a4 eb 78 mr r4,r29 ffc0d8a0: 7f e5 fb 78 mr r5,r31 ffc0d8a4: 48 00 4d 19 bl ffc125bc } return dup; } ffc0d8a8: 80 01 00 1c lwz r0,28(r1) ffc0d8ac: 7f c3 f3 78 mr r3,r30 ffc0d8b0: 83 a1 00 0c lwz r29,12(r1) ffc0d8b4: 7c 08 03 a6 mtlr r0 ffc0d8b8: 83 c1 00 10 lwz r30,16(r1) ffc0d8bc: 83 e1 00 14 lwz r31,20(r1) ffc0d8c0: 38 21 00 18 addi r1,r1,24 ffc0d8c4: 4e 80 00 20 blr =============================================================================== ffc0a900 : rtems_rbtree_control *chunk_tree, rtems_rbheap_chunk *a, rtems_rbheap_chunk *b ) { if (b != NULL_PAGE && rtems_rbheap_is_chunk_free(b)) { ffc0a900: 2f 86 ff f8 cmpwi cr7,r6,-8 rtems_chain_control *free_chain, rtems_rbtree_control *chunk_tree, rtems_rbheap_chunk *a, rtems_rbheap_chunk *b ) { ffc0a904: 7c 6a 1b 78 mr r10,r3 if (b != NULL_PAGE && rtems_rbheap_is_chunk_free(b)) { ffc0a908: 4d 9e 00 20 beqlr cr7 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain( const Chain_Node *node ) { return (node->next == NULL) && (node->previous == NULL); ffc0a90c: 81 26 00 00 lwz r9,0(r6) ffc0a910: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a914: 41 9e 00 60 beq- cr7,ffc0a974 if (b->begin < a->begin) { ffc0a918: 80 e6 00 18 lwz r7,24(r6) ffc0a91c: 81 05 00 18 lwz r8,24(r5) ffc0a920: 7f 87 40 40 cmplw cr7,r7,r8 ffc0a924: 40 9c 00 14 bge- cr7,ffc0a938 ffc0a928: 7c a8 2b 78 mr r8,r5 ffc0a92c: 81 25 00 00 lwz r9,0(r5) ffc0a930: 7c c5 33 78 mr r5,r6 ffc0a934: 7d 06 43 78 mr r6,r8 a = b; b = t; } a->size += b->size; ffc0a938: 80 65 00 1c lwz r3,28(r5) ffc0a93c: 80 e6 00 1c lwz r7,28(r6) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0a940: 81 06 00 04 lwz r8,4(r6) ffc0a944: 7c e3 3a 14 add r7,r3,r7 ffc0a948: 90 e5 00 1c stw r7,28(r5) rtems_chain_extract_unprotected(&b->chain_node); add_to_chain(free_chain, b); _RBTree_Extract_unprotected(chunk_tree, &b->tree_node); ffc0a94c: 7c 83 23 78 mr r3,r4 ffc0a950: 38 86 00 08 addi r4,r6,8 next->previous = previous; previous->next = next; ffc0a954: 91 28 00 00 stw r9,0(r8) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0a958: 80 ea 00 00 lwz r7,0(r10) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0a95c: 91 09 00 04 stw r8,4(r9) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; ffc0a960: 90 ca 00 00 stw r6,0(r10) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0a964: 91 46 00 04 stw r10,4(r6) before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0a968: 90 e6 00 00 stw r7,0(r6) before_node->previous = the_node; ffc0a96c: 90 c7 00 04 stw r6,4(r7) ffc0a970: 48 00 1f 50 b ffc0c8c0 <_RBTree_Extract_unprotected> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain( const Chain_Node *node ) { return (node->next == NULL) && (node->previous == NULL); ffc0a974: 81 06 00 04 lwz r8,4(r6) ffc0a978: 2f 88 00 00 cmpwi cr7,r8,0 ffc0a97c: 40 9e ff 9c bne+ cr7,ffc0a918 <== NEVER TAKEN ffc0a980: 4e 80 00 20 blr =============================================================================== ffc0a588 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { ffc0a588: 94 21 ff d0 stwu r1,-48(r1) ffc0a58c: 7c 08 02 a6 mflr r0 ffc0a590: 93 e1 00 2c stw r31,44(r1) ffc0a594: 90 01 00 34 stw r0,52(r1) ffc0a598: 93 61 00 1c stw r27,28(r1) ffc0a59c: 7c db 33 78 mr r27,r6 ffc0a5a0: 93 81 00 20 stw r28,32(r1) ffc0a5a4: 7c 7c 1b 78 mr r28,r3 ffc0a5a8: 93 a1 00 24 stw r29,36(r1) ffc0a5ac: 7c 9d 23 78 mr r29,r4 ffc0a5b0: 93 c1 00 28 stw r30,40(r1) ffc0a5b4: 7c be 2b 78 mr r30,r5 */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); ffc0a5b8: 7f 83 e3 78 mr r3,r28 ffc0a5bc: 48 00 06 e1 bl ffc0ac9c <_Chain_Get> while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( ffc0a5c0: 38 80 00 00 li r4,0 rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ffc0a5c4: 7c 7f 1b 79 mr. r31,r3 ) { rtems_event_set out; sc = rtems_event_receive( ffc0a5c8: 7f c5 f3 78 mr r5,r30 ffc0a5cc: 38 c1 00 08 addi r6,r1,8 ffc0a5d0: 7f a3 eb 78 mr r3,r29 rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ffc0a5d4: 40 82 00 38 bne- ffc0a60c ) { rtems_event_set out; sc = rtems_event_receive( ffc0a5d8: 4b ff f0 11 bl ffc095e8 ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( ffc0a5dc: 2c 03 00 00 cmpwi r3,0 ffc0a5e0: 41 82 ff d8 beq+ ffc0a5b8 <== NEVER TAKEN } *node_ptr = node; return sc; } ffc0a5e4: 80 01 00 34 lwz r0,52(r1) timeout, &out ); } *node_ptr = node; ffc0a5e8: 93 fb 00 00 stw r31,0(r27) return sc; } ffc0a5ec: 7c 08 03 a6 mtlr r0 ffc0a5f0: 83 61 00 1c lwz r27,28(r1) ffc0a5f4: 83 81 00 20 lwz r28,32(r1) ffc0a5f8: 83 a1 00 24 lwz r29,36(r1) ffc0a5fc: 83 c1 00 28 lwz r30,40(r1) ffc0a600: 83 e1 00 2c lwz r31,44(r1) ffc0a604: 38 21 00 30 addi r1,r1,48 ffc0a608: 4e 80 00 20 blr ffc0a60c: 80 01 00 34 lwz r0,52(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ffc0a610: 38 60 00 00 li r3,0 timeout, &out ); } *node_ptr = node; ffc0a614: 93 fb 00 00 stw r31,0(r27) return sc; } ffc0a618: 7c 08 03 a6 mtlr r0 ffc0a61c: 83 61 00 1c lwz r27,28(r1) ffc0a620: 83 81 00 20 lwz r28,32(r1) ffc0a624: 83 a1 00 24 lwz r29,36(r1) ffc0a628: 83 c1 00 28 lwz r30,40(r1) ffc0a62c: 83 e1 00 2c lwz r31,44(r1) ffc0a630: 38 21 00 30 addi r1,r1,48 ffc0a634: 4e 80 00 20 blr =============================================================================== ffc1497c : rtems_event_set *event_out ) { rtems_status_code sc; if ( event_out != NULL ) { ffc1497c: 7c ca 33 79 mr. r10,r6 ffc14980: 41 82 00 48 beq- ffc149c8 <== NEVER TAKEN Thread_Control *executing = _Thread_Executing; RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ]; Event_Control *event = &api->System_event; if ( !_Event_sets_Is_empty( event_in ) ) { ffc14984: 2f 83 00 00 cmpwi cr7,r3,0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc14988: 94 21 ff f0 stwu r1,-16(r1) ffc1498c: 7c 08 02 a6 mflr r0 rtems_status_code sc; if ( event_out != NULL ) { Thread_Control *executing = _Thread_Executing; ffc14990: 3d 00 00 00 lis r8,0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc14994: 93 e1 00 0c stw r31,12(r1) ffc14998: 90 01 00 14 stw r0,20(r1) rtems_status_code sc; if ( event_out != NULL ) { Thread_Control *executing = _Thread_Executing; ffc1499c: 83 e8 2e 50 lwz r31,11856(r8) RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc149a0: 81 1f 01 48 lwz r8,328(r31) Event_Control *event = &api->System_event; if ( !_Event_sets_Is_empty( event_in ) ) { ffc149a4: 40 9e 00 2c bne- cr7,ffc149d0 <== ALWAYS TAKEN } else { sc = RTEMS_INVALID_ADDRESS; } return sc; } ffc149a8: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED _Thread_Enable_dispatch(); sc = executing->Wait.return_code; } else { *event_out = event->pending_events; sc = RTEMS_SUCCESSFUL; ffc149ac: 38 60 00 00 li r3,0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); sc = executing->Wait.return_code; } else { *event_out = event->pending_events; ffc149b0: 81 28 00 04 lwz r9,4(r8) <== NOT EXECUTED } else { sc = RTEMS_INVALID_ADDRESS; } return sc; } ffc149b4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc149b8: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ); _Thread_Enable_dispatch(); sc = executing->Wait.return_code; } else { *event_out = event->pending_events; ffc149bc: 91 2a 00 00 stw r9,0(r10) <== NOT EXECUTED } else { sc = RTEMS_INVALID_ADDRESS; } return sc; } ffc149c0: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc149c4: 4e 80 00 20 blr <== NOT EXECUTED } else { *event_out = event->pending_events; sc = RTEMS_SUCCESSFUL; } } else { sc = RTEMS_INVALID_ADDRESS; ffc149c8: 38 60 00 09 li r3,9 <== NOT EXECUTED ffc149cc: 4e 80 00 20 blr <== NOT EXECUTED * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc149d0: 3d 20 00 00 lis r9,0 ffc149d4: 81 49 27 bc lwz r10,10172(r9) ++level; ffc149d8: 39 4a 00 01 addi r10,r10,1 _Thread_Dispatch_disable_level = level; ffc149dc: 91 49 27 bc stw r10,10172(r9) RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ]; Event_Control *event = &api->System_event; if ( !_Event_sets_Is_empty( event_in ) ) { _Thread_Disable_dispatch(); _Event_Seize( ffc149e0: 3d 20 00 00 lis r9,0 ffc149e4: 7f e7 fb 78 mr r7,r31 ffc149e8: 39 08 00 04 addi r8,r8,4 ffc149ec: 39 29 27 ec addi r9,r9,10220 ffc149f0: 3d 40 00 04 lis r10,4 ffc149f4: 4b ff 5e 7d bl ffc0a870 <_Event_Seize> executing, event, &_System_event_Sync_state, STATES_WAITING_FOR_SYSTEM_EVENT ); _Thread_Enable_dispatch(); ffc149f8: 4b ff 96 69 bl ffc0e060 <_Thread_Enable_dispatch> } else { sc = RTEMS_INVALID_ADDRESS; } return sc; } ffc149fc: 80 01 00 14 lwz r0,20(r1) &_System_event_Sync_state, STATES_WAITING_FOR_SYSTEM_EVENT ); _Thread_Enable_dispatch(); sc = executing->Wait.return_code; ffc14a00: 80 7f 00 34 lwz r3,52(r31) } else { sc = RTEMS_INVALID_ADDRESS; } return sc; } ffc14a04: 7c 08 03 a6 mtlr r0 ffc14a08: 83 e1 00 0c lwz r31,12(r1) ffc14a0c: 38 21 00 10 addi r1,r1,16 ffc14a10: 4e 80 00 20 blr =============================================================================== ffc09ca0 : rtems_status_code rtems_event_system_send( rtems_id id, rtems_event_set event_in ) { ffc09ca0: 94 21 ff e0 stwu r1,-32(r1) ffc09ca4: 7c 08 02 a6 mflr r0 ffc09ca8: 93 e1 00 1c stw r31,28(r1) ffc09cac: 7c 9f 23 78 mr r31,r4 rtems_status_code sc; Thread_Control *thread; Objects_Locations location; RTEMS_API_Control *api; thread = _Thread_Get( id, &location ); ffc09cb0: 38 81 00 08 addi r4,r1,8 rtems_status_code rtems_event_system_send( rtems_id id, rtems_event_set event_in ) { ffc09cb4: 90 01 00 24 stw r0,36(r1) rtems_status_code sc; Thread_Control *thread; Objects_Locations location; RTEMS_API_Control *api; thread = _Thread_Get( id, &location ); ffc09cb8: 48 00 2d 81 bl ffc0ca38 <_Thread_Get> switch ( location ) { ffc09cbc: 81 21 00 08 lwz r9,8(r1) ffc09cc0: 2f 89 00 00 cmpwi cr7,r9,0 ffc09cc4: 40 9e 00 3c bne- cr7,ffc09d00 <== NEVER TAKEN case OBJECTS_LOCAL: api = thread->API_Extensions[ THREAD_API_RTEMS ]; _Event_Surrender( ffc09cc8: 80 a3 01 48 lwz r5,328(r3) ffc09ccc: 3c c0 00 00 lis r6,0 ffc09cd0: 7f e4 fb 78 mr r4,r31 ffc09cd4: 38 a5 00 04 addi r5,r5,4 ffc09cd8: 38 c6 28 54 addi r6,r6,10324 ffc09cdc: 3c e0 00 04 lis r7,4 ffc09ce0: 4b ff f8 4d bl ffc0952c <_Event_Surrender> event_in, &api->System_event, &_System_event_Sync_state, STATES_WAITING_FOR_SYSTEM_EVENT ); _Thread_Enable_dispatch(); ffc09ce4: 48 00 2d 39 bl ffc0ca1c <_Thread_Enable_dispatch> sc = RTEMS_INVALID_ID; break; } return sc; } ffc09ce8: 80 01 00 24 lwz r0,36(r1) ffc09cec: 83 e1 00 1c lwz r31,28(r1) &api->System_event, &_System_event_Sync_state, STATES_WAITING_FOR_SYSTEM_EVENT ); _Thread_Enable_dispatch(); sc = RTEMS_SUCCESSFUL; ffc09cf0: 38 60 00 00 li r3,0 sc = RTEMS_INVALID_ID; break; } return sc; } ffc09cf4: 7c 08 03 a6 mtlr r0 ffc09cf8: 38 21 00 20 addi r1,r1,32 ffc09cfc: 4e 80 00 20 blr ffc09d00: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED case OBJECTS_REMOTE: sc = RTEMS_ILLEGAL_ON_REMOTE_OBJECT; break; #endif default: sc = RTEMS_INVALID_ID; ffc09d04: 38 60 00 04 li r3,4 <== NOT EXECUTED break; } return sc; } ffc09d08: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc09d0c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc09d10: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc09d14: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0b994 : rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0b994: 3d 20 00 00 lis r9,0 ffc0b998: 81 49 2e 48 lwz r10,11848(r9) rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; ffc0b99c: 3d 20 00 00 lis r9,0 ffc0b9a0: 81 09 27 f4 lwz r8,10228(r9) if ( rtems_interrupt_is_in_progress() ) ffc0b9a4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0b9a8: 41 9e 00 0c beq- cr7,ffc0b9b4 return RTEMS_CALLED_FROM_ISR; ffc0b9ac: 38 60 00 12 li r3,18 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0b9b0: 4e 80 00 20 blr rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) ffc0b9b4: 2f 85 00 00 cmpwi cr7,r5,0 ffc0b9b8: 41 9e 00 50 beq- cr7,ffc0ba08 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) ffc0b9bc: 2f 84 00 00 cmpwi cr7,r4,0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; ffc0b9c0: 91 05 00 00 stw r8,0(r5) if ( driver_table == NULL ) ffc0b9c4: 41 9e 00 44 beq- cr7,ffc0ba08 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { ffc0b9c8: 94 21 ff f0 stwu r1,-16(r1) ffc0b9cc: 7c 08 02 a6 mflr r0 ffc0b9d0: 90 01 00 14 stw r0,20(r1) static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0b9d4: 81 44 00 00 lwz r10,0(r4) rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { ffc0b9d8: 93 e1 00 0c stw r31,12(r1) ffc0b9dc: 7c 7f 1b 78 mr r31,r3 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0b9e0: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0b9e4: 41 9e 00 2c beq- cr7,ffc0ba10 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc0b9e8: 7f 88 f8 40 cmplw cr7,r8,r31 return RTEMS_INVALID_NUMBER; ffc0b9ec: 38 60 00 0a li r3,10 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc0b9f0: 41 9d 00 34 bgt- cr7,ffc0ba24 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0b9f4: 80 01 00 14 lwz r0,20(r1) ffc0b9f8: 83 e1 00 0c lwz r31,12(r1) ffc0b9fc: 7c 08 03 a6 mtlr r0 ffc0ba00: 38 21 00 10 addi r1,r1,16 ffc0ba04: 4e 80 00 20 blr /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; ffc0ba08: 38 60 00 09 li r3,9 ffc0ba0c: 4e 80 00 20 blr static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0ba10: 81 44 00 04 lwz r10,4(r4) ffc0ba14: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0ba18: 40 9e ff d0 bne+ cr7,ffc0b9e8 if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; ffc0ba1c: 38 60 00 09 li r3,9 ffc0ba20: 4b ff ff d4 b ffc0b9f4 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc0ba24: 3d 40 00 00 lis r10,0 ffc0ba28: 81 0a 27 bc lwz r8,10172(r10) ++level; ffc0ba2c: 39 08 00 01 addi r8,r8,1 _Thread_Dispatch_disable_level = level; ffc0ba30: 91 0a 27 bc stw r8,10172(r10) if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { ffc0ba34: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0ba38: 41 9e 00 2c beq- cr7,ffc0ba64 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0ba3c: 3d 00 00 00 lis r8,0 ffc0ba40: 1d 5f 00 18 mulli r10,r31,24 ffc0ba44: 81 28 27 f8 lwz r9,10232(r8) static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0ba48: 7c e9 50 2e lwzx r7,r9,r10 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0ba4c: 7d 29 52 14 add r9,r9,r10 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0ba50: 2f 87 00 00 cmpwi cr7,r7,0 ffc0ba54: 41 9e 00 cc beq- cr7,ffc0bb20 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); ffc0ba58: 48 00 26 09 bl ffc0e060 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; ffc0ba5c: 38 60 00 0c li r3,12 ffc0ba60: 4b ff ff 94 b ffc0b9f4 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; ffc0ba64: 80 e9 27 f4 lwz r7,10228(r9) rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { ffc0ba68: 2f 87 00 00 cmpwi cr7,r7,0 ffc0ba6c: 41 9e 00 a4 beq- cr7,ffc0bb10 <== NEVER TAKEN ffc0ba70: 3d 00 00 00 lis r8,0 ffc0ba74: 7c e9 03 a6 mtctr r7 ffc0ba78: 81 28 27 f8 lwz r9,10232(r8) ffc0ba7c: 48 00 00 10 b ffc0ba8c ffc0ba80: 3b ff 00 01 addi r31,r31,1 ffc0ba84: 39 29 00 18 addi r9,r9,24 ffc0ba88: 42 40 00 88 bdz- ffc0bb10 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0ba8c: 81 49 00 00 lwz r10,0(r9) ffc0ba90: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0ba94: 40 9e ff ec bne+ cr7,ffc0ba80 ffc0ba98: 81 49 00 04 lwz r10,4(r9) ffc0ba9c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0baa0: 40 9e ff e0 bne+ cr7,ffc0ba80 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) ffc0baa4: 7f 87 f8 00 cmpw cr7,r7,r31 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0baa8: 93 e5 00 00 stw r31,0(r5) ffc0baac: 1d 5f 00 18 mulli r10,r31,24 if ( m != n ) ffc0bab0: 41 9e 00 64 beq- cr7,ffc0bb14 <== NEVER TAKEN } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; ffc0bab4: 81 08 27 f8 lwz r8,10232(r8) ffc0bab8: 80 64 00 04 lwz r3,4(r4) ffc0babc: 80 a4 00 08 lwz r5,8(r4) ffc0bac0: 7d 28 52 14 add r9,r8,r10 ffc0bac4: 80 e4 00 00 lwz r7,0(r4) ffc0bac8: 80 c4 00 0c lwz r6,12(r4) ffc0bacc: 7c e8 51 2e stwx r7,r8,r10 ffc0bad0: 90 69 00 04 stw r3,4(r9) ffc0bad4: 90 a9 00 08 stw r5,8(r9) ffc0bad8: 90 c9 00 0c stw r6,12(r9) ffc0badc: 81 04 00 10 lwz r8,16(r4) ffc0bae0: 81 44 00 14 lwz r10,20(r4) ffc0bae4: 91 09 00 10 stw r8,16(r9) ffc0bae8: 91 49 00 14 stw r10,20(r9) _Thread_Enable_dispatch(); ffc0baec: 48 00 25 75 bl ffc0e060 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); } ffc0baf0: 80 01 00 14 lwz r0,20(r1) _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); ffc0baf4: 7f e3 fb 78 mr r3,r31 } ffc0baf8: 83 e1 00 0c lwz r31,12(r1) ffc0bafc: 7c 08 03 a6 mtlr r0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); ffc0bb00: 38 80 00 00 li r4,0 ffc0bb04: 38 a0 00 00 li r5,0 } ffc0bb08: 38 21 00 10 addi r1,r1,16 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); ffc0bb0c: 48 00 93 e4 b ffc14ef0 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0bb10: 93 e5 00 00 stw r31,0(r5) if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); ffc0bb14: 48 00 25 4d bl ffc0e060 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; ffc0bb18: 38 60 00 05 li r3,5 if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); return sc; ffc0bb1c: 4b ff fe d8 b ffc0b9f4 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0bb20: 81 29 00 04 lwz r9,4(r9) ffc0bb24: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bb28: 40 9e ff 30 bne+ cr7,ffc0ba58 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; ffc0bb2c: 93 e5 00 00 stw r31,0(r5) ffc0bb30: 4b ff ff 84 b ffc0bab4 =============================================================================== ffc0cfd0 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0cfd0: 94 21 ff e0 stwu r1,-32(r1) ffc0cfd4: 7c 08 02 a6 mflr r0 ffc0cfd8: 93 a1 00 14 stw r29,20(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0cfdc: 7c 7d 1b 79 mr. r29,r3 #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0cfe0: 90 01 00 24 stw r0,36(r1) ffc0cfe4: 93 61 00 0c stw r27,12(r1) ffc0cfe8: 93 81 00 10 stw r28,16(r1) ffc0cfec: 93 c1 00 18 stw r30,24(r1) ffc0cff0: 93 e1 00 1c stw r31,28(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0cff4: 41 82 00 70 beq- ffc0d064 <== NEVER TAKEN ffc0cff8: 3f 80 00 00 lis r28,0 ffc0cffc: 3b 9c 30 18 addi r28,r28,12312 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) ffc0d000: 3b 7c 00 0c addi r27,r28,12 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) ffc0d004: 85 3c 00 04 lwzu r9,4(r28) ffc0d008: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d00c: 41 9e 00 50 beq- cr7,ffc0d05c continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; ffc0d010: 83 c9 00 04 lwz r30,4(r9) if ( !information ) ffc0d014: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0d018: 41 9e 00 44 beq- cr7,ffc0d05c continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0d01c: a1 1e 00 10 lhz r8,16(r30) ffc0d020: 71 09 ff ff andi. r9,r8,65535 ffc0d024: 41 82 00 38 beq- ffc0d05c <== NEVER TAKEN ffc0d028: 3b e0 00 01 li r31,1 the_thread = (Thread_Control *)information->local_table[ i ]; ffc0d02c: 81 3e 00 1c lwz r9,28(r30) ffc0d030: 57 ea 10 3a rlwinm r10,r31,2,0,29 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0d034: 3b ff 00 01 addi r31,r31,1 the_thread = (Thread_Control *)information->local_table[ i ]; ffc0d038: 7c 69 50 2e lwzx r3,r9,r10 if ( !the_thread ) ffc0d03c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d040: 41 9e 00 10 beq- cr7,ffc0d050 continue; (*routine)(the_thread); ffc0d044: 7f a9 03 a6 mtctr r29 ffc0d048: 4e 80 04 21 bctrl ffc0d04c: a1 1e 00 10 lhz r8,16(r30) information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0d050: 55 09 04 3e clrlwi r9,r8,16 ffc0d054: 7f 89 f8 40 cmplw cr7,r9,r31 ffc0d058: 40 9c ff d4 bge+ cr7,ffc0d02c Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { ffc0d05c: 7f 9c d8 00 cmpw cr7,r28,r27 ffc0d060: 40 9e ff a4 bne+ cr7,ffc0d004 (*routine)(the_thread); } } } ffc0d064: 80 01 00 24 lwz r0,36(r1) ffc0d068: 83 61 00 0c lwz r27,12(r1) ffc0d06c: 7c 08 03 a6 mtlr r0 ffc0d070: 83 81 00 10 lwz r28,16(r1) ffc0d074: 83 a1 00 14 lwz r29,20(r1) ffc0d078: 83 c1 00 18 lwz r30,24(r1) ffc0d07c: 83 e1 00 1c lwz r31,28(r1) ffc0d080: 38 21 00 20 addi r1,r1,32 ffc0d084: 4e 80 00 20 blr =============================================================================== ffc0b7b0 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { ffc0b7b0: 94 21 ff f0 stwu r1,-16(r1) ffc0b7b4: 7c 08 02 a6 mflr r0 ffc0b7b8: 93 e1 00 0c stw r31,12(r1) int i; /* * Validate parameters and look up information structure. */ if ( !info ) ffc0b7bc: 7c bf 2b 79 mr. r31,r5 rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { ffc0b7c0: 90 01 00 14 stw r0,20(r1) int i; /* * Validate parameters and look up information structure. */ if ( !info ) ffc0b7c4: 41 82 00 90 beq- ffc0b854 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); ffc0b7c8: 54 84 04 3e clrlwi r4,r4,16 ffc0b7cc: 48 00 23 9d bl ffc0db68 <_Objects_Get_information> if ( !obj_info ) ffc0b7d0: 7c 69 1b 79 mr. r9,r3 return RTEMS_INVALID_NUMBER; ffc0b7d4: 38 60 00 0a li r3,10 */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) ffc0b7d8: 41 82 00 68 beq- ffc0b840 * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; ffc0b7dc: a0 c9 00 10 lhz r6,16(r9) return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; ffc0b7e0: 80 e9 00 08 lwz r7,8(r9) info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0b7e4: 2f 86 00 00 cmpwi cr7,r6,0 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; ffc0b7e8: 81 09 00 0c lwz r8,12(r9) info->auto_extend = obj_info->auto_extend; ffc0b7ec: 89 49 00 12 lbz r10,18(r9) return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; ffc0b7f0: 90 ff 00 00 stw r7,0(r31) info->maximum_id = obj_info->maximum_id; ffc0b7f4: 91 1f 00 04 stw r8,4(r31) info->auto_extend = obj_info->auto_extend; ffc0b7f8: 99 5f 00 0c stb r10,12(r31) info->maximum = obj_info->maximum; ffc0b7fc: 90 df 00 08 stw r6,8(r31) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0b800: 41 9e 00 6c beq- cr7,ffc0b86c <== NEVER TAKEN ffc0b804: 80 89 00 1c lwz r4,28(r9) ffc0b808: 39 00 00 01 li r8,1 ffc0b80c: 39 20 00 01 li r9,1 ffc0b810: 39 40 00 00 li r10,0 ffc0b814: 39 29 00 01 addi r9,r9,1 ffc0b818: 7f 86 48 40 cmplw cr7,r6,r9 if ( !obj_info->local_table[i] ) ffc0b81c: 55 08 10 3a rlwinm r8,r8,2,0,29 ffc0b820: 7c e4 40 2e lwzx r7,r4,r8 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0b824: 7d 28 4b 78 mr r8,r9 if ( !obj_info->local_table[i] ) unallocated++; ffc0b828: 20 a7 00 00 subfic r5,r7,0 ffc0b82c: 7c aa 01 94 addze r5,r10 ffc0b830: 7c aa 2b 78 mr r10,r5 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0b834: 40 9c ff e0 bge+ cr7,ffc0b814 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; ffc0b838: 91 5f 00 10 stw r10,16(r31) return RTEMS_SUCCESSFUL; ffc0b83c: 38 60 00 00 li r3,0 } ffc0b840: 80 01 00 14 lwz r0,20(r1) ffc0b844: 83 e1 00 0c lwz r31,12(r1) ffc0b848: 7c 08 03 a6 mtlr r0 ffc0b84c: 38 21 00 10 addi r1,r1,16 ffc0b850: 4e 80 00 20 blr ffc0b854: 80 01 00 14 lwz r0,20(r1) /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; ffc0b858: 38 60 00 09 li r3,9 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } ffc0b85c: 83 e1 00 0c lwz r31,12(r1) ffc0b860: 7c 08 03 a6 mtlr r0 ffc0b864: 38 21 00 10 addi r1,r1,16 ffc0b868: 4e 80 00 20 blr info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0b86c: 39 40 00 00 li r10,0 <== NOT EXECUTED ffc0b870: 4b ff ff c8 b ffc0b838 <== NOT EXECUTED =============================================================================== ffc19ea8 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc19ea8: 94 21 ff d0 stwu r1,-48(r1) ffc19eac: 7c 08 02 a6 mflr r0 ffc19eb0: 93 c1 00 28 stw r30,40(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc19eb4: 7c 7e 1b 79 mr. r30,r3 uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc19eb8: 90 01 00 34 stw r0,52(r1) ffc19ebc: 93 61 00 1c stw r27,28(r1) ffc19ec0: 93 81 00 20 stw r28,32(r1) ffc19ec4: 93 a1 00 24 stw r29,36(r1) ffc19ec8: 93 e1 00 2c stw r31,44(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc19ecc: 40 82 00 2c bne- ffc19ef8 return RTEMS_INVALID_NAME; ffc19ed0: 38 60 00 03 li r3,3 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc19ed4: 80 01 00 34 lwz r0,52(r1) ffc19ed8: 83 61 00 1c lwz r27,28(r1) ffc19edc: 7c 08 03 a6 mtlr r0 ffc19ee0: 83 81 00 20 lwz r28,32(r1) ffc19ee4: 83 a1 00 24 lwz r29,36(r1) ffc19ee8: 83 c1 00 28 lwz r30,40(r1) ffc19eec: 83 e1 00 2c lwz r31,44(r1) ffc19ef0: 38 21 00 30 addi r1,r1,48 ffc19ef4: 4e 80 00 20 blr register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) ffc19ef8: 2f 84 00 00 cmpwi cr7,r4,0 return RTEMS_INVALID_ADDRESS; ffc19efc: 38 60 00 09 li r3,9 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) ffc19f00: 41 be ff d4 beq- cr7,ffc19ed4 return RTEMS_INVALID_ADDRESS; if ( !id ) ffc19f04: 2f 88 00 00 cmpwi cr7,r8,0 ffc19f08: 41 be ff cc beq- cr7,ffc19ed4 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || ffc19f0c: 2f 85 00 00 cmpwi cr7,r5,0 ffc19f10: 7c bf 2b 78 mr r31,r5 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; ffc19f14: 38 60 00 08 li r3,8 return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || ffc19f18: 41 9e ff bc beq+ cr7,ffc19ed4 ffc19f1c: 2f 86 00 00 cmpwi cr7,r6,0 ffc19f20: 41 9e ff b4 beq+ cr7,ffc19ed4 ffc19f24: 7f 85 30 40 cmplw cr7,r5,r6 ffc19f28: 41 9c ff ac blt+ cr7,ffc19ed4 ffc19f2c: 70 c9 00 07 andi. r9,r6,7 ffc19f30: 40 82 ff a4 bne+ ffc19ed4 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) ffc19f34: 70 9b 00 07 andi. r27,r4,7 if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; ffc19f38: 38 60 00 09 li r3,9 if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) ffc19f3c: 40 82 ff 98 bne+ ffc19ed4 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc19f40: 3d 20 00 00 lis r9,0 ffc19f44: 81 49 28 f8 lwz r10,10488(r9) ++level; ffc19f48: 39 4a 00 01 addi r10,r10,1 _Thread_Dispatch_disable_level = level; ffc19f4c: 91 49 28 f8 stw r10,10488(r9) * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); ffc19f50: 3f 80 00 00 lis r28,0 ffc19f54: 90 81 00 08 stw r4,8(r1) ffc19f58: 3b 9c 6e b0 addi r28,r28,28336 ffc19f5c: 7f 83 e3 78 mr r3,r28 ffc19f60: 90 c1 00 0c stw r6,12(r1) ffc19f64: 90 e1 00 10 stw r7,16(r1) ffc19f68: 91 01 00 14 stw r8,20(r1) ffc19f6c: 48 00 62 95 bl ffc20200 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { ffc19f70: 7c 7d 1b 79 mr. r29,r3 ffc19f74: 80 81 00 08 lwz r4,8(r1) ffc19f78: 80 c1 00 0c lwz r6,12(r1) ffc19f7c: 80 e1 00 10 lwz r7,16(r1) ffc19f80: 81 01 00 14 lwz r8,20(r1) ffc19f84: 41 82 00 50 beq- ffc19fd4 the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, ffc19f88: 7c bf 33 96 divwu r5,r31,r6 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; ffc19f8c: 90 9d 00 10 stw r4,16(r29) the_partition->length = length; the_partition->buffer_size = buffer_size; ffc19f90: 90 dd 00 18 stw r6,24(r29) the_partition->attribute_set = attribute_set; ffc19f94: 90 fd 00 1c stw r7,28(r29) return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; ffc19f98: 93 fd 00 14 stw r31,20(r29) the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; ffc19f9c: 93 7d 00 20 stw r27,32(r29) _Chain_Initialize( &the_partition->Memory, starting_address, ffc19fa0: 91 01 00 14 stw r8,20(r1) ffc19fa4: 38 7d 00 24 addi r3,r29,36 ffc19fa8: 48 00 44 ed bl ffc1e494 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc19fac: 81 3d 00 08 lwz r9,8(r29) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc19fb0: 80 fc 00 1c lwz r7,28(r28) ffc19fb4: 55 2a 13 ba rlwinm r10,r9,2,14,29 ffc19fb8: 7f a7 51 2e stwx r29,r7,r10 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc19fbc: 93 dd 00 0c stw r30,12(r29) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; ffc19fc0: 81 01 00 14 lwz r8,20(r1) ffc19fc4: 91 28 00 00 stw r9,0(r8) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); ffc19fc8: 48 00 79 05 bl ffc218cc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc19fcc: 38 60 00 00 li r3,0 ffc19fd0: 4b ff ff 04 b ffc19ed4 _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); ffc19fd4: 48 00 78 f9 bl ffc218cc <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; ffc19fd8: 38 60 00 05 li r3,5 ffc19fdc: 4b ff fe f8 b ffc19ed4 =============================================================================== ffc1a1a0 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { ffc1a1a0: 94 21 ff e0 stwu r1,-32(r1) ffc1a1a4: 7c 69 1b 78 mr r9,r3 ffc1a1a8: 7c 08 02 a6 mflr r0 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) ffc1a1ac: 3c 60 00 00 lis r3,0 ffc1a1b0: 93 c1 00 18 stw r30,24(r1) ffc1a1b4: 38 63 6e b0 addi r3,r3,28336 ffc1a1b8: 7c 9e 23 78 mr r30,r4 ffc1a1bc: 38 a1 00 08 addi r5,r1,8 ffc1a1c0: 90 01 00 24 stw r0,36(r1) ffc1a1c4: 7d 24 4b 78 mr r4,r9 ffc1a1c8: 93 e1 00 1c stw r31,28(r1) ffc1a1cc: 48 00 66 65 bl ffc20830 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc1a1d0: 81 21 00 08 lwz r9,8(r1) ffc1a1d4: 2f 89 00 00 cmpwi cr7,r9,0 ffc1a1d8: 40 9e 00 60 bne- cr7,ffc1a238 ) { void *starting; void *ending; starting = the_partition->starting_address; ffc1a1dc: 81 23 00 10 lwz r9,16(r3) ffc1a1e0: 7c 7f 1b 78 mr r31,r3 ending = _Addresses_Add_offset( starting, the_partition->length ); ffc1a1e4: 81 43 00 14 lwz r10,20(r3) const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc1a1e8: 7f 9e 48 40 cmplw cr7,r30,r9 ffc1a1ec: 41 9c 00 68 blt- cr7,ffc1a254 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc1a1f0: 7d 49 52 14 add r10,r9,r10 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc1a1f4: 7f 9e 50 40 cmplw cr7,r30,r10 ffc1a1f8: 41 9d 00 5c bgt- cr7,ffc1a254 <== NEVER TAKEN offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); ffc1a1fc: 81 43 00 18 lwz r10,24(r3) RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); ffc1a200: 7d 29 f0 50 subf r9,r9,r30 ffc1a204: 7d 09 53 96 divwu r8,r9,r10 ffc1a208: 7d 48 51 d6 mullw r10,r8,r10 starting = the_partition->starting_address; ending = _Addresses_Add_offset( starting, the_partition->length ); return ( _Addresses_Is_in_range( the_buffer, starting, ending ) && ffc1a20c: 7f 89 50 00 cmpw cr7,r9,r10 ffc1a210: 40 9e 00 44 bne- cr7,ffc1a254 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); ffc1a214: 38 63 00 24 addi r3,r3,36 ffc1a218: 7f c4 f3 78 mr r4,r30 ffc1a21c: 48 00 42 09 bl ffc1e424 <_Chain_Append> case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; ffc1a220: 81 3f 00 20 lwz r9,32(r31) ffc1a224: 39 29 ff ff addi r9,r9,-1 ffc1a228: 91 3f 00 20 stw r9,32(r31) _Thread_Enable_dispatch(); ffc1a22c: 48 00 76 a1 bl ffc218cc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc1a230: 38 60 00 00 li r3,0 ffc1a234: 48 00 00 08 b ffc1a23c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc1a238: 38 60 00 04 li r3,4 } ffc1a23c: 80 01 00 24 lwz r0,36(r1) ffc1a240: 83 c1 00 18 lwz r30,24(r1) ffc1a244: 7c 08 03 a6 mtlr r0 ffc1a248: 83 e1 00 1c lwz r31,28(r1) ffc1a24c: 38 21 00 20 addi r1,r1,32 ffc1a250: 4e 80 00 20 blr _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc1a254: 48 00 76 79 bl ffc218cc <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1a258: 80 01 00 24 lwz r0,36(r1) ffc1a25c: 83 c1 00 18 lwz r30,24(r1) the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; ffc1a260: 38 60 00 09 li r3,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1a264: 7c 08 03 a6 mtlr r0 ffc1a268: 83 e1 00 1c lwz r31,28(r1) ffc1a26c: 38 21 00 20 addi r1,r1,32 ffc1a270: 4e 80 00 20 blr =============================================================================== ffc3e424 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { ffc3e424: 94 21 ff d0 stwu r1,-48(r1) ffc3e428: 7c 08 02 a6 mflr r0 ffc3e42c: 93 e1 00 2c stw r31,44(r1) ffc3e430: 7c 7f 1b 78 mr r31,r3 ffc3e434: 3c 60 00 00 lis r3,0 ffc3e438: 93 a1 00 24 stw r29,36(r1) ffc3e43c: 38 63 67 e0 addi r3,r3,26592 ffc3e440: 7c 9d 23 78 mr r29,r4 ffc3e444: 38 a1 00 08 addi r5,r1,8 ffc3e448: 90 01 00 34 stw r0,52(r1) ffc3e44c: 7f e4 fb 78 mr r4,r31 ffc3e450: 93 61 00 1c stw r27,28(r1) ffc3e454: 93 81 00 20 stw r28,32(r1) ffc3e458: 93 c1 00 28 stw r30,40(r1) ffc3e45c: 4b fc cd e1 bl ffc0b23c <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc3e460: 81 21 00 08 lwz r9,8(r1) ffc3e464: 2f 89 00 00 cmpwi cr7,r9,0 ffc3e468: 40 9e 00 50 bne- cr7,ffc3e4b8 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc3e46c: 3f 80 00 00 lis r28,0 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { ffc3e470: 81 43 00 40 lwz r10,64(r3) ffc3e474: 3b 9c 65 60 addi r28,r28,25952 ffc3e478: 81 3c 00 10 lwz r9,16(r28) ffc3e47c: 7c 7e 1b 78 mr r30,r3 ffc3e480: 7f 8a 48 00 cmpw cr7,r10,r9 ffc3e484: 41 9e 00 60 beq- cr7,ffc3e4e4 _Thread_Enable_dispatch(); ffc3e488: 4b fc dd b9 bl ffc0c240 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc3e48c: 80 01 00 34 lwz r0,52(r1) switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; ffc3e490: 3b e0 00 17 li r31,23 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc3e494: 83 61 00 1c lwz r27,28(r1) ffc3e498: 7c 08 03 a6 mtlr r0 ffc3e49c: 7f e3 fb 78 mr r3,r31 ffc3e4a0: 83 81 00 20 lwz r28,32(r1) ffc3e4a4: 83 a1 00 24 lwz r29,36(r1) ffc3e4a8: 83 c1 00 28 lwz r30,40(r1) ffc3e4ac: 83 e1 00 2c lwz r31,44(r1) ffc3e4b0: 38 21 00 30 addi r1,r1,48 ffc3e4b4: 4e 80 00 20 blr #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc3e4b8: 3b e0 00 04 li r31,4 } ffc3e4bc: 80 01 00 34 lwz r0,52(r1) ffc3e4c0: 7f e3 fb 78 mr r3,r31 ffc3e4c4: 83 61 00 1c lwz r27,28(r1) ffc3e4c8: 7c 08 03 a6 mtlr r0 ffc3e4cc: 83 81 00 20 lwz r28,32(r1) ffc3e4d0: 83 a1 00 24 lwz r29,36(r1) ffc3e4d4: 83 c1 00 28 lwz r30,40(r1) ffc3e4d8: 83 e1 00 2c lwz r31,44(r1) ffc3e4dc: 38 21 00 30 addi r1,r1,48 ffc3e4e0: 4e 80 00 20 blr if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { ffc3e4e4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc3e4e8: 41 9e 00 80 beq- cr7,ffc3e568 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc3e4ec: 7f 60 00 a6 mfmsr r27 ffc3e4f0: 7d 30 42 a6 mfsprg r9,0 ffc3e4f4: 7f 69 48 78 andc r9,r27,r9 ffc3e4f8: 7d 20 01 24 mtmsr r9 _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { ffc3e4fc: 81 23 00 38 lwz r9,56(r3) ffc3e500: 2f 89 00 00 cmpwi cr7,r9,0 ffc3e504: 41 9e 00 8c beq- cr7,ffc3e590 _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { ffc3e508: 2f 89 00 02 cmpwi cr7,r9,2 ffc3e50c: 41 9e 00 d4 beq- cr7,ffc3e5e0 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { ffc3e510: 2f 89 00 04 cmpwi cr7,r9,4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc3e514: 3b e0 00 04 li r31,4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { ffc3e518: 40 9e ff a4 bne+ cr7,ffc3e4bc <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); ffc3e51c: 4b ff fc d9 bl ffc3e1f4 <_Rate_monotonic_Update_statistics> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc3e520: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc3e524: 39 20 00 02 li r9,2 the_period->next_length = length; ffc3e528: 93 be 00 3c stw r29,60(r30) ffc3e52c: 3c 60 00 00 lis r3,0 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc3e530: 91 3e 00 38 stw r9,56(r30) ffc3e534: 38 63 64 88 addi r3,r3,25736 ffc3e538: 38 9e 00 10 addi r4,r30,16 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc3e53c: 93 be 00 1c stw r29,28(r30) the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Scheduler_Release_job(the_period->owner, the_period->next_length); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; ffc3e540: 3b e0 00 06 li r31,6 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc3e544: 4b fc ec 91 bl ffc0d1d4 <_Watchdog_Insert> ffc3e548: 3d 20 00 00 lis r9,0 ffc3e54c: 81 29 20 c0 lwz r9,8384(r9) ffc3e550: 80 7e 00 40 lwz r3,64(r30) ffc3e554: 80 9e 00 3c lwz r4,60(r30) ffc3e558: 7d 29 03 a6 mtctr r9 ffc3e55c: 4e 80 04 21 bctrl the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Scheduler_Release_job(the_period->owner, the_period->next_length); _Thread_Enable_dispatch(); ffc3e560: 4b fc dc e1 bl ffc0c240 <_Thread_Enable_dispatch> ffc3e564: 4b ff ff 58 b ffc3e4bc _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { ffc3e568: 81 23 00 38 lwz r9,56(r3) ffc3e56c: 3b e0 00 00 li r31,0 ffc3e570: 2b 89 00 04 cmplwi cr7,r9,4 ffc3e574: 41 9d 00 14 bgt- cr7,ffc3e588 <== NEVER TAKEN ffc3e578: 3d 40 ff c7 lis r10,-57 ffc3e57c: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc3e580: 39 4a 99 40 addi r10,r10,-26304 ffc3e584: 7f ea 48 2e lwzx r31,r10,r9 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); ffc3e588: 4b fc dc b9 bl ffc0c240 <_Thread_Enable_dispatch> ffc3e58c: 4b ff ff 30 b ffc3e4bc ffc3e590: 7f 60 01 24 mtmsr r27 _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { _ISR_Enable( level ); the_period->next_length = length; ffc3e594: 93 a3 00 3c stw r29,60(r3) /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); ffc3e598: 4b ff fd ad bl ffc3e344 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; ffc3e59c: 39 40 00 02 li r10,2 ffc3e5a0: 91 5e 00 38 stw r10,56(r30) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc3e5a4: 3d 40 ff c4 lis r10,-60 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc3e5a8: 39 20 00 00 li r9,0 the_watchdog->routine = routine; ffc3e5ac: 39 4a e6 50 addi r10,r10,-6576 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc3e5b0: 91 3e 00 18 stw r9,24(r30) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc3e5b4: 3c 60 00 00 lis r3,0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc3e5b8: 91 5e 00 2c stw r10,44(r30) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc3e5bc: 38 63 64 88 addi r3,r3,25736 ffc3e5c0: 38 9e 00 10 addi r4,r30,16 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc3e5c4: 93 fe 00 30 stw r31,48(r30) NULL ); _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc3e5c8: 3b e0 00 00 li r31,0 the_watchdog->user_data = user_data; ffc3e5cc: 91 3e 00 34 stw r9,52(r30) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc3e5d0: 93 be 00 1c stw r29,28(r30) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc3e5d4: 4b fc ec 01 bl ffc0d1d4 <_Watchdog_Insert> id, NULL ); _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc3e5d8: 4b fc dc 69 bl ffc0c240 <_Thread_Enable_dispatch> ffc3e5dc: 4b ff fe e0 b ffc3e4bc if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); ffc3e5e0: 4b ff fc 15 bl ffc3e1f4 <_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; ffc3e5e4: 39 20 00 01 li r9,1 ffc3e5e8: 91 3e 00 38 stw r9,56(r30) the_period->next_length = length; ffc3e5ec: 93 be 00 3c stw r29,60(r30) ffc3e5f0: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc3e5f4: 81 3c 00 10 lwz r9,16(r28) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc3e5f8: 38 80 40 00 li r4,16384 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc3e5fc: 81 5e 00 08 lwz r10,8(r30) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc3e600: 7d 23 4b 78 mr r3,r9 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc3e604: 91 49 00 20 stw r10,32(r9) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc3e608: 4b fc e7 1d bl ffc0cd24 <_Thread_Set_state> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc3e60c: 7d 40 00 a6 mfmsr r10 ffc3e610: 7d 30 42 a6 mfsprg r9,0 ffc3e614: 7d 49 48 78 andc r9,r10,r9 ffc3e618: 7d 20 01 24 mtmsr r9 * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; ffc3e61c: 39 00 00 02 li r8,2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; ffc3e620: 81 3e 00 38 lwz r9,56(r30) the_period->state = RATE_MONOTONIC_ACTIVE; ffc3e624: 91 1e 00 38 stw r8,56(r30) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc3e628: 7d 40 01 24 mtmsr r10 /* * 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 ) ffc3e62c: 2f 89 00 03 cmpwi cr7,r9,3 ffc3e630: 41 9e 00 10 beq- cr7,ffc3e640 <== NEVER TAKEN _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); ffc3e634: 4b fc dc 0d bl ffc0c240 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc3e638: 3b e0 00 00 li r31,0 ffc3e63c: 4b ff fe 80 b ffc3e4bc /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc3e640: 80 7c 00 10 lwz r3,16(r28) <== NOT EXECUTED ffc3e644: 38 80 40 00 li r4,16384 <== NOT EXECUTED ffc3e648: 4b fc d6 f9 bl ffc0bd40 <_Thread_Clear_state> <== NOT EXECUTED ffc3e64c: 4b ff ff e8 b ffc3e634 <== NOT EXECUTED =============================================================================== ffc2e730 : void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc2e730: 94 21 ff 70 stwu r1,-144(r1) ffc2e734: 7c 08 02 a6 mflr r0 ffc2e738: 93 c1 00 88 stw r30,136(r1) rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) ffc2e73c: 7c 9e 23 79 mr. r30,r4 void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc2e740: 90 01 00 94 stw r0,148(r1) ffc2e744: 92 e1 00 6c stw r23,108(r1) ffc2e748: 93 01 00 70 stw r24,112(r1) ffc2e74c: 93 21 00 74 stw r25,116(r1) ffc2e750: 93 41 00 78 stw r26,120(r1) ffc2e754: 93 61 00 7c stw r27,124(r1) ffc2e758: 93 81 00 80 stw r28,128(r1) ffc2e75c: 93 a1 00 84 stw r29,132(r1) ffc2e760: 93 e1 00 8c stw r31,140(r1) rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) ffc2e764: 41 82 01 5c beq- ffc2e8c0 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); ffc2e768: 3c 80 ff c6 lis r4,-58 ffc2e76c: 7f c9 03 a6 mtctr r30 ffc2e770: 38 84 69 5c addi r4,r4,26972 ffc2e774: 7c 7c 1b 78 mr r28,r3 /* * 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 ; ffc2e778: 3f a0 00 00 lis r29,0 ffc2e77c: 3b bd 67 e0 addi r29,r29,26592 char name[5]; if ( !print ) return; (*print)( context, "Period information by period\n" ); ffc2e780: 4c c6 31 82 crclr 4*cr1+eq ffc2e784: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); ffc2e788: 3c 80 ff c6 lis r4,-58 ffc2e78c: 38 84 69 7c addi r4,r4,27004 ffc2e790: 7f c9 03 a6 mtctr r30 ffc2e794: 7f 83 e3 78 mr r3,r28 ffc2e798: 4c c6 31 82 crclr 4*cr1+eq ffc2e79c: 4e 80 04 21 bctrl (*print)( context, "--- Wall times are in seconds ---\n" ); ffc2e7a0: 3c 80 ff c6 lis r4,-58 ffc2e7a4: 38 84 69 a0 addi r4,r4,27040 ffc2e7a8: 7f c9 03 a6 mtctr r30 ffc2e7ac: 7f 83 e3 78 mr r3,r28 ffc2e7b0: 4c c6 31 82 crclr 4*cr1+eq ffc2e7b4: 4e 80 04 21 bctrl Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " ffc2e7b8: 3c 80 ff c6 lis r4,-58 ffc2e7bc: 38 84 69 c4 addi r4,r4,27076 ffc2e7c0: 7f c9 03 a6 mtctr r30 ffc2e7c4: 7f 83 e3 78 mr r3,r28 ffc2e7c8: 4c c6 31 82 crclr 4*cr1+eq ffc2e7cc: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " ffc2e7d0: 3c 80 ff c6 lis r4,-58 ffc2e7d4: 7f 83 e3 78 mr r3,r28 ffc2e7d8: 7f c9 03 a6 mtctr r30 ffc2e7dc: 38 84 6a 10 addi r4,r4,27152 ffc2e7e0: 4c c6 31 82 crclr 4*cr1+eq ffc2e7e4: 4e 80 04 21 bctrl /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc2e7e8: 83 fd 00 08 lwz r31,8(r29) ffc2e7ec: 81 3d 00 0c lwz r9,12(r29) ffc2e7f0: 7f 9f 48 40 cmplw cr7,r31,r9 ffc2e7f4: 41 9d 00 cc bgt- cr7,ffc2e8c0 <== NEVER TAKEN rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc2e7f8: 3f 20 ff c6 lis r25,-58 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, ffc2e7fc: 3e e0 ff c6 lis r23,-58 ffc2e800: 3f 60 10 62 lis r27,4194 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, ffc2e804: 3f 00 ff c6 lis r24,-58 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc2e808: 3f 40 ff c7 lis r26,-57 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc2e80c: 3b 39 6a 5c addi r25,r25,27228 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, ffc2e810: 3a f7 6a 74 addi r23,r23,27252 ffc2e814: 63 7b 4d d3 ori r27,r27,19923 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, ffc2e818: 3b 18 6a 94 addi r24,r24,27284 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc2e81c: 3b 5a 82 24 addi r26,r26,-32220 ffc2e820: 48 00 00 14 b ffc2e834 /* * 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 ; ffc2e824: 81 3d 00 0c lwz r9,12(r29) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc2e828: 3b ff 00 01 addi r31,r31,1 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc2e82c: 7f 89 f8 40 cmplw cr7,r9,r31 ffc2e830: 41 9c 00 90 blt- cr7,ffc2e8c0 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); ffc2e834: 7f e3 fb 78 mr r3,r31 ffc2e838: 38 81 00 08 addi r4,r1,8 ffc2e83c: 48 00 f5 11 bl ffc3dd4c if ( status != RTEMS_SUCCESSFUL ) ffc2e840: 2f 83 00 00 cmpwi cr7,r3,0 ffc2e844: 40 9e ff e0 bne+ cr7,ffc2e824 #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); ffc2e848: 38 81 00 40 addi r4,r1,64 ffc2e84c: 7f e3 fb 78 mr r3,r31 ffc2e850: 48 00 f7 25 bl ffc3df74 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc2e854: 80 61 00 40 lwz r3,64(r1) ffc2e858: 38 a1 00 60 addi r5,r1,96 ffc2e85c: 38 80 00 05 li r4,5 ffc2e860: 4b fe 3b a1 bl ffc12400 /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc2e864: 7f 24 cb 78 mr r4,r25 ffc2e868: 7f e5 fb 78 mr r5,r31 ffc2e86c: 80 e1 00 08 lwz r7,8(r1) ffc2e870: 7f 83 e3 78 mr r3,r28 ffc2e874: 81 01 00 0c lwz r8,12(r1) ffc2e878: 38 c1 00 60 addi r6,r1,96 ffc2e87c: 7f c9 03 a6 mtctr r30 ffc2e880: 4c c6 31 82 crclr 4*cr1+eq ffc2e884: 4e 80 04 21 bctrl ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc2e888: 81 21 00 08 lwz r9,8(r1) struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc2e88c: 38 61 00 20 addi r3,r1,32 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc2e890: 2f 89 00 00 cmpwi cr7,r9,0 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc2e894: 38 a1 00 58 addi r5,r1,88 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc2e898: 7f 44 d3 78 mr r4,r26 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc2e89c: 40 9e 00 58 bne- cr7,ffc2e8f4 (*print)( context, "\n" ); ffc2e8a0: 7f 83 e3 78 mr r3,r28 ffc2e8a4: 7f c9 03 a6 mtctr r30 * 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++ ) { ffc2e8a8: 3b ff 00 01 addi r31,r31,1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc2e8ac: 4c c6 31 82 crclr 4*cr1+eq ffc2e8b0: 4e 80 04 21 bctrl /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc2e8b4: 81 3d 00 0c lwz r9,12(r29) ffc2e8b8: 7f 89 f8 40 cmplw cr7,r9,r31 ffc2e8bc: 40 9c ff 78 bge+ cr7,ffc2e834 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } ffc2e8c0: 80 01 00 94 lwz r0,148(r1) ffc2e8c4: 82 e1 00 6c lwz r23,108(r1) ffc2e8c8: 7c 08 03 a6 mtlr r0 ffc2e8cc: 83 01 00 70 lwz r24,112(r1) ffc2e8d0: 83 21 00 74 lwz r25,116(r1) ffc2e8d4: 83 41 00 78 lwz r26,120(r1) ffc2e8d8: 83 61 00 7c lwz r27,124(r1) ffc2e8dc: 83 81 00 80 lwz r28,128(r1) ffc2e8e0: 83 a1 00 84 lwz r29,132(r1) ffc2e8e4: 83 c1 00 88 lwz r30,136(r1) ffc2e8e8: 83 e1 00 8c lwz r31,140(r1) ffc2e8ec: 38 21 00 90 addi r1,r1,144 ffc2e8f0: 4e 80 00 20 blr struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc2e8f4: 7d 24 4b 78 mr r4,r9 ffc2e8f8: 48 00 0e e5 bl ffc2f7dc <_Timespec_Divide_by_integer> (*print)( context, ffc2e8fc: 81 01 00 14 lwz r8,20(r1) ffc2e900: 81 41 00 1c lwz r10,28(r1) ffc2e904: 7f c9 03 a6 mtctr r30 ffc2e908: 80 61 00 5c lwz r3,92(r1) ffc2e90c: 7d 68 d8 96 mulhw r11,r8,r27 ffc2e910: 80 e1 00 18 lwz r7,24(r1) ffc2e914: 7c 03 d8 96 mulhw r0,r3,r27 ffc2e918: 81 21 00 58 lwz r9,88(r1) ffc2e91c: 80 a1 00 10 lwz r5,16(r1) ffc2e920: 7c 8a d8 96 mulhw r4,r10,r27 ffc2e924: 7d 6b 36 70 srawi r11,r11,6 ffc2e928: 7d 06 fe 70 srawi r6,r8,31 ffc2e92c: 7c 63 fe 70 srawi r3,r3,31 ffc2e930: 7c 88 36 70 srawi r8,r4,6 ffc2e934: 7d 44 fe 70 srawi r4,r10,31 ffc2e938: 7c 0a 36 70 srawi r10,r0,6 ffc2e93c: 7c c6 58 50 subf r6,r6,r11 ffc2e940: 7d 04 40 50 subf r8,r4,r8 ffc2e944: 7d 43 50 50 subf r10,r3,r10 ffc2e948: 7e e4 bb 78 mr r4,r23 ffc2e94c: 7f 83 e3 78 mr r3,r28 ffc2e950: 4c c6 31 82 crclr 4*cr1+eq ffc2e954: 4e 80 04 21 bctrl struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); ffc2e958: 80 81 00 08 lwz r4,8(r1) ffc2e95c: 38 61 00 38 addi r3,r1,56 ffc2e960: 38 a1 00 58 addi r5,r1,88 ffc2e964: 48 00 0e 79 bl ffc2f7dc <_Timespec_Divide_by_integer> (*print)( context, ffc2e968: 81 01 00 2c lwz r8,44(r1) ffc2e96c: 81 41 00 34 lwz r10,52(r1) ffc2e970: 7f c9 03 a6 mtctr r30 ffc2e974: 80 61 00 5c lwz r3,92(r1) ffc2e978: 7d 88 d8 96 mulhw r12,r8,r27 ffc2e97c: 80 a1 00 28 lwz r5,40(r1) ffc2e980: 7d 6a d8 96 mulhw r11,r10,r27 ffc2e984: 80 e1 00 30 lwz r7,48(r1) ffc2e988: 81 21 00 58 lwz r9,88(r1) ffc2e98c: 7c 83 d8 96 mulhw r4,r3,r27 ffc2e990: 7d 40 fe 70 srawi r0,r10,31 ffc2e994: 7d 8c 36 70 srawi r12,r12,6 ffc2e998: 7d 06 fe 70 srawi r6,r8,31 ffc2e99c: 7c 8a 36 70 srawi r10,r4,6 ffc2e9a0: 7d 68 36 70 srawi r8,r11,6 ffc2e9a4: 7c 6b fe 70 srawi r11,r3,31 ffc2e9a8: 7f 04 c3 78 mr r4,r24 ffc2e9ac: 7f 83 e3 78 mr r3,r28 ffc2e9b0: 7c c6 60 50 subf r6,r6,r12 ffc2e9b4: 7d 00 40 50 subf r8,r0,r8 ffc2e9b8: 7d 4b 50 50 subf r10,r11,r10 ffc2e9bc: 4c c6 31 82 crclr 4*cr1+eq ffc2e9c0: 4e 80 04 21 bctrl ffc2e9c4: 4b ff fe 60 b ffc2e824 =============================================================================== ffc2e9d8 : * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc2e9d8: 3d 20 00 00 lis r9,0 /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { ffc2e9dc: 94 21 ff f0 stwu r1,-16(r1) ffc2e9e0: 7c 08 02 a6 mflr r0 ffc2e9e4: 81 49 34 80 lwz r10,13440(r9) ffc2e9e8: 90 01 00 14 stw r0,20(r1) ++level; ffc2e9ec: 39 4a 00 01 addi r10,r10,1 ffc2e9f0: 93 c1 00 08 stw r30,8(r1) ffc2e9f4: 93 e1 00 0c stw r31,12(r1) _Thread_Dispatch_disable_level = level; ffc2e9f8: 91 49 34 80 stw r10,13440(r9) /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc2e9fc: 3f c0 00 00 lis r30,0 ffc2ea00: 3b de 67 e0 addi r30,r30,26592 ffc2ea04: 83 fe 00 08 lwz r31,8(r30) ffc2ea08: 81 3e 00 0c lwz r9,12(r30) ffc2ea0c: 7f 9f 48 40 cmplw cr7,r31,r9 ffc2ea10: 41 9d 00 1c bgt- cr7,ffc2ea2c <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { (void) rtems_rate_monotonic_reset_statistics( id ); ffc2ea14: 7f e3 fb 78 mr r3,r31 ffc2ea18: 48 00 00 2d bl ffc2ea44 /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc2ea1c: 81 3e 00 0c lwz r9,12(r30) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc2ea20: 3b ff 00 01 addi r31,r31,1 /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc2ea24: 7f 89 f8 40 cmplw cr7,r9,r31 ffc2ea28: 40 9c ff ec bge+ cr7,ffc2ea14 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } ffc2ea2c: 80 01 00 14 lwz r0,20(r1) ffc2ea30: 83 c1 00 08 lwz r30,8(r1) ffc2ea34: 7c 08 03 a6 mtlr r0 ffc2ea38: 83 e1 00 0c lwz r31,12(r1) ffc2ea3c: 38 21 00 10 addi r1,r1,16 } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); ffc2ea40: 4b fd d8 00 b ffc0c240 <_Thread_Enable_dispatch> =============================================================================== ffc0aad0 : return big_enough; } void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size) { ffc0aad0: 94 21 ff e0 stwu r1,-32(r1) ffc0aad4: 7c 08 02 a6 mflr r0 ffc0aad8: 90 01 00 24 stw r0,36(r1) void *ptr = NULL; rtems_chain_control *free_chain = &control->free_chunk_chain; rtems_rbtree_control *chunk_tree = &control->chunk_tree; uintptr_t alignment = control->alignment; ffc0aadc: 81 23 00 30 lwz r9,48(r3) return big_enough; } void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size) { ffc0aae0: 93 c1 00 18 stw r30,24(r1) #include static uintptr_t align_up(uintptr_t alignment, uintptr_t value) { uintptr_t excess = value % alignment; ffc0aae4: 7f c4 4b 96 divwu r30,r4,r9 return big_enough; } void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size) { ffc0aae8: 93 81 00 10 stw r28,16(r1) ffc0aaec: 93 61 00 0c stw r27,12(r1) ffc0aaf0: 93 a1 00 14 stw r29,20(r1) ffc0aaf4: 93 e1 00 1c stw r31,28(r1) #include static uintptr_t align_up(uintptr_t alignment, uintptr_t value) { uintptr_t excess = value % alignment; ffc0aaf8: 7f de 49 d6 mullw r30,r30,r9 return big_enough; } void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size) { ffc0aafc: 7c 7c 1b 78 mr r28,r3 static uintptr_t align_up(uintptr_t alignment, uintptr_t value) { uintptr_t excess = value % alignment; if (excess > 0) { ffc0ab00: 7d 5e 20 51 subf. r10,r30,r4 ffc0ab04: 40 82 00 ac bne- ffc0abb0 <== NEVER TAKEN rtems_chain_control *free_chain = &control->free_chunk_chain; rtems_rbtree_control *chunk_tree = &control->chunk_tree; uintptr_t alignment = control->alignment; uintptr_t aligned_size = align_up(alignment, size); if (size > 0 && size <= aligned_size) { ffc0ab08: 2f 84 00 00 cmpwi cr7,r4,0 ffc0ab0c: 7c 9e 23 78 mr r30,r4 ffc0ab10: 41 9e 00 2c beq- cr7,ffc0ab3c */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0ab14: 83 bc 00 00 lwz r29,0(r28) rtems_chain_control *free_chain, size_t size ) { rtems_chain_node *current = rtems_chain_first(free_chain); const rtems_chain_node *tail = rtems_chain_tail(free_chain); ffc0ab18: 39 3c 00 04 addi r9,r28,4 rtems_rbheap_chunk *big_enough = NULL; while (current != tail && big_enough == NULL) { ffc0ab1c: 7f 9d 48 00 cmpw cr7,r29,r9 ffc0ab20: 41 9e 00 1c beq- cr7,ffc0ab3c rtems_rbheap_chunk *free_chunk = (rtems_rbheap_chunk *) current; if (free_chunk->size >= size) { ffc0ab24: 83 fd 00 1c lwz r31,28(r29) ffc0ab28: 7f 9f f0 40 cmplw cr7,r31,r30 ffc0ab2c: 40 9c 00 38 bge- cr7,ffc0ab64 rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk)); if (chunk != NULL) { rtems_rbheap_add_to_spare_descriptor_chain(control, chunk); } } ffc0ab30: 83 bd 00 00 lwz r29,0(r29) { rtems_chain_node *current = rtems_chain_first(free_chain); const rtems_chain_node *tail = rtems_chain_tail(free_chain); rtems_rbheap_chunk *big_enough = NULL; while (current != tail && big_enough == NULL) { ffc0ab34: 7f 89 e8 00 cmpw cr7,r9,r29 ffc0ab38: 40 9e ff ec bne+ cr7,ffc0ab24 <== NEVER TAKEN return big_enough; } void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size) { void *ptr = NULL; ffc0ab3c: 38 60 00 00 li r3,0 } } } return ptr; } ffc0ab40: 80 01 00 24 lwz r0,36(r1) ffc0ab44: 83 61 00 0c lwz r27,12(r1) ffc0ab48: 7c 08 03 a6 mtlr r0 ffc0ab4c: 83 81 00 10 lwz r28,16(r1) ffc0ab50: 83 a1 00 14 lwz r29,20(r1) ffc0ab54: 83 c1 00 18 lwz r30,24(r1) ffc0ab58: 83 e1 00 1c lwz r31,28(r1) ffc0ab5c: 38 21 00 20 addi r1,r1,32 ffc0ab60: 4e 80 00 20 blr rtems_rbheap_chunk *free_chunk = search_free_chunk(free_chain, aligned_size); if (free_chunk != NULL) { uintptr_t free_size = free_chunk->size; if (free_size > aligned_size) { ffc0ab64: 7f 9e f8 40 cmplw cr7,r30,r31 ffc0ab68: 41 9c 00 68 blt- cr7,ffc0abd0 } } } return ptr; } ffc0ab6c: 80 01 00 24 lwz r0,36(r1) */ RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain( Chain_Node *node ) { node->next = node->previous = NULL; ffc0ab70: 39 40 00 00 li r10,0 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0ab74: 81 3d 00 00 lwz r9,0(r29) ffc0ab78: 7c 08 03 a6 mtlr r0 previous = the_node->previous; ffc0ab7c: 81 1d 00 04 lwz r8,4(r29) ptr = (void *) new_chunk->begin; } } else { rtems_chain_extract_unprotected(&free_chunk->chain_node); rtems_chain_set_off_chain(&free_chunk->chain_node); ptr = (void *) free_chunk->begin; ffc0ab80: 80 7d 00 18 lwz r3,24(r29) next->previous = previous; ffc0ab84: 91 09 00 04 stw r8,4(r9) previous->next = next; ffc0ab88: 91 28 00 00 stw r9,0(r8) */ RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain( Chain_Node *node ) { node->next = node->previous = NULL; ffc0ab8c: 91 5d 00 04 stw r10,4(r29) ffc0ab90: 91 5d 00 00 stw r10,0(r29) } } } return ptr; } ffc0ab94: 83 61 00 0c lwz r27,12(r1) ffc0ab98: 83 81 00 10 lwz r28,16(r1) ffc0ab9c: 83 a1 00 14 lwz r29,20(r1) ffc0aba0: 83 c1 00 18 lwz r30,24(r1) ffc0aba4: 83 e1 00 1c lwz r31,28(r1) ffc0aba8: 38 21 00 20 addi r1,r1,32 ffc0abac: 4e 80 00 20 blr rtems_chain_control *free_chain = &control->free_chunk_chain; rtems_rbtree_control *chunk_tree = &control->chunk_tree; uintptr_t alignment = control->alignment; uintptr_t aligned_size = align_up(alignment, size); if (size > 0 && size <= aligned_size) { ffc0abb0: 2f 84 00 00 cmpwi cr7,r4,0 <== NOT EXECUTED static uintptr_t align_up(uintptr_t alignment, uintptr_t value) { uintptr_t excess = value % alignment; if (excess > 0) { value += alignment - excess; ffc0abb4: 7d 24 4a 14 add r9,r4,r9 <== NOT EXECUTED ffc0abb8: 7f ca 48 50 subf r30,r10,r9 <== NOT EXECUTED rtems_chain_control *free_chain = &control->free_chunk_chain; rtems_rbtree_control *chunk_tree = &control->chunk_tree; uintptr_t alignment = control->alignment; uintptr_t aligned_size = align_up(alignment, size); if (size > 0 && size <= aligned_size) { ffc0abbc: 41 be ff 80 beq- cr7,ffc0ab3c <== NOT EXECUTED ffc0abc0: 7f 84 f0 40 cmplw cr7,r4,r30 <== NOT EXECUTED ffc0abc4: 40 9d ff 50 ble+ cr7,ffc0ab14 <== NOT EXECUTED return big_enough; } void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size) { void *ptr = NULL; ffc0abc8: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc0abcc: 4b ff ff 74 b ffc0ab40 <== NOT EXECUTED if (free_chunk != NULL) { uintptr_t free_size = free_chunk->size; if (free_size > aligned_size) { rtems_rbheap_chunk *new_chunk = get_chunk(control); ffc0abd0: 7f 83 e3 78 mr r3,r28 ffc0abd4: 4b ff fc 9d bl ffc0a870 if (new_chunk != NULL) { ffc0abd8: 7c 7b 1b 79 mr. r27,r3 ffc0abdc: 41 a2 ff 60 beq- ffc0ab3c <== NEVER TAKEN uintptr_t new_free_size = free_size - aligned_size; free_chunk->size = new_free_size; new_chunk->begin = free_chunk->begin + new_free_size; ffc0abe0: 81 5d 00 18 lwz r10,24(r29) if (free_size > aligned_size) { rtems_rbheap_chunk *new_chunk = get_chunk(control); if (new_chunk != NULL) { uintptr_t new_free_size = free_size - aligned_size; ffc0abe4: 7f fe f8 50 subf r31,r30,r31 ffc0abe8: 39 20 00 00 li r9,0 free_chunk->size = new_free_size; ffc0abec: 93 fd 00 1c stw r31,28(r29) new_chunk->begin = free_chunk->begin + new_free_size; ffc0abf0: 7d 5f 52 14 add r10,r31,r10 new_chunk->size = aligned_size; ffc0abf4: 93 db 00 1c stw r30,28(r27) static void insert_into_tree( rtems_rbtree_control *tree, rtems_rbheap_chunk *chunk ) { _RBTree_Insert_unprotected(tree, &chunk->tree_node); ffc0abf8: 38 7c 00 18 addi r3,r28,24 ffc0abfc: 38 9b 00 08 addi r4,r27,8 if (new_chunk != NULL) { uintptr_t new_free_size = free_size - aligned_size; free_chunk->size = new_free_size; new_chunk->begin = free_chunk->begin + new_free_size; ffc0ac00: 91 5b 00 18 stw r10,24(r27) ffc0ac04: 91 3b 00 04 stw r9,4(r27) ffc0ac08: 91 3b 00 00 stw r9,0(r27) static void insert_into_tree( rtems_rbtree_control *tree, rtems_rbheap_chunk *chunk ) { _RBTree_Insert_unprotected(tree, &chunk->tree_node); ffc0ac0c: 48 00 1e d9 bl ffc0cae4 <_RBTree_Insert_unprotected> } } } return ptr; } ffc0ac10: 80 01 00 24 lwz r0,36(r1) free_chunk->size = new_free_size; new_chunk->begin = free_chunk->begin + new_free_size; new_chunk->size = aligned_size; rtems_chain_set_off_chain(&new_chunk->chain_node); insert_into_tree(chunk_tree, new_chunk); ptr = (void *) new_chunk->begin; ffc0ac14: 80 7b 00 18 lwz r3,24(r27) } } } return ptr; } ffc0ac18: 7c 08 03 a6 mtlr r0 ffc0ac1c: 83 61 00 0c lwz r27,12(r1) ffc0ac20: 83 81 00 10 lwz r28,16(r1) ffc0ac24: 83 a1 00 14 lwz r29,20(r1) ffc0ac28: 83 c1 00 18 lwz r30,24(r1) ffc0ac2c: 83 e1 00 1c lwz r31,28(r1) ffc0ac30: 38 21 00 20 addi r1,r1,32 ffc0ac34: 4e 80 00 20 blr =============================================================================== ffc0adb0 : /* Do nothing */ } void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control) { ffc0adb0: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc0adb4: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0adb8: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED ffc0adbc: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk)); ffc0adc0: 38 60 00 20 li r3,32 <== NOT EXECUTED { /* Do nothing */ } void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control) { ffc0adc4: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk)); ffc0adc8: 4b ff a6 5d bl ffc05424 <== NOT EXECUTED if (chunk != NULL) { ffc0adcc: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc0add0: 41 82 00 1c beq- ffc0adec <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0add4: 81 5f 00 0c lwz r10,12(r31) <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert_unprotected(_Chain_Head(the_chain), the_node); ffc0add8: 39 1f 00 0c addi r8,r31,12 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0addc: 91 03 00 04 stw r8,4(r3) <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; ffc0ade0: 90 7f 00 0c stw r3,12(r31) <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; ffc0ade4: 90 6a 00 04 stw r3,4(r10) <== NOT EXECUTED Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0ade8: 91 43 00 00 stw r10,0(r3) <== NOT EXECUTED rtems_rbheap_add_to_spare_descriptor_chain(control, chunk); } } ffc0adec: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc0adf0: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc0adf4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0adf8: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc0adfc: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0ac38 : rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (ptr != NULL) { ffc0ac38: 2c 04 00 00 cmpwi r4,0 ffc0ac3c: 41 82 00 f4 beq- ffc0ad30 _RBTree_Extract_unprotected(chunk_tree, &b->tree_node); } } rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr) { ffc0ac40: 94 21 ff c0 stwu r1,-64(r1) ffc0ac44: 7c 08 02 a6 mflr r0 #define NULL_PAGE rtems_rbheap_chunk_of_node(NULL) static rtems_rbheap_chunk *find(rtems_rbtree_control *chunk_tree, uintptr_t key) { rtems_rbheap_chunk chunk = { .begin = key }; ffc0ac48: 39 20 00 00 li r9,0 _RBTree_Extract_unprotected(chunk_tree, &b->tree_node); } } rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr) { ffc0ac4c: 90 01 00 44 stw r0,68(r1) ffc0ac50: 93 e1 00 3c stw r31,60(r1) RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; ffc0ac54: 83 e3 00 1c lwz r31,28(r3) ffc0ac58: 93 81 00 30 stw r28,48(r1) ffc0ac5c: 7c 7c 1b 78 mr r28,r3 RBTree_Node* found = NULL; int compare_result; while (iter_node) { ffc0ac60: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0ac64: 93 c1 00 38 stw r30,56(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; if (ptr != NULL) { rtems_chain_control *free_chain = &control->free_chunk_chain; rtems_rbtree_control *chunk_tree = &control->chunk_tree; ffc0ac68: 3b c3 00 18 addi r30,r3,24 _RBTree_Extract_unprotected(chunk_tree, &b->tree_node); } } rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr) { ffc0ac6c: 93 61 00 2c stw r27,44(r1) ffc0ac70: 93 a1 00 34 stw r29,52(r1) #define NULL_PAGE rtems_rbheap_chunk_of_node(NULL) static rtems_rbheap_chunk *find(rtems_rbtree_control *chunk_tree, uintptr_t key) { rtems_rbheap_chunk chunk = { .begin = key }; ffc0ac74: 91 21 00 08 stw r9,8(r1) ffc0ac78: 91 21 00 0c stw r9,12(r1) ffc0ac7c: 91 21 00 10 stw r9,16(r1) ffc0ac80: 91 21 00 14 stw r9,20(r1) ffc0ac84: 91 21 00 18 stw r9,24(r1) ffc0ac88: 91 21 00 1c stw r9,28(r1) ffc0ac8c: 91 21 00 24 stw r9,36(r1) ffc0ac90: 90 81 00 20 stw r4,32(r1) ffc0ac94: 41 9e 01 10 beq- cr7,ffc0ada4 <== NEVER TAKEN ffc0ac98: 3b a0 00 00 li r29,0 compare_result = the_rbtree->compare_function(the_node, iter_node); ffc0ac9c: 81 3e 00 10 lwz r9,16(r30) ffc0aca0: 7f e4 fb 78 mr r4,r31 ffc0aca4: 38 61 00 10 addi r3,r1,16 ffc0aca8: 7d 29 03 a6 mtctr r9 ffc0acac: 4e 80 04 21 bctrl if ( _RBTree_Is_equal( compare_result ) ) { ffc0acb0: 2c 03 00 00 cmpwi r3,0 RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater( int compare_result ) { return compare_result > 0; ffc0acb4: 7c 6a fe 70 srawi r10,r3,31 ffc0acb8: 7d 23 50 50 subf r9,r3,r10 break; } RBTree_Direction dir = (RBTree_Direction) _RBTree_Is_greater( compare_result ); iter_node = iter_node->child[dir]; ffc0acbc: 55 29 1f 7a rlwinm r9,r9,3,29,29 ffc0acc0: 7d 3f 4a 14 add r9,r31,r9 RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( _RBTree_Is_equal( compare_result ) ) { ffc0acc4: 40 82 00 14 bne- ffc0acd8 found = iter_node; if ( the_rbtree->is_unique ) ffc0acc8: 89 5e 00 14 lbz r10,20(r30) ffc0accc: 7f fd fb 78 mr r29,r31 ffc0acd0: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0acd4: 40 9e 00 54 bne- cr7,ffc0ad28 <== ALWAYS TAKEN break; } RBTree_Direction dir = (RBTree_Direction) _RBTree_Is_greater( compare_result ); iter_node = iter_node->child[dir]; ffc0acd8: 83 e9 00 04 lwz r31,4(r9) ) { RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { ffc0acdc: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0ace0: 40 9e ff bc bne+ cr7,ffc0ac9c if (ptr != NULL) { rtems_chain_control *free_chain = &control->free_chunk_chain; rtems_rbtree_control *chunk_tree = &control->chunk_tree; rtems_rbheap_chunk *chunk = find(chunk_tree, (uintptr_t) ptr); if (chunk != NULL_PAGE) { ffc0ace4: 2f 9d 00 00 cmpwi cr7,r29,0 check_and_merge(free_chain, chunk_tree, chunk, pred); } else { sc = RTEMS_INCORRECT_STATE; } } else { sc = RTEMS_INVALID_ID; ffc0ace8: 38 60 00 04 li r3,4 if (ptr != NULL) { rtems_chain_control *free_chain = &control->free_chunk_chain; rtems_rbtree_control *chunk_tree = &control->chunk_tree; rtems_rbheap_chunk *chunk = find(chunk_tree, (uintptr_t) ptr); if (chunk != NULL_PAGE) { ffc0acec: 3b fd ff f8 addi r31,r29,-8 ffc0acf0: 41 9e 00 14 beq- cr7,ffc0ad04 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain( const Chain_Node *node ) { return (node->next == NULL) && (node->previous == NULL); ffc0acf4: 81 3d ff f8 lwz r9,-8(r29) check_and_merge(free_chain, chunk_tree, chunk, succ); add_to_chain(free_chain, chunk); check_and_merge(free_chain, chunk_tree, chunk, pred); } else { sc = RTEMS_INCORRECT_STATE; ffc0acf8: 38 60 00 0e li r3,14 ffc0acfc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ad00: 41 9e 00 38 beq- cr7,ffc0ad38 sc = RTEMS_INVALID_ID; } } return sc; } ffc0ad04: 80 01 00 44 lwz r0,68(r1) ffc0ad08: 83 61 00 2c lwz r27,44(r1) ffc0ad0c: 7c 08 03 a6 mtlr r0 ffc0ad10: 83 81 00 30 lwz r28,48(r1) ffc0ad14: 83 a1 00 34 lwz r29,52(r1) ffc0ad18: 83 c1 00 38 lwz r30,56(r1) ffc0ad1c: 83 e1 00 3c lwz r31,60(r1) ffc0ad20: 38 21 00 40 addi r1,r1,64 ffc0ad24: 4e 80 00 20 blr compare_result = the_rbtree->compare_function(the_node, iter_node); if ( _RBTree_Is_equal( compare_result ) ) { found = iter_node; if ( the_rbtree->is_unique ) ffc0ad28: 7f fd fb 78 mr r29,r31 ffc0ad2c: 4b ff ff b8 b ffc0ace4 } } rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr) { rtems_status_code sc = RTEMS_SUCCESSFUL; ffc0ad30: 38 60 00 00 li r3,0 sc = RTEMS_INVALID_ID; } } return sc; } ffc0ad34: 4e 80 00 20 blr ffc0ad38: 81 3f 00 04 lwz r9,4(r31) ffc0ad3c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ad40: 40 9e ff c4 bne+ cr7,ffc0ad04 <== NEVER TAKEN static rtems_rbheap_chunk *get_next( const rtems_rbheap_chunk *chunk, RBTree_Direction dir ) { return rtems_rbheap_chunk_of_node( ffc0ad44: 38 80 00 00 li r4,0 ffc0ad48: 7f a3 eb 78 mr r3,r29 ffc0ad4c: 48 00 21 b1 bl ffc0cefc <_RBTree_Next_unprotected> ffc0ad50: 38 80 00 01 li r4,1 ffc0ad54: 7c 7b 1b 78 mr r27,r3 ffc0ad58: 7f a3 eb 78 mr r3,r29 ffc0ad5c: 48 00 21 a1 bl ffc0cefc <_RBTree_Next_unprotected> if (chunk != NULL_PAGE) { if (!rtems_rbheap_is_chunk_free(chunk)) { rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT); rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT); check_and_merge(free_chain, chunk_tree, chunk, succ); ffc0ad60: 7f c4 f3 78 mr r4,r30 static rtems_rbheap_chunk *get_next( const rtems_rbheap_chunk *chunk, RBTree_Direction dir ) { return rtems_rbheap_chunk_of_node( ffc0ad64: 38 c3 ff f8 addi r6,r3,-8 if (chunk != NULL_PAGE) { if (!rtems_rbheap_is_chunk_free(chunk)) { rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT); rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT); check_and_merge(free_chain, chunk_tree, chunk, succ); ffc0ad68: 7f e5 fb 78 mr r5,r31 ffc0ad6c: 7f 83 e3 78 mr r3,r28 ffc0ad70: 4b ff fb 91 bl ffc0a900 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0ad74: 81 3c 00 00 lwz r9,0(r28) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0ad78: 93 9f 00 04 stw r28,4(r31) add_to_chain(free_chain, chunk); check_and_merge(free_chain, chunk_tree, chunk, pred); ffc0ad7c: 7f 83 e3 78 mr r3,r28 ffc0ad80: 7f c4 f3 78 mr r4,r30 before_node = after_node->next; after_node->next = the_node; ffc0ad84: 93 fc 00 00 stw r31,0(r28) ffc0ad88: 7f e5 fb 78 mr r5,r31 ffc0ad8c: 38 db ff f8 addi r6,r27,-8 the_node->next = before_node; ffc0ad90: 91 3f 00 00 stw r9,0(r31) before_node->previous = the_node; ffc0ad94: 93 e9 00 04 stw r31,4(r9) ffc0ad98: 4b ff fb 69 bl ffc0a900 } } rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr) { rtems_status_code sc = RTEMS_SUCCESSFUL; ffc0ad9c: 38 60 00 00 li r3,0 ffc0ada0: 4b ff ff 64 b ffc0ad04 check_and_merge(free_chain, chunk_tree, chunk, pred); } else { sc = RTEMS_INCORRECT_STATE; } } else { sc = RTEMS_INVALID_ID; ffc0ada4: 38 60 00 04 li r3,4 <== NOT EXECUTED ffc0ada8: 4b ff ff 5c b ffc0ad04 <== NOT EXECUTED =============================================================================== ffc0a984 : void *handler_arg ) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (alignment > 0) { ffc0a984: 2c 06 00 00 cmpwi r6,0 ffc0a988: 40 82 00 0c bne- ffc0a994 } } else { sc = RTEMS_INVALID_ADDRESS; } } else { sc = RTEMS_INVALID_NUMBER; ffc0a98c: 38 60 00 0a li r3,10 } return sc; } ffc0a990: 4e 80 00 20 blr #include static uintptr_t align_up(uintptr_t alignment, uintptr_t value) { uintptr_t excess = value % alignment; ffc0a994: 7d 24 33 96 divwu r9,r4,r6 uintptr_t area_size, uintptr_t alignment, rtems_rbheap_extend_descriptors extend_descriptors, void *handler_arg ) { ffc0a998: 94 21 ff e8 stwu r1,-24(r1) ffc0a99c: 7c 08 02 a6 mflr r0 ffc0a9a0: 93 e1 00 14 stw r31,20(r1) ffc0a9a4: 90 01 00 1c stw r0,28(r1) ffc0a9a8: 93 a1 00 0c stw r29,12(r1) ffc0a9ac: 93 c1 00 10 stw r30,16(r1) #include static uintptr_t align_up(uintptr_t alignment, uintptr_t value) { uintptr_t excess = value % alignment; ffc0a9b0: 7d 29 31 d6 mullw r9,r9,r6 ffc0a9b4: 7c 7f 1b 78 mr r31,r3 if (excess > 0) { ffc0a9b8: 7d 49 20 51 subf. r10,r9,r4 { rtems_status_code sc = RTEMS_SUCCESSFUL; if (alignment > 0) { uintptr_t begin = (uintptr_t) area_begin; uintptr_t end = begin + area_size; ffc0a9bc: 7c a5 22 14 add r5,r5,r4 static uintptr_t align_up(uintptr_t alignment, uintptr_t value) { uintptr_t excess = value % alignment; if (excess > 0) { ffc0a9c0: 41 82 00 f0 beq- ffc0aab0 uintptr_t begin = (uintptr_t) area_begin; uintptr_t end = begin + area_size; uintptr_t aligned_begin = align_up(alignment, begin); uintptr_t aligned_end = align_down(alignment, end); if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) { ffc0a9c4: 7f 84 28 40 cmplw cr7,r4,r5 insert_into_tree(chunk_tree, first); } else { sc = RTEMS_NO_MEMORY; } } else { sc = RTEMS_INVALID_ADDRESS; ffc0a9c8: 38 60 00 09 li r3,9 uintptr_t begin = (uintptr_t) area_begin; uintptr_t end = begin + area_size; uintptr_t aligned_begin = align_up(alignment, begin); uintptr_t aligned_end = align_down(alignment, end); if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) { ffc0a9cc: 41 9c 00 20 blt- cr7,ffc0a9ec } else { sc = RTEMS_INVALID_NUMBER; } return sc; } ffc0a9d0: 80 01 00 1c lwz r0,28(r1) ffc0a9d4: 83 a1 00 0c lwz r29,12(r1) ffc0a9d8: 7c 08 03 a6 mtlr r0 ffc0a9dc: 83 c1 00 10 lwz r30,16(r1) ffc0a9e0: 83 e1 00 14 lwz r31,20(r1) ffc0a9e4: 38 21 00 18 addi r1,r1,24 ffc0a9e8: 4e 80 00 20 blr static uintptr_t align_up(uintptr_t alignment, uintptr_t value) { uintptr_t excess = value % alignment; if (excess > 0) { value += alignment - excess; ffc0a9ec: 7f c6 22 14 add r30,r6,r4 ffc0a9f0: 7f ca f0 50 subf r30,r10,r30 uintptr_t begin = (uintptr_t) area_begin; uintptr_t end = begin + area_size; uintptr_t aligned_begin = align_up(alignment, begin); uintptr_t aligned_end = align_down(alignment, end); if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) { ffc0a9f4: 7f 84 f0 40 cmplw cr7,r4,r30 ffc0a9f8: 41 9d ff d8 bgt+ cr7,ffc0a9d0 <== NEVER TAKEN return value; } static uintptr_t align_down(uintptr_t alignment, uintptr_t value) { uintptr_t excess = value % alignment; ffc0a9fc: 7c a5 33 96 divwu r5,r5,r6 return value - excess; ffc0aa00: 7f a5 31 d6 mullw r29,r5,r6 uintptr_t begin = (uintptr_t) area_begin; uintptr_t end = begin + area_size; uintptr_t aligned_begin = align_up(alignment, begin); uintptr_t aligned_end = align_down(alignment, end); if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) { ffc0aa04: 7f 9d f0 40 cmplw cr7,r29,r30 insert_into_tree(chunk_tree, first); } else { sc = RTEMS_NO_MEMORY; } } else { sc = RTEMS_INVALID_ADDRESS; ffc0aa08: 38 60 00 09 li r3,9 uintptr_t begin = (uintptr_t) area_begin; uintptr_t end = begin + area_size; uintptr_t aligned_begin = align_up(alignment, begin); uintptr_t aligned_end = align_down(alignment, end); if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) { ffc0aa0c: 40 9d ff c4 ble+ cr7,ffc0a9d0 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; ffc0aa10: 39 20 00 00 li r9,0 tail->previous = head; ffc0aa14: 93 ff 00 08 stw r31,8(r31) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc0aa18: 38 9f 00 04 addi r4,r31,4 head->next = tail; head->previous = NULL; ffc0aa1c: 91 3f 00 04 stw r9,4(r31) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc0aa20: 39 5f 00 0c addi r10,r31,12 ffc0aa24: 38 bf 00 10 addi r5,r31,16 head->next = tail; head->previous = NULL; ffc0aa28: 91 3f 00 10 stw r9,16(r31) rtems_rbtree_initialize_empty(chunk_tree, chunk_compare, true); control->alignment = alignment; control->handler_arg = handler_arg; control->extend_descriptors = extend_descriptors; first = get_chunk(control); ffc0aa2c: 7f e3 fb 78 mr r3,r31 RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; ffc0aa30: 91 3f 00 18 stw r9,24(r31) the_rbtree->root = NULL; ffc0aa34: 91 3f 00 1c stw r9,28(r31) the_rbtree->first[0] = NULL; ffc0aa38: 91 3f 00 20 stw r9,32(r31) the_rbtree->first[1] = NULL; ffc0aa3c: 91 3f 00 24 stw r9,36(r31) the_rbtree->compare_function = compare_function; ffc0aa40: 3d 20 ff c1 lis r9,-63 ffc0aa44: 39 29 a8 60 addi r9,r9,-22432 ffc0aa48: 91 3f 00 28 stw r9,40(r31) the_rbtree->is_unique = is_unique; ffc0aa4c: 39 20 00 01 li r9,1 ffc0aa50: 99 3f 00 2c stb r9,44(r31) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0aa54: 90 9f 00 00 stw r4,0(r31) ffc0aa58: 90 bf 00 0c stw r5,12(r31) head->previous = NULL; tail->previous = head; ffc0aa5c: 91 5f 00 14 stw r10,20(r31) rtems_rbheap_chunk *first = NULL; rtems_chain_initialize_empty(free_chain); rtems_chain_initialize_empty(&control->spare_descriptor_chain); rtems_rbtree_initialize_empty(chunk_tree, chunk_compare, true); control->alignment = alignment; ffc0aa60: 90 df 00 30 stw r6,48(r31) control->handler_arg = handler_arg; ffc0aa64: 91 1f 00 38 stw r8,56(r31) control->extend_descriptors = extend_descriptors; ffc0aa68: 90 ff 00 34 stw r7,52(r31) first = get_chunk(control); ffc0aa6c: 4b ff fe 05 bl ffc0a870 if (first != NULL) { ffc0aa70: 7c 69 1b 79 mr. r9,r3 first->begin = aligned_begin; first->size = aligned_end - aligned_begin; add_to_chain(free_chain, first); insert_into_tree(chunk_tree, first); } else { sc = RTEMS_NO_MEMORY; ffc0aa74: 38 60 00 1a li r3,26 control->alignment = alignment; control->handler_arg = handler_arg; control->extend_descriptors = extend_descriptors; first = get_chunk(control); if (first != NULL) { ffc0aa78: 41 a2 ff 58 beq- ffc0a9d0 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0aa7c: 81 5f 00 00 lwz r10,0(r31) first->begin = aligned_begin; first->size = aligned_end - aligned_begin; ffc0aa80: 7f be e8 50 subf r29,r30,r29 control->handler_arg = handler_arg; control->extend_descriptors = extend_descriptors; first = get_chunk(control); if (first != NULL) { first->begin = aligned_begin; ffc0aa84: 93 c9 00 18 stw r30,24(r9) static void insert_into_tree( rtems_rbtree_control *tree, rtems_rbheap_chunk *chunk ) { _RBTree_Insert_unprotected(tree, &chunk->tree_node); ffc0aa88: 38 7f 00 18 addi r3,r31,24 ffc0aa8c: 38 89 00 08 addi r4,r9,8 control->extend_descriptors = extend_descriptors; first = get_chunk(control); if (first != NULL) { first->begin = aligned_begin; first->size = aligned_end - aligned_begin; ffc0aa90: 93 a9 00 1c stw r29,28(r9) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0aa94: 93 e9 00 04 stw r31,4(r9) before_node = after_node->next; after_node->next = the_node; ffc0aa98: 91 3f 00 00 stw r9,0(r31) the_node->next = before_node; before_node->previous = the_node; ffc0aa9c: 91 2a 00 04 stw r9,4(r10) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0aaa0: 91 49 00 00 stw r10,0(r9) static void insert_into_tree( rtems_rbtree_control *tree, rtems_rbheap_chunk *chunk ) { _RBTree_Insert_unprotected(tree, &chunk->tree_node); ffc0aaa4: 48 00 20 41 bl ffc0cae4 <_RBTree_Insert_unprotected> uintptr_t alignment, rtems_rbheap_extend_descriptors extend_descriptors, void *handler_arg ) { rtems_status_code sc = RTEMS_SUCCESSFUL; ffc0aaa8: 38 60 00 00 li r3,0 ffc0aaac: 4b ff ff 24 b ffc0a9d0 return value; } static uintptr_t align_down(uintptr_t alignment, uintptr_t value) { uintptr_t excess = value % alignment; ffc0aab0: 7f a5 33 96 divwu r29,r5,r6 uintptr_t begin = (uintptr_t) area_begin; uintptr_t end = begin + area_size; uintptr_t aligned_begin = align_up(alignment, begin); uintptr_t aligned_end = align_down(alignment, end); if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) { ffc0aab4: 7f 84 28 40 cmplw cr7,r4,r5 static uintptr_t align_down(uintptr_t alignment, uintptr_t value) { uintptr_t excess = value % alignment; return value - excess; ffc0aab8: 7f bd 31 d6 mullw r29,r29,r6 uintptr_t begin = (uintptr_t) area_begin; uintptr_t end = begin + area_size; uintptr_t aligned_begin = align_up(alignment, begin); uintptr_t aligned_end = align_down(alignment, end); if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) { ffc0aabc: 41 9c 00 0c blt- cr7,ffc0aac8 insert_into_tree(chunk_tree, first); } else { sc = RTEMS_NO_MEMORY; } } else { sc = RTEMS_INVALID_ADDRESS; ffc0aac0: 38 60 00 09 li r3,9 ffc0aac4: 4b ff ff 0c b ffc0a9d0 uintptr_t begin = (uintptr_t) area_begin; uintptr_t end = begin + area_size; uintptr_t aligned_begin = align_up(alignment, begin); uintptr_t aligned_end = align_down(alignment, end); if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) { ffc0aac8: 7c 9e 23 78 mr r30,r4 ffc0aacc: 4b ff ff 38 b ffc0aa04 =============================================================================== ffc1be94 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc1be94: 94 21 ff e0 stwu r1,-32(r1) ffc1be98: 7c 08 02 a6 mflr r0 ffc1be9c: 93 e1 00 1c stw r31,28(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) ffc1bea0: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc1bea4: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) ffc1bea8: 40 82 00 1c bne- ffc1bec4 return RTEMS_INVALID_NUMBER; ffc1beac: 38 60 00 0a li r3,10 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1beb0: 80 01 00 24 lwz r0,36(r1) ffc1beb4: 83 e1 00 1c lwz r31,28(r1) ffc1beb8: 7c 08 03 a6 mtlr r0 ffc1bebc: 38 21 00 20 addi r1,r1,32 ffc1bec0: 4e 80 00 20 blr ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); ffc1bec4: 38 81 00 08 addi r4,r1,8 ffc1bec8: 48 00 5a 21 bl ffc218e8 <_Thread_Get> switch ( location ) { ffc1becc: 81 21 00 08 lwz r9,8(r1) ffc1bed0: 2f 89 00 00 cmpwi cr7,r9,0 ffc1bed4: 40 9e 00 6c bne- cr7,ffc1bf40 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; ffc1bed8: 81 23 01 48 lwz r9,328(r3) asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { ffc1bedc: 81 49 00 0c lwz r10,12(r9) ffc1bee0: 2f 8a 00 00 cmpwi cr7,r10,0 ffc1bee4: 41 9e 00 74 beq- cr7,ffc1bf58 if ( asr->is_enabled ) { ffc1bee8: 89 49 00 08 lbz r10,8(r9) ffc1beec: 2f 8a 00 00 cmpwi cr7,r10,0 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1bef0: 7d 00 00 a6 mfmsr r8 ffc1bef4: 7d 50 42 a6 mfsprg r10,0 ffc1bef8: 7d 0a 50 78 andc r10,r8,r10 ffc1befc: 7d 40 01 24 mtmsr r10 ffc1bf00: 41 9e 00 64 beq- cr7,ffc1bf64 ) { ISR_Level _level; _ISR_Disable( _level ); *signal_set |= signals; ffc1bf04: 81 49 00 14 lwz r10,20(r9) ffc1bf08: 7d 4a fb 78 or r10,r10,r31 ffc1bf0c: 91 49 00 14 stw r10,20(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1bf10: 7d 00 01 24 mtmsr r8 _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc1bf14: 3d 20 00 00 lis r9,0 ffc1bf18: 39 29 72 20 addi r9,r9,29216 ffc1bf1c: 81 49 00 08 lwz r10,8(r9) ffc1bf20: 2f 8a 00 00 cmpwi cr7,r10,0 ffc1bf24: 41 9e 00 10 beq- cr7,ffc1bf34 ffc1bf28: 81 49 00 10 lwz r10,16(r9) ffc1bf2c: 7f 83 50 00 cmpw cr7,r3,r10 ffc1bf30: 41 9e 00 48 beq- cr7,ffc1bf78 <== ALWAYS TAKEN _Thread_Dispatch_necessary = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); ffc1bf34: 48 00 59 99 bl ffc218cc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc1bf38: 38 60 00 00 li r3,0 ffc1bf3c: 4b ff ff 74 b ffc1beb0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1bf40: 80 01 00 24 lwz r0,36(r1) case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc1bf44: 38 60 00 04 li r3,4 } ffc1bf48: 83 e1 00 1c lwz r31,28(r1) ffc1bf4c: 7c 08 03 a6 mtlr r0 ffc1bf50: 38 21 00 20 addi r1,r1,32 ffc1bf54: 4e 80 00 20 blr _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc1bf58: 48 00 59 75 bl ffc218cc <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; ffc1bf5c: 38 60 00 0b li r3,11 ffc1bf60: 4b ff ff 50 b ffc1beb0 ffc1bf64: 81 49 00 18 lwz r10,24(r9) ffc1bf68: 7d 4a fb 78 or r10,r10,r31 ffc1bf6c: 91 49 00 18 stw r10,24(r9) ffc1bf70: 7d 00 01 24 mtmsr r8 ffc1bf74: 4b ff ff c0 b ffc1bf34 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; ffc1bf78: 39 40 00 01 li r10,1 ffc1bf7c: 99 49 00 0c stb r10,12(r9) ffc1bf80: 4b ff ff b4 b ffc1bf34 =============================================================================== ffc14a14 : ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc14a14: 2c 05 00 00 cmpwi r5,0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { ffc14a18: 94 21 ff f8 stwu r1,-8(r1) ffc14a1c: 7c 08 02 a6 mflr r0 ffc14a20: 90 01 00 0c stw r0,12(r1) ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc14a24: 41 82 01 b4 beq- ffc14bd8 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; ffc14a28: 3d 60 00 00 lis r11,0 ffc14a2c: 39 6b 2e 40 addi r11,r11,11840 ffc14a30: 81 2b 00 10 lwz r9,16(r11) api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc14a34: 81 49 00 78 lwz r10,120(r9) executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc14a38: 88 e9 00 70 lbz r7,112(r9) if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc14a3c: 2f 8a 00 00 cmpwi cr7,r10,0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc14a40: 81 49 01 48 lwz r10,328(r9) asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc14a44: 7c e7 00 34 cntlzw r7,r7 ffc14a48: 54 e7 d9 7e rlwinm r7,r7,27,5,31 ffc14a4c: 54 e6 40 2e rlwinm r6,r7,8,0,23 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc14a50: 40 9e 01 08 bne- cr7,ffc14b58 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc14a54: 88 ea 00 08 lbz r7,8(r10) #ifndef ASM static inline uint32_t _CPU_ISR_Get_level( void ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc14a58: 39 00 00 00 li r8,0 ffc14a5c: 7c e7 00 34 cntlzw r7,r7 ffc14a60: 54 e7 d9 7e rlwinm r7,r7,27,5,31 ffc14a64: 54 e7 50 2a rlwinm r7,r7,10,0,21 ffc14a68: 7c e6 33 78 or r6,r7,r6 ffc14a6c: 7d 00 00 a6 mfmsr r8 *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc14a70: 70 87 01 00 andi. r7,r4,256 if (msr & MSR_EE) return 0; ffc14a74: 69 08 80 00 xori r8,r8,32768 ffc14a78: 55 08 8f fe rlwinm r8,r8,17,31,31 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); ffc14a7c: 7c c6 43 78 or r6,r6,r8 *previous_mode_set = old_mode; ffc14a80: 90 c5 00 00 stw r6,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc14a84: 41 82 00 10 beq- ffc14a94 ffc14a88: 68 68 01 00 xori r8,r3,256 ffc14a8c: 55 08 c7 fe rlwinm r8,r8,24,31,31 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; ffc14a90: 99 09 00 70 stb r8,112(r9) if ( mask & RTEMS_TIMESLICE_MASK ) { ffc14a94: 70 88 02 00 andi. r8,r4,512 ffc14a98: 41 82 00 20 beq- ffc14ab8 if ( _Modes_Is_timeslice(mode_set) ) { ffc14a9c: 70 68 02 00 andi. r8,r3,512 ffc14aa0: 41 82 01 4c beq- ffc14bec executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc14aa4: 3d 00 00 00 lis r8,0 ffc14aa8: 81 08 27 b8 lwz r8,10168(r8) 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; ffc14aac: 38 e0 00 01 li r7,1 ffc14ab0: 90 e9 00 78 stw r7,120(r9) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc14ab4: 91 09 00 74 stw r8,116(r9) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc14ab8: 70 89 00 01 andi. r9,r4,1 ffc14abc: 41 82 00 20 beq- ffc14adc } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc14ac0: 39 20 00 00 li r9,0 ffc14ac4: 7d 20 00 a6 mfmsr r9 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; __asm__ volatile ( ffc14ac8: 7d 10 42 a6 mfsprg r8,0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc14acc: 70 67 00 01 andi. r7,r3,1 ffc14ad0: 40 82 01 2c bne- ffc14bfc msr |= ppc_interrupt_get_disable_mask(); ffc14ad4: 7d 09 4b 78 or r9,r8,r9 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc14ad8: 7d 20 01 24 mtmsr r9 * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { ffc14adc: 70 88 04 00 andi. r8,r4,1024 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; ffc14ae0: 39 00 00 00 li r8,0 if ( mask & RTEMS_ASR_MASK ) { ffc14ae4: 41 82 00 50 beq- ffc14b34 is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; ffc14ae8: 68 63 04 00 xori r3,r3,1024 if ( is_asr_enabled != asr->is_enabled ) { ffc14aec: 89 2a 00 08 lbz r9,8(r10) */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; ffc14af0: 54 63 b7 fe rlwinm r3,r3,22,31,31 if ( is_asr_enabled != asr->is_enabled ) { ffc14af4: 7f 89 18 00 cmpw cr7,r9,r3 ffc14af8: 41 9e 00 3c beq- cr7,ffc14b34 asr->is_enabled = is_asr_enabled; ffc14afc: 98 6a 00 08 stb r3,8(r10) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc14b00: 7d 00 00 a6 mfmsr r8 ffc14b04: 7d 30 42 a6 mfsprg r9,0 ffc14b08: 7d 09 48 78 andc r9,r8,r9 ffc14b0c: 7d 20 01 24 mtmsr r9 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; ffc14b10: 81 2a 00 18 lwz r9,24(r10) information->signals_pending = information->signals_posted; ffc14b14: 80 ea 00 14 lwz r7,20(r10) information->signals_posted = _signals; ffc14b18: 91 2a 00 14 stw r9,20(r10) rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; ffc14b1c: 90 ea 00 18 stw r7,24(r10) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc14b20: 7d 00 01 24 mtmsr r8 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { ffc14b24: 81 0a 00 14 lwz r8,20(r10) ffc14b28: 7d 08 00 34 cntlzw r8,r8 ffc14b2c: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc14b30: 69 08 00 01 xori r8,r8,1 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc14b34: 3d 20 00 00 lis r9,0 ffc14b38: 81 29 27 e4 lwz r9,10212(r9) if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; ffc14b3c: 38 60 00 00 li r3,0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc14b40: 2f 89 00 03 cmpwi cr7,r9,3 ffc14b44: 41 9e 00 50 beq- cr7,ffc14b94 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; } ffc14b48: 80 01 00 0c lwz r0,12(r1) ffc14b4c: 38 21 00 08 addi r1,r1,8 ffc14b50: 7c 08 03 a6 mtlr r0 ffc14b54: 4e 80 00 20 blr if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc14b58: 88 ea 00 08 lbz r7,8(r10) old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; ffc14b5c: 60 c6 02 00 ori r6,r6,512 #ifndef ASM static inline uint32_t _CPU_ISR_Get_level( void ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc14b60: 39 00 00 00 li r8,0 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc14b64: 7c e7 00 34 cntlzw r7,r7 ffc14b68: 54 e7 d9 7e rlwinm r7,r7,27,5,31 ffc14b6c: 54 e7 50 2a rlwinm r7,r7,10,0,21 ffc14b70: 7c e6 33 78 or r6,r7,r6 ffc14b74: 7d 00 00 a6 mfmsr r8 *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc14b78: 70 87 01 00 andi. r7,r4,256 if (msr & MSR_EE) return 0; ffc14b7c: 69 08 80 00 xori r8,r8,32768 ffc14b80: 55 08 8f fe rlwinm r8,r8,17,31,31 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); ffc14b84: 7c c6 43 78 or r6,r6,r8 *previous_mode_set = old_mode; ffc14b88: 90 c5 00 00 stw r6,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc14b8c: 41 a2 ff 08 beq- ffc14a94 ffc14b90: 4b ff fe f8 b ffc14a88 { Thread_Control *executing; executing = _Thread_Executing; if ( are_signals_pending || ffc14b94: 2f 88 00 00 cmpwi cr7,r8,0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; ffc14b98: 81 2b 00 10 lwz r9,16(r11) if ( are_signals_pending || ffc14b9c: 40 9e 00 1c bne- cr7,ffc14bb8 ffc14ba0: 81 4b 00 14 lwz r10,20(r11) ffc14ba4: 7f 89 50 00 cmpw cr7,r9,r10 ffc14ba8: 41 be ff a0 beq- cr7,ffc14b48 (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { ffc14bac: 89 29 00 70 lbz r9,112(r9) ffc14bb0: 2f 89 00 00 cmpwi cr7,r9,0 ffc14bb4: 41 be ff 94 beq- cr7,ffc14b48 <== NEVER TAKEN _Thread_Dispatch_necessary = true; ffc14bb8: 39 20 00 01 li r9,1 ffc14bbc: 99 2b 00 0c stb r9,12(r11) } } if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); ffc14bc0: 4b ff 92 59 bl ffc0de18 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; ffc14bc4: 38 60 00 00 li r3,0 } ffc14bc8: 80 01 00 0c lwz r0,12(r1) ffc14bcc: 38 21 00 08 addi r1,r1,8 ffc14bd0: 7c 08 03 a6 mtlr r0 ffc14bd4: 4e 80 00 20 blr ffc14bd8: 80 01 00 0c lwz r0,12(r1) bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; ffc14bdc: 38 60 00 09 li r3,9 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; } ffc14be0: 7c 08 03 a6 mtlr r0 ffc14be4: 38 21 00 08 addi r1,r1,8 ffc14be8: 4e 80 00 20 blr if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; ffc14bec: 91 09 00 78 stw r8,120(r9) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc14bf0: 70 89 00 01 andi. r9,r4,1 ffc14bf4: 41 a2 fe e8 beq- ffc14adc ffc14bf8: 4b ff fe c8 b ffc14ac0 _CPU_MSR_GET(msr); if (!(level & CPU_MODES_INTERRUPT_MASK)) { msr |= ppc_interrupt_get_disable_mask(); } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc14bfc: 7d 29 40 78 andc r9,r9,r8 } _CPU_MSR_SET(msr); ffc14c00: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); ffc14c04: 4b ff fe d8 b ffc14adc =============================================================================== ffc0f188 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0f188: 7d 80 00 26 mfcr r12 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0f18c: 2e 04 00 00 cmpwi cr4,r4,0 rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0f190: 94 21 ff d8 stwu r1,-40(r1) ffc0f194: 7c 08 02 a6 mflr r0 ffc0f198: 93 e1 00 24 stw r31,36(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0f19c: 7c 9f 23 78 mr r31,r4 rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0f1a0: 90 01 00 2c stw r0,44(r1) ffc0f1a4: 91 81 00 20 stw r12,32(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0f1a8: 41 92 00 18 beq- cr4,ffc0f1c0 RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); ffc0f1ac: 3d 20 00 00 lis r9,0 ffc0f1b0: 89 49 27 04 lbz r10,9988(r9) !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; ffc0f1b4: 39 20 00 13 li r9,19 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ffc0f1b8: 7f 84 50 40 cmplw cr7,r4,r10 ffc0f1bc: 41 9d 00 68 bgt- cr7,ffc0f224 if ( !old_priority ) ffc0f1c0: 2f 85 00 00 cmpwi cr7,r5,0 return RTEMS_INVALID_ADDRESS; ffc0f1c4: 39 20 00 09 li r9,9 if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) ffc0f1c8: 41 9e 00 5c beq- cr7,ffc0f224 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); ffc0f1cc: 38 81 00 08 addi r4,r1,8 ffc0f1d0: 90 a1 00 18 stw r5,24(r1) ffc0f1d4: 48 00 2c 4d bl ffc11e20 <_Thread_Get> switch ( location ) { ffc0f1d8: 81 21 00 08 lwz r9,8(r1) ffc0f1dc: 80 a1 00 18 lwz r5,24(r1) ffc0f1e0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f1e4: 40 9e 00 60 bne- cr7,ffc0f244 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; ffc0f1e8: 81 23 00 14 lwz r9,20(r3) ffc0f1ec: 91 25 00 00 stw r9,0(r5) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { ffc0f1f0: 41 92 00 2c beq- cr4,ffc0f21c the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || ffc0f1f4: 81 23 00 1c lwz r9,28(r3) case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; if ( new_priority != RTEMS_CURRENT_PRIORITY ) { the_thread->real_priority = new_priority; ffc0f1f8: 93 e3 00 18 stw r31,24(r3) if ( the_thread->resource_count == 0 || ffc0f1fc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f200: 41 9e 00 10 beq- cr7,ffc0f210 ffc0f204: 81 23 00 14 lwz r9,20(r3) ffc0f208: 7f 9f 48 40 cmplw cr7,r31,r9 ffc0f20c: 40 9c 00 10 bge- cr7,ffc0f21c <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); ffc0f210: 7f e4 fb 78 mr r4,r31 ffc0f214: 38 a0 00 00 li r5,0 ffc0f218: 48 00 25 61 bl ffc11778 <_Thread_Change_priority> } _Thread_Enable_dispatch(); ffc0f21c: 48 00 2b e9 bl ffc11e04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0f220: 39 20 00 00 li r9,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0f224: 80 01 00 2c lwz r0,44(r1) ffc0f228: 7d 23 4b 78 mr r3,r9 ffc0f22c: 81 81 00 20 lwz r12,32(r1) ffc0f230: 7c 08 03 a6 mtlr r0 ffc0f234: 83 e1 00 24 lwz r31,36(r1) ffc0f238: 7d 80 81 20 mtcrf 8,r12 ffc0f23c: 38 21 00 28 addi r1,r1,40 ffc0f240: 4e 80 00 20 blr ffc0f244: 80 01 00 2c lwz r0,44(r1) case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0f248: 39 20 00 04 li r9,4 } ffc0f24c: 81 81 00 20 lwz r12,32(r1) ffc0f250: 7d 23 4b 78 mr r3,r9 ffc0f254: 7c 08 03 a6 mtlr r0 ffc0f258: 83 e1 00 24 lwz r31,36(r1) ffc0f25c: 7d 80 81 20 mtcrf 8,r12 ffc0f260: 38 21 00 28 addi r1,r1,40 ffc0f264: 4e 80 00 20 blr =============================================================================== ffc0874c : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { ffc0874c: 94 21 ff e0 stwu r1,-32(r1) ffc08750: 7c 08 02 a6 mflr r0 ffc08754: 93 e1 00 1c stw r31,28(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) ffc08758: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { ffc0875c: 90 01 00 24 stw r0,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) ffc08760: 41 82 00 74 beq- ffc087d4 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); ffc08764: 38 81 00 08 addi r4,r1,8 ffc08768: 48 00 25 55 bl ffc0acbc <_Thread_Get> switch (location) { ffc0876c: 81 21 00 08 lwz r9,8(r1) ffc08770: 2f 89 00 00 cmpwi cr7,r9,0 ffc08774: 40 9e 00 48 bne- cr7,ffc087bc case OBJECTS_LOCAL: tvp = the_thread->task_variables; ffc08778: 81 23 01 54 lwz r9,340(r3) while (tvp) { ffc0877c: 2f 89 00 00 cmpwi cr7,r9,0 ffc08780: 41 9e 00 30 beq- cr7,ffc087b0 if (tvp->ptr == ptr) { ffc08784: 81 49 00 04 lwz r10,4(r9) ffc08788: 7f 8a f8 00 cmpw cr7,r10,r31 ffc0878c: 40 be 00 18 bne+ cr7,ffc087a4 ffc08790: 48 00 00 74 b ffc08804 ffc08794: 81 44 00 04 lwz r10,4(r4) ffc08798: 7f 8a f8 00 cmpw cr7,r10,r31 ffc0879c: 41 9e 00 50 beq- cr7,ffc087ec ffc087a0: 7c 89 23 78 mr r9,r4 _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; ffc087a4: 80 89 00 00 lwz r4,0(r9) the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { ffc087a8: 2f 84 00 00 cmpwi cr7,r4,0 ffc087ac: 40 9e ff e8 bne+ cr7,ffc08794 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc087b0: 48 00 24 f1 bl ffc0aca0 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; ffc087b4: 38 60 00 09 li r3,9 ffc087b8: 48 00 00 08 b ffc087c0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc087bc: 38 60 00 04 li r3,4 } ffc087c0: 80 01 00 24 lwz r0,36(r1) ffc087c4: 83 e1 00 1c lwz r31,28(r1) ffc087c8: 7c 08 03 a6 mtlr r0 ffc087cc: 38 21 00 20 addi r1,r1,32 ffc087d0: 4e 80 00 20 blr ffc087d4: 80 01 00 24 lwz r0,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) return RTEMS_INVALID_ADDRESS; ffc087d8: 38 60 00 09 li r3,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc087dc: 83 e1 00 1c lwz r31,28(r1) ffc087e0: 7c 08 03 a6 mtlr r0 ffc087e4: 38 21 00 20 addi r1,r1,32 ffc087e8: 4e 80 00 20 blr case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; ffc087ec: 81 44 00 00 lwz r10,0(r4) ffc087f0: 91 49 00 00 stw r10,0(r9) else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); ffc087f4: 48 00 00 dd bl ffc088d0 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); ffc087f8: 48 00 24 a9 bl ffc0aca0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc087fc: 38 60 00 00 li r3,0 ffc08800: 4b ff ff c0 b ffc087c0 while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; ffc08804: 81 49 00 00 lwz r10,0(r9) ffc08808: 7d 24 4b 78 mr r4,r9 ffc0880c: 91 43 01 54 stw r10,340(r3) ffc08810: 4b ff ff e4 b ffc087f4 =============================================================================== ffc08814 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc08814: 94 21 ff d8 stwu r1,-40(r1) ffc08818: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) return RTEMS_INVALID_ADDRESS; ffc0881c: 39 20 00 09 li r9,9 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc08820: 93 e1 00 24 stw r31,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) ffc08824: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc08828: 90 01 00 2c stw r0,44(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) ffc0882c: 41 82 00 64 beq- ffc08890 return RTEMS_INVALID_ADDRESS; if ( !result ) ffc08830: 2f 85 00 00 cmpwi cr7,r5,0 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) return RTEMS_INVALID_ADDRESS; ffc08834: 39 20 00 09 li r9,9 if ( !result ) ffc08838: 41 9e 00 58 beq- cr7,ffc08890 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); ffc0883c: 38 81 00 08 addi r4,r1,8 ffc08840: 90 a1 00 18 stw r5,24(r1) ffc08844: 48 00 24 79 bl ffc0acbc <_Thread_Get> switch (location) { ffc08848: 81 21 00 08 lwz r9,8(r1) ffc0884c: 80 a1 00 18 lwz r5,24(r1) ffc08850: 2f 89 00 00 cmpwi cr7,r9,0 ffc08854: 40 9e 00 54 bne- cr7,ffc088a8 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; ffc08858: 81 23 01 54 lwz r9,340(r3) while (tvp) { ffc0885c: 2f 89 00 00 cmpwi cr7,r9,0 ffc08860: 40 be 00 14 bne+ cr7,ffc08874 ffc08864: 48 00 00 60 b ffc088c4 */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; ffc08868: 81 29 00 00 lwz r9,0(r9) case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { ffc0886c: 2f 89 00 00 cmpwi cr7,r9,0 ffc08870: 41 9e 00 54 beq- cr7,ffc088c4 <== NEVER TAKEN if (tvp->ptr == ptr) { ffc08874: 81 49 00 04 lwz r10,4(r9) ffc08878: 7f 8a f8 00 cmpw cr7,r10,r31 ffc0887c: 40 9e ff ec bne+ cr7,ffc08868 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; ffc08880: 81 29 00 0c lwz r9,12(r9) ffc08884: 91 25 00 00 stw r9,0(r5) _Thread_Enable_dispatch(); ffc08888: 48 00 24 19 bl ffc0aca0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0888c: 39 20 00 00 li r9,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc08890: 80 01 00 2c lwz r0,44(r1) ffc08894: 7d 23 4b 78 mr r3,r9 ffc08898: 83 e1 00 24 lwz r31,36(r1) ffc0889c: 7c 08 03 a6 mtlr r0 ffc088a0: 38 21 00 28 addi r1,r1,40 ffc088a4: 4e 80 00 20 blr ffc088a8: 80 01 00 2c lwz r0,44(r1) #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc088ac: 39 20 00 04 li r9,4 } ffc088b0: 83 e1 00 24 lwz r31,36(r1) ffc088b4: 7d 23 4b 78 mr r3,r9 ffc088b8: 7c 08 03 a6 mtlr r0 ffc088bc: 38 21 00 28 addi r1,r1,40 ffc088c0: 4e 80 00 20 blr _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc088c4: 48 00 23 dd bl ffc0aca0 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; ffc088c8: 39 20 00 09 li r9,9 ffc088cc: 4b ff ff c4 b ffc08890 =============================================================================== ffc1cc7c : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { ffc1cc7c: 94 21 ff e8 stwu r1,-24(r1) ffc1cc80: 7c 08 02 a6 mflr r0 ffc1cc84: 7c 64 1b 78 mr r4,r3 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) ffc1cc88: 3c 60 00 00 lis r3,0 ffc1cc8c: 90 01 00 1c stw r0,28(r1) ffc1cc90: 38 63 72 e0 addi r3,r3,29408 ffc1cc94: 38 a1 00 08 addi r5,r1,8 ffc1cc98: 48 00 3b 99 bl ffc20830 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1cc9c: 81 21 00 08 lwz r9,8(r1) ffc1cca0: 2f 89 00 00 cmpwi cr7,r9,0 ffc1cca4: 40 9e 00 30 bne- cr7,ffc1ccd4 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) ffc1cca8: 81 23 00 38 lwz r9,56(r3) ffc1ccac: 2f 89 00 04 cmpwi cr7,r9,4 ffc1ccb0: 41 9e 00 0c beq- cr7,ffc1ccbc <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1ccb4: 38 63 00 10 addi r3,r3,16 ffc1ccb8: 48 00 5f dd bl ffc22c94 <_Watchdog_Remove> _Thread_Enable_dispatch(); ffc1ccbc: 48 00 4c 11 bl ffc218cc <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1ccc0: 80 01 00 1c lwz r0,28(r1) case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) (void) _Watchdog_Remove( &the_timer->Ticker ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc1ccc4: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1ccc8: 7c 08 03 a6 mtlr r0 ffc1cccc: 38 21 00 18 addi r1,r1,24 ffc1ccd0: 4e 80 00 20 blr ffc1ccd4: 80 01 00 1c lwz r0,28(r1) #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc1ccd8: 38 60 00 04 li r3,4 } ffc1ccdc: 7c 08 03 a6 mtlr r0 ffc1cce0: 38 21 00 18 addi r1,r1,24 ffc1cce4: 4e 80 00 20 blr =============================================================================== ffc1d3e8 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1d3e8: 94 21 ff c0 stwu r1,-64(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; ffc1d3ec: 3d 20 00 00 lis r9,0 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1d3f0: 7c 08 02 a6 mflr r0 ffc1d3f4: 93 e1 00 3c stw r31,60(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; ffc1d3f8: 83 e9 29 38 lwz r31,10552(r9) rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1d3fc: 90 01 00 44 stw r0,68(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1d400: 2f 9f 00 00 cmpwi cr7,r31,0 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1d404: 93 01 00 20 stw r24,32(r1) ffc1d408: 93 21 00 24 stw r25,36(r1) ffc1d40c: 93 41 00 28 stw r26,40(r1) ffc1d410: 93 61 00 2c stw r27,44(r1) ffc1d414: 93 81 00 30 stw r28,48(r1) ffc1d418: 93 a1 00 34 stw r29,52(r1) ffc1d41c: 93 c1 00 38 stw r30,56(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1d420: 41 9e 00 b0 beq- cr7,ffc1d4d0 return RTEMS_INCORRECT_STATE; if ( !_TOD.is_set ) ffc1d424: 3f c0 00 00 lis r30,0 ffc1d428: 3b de 70 00 addi r30,r30,28672 ffc1d42c: 89 5e 00 14 lbz r10,20(r30) ffc1d430: 7c 7c 1b 78 mr r28,r3 return RTEMS_NOT_DEFINED; ffc1d434: 38 60 00 0b li r3,11 Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD.is_set ) ffc1d438: 2f 8a 00 00 cmpwi cr7,r10,0 ffc1d43c: 40 9e 00 34 bne- cr7,ffc1d470 <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1d440: 80 01 00 44 lwz r0,68(r1) ffc1d444: 83 01 00 20 lwz r24,32(r1) ffc1d448: 7c 08 03 a6 mtlr r0 ffc1d44c: 83 21 00 24 lwz r25,36(r1) ffc1d450: 83 41 00 28 lwz r26,40(r1) ffc1d454: 83 61 00 2c lwz r27,44(r1) ffc1d458: 83 81 00 30 lwz r28,48(r1) ffc1d45c: 83 a1 00 34 lwz r29,52(r1) ffc1d460: 83 c1 00 38 lwz r30,56(r1) ffc1d464: 83 e1 00 3c lwz r31,60(r1) ffc1d468: 38 21 00 40 addi r1,r1,64 ffc1d46c: 4e 80 00 20 blr return RTEMS_INCORRECT_STATE; if ( !_TOD.is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) ffc1d470: 2f 85 00 00 cmpwi cr7,r5,0 ffc1d474: 7c bd 2b 78 mr r29,r5 return RTEMS_INVALID_ADDRESS; ffc1d478: 38 60 00 09 li r3,9 return RTEMS_INCORRECT_STATE; if ( !_TOD.is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) ffc1d47c: 41 be ff c4 beq- cr7,ffc1d440 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc1d480: 7c 83 23 78 mr r3,r4 ffc1d484: 90 81 00 18 stw r4,24(r1) ffc1d488: 7c db 33 78 mr r27,r6 ffc1d48c: 4b ff bb 45 bl ffc18fd0 <_TOD_Validate> ffc1d490: 2f 83 00 00 cmpwi cr7,r3,0 ffc1d494: 80 81 00 18 lwz r4,24(r1) ffc1d498: 40 9e 00 6c bne- cr7,ffc1d504 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1d49c: 80 01 00 44 lwz r0,68(r1) if ( !routine ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; ffc1d4a0: 38 60 00 14 li r3,20 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1d4a4: 83 01 00 20 lwz r24,32(r1) ffc1d4a8: 7c 08 03 a6 mtlr r0 ffc1d4ac: 83 21 00 24 lwz r25,36(r1) ffc1d4b0: 83 41 00 28 lwz r26,40(r1) ffc1d4b4: 83 61 00 2c lwz r27,44(r1) ffc1d4b8: 83 81 00 30 lwz r28,48(r1) ffc1d4bc: 83 a1 00 34 lwz r29,52(r1) ffc1d4c0: 83 c1 00 38 lwz r30,56(r1) ffc1d4c4: 83 e1 00 3c lwz r31,60(r1) ffc1d4c8: 38 21 00 40 addi r1,r1,64 ffc1d4cc: 4e 80 00 20 blr ffc1d4d0: 80 01 00 44 lwz r0,68(r1) Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; ffc1d4d4: 38 60 00 0e li r3,14 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1d4d8: 83 01 00 20 lwz r24,32(r1) ffc1d4dc: 7c 08 03 a6 mtlr r0 ffc1d4e0: 83 21 00 24 lwz r25,36(r1) ffc1d4e4: 83 41 00 28 lwz r26,40(r1) ffc1d4e8: 83 61 00 2c lwz r27,44(r1) ffc1d4ec: 83 81 00 30 lwz r28,48(r1) ffc1d4f0: 83 a1 00 34 lwz r29,52(r1) ffc1d4f4: 83 c1 00 38 lwz r30,56(r1) ffc1d4f8: 83 e1 00 3c lwz r31,60(r1) ffc1d4fc: 38 21 00 40 addi r1,r1,64 ffc1d500: 4e 80 00 20 blr return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1d504: 7c 83 23 78 mr r3,r4 ffc1d508: 4b ff ba 15 bl ffc18f1c <_TOD_To_seconds> ffc1d50c: 80 9e 00 04 lwz r4,4(r30) ffc1d510: 7c 7a 1b 78 mr r26,r3 ffc1d514: 80 7e 00 00 lwz r3,0(r30) ffc1d518: 3c c0 3b 9a lis r6,15258 ffc1d51c: 38 a0 00 00 li r5,0 ffc1d520: 60 c6 ca 00 ori r6,r6,51712 ffc1d524: 48 01 52 a1 bl ffc327c4 <__divdi3> if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1d528: 7f 9a 20 40 cmplw cr7,r26,r4 ffc1d52c: 40 9d ff 70 ble+ cr7,ffc1d49c ffc1d530: 3c 60 00 00 lis r3,0 ffc1d534: 38 63 72 e0 addi r3,r3,29408 ffc1d538: 7f 84 e3 78 mr r4,r28 ffc1d53c: 38 a1 00 08 addi r5,r1,8 ffc1d540: 48 00 32 f1 bl ffc20830 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1d544: 83 01 00 08 lwz r24,8(r1) ffc1d548: 7c 79 1b 78 mr r25,r3 ffc1d54c: 2f 98 00 00 cmpwi cr7,r24,0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc1d550: 38 60 00 04 li r3,4 seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1d554: 40 be fe ec bne- cr7,ffc1d440 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1d558: 38 79 00 10 addi r3,r25,16 ffc1d55c: 48 00 57 39 bl ffc22c94 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; ffc1d560: 39 20 00 03 li r9,3 ffc1d564: 80 7e 00 00 lwz r3,0(r30) ffc1d568: 3c c0 3b 9a lis r6,15258 ffc1d56c: 80 9e 00 04 lwz r4,4(r30) ffc1d570: 38 a0 00 00 li r5,0 ffc1d574: 91 39 00 38 stw r9,56(r25) ffc1d578: 60 c6 ca 00 ori r6,r6,51712 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1d57c: 93 19 00 18 stw r24,24(r25) the_watchdog->routine = routine; ffc1d580: 93 b9 00 2c stw r29,44(r25) the_watchdog->id = id; ffc1d584: 93 99 00 30 stw r28,48(r25) the_watchdog->user_data = user_data; ffc1d588: 93 79 00 34 stw r27,52(r25) ffc1d58c: 48 01 52 39 bl ffc327c4 <__divdi3> _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 ); ffc1d590: 81 3f 00 04 lwz r9,4(r31) 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(); ffc1d594: 7f 44 d0 50 subf r26,r4,r26 (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1d598: 7f e3 fb 78 mr r3,r31 ffc1d59c: 7d 29 03 a6 mtctr r9 ffc1d5a0: 7f 24 cb 78 mr r4,r25 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); ffc1d5a4: 93 59 00 1c stw r26,28(r25) (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1d5a8: 4e 80 04 21 bctrl _Thread_Enable_dispatch(); ffc1d5ac: 48 00 43 21 bl ffc218cc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc1d5b0: 38 60 00 00 li r3,0 ffc1d5b4: 4b ff fe 8c b ffc1d440