=============================================================================== ffc09ed4 <_API_extensions_Run_postdriver>: /* * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09ed4: 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; ffc09ed8: 3d 20 00 00 lis r9,0 ffc09edc: 7c 08 02 a6 mflr r0 ffc09ee0: 93 c1 00 08 stw r30,8(r1) ffc09ee4: 3b c9 2d 80 addi r30,r9,11648 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09ee8: 3b de 00 04 addi r30,r30,4 /* * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09eec: 93 e1 00 0c stw r31,12(r1) ffc09ef0: 83 e9 2d 80 lwz r31,11648(r9) ffc09ef4: 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 ); ffc09ef8: 7f 9f f0 00 cmpw cr7,r31,r30 ffc09efc: 41 9e 00 1c beq- cr7,ffc09f18 <_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)(); ffc09f00: 80 1f 00 08 lwz r0,8(r31) ffc09f04: 7c 09 03 a6 mtctr r0 ffc09f08: 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 ) { ffc09f0c: 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 ); ffc09f10: 7f 9f f0 00 cmpw cr7,r31,r30 ffc09f14: 40 9e ff ec bne+ cr7,ffc09f00 <_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)(); } } ffc09f18: 80 01 00 14 lwz r0,20(r1) ffc09f1c: 83 c1 00 08 lwz r30,8(r1) ffc09f20: 7c 08 03 a6 mtlr r0 ffc09f24: 83 e1 00 0c lwz r31,12(r1) ffc09f28: 38 21 00 10 addi r1,r1,16 ffc09f2c: 4e 80 00 20 blr =============================================================================== ffc09f30 <_API_extensions_Run_postswitch>: /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09f30: 94 21 ff e8 stwu r1,-24(r1) ffc09f34: 3d 20 00 00 lis r9,0 ffc09f38: 7c 08 02 a6 mflr r0 ffc09f3c: 93 c1 00 10 stw r30,16(r1) ffc09f40: 3b c9 2d 80 addi r30,r9,11648 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09f44: 3b de 00 04 addi r30,r30,4 /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09f48: 93 e1 00 14 stw r31,20(r1) ffc09f4c: 83 e9 2d 80 lwz r31,11648(r9) ffc09f50: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09f54: 7f 9f f0 00 cmpw cr7,r31,r30 /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09f58: 93 a1 00 0c stw r29,12(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09f5c: 41 9e 00 28 beq- cr7,ffc09f84 <_API_extensions_Run_postswitch+0x54><== NEVER TAKEN ffc09f60: 3f a0 00 00 lis r29,0 ffc09f64: 3b bd 2d b8 addi r29,r29,11704 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); ffc09f68: 80 1f 00 0c lwz r0,12(r31) ffc09f6c: 80 7d 00 0c lwz r3,12(r29) ffc09f70: 7c 09 03 a6 mtctr r0 ffc09f74: 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 ) { ffc09f78: 83 ff 00 00 lwz r31,0(r31) void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc09f7c: 7f 9f f0 00 cmpw cr7,r31,r30 ffc09f80: 40 9e ff e8 bne+ cr7,ffc09f68 <_API_extensions_Run_postswitch+0x38><== NEVER TAKEN the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09f84: 80 01 00 1c lwz r0,28(r1) ffc09f88: 83 a1 00 0c lwz r29,12(r1) ffc09f8c: 7c 08 03 a6 mtlr r0 ffc09f90: 83 c1 00 10 lwz r30,16(r1) ffc09f94: 83 e1 00 14 lwz r31,20(r1) ffc09f98: 38 21 00 18 addi r1,r1,24 ffc09f9c: 4e 80 00 20 blr =============================================================================== ffc14edc <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { ffc14edc: 94 21 ff e0 stwu r1,-32(r1) ffc14ee0: 7c 08 02 a6 mflr r0 ffc14ee4: 90 01 00 24 stw r0,36(r1) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc14ee8: 70 c0 00 03 andi. r0,r6,3 { 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; ffc14eec: 38 00 00 00 li r0,0 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { ffc14ef0: 93 81 00 10 stw r28,16(r1) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc14ef4: 7c dc 33 78 mr r28,r6 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { ffc14ef8: 93 a1 00 14 stw r29,20(r1) ffc14efc: 7c 9d 23 78 mr r29,r4 ffc14f00: 93 e1 00 1c stw r31,28(r1) ffc14f04: 7c 7f 1b 78 mr r31,r3 ffc14f08: 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; ffc14f0c: 90 a3 00 44 stw r5,68(r3) the_message_queue->number_of_pending_messages = 0; ffc14f10: 90 03 00 48 stw r0,72(r3) the_message_queue->maximum_message_size = maximum_message_size; ffc14f14: 90 c3 00 4c stw r6,76(r3) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc14f18: 41 82 00 3c beq- ffc14f54 <_CORE_message_queue_Initialize+0x78> allocated_message_size += sizeof(uint32_t); ffc14f1c: 3b 86 00 04 addi r28,r6,4 allocated_message_size &= ~(sizeof(uint32_t) - 1); ffc14f20: 57 9c 00 3a rlwinm r28,r28,0,0,29 } if (allocated_message_size < maximum_message_size) ffc14f24: 7f 86 e0 40 cmplw cr7,r6,r28 return false; ffc14f28: 3b c0 00 00 li r30,0 if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); allocated_message_size &= ~(sizeof(uint32_t) - 1); } if (allocated_message_size < maximum_message_size) ffc14f2c: 40 9d 00 28 ble- cr7,ffc14f54 <_CORE_message_queue_Initialize+0x78><== ALWAYS TAKEN STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc14f30: 80 01 00 24 lwz r0,36(r1) ffc14f34: 7f c3 f3 78 mr r3,r30 ffc14f38: 83 81 00 10 lwz r28,16(r1) ffc14f3c: 7c 08 03 a6 mtlr r0 ffc14f40: 83 a1 00 14 lwz r29,20(r1) ffc14f44: 83 c1 00 18 lwz r30,24(r1) ffc14f48: 83 e1 00 1c lwz r31,28(r1) ffc14f4c: 38 21 00 20 addi r1,r1,32 ffc14f50: 4e 80 00 20 blr /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( ffc14f54: 3b 9c 00 10 addi r28,r28,16 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; ffc14f58: 7d 45 e0 16 mulhwu r10,r5,r28 ffc14f5c: 7d 65 e1 d6 mullw r11,r5,r28 if ( x > SIZE_MAX ) ffc14f60: 2f 8a 00 00 cmpwi cr7,r10,0 */ if ( !size_t_mult32_with_overflow( (size_t) maximum_pending_messages, allocated_message_size + sizeof(CORE_message_queue_Buffer_control), &message_buffering_required ) ) return false; ffc14f64: 3b c0 00 00 li r30,0 size_t *c ) { long long x = (long long)a*b; if ( x > SIZE_MAX ) ffc14f68: 41 bd ff c8 bgt- cr7,ffc14f30 <_CORE_message_queue_Initialize+0x54> /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); ffc14f6c: 7d 63 5b 78 mr r3,r11 ffc14f70: 90 a1 00 08 stw r5,8(r1) ffc14f74: 48 00 3b fd bl ffc18b70 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) ffc14f78: 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 *) ffc14f7c: 90 7f 00 5c stw r3,92(r31) _Workspace_Allocate( message_buffering_required ); ffc14f80: 7c 64 1b 78 mr r4,r3 if (the_message_queue->message_buffers == 0) ffc14f84: 80 a1 00 08 lwz r5,8(r1) ffc14f88: 41 be ff a8 beq- cr7,ffc14f30 <_CORE_message_queue_Initialize+0x54> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( ffc14f8c: 38 7f 00 60 addi r3,r31,96 ffc14f90: 7f 86 e3 78 mr r6,r28 ffc14f94: 48 00 61 e1 bl ffc1b174 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc14f98: 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 ); ffc14f9c: 38 1f 00 50 addi r0,r31,80 head->next = tail; head->previous = NULL; ffc14fa0: 93 df 00 54 stw r30,84(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 ); ffc14fa4: 39 3f 00 54 addi r9,r31,84 ffc14fa8: 68 84 00 01 xori r4,r4,1 head->next = tail; head->previous = NULL; tail->previous = head; ffc14fac: 90 1f 00 58 stw r0,88(r31) ffc14fb0: 7c 84 00 34 cntlzw r4,r4 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc14fb4: 91 3f 00 50 stw r9,80(r31) ffc14fb8: 7f e3 fb 78 mr r3,r31 ffc14fbc: 54 84 d9 7e rlwinm r4,r4,27,5,31 ffc14fc0: 38 a0 00 80 li r5,128 ffc14fc4: 38 c0 00 06 li r6,6 ffc14fc8: 48 00 2e 1d bl ffc17de4 <_Thread_queue_Initialize> STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc14fcc: 80 01 00 24 lwz r0,36(r1) THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; ffc14fd0: 3b c0 00 01 li r30,1 } ffc14fd4: 83 81 00 10 lwz r28,16(r1) ffc14fd8: 7c 08 03 a6 mtlr r0 ffc14fdc: 7f c3 f3 78 mr r3,r30 ffc14fe0: 83 a1 00 14 lwz r29,20(r1) ffc14fe4: 83 c1 00 18 lwz r30,24(r1) ffc14fe8: 83 e1 00 1c lwz r31,28(r1) ffc14fec: 38 21 00 20 addi r1,r1,32 ffc14ff0: 4e 80 00 20 blr =============================================================================== ffc0a624 <_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 ) { ffc0a624: 94 21 ff f0 stwu r1,-16(r1) ffc0a628: 7c 08 02 a6 mflr r0 ffc0a62c: 93 e1 00 0c stw r31,12(r1) ffc0a630: 7c 7f 1b 78 mr r31,r3 ffc0a634: 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)) ) { ffc0a638: 48 00 21 01 bl ffc0c738 <_Thread_queue_Dequeue> ffc0a63c: 2f 83 00 00 cmpwi cr7,r3,0 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0a640: 38 60 00 00 li r3,0 if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc0a644: 41 9e 00 18 beq- cr7,ffc0a65c <_CORE_semaphore_Surrender+0x38> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0a648: 80 01 00 14 lwz r0,20(r1) ffc0a64c: 83 e1 00 0c lwz r31,12(r1) ffc0a650: 38 21 00 10 addi r1,r1,16 ffc0a654: 7c 08 03 a6 mtlr r0 ffc0a658: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0a65c: 7c 00 00 a6 mfmsr r0 ffc0a660: 7d 30 42 a6 mfsprg r9,0 ffc0a664: 7c 09 48 78 andc r9,r0,r9 ffc0a668: 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 ) ffc0a66c: 81 3f 00 48 lwz r9,72(r31) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; ffc0a670: 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 ) ffc0a674: 81 7f 00 40 lwz r11,64(r31) ffc0a678: 7f 89 58 40 cmplw cr7,r9,r11 ffc0a67c: 40 9c 00 10 bge- cr7,ffc0a68c <_CORE_semaphore_Surrender+0x68><== NEVER TAKEN the_semaphore->count += 1; ffc0a680: 39 29 00 01 addi r9,r9,1 ffc0a684: 91 3f 00 48 stw r9,72(r31) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0a688: 38 60 00 00 li r3,0 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0a68c: 7c 00 01 24 mtmsr r0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0a690: 80 01 00 14 lwz r0,20(r1) ffc0a694: 83 e1 00 0c lwz r31,12(r1) ffc0a698: 38 21 00 10 addi r1,r1,16 ffc0a69c: 7c 08 03 a6 mtlr r0 ffc0a6a0: 4e 80 00 20 blr =============================================================================== ffc100e8 <_Chain_Initialize>: Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc100e8: 2c 05 00 00 cmpwi 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; ffc100ec: 38 00 00 00 li r0,0 size_t node_size ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc100f0: 39 43 00 04 addi r10,r3,4 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; ffc100f4: 90 03 00 04 stw r0,4(r3) ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; ffc100f8: 7c 69 1b 78 mr r9,r3 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc100fc: 41 82 00 38 beq- ffc10134 <_Chain_Initialize+0x4c> <== NEVER TAKEN ffc10100: 39 05 ff ff addi r8,r5,-1 ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; ffc10104: 7c a9 03 a6 mtctr r5 Chain_Node *next = starting_address; ffc10108: 7c 89 23 78 mr r9,r4 ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; ffc1010c: 7c 6b 1b 78 mr r11,r3 ffc10110: 48 00 00 0c b ffc1011c <_Chain_Initialize+0x34> Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc10114: 7d 2b 4b 78 mr r11,r9 current->next = next; next->previous = current; current = next; next = (Chain_Node *) ffc10118: 7c 09 03 78 mr r9,r0 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; ffc1011c: 91 2b 00 00 stw r9,0(r11) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( ffc10120: 7c 09 32 14 add r0,r9,r6 head->previous = NULL; while ( count-- ) { current->next = next; next->previous = current; ffc10124: 91 69 00 04 stw r11,4(r9) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc10128: 42 00 ff ec bdnz+ ffc10114 <_Chain_Initialize+0x2c> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( ffc1012c: 7c c6 41 d6 mullw r6,r6,r8 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc10130: 7d 24 32 14 add r9,r4,r6 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; ffc10134: 91 49 00 00 stw r10,0(r9) tail->previous = current; ffc10138: 91 23 00 08 stw r9,8(r3) } ffc1013c: 4e 80 00 20 blr =============================================================================== ffc08e6c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { ffc08e6c: 94 21 ff f0 stwu r1,-16(r1) ffc08e70: 7c 08 02 a6 mflr r0 ffc08e74: 90 01 00 14 stw r0,20(r1) ffc08e78: 93 e1 00 0c stw r31,12(r1) ffc08e7c: 7c 7f 1b 78 mr r31,r3 rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; ffc08e80: 81 63 01 2c lwz r11,300(r3) option_set = (rtems_option) the_thread->Wait.option; ffc08e84: 80 c3 00 30 lwz r6,48(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc08e88: 7d 40 00 a6 mfmsr r10 ffc08e8c: 7c 10 42 a6 mfsprg r0,0 ffc08e90: 7d 40 00 78 andc r0,r10,r0 ffc08e94: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); pending_events = api->pending_events; ffc08e98: 81 2b 00 00 lwz r9,0(r11) event_condition = (rtems_event_set) the_thread->Wait.count; ffc08e9c: 80 03 00 24 lwz r0,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 ) ) { ffc08ea0: 7c 08 48 39 and. r8,r0,r9 ffc08ea4: 41 82 00 e4 beq- ffc08f88 <_Event_Surrender+0x11c> /* * 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() && ffc08ea8: 3c e0 00 00 lis r7,0 ffc08eac: 38 e7 2d b8 addi r7,r7,11704 ffc08eb0: 80 a7 00 08 lwz r5,8(r7) ffc08eb4: 2f 85 00 00 cmpwi cr7,r5,0 ffc08eb8: 41 9e 00 10 beq- cr7,ffc08ec8 <_Event_Surrender+0x5c> ffc08ebc: 80 e7 00 0c lwz r7,12(r7) ffc08ec0: 7f 83 38 00 cmpw cr7,r3,r7 ffc08ec4: 41 9e 00 78 beq- cr7,ffc08f3c <_Event_Surrender+0xd0> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); ffc08ec8: 80 ff 00 10 lwz r7,16(r31) } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { ffc08ecc: 70 e5 01 00 andi. r5,r7,256 ffc08ed0: 41 82 00 b8 beq- ffc08f88 <_Event_Surrender+0x11c> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { ffc08ed4: 7f 80 40 00 cmpw cr7,r0,r8 ffc08ed8: 41 9e 00 0c beq- cr7,ffc08ee4 <_Event_Surrender+0x78> ffc08edc: 70 c0 00 02 andi. r0,r6,2 ffc08ee0: 41 82 00 a8 beq- ffc08f88 <_Event_Surrender+0x11c> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc08ee4: 80 ff 00 28 lwz r7,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) ); ffc08ee8: 7d 29 40 78 andc r9,r9,r8 * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; ffc08eec: 38 00 00 00 li r0,0 /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); ffc08ef0: 91 2b 00 00 stw r9,0(r11) the_thread->Wait.count = 0; ffc08ef4: 90 1f 00 24 stw r0,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc08ef8: 91 07 00 00 stw r8,0(r7) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc08efc: 7c 00 00 a6 mfmsr r0 ffc08f00: 7d 40 01 24 mtmsr r10 ffc08f04: 7c 00 01 24 mtmsr r0 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc08f08: 80 1f 00 50 lwz r0,80(r31) ffc08f0c: 2f 80 00 02 cmpwi cr7,r0,2 ffc08f10: 41 9e 00 90 beq- cr7,ffc08fa0 <_Event_Surrender+0x134> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc08f14: 7d 40 01 24 mtmsr r10 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc08f18: 3c 80 10 03 lis r4,4099 ffc08f1c: 7f e3 fb 78 mr r3,r31 ffc08f20: 60 84 ff f8 ori r4,r4,65528 ffc08f24: 48 00 2f 91 bl ffc0beb4 <_Thread_Clear_state> } return; } } _ISR_Enable( level ); } ffc08f28: 80 01 00 14 lwz r0,20(r1) ffc08f2c: 83 e1 00 0c lwz r31,12(r1) ffc08f30: 38 21 00 10 addi r1,r1,16 ffc08f34: 7c 08 03 a6 mtlr r0 ffc08f38: 4e 80 00 20 blr * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || ffc08f3c: 3c e0 00 00 lis r7,0 ffc08f40: 80 a7 28 0c lwz r5,10252(r7) /* * 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 ) && ffc08f44: 2f 85 00 02 cmpwi cr7,r5,2 ffc08f48: 41 9e 00 10 beq- cr7,ffc08f58 <_Event_Surrender+0xec> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { ffc08f4c: 80 a7 28 0c lwz r5,10252(r7) * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || ffc08f50: 2f 85 00 01 cmpwi cr7,r5,1 ffc08f54: 40 9e ff 74 bne+ cr7,ffc08ec8 <_Event_Surrender+0x5c> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { ffc08f58: 7f 80 40 00 cmpw cr7,r0,r8 ffc08f5c: 41 9e 00 0c beq- cr7,ffc08f68 <_Event_Surrender+0xfc> ffc08f60: 70 c0 00 02 andi. r0,r6,2 ffc08f64: 41 82 00 24 beq- ffc08f88 <_Event_Surrender+0x11c> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc08f68: 80 df 00 28 lwz r6,40(r31) _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; ffc08f6c: 38 00 00 00 li r0,0 ffc08f70: 7d 29 40 78 andc r9,r9,r8 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); ffc08f74: 91 2b 00 00 stw r9,0(r11) the_thread->Wait.count = 0; ffc08f78: 90 1f 00 24 stw r0,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc08f7c: 38 00 00 03 li r0,3 ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc08f80: 91 06 00 00 stw r8,0(r6) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc08f84: 90 07 28 0c stw r0,10252(r7) ffc08f88: 7d 40 01 24 mtmsr r10 } return; } } _ISR_Enable( level ); } ffc08f8c: 80 01 00 14 lwz r0,20(r1) ffc08f90: 83 e1 00 0c lwz r31,12(r1) ffc08f94: 38 21 00 10 addi r1,r1,16 ffc08f98: 7c 08 03 a6 mtlr r0 ffc08f9c: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc08fa0: 38 00 00 03 li r0,3 ffc08fa4: 90 1f 00 50 stw r0,80(r31) ffc08fa8: 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 ); ffc08fac: 38 7f 00 48 addi r3,r31,72 ffc08fb0: 48 00 48 19 bl ffc0d7c8 <_Watchdog_Remove> ffc08fb4: 3c 80 10 03 lis r4,4099 ffc08fb8: 7f e3 fb 78 mr r3,r31 ffc08fbc: 60 84 ff f8 ori r4,r4,65528 ffc08fc0: 48 00 2e f5 bl ffc0beb4 <_Thread_Clear_state> ffc08fc4: 4b ff ff c8 b ffc08f8c <_Event_Surrender+0x120> =============================================================================== ffc08fc8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { ffc08fc8: 94 21 ff e8 stwu r1,-24(r1) ffc08fcc: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc08fd0: 38 81 00 08 addi r4,r1,8 void _Event_Timeout( Objects_Id id, void *ignored ) { ffc08fd4: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc08fd8: 48 00 33 99 bl ffc0c370 <_Thread_Get> switch ( location ) { ffc08fdc: 80 01 00 08 lwz r0,8(r1) ffc08fe0: 2f 80 00 00 cmpwi cr7,r0,0 ffc08fe4: 40 9e 00 54 bne- cr7,ffc09038 <_Event_Timeout+0x70> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc08fe8: 7d 20 00 a6 mfmsr r9 ffc08fec: 7d 70 42 a6 mfsprg r11,0 ffc08ff0: 7d 2b 58 78 andc r11,r9,r11 ffc08ff4: 7d 60 01 24 mtmsr r11 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc08ff8: 3d 60 00 00 lis r11,0 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { ffc08ffc: 81 6b 2d c4 lwz r11,11716(r11) _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; ffc09000: 90 03 00 24 stw r0,36(r3) if ( _Thread_Is_executing( the_thread ) ) { ffc09004: 7f 83 58 00 cmpw cr7,r3,r11 ffc09008: 41 9e 00 40 beq- cr7,ffc09048 <_Event_Timeout+0x80> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; ffc0900c: 38 00 00 06 li r0,6 ffc09010: 90 03 00 34 stw r0,52(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc09014: 7d 20 01 24 mtmsr r9 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc09018: 3c 80 10 03 lis r4,4099 ffc0901c: 60 84 ff f8 ori r4,r4,65528 ffc09020: 48 00 2e 95 bl ffc0beb4 <_Thread_Clear_state> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; ffc09024: 3d 20 00 00 lis r9,0 ffc09028: 81 69 27 c8 lwz r11,10184(r9) ffc0902c: 38 0b ff ff addi r0,r11,-1 ffc09030: 90 09 27 c8 stw r0,10184(r9) return _Thread_Dispatch_disable_level; ffc09034: 80 09 27 c8 lwz r0,10184(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc09038: 80 01 00 1c lwz r0,28(r1) ffc0903c: 38 21 00 18 addi r1,r1,24 ffc09040: 7c 08 03 a6 mtlr r0 ffc09044: 4e 80 00 20 blr } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) ffc09048: 3d 60 00 00 lis r11,0 ffc0904c: 80 0b 28 0c lwz r0,10252(r11) ffc09050: 2f 80 00 01 cmpwi cr7,r0,1 ffc09054: 40 9e ff b8 bne+ cr7,ffc0900c <_Event_Timeout+0x44> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc09058: 38 00 00 02 li r0,2 ffc0905c: 90 0b 28 0c stw r0,10252(r11) ffc09060: 4b ff ff ac b ffc0900c <_Event_Timeout+0x44> =============================================================================== ffc10314 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc10314: 94 21 ff e0 stwu r1,-32(r1) ffc10318: 7c 08 02 a6 mflr r0 ffc1031c: 7d 80 00 26 mfcr r12 ffc10320: 7c 89 23 78 mr r9,r4 ffc10324: 90 01 00 24 stw r0,36(r1) Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE ffc10328: 38 04 00 04 addi r0,r4,4 Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { ffc1032c: 7f 84 00 40 cmplw cr7,r4,r0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc10330: 93 a1 00 14 stw r29,20(r1) ffc10334: 7c 7d 1b 78 mr r29,r3 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; ffc10338: 80 e3 00 10 lwz r7,16(r3) uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { /* Integer overflow occured */ return NULL; ffc1033c: 38 60 00 00 li r3,0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc10340: 93 61 00 0c stw r27,12(r1) ffc10344: 93 81 00 10 stw r28,16(r1) ffc10348: 93 c1 00 18 stw r30,24(r1) ffc1034c: 93 e1 00 1c stw r31,28(r1) ffc10350: 91 81 00 08 stw r12,8(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 ) { ffc10354: 41 9d 00 7c bgt- cr7,ffc103d0 <_Heap_Allocate_aligned_with_boundary+0xbc> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { ffc10358: 2e 06 00 00 cmpwi cr4,r6,0 ffc1035c: 40 92 01 b8 bne- cr4,ffc10514 <_Heap_Allocate_aligned_with_boundary+0x200> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc10360: 80 9d 00 08 lwz r4,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 ) { ffc10364: 7f 9d 20 00 cmpw cr7,r29,r4 ffc10368: 41 9e 01 c4 beq- cr7,ffc1052c <_Heap_Allocate_aligned_with_boundary+0x218> * 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 ) { ffc1036c: 2c 05 00 00 cmpwi 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 ) { ffc10370: 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 ffc10374: 3b 67 00 07 addi r27,r7,7 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; ffc10378: 23 89 00 04 subfic r28,r9,4 ffc1037c: 48 00 00 24 b ffc103a0 <_Heap_Allocate_aligned_with_boundary+0x8c> * 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 ) { ffc10380: 40 82 00 7c bne- ffc103fc <_Heap_Allocate_aligned_with_boundary+0xe8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc10384: 3b e4 00 08 addi r31,r4,8 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { ffc10388: 2f 9f 00 00 cmpwi cr7,r31,0 ); } } /* Statistics */ ++search_count; ffc1038c: 3b de 00 01 addi r30,r30,1 if ( alloc_begin != 0 ) { ffc10390: 40 9e 01 3c bne- cr7,ffc104cc <_Heap_Allocate_aligned_with_boundary+0x1b8> break; } block = block->next; ffc10394: 80 84 00 08 lwz r4,8(r4) do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc10398: 7f 9d 20 00 cmpw cr7,r29,r4 ffc1039c: 41 9e 00 20 beq- cr7,ffc103bc <_Heap_Allocate_aligned_with_boundary+0xa8> /* * 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 ) { ffc103a0: 81 64 00 04 lwz r11,4(r4) ffc103a4: 7f 80 58 40 cmplw cr7,r0,r11 ffc103a8: 41 bc ff d8 blt- cr7,ffc10380 <_Heap_Allocate_aligned_with_boundary+0x6c> if ( alloc_begin != 0 ) { break; } block = block->next; ffc103ac: 80 84 00 08 lwz r4,8(r4) ); } } /* Statistics */ ++search_count; ffc103b0: 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 ) { ffc103b4: 7f 9d 20 00 cmpw cr7,r29,r4 ffc103b8: 40 9e ff e8 bne+ cr7,ffc103a0 <_Heap_Allocate_aligned_with_boundary+0x8c> ffc103bc: 3b e0 00 00 li r31,0 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { ffc103c0: 80 1d 00 44 lwz r0,68(r29) ffc103c4: 7f 80 f0 40 cmplw cr7,r0,r30 ffc103c8: 41 9c 01 38 blt- cr7,ffc10500 <_Heap_Allocate_aligned_with_boundary+0x1ec> stats->max_search = search_count; } return (void *) alloc_begin; ffc103cc: 7f e3 fb 78 mr r3,r31 } ffc103d0: 80 01 00 24 lwz r0,36(r1) ffc103d4: 81 81 00 08 lwz r12,8(r1) ffc103d8: 7c 08 03 a6 mtlr r0 ffc103dc: 83 61 00 0c lwz r27,12(r1) ffc103e0: 83 81 00 10 lwz r28,16(r1) ffc103e4: 7d 80 81 20 mtcrf 8,r12 ffc103e8: 83 a1 00 14 lwz r29,20(r1) ffc103ec: 83 c1 00 18 lwz r30,24(r1) ffc103f0: 83 e1 00 1c lwz r31,28(r1) ffc103f4: 38 21 00 20 addi r1,r1,32 ffc103f8: 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; ffc103fc: 55 6b 00 3c rlwinm r11,r11,0,0,30 ffc10400: 80 7d 00 14 lwz r3,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; ffc10404: 7d 64 5a 14 add r11,r4,r11 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; ffc10408: 7f fc 5a 14 add r31,r28,r11 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc1040c: 7f ff 2b 96 divwu r31,r31,r5 ffc10410: 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; ffc10414: 7d 43 d8 50 subf r10,r3,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 ffc10418: 7d 6a 5a 14 add r11,r10,r11 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { ffc1041c: 7f 8b f8 40 cmplw cr7,r11,r31 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc10420: 39 84 00 08 addi r12,r4,8 ffc10424: 40 9c 00 0c bge- cr7,ffc10430 <_Heap_Allocate_aligned_with_boundary+0x11c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10428: 7d 6b 2b 96 divwu r11,r11,r5 ffc1042c: 7f eb 29 d6 mullw r31,r11,r5 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { ffc10430: 41 92 00 64 beq- cr4,ffc10494 <_Heap_Allocate_aligned_with_boundary+0x180> /* 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; ffc10434: 7d 5f 4a 14 add r10,r31,r9 ffc10438: 7d 6a 33 96 divwu r11,r10,r6 ffc1043c: 7d 6b 31 d6 mullw r11,r11,r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc10440: 7f 9f 58 40 cmplw cr7,r31,r11 ffc10444: 40 9c 00 50 bge- cr7,ffc10494 <_Heap_Allocate_aligned_with_boundary+0x180> ffc10448: 7f 8a 58 40 cmplw cr7,r10,r11 ffc1044c: 40 9d 00 48 ble- cr7,ffc10494 <_Heap_Allocate_aligned_with_boundary+0x180> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; ffc10450: 7d 0c 4a 14 add r8,r12,r9 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { ffc10454: 7f 88 58 40 cmplw cr7,r8,r11 return 0; ffc10458: 3b e0 00 00 li r31,0 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 ) { if ( boundary_line < boundary_floor ) { ffc1045c: 40 bd 00 10 ble+ cr7,ffc1046c <_Heap_Allocate_aligned_with_boundary+0x158> ffc10460: 4b ff ff 28 b ffc10388 <_Heap_Allocate_aligned_with_boundary+0x74> /* 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 ) { ffc10464: 40 99 00 30 ble- cr6,ffc10494 <_Heap_Allocate_aligned_with_boundary+0x180> if ( boundary_line < boundary_floor ) { ffc10468: 41 85 00 a4 bgt- cr1,ffc1050c <_Heap_Allocate_aligned_with_boundary+0x1f8><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; ffc1046c: 7f e9 58 50 subf r31,r9,r11 ffc10470: 7f ff 2b 96 divwu r31,r31,r5 ffc10474: 7f ff 29 d6 mullw r31,r31,r5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; ffc10478: 7d 5f 4a 14 add r10,r31,r9 ffc1047c: 7d 6a 33 96 divwu r11,r10,r6 ffc10480: 7d 6b 31 d6 mullw r11,r11,r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc10484: 7f 9f 58 40 cmplw cr7,r31,r11 ffc10488: 7f 0a 58 40 cmplw cr6,r10,r11 if ( boundary_line < boundary_floor ) { ffc1048c: 7c 88 58 40 cmplw cr1,r8,r11 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc10490: 41 9c ff d4 blt+ cr7,ffc10464 <_Heap_Allocate_aligned_with_boundary+0x150> 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 ) { ffc10494: 7f 8c f8 40 cmplw cr7,r12,r31 ffc10498: 41 9d 00 74 bgt- cr7,ffc1050c <_Heap_Allocate_aligned_with_boundary+0x1f8> ffc1049c: 7d 7f 3b 96 divwu r11,r31,r7 ffc104a0: 7d 6b 39 d6 mullw r11,r11,r7 ffc104a4: 21 44 ff f8 subfic r10,r4,-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; ffc104a8: 7d 6a 5a 14 add r11,r10,r11 if ( free_size >= min_block_size || free_size == 0 ) { ffc104ac: 7f 83 58 40 cmplw cr7,r3,r11 ffc104b0: 40 bd fe d8 ble- cr7,ffc10388 <_Heap_Allocate_aligned_with_boundary+0x74> return alloc_begin; } } return 0; ffc104b4: 31 6b ff ff addic r11,r11,-1 ffc104b8: 7d 6b 59 10 subfe r11,r11,r11 ffc104bc: 7f ff 58 38 and r31,r31,r11 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { ffc104c0: 2f 9f 00 00 cmpwi cr7,r31,0 ); } } /* Statistics */ ++search_count; ffc104c4: 3b de 00 01 addi r30,r30,1 if ( alloc_begin != 0 ) { ffc104c8: 41 9e fe cc beq+ cr7,ffc10394 <_Heap_Allocate_aligned_with_boundary+0x80> search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc104cc: 81 7d 00 48 lwz r11,72(r29) stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc104d0: 7f a3 eb 78 mr r3,r29 } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; ffc104d4: 80 1d 00 4c lwz r0,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc104d8: 7f e5 fb 78 mr r5,r31 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc104dc: 39 6b 00 01 addi r11,r11,1 stats->searches += search_count; ffc104e0: 7c 00 f2 14 add r0,r0,r30 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc104e4: 91 7d 00 48 stw r11,72(r29) stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc104e8: 7d 26 4b 78 mr r6,r9 } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; ffc104ec: 90 1d 00 4c stw r0,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc104f0: 4b ff a6 49 bl ffc0ab38 <_Heap_Block_allocate> boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { ffc104f4: 80 1d 00 44 lwz r0,68(r29) ffc104f8: 7f 80 f0 40 cmplw cr7,r0,r30 ffc104fc: 40 bc fe d0 bge- cr7,ffc103cc <_Heap_Allocate_aligned_with_boundary+0xb8> stats->max_search = search_count; ffc10500: 93 dd 00 44 stw r30,68(r29) } return (void *) alloc_begin; ffc10504: 7f e3 fb 78 mr r3,r31 ffc10508: 4b ff fe c8 b ffc103d0 <_Heap_Allocate_aligned_with_boundary+0xbc> if ( free_size >= min_block_size || free_size == 0 ) { return alloc_begin; } } return 0; ffc1050c: 3b e0 00 00 li r31,0 ffc10510: 4b ff fe 78 b ffc10388 <_Heap_Allocate_aligned_with_boundary+0x74> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { ffc10514: 7f 84 30 40 cmplw cr7,r4,r6 ffc10518: 41 bd fe b8 bgt- cr7,ffc103d0 <_Heap_Allocate_aligned_with_boundary+0xbc> return NULL; } if ( alignment == 0 ) { ffc1051c: 2f 85 00 00 cmpwi cr7,r5,0 ffc10520: 40 be fe 40 bne- cr7,ffc10360 <_Heap_Allocate_aligned_with_boundary+0x4c> alignment = page_size; ffc10524: 7c e5 3b 78 mr r5,r7 ffc10528: 4b ff fe 38 b ffc10360 <_Heap_Allocate_aligned_with_boundary+0x4c> do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc1052c: 3b c0 00 00 li r30,0 ffc10530: 3b e0 00 00 li r31,0 ffc10534: 4b ff fe 8c b ffc103c0 <_Heap_Allocate_aligned_with_boundary+0xac> =============================================================================== ffc10114 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc10114: 94 21 ff c0 stwu r1,-64(r1) ffc10118: 7d 80 00 26 mfcr r12 ffc1011c: 7c 08 02 a6 mflr r0 ffc10120: 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; ffc10124: 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 ) { ffc10128: 7f 84 e8 40 cmplw cr7,r4,r29 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc1012c: 90 01 00 44 stw r0,68(r1) ffc10130: 93 41 00 28 stw r26,40(r1) 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; ffc10134: 3b 40 00 00 li r26,0 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc10138: 93 c1 00 38 stw r30,56(r1) ffc1013c: 7c 7e 1b 78 mr r30,r3 ffc10140: 93 01 00 20 stw r24,32(r1) ffc10144: 93 21 00 24 stw r25,36(r1) ffc10148: 7c d9 33 78 mr r25,r6 ffc1014c: 93 61 00 2c stw r27,44(r1) ffc10150: 93 81 00 30 stw r28,48(r1) ffc10154: 93 e1 00 3c stw r31,60(r1) ffc10158: 7c 9f 23 78 mr r31,r4 Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; ffc1015c: 83 63 00 20 lwz r27,32(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 ) { return false; ffc10160: 38 60 00 00 li r3,0 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc10164: 92 e1 00 1c stw r23,28(r1) ffc10168: 91 81 00 18 stw r12,24(r1) 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; ffc1016c: 93 41 00 0c stw r26,12(r1) Heap_Block *extend_last_block = NULL; ffc10170: 93 41 00 08 stw r26,8(r1) uintptr_t const page_size = heap->page_size; ffc10174: 83 9e 00 10 lwz r28,16(r30) uintptr_t const min_block_size = heap->min_block_size; ffc10178: 80 de 00 14 lwz r6,20(r30) 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; ffc1017c: 83 1e 00 30 lwz r24,48(r30) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { ffc10180: 40 9d 00 40 ble- cr7,ffc101c0 <_Heap_Extend+0xac> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } ffc10184: 80 01 00 44 lwz r0,68(r1) ffc10188: 81 81 00 18 lwz r12,24(r1) ffc1018c: 7c 08 03 a6 mtlr r0 ffc10190: 82 e1 00 1c lwz r23,28(r1) ffc10194: 83 01 00 20 lwz r24,32(r1) ffc10198: 7d 81 81 20 mtcrf 24,r12 ffc1019c: 83 21 00 24 lwz r25,36(r1) ffc101a0: 83 41 00 28 lwz r26,40(r1) ffc101a4: 83 61 00 2c lwz r27,44(r1) ffc101a8: 83 81 00 30 lwz r28,48(r1) ffc101ac: 83 a1 00 34 lwz r29,52(r1) ffc101b0: 83 c1 00 38 lwz r30,56(r1) ffc101b4: 83 e1 00 3c lwz r31,60(r1) ffc101b8: 38 21 00 40 addi r1,r1,64 ffc101bc: 4e 80 00 20 blr if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( ffc101c0: 7c 83 23 78 mr r3,r4 ffc101c4: 38 e1 00 0c addi r7,r1,12 ffc101c8: 7c a4 2b 78 mr r4,r5 ffc101cc: 39 01 00 08 addi r8,r1,8 ffc101d0: 7f 85 e3 78 mr r5,r28 ffc101d4: 4b ff a3 a1 bl ffc0a574 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc101d8: 2f 83 00 00 cmpwi cr7,r3,0 /* For simplicity we reject extend areas that are too small */ return false; ffc101dc: 7f 43 d3 78 mr r3,r26 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc101e0: 41 be ff a4 beq- cr7,ffc10184 <_Heap_Extend+0x70> ffc101e4: 7f 69 db 78 mr r9,r27 ffc101e8: 3a e0 00 00 li r23,0 ffc101ec: 38 00 00 00 li r0,0 ffc101f0: 39 00 00 00 li r8,0 ffc101f4: 48 00 00 44 b ffc10238 <_Heap_Extend+0x124> return false; } if ( extend_area_end == sub_area_begin ) { merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { ffc101f8: 7f 9d 58 40 cmplw cr7,r29,r11 ffc101fc: 40 9c 00 08 bge- cr7,ffc10204 <_Heap_Extend+0xf0> ffc10200: 7d 20 4b 78 mr r0,r9 ffc10204: 7d 4b e3 96 divwu r10,r11,r28 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc10208: 7f 8b f8 00 cmpw cr7,r11,r31 ffc1020c: 7d 4a e1 d6 mullw r10,r10,r28 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc10210: 39 4a ff f8 addi r10,r10,-8 ffc10214: 41 9e 00 64 beq- cr7,ffc10278 <_Heap_Extend+0x164> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { ffc10218: 7f 9f 58 40 cmplw cr7,r31,r11 ffc1021c: 40 9d 00 08 ble- cr7,ffc10224 <_Heap_Extend+0x110> 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 ) ffc10220: 7d 57 53 78 mr r23,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; ffc10224: 81 2a 00 04 lwz r9,4(r10) ffc10228: 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); ffc1022c: 7d 29 52 14 add r9,r9,r10 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); ffc10230: 7f 9b 48 00 cmpw cr7,r27,r9 ffc10234: 41 9e 00 60 beq- cr7,ffc10294 <_Heap_Extend+0x180> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; ffc10238: 7f 89 d8 00 cmpw cr7,r9,r27 ffc1023c: 7d 2a 4b 78 mr r10,r9 ffc10240: 41 9e 01 b8 beq- cr7,ffc103f8 <_Heap_Extend+0x2e4> uintptr_t const sub_area_end = start_block->prev_size; ffc10244: 81 69 00 00 lwz r11,0(r9) Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( ffc10248: 7f 9f 58 40 cmplw cr7,r31,r11 ffc1024c: 40 9c 00 0c bge- cr7,ffc10258 <_Heap_Extend+0x144> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ffc10250: 7f 8a e8 40 cmplw cr7,r10,r29 ffc10254: 41 9c 02 28 blt- cr7,ffc1047c <_Heap_Extend+0x368> ) { return false; } if ( extend_area_end == sub_area_begin ) { ffc10258: 7f 8a e8 00 cmpw cr7,r10,r29 ffc1025c: 40 9e ff 9c bne+ cr7,ffc101f8 <_Heap_Extend+0xe4> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10260: 7d 4b e3 96 divwu r10,r11,r28 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 ) { ffc10264: 7f 8b f8 00 cmpw cr7,r11,r31 ffc10268: 7d 4a e1 d6 mullw r10,r10,r28 sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { ffc1026c: 7d 28 4b 78 mr r8,r9 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc10270: 39 4a ff f8 addi r10,r10,-8 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 ) { ffc10274: 40 9e ff a4 bne+ cr7,ffc10218 <_Heap_Extend+0x104> <== ALWAYS TAKEN start_block->prev_size = extend_area_end; ffc10278: 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 ) ffc1027c: 7d 5a 53 78 mr r26,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; ffc10280: 81 2a 00 04 lwz r9,4(r10) ffc10284: 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); ffc10288: 7d 29 52 14 add r9,r9,r10 } 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 ); ffc1028c: 7f 9b 48 00 cmpw cr7,r27,r9 ffc10290: 40 9e ff a8 bne+ cr7,ffc10238 <_Heap_Extend+0x124> <== NEVER TAKEN if ( extend_area_begin < heap->area_begin ) { ffc10294: 81 3e 00 18 lwz r9,24(r30) ffc10298: 7f 9f 48 40 cmplw cr7,r31,r9 ffc1029c: 41 9c 01 64 blt- cr7,ffc10400 <_Heap_Extend+0x2ec> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { ffc102a0: 81 3e 00 1c lwz r9,28(r30) ffc102a4: 7f 9d 48 40 cmplw cr7,r29,r9 ffc102a8: 40 9d 00 08 ble- cr7,ffc102b0 <_Heap_Extend+0x19c> heap->area_end = extend_area_end; ffc102ac: 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 ) { ffc102b0: 81 5e 00 20 lwz r10,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; ffc102b4: 81 21 00 0c lwz r9,12(r1) ffc102b8: 81 61 00 08 lwz r11,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 ) { ffc102bc: 7f 8a 48 40 cmplw cr7,r10,r9 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; ffc102c0: 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 = ffc102c4: 7d 49 58 50 subf r10,r9,r11 (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; ffc102c8: 61 47 00 01 ori r7,r10,1 _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; ffc102cc: 91 4b 00 00 stw r10,0(r11) extend_last_block->size_and_flag = 0; ffc102d0: 39 40 00 00 li r10,0 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 = ffc102d4: 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; ffc102d8: 91 4b 00 04 stw r10,4(r11) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc102dc: 40 9d 01 58 ble- cr7,ffc10434 <_Heap_Extend+0x320> <== ALWAYS TAKEN heap->first_block = extend_first_block; ffc102e0: 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 ) { ffc102e4: 2e 08 00 00 cmpwi cr4,r8,0 ffc102e8: 41 92 01 b0 beq- cr4,ffc10498 <_Heap_Extend+0x384> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; ffc102ec: 80 1e 00 10 lwz r0,16(r30) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); ffc102f0: 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; ffc102f4: 7d 3f 03 96 divwu r9,r31,r0 ffc102f8: 7d 29 01 d6 mullw r9,r9,r0 if ( remainder != 0 ) { ffc102fc: 7d 29 f8 51 subf. r9,r9,r31 ffc10300: 41 82 00 0c beq- ffc1030c <_Heap_Extend+0x1f8> <== NEVER TAKEN return value - remainder + alignment; ffc10304: 7f ff 02 14 add r31,r31,r0 ffc10308: 7f e9 f8 50 subf r31,r9,r31 uintptr_t const new_first_block_begin = ffc1030c: 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; ffc10310: 81 28 00 00 lwz r9,0(r8) 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 = ffc10314: 7c 04 40 50 subf r0,r4,r8 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; ffc10318: 60 00 00 01 ori r0,r0,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; ffc1031c: 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 ); ffc10320: 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; ffc10324: 90 04 00 04 stw r0,4(r4) _Heap_Free_block( heap, new_first_block ); ffc10328: 4b ff fd b1 bl ffc100d8 <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { ffc1032c: 2d 9a 00 00 cmpwi cr3,r26,0 ffc10330: 41 8e 01 18 beq- cr3,ffc10448 <_Heap_Extend+0x334> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10334: 81 3e 00 10 lwz r9,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, ffc10338: 38 1d ff f8 addi r0,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( ffc1033c: 7c 1a 00 50 subf r0,r26,r0 ); 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) ffc10340: 81 7a 00 04 lwz r11,4(r26) ffc10344: 7c 00 4b 96 divwu r0,r0,r9 ffc10348: 7c 00 49 d6 mullw r0,r0,r9 | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); ffc1034c: 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) ffc10350: 7d 60 58 50 subf r11,r0,r11 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = ffc10354: 7d 20 d2 14 add r9,r0,r26 (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; ffc10358: 61 6b 00 01 ori r11,r11,1 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = ffc1035c: 91 69 00 04 stw r11,4(r9) (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 ); ffc10360: 7f 44 d3 78 mr r4,r26 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; ffc10364: 81 3a 00 04 lwz r9,4(r26) ffc10368: 55 29 07 fe clrlwi r9,r9,31 block->size_and_flag = size | flag; ffc1036c: 7c 00 4b 78 or r0,r0,r9 ffc10370: 90 1a 00 04 stw r0,4(r26) ffc10374: 4b ff fd 65 bl ffc100d8 <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc10378: 41 92 01 0c beq- cr4,ffc10484 <_Heap_Extend+0x370> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } ffc1037c: 81 3e 00 24 lwz r9,36(r30) extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) ffc10380: 2f 99 00 00 cmpwi cr7,r25,0 * 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( ffc10384: 81 7e 00 20 lwz r11,32(r30) *extended_size_ptr = extended_size; return true; ffc10388: 38 60 00 01 li r3,1 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; ffc1038c: 80 09 00 04 lwz r0,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( ffc10390: 7d 69 58 50 subf r11,r9,r11 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; ffc10394: 54 00 07 fe clrlwi r0,r0,31 block->size_and_flag = size | flag; ffc10398: 7c 00 5b 78 or r0,r0,r11 ffc1039c: 90 09 00 04 stw r0,4(r9) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; ffc103a0: 81 3e 00 30 lwz r9,48(r30) /* Statistics */ stats->size += extended_size; ffc103a4: 80 1e 00 2c lwz r0,44(r30) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; ffc103a8: 7f 18 48 50 subf r24,r24,r9 /* Statistics */ stats->size += extended_size; ffc103ac: 7c 00 c2 14 add r0,r0,r24 ffc103b0: 90 1e 00 2c stw r0,44(r30) if ( extended_size_ptr != NULL ) ffc103b4: 41 be fd d0 beq- cr7,ffc10184 <_Heap_Extend+0x70> <== NEVER TAKEN *extended_size_ptr = extended_size; return true; } ffc103b8: 80 01 00 44 lwz r0,68(r1) ffc103bc: 81 81 00 18 lwz r12,24(r1) ffc103c0: 7c 08 03 a6 mtlr r0 /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; ffc103c4: 93 19 00 00 stw r24,0(r25) return true; } ffc103c8: 7d 81 81 20 mtcrf 24,r12 ffc103cc: 82 e1 00 1c lwz r23,28(r1) ffc103d0: 83 01 00 20 lwz r24,32(r1) ffc103d4: 83 21 00 24 lwz r25,36(r1) ffc103d8: 83 41 00 28 lwz r26,40(r1) ffc103dc: 83 61 00 2c lwz r27,44(r1) ffc103e0: 83 81 00 30 lwz r28,48(r1) ffc103e4: 83 a1 00 34 lwz r29,52(r1) ffc103e8: 83 c1 00 38 lwz r30,56(r1) ffc103ec: 83 e1 00 3c lwz r31,60(r1) ffc103f0: 38 21 00 40 addi r1,r1,64 ffc103f4: 4e 80 00 20 blr return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; ffc103f8: 81 5e 00 18 lwz r10,24(r30) ffc103fc: 4b ff fe 48 b ffc10244 <_Heap_Extend+0x130> 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 ) { ffc10400: 81 5e 00 20 lwz r10,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; ffc10404: 81 21 00 0c lwz r9,12(r1) ffc10408: 81 61 00 08 lwz r11,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 ) { ffc1040c: 7f 8a 48 40 cmplw cr7,r10,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; ffc10410: 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 = ffc10414: 7d 49 58 50 subf r10,r9,r11 (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; ffc10418: 61 47 00 01 ori r7,r10,1 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; ffc1041c: 93 a9 00 00 stw r29,0(r9) 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; ffc10420: 91 4b 00 00 stw r10,0(r11) extend_last_block->size_and_flag = 0; ffc10424: 39 40 00 00 li r10,0 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 = ffc10428: 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; ffc1042c: 91 4b 00 04 stw r10,4(r11) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc10430: 41 bd fe b0 bgt- cr7,ffc102e0 <_Heap_Extend+0x1cc> <== ALWAYS TAKEN heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { ffc10434: 81 3e 00 24 lwz r9,36(r30) ffc10438: 7f 89 58 40 cmplw cr7,r9,r11 ffc1043c: 40 bc fe a8 bge- cr7,ffc102e4 <_Heap_Extend+0x1d0> heap->last_block = extend_last_block; ffc10440: 91 7e 00 24 stw r11,36(r30) ffc10444: 4b ff fe a0 b ffc102e4 <_Heap_Extend+0x1d0> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { ffc10448: 2f 97 00 00 cmpwi cr7,r23,0 ffc1044c: 41 be ff 2c beq- cr7,ffc10378 <_Heap_Extend+0x264> 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; ffc10450: 81 37 00 04 lwz r9,4(r23) ) { 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 ); ffc10454: 80 01 00 0c lwz r0,12(r1) ffc10458: 55 29 07 fe clrlwi r9,r9,31 ffc1045c: 7c 17 00 50 subf r0,r23,r0 block->size_and_flag = size | flag; ffc10460: 7d 20 03 78 or r0,r9,r0 } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( ffc10464: 81 21 00 08 lwz r9,8(r1) ffc10468: 90 17 00 04 stw r0,4(r23) 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; ffc1046c: 80 09 00 04 lwz r0,4(r9) ffc10470: 60 00 00 01 ori r0,r0,1 ffc10474: 90 09 00 04 stw r0,4(r9) ffc10478: 4b ff ff 00 b ffc10378 <_Heap_Extend+0x264> _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; ffc1047c: 38 60 00 00 li r3,0 ffc10480: 4b ff fd 04 b ffc10184 <_Heap_Extend+0x70> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc10484: 40 8e fe f8 bne+ cr3,ffc1037c <_Heap_Extend+0x268> _Heap_Free_block( heap, extend_first_block ); ffc10488: 80 81 00 0c lwz r4,12(r1) ffc1048c: 7f c3 f3 78 mr r3,r30 ffc10490: 4b ff fc 49 bl ffc100d8 <_Heap_Free_block> ffc10494: 4b ff fe e8 b ffc1037c <_Heap_Extend+0x268> heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { ffc10498: 2f 80 00 00 cmpwi cr7,r0,0 ffc1049c: 41 be fe 90 beq- cr7,ffc1032c <_Heap_Extend+0x218> { 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; ffc104a0: 7c 0b 00 50 subf r0,r11,r0 ffc104a4: 60 00 00 01 ori r0,r0,1 ) { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = ffc104a8: 90 0b 00 04 stw r0,4(r11) ffc104ac: 4b ff fe 80 b ffc1032c <_Heap_Extend+0x218> =============================================================================== ffc10538 <_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 ) { ffc10538: 2c 04 00 00 cmpwi r4,0 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc1053c: 94 21 ff f0 stwu r1,-16(r1) ffc10540: 7c 69 1b 78 mr r9,r3 ffc10544: 93 e1 00 0c stw r31,12(r1) * 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; ffc10548: 38 60 00 01 li r3,1 /* * 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 ) { ffc1054c: 41 82 01 44 beq- ffc10690 <_Heap_Free+0x158> ffc10550: 80 09 00 10 lwz r0,16(r9) 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; ffc10554: 38 60 00 00 li r3,0 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 ffc10558: 81 69 00 20 lwz r11,32(r9) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc1055c: 7c 84 03 96 divwu r4,r4,r0 ffc10560: 7c 84 01 d6 mullw r4,r4,r0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc10564: 38 84 ff f8 addi r4,r4,-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; ffc10568: 7f 84 58 40 cmplw cr7,r4,r11 ffc1056c: 41 9c 01 24 blt- cr7,ffc10690 <_Heap_Free+0x158> ffc10570: 80 09 00 24 lwz r0,36(r9) ffc10574: 7f 84 00 40 cmplw cr7,r4,r0 ffc10578: 41 9d 01 18 bgt- cr7,ffc10690 <_Heap_Free+0x158> <== NEVER TAKEN --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc1057c: 81 04 00 04 lwz r8,4(r4) - 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; ffc10580: 55 07 00 3c rlwinm r7,r8,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); ffc10584: 7d 47 22 14 add r10,r7,r4 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; ffc10588: 7f 8b 50 40 cmplw cr7,r11,r10 ffc1058c: 41 9d 01 04 bgt- cr7,ffc10690 <_Heap_Free+0x158> <== NEVER TAKEN ffc10590: 7f 80 50 40 cmplw cr7,r0,r10 ffc10594: 41 9c 00 fc blt- cr7,ffc10690 <_Heap_Free+0x158> <== NEVER TAKEN ffc10598: 80 ca 00 04 lwz r6,4(r10) return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { ffc1059c: 70 c5 00 01 andi. r5,r6,1 ffc105a0: 41 82 00 f0 beq- ffc10690 <_Heap_Free+0x158> 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 )); ffc105a4: 7f 80 50 00 cmpw cr7,r0,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; ffc105a8: 54 c5 00 3c rlwinm r5,r6,0,0,30 ffc105ac: 38 c0 00 00 li r6,0 ffc105b0: 41 9e 00 18 beq- cr7,ffc105c8 <_Heap_Free+0x90> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc105b4: 7c ca 2a 14 add r6,r10,r5 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; ffc105b8: 80 c6 00 04 lwz r6,4(r6) return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) ffc105bc: 70 c3 00 01 andi. r3,r6,1 ffc105c0: 7c c0 00 26 mfcr r6 ffc105c4: 54 c6 1f fe rlwinm r6,r6,3,31,31 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 ) ) { ffc105c8: 71 08 00 01 andi. r8,r8,1 ffc105cc: 40 82 00 6c bne- ffc10638 <_Heap_Free+0x100> uintptr_t const prev_size = block->prev_size; ffc105d0: 83 e4 00 00 lwz r31,0(r4) Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { _HAssert( false ); return( false ); ffc105d4: 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); ffc105d8: 7d 9f 20 50 subf r12,r31,r4 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; ffc105dc: 7f 8b 60 40 cmplw cr7,r11,r12 ffc105e0: 41 9d 00 b0 bgt- cr7,ffc10690 <_Heap_Free+0x158> <== NEVER TAKEN ffc105e4: 7f 80 60 40 cmplw cr7,r0,r12 ffc105e8: 7d 03 43 78 mr r3,r8 ffc105ec: 41 9c 00 a4 blt- cr7,ffc10690 <_Heap_Free+0x158> <== 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; ffc105f0: 80 0c 00 04 lwz r0,4(r12) } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { ffc105f4: 70 0b 00 01 andi. r11,r0,1 ffc105f8: 41 82 00 98 beq- ffc10690 <_Heap_Free+0x158> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ ffc105fc: 2f 86 00 00 cmpwi cr7,r6,0 ffc10600: 41 9e 00 e8 beq- cr7,ffc106e8 <_Heap_Free+0x1b0> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc10604: 81 09 00 38 lwz r8,56(r9) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc10608: 7f e7 fa 14 add r31,r7,r31 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc1060c: 81 6a 00 08 lwz r11,8(r10) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc10610: 7c bf 2a 14 add r5,r31,r5 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10614: 81 4a 00 0c lwz r10,12(r10) } 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; ffc10618: 39 08 ff ff addi r8,r8,-1 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc1061c: 60 a0 00 01 ori r0,r5,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; ffc10620: 91 6a 00 08 stw r11,8(r10) next->prev = prev; ffc10624: 91 4b 00 0c stw r10,12(r11) } 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; ffc10628: 91 09 00 38 stw r8,56(r9) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc1062c: 90 0c 00 04 stw r0,4(r12) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; ffc10630: 7c a5 61 2e stwx r5,r5,r12 ffc10634: 48 00 00 34 b ffc10668 <_Heap_Free+0x130> uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ ffc10638: 2f 86 00 00 cmpwi cr7,r6,0 ffc1063c: 41 9e 00 60 beq- cr7,ffc1069c <_Heap_Free+0x164> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10640: 81 6a 00 08 lwz r11,8(r10) 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; ffc10644: 7c a5 3a 14 add r5,r5,r7 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10648: 81 4a 00 0c lwz r10,12(r10) 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; ffc1064c: 60 a0 00 01 ori r0,r5,1 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; ffc10650: 91 64 00 08 stw r11,8(r4) new_block->prev = prev; ffc10654: 91 44 00 0c stw r10,12(r4) next->prev = new_block; prev->next = new_block; ffc10658: 90 8a 00 08 stw r4,8(r10) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; ffc1065c: 90 8b 00 0c stw r4,12(r11) ffc10660: 90 04 00 04 stw r0,4(r4) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; ffc10664: 7c a5 21 2e stwx r5,r5,r4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc10668: 81 69 00 40 lwz r11,64(r9) ++stats->frees; stats->free_size += block_size; return( true ); ffc1066c: 38 60 00 01 li r3,1 } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc10670: 81 09 00 50 lwz r8,80(r9) stats->free_size += block_size; ffc10674: 81 49 00 30 lwz r10,48(r9) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc10678: 39 6b ff ff addi r11,r11,-1 ++stats->frees; ffc1067c: 38 08 00 01 addi r0,r8,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc10680: 91 69 00 40 stw r11,64(r9) ++stats->frees; stats->free_size += block_size; ffc10684: 7c ea 3a 14 add r7,r10,r7 } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc10688: 90 09 00 50 stw r0,80(r9) stats->free_size += block_size; ffc1068c: 90 e9 00 30 stw r7,48(r9) return( true ); } ffc10690: 83 e1 00 0c lwz r31,12(r1) ffc10694: 38 21 00 10 addi r1,r1,16 ffc10698: 4e 80 00 20 blr 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; ffc1069c: 81 09 00 38 lwz r8,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc106a0: 81 69 00 3c lwz r11,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; ffc106a4: 38 08 00 01 addi r0,r8,1 ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; ffc106a8: 91 24 00 0c stw r9,12(r4) 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; ffc106ac: 60 e8 00 01 ori r8,r7,1 ffc106b0: 91 04 00 04 stw r8,4(r4) 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 ) { ffc106b4: 7f 80 58 40 cmplw cr7,r0,r11 } 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; ffc106b8: 81 0a 00 04 lwz r8,4(r10) RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc106bc: 81 69 00 08 lwz r11,8(r9) ffc106c0: 55 08 00 3c rlwinm r8,r8,0,0,30 next_block->prev_size = block_size; ffc106c4: 7c e7 21 2e stwx r7,r7,r4 new_block->next = next; ffc106c8: 91 64 00 08 stw r11,8(r4) } 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; ffc106cc: 91 0a 00 04 stw r8,4(r10) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; ffc106d0: 90 8b 00 0c stw r4,12(r11) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; ffc106d4: 90 89 00 08 stw r4,8(r9) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc106d8: 90 09 00 38 stw r0,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc106dc: 40 bd ff 8c ble- cr7,ffc10668 <_Heap_Free+0x130> stats->max_free_blocks = stats->free_blocks; ffc106e0: 90 09 00 3c stw r0,60(r9) ffc106e4: 4b ff ff 84 b ffc10668 <_Heap_Free+0x130> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; ffc106e8: 7f e7 fa 14 add r31,r7,r31 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc106ec: 63 e0 00 01 ori r0,r31,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; ffc106f0: 7f e7 21 2e stwx r31,r7,r4 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; ffc106f4: 90 0c 00 04 stw r0,4(r12) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc106f8: 80 0a 00 04 lwz r0,4(r10) ffc106fc: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc10700: 90 0a 00 04 stw r0,4(r10) ffc10704: 4b ff ff 64 b ffc10668 <_Heap_Free+0x130> =============================================================================== ffc0b2dc <_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; ffc0b2dc: 2f 85 00 00 cmpwi cr7,r5,0 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { ffc0b2e0: 94 21 ff 98 stwu r1,-104(r1) ffc0b2e4: 7c 08 02 a6 mflr r0 ffc0b2e8: 92 e1 00 44 stw r23,68(r1) ffc0b2ec: 90 01 00 6c stw r0,108(r1) ffc0b2f0: 93 01 00 48 stw r24,72(r1) ffc0b2f4: 93 21 00 4c stw r25,76(r1) ffc0b2f8: 7c 99 23 78 mr r25,r4 ffc0b2fc: 93 41 00 50 stw r26,80(r1) ffc0b300: 93 61 00 54 stw r27,84(r1) ffc0b304: 93 e1 00 64 stw r31,100(r1) ffc0b308: 7c 7f 1b 78 mr r31,r3 ffc0b30c: 91 c1 00 20 stw r14,32(r1) ffc0b310: 91 e1 00 24 stw r15,36(r1) ffc0b314: 92 01 00 28 stw r16,40(r1) ffc0b318: 92 21 00 2c stw r17,44(r1) ffc0b31c: 92 41 00 30 stw r18,48(r1) ffc0b320: 92 61 00 34 stw r19,52(r1) ffc0b324: 92 81 00 38 stw r20,56(r1) ffc0b328: 92 a1 00 3c stw r21,60(r1) ffc0b32c: 92 c1 00 40 stw r22,64(r1) ffc0b330: 93 81 00 58 stw r28,88(r1) ffc0b334: 93 a1 00 5c stw r29,92(r1) ffc0b338: 93 c1 00 60 stw r30,96(r1) uintptr_t const page_size = heap->page_size; ffc0b33c: 83 63 00 10 lwz r27,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc0b340: 83 03 00 14 lwz r24,20(r3) Heap_Block *const first_block = heap->first_block; ffc0b344: 83 43 00 20 lwz r26,32(r3) Heap_Block *const last_block = heap->last_block; ffc0b348: 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; ffc0b34c: 41 9e 00 7c beq- cr7,ffc0b3c8 <_Heap_Walk+0xec> ffc0b350: 3d 20 ff c1 lis r9,-63 ffc0b354: 39 29 b1 dc addi r9,r9,-20004 ffc0b358: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b35c: 3d 20 00 00 lis r9,0 return true; ffc0b360: 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() ) ) { ffc0b364: 80 09 27 e0 lwz r0,10208(r9) ffc0b368: 2f 80 00 03 cmpwi cr7,r0,3 ffc0b36c: 41 9e 00 7c beq- cr7,ffc0b3e8 <_Heap_Walk+0x10c> <== ALWAYS TAKEN block = next_block; } while ( block != first_block ); return true; } ffc0b370: 80 01 00 6c lwz r0,108(r1) ffc0b374: 81 c1 00 20 lwz r14,32(r1) ffc0b378: 7c 08 03 a6 mtlr r0 ffc0b37c: 81 e1 00 24 lwz r15,36(r1) ffc0b380: 82 01 00 28 lwz r16,40(r1) ffc0b384: 82 21 00 2c lwz r17,44(r1) ffc0b388: 82 41 00 30 lwz r18,48(r1) ffc0b38c: 82 61 00 34 lwz r19,52(r1) ffc0b390: 82 81 00 38 lwz r20,56(r1) ffc0b394: 82 a1 00 3c lwz r21,60(r1) ffc0b398: 82 c1 00 40 lwz r22,64(r1) ffc0b39c: 82 e1 00 44 lwz r23,68(r1) ffc0b3a0: 83 01 00 48 lwz r24,72(r1) ffc0b3a4: 83 21 00 4c lwz r25,76(r1) ffc0b3a8: 83 41 00 50 lwz r26,80(r1) ffc0b3ac: 83 61 00 54 lwz r27,84(r1) ffc0b3b0: 83 81 00 58 lwz r28,88(r1) ffc0b3b4: 83 a1 00 5c lwz r29,92(r1) ffc0b3b8: 83 c1 00 60 lwz r30,96(r1) ffc0b3bc: 83 e1 00 64 lwz r31,100(r1) ffc0b3c0: 38 21 00 68 addi r1,r1,104 ffc0b3c4: 4e 80 00 20 blr 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; ffc0b3c8: 3d 20 ff c1 lis r9,-63 ffc0b3cc: 39 29 b1 d8 addi r9,r9,-20008 ffc0b3d0: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b3d4: 3d 20 00 00 lis r9,0 return true; ffc0b3d8: 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() ) ) { ffc0b3dc: 80 09 27 e0 lwz r0,10208(r9) ffc0b3e0: 2f 80 00 03 cmpwi cr7,r0,3 ffc0b3e4: 40 9e ff 8c bne+ cr7,ffc0b370 <_Heap_Walk+0x94> 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)( ffc0b3e8: 80 1f 00 0c lwz r0,12(r31) ffc0b3ec: 3c a0 ff c2 lis r5,-62 ffc0b3f0: 81 1f 00 18 lwz r8,24(r31) ffc0b3f4: 7f 23 cb 78 mr r3,r25 ffc0b3f8: 81 3f 00 1c lwz r9,28(r31) ffc0b3fc: 38 80 00 00 li r4,0 ffc0b400: 81 7f 00 08 lwz r11,8(r31) ffc0b404: 38 a5 a6 4c addi r5,r5,-22964 ffc0b408: 90 01 00 10 stw r0,16(r1) ffc0b40c: 7f 66 db 78 mr r6,r27 ffc0b410: 7f 07 c3 78 mr r7,r24 ffc0b414: 80 01 00 18 lwz r0,24(r1) ffc0b418: 7f 4a d3 78 mr r10,r26 ffc0b41c: 92 e1 00 08 stw r23,8(r1) ffc0b420: 7c 09 03 a6 mtctr r0 ffc0b424: 91 61 00 0c stw r11,12(r1) ffc0b428: 4c c6 31 82 crclr 4*cr1+eq ffc0b42c: 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 ) { ffc0b430: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0b434: 41 9e 00 ac beq- cr7,ffc0b4e0 <_Heap_Walk+0x204> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { ffc0b438: 73 67 00 07 andi. r7,r27,7 ffc0b43c: 40 82 00 cc bne- ffc0b508 <_Heap_Walk+0x22c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b440: 7c 18 db 96 divwu r0,r24,r27 ffc0b444: 7c 00 d9 d6 mullw r0,r0,r27 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { ffc0b448: 7f 98 00 00 cmpw cr7,r24,r0 ffc0b44c: 40 9e 00 e8 bne- cr7,ffc0b534 <_Heap_Walk+0x258> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0b450: 38 1a 00 08 addi r0,r26,8 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b454: 7d 20 db 96 divwu r9,r0,r27 ffc0b458: 7d 29 d9 d6 mullw r9,r9,r27 ); return false; } if ( ffc0b45c: 7f 80 48 00 cmpw cr7,r0,r9 ffc0b460: 40 9e 01 00 bne- cr7,ffc0b560 <_Heap_Walk+0x284> block = next_block; } while ( block != first_block ); return true; } ffc0b464: 82 da 00 04 lwz r22,4(r26) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { ffc0b468: 72 c7 00 01 andi. r7,r22,1 ffc0b46c: 41 82 01 20 beq- ffc0b58c <_Heap_Walk+0x2b0> - 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; ffc0b470: 81 37 00 04 lwz r9,4(r23) ffc0b474: 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); ffc0b478: 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; ffc0b47c: 80 09 00 04 lwz r0,4(r9) ); return false; } if ( _Heap_Is_free( last_block ) ) { ffc0b480: 70 07 00 01 andi. r7,r0,1 ffc0b484: 41 82 00 34 beq- ffc0b4b8 <_Heap_Walk+0x1dc> ); return false; } if ( ffc0b488: 7f 9a 48 00 cmpw cr7,r26,r9 ffc0b48c: 41 9e 01 28 beq- cr7,ffc0b5b4 <_Heap_Walk+0x2d8> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( ffc0b490: 80 01 00 18 lwz r0,24(r1) ffc0b494: 3c a0 ff c2 lis r5,-62 ffc0b498: 7f 23 cb 78 mr r3,r25 ffc0b49c: 38 80 00 01 li r4,1 ffc0b4a0: 7c 09 03 a6 mtctr r0 ffc0b4a4: 38 a5 a7 b4 addi r5,r5,-22604 ffc0b4a8: 4c c6 31 82 crclr 4*cr1+eq ffc0b4ac: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b4b0: 38 60 00 00 li r3,0 ffc0b4b4: 4b ff fe bc b ffc0b370 <_Heap_Walk+0x94> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( ffc0b4b8: 80 01 00 18 lwz r0,24(r1) ffc0b4bc: 3c a0 ff c2 lis r5,-62 ffc0b4c0: 7f 23 cb 78 mr r3,r25 ffc0b4c4: 38 80 00 01 li r4,1 ffc0b4c8: 7c 09 03 a6 mtctr r0 ffc0b4cc: 38 a5 a7 9c addi r5,r5,-22628 ffc0b4d0: 4c c6 31 82 crclr 4*cr1+eq ffc0b4d4: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b4d8: 38 60 00 00 li r3,0 ffc0b4dc: 4b ff fe 94 b ffc0b370 <_Heap_Walk+0x94> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); ffc0b4e0: 80 01 00 18 lwz r0,24(r1) ffc0b4e4: 3c a0 ff c2 lis r5,-62 ffc0b4e8: 7f 23 cb 78 mr r3,r25 ffc0b4ec: 38 80 00 01 li r4,1 ffc0b4f0: 7c 09 03 a6 mtctr r0 ffc0b4f4: 38 a5 a6 e0 addi r5,r5,-22816 ffc0b4f8: 4c c6 31 82 crclr 4*cr1+eq ffc0b4fc: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b500: 38 60 00 00 li r3,0 ffc0b504: 4b ff fe 6c b ffc0b370 <_Heap_Walk+0x94> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( ffc0b508: 80 01 00 18 lwz r0,24(r1) ffc0b50c: 3c a0 ff c2 lis r5,-62 ffc0b510: 7f 23 cb 78 mr r3,r25 ffc0b514: 38 80 00 01 li r4,1 ffc0b518: 7c 09 03 a6 mtctr r0 ffc0b51c: 38 a5 a6 f4 addi r5,r5,-22796 ffc0b520: 7f 66 db 78 mr r6,r27 ffc0b524: 4c c6 31 82 crclr 4*cr1+eq ffc0b528: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b52c: 38 60 00 00 li r3,0 ffc0b530: 4b ff fe 40 b ffc0b370 <_Heap_Walk+0x94> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( ffc0b534: 80 01 00 18 lwz r0,24(r1) ffc0b538: 3c a0 ff c2 lis r5,-62 ffc0b53c: 7f 23 cb 78 mr r3,r25 ffc0b540: 38 80 00 01 li r4,1 ffc0b544: 7c 09 03 a6 mtctr r0 ffc0b548: 38 a5 a7 14 addi r5,r5,-22764 ffc0b54c: 7f 06 c3 78 mr r6,r24 ffc0b550: 4c c6 31 82 crclr 4*cr1+eq ffc0b554: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b558: 38 60 00 00 li r3,0 ffc0b55c: 4b ff fe 14 b ffc0b370 <_Heap_Walk+0x94> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( ffc0b560: 80 01 00 18 lwz r0,24(r1) ffc0b564: 3c a0 ff c2 lis r5,-62 ffc0b568: 7f 23 cb 78 mr r3,r25 ffc0b56c: 38 80 00 01 li r4,1 ffc0b570: 7c 09 03 a6 mtctr r0 ffc0b574: 38 a5 a7 38 addi r5,r5,-22728 ffc0b578: 7f 46 d3 78 mr r6,r26 ffc0b57c: 4c c6 31 82 crclr 4*cr1+eq ffc0b580: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b584: 38 60 00 00 li r3,0 ffc0b588: 4b ff fd e8 b ffc0b370 <_Heap_Walk+0x94> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( ffc0b58c: 80 01 00 18 lwz r0,24(r1) ffc0b590: 3c a0 ff c2 lis r5,-62 ffc0b594: 7f 23 cb 78 mr r3,r25 ffc0b598: 38 80 00 01 li r4,1 ffc0b59c: 7c 09 03 a6 mtctr r0 ffc0b5a0: 38 a5 a7 6c addi r5,r5,-22676 ffc0b5a4: 4c c6 31 82 crclr 4*cr1+eq ffc0b5a8: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b5ac: 38 60 00 00 li r3,0 ffc0b5b0: 4b ff fd c0 b ffc0b370 <_Heap_Walk+0x94> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0b5b4: 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; ffc0b5b8: 81 1f 00 10 lwz r8,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 ) { ffc0b5bc: 7f 9f 30 00 cmpw cr7,r31,r6 block = next_block; } while ( block != first_block ); return true; } ffc0b5c0: 80 1f 00 20 lwz r0,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 ) { ffc0b5c4: 41 9e 00 34 beq- cr7,ffc0b5f8 <_Heap_Walk+0x31c> 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; ffc0b5c8: 7f 80 30 40 cmplw cr7,r0,r6 ffc0b5cc: 40 9d 03 24 ble- cr7,ffc0b8f0 <_Heap_Walk+0x614> <== ALWAYS TAKEN if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( ffc0b5d0: 80 01 00 18 lwz r0,24(r1) ffc0b5d4: 3c a0 ff c2 lis r5,-62 ffc0b5d8: 7f 23 cb 78 mr r3,r25 ffc0b5dc: 38 80 00 01 li r4,1 ffc0b5e0: 7c 09 03 a6 mtctr r0 ffc0b5e4: 38 a5 a7 e4 addi r5,r5,-22556 ffc0b5e8: 4c c6 31 82 crclr 4*cr1+eq ffc0b5ec: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b5f0: 38 60 00 00 li r3,0 ffc0b5f4: 4b ff fd 7c b ffc0b370 <_Heap_Walk+0x94> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0b5f8: 3e 60 ff c2 lis r19,-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)( ffc0b5fc: 3e 80 ff c2 lis r20,-62 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0b600: 3e 40 ff c2 lis r18,-62 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b604: 7f 5d d3 78 mr r29,r26 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0b608: 3a 73 aa 00 addi r19,r19,-22016 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc0b60c: 3a 94 a9 e8 addi r20,r20,-22040 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)( ffc0b610: 3a 52 a9 44 addi r18,r18,-22204 ffc0b614: 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)" : "") ffc0b618: 3e a0 ff c2 lis r21,-62 ffc0b61c: 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)( ffc0b620: 3e 00 ff c2 lis r16,-62 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0b624: 3d c0 ff c2 lis r14,-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; ffc0b628: 56 dc 00 3c rlwinm r28,r22,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); ffc0b62c: 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; ffc0b630: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0b634: 40 9d 00 34 ble- cr7,ffc0b668 <_Heap_Walk+0x38c> <== 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)( ffc0b638: 3c a0 ff c2 lis r5,-62 ffc0b63c: 7f 23 cb 78 mr r3,r25 ffc0b640: 38 80 00 01 li r4,1 ffc0b644: 38 a5 a8 84 addi r5,r5,-22396 return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( ffc0b648: 80 01 00 18 lwz r0,24(r1) ffc0b64c: 7f a6 eb 78 mr r6,r29 ffc0b650: 7f c7 f3 78 mr r7,r30 ffc0b654: 7c 09 03 a6 mtctr r0 ffc0b658: 4c c6 31 82 crclr 4*cr1+eq ffc0b65c: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0b660: 38 60 00 00 li r3,0 ffc0b664: 4b ff fd 0c b ffc0b370 <_Heap_Walk+0x94> ffc0b668: 80 1f 00 24 lwz r0,36(r31) ffc0b66c: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0b670: 41 bc ff c8 blt- cr7,ffc0b638 <_Heap_Walk+0x35c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b674: 7d 3c db 96 divwu r9,r28,r27 ffc0b678: 7d 29 d9 d6 mullw r9,r9,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; ffc0b67c: 7f a0 ba 78 xor r0,r29,r23 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc0b680: 7f 9c 48 00 cmpw cr7,r28,r9 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; ffc0b684: 7c 00 00 34 cntlzw r0,r0 ffc0b688: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0b68c: 68 00 00 01 xori r0,r0,1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc0b690: 41 9e 00 0c beq- cr7,ffc0b69c <_Heap_Walk+0x3c0> ffc0b694: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b698: 40 9e 01 e0 bne- cr7,ffc0b878 <_Heap_Walk+0x59c> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { ffc0b69c: 7f 98 e0 40 cmplw cr7,r24,r28 ffc0b6a0: 40 9d 00 0c ble- cr7,ffc0b6ac <_Heap_Walk+0x3d0> ffc0b6a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b6a8: 40 9e 02 00 bne- cr7,ffc0b8a8 <_Heap_Walk+0x5cc> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { ffc0b6ac: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0b6b0: 41 9c 00 0c blt- cr7,ffc0b6bc <_Heap_Walk+0x3e0> ffc0b6b4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b6b8: 40 9e 02 24 bne- cr7,ffc0b8dc <_Heap_Walk+0x600> 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; ffc0b6bc: 80 1e 00 04 lwz r0,4(r30) ffc0b6c0: 56 d6 07 fe clrlwi r22,r22,31 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0b6c4: 70 07 00 01 andi. r7,r0,1 ffc0b6c8: 41 82 00 74 beq- ffc0b73c <_Heap_Walk+0x460> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { ffc0b6cc: 2f 96 00 00 cmpwi cr7,r22,0 ffc0b6d0: 41 9e 00 40 beq- cr7,ffc0b710 <_Heap_Walk+0x434> (*printer)( ffc0b6d4: 80 01 00 18 lwz r0,24(r1) ffc0b6d8: 7f 23 cb 78 mr r3,r25 ffc0b6dc: 38 80 00 00 li r4,0 ffc0b6e0: 7e 85 a3 78 mr r5,r20 ffc0b6e4: 7c 09 03 a6 mtctr r0 ffc0b6e8: 7f a6 eb 78 mr r6,r29 ffc0b6ec: 7f 87 e3 78 mr r7,r28 ffc0b6f0: 4c c6 31 82 crclr 4*cr1+eq ffc0b6f4: 4e 80 04 21 bctrl block->prev_size ); } block = next_block; } while ( block != first_block ); ffc0b6f8: 7f 9a f0 00 cmpw cr7,r26,r30 ffc0b6fc: 41 9e 01 0c beq- cr7,ffc0b808 <_Heap_Walk+0x52c> ffc0b700: 82 de 00 04 lwz r22,4(r30) ffc0b704: 7f dd f3 78 mr r29,r30 ffc0b708: 80 1f 00 20 lwz r0,32(r31) ffc0b70c: 4b ff ff 1c b ffc0b628 <_Heap_Walk+0x34c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0b710: 80 01 00 18 lwz r0,24(r1) ffc0b714: 7f a6 eb 78 mr r6,r29 ffc0b718: 7f 23 cb 78 mr r3,r25 ffc0b71c: 81 1d 00 00 lwz r8,0(r29) ffc0b720: 38 80 00 00 li r4,0 ffc0b724: 7c 09 03 a6 mtctr r0 ffc0b728: 7e 65 9b 78 mr r5,r19 ffc0b72c: 7f 87 e3 78 mr r7,r28 ffc0b730: 4c c6 31 82 crclr 4*cr1+eq ffc0b734: 4e 80 04 21 bctrl ffc0b738: 4b ff ff c0 b ffc0b6f8 <_Heap_Walk+0x41c> 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 ? ffc0b73c: 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)( ffc0b740: 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; ffc0b744: 80 1f 00 0c lwz r0,12(r31) ffc0b748: 7f 89 40 00 cmpw cr7,r9,r8 ffc0b74c: 41 9e 00 f8 beq- cr7,ffc0b844 <_Heap_Walk+0x568> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0b750: 7f 9f 40 00 cmpw cr7,r31,r8 ffc0b754: 41 9e 01 00 beq- cr7,ffc0b854 <_Heap_Walk+0x578> ffc0b758: 39 35 a9 b4 addi r9,r21,-22092 block->next, block->next == last_free_block ? ffc0b75c: 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)( ffc0b760: 7f 80 50 00 cmpw cr7,r0,r10 ffc0b764: 41 9e 00 e8 beq- cr7,ffc0b84c <_Heap_Walk+0x570> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0b768: 7f 9f 50 00 cmpw cr7,r31,r10 ffc0b76c: 41 9e 00 f0 beq- cr7,ffc0b85c <_Heap_Walk+0x580> ffc0b770: 38 15 a9 b4 addi r0,r21,-22092 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)( ffc0b774: 90 01 00 08 stw r0,8(r1) ffc0b778: 7f 23 cb 78 mr r3,r25 ffc0b77c: 38 80 00 00 li r4,0 ffc0b780: 80 01 00 18 lwz r0,24(r1) ffc0b784: 7e 45 93 78 mr r5,r18 ffc0b788: 7f a6 eb 78 mr r6,r29 ffc0b78c: 7f 87 e3 78 mr r7,r28 ffc0b790: 7c 09 03 a6 mtctr r0 ffc0b794: 4c c6 31 82 crclr 4*cr1+eq ffc0b798: 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 ) { ffc0b79c: 81 1e 00 00 lwz r8,0(r30) ffc0b7a0: 7f 9c 40 00 cmpw cr7,r28,r8 ffc0b7a4: 40 9e 00 6c bne- cr7,ffc0b810 <_Heap_Walk+0x534> ); return false; } if ( !prev_used ) { ffc0b7a8: 2f 96 00 00 cmpwi cr7,r22,0 ffc0b7ac: 41 9e 00 b8 beq- cr7,ffc0b864 <_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; ffc0b7b0: 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 ) { ffc0b7b4: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0b7b8: 41 9e 00 24 beq- cr7,ffc0b7dc <_Heap_Walk+0x500> <== NEVER TAKEN if ( free_block == block ) { ffc0b7bc: 7f 9d 48 00 cmpw cr7,r29,r9 ffc0b7c0: 40 be 00 0c bne+ cr7,ffc0b7cc <_Heap_Walk+0x4f0> ffc0b7c4: 4b ff ff 34 b ffc0b6f8 <_Heap_Walk+0x41c> ffc0b7c8: 41 ba ff 30 beq- cr6,ffc0b6f8 <_Heap_Walk+0x41c> return true; } free_block = free_block->next; ffc0b7cc: 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 ) { ffc0b7d0: 7f 9f 48 00 cmpw cr7,r31,r9 if ( free_block == block ) { ffc0b7d4: 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 ) { ffc0b7d8: 40 9e ff f0 bne+ cr7,ffc0b7c8 <_Heap_Walk+0x4ec> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0b7dc: 3c a0 ff c2 lis r5,-62 ffc0b7e0: 7f 23 cb 78 mr r3,r25 ffc0b7e4: 38 80 00 01 li r4,1 ffc0b7e8: 38 a5 aa 28 addi r5,r5,-21976 ffc0b7ec: 80 01 00 18 lwz r0,24(r1) ffc0b7f0: 7f a6 eb 78 mr r6,r29 ffc0b7f4: 7c 09 03 a6 mtctr r0 ffc0b7f8: 4c c6 31 82 crclr 4*cr1+eq ffc0b7fc: 4e 80 04 21 bctrl return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; ffc0b800: 38 60 00 00 li r3,0 ffc0b804: 4b ff fb 6c b ffc0b370 <_Heap_Walk+0x94> } block = next_block; } while ( block != first_block ); return true; ffc0b808: 38 60 00 01 li r3,1 ffc0b80c: 4b ff fb 64 b ffc0b370 <_Heap_Walk+0x94> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( ffc0b810: 80 01 00 18 lwz r0,24(r1) ffc0b814: 3c a0 ff c2 lis r5,-62 ffc0b818: 7f 23 cb 78 mr r3,r25 ffc0b81c: 38 80 00 01 li r4,1 ffc0b820: 7c 09 03 a6 mtctr r0 ffc0b824: 38 a5 a9 7c addi r5,r5,-22148 ffc0b828: 7f a6 eb 78 mr r6,r29 ffc0b82c: 7f 87 e3 78 mr r7,r28 ffc0b830: 7f c9 f3 78 mr r9,r30 ffc0b834: 4c c6 31 82 crclr 4*cr1+eq ffc0b838: 4e 80 04 21 bctrl return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; ffc0b83c: 38 60 00 00 li r3,0 ffc0b840: 4b ff fb 30 b ffc0b370 <_Heap_Walk+0x94> 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)( ffc0b844: 39 30 a6 14 addi r9,r16,-23020 ffc0b848: 4b ff ff 14 b ffc0b75c <_Heap_Walk+0x480> ffc0b84c: 38 11 a6 30 addi r0,r17,-22992 ffc0b850: 4b ff ff 24 b ffc0b774 <_Heap_Walk+0x498> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0b854: 39 2e a6 24 addi r9,r14,-23004 ffc0b858: 4b ff ff 04 b ffc0b75c <_Heap_Walk+0x480> block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0b85c: 38 0f a6 40 addi r0,r15,-22976 ffc0b860: 4b ff ff 14 b ffc0b774 <_Heap_Walk+0x498> return false; } if ( !prev_used ) { (*printer)( ffc0b864: 3c a0 ff c2 lis r5,-62 ffc0b868: 7f 23 cb 78 mr r3,r25 ffc0b86c: 38 80 00 01 li r4,1 ffc0b870: 38 a5 a9 b8 addi r5,r5,-22088 ffc0b874: 4b ff ff 78 b ffc0b7ec <_Heap_Walk+0x510> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( ffc0b878: 80 01 00 18 lwz r0,24(r1) ffc0b87c: 3c a0 ff c2 lis r5,-62 ffc0b880: 7f 23 cb 78 mr r3,r25 ffc0b884: 38 80 00 01 li r4,1 ffc0b888: 7c 09 03 a6 mtctr r0 ffc0b88c: 38 a5 a8 b4 addi r5,r5,-22348 ffc0b890: 7f a6 eb 78 mr r6,r29 ffc0b894: 7f 87 e3 78 mr r7,r28 ffc0b898: 4c c6 31 82 crclr 4*cr1+eq ffc0b89c: 4e 80 04 21 bctrl "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; ffc0b8a0: 38 60 00 00 li r3,0 ffc0b8a4: 4b ff fa cc b ffc0b370 <_Heap_Walk+0x94> } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( ffc0b8a8: 80 01 00 18 lwz r0,24(r1) ffc0b8ac: 3c a0 ff c2 lis r5,-62 ffc0b8b0: 7f 23 cb 78 mr r3,r25 ffc0b8b4: 38 80 00 01 li r4,1 ffc0b8b8: 7c 09 03 a6 mtctr r0 ffc0b8bc: 38 a5 a8 e4 addi r5,r5,-22300 ffc0b8c0: 7f a6 eb 78 mr r6,r29 ffc0b8c4: 7f 87 e3 78 mr r7,r28 ffc0b8c8: 7f 08 c3 78 mr r8,r24 ffc0b8cc: 4c c6 31 82 crclr 4*cr1+eq ffc0b8d0: 4e 80 04 21 bctrl block, block_size, min_block_size ); return false; ffc0b8d4: 38 60 00 00 li r3,0 ffc0b8d8: 4b ff fa 98 b ffc0b370 <_Heap_Walk+0x94> } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( ffc0b8dc: 3c a0 ff c2 lis r5,-62 ffc0b8e0: 7f 23 cb 78 mr r3,r25 ffc0b8e4: 38 80 00 01 li r4,1 ffc0b8e8: 38 a5 a9 10 addi r5,r5,-22256 ffc0b8ec: 4b ff fd 5c b ffc0b648 <_Heap_Walk+0x36c> 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; ffc0b8f0: 81 5f 00 24 lwz r10,36(r31) ffc0b8f4: 7f 86 50 40 cmplw cr7,r6,r10 ffc0b8f8: 41 bd fc d8 bgt- cr7,ffc0b5d0 <_Heap_Walk+0x2f4> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0b8fc: 39 26 00 08 addi r9,r6,8 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b900: 7d 69 43 96 divwu r11,r9,r8 ffc0b904: 7d 6b 41 d6 mullw r11,r11,r8 ); return false; } if ( ffc0b908: 7f 89 58 00 cmpw cr7,r9,r11 ffc0b90c: 40 9e 00 d4 bne- cr7,ffc0b9e0 <_Heap_Walk+0x704> <== 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; ffc0b910: 81 26 00 04 lwz r9,4(r6) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b914: 7f eb fb 78 mr r11,r31 ffc0b918: 7c c5 33 78 mr r5,r6 ffc0b91c: 55 29 00 3c rlwinm r9,r9,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc0b920: 7d 26 4a 14 add r9,r6,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; ffc0b924: 81 29 00 04 lwz r9,4(r9) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b928: 71 27 00 01 andi. r7,r9,1 ffc0b92c: 41 a2 00 58 beq+ ffc0b984 <_Heap_Walk+0x6a8> <== ALWAYS TAKEN ffc0b930: 48 00 00 88 b ffc0b9b8 <_Heap_Walk+0x6dc> <== NOT EXECUTED return false; } prev_block = free_block; free_block = free_block->next; ffc0b934: 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 ) { ffc0b938: 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; ffc0b93c: 7f 06 00 40 cmplw cr6,r6,r0 ffc0b940: 7c 86 50 40 cmplw cr1,r6,r10 ffc0b944: 41 be fc b4 beq- cr7,ffc0b5f8 <_Heap_Walk+0x31c> ffc0b948: 41 b8 fc 88 blt- cr6,ffc0b5d0 <_Heap_Walk+0x2f4> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0b94c: 39 26 00 08 addi r9,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; ffc0b950: 41 a5 fc 80 bgt- cr1,ffc0b5d0 <_Heap_Walk+0x2f4> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0b954: 7c e9 43 96 divwu r7,r9,r8 ffc0b958: 7c e7 41 d6 mullw r7,r7,r8 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b95c: 7c ab 2b 78 mr r11,r5 ); return false; } if ( ffc0b960: 7f 89 38 00 cmpw cr7,r9,r7 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b964: 7c c5 33 78 mr r5,r6 ); return false; } if ( ffc0b968: 40 9e 00 78 bne- cr7,ffc0b9e0 <_Heap_Walk+0x704> - 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; ffc0b96c: 81 26 00 04 lwz r9,4(r6) ffc0b970: 55 29 00 3c rlwinm r9,r9,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc0b974: 7d 26 4a 14 add r9,r6,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; ffc0b978: 81 29 00 04 lwz r9,4(r9) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0b97c: 71 27 00 01 andi. r7,r9,1 ffc0b980: 40 82 00 38 bne- ffc0b9b8 <_Heap_Walk+0x6dc> ); return false; } if ( free_block->prev != prev_block ) { ffc0b984: 80 e6 00 0c lwz r7,12(r6) ffc0b988: 7f 87 58 00 cmpw cr7,r7,r11 ffc0b98c: 41 9e ff a8 beq+ cr7,ffc0b934 <_Heap_Walk+0x658> (*printer)( ffc0b990: 80 01 00 18 lwz r0,24(r1) ffc0b994: 3c a0 ff c2 lis r5,-62 ffc0b998: 7f 23 cb 78 mr r3,r25 ffc0b99c: 38 80 00 01 li r4,1 ffc0b9a0: 7c 09 03 a6 mtctr r0 ffc0b9a4: 38 a5 a8 50 addi r5,r5,-22448 ffc0b9a8: 4c c6 31 82 crclr 4*cr1+eq ffc0b9ac: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b9b0: 38 60 00 00 li r3,0 ffc0b9b4: 4b ff f9 bc b ffc0b370 <_Heap_Walk+0x94> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( ffc0b9b8: 80 01 00 18 lwz r0,24(r1) ffc0b9bc: 3c a0 ff c2 lis r5,-62 ffc0b9c0: 7f 23 cb 78 mr r3,r25 ffc0b9c4: 38 80 00 01 li r4,1 ffc0b9c8: 7c 09 03 a6 mtctr r0 ffc0b9cc: 38 a5 a8 34 addi r5,r5,-22476 ffc0b9d0: 4c c6 31 82 crclr 4*cr1+eq ffc0b9d4: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0b9d8: 38 60 00 00 li r3,0 ffc0b9dc: 4b ff f9 94 b ffc0b370 <_Heap_Walk+0x94> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( ffc0b9e0: 80 01 00 18 lwz r0,24(r1) ffc0b9e4: 3c a0 ff c2 lis r5,-62 ffc0b9e8: 7f 23 cb 78 mr r3,r25 ffc0b9ec: 38 80 00 01 li r4,1 ffc0b9f0: 7c 09 03 a6 mtctr r0 ffc0b9f4: 38 a5 a8 04 addi r5,r5,-22524 ffc0b9f8: 4c c6 31 82 crclr 4*cr1+eq ffc0b9fc: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc0ba00: 38 60 00 00 li r3,0 ffc0ba04: 4b ff f9 6c b ffc0b370 <_Heap_Walk+0x94> =============================================================================== ffc0b1dc <_Heap_Walk_print>: static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b1dc: 94 21 ff 88 stwu r1,-120(r1) ffc0b1e0: 7c 08 02 a6 mflr r0 ffc0b1e4: 93 e1 00 74 stw r31,116(r1) ffc0b1e8: 90 01 00 7c stw r0,124(r1) ffc0b1ec: 7c 60 1b 78 mr r0,r3 ffc0b1f0: 90 c1 00 1c stw r6,28(r1) ffc0b1f4: 90 e1 00 20 stw r7,32(r1) ffc0b1f8: 91 01 00 24 stw r8,36(r1) ffc0b1fc: 91 21 00 28 stw r9,40(r1) ffc0b200: 91 41 00 2c stw r10,44(r1) ffc0b204: 40 86 00 24 bne- cr1,ffc0b228 <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN ffc0b208: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc0b20c: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc0b210: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0b214: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0b218: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0b21c: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0b220: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0b224: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list ap; if ( error ) { ffc0b228: 2f 84 00 00 cmpwi cr7,r4,0 { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b22c: 7c bf 2b 78 mr r31,r5 va_list ap; if ( error ) { ffc0b230: 40 9e 00 58 bne- cr7,ffc0b288 <_Heap_Walk_print+0xac> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); ffc0b234: 3c 60 ff c2 lis r3,-62 ffc0b238: 7c 04 03 78 mr r4,r0 ffc0b23c: 38 63 a6 08 addi r3,r3,-23032 ffc0b240: 4c c6 31 82 crclr 4*cr1+eq ffc0b244: 4b ff b2 59 bl ffc0649c } va_start( ap, fmt ); ffc0b248: 38 00 00 03 li r0,3 ffc0b24c: 98 01 00 08 stb r0,8(r1) ffc0b250: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b254: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b258: 98 01 00 09 stb r0,9(r1) ffc0b25c: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b260: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b264: 90 01 00 0c stw r0,12(r1) ffc0b268: 38 01 00 10 addi r0,r1,16 ffc0b26c: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b270: 4b ff d5 b9 bl ffc08828 va_end( ap ); } ffc0b274: 80 01 00 7c lwz r0,124(r1) ffc0b278: 83 e1 00 74 lwz r31,116(r1) ffc0b27c: 38 21 00 78 addi r1,r1,120 ffc0b280: 7c 08 03 a6 mtlr r0 ffc0b284: 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 ); ffc0b288: 3c 60 ff c2 lis r3,-62 ffc0b28c: 7c 04 03 78 mr r4,r0 ffc0b290: 38 63 a5 fc addi r3,r3,-23044 ffc0b294: 4c c6 31 82 crclr 4*cr1+eq ffc0b298: 4b ff b2 05 bl ffc0649c } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b29c: 38 00 00 03 li r0,3 ffc0b2a0: 98 01 00 08 stb r0,8(r1) ffc0b2a4: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b2a8: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b2ac: 98 01 00 09 stb r0,9(r1) ffc0b2b0: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b2b4: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b2b8: 90 01 00 0c stw r0,12(r1) ffc0b2bc: 38 01 00 10 addi r0,r1,16 ffc0b2c0: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b2c4: 4b ff d5 65 bl ffc08828 va_end( ap ); } ffc0b2c8: 80 01 00 7c lwz r0,124(r1) ffc0b2cc: 83 e1 00 74 lwz r31,116(r1) ffc0b2d0: 38 21 00 78 addi r1,r1,120 ffc0b2d4: 7c 08 03 a6 mtlr r0 ffc0b2d8: 4e 80 00 20 blr =============================================================================== ffc09dcc <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09dcc: 94 21 ff f0 stwu r1,-16(r1) ffc09dd0: 7c 08 02 a6 mflr r0 ffc09dd4: 93 c1 00 08 stw r30,8(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09dd8: 3f c0 00 00 lis r30,0 * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09ddc: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09de0: 80 1e 28 10 lwz r0,10256(r30) * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09de4: 93 e1 00 0c stw r31,12(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09de8: 2f 80 00 00 cmpwi cr7,r0,0 ffc09dec: 41 9e 00 2c beq- cr7,ffc09e18 <_IO_Initialize_all_drivers+0x4c><== NEVER TAKEN ffc09df0: 3b e0 00 00 li r31,0 ffc09df4: 3b de 28 10 addi r30,r30,10256 (void) rtems_io_initialize( major, 0, NULL ); ffc09df8: 7f e3 fb 78 mr r3,r31 ffc09dfc: 38 80 00 00 li r4,0 ffc09e00: 38 a0 00 00 li r5,0 ffc09e04: 48 00 62 75 bl ffc10078 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09e08: 80 1e 00 00 lwz r0,0(r30) ffc09e0c: 3b ff 00 01 addi r31,r31,1 ffc09e10: 7f 80 f8 40 cmplw cr7,r0,r31 ffc09e14: 41 9d ff e4 bgt+ cr7,ffc09df8 <_IO_Initialize_all_drivers+0x2c> (void) rtems_io_initialize( major, 0, NULL ); } ffc09e18: 80 01 00 14 lwz r0,20(r1) ffc09e1c: 83 c1 00 08 lwz r30,8(r1) ffc09e20: 7c 08 03 a6 mtlr r0 ffc09e24: 83 e1 00 0c lwz r31,12(r1) ffc09e28: 38 21 00 10 addi r1,r1,16 ffc09e2c: 4e 80 00 20 blr =============================================================================== ffc09cbc <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { ffc09cbc: 94 21 ff e0 stwu r1,-32(r1) ffc09cc0: 7c 08 02 a6 mflr r0 uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; ffc09cc4: 3d 20 00 00 lis r9,0 * workspace. * */ void _IO_Manager_initialization(void) { ffc09cc8: 90 01 00 24 stw r0,36(r1) uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; ffc09ccc: 39 29 20 04 addi r9,r9,8196 * workspace. * */ void _IO_Manager_initialization(void) { ffc09cd0: 93 a1 00 14 stw r29,20(r1) ffc09cd4: 93 c1 00 18 stw r30,24(r1) uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; drivers_in_table = Configuration.number_of_device_drivers; number_of_drivers = Configuration.maximum_drivers; ffc09cd8: 83 a9 00 2c lwz r29,44(r9) rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; drivers_in_table = Configuration.number_of_device_drivers; ffc09cdc: 83 c9 00 30 lwz r30,48(r9) * workspace. * */ void _IO_Manager_initialization(void) { ffc09ce0: 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 ) ffc09ce4: 7f 9e e8 40 cmplw cr7,r30,r29 * workspace. * */ void _IO_Manager_initialization(void) { ffc09ce8: 93 61 00 0c stw r27,12(r1) ffc09cec: 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 = Configuration.Device_driver_table; ffc09cf0: 83 e9 00 34 lwz r31,52(r9) /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) ffc09cf4: 40 9c 00 a4 bge- cr7,ffc09d98 <_IO_Manager_initialization+0xdc> * 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 ) ffc09cf8: 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( ffc09cfc: 7f 63 db 78 mr r3,r27 ffc09d00: 48 00 3d 55 bl ffc0da54 <_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 *) ffc09d04: 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; ffc09d08: 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 *) ffc09d0c: 90 7c 28 14 stw r3,10260(r28) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( ffc09d10: 38 80 00 00 li r4,0 ffc09d14: 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; ffc09d18: 93 a9 28 10 stw r29,10256(r9) memset( ffc09d1c: 48 00 9b 65 bl ffc13880 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc09d20: 2f 9e 00 00 cmpwi cr7,r30,0 ffc09d24: 41 9e 00 50 beq- cr7,ffc09d74 <_IO_Manager_initialization+0xb8><== NEVER TAKEN ffc09d28: 7f c9 03 a6 mtctr r30 ffc09d2c: 81 1c 28 14 lwz r8,10260(r28) ffc09d30: 39 40 00 00 li r10,0 _IO_Driver_address_table[index] = driver_table[index]; ffc09d34: 7f e9 fb 78 mr r9,r31 ffc09d38: 7c a9 50 6e lwzux r5,r9,r10 ffc09d3c: 7d 68 52 14 add r11,r8,r10 ffc09d40: 80 e9 00 08 lwz r7,8(r9) ffc09d44: 80 09 00 0c lwz r0,12(r9) ffc09d48: 80 c9 00 04 lwz r6,4(r9) ffc09d4c: 7c a8 51 2e stwx r5,r8,r10 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc09d50: 39 4a 00 18 addi r10,r10,24 _IO_Driver_address_table[index] = driver_table[index]; ffc09d54: 90 cb 00 04 stw r6,4(r11) ffc09d58: 90 eb 00 08 stw r7,8(r11) ffc09d5c: 90 0b 00 0c stw r0,12(r11) ffc09d60: 80 e9 00 10 lwz r7,16(r9) ffc09d64: 80 09 00 14 lwz r0,20(r9) ffc09d68: 90 eb 00 10 stw r7,16(r11) ffc09d6c: 90 0b 00 14 stw r0,20(r11) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc09d70: 42 00 ff c4 bdnz+ ffc09d34 <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; } ffc09d74: 80 01 00 24 lwz r0,36(r1) ffc09d78: 83 61 00 0c lwz r27,12(r1) ffc09d7c: 7c 08 03 a6 mtlr r0 ffc09d80: 83 81 00 10 lwz r28,16(r1) ffc09d84: 83 a1 00 14 lwz r29,20(r1) ffc09d88: 83 c1 00 18 lwz r30,24(r1) ffc09d8c: 83 e1 00 1c lwz r31,28(r1) ffc09d90: 38 21 00 20 addi r1,r1,32 ffc09d94: 4e 80 00 20 blr ffc09d98: 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; ffc09d9c: 3d 20 00 00 lis r9,0 ffc09da0: 93 e9 28 14 stw r31,10260(r9) _IO_Number_of_drivers = number_of_drivers; ffc09da4: 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]; } ffc09da8: 7c 08 03 a6 mtlr r0 * 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; ffc09dac: 93 c9 28 10 stw r30,10256(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]; } ffc09db0: 83 61 00 0c lwz r27,12(r1) ffc09db4: 83 81 00 10 lwz r28,16(r1) ffc09db8: 83 a1 00 14 lwz r29,20(r1) ffc09dbc: 83 c1 00 18 lwz r30,24(r1) ffc09dc0: 83 e1 00 1c lwz r31,28(r1) ffc09dc4: 38 21 00 20 addi r1,r1,32 ffc09dc8: 4e 80 00 20 blr =============================================================================== ffc0aca4 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0aca4: 94 21 ff f0 stwu r1,-16(r1) ffc0aca8: 7c 08 02 a6 mflr r0 _Internal_errors_What_happened.the_source = the_source; ffc0acac: 3d 60 00 00 lis r11,0 ffc0acb0: 39 2b 2c d0 addi r9,r11,11472 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0acb4: 90 01 00 14 stw r0,20(r1) ffc0acb8: 93 e1 00 0c stw r31,12(r1) ffc0acbc: 7c bf 2b 78 mr r31,r5 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; ffc0acc0: 98 89 00 04 stb r4,4(r9) _Internal_errors_What_happened.the_error = the_error; ffc0acc4: 90 a9 00 08 stw r5,8(r9) bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; ffc0acc8: 90 6b 2c d0 stw r3,11472(r11) _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); ffc0accc: 48 00 26 61 bl ffc0d32c <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc0acd0: 38 00 00 05 li r0,5 ffc0acd4: 3d 20 00 00 lis r9,0 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc0acd8: 7f e3 fb 78 mr r3,r31 ffc0acdc: 90 09 28 04 stw r0,10244(r9) ffc0ace0: 4b ff 91 cd bl ffc03eac <_BSP_Fatal_error> ffc0ace4: 48 00 00 00 b ffc0ace4 <_Internal_error_Occurred+0x40><== NOT EXECUTED =============================================================================== ffc0acfc <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0acfc: 94 21 ff f0 stwu r1,-16(r1) ffc0ad00: 7c 08 02 a6 mflr r0 ffc0ad04: 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 ) ffc0ad08: 80 03 00 18 lwz r0,24(r3) */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0ad0c: 93 e1 00 0c stw r31,12(r1) ffc0ad10: 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 ) ffc0ad14: 2f 80 00 00 cmpwi cr7,r0,0 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0ad18: 93 c1 00 08 stw r30,8(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; ffc0ad1c: 38 60 00 00 li r3,0 * 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 ) ffc0ad20: 41 9e 00 58 beq- cr7,ffc0ad78 <_Objects_Allocate+0x7c> <== 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 ); ffc0ad24: 3b df 00 20 addi r30,r31,32 ffc0ad28: 7f c3 f3 78 mr r3,r30 ffc0ad2c: 4b ff f4 21 bl ffc0a14c <_Chain_Get> if ( information->auto_extend ) { ffc0ad30: 88 1f 00 12 lbz r0,18(r31) ffc0ad34: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ad38: 41 9e 00 40 beq- cr7,ffc0ad78 <_Objects_Allocate+0x7c> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { ffc0ad3c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ad40: 41 9e 00 50 beq- cr7,ffc0ad90 <_Objects_Allocate+0x94> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0ad44: a1 63 00 0a lhz r11,10(r3) ffc0ad48: a0 1f 00 0a lhz r0,10(r31) _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; ffc0ad4c: a1 3f 00 14 lhz r9,20(r31) } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0ad50: 7c 00 58 50 subf r0,r0,r11 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; ffc0ad54: a1 7f 00 2c lhz r11,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; ffc0ad58: 7c 00 4b 96 divwu r0,r0,r9 information->inactive_per_block[ block ]--; ffc0ad5c: 81 3f 00 30 lwz r9,48(r31) ffc0ad60: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0ad64: 7d 49 00 2e lwzx r10,r9,r0 information->inactive--; ffc0ad68: 39 6b ff ff addi r11,r11,-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 ]--; ffc0ad6c: 39 4a ff ff addi r10,r10,-1 ffc0ad70: 7d 49 01 2e stwx r10,r9,r0 information->inactive--; ffc0ad74: b1 7f 00 2c sth r11,44(r31) ); } #endif return the_object; } ffc0ad78: 80 01 00 14 lwz r0,20(r1) ffc0ad7c: 83 c1 00 08 lwz r30,8(r1) ffc0ad80: 7c 08 03 a6 mtlr r0 ffc0ad84: 83 e1 00 0c lwz r31,12(r1) ffc0ad88: 38 21 00 10 addi r1,r1,16 ffc0ad8c: 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 ); ffc0ad90: 7f e3 fb 78 mr r3,r31 ffc0ad94: 48 00 00 4d bl ffc0ade0 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc0ad98: 7f c3 f3 78 mr r3,r30 ffc0ad9c: 4b ff f3 b1 bl ffc0a14c <_Chain_Get> } if ( the_object ) { ffc0ada0: 2c 03 00 00 cmpwi r3,0 ffc0ada4: 41 82 ff d4 beq+ ffc0ad78 <_Objects_Allocate+0x7c> ffc0ada8: 4b ff ff 9c b ffc0ad44 <_Objects_Allocate+0x48> =============================================================================== ffc0ade0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { ffc0ade0: 94 21 ff c0 stwu r1,-64(r1) ffc0ade4: 7c 08 02 a6 mflr r0 ffc0ade8: 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 ) ffc0adec: 81 23 00 34 lwz r9,52(r3) */ void _Objects_Extend_information( Objects_Information *information ) { ffc0adf0: 93 61 00 2c stw r27,44(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 ) ffc0adf4: 2f 89 00 00 cmpwi cr7,r9,0 */ void _Objects_Extend_information( Objects_Information *information ) { ffc0adf8: 93 81 00 30 stw r28,48(r1) ffc0adfc: 93 e1 00 3c stw r31,60(r1) ffc0ae00: 7c 7f 1b 78 mr r31,r3 ffc0ae04: 92 c1 00 18 stw r22,24(r1) ffc0ae08: 92 e1 00 1c stw r23,28(r1) ffc0ae0c: 93 01 00 20 stw r24,32(r1) ffc0ae10: 93 21 00 24 stw r25,36(r1) ffc0ae14: 93 41 00 28 stw r26,40(r1) ffc0ae18: 93 a1 00 34 stw r29,52(r1) ffc0ae1c: 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 ); ffc0ae20: a3 83 00 0a lhz r28,10(r3) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0ae24: a3 63 00 10 lhz r27,16(r3) ffc0ae28: 41 9e 02 80 beq- cr7,ffc0b0a8 <_Objects_Extend_information+0x2c8> block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc0ae2c: a1 63 00 14 lhz r11,20(r3) ffc0ae30: 7e db 5b 96 divwu r22,r27,r11 for ( ; block < block_count; block++ ) { ffc0ae34: 2f 96 00 00 cmpwi cr7,r22,0 ffc0ae38: 41 9e 02 88 beq- cr7,ffc0b0c0 <_Objects_Extend_information+0x2e0><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { ffc0ae3c: 80 09 00 00 lwz r0,0(r9) ffc0ae40: 7d 6a 5b 78 mr r10,r11 /* * 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 ); ffc0ae44: 7f 9e e3 78 mr r30,r28 index_base = minimum_index; block = 0; ffc0ae48: 7e c9 03 a6 mtctr r22 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc0ae4c: 2f 80 00 00 cmpwi cr7,r0,0 * 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; ffc0ae50: 3b a0 00 00 li r29,0 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc0ae54: 40 be 00 14 bne+ cr7,ffc0ae68 <_Objects_Extend_information+0x88><== ALWAYS TAKEN ffc0ae58: 48 00 02 7c b ffc0b0d4 <_Objects_Extend_information+0x2f4><== NOT EXECUTED ffc0ae5c: 84 09 00 04 lwzu r0,4(r9) ffc0ae60: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ae64: 41 9e 01 f4 beq- cr7,ffc0b058 <_Objects_Extend_information+0x278> do_extend = false; break; } else index_base += information->allocation_size; ffc0ae68: 7f de 5a 14 add r30,r30,r11 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc0ae6c: 3b bd 00 01 addi r29,r29,1 ffc0ae70: 42 00 ff ec bdnz+ ffc0ae5c <_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; ffc0ae74: 3b 20 00 01 li r25,1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; ffc0ae78: 7f 7b 52 14 add r27,r27,r10 /* * 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 ) { ffc0ae7c: 2b 9b ff ff cmplwi cr7,r27,65535 ffc0ae80: 41 9d 01 a0 bgt- cr7,ffc0b020 <_Objects_Extend_information+0x240> /* * 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 ) { ffc0ae84: 88 1f 00 12 lbz r0,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; ffc0ae88: 80 7f 00 18 lwz r3,24(r31) if ( information->auto_extend ) { ffc0ae8c: 2f 80 00 00 cmpwi cr7,r0,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; ffc0ae90: 7c 6a 19 d6 mullw r3,r10,r3 if ( information->auto_extend ) { ffc0ae94: 41 9e 01 cc beq- cr7,ffc0b060 <_Objects_Extend_information+0x280> new_object_block = _Workspace_Allocate( block_size ); ffc0ae98: 48 00 2b 5d bl ffc0d9f4 <_Workspace_Allocate> if ( !new_object_block ) ffc0ae9c: 7c 7a 1b 79 mr. r26,r3 ffc0aea0: 41 82 01 80 beq- ffc0b020 <_Objects_Extend_information+0x240> } /* * Do we need to grow the tables? */ if ( do_extend ) { ffc0aea4: 2f 99 00 00 cmpwi cr7,r25,0 ffc0aea8: 41 9e 00 f4 beq- cr7,ffc0af9c <_Objects_Extend_information+0x1bc> */ /* * Up the block count and maximum */ block_count++; ffc0aeac: 3a f6 00 01 addi r23,r22,1 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc0aeb0: 1c 77 00 03 mulli r3,r23,3 ((maximum + minimum_index) * sizeof(Objects_Control *)); ffc0aeb4: 7c 7b 1a 14 add r3,r27,r3 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc0aeb8: 7c 63 e2 14 add r3,r3,r28 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); ffc0aebc: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0aec0: 48 00 2b 35 bl ffc0d9f4 <_Workspace_Allocate> if ( !object_blocks ) { ffc0aec4: 7c 78 1b 79 mr. r24,r3 ffc0aec8: 41 82 02 18 beq- ffc0b0e0 <_Objects_Extend_information+0x300> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0aecc: a0 1f 00 10 lhz r0,16(r31) } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( ffc0aed0: 56 f7 10 3a rlwinm r23,r23,2,0,29 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc0aed4: 7f 38 ba 14 add r25,r24,r23 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0aed8: 7f 9c 00 40 cmplw cr7,r28,r0 ffc0aedc: 7e f9 ba 14 add r23,r25,r23 ffc0aee0: 41 9c 01 8c blt- cr7,ffc0b06c <_Objects_Extend_information+0x28c> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0aee4: 2f 9c 00 00 cmpwi cr7,r28,0 local_table[ index ] = NULL; ffc0aee8: 7f 89 03 a6 mtctr r28 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0aeec: 39 37 ff fc addi r9,r23,-4 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; ffc0aef0: 38 00 00 00 li r0,0 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0aef4: 41 9e 00 0c beq- cr7,ffc0af00 <_Objects_Extend_information+0x120><== NEVER TAKEN local_table[ index ] = NULL; ffc0aef8: 94 09 00 04 stwu r0,4(r9) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0aefc: 42 00 ff fc bdnz+ ffc0aef8 <_Objects_Extend_information+0x118> ffc0af00: 56 d6 10 3a rlwinm r22,r22,2,0,29 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0af04: a1 7f 00 14 lhz r11,20(r31) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0af08: 38 00 00 00 li r0,0 ffc0af0c: 7c 18 b1 2e stwx r0,r24,r22 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0af10: 7d 7e 5a 14 add r11,r30,r11 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0af14: 7f 9e 58 40 cmplw cr7,r30,r11 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; ffc0af18: 7c 19 b1 2e stwx r0,r25,r22 for ( index=index_base ; ffc0af1c: 40 9c 00 30 bge- cr7,ffc0af4c <_Objects_Extend_information+0x16c><== NEVER TAKEN ffc0af20: 38 1e 00 01 addi r0,r30,1 ffc0af24: 7f 80 58 40 cmplw cr7,r0,r11 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc0af28: 57 c9 10 3a rlwinm r9,r30,2,0,29 ffc0af2c: 39 29 ff fc addi r9,r9,-4 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0af30: 7d 7e 58 50 subf r11,r30,r11 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0af34: 7d 29 ba 14 add r9,r9,r23 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0af38: 7d 69 03 a6 mtctr r11 ffc0af3c: 38 00 00 00 li r0,0 ffc0af40: 41 9d 01 ac bgt- cr7,ffc0b0ec <_Objects_Extend_information+0x30c><== NEVER TAKEN ffc0af44: 94 09 00 04 stwu r0,4(r9) * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0af48: 42 00 ff fc bdnz+ ffc0af44 <_Objects_Extend_information+0x164> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0af4c: 7c 00 00 a6 mfmsr r0 ffc0af50: 7d 30 42 a6 mfsprg r9,0 ffc0af54: 7c 09 48 78 andc r9,r0,r9 ffc0af58: 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) | ffc0af5c: 81 7f 00 00 lwz r11,0(r31) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; ffc0af60: 57 7b 04 3e clrlwi r27,r27,16 information->maximum_id = _Objects_Build_id( ffc0af64: a1 3f 00 04 lhz r9,4(r31) ffc0af68: 55 6b c0 0e rlwinm r11,r11,24,0,7 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; ffc0af6c: 80 7f 00 34 lwz r3,52(r31) ffc0af70: 65 6b 00 01 oris r11,r11,1 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; ffc0af74: 93 3f 00 30 stw r25,48(r31) (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0af78: 55 29 d8 08 rlwinm r9,r9,27,0,4 ffc0af7c: 7d 69 4b 78 or r9,r11,r9 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; ffc0af80: 93 1f 00 34 stw r24,52(r31) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0af84: 7d 29 db 78 or r9,r9,r27 information->inactive_per_block = inactive_per_block; information->local_table = local_table; ffc0af88: 92 ff 00 1c stw r23,28(r31) information->maximum = (Objects_Maximum) maximum; ffc0af8c: b3 7f 00 10 sth r27,16(r31) information->maximum_id = _Objects_Build_id( ffc0af90: 91 3f 00 0c stw r9,12(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0af94: 7c 00 01 24 mtmsr r0 information->maximum ); _ISR_Enable( level ); _Workspace_Free( old_tables ); ffc0af98: 48 00 2a 91 bl ffc0da28 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0af9c: 81 3f 00 34 lwz r9,52(r31) ffc0afa0: 57 bd 10 3a rlwinm r29,r29,2,0,29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0afa4: a0 bf 00 14 lhz r5,20(r31) ffc0afa8: 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; ffc0afac: 7f 49 e9 2e stwx r26,r9,r29 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0afb0: 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( ffc0afb4: 81 3f 00 34 lwz r9,52(r31) ffc0afb8: 80 df 00 18 lwz r6,24(r31) ffc0afbc: 7c 89 e8 2e lwzx r4,r9,r29 ffc0afc0: 48 00 51 29 bl ffc100e8 <_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 ) { ffc0afc4: 48 00 00 2c b ffc0aff0 <_Objects_Extend_information+0x210> ffc0afc8: 81 7f 00 00 lwz r11,0(r31) the_object->id = _Objects_Build_id( ffc0afcc: a0 1f 00 04 lhz r0,4(r31) ffc0afd0: 55 6b c0 0e rlwinm r11,r11,24,0,7 ffc0afd4: 65 6b 00 01 oris r11,r11,1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0afd8: 54 00 d8 08 rlwinm r0,r0,27,0,4 ffc0afdc: 7d 60 03 78 or r0,r11,r0 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0afe0: 7c 00 f3 78 or r0,r0,r30 ffc0afe4: 90 09 00 08 stw r0,8(r9) index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; ffc0afe8: 3b de 00 01 addi r30,r30,1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0afec: 4b ff f1 09 bl ffc0a0f4 <_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 ) { ffc0aff0: 38 61 00 08 addi r3,r1,8 ffc0aff4: 4b ff f1 59 bl ffc0a14c <_Chain_Get> ffc0aff8: 7c 69 1b 79 mr. r9,r3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0affc: 7f 83 e3 78 mr r3,r28 ffc0b000: 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 ) { ffc0b004: 40 82 ff c4 bne+ ffc0afc8 <_Objects_Extend_information+0x1e8> index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0b008: a1 3f 00 2c lhz r9,44(r31) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0b00c: a0 1f 00 14 lhz r0,20(r31) ffc0b010: 81 7f 00 30 lwz r11,48(r31) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0b014: 7d 20 4a 14 add r9,r0,r9 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0b018: 7c 0b e9 2e stwx r0,r11,r29 information->inactive = ffc0b01c: b1 3f 00 2c sth r9,44(r31) (Objects_Maximum)(information->inactive + information->allocation_size); } ffc0b020: 80 01 00 44 lwz r0,68(r1) ffc0b024: 82 c1 00 18 lwz r22,24(r1) ffc0b028: 7c 08 03 a6 mtlr r0 ffc0b02c: 82 e1 00 1c lwz r23,28(r1) ffc0b030: 83 01 00 20 lwz r24,32(r1) ffc0b034: 83 21 00 24 lwz r25,36(r1) ffc0b038: 83 41 00 28 lwz r26,40(r1) ffc0b03c: 83 61 00 2c lwz r27,44(r1) ffc0b040: 83 81 00 30 lwz r28,48(r1) ffc0b044: 83 a1 00 34 lwz r29,52(r1) ffc0b048: 83 c1 00 38 lwz r30,56(r1) ffc0b04c: 83 e1 00 3c lwz r31,60(r1) ffc0b050: 38 21 00 40 addi r1,r1,64 ffc0b054: 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; ffc0b058: 3b 20 00 00 li r25,0 ffc0b05c: 4b ff fe 1c b ffc0ae78 <_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 ); ffc0b060: 48 00 29 f5 bl ffc0da54 <_Workspace_Allocate_or_fatal_error> ffc0b064: 7c 7a 1b 78 mr r26,r3 ffc0b068: 4b ff fe 3c b ffc0aea4 <_Objects_Extend_information+0xc4> * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); ffc0b06c: 56 d6 10 3a rlwinm r22,r22,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, ffc0b070: 80 9f 00 34 lwz r4,52(r31) ffc0b074: 7e c5 b3 78 mr r5,r22 ffc0b078: 48 00 87 25 bl ffc1379c information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, ffc0b07c: 80 9f 00 30 lwz r4,48(r31) ffc0b080: 7e c5 b3 78 mr r5,r22 ffc0b084: 7f 23 cb 78 mr r3,r25 ffc0b088: 48 00 87 15 bl ffc1379c information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc0b08c: 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, ffc0b090: 80 9f 00 1c lwz r4,28(r31) ffc0b094: 7e e3 bb 78 mr r3,r23 information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc0b098: 7c bc 2a 14 add r5,r28,r5 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0b09c: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0b0a0: 48 00 86 fd bl ffc1379c ffc0b0a4: 4b ff fe 60 b ffc0af04 <_Objects_Extend_information+0x124> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0b0a8: a1 43 00 14 lhz r10,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 ); ffc0b0ac: 7f 9e e3 78 mr r30,r28 /* * 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; ffc0b0b0: 3b 20 00 01 li r25,1 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0b0b4: 3b a0 00 00 li r29,0 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; ffc0b0b8: 3a c0 00 00 li r22,0 ffc0b0bc: 4b ff fd bc b ffc0ae78 <_Objects_Extend_information+0x98> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc0b0c0: 7d 6a 5b 78 mr r10,r11 <== 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 ); ffc0b0c4: 7f 9e e3 78 mr r30,r28 <== 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; ffc0b0c8: 3b 20 00 01 li r25,1 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0b0cc: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc0b0d0: 4b ff fd a8 b ffc0ae78 <_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; ffc0b0d4: 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; ffc0b0d8: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc0b0dc: 4b ff fd 9c b ffc0ae78 <_Objects_Extend_information+0x98><== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); ffc0b0e0: 7f 43 d3 78 mr r3,r26 ffc0b0e4: 48 00 29 45 bl ffc0da28 <_Workspace_Free> return; ffc0b0e8: 4b ff ff 38 b ffc0b020 <_Objects_Extend_information+0x240> ffc0b0ec: 39 60 00 01 li r11,1 <== NOT EXECUTED ffc0b0f0: 7d 69 03 a6 mtctr r11 <== NOT EXECUTED ffc0b0f4: 4b ff fe 50 b ffc0af44 <_Objects_Extend_information+0x164><== NOT EXECUTED =============================================================================== ffc0b1e4 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0b1e4: 94 21 ff e8 stwu r1,-24(r1) ffc0b1e8: 7c 08 02 a6 mflr r0 ffc0b1ec: 93 c1 00 10 stw r30,16(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0b1f0: 7c 9e 23 79 mr. r30,r4 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0b1f4: 93 a1 00 0c stw r29,12(r1) ffc0b1f8: 7c 7d 1b 78 mr r29,r3 ffc0b1fc: 93 e1 00 14 stw r31,20(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; ffc0b200: 3b e0 00 00 li r31,0 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0b204: 90 01 00 1c stw r0,28(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0b208: 41 82 00 4c beq- ffc0b254 <_Objects_Get_information+0x70> /* * 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 ); ffc0b20c: 48 00 54 fd bl ffc10708 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) ffc0b210: 2c 03 00 00 cmpwi r3,0 ffc0b214: 41 82 00 40 beq- ffc0b254 <_Objects_Get_information+0x70> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) ffc0b218: 7f 83 f0 40 cmplw cr7,r3,r30 ffc0b21c: 41 9c 00 38 blt- cr7,ffc0b254 <_Objects_Get_information+0x70> return NULL; if ( !_Objects_Information_table[ the_api ] ) ffc0b220: 3d 20 00 00 lis r9,0 ffc0b224: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc0b228: 39 29 2b e0 addi r9,r9,11232 ffc0b22c: 7d 29 e8 2e lwzx r9,r9,r29 ffc0b230: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b234: 41 9e 00 20 beq- cr7,ffc0b254 <_Objects_Get_information+0x70><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; ffc0b238: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0b23c: 7f e9 f0 2e lwzx r31,r9,r30 if ( !info ) ffc0b240: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0b244: 41 9e 00 10 beq- cr7,ffc0b254 <_Objects_Get_information+0x70><== 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 ) ffc0b248: a0 1f 00 10 lhz r0,16(r31) ffc0b24c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b250: 41 9e 00 24 beq- cr7,ffc0b274 <_Objects_Get_information+0x90> return NULL; #endif return info; } ffc0b254: 80 01 00 1c lwz r0,28(r1) ffc0b258: 7f e3 fb 78 mr r3,r31 ffc0b25c: 83 a1 00 0c lwz r29,12(r1) ffc0b260: 7c 08 03 a6 mtlr r0 ffc0b264: 83 c1 00 10 lwz r30,16(r1) ffc0b268: 83 e1 00 14 lwz r31,20(r1) ffc0b26c: 38 21 00 18 addi r1,r1,24 ffc0b270: 4e 80 00 20 blr * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) return NULL; ffc0b274: 3b e0 00 00 li r31,0 ffc0b278: 4b ff ff dc b ffc0b254 <_Objects_Get_information+0x70> =============================================================================== ffc0ceb0 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc0ceb0: 94 21 ff d8 stwu r1,-40(r1) ffc0ceb4: 7c 08 02 a6 mflr r0 ffc0ceb8: 93 c1 00 20 stw r30,32(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc0cebc: 7c 9e 23 79 mr. r30,r4 char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc0cec0: 93 e1 00 24 stw r31,36(r1) ffc0cec4: 7c bf 2b 78 mr r31,r5 ffc0cec8: 90 01 00 2c stw r0,44(r1) ffc0cecc: 93 a1 00 1c stw r29,28(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc0ced0: 41 82 00 f8 beq- ffc0cfc8 <_Objects_Get_name_as_string+0x118> return NULL; if ( name == NULL ) ffc0ced4: 2f 85 00 00 cmpwi cr7,r5,0 ffc0ced8: 41 9e 00 c0 beq- cr7,ffc0cf98 <_Objects_Get_name_as_string+0xe8> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0cedc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cee0: 7c 7d 1b 78 mr r29,r3 ffc0cee4: 41 9e 00 d4 beq- cr7,ffc0cfb8 <_Objects_Get_name_as_string+0x108> information = _Objects_Get_information_id( tmpId ); ffc0cee8: 7f a3 eb 78 mr r3,r29 ffc0ceec: 4b ff fe 91 bl ffc0cd7c <_Objects_Get_information_id> if ( !information ) ffc0cef0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cef4: 41 9e 00 d4 beq- cr7,ffc0cfc8 <_Objects_Get_name_as_string+0x118> return NULL; the_object = _Objects_Get( information, tmpId, &location ); ffc0cef8: 7f a4 eb 78 mr r4,r29 ffc0cefc: 38 a1 00 08 addi r5,r1,8 ffc0cf00: 48 00 00 ed bl ffc0cfec <_Objects_Get> switch ( location ) { ffc0cf04: 80 01 00 08 lwz r0,8(r1) ffc0cf08: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cf0c: 40 9e 00 bc bne- cr7,ffc0cfc8 <_Objects_Get_name_as_string+0x118> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0cf10: 34 fe ff ff addic. r7,r30,-1 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; ffc0cf14: 81 63 00 0c lwz r11,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'; ffc0cf18: 98 01 00 10 stb r0,16(r1) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0cf1c: 7f e9 fb 78 mr r9,r31 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc0cf20: 55 60 46 3e rlwinm r0,r11,8,24,31 lname[ 1 ] = (u32_name >> 16) & 0xff; ffc0cf24: 55 68 84 3e rlwinm r8,r11,16,16,31 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc0cf28: 98 01 00 0c stb r0,12(r1) lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; ffc0cf2c: 55 6a c2 3e rlwinm r10,r11,24,8,31 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0cf30: 7c e9 03 a6 mtctr r7 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; ffc0cf34: 99 01 00 0d stb r8,13(r1) lname[ 2 ] = (u32_name >> 8) & 0xff; ffc0cf38: 99 41 00 0e stb r10,14(r1) lname[ 3 ] = (u32_name >> 0) & 0xff; ffc0cf3c: 99 61 00 0f stb r11,15(r1) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0cf40: 41 82 00 4c beq- ffc0cf8c <_Objects_Get_name_as_string+0xdc><== NEVER TAKEN ffc0cf44: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cf48: 41 9e 00 44 beq- cr7,ffc0cf8c <_Objects_Get_name_as_string+0xdc> ffc0cf4c: 3d 00 00 00 lis r8,0 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'; s = lname; ffc0cf50: 39 41 00 0c addi r10,r1,12 ffc0cf54: 39 08 27 ac addi r8,r8,10156 ffc0cf58: 48 00 00 10 b ffc0cf68 <_Objects_Get_name_as_string+0xb8> } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0cf5c: 8c 0a 00 01 lbzu r0,1(r10) ffc0cf60: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cf64: 41 9e 00 28 beq- cr7,ffc0cf8c <_Objects_Get_name_as_string+0xdc> *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc0cf68: 81 68 00 00 lwz r11,0(r8) ffc0cf6c: 7d 6b 02 14 add r11,r11,r0 ffc0cf70: 89 6b 00 01 lbz r11,1(r11) ffc0cf74: 71 67 00 97 andi. r7,r11,151 ffc0cf78: 40 82 00 08 bne- ffc0cf80 <_Objects_Get_name_as_string+0xd0> ffc0cf7c: 38 00 00 2a li r0,42 ffc0cf80: 98 09 00 00 stb r0,0(r9) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0cf84: 39 29 00 01 addi r9,r9,1 ffc0cf88: 42 00 ff d4 bdnz+ ffc0cf5c <_Objects_Get_name_as_string+0xac> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; ffc0cf8c: 38 00 00 00 li r0,0 ffc0cf90: 98 09 00 00 stb r0,0(r9) _Thread_Enable_dispatch(); ffc0cf94: 48 00 10 a1 bl ffc0e034 <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } ffc0cf98: 80 01 00 2c lwz r0,44(r1) ffc0cf9c: 7f e3 fb 78 mr r3,r31 ffc0cfa0: 83 a1 00 1c lwz r29,28(r1) ffc0cfa4: 7c 08 03 a6 mtlr r0 ffc0cfa8: 83 c1 00 20 lwz r30,32(r1) ffc0cfac: 83 e1 00 24 lwz r31,36(r1) ffc0cfb0: 38 21 00 28 addi r1,r1,40 ffc0cfb4: 4e 80 00 20 blr return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0cfb8: 3d 20 00 00 lis r9,0 ffc0cfbc: 81 29 32 24 lwz r9,12836(r9) ffc0cfc0: 83 a9 00 08 lwz r29,8(r9) ffc0cfc4: 4b ff ff 24 b ffc0cee8 <_Objects_Get_name_as_string+0x38> _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } ffc0cfc8: 80 01 00 2c lwz r0,44(r1) #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; ffc0cfcc: 3b e0 00 00 li r31,0 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } ffc0cfd0: 7f e3 fb 78 mr r3,r31 ffc0cfd4: 83 a1 00 1c lwz r29,28(r1) ffc0cfd8: 7c 08 03 a6 mtlr r0 ffc0cfdc: 83 c1 00 20 lwz r30,32(r1) ffc0cfe0: 83 e1 00 24 lwz r31,36(r1) ffc0cfe4: 38 21 00 28 addi r1,r1,40 ffc0cfe8: 4e 80 00 20 blr =============================================================================== ffc0ae2c <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { ffc0ae2c: 94 21 ff e8 stwu r1,-24(r1) ffc0ae30: 7c 08 02 a6 mflr r0 ffc0ae34: 93 c1 00 10 stw r30,16(r1) Objects_Control *object; Objects_Id next_id; if ( !information ) ffc0ae38: 7c 7e 1b 79 mr. r30,r3 return NULL; ffc0ae3c: 38 60 00 00 li r3,0 Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { ffc0ae40: 93 81 00 08 stw r28,8(r1) ffc0ae44: 7c dc 33 78 mr r28,r6 ffc0ae48: 93 e1 00 14 stw r31,20(r1) ffc0ae4c: 7c bf 2b 78 mr r31,r5 ffc0ae50: 90 01 00 1c stw r0,28(r1) ffc0ae54: 93 a1 00 0c stw r29,12(r1) Objects_Control *object; Objects_Id next_id; if ( !information ) ffc0ae58: 41 82 00 58 beq- ffc0aeb0 <_Objects_Get_next+0x84> return NULL; if ( !location_p ) ffc0ae5c: 2f 85 00 00 cmpwi cr7,r5,0 ffc0ae60: 41 9e 00 50 beq- cr7,ffc0aeb0 <_Objects_Get_next+0x84> return NULL; if ( !next_id_p ) ffc0ae64: 2f 86 00 00 cmpwi cr7,r6,0 ffc0ae68: 41 9e 00 48 beq- cr7,ffc0aeb0 <_Objects_Get_next+0x84> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) ffc0ae6c: 54 80 04 3e clrlwi r0,r4,16 ffc0ae70: 2f 80 00 00 cmpwi cr7,r0,0 next_id = information->minimum_id; else next_id = id; ffc0ae74: 7c 9d 23 78 mr r29,r4 return NULL; if ( !next_id_p ) return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) ffc0ae78: 41 9e 00 58 beq- cr7,ffc0aed0 <_Objects_Get_next+0xa4> else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0ae7c: a1 3e 00 10 lhz r9,16(r30) ffc0ae80: 57 a0 04 3e clrlwi r0,r29,16 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0ae84: 7f a4 eb 78 mr r4,r29 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0ae88: 7f 89 00 40 cmplw cr7,r9,r0 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0ae8c: 7f c3 f3 78 mr r3,r30 ffc0ae90: 7f e5 fb 78 mr r5,r31 next_id++; ffc0ae94: 3b bd 00 01 addi r29,r29,1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0ae98: 41 9c 00 5c blt- cr7,ffc0aef4 <_Objects_Get_next+0xc8> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0ae9c: 48 00 00 8d bl ffc0af28 <_Objects_Get> next_id++; } while (*location_p != OBJECTS_LOCAL); ffc0aea0: 80 1f 00 00 lwz r0,0(r31) ffc0aea4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0aea8: 40 9e ff d4 bne+ cr7,ffc0ae7c <_Objects_Get_next+0x50> *next_id_p = next_id; ffc0aeac: 93 bc 00 00 stw r29,0(r28) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } ffc0aeb0: 80 01 00 1c lwz r0,28(r1) ffc0aeb4: 83 81 00 08 lwz r28,8(r1) ffc0aeb8: 7c 08 03 a6 mtlr r0 ffc0aebc: 83 a1 00 0c lwz r29,12(r1) ffc0aec0: 83 c1 00 10 lwz r30,16(r1) ffc0aec4: 83 e1 00 14 lwz r31,20(r1) ffc0aec8: 38 21 00 18 addi r1,r1,24 ffc0aecc: 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; ffc0aed0: 83 be 00 08 lwz r29,8(r30) *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0aed4: 7f c3 f3 78 mr r3,r30 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0aed8: a1 3e 00 10 lhz r9,16(r30) *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0aedc: 7f e5 fb 78 mr r5,r31 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0aee0: 57 a0 04 3e clrlwi r0,r29,16 ffc0aee4: 7f 89 00 40 cmplw cr7,r9,r0 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc0aee8: 7f a4 eb 78 mr r4,r29 next_id++; ffc0aeec: 3b bd 00 01 addi r29,r29,1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc0aef0: 40 9c ff ac bge+ cr7,ffc0ae9c <_Objects_Get_next+0x70> <== ALWAYS TAKEN { *location_p = OBJECTS_ERROR; ffc0aef4: 38 00 00 01 li r0,1 return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } ffc0aef8: 83 a1 00 0c lwz r29,12(r1) do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; ffc0aefc: 90 1f 00 00 stw r0,0(r31) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; ffc0af00: 38 00 ff ff li r0,-1 return 0; ffc0af04: 38 60 00 00 li r3,0 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; ffc0af08: 90 1c 00 00 stw r0,0(r28) return 0; } ffc0af0c: 80 01 00 1c lwz r0,28(r1) ffc0af10: 83 81 00 08 lwz r28,8(r1) ffc0af14: 7c 08 03 a6 mtlr r0 ffc0af18: 83 c1 00 10 lwz r30,16(r1) ffc0af1c: 83 e1 00 14 lwz r31,20(r1) ffc0af20: 38 21 00 18 addi r1,r1,24 ffc0af24: 4e 80 00 20 blr =============================================================================== ffc0bdfc <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0bdfc: 94 21 ff e0 stwu r1,-32(r1) ffc0be00: 7c 08 02 a6 mflr r0 ffc0be04: 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; ffc0be08: 7c 60 1b 79 mr. r0,r3 */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0be0c: 93 c1 00 18 stw r30,24(r1) ffc0be10: 7c 9e 23 78 mr r30,r4 ffc0be14: 93 e1 00 1c stw r31,28(r1) /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0be18: 40 82 00 10 bne- ffc0be28 <_Objects_Id_to_name+0x2c> ffc0be1c: 3d 20 00 00 lis r9,0 ffc0be20: 81 29 2e 24 lwz r9,11812(r9) ffc0be24: 80 09 00 08 lwz r0,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); ffc0be28: 54 09 47 7e rlwinm r9,r0,8,29,31 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) ffc0be2c: 39 69 ff ff addi r11,r9,-1 ffc0be30: 2b 8b 00 02 cmplwi cr7,r11,2 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; ffc0be34: 3b e0 00 03 li r31,3 ffc0be38: 41 9d 00 50 bgt- cr7,ffc0be88 <_Objects_Id_to_name+0x8c> if ( !_Objects_Information_table[ the_api ] ) ffc0be3c: 3d 60 00 00 lis r11,0 ffc0be40: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0be44: 39 6b 2c 40 addi r11,r11,11328 ffc0be48: 7d 2b 48 2e lwzx r9,r11,r9 ffc0be4c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0be50: 41 9e 00 38 beq- cr7,ffc0be88 <_Objects_Id_to_name+0x8c> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; ffc0be54: 54 0b 3e 7a rlwinm r11,r0,7,25,29 ffc0be58: 7c 69 58 2e lwzx r3,r9,r11 if ( !information ) ffc0be5c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0be60: 41 9e 00 28 beq- cr7,ffc0be88 <_Objects_Id_to_name+0x8c><== 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 ); ffc0be64: 7c 04 03 78 mr r4,r0 ffc0be68: 38 a1 00 08 addi r5,r1,8 ffc0be6c: 4b ff fe f1 bl ffc0bd5c <_Objects_Get> if ( !the_object ) ffc0be70: 2c 03 00 00 cmpwi r3,0 ffc0be74: 41 82 00 14 beq- ffc0be88 <_Objects_Id_to_name+0x8c> return OBJECTS_INVALID_ID; *name = the_object->name; ffc0be78: 80 03 00 0c lwz r0,12(r3) _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc0be7c: 3b e0 00 00 li r31,0 the_object = _Objects_Get( information, tmpId, &ignored_location ); if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; ffc0be80: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc0be84: 48 00 0f c9 bl ffc0ce4c <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc0be88: 80 01 00 24 lwz r0,36(r1) ffc0be8c: 7f e3 fb 78 mr r3,r31 ffc0be90: 83 c1 00 18 lwz r30,24(r1) ffc0be94: 7c 08 03 a6 mtlr r0 ffc0be98: 83 e1 00 1c lwz r31,28(r1) ffc0be9c: 38 21 00 20 addi r1,r1,32 ffc0bea0: 4e 80 00 20 blr =============================================================================== ffc0b4fc <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b4fc: 94 21 ff e8 stwu r1,-24(r1) ffc0b500: 7c 08 02 a6 mflr r0 ffc0b504: 90 01 00 1c stw r0,28(r1) ffc0b508: 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) / ffc0b50c: a1 43 00 10 lhz r10,16(r3) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); ffc0b510: a3 e3 00 0a lhz r31,10(r3) block_count = (information->maximum - index_base) / ffc0b514: a0 03 00 14 lhz r0,20(r3) ffc0b518: 7d 5f 50 50 subf r10,r31,r10 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b51c: 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) / ffc0b520: 7d 4a 03 96 divwu r10,r10,r0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b524: 93 a1 00 0c stw r29,12(r1) ffc0b528: 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++ ) { ffc0b52c: 2f 8a 00 00 cmpwi cr7,r10,0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0b530: 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++ ) { ffc0b534: 41 9e 00 3c beq- cr7,ffc0b570 <_Objects_Shrink_information+0x74><== NEVER TAKEN if ( information->inactive_per_block[ block ] == ffc0b538: 81 63 00 30 lwz r11,48(r3) ffc0b53c: 81 2b 00 00 lwz r9,0(r11) ffc0b540: 7f 80 48 00 cmpw cr7,r0,r9 ffc0b544: 41 9e 00 4c beq- cr7,ffc0b590 <_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++ ) { ffc0b548: 39 20 00 00 li r9,0 ffc0b54c: 7d 49 03 a6 mtctr r10 ffc0b550: 48 00 00 18 b ffc0b568 <_Objects_Shrink_information+0x6c> if ( information->inactive_per_block[ block ] == ffc0b554: 85 4b 00 04 lwzu r10,4(r11) information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; ffc0b558: 7f ff 02 14 add r31,r31,r0 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 ] == ffc0b55c: 55 3d 10 3a rlwinm r29,r9,2,0,29 ffc0b560: 7f 80 50 00 cmpw cr7,r0,r10 ffc0b564: 41 9e 00 30 beq- cr7,ffc0b594 <_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++ ) { ffc0b568: 39 29 00 01 addi r9,r9,1 ffc0b56c: 42 00 ff e8 bdnz+ ffc0b554 <_Objects_Shrink_information+0x58> return; } index_base += information->allocation_size; } } ffc0b570: 80 01 00 1c lwz r0,28(r1) ffc0b574: 83 81 00 08 lwz r28,8(r1) ffc0b578: 7c 08 03 a6 mtlr r0 ffc0b57c: 83 a1 00 0c lwz r29,12(r1) ffc0b580: 83 c1 00 10 lwz r30,16(r1) ffc0b584: 83 e1 00 14 lwz r31,20(r1) ffc0b588: 38 21 00 18 addi r1,r1,24 ffc0b58c: 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 ] == ffc0b590: 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; ffc0b594: 80 7c 00 20 lwz r3,32(r28) ffc0b598: 48 00 00 10 b ffc0b5a8 <_Objects_Shrink_information+0xac> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0b59c: 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; ffc0b5a0: 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 ); ffc0b5a4: 41 9e 00 34 beq- cr7,ffc0b5d8 <_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 ); ffc0b5a8: a0 03 00 0a lhz r0,10(r3) /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; ffc0b5ac: 83 c3 00 00 lwz r30,0(r3) if ((index >= index_base) && ffc0b5b0: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0b5b4: 41 bc ff e8 blt- cr7,ffc0b59c <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { ffc0b5b8: a1 3c 00 14 lhz r9,20(r28) ffc0b5bc: 7d 3f 4a 14 add r9,r31,r9 /* * 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) && ffc0b5c0: 7f 80 48 40 cmplw cr7,r0,r9 ffc0b5c4: 40 9c ff d8 bge+ cr7,ffc0b59c <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); ffc0b5c8: 4b ff eb 5d bl ffc0a124 <_Chain_Extract> } } while ( the_object ); ffc0b5cc: 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; ffc0b5d0: 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 ); ffc0b5d4: 40 9e ff d4 bne+ cr7,ffc0b5a8 <_Objects_Shrink_information+0xac><== ALWAYS TAKEN /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); ffc0b5d8: 81 3c 00 34 lwz r9,52(r28) ffc0b5dc: 7c 69 e8 2e lwzx r3,r9,r29 ffc0b5e0: 48 00 24 49 bl ffc0da28 <_Workspace_Free> information->object_blocks[ block ] = NULL; ffc0b5e4: 81 3c 00 34 lwz r9,52(r28) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0b5e8: a1 7c 00 2c lhz r11,44(r28) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc0b5ec: 7f c9 e9 2e stwx r30,r9,r29 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0b5f0: a0 1c 00 14 lhz r0,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; ffc0b5f4: 81 3c 00 30 lwz r9,48(r28) information->inactive -= information->allocation_size; ffc0b5f8: 7c 00 58 50 subf r0,r0,r11 return; } index_base += information->allocation_size; } } ffc0b5fc: 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; ffc0b600: 7f c9 e9 2e stwx r30,r9,r29 information->inactive -= information->allocation_size; ffc0b604: b0 1c 00 2c sth r0,44(r28) return; } index_base += information->allocation_size; } } ffc0b608: 80 01 00 1c lwz r0,28(r1) ffc0b60c: 83 81 00 08 lwz r28,8(r1) ffc0b610: 7c 08 03 a6 mtlr r0 ffc0b614: 83 a1 00 0c lwz r29,12(r1) ffc0b618: 83 c1 00 10 lwz r30,16(r1) ffc0b61c: 38 21 00 18 addi r1,r1,24 ffc0b620: 4e 80 00 20 blr =============================================================================== ffc0bcc0 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0bcc0: 94 21 ff e8 stwu r1,-24(r1) ffc0bcc4: 7c 08 02 a6 mflr r0 ffc0bcc8: 93 c1 00 10 stw r30,16(r1) RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if(!the_node) return; ffc0bccc: 7c 9e 23 79 mr. r30,r4 */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0bcd0: 93 81 00 08 stw r28,8(r1) ffc0bcd4: 7c 7c 1b 78 mr r28,r3 ffc0bcd8: 90 01 00 1c stw r0,28(r1) ffc0bcdc: 93 a1 00 0c stw r29,12(r1) ffc0bce0: 93 e1 00 14 stw r31,20(r1) RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if(!the_node) return; ffc0bce4: 41 82 01 2c beq- ffc0be10 <_RBTree_Extract_unprotected+0x150> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { ffc0bce8: 80 03 00 08 lwz r0,8(r3) ffc0bcec: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0bcf0: 41 9e 01 74 beq- cr7,ffc0be64 <_RBTree_Extract_unprotected+0x1a4> the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { ffc0bcf4: 80 1c 00 0c lwz r0,12(r28) ffc0bcf8: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0bcfc: 41 9e 01 34 beq- cr7,ffc0be30 <_RBTree_Extract_unprotected+0x170> * 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]) { ffc0bd00: 83 fe 00 04 lwz r31,4(r30) ffc0bd04: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0bd08: 41 9e 01 44 beq- cr7,ffc0be4c <_RBTree_Extract_unprotected+0x18c> ffc0bd0c: 80 1e 00 08 lwz r0,8(r30) ffc0bd10: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bd14: 40 be 00 0c bne+ cr7,ffc0bd20 <_RBTree_Extract_unprotected+0x60> ffc0bd18: 48 00 01 60 b ffc0be78 <_RBTree_Extract_unprotected+0x1b8> target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; ffc0bd1c: 7c 1f 03 78 mr r31,r0 ffc0bd20: 80 1f 00 08 lwz r0,8(r31) ffc0bd24: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bd28: 40 9e ff f4 bne+ cr7,ffc0bd1c <_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]; ffc0bd2c: 83 bf 00 04 lwz r29,4(r31) if(leaf) { ffc0bd30: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0bd34: 41 9e 01 b4 beq- cr7,ffc0bee8 <_RBTree_Extract_unprotected+0x228><== ALWAYS TAKEN leaf->parent = target->parent; ffc0bd38: 80 1f 00 00 lwz r0,0(r31) <== NOT EXECUTED ffc0bd3c: 90 1d 00 00 stw r0,0(r29) <== NOT EXECUTED } 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]; ffc0bd40: 81 7f 00 00 lwz r11,0(r31) target->parent->child[dir] = leaf; /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; ffc0bd44: 81 3e 00 00 lwz r9,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]; ffc0bd48: 80 0b 00 04 lwz r0,4(r11) 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; ffc0bd4c: 81 5f 00 10 lwz r10,16(r31) dir = target != target->parent->child[0]; ffc0bd50: 7f e0 02 78 xor r0,r31,r0 ffc0bd54: 7c 00 00 34 cntlzw r0,r0 ffc0bd58: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0bd5c: 68 00 00 01 xori r0,r0,1 target->parent->child[dir] = leaf; ffc0bd60: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0bd64: 7d 6b 02 14 add r11,r11,r0 ffc0bd68: 93 ab 00 04 stw r29,4(r11) /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; ffc0bd6c: 80 09 00 04 lwz r0,4(r9) ffc0bd70: 7f c0 02 78 xor r0,r30,r0 ffc0bd74: 7c 00 00 34 cntlzw r0,r0 ffc0bd78: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0bd7c: 68 00 00 01 xori r0,r0,1 the_node->parent->child[dir] = target; ffc0bd80: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0bd84: 7d 29 02 14 add r9,r9,r0 ffc0bd88: 93 e9 00 04 stw r31,4(r9) /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; ffc0bd8c: 80 1e 00 08 lwz r0,8(r30) ffc0bd90: 90 1f 00 08 stw r0,8(r31) if (the_node->child[RBT_RIGHT]) ffc0bd94: 81 3e 00 08 lwz r9,8(r30) ffc0bd98: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bd9c: 41 9e 00 08 beq- cr7,ffc0bda4 <_RBTree_Extract_unprotected+0xe4><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; ffc0bda0: 93 e9 00 00 stw r31,0(r9) target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; ffc0bda4: 80 1e 00 04 lwz r0,4(r30) ffc0bda8: 90 1f 00 04 stw r0,4(r31) if (the_node->child[RBT_LEFT]) ffc0bdac: 81 3e 00 04 lwz r9,4(r30) ffc0bdb0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bdb4: 41 9e 00 08 beq- cr7,ffc0bdbc <_RBTree_Extract_unprotected+0xfc> the_node->child[RBT_LEFT]->parent = target; ffc0bdb8: 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; ffc0bdbc: 81 3e 00 00 lwz r9,0(r30) target->color = the_node->color; ffc0bdc0: 80 1e 00 10 lwz r0,16(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; ffc0bdc4: 91 3f 00 00 stw r9,0(r31) target->color = the_node->color; ffc0bdc8: 90 1f 00 10 stw r0,16(r31) * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node and the child is red. Paint child black. * 3. Deleted a black node and its child is black. This requires some * care and rotations. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ ffc0bdcc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0bdd0: 40 9e 00 20 bne- cr7,ffc0bdf0 <_RBTree_Extract_unprotected+0x130> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0bdd4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0bdd8: 41 9e 00 18 beq- cr7,ffc0bdf0 <_RBTree_Extract_unprotected+0x130> ffc0bddc: 80 1d 00 10 lwz r0,16(r29) ffc0bde0: 2f 80 00 01 cmpwi cr7,r0,1 ffc0bde4: 41 9e 00 cc beq- cr7,ffc0beb0 <_RBTree_Extract_unprotected+0x1f0><== ALWAYS TAKEN if (_RBTree_Is_red(leaf)) leaf->color = RBT_BLACK; /* case 2 */ else if(leaf) _RBTree_Extract_validate_unprotected(leaf); /* case 3 */ ffc0bde8: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0bdec: 4b ff fb 9d bl ffc0b988 <_RBTree_Extract_validate_unprotected><== NOT EXECUTED /* 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; ffc0bdf0: 81 3c 00 04 lwz r9,4(r28) */ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree( RBTree_Node *node ) { node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL; ffc0bdf4: 38 00 00 00 li r0,0 ffc0bdf8: 90 1e 00 08 stw r0,8(r30) ffc0bdfc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0be00: 90 1e 00 04 stw r0,4(r30) ffc0be04: 90 1e 00 00 stw r0,0(r30) ffc0be08: 41 9e 00 08 beq- cr7,ffc0be10 <_RBTree_Extract_unprotected+0x150> ffc0be0c: 90 09 00 10 stw r0,16(r9) } ffc0be10: 80 01 00 1c lwz r0,28(r1) ffc0be14: 83 81 00 08 lwz r28,8(r1) ffc0be18: 7c 08 03 a6 mtlr r0 ffc0be1c: 83 a1 00 0c lwz r29,12(r1) ffc0be20: 83 c1 00 10 lwz r30,16(r1) ffc0be24: 83 e1 00 14 lwz r31,20(r1) ffc0be28: 38 21 00 18 addi r1,r1,24 ffc0be2c: 4e 80 00 20 blr the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) ffc0be30: 80 1e 00 04 lwz r0,4(r30) ffc0be34: 2f 80 00 00 cmpwi cr7,r0,0 ffc0be38: 41 9e 00 98 beq- cr7,ffc0bed0 <_RBTree_Extract_unprotected+0x210> the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; else { the_rbtree->first[RBT_RIGHT] = the_node->parent; if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; ffc0be3c: 90 1c 00 0c stw r0,12(r28) * 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]) { ffc0be40: 83 fe 00 04 lwz r31,4(r30) ffc0be44: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0be48: 40 9e fe c4 bne+ cr7,ffc0bd0c <_RBTree_Extract_unprotected+0x4c> * 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]; ffc0be4c: 83 be 00 08 lwz r29,8(r30) if( leaf ) { ffc0be50: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0be54: 40 be 00 28 bne+ cr7,ffc0be7c <_RBTree_Extract_unprotected+0x1bc> leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); ffc0be58: 7f c3 f3 78 mr r3,r30 ffc0be5c: 4b ff fb 2d bl ffc0b988 <_RBTree_Extract_validate_unprotected> ffc0be60: 48 00 00 24 b ffc0be84 <_RBTree_Extract_unprotected+0x1c4> if(!the_node) return; /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) ffc0be64: 80 1e 00 08 lwz r0,8(r30) ffc0be68: 2f 80 00 00 cmpwi cr7,r0,0 ffc0be6c: 41 9e 00 4c beq- cr7,ffc0beb8 <_RBTree_Extract_unprotected+0x1f8> the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; else { the_rbtree->first[RBT_LEFT] = the_node->parent; if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; ffc0be70: 90 1c 00 08 stw r0,8(r28) ffc0be74: 4b ff fe 80 b ffc0bcf4 <_RBTree_Extract_unprotected+0x34> * 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]) { ffc0be78: 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; ffc0be7c: 80 1e 00 00 lwz r0,0(r30) ffc0be80: 90 1d 00 00 stw r0,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]; ffc0be84: 81 3e 00 00 lwz r9,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; ffc0be88: 81 5e 00 10 lwz r10,16(r30) /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; ffc0be8c: 80 09 00 04 lwz r0,4(r9) ffc0be90: 7f c0 02 78 xor r0,r30,r0 ffc0be94: 7c 00 00 34 cntlzw r0,r0 ffc0be98: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0be9c: 68 00 00 01 xori r0,r0,1 the_node->parent->child[dir] = leaf; ffc0bea0: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0bea4: 7d 29 02 14 add r9,r9,r0 ffc0bea8: 93 a9 00 04 stw r29,4(r9) ffc0beac: 4b ff ff 20 b ffc0bdcc <_RBTree_Extract_unprotected+0x10c> * 3. Deleted a black node and its child is black. This requires some * care and rotations. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ if (_RBTree_Is_red(leaf)) leaf->color = RBT_BLACK; /* case 2 */ ffc0beb0: 91 5d 00 10 stw r10,16(r29) ffc0beb4: 4b ff ff 3c b ffc0bdf0 <_RBTree_Extract_unprotected+0x130> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; else { the_rbtree->first[RBT_LEFT] = the_node->parent; ffc0beb8: 81 3e 00 00 lwz r9,0(r30) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc0bebc: 7f 83 48 00 cmpw cr7,r3,r9 /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; else { the_rbtree->first[RBT_LEFT] = the_node->parent; ffc0bec0: 91 23 00 08 stw r9,8(r3) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc0bec4: 40 9e fe 30 bne+ cr7,ffc0bcf4 <_RBTree_Extract_unprotected+0x34> the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; ffc0bec8: 90 1c 00 08 stw r0,8(r28) ffc0becc: 4b ff fe 28 b ffc0bcf4 <_RBTree_Extract_unprotected+0x34> /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; else { the_rbtree->first[RBT_RIGHT] = the_node->parent; ffc0bed0: 81 3e 00 00 lwz r9,0(r30) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc0bed4: 7f 9c 48 00 cmpw cr7,r28,r9 /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; else { the_rbtree->first[RBT_RIGHT] = the_node->parent; ffc0bed8: 91 3c 00 0c stw r9,12(r28) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, ffc0bedc: 40 9e fe 24 bne+ cr7,ffc0bd00 <_RBTree_Extract_unprotected+0x40> the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; ffc0bee0: 90 1c 00 0c stw r0,12(r28) ffc0bee4: 4b ff ff 5c b ffc0be40 <_RBTree_Extract_unprotected+0x180> 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); ffc0bee8: 7f e3 fb 78 mr r3,r31 ffc0beec: 4b ff fa 9d bl ffc0b988 <_RBTree_Extract_validate_unprotected> ffc0bef0: 4b ff fe 50 b ffc0bd40 <_RBTree_Extract_unprotected+0x80> =============================================================================== ffc0b988 <_RBTree_Extract_validate_unprotected>: ) { RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; ffc0b988: 81 63 00 00 lwz r11,0(r3) if(!parent->parent) return; ffc0b98c: 80 0b 00 00 lwz r0,0(r11) ffc0b990: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b994: 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]) ffc0b998: 81 2b 00 04 lwz r9,4(r11) ffc0b99c: 2f 03 00 00 cmpwi cr6,r3,0 ffc0b9a0: 7f 83 48 00 cmpw cr7,r3,r9 ffc0b9a4: 41 9e 03 14 beq- cr7,ffc0bcb8 <_RBTree_Extract_validate_unprotected+0x330> /* sibling is black, see if both of its children are also black. */ if (sibling && !_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; ffc0b9a8: 38 a0 00 01 li r5,1 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; ffc0b9ac: 38 80 00 00 li r4,0 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0b9b0: 41 9a 00 10 beq- cr6,ffc0b9c0 <_RBTree_Extract_validate_unprotected+0x38><== NEVER TAKEN ffc0b9b4: 80 03 00 10 lwz r0,16(r3) ffc0b9b8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b9bc: 41 9e 01 44 beq- cr7,ffc0bb00 <_RBTree_Extract_validate_unprotected+0x178> 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) { ffc0b9c0: 81 4b 00 00 lwz r10,0(r11) ffc0b9c4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0b9c8: 41 9e 01 38 beq- cr7,ffc0bb00 <_RBTree_Extract_validate_unprotected+0x178> ffc0b9cc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b9d0: 41 be ff e0 beq- cr7,ffc0b9b0 <_RBTree_Extract_validate_unprotected+0x28><== NEVER TAKEN ffc0b9d4: 80 09 00 10 lwz r0,16(r9) ffc0b9d8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b9dc: 41 9e 00 78 beq- cr7,ffc0ba54 <_RBTree_Extract_validate_unprotected+0xcc> sibling = parent->child[!dir]; } /* sibling is black, see if both of its children are also black. */ if (sibling && !_RBTree_Is_red(sibling->child[RBT_RIGHT]) && ffc0b9e0: 81 49 00 08 lwz r10,8(r9) ffc0b9e4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0b9e8: 41 9e 00 10 beq- cr7,ffc0b9f8 <_RBTree_Extract_validate_unprotected+0x70> ffc0b9ec: 80 0a 00 10 lwz r0,16(r10) ffc0b9f0: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b9f4: 41 9e 01 5c beq- cr7,ffc0bb50 <_RBTree_Extract_validate_unprotected+0x1c8> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { ffc0b9f8: 81 49 00 04 lwz r10,4(r9) ffc0b9fc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0ba00: 41 9e 00 10 beq- cr7,ffc0ba10 <_RBTree_Extract_validate_unprotected+0x88> ffc0ba04: 80 0a 00 10 lwz r0,16(r10) ffc0ba08: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ba0c: 41 9e 01 44 beq- cr7,ffc0bb50 <_RBTree_Extract_validate_unprotected+0x1c8> sibling->color = RBT_RED; ffc0ba10: 90 a9 00 10 stw r5,16(r9) ffc0ba14: 80 0b 00 10 lwz r0,16(r11) ffc0ba18: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ba1c: 41 9e 00 dc beq- cr7,ffc0baf8 <_RBTree_Extract_validate_unprotected+0x170> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; ffc0ba20: 81 4b 00 00 lwz r10,0(r11) RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; ffc0ba24: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0ba28: 41 9e 00 f0 beq- cr7,ffc0bb18 <_RBTree_Extract_validate_unprotected+0x190><== NEVER TAKEN if(!(the_node->parent->parent)) return NULL; ffc0ba2c: 80 0a 00 00 lwz r0,0(r10) ffc0ba30: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ba34: 41 9e 00 f8 beq- cr7,ffc0bb2c <_RBTree_Extract_validate_unprotected+0x1a4> if(the_node == the_node->parent->child[RBT_LEFT]) ffc0ba38: 81 2a 00 04 lwz r9,4(r10) return the_node->parent->child[RBT_RIGHT]; ffc0ba3c: 7d 63 5b 78 mr r3,r11 { 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]) ffc0ba40: 7f 8b 48 00 cmpw cr7,r11,r9 ffc0ba44: 41 9e 00 fc beq- cr7,ffc0bb40 <_RBTree_Extract_validate_unprotected+0x1b8> ffc0ba48: 2f 0b 00 00 cmpwi cr6,r11,0 ffc0ba4c: 7d 4b 53 78 mr r11,r10 ffc0ba50: 4b ff ff 60 b ffc0b9b0 <_RBTree_Extract_validate_unprotected+0x28> * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; ffc0ba54: 81 0b 00 04 lwz r8,4(r11) * 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; ffc0ba58: 90 0b 00 10 stw r0,16(r11) sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; ffc0ba5c: 7c 60 42 78 xor r0,r3,r8 ffc0ba60: 7c 00 00 34 cntlzw r0,r0 * 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; ffc0ba64: 90 89 00 10 stw r4,16(r9) dir = the_node != parent->child[0]; ffc0ba68: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0ba6c: 68 00 00 01 xori r0,r0,1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; ffc0ba70: 20 e0 00 01 subfic r7,r0,1 ffc0ba74: 54 e7 10 3a rlwinm r7,r7,2,0,29 ffc0ba78: 7c eb 3a 14 add r7,r11,r7 ffc0ba7c: 81 07 00 04 lwz r8,4(r7) ffc0ba80: 2f 88 00 00 cmpwi cr7,r8,0 ffc0ba84: 41 9e 00 58 beq- cr7,ffc0badc <_RBTree_Extract_validate_unprotected+0x154><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc0ba88: 54 09 10 3a rlwinm r9,r0,2,0,29 ffc0ba8c: 7c c8 4a 14 add r6,r8,r9 ffc0ba90: 81 86 00 04 lwz r12,4(r6) ffc0ba94: 91 87 00 04 stw r12,4(r7) if (c->child[dir]) ffc0ba98: 80 e6 00 04 lwz r7,4(r6) ffc0ba9c: 2f 87 00 00 cmpwi cr7,r7,0 ffc0baa0: 41 9e 00 0c beq- cr7,ffc0baac <_RBTree_Extract_validate_unprotected+0x124><== NEVER TAKEN c->child[dir]->parent = the_node; ffc0baa4: 91 67 00 00 stw r11,0(r7) ffc0baa8: 81 4b 00 00 lwz r10,0(r11) c->child[dir] = the_node; ffc0baac: 7d 28 4a 14 add r9,r8,r9 the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; ffc0bab0: 91 48 00 00 stw r10,0(r8) the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0bab4: 91 69 00 04 stw r11,4(r9) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0bab8: 81 2a 00 04 lwz r9,4(r10) c->parent = the_node->parent; the_node->parent = c; ffc0babc: 91 0b 00 00 stw r8,0(r11) 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; ffc0bac0: 7d 69 4a 78 xor r9,r11,r9 ffc0bac4: 7d 29 00 34 cntlzw r9,r9 ffc0bac8: 55 29 d9 7e rlwinm r9,r9,27,5,31 ffc0bacc: 69 29 00 01 xori r9,r9,1 ffc0bad0: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0bad4: 7d 4a 4a 14 add r10,r10,r9 ffc0bad8: 91 0a 00 04 stw r8,4(r10) _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; ffc0badc: 68 00 00 01 xori r0,r0,1 ffc0bae0: 54 09 10 3a rlwinm r9,r0,2,0,29 ffc0bae4: 7d 2b 4a 14 add r9,r11,r9 ffc0bae8: 81 29 00 04 lwz r9,4(r9) } /* sibling is black, see if both of its children are also black. */ if (sibling && ffc0baec: 2f 89 00 00 cmpwi cr7,r9,0 ffc0baf0: 40 9e fe f0 bne+ cr7,ffc0b9e0 <_RBTree_Extract_validate_unprotected+0x58><== ALWAYS TAKEN ffc0baf4: 4b ff fe bc b ffc0b9b0 <_RBTree_Extract_validate_unprotected+0x28><== NOT EXECUTED !_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; ffc0baf8: 38 00 00 00 li r0,0 ffc0bafc: 90 0b 00 10 stw r0,16(r11) sibling->child[!dir]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; ffc0bb00: 81 23 00 00 lwz r9,0(r3) ffc0bb04: 80 09 00 00 lwz r0,0(r9) ffc0bb08: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bb0c: 4c be 00 20 bnelr+ cr7 ffc0bb10: 90 03 00 10 stw r0,16(r3) ffc0bb14: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; ffc0bb18: 7d 63 5b 78 mr r3,r11 <== NOT EXECUTED ffc0bb1c: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc0bb20: 39 60 00 00 li r11,0 <== NOT EXECUTED ffc0bb24: 2f 03 00 00 cmpwi cr6,r3,0 <== NOT EXECUTED ffc0bb28: 4b ff fe 88 b ffc0b9b0 <_RBTree_Extract_validate_unprotected+0x28><== NOT EXECUTED if(!(the_node->parent->parent)) return NULL; ffc0bb2c: 7d 63 5b 78 mr r3,r11 ffc0bb30: 39 20 00 00 li r9,0 ffc0bb34: 7d 4b 53 78 mr r11,r10 ffc0bb38: 2f 03 00 00 cmpwi cr6,r3,0 ffc0bb3c: 4b ff fe 74 b ffc0b9b0 <_RBTree_Extract_validate_unprotected+0x28> if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; ffc0bb40: 81 2a 00 08 lwz r9,8(r10) ffc0bb44: 7d 4b 53 78 mr r11,r10 ffc0bb48: 2f 03 00 00 cmpwi cr6,r3,0 ffc0bb4c: 4b ff fe 64 b ffc0b9b0 <_RBTree_Extract_validate_unprotected+0x28> * 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]; ffc0bb50: 80 0b 00 04 lwz r0,4(r11) ffc0bb54: 7c 60 02 78 xor r0,r3,r0 ffc0bb58: 7c 00 00 34 cntlzw r0,r0 ffc0bb5c: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0bb60: 68 00 00 01 xori r0,r0,1 if (!_RBTree_Is_red(sibling->child[!dir])) { ffc0bb64: 68 07 00 01 xori r7,r0,1 ffc0bb68: 54 e7 10 3a rlwinm r7,r7,2,0,29 ffc0bb6c: 7d 49 3a 14 add r10,r9,r7 ffc0bb70: 81 0a 00 04 lwz r8,4(r10) */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0bb74: 2f 88 00 00 cmpwi cr7,r8,0 ffc0bb78: 41 9e 00 10 beq- cr7,ffc0bb88 <_RBTree_Extract_validate_unprotected+0x200> ffc0bb7c: 81 48 00 10 lwz r10,16(r8) ffc0bb80: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0bb84: 41 9e 00 a0 beq- cr7,ffc0bc24 <_RBTree_Extract_validate_unprotected+0x29c> sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); ffc0bb88: 68 06 00 01 xori r6,r0,1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; ffc0bb8c: 21 06 00 01 subfic r8,r6,1 ffc0bb90: 55 08 10 3a rlwinm r8,r8,2,0,29 ffc0bb94: 7d 09 42 14 add r8,r9,r8 ffc0bb98: 81 48 00 04 lwz r10,4(r8) * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[!dir])) { sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; ffc0bb9c: 54 05 10 3a rlwinm r5,r0,2,0,29 ffc0bba0: 7c a9 2a 14 add r5,r9,r5 ffc0bba4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0bba8: 80 a5 00 04 lwz r5,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[!dir])) { sibling->color = RBT_RED; ffc0bbac: 38 80 00 01 li r4,1 ffc0bbb0: 90 89 00 10 stw r4,16(r9) sibling->child[dir]->color = RBT_BLACK; ffc0bbb4: 38 80 00 00 li r4,0 ffc0bbb8: 90 85 00 10 stw r4,16(r5) ffc0bbbc: 41 9e 00 58 beq- cr7,ffc0bc14 <_RBTree_Extract_validate_unprotected+0x28c><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc0bbc0: 54 c6 10 3a rlwinm r6,r6,2,0,29 ffc0bbc4: 7c aa 32 14 add r5,r10,r6 ffc0bbc8: 80 85 00 04 lwz r4,4(r5) ffc0bbcc: 90 88 00 04 stw r4,4(r8) if (c->child[dir]) ffc0bbd0: 81 05 00 04 lwz r8,4(r5) ffc0bbd4: 2f 88 00 00 cmpwi cr7,r8,0 ffc0bbd8: 41 9e 00 08 beq- cr7,ffc0bbe0 <_RBTree_Extract_validate_unprotected+0x258> c->child[dir]->parent = the_node; ffc0bbdc: 91 28 00 00 stw r9,0(r8) c->child[dir] = the_node; ffc0bbe0: 7d 0a 32 14 add r8,r10,r6 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0bbe4: 80 c9 00 00 lwz r6,0(r9) the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0bbe8: 91 28 00 04 stw r9,4(r8) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0bbec: 81 06 00 04 lwz r8,4(r6) c->parent = the_node->parent; ffc0bbf0: 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; ffc0bbf4: 7d 28 42 78 xor r8,r9,r8 ffc0bbf8: 7d 08 00 34 cntlzw r8,r8 c->parent = the_node->parent; the_node->parent = c; ffc0bbfc: 91 49 00 00 stw r10,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; ffc0bc00: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc0bc04: 69 08 00 01 xori r8,r8,1 ffc0bc08: 55 08 10 3a rlwinm r8,r8,2,0,29 ffc0bc0c: 7c c6 42 14 add r6,r6,r8 ffc0bc10: 91 46 00 04 stw r10,4(r6) _RBTree_Rotate(sibling, !dir); sibling = parent->child[!dir]; ffc0bc14: 7d 2b 3a 14 add r9,r11,r7 ffc0bc18: 81 29 00 04 lwz r9,4(r9) ffc0bc1c: 7c e9 3a 14 add r7,r9,r7 ffc0bc20: 81 07 00 04 lwz r8,4(r7) RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; ffc0bc24: 20 c0 00 01 subfic r6,r0,1 } sibling->color = parent->color; ffc0bc28: 80 ab 00 10 lwz r5,16(r11) ffc0bc2c: 54 c6 10 3a rlwinm r6,r6,2,0,29 ffc0bc30: 7c cb 32 14 add r6,r11,r6 ffc0bc34: 90 a9 00 10 stw r5,16(r9) parent->color = RBT_BLACK; ffc0bc38: 38 e0 00 00 li r7,0 ffc0bc3c: 81 46 00 04 lwz r10,4(r6) ffc0bc40: 90 eb 00 10 stw r7,16(r11) ffc0bc44: 2f 8a 00 00 cmpwi cr7,r10,0 sibling->child[!dir]->color = RBT_BLACK; ffc0bc48: 90 e8 00 10 stw r7,16(r8) ffc0bc4c: 41 be fe b4 beq- cr7,ffc0bb00 <_RBTree_Extract_validate_unprotected+0x178><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc0bc50: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0bc54: 7d 2a 02 14 add r9,r10,r0 ffc0bc58: 81 09 00 04 lwz r8,4(r9) ffc0bc5c: 91 06 00 04 stw r8,4(r6) if (c->child[dir]) ffc0bc60: 81 29 00 04 lwz r9,4(r9) ffc0bc64: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bc68: 41 9e 00 08 beq- cr7,ffc0bc70 <_RBTree_Extract_validate_unprotected+0x2e8> c->child[dir]->parent = the_node; ffc0bc6c: 91 69 00 00 stw r11,0(r9) c->child[dir] = the_node; ffc0bc70: 7d 0a 02 14 add r8,r10,r0 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0bc74: 81 2b 00 00 lwz r9,0(r11) the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0bc78: 91 68 00 04 stw r11,4(r8) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0bc7c: 80 09 00 04 lwz r0,4(r9) c->parent = the_node->parent; ffc0bc80: 91 2a 00 00 stw r9,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; ffc0bc84: 7d 60 02 78 xor r0,r11,r0 ffc0bc88: 7c 00 00 34 cntlzw r0,r0 c->parent = the_node->parent; the_node->parent = c; ffc0bc8c: 91 4b 00 00 stw r10,0(r11) 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; ffc0bc90: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0bc94: 68 00 00 01 xori r0,r0,1 ffc0bc98: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0bc9c: 7d 29 02 14 add r9,r9,r0 ffc0bca0: 91 49 00 04 stw r10,4(r9) _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; ffc0bca4: 81 23 00 00 lwz r9,0(r3) ffc0bca8: 80 09 00 00 lwz r0,0(r9) ffc0bcac: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bcb0: 4c be 00 20 bnelr+ cr7 ffc0bcb4: 4b ff fe 5c b ffc0bb10 <_RBTree_Extract_validate_unprotected+0x188><== 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]; ffc0bcb8: 81 2b 00 08 lwz r9,8(r11) ffc0bcbc: 4b ff fc ec b ffc0b9a8 <_RBTree_Extract_validate_unprotected+0x20> =============================================================================== ffc0bf78 <_RBTree_Find>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0bf78: 7d 20 00 a6 mfmsr r9 ffc0bf7c: 7c 10 42 a6 mfsprg r0,0 ffc0bf80: 7d 20 00 78 andc r0,r9,r0 ffc0bf84: 7c 00 01 24 mtmsr r0 return_node = NULL; _ISR_Disable( level ); return_node = _RBTree_Find_unprotected( the_rbtree, the_value ); _ISR_Enable( level ); return return_node; } ffc0bf88: 80 63 00 04 lwz r3,4(r3) RBTree_Control *the_rbtree, unsigned int the_value ) { RBTree_Node* iter_node = the_rbtree->root; while (iter_node) { ffc0bf8c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bf90: 40 be 00 28 bne+ cr7,ffc0bfb8 <_RBTree_Find+0x40> <== ALWAYS TAKEN ffc0bf94: 48 00 00 30 b ffc0bfc4 <_RBTree_Find+0x4c> <== NOT EXECUTED if (the_value == iter_node->value) return(iter_node); RBTree_Direction dir = the_value > iter_node->value; ffc0bf98: 7c 04 00 10 subfc r0,r4,r0 ffc0bf9c: 7c 00 01 10 subfe r0,r0,r0 ffc0bfa0: 7c 00 00 d0 neg r0,r0 iter_node = iter_node->child[dir]; ffc0bfa4: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0bfa8: 7c 63 02 14 add r3,r3,r0 ffc0bfac: 80 63 00 04 lwz r3,4(r3) RBTree_Control *the_rbtree, unsigned int the_value ) { RBTree_Node* iter_node = the_rbtree->root; while (iter_node) { ffc0bfb0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bfb4: 41 9e 00 10 beq- cr7,ffc0bfc4 <_RBTree_Find+0x4c> <== NEVER TAKEN if (the_value == iter_node->value) return(iter_node); ffc0bfb8: 80 03 00 0c lwz r0,12(r3) ffc0bfbc: 7f 84 00 00 cmpw cr7,r4,r0 ffc0bfc0: 40 9e ff d8 bne+ cr7,ffc0bf98 <_RBTree_Find+0x20> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0bfc4: 7d 20 01 24 mtmsr r9 ffc0bfc8: 4e 80 00 20 blr =============================================================================== ffc0bf30 <_RBTree_Find_header>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0bf30: 7d 60 00 a6 mfmsr r11 ffc0bf34: 7c 10 42 a6 mfsprg r0,0 ffc0bf38: 7d 60 00 78 andc r0,r11,r0 ffc0bf3c: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; ffc0bf40: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bf44: 39 20 00 00 li r9,0 ffc0bf48: 41 9e 00 24 beq- cr7,ffc0bf6c <_RBTree_Find_header+0x3c><== NEVER TAKEN if(!(the_node->parent)) return NULL; ffc0bf4c: 81 23 00 00 lwz r9,0(r3) ffc0bf50: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bf54: 40 be 00 0c bne+ cr7,ffc0bf60 <_RBTree_Find_header+0x30><== ALWAYS TAKEN ffc0bf58: 48 00 00 14 b ffc0bf6c <_RBTree_Find_header+0x3c> <== NOT EXECUTED while(the_node->parent) the_node = the_node->parent; ffc0bf5c: 7c 09 03 78 mr r9,r0 RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; ffc0bf60: 80 09 00 00 lwz r0,0(r9) while(the_node->parent) the_node = the_node->parent; ffc0bf64: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bf68: 40 9e ff f4 bne+ cr7,ffc0bf5c <_RBTree_Find_header+0x2c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0bf6c: 7d 60 01 24 mtmsr r11 return_header = NULL; _ISR_Disable( level ); return_header = _RBTree_Find_header_unprotected( the_node ); _ISR_Enable( level ); return return_header; } ffc0bf70: 7d 23 4b 78 mr r3,r9 ffc0bf74: 4e 80 00 20 blr =============================================================================== ffc0c1ec <_RBTree_Insert_unprotected>: RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { if(!the_node) return (RBTree_Node*)-1; ffc0c1ec: 2c 04 00 00 cmpwi r4,0 */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0c1f0: 94 21 ff f8 stwu r1,-8(r1) ffc0c1f4: 7c 08 02 a6 mflr r0 if(!the_node) return (RBTree_Node*)-1; ffc0c1f8: 39 20 ff ff li r9,-1 */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0c1fc: 90 01 00 0c stw r0,12(r1) if(!the_node) return (RBTree_Node*)-1; ffc0c200: 41 82 00 4c beq- ffc0c24c <_RBTree_Insert_unprotected+0x60><== NEVER TAKEN RBTree_Node *iter_node = the_rbtree->root; ffc0c204: 81 23 00 04 lwz r9,4(r3) if (!iter_node) { /* special case: first node inserted */ ffc0c208: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c20c: 41 9e 00 a4 beq- cr7,ffc0c2b0 <_RBTree_Insert_unprotected+0xc4> the_node->color = RBT_RED; iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { the_rbtree->first[dir] = the_node; ffc0c210: 81 04 00 0c lwz r8,12(r4) ffc0c214: 48 00 00 14 b ffc0c228 <_RBTree_Insert_unprotected+0x3c> } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { if(the_node->value == iter_node->value) return(iter_node); RBTree_Direction dir = the_node->value > iter_node->value; if (!iter_node->child[dir]) { ffc0c218: 81 6a 00 04 lwz r11,4(r10) ffc0c21c: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0c220: 41 9e 00 40 beq- cr7,ffc0c260 <_RBTree_Insert_unprotected+0x74> ffc0c224: 7d 69 5b 78 mr r9,r11 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) { if(the_node->value == iter_node->value) return(iter_node); ffc0c228: 81 69 00 0c lwz r11,12(r9) ffc0c22c: 7f 88 58 00 cmpw cr7,r8,r11 RBTree_Direction dir = the_node->value > iter_node->value; ffc0c230: 7c 08 58 10 subfc r0,r8,r11 ffc0c234: 7c 00 01 10 subfe r0,r0,r0 ffc0c238: 7c 00 00 d0 neg r0,r0 if (!iter_node->child[dir]) { ffc0c23c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c240: 7d 49 02 14 add r10,r9,r0 ffc0c244: 38 ea 00 04 addi r7,r10,4 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) { if(the_node->value == iter_node->value) return(iter_node); ffc0c248: 40 9e ff d0 bne+ cr7,ffc0c218 <_RBTree_Insert_unprotected+0x2c> /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } ffc0c24c: 80 01 00 0c lwz r0,12(r1) ffc0c250: 7d 23 4b 78 mr r3,r9 ffc0c254: 38 21 00 08 addi r1,r1,8 ffc0c258: 7c 08 03 a6 mtlr r0 ffc0c25c: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; ffc0c260: 7c 63 02 14 add r3,r3,r0 the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; the_node->color = RBT_RED; iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { ffc0c264: 80 03 00 08 lwz r0,8(r3) /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { if(the_node->value == iter_node->value) return(iter_node); RBTree_Direction dir = the_node->value > iter_node->value; if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; ffc0c268: 91 64 00 08 stw r11,8(r4) the_node->color = RBT_RED; iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { ffc0c26c: 7f 89 00 00 cmpw cr7,r9,r0 while (iter_node) { if(the_node->value == iter_node->value) return(iter_node); RBTree_Direction dir = the_node->value > iter_node->value; if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; the_node->color = RBT_RED; ffc0c270: 38 00 00 01 li r0,1 /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { if(the_node->value == iter_node->value) return(iter_node); RBTree_Direction dir = the_node->value > iter_node->value; if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; ffc0c274: 91 64 00 04 stw r11,4(r4) the_node->color = RBT_RED; ffc0c278: 90 04 00 10 stw r0,16(r4) iter_node->child[dir] = the_node; ffc0c27c: 90 87 00 00 stw r4,0(r7) the_node->parent = iter_node; ffc0c280: 91 24 00 00 stw r9,0(r4) /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { ffc0c284: 41 9e 00 24 beq- cr7,ffc0c2a8 <_RBTree_Insert_unprotected+0xbc> } } /* while(iter_node) */ /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); ffc0c288: 7c 83 23 78 mr r3,r4 ffc0c28c: 4b ff fd 99 bl ffc0c024 <_RBTree_Validate_insert_unprotected> } return (RBTree_Node*)0; } ffc0c290: 80 01 00 0c lwz r0,12(r1) } /* while(iter_node) */ /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; ffc0c294: 39 20 00 00 li r9,0 } ffc0c298: 7c 08 03 a6 mtlr r0 ffc0c29c: 7d 23 4b 78 mr r3,r9 ffc0c2a0: 38 21 00 08 addi r1,r1,8 ffc0c2a4: 4e 80 00 20 blr the_node->color = RBT_RED; iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { the_rbtree->first[dir] = the_node; ffc0c2a8: 90 83 00 08 stw r4,8(r3) ffc0c2ac: 4b ff ff dc b ffc0c288 <_RBTree_Insert_unprotected+0x9c> if(!the_node) return (RBTree_Node*)-1; RBTree_Node *iter_node = the_rbtree->root; if (!iter_node) { /* special case: first node inserted */ the_node->color = RBT_BLACK; ffc0c2b0: 91 24 00 10 stw r9,16(r4) the_rbtree->root = the_node; ffc0c2b4: 90 83 00 04 stw r4,4(r3) the_rbtree->first[0] = the_rbtree->first[1] = the_node; ffc0c2b8: 90 83 00 0c stw r4,12(r3) ffc0c2bc: 90 83 00 08 stw r4,8(r3) the_node->parent = (RBTree_Node *) the_rbtree; ffc0c2c0: 90 64 00 00 stw r3,0(r4) the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; ffc0c2c4: 91 24 00 08 stw r9,8(r4) ffc0c2c8: 91 24 00 04 stw r9,4(r4) ffc0c2cc: 4b ff ff 80 b ffc0c24c <_RBTree_Insert_unprotected+0x60> =============================================================================== ffc0c024 <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { ffc0c024: 94 21 ff f0 stwu r1,-16(r1) /* 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; ffc0c028: 38 a0 00 00 li r5,0 g->color = RBT_RED; ffc0c02c: 39 80 00 01 li r12,1 * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { ffc0c030: 93 e1 00 0c stw r31,12(r1) ISR_Level level; _ISR_Disable( level ); _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } ffc0c034: 81 23 00 00 lwz r9,0(r3) */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; ffc0c038: 81 69 00 00 lwz r11,0(r9) ffc0c03c: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0c040: 7d 68 5b 78 mr r8,r11 ffc0c044: 41 9e 01 70 beq- cr7,ffc0c1b4 <_RBTree_Validate_insert_unprotected+0x190> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0c048: 80 09 00 10 lwz r0,16(r9) ffc0c04c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c050: 41 9e 00 10 beq- cr7,ffc0c060 <_RBTree_Validate_insert_unprotected+0x3c> /* 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; } ffc0c054: 83 e1 00 0c lwz r31,12(r1) ffc0c058: 38 21 00 10 addi r1,r1,16 ffc0c05c: 4e 80 00 20 blr ) { 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; ffc0c060: 80 0b 00 00 lwz r0,0(r11) ffc0c064: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c068: 80 0b 00 04 lwz r0,4(r11) ffc0c06c: 41 9e 00 24 beq- cr7,ffc0c090 <_RBTree_Validate_insert_unprotected+0x6c><== 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]) ffc0c070: 7f 89 00 00 cmpw cr7,r9,r0 ffc0c074: 7c 0a 03 78 mr r10,r0 ffc0c078: 41 9e 01 6c beq- cr7,ffc0c1e4 <_RBTree_Validate_insert_unprotected+0x1c0> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0c07c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c080: 41 9e 00 10 beq- cr7,ffc0c090 <_RBTree_Validate_insert_unprotected+0x6c> ffc0c084: 80 ea 00 10 lwz r7,16(r10) ffc0c088: 2f 87 00 01 cmpwi cr7,r7,1 ffc0c08c: 41 9e 01 38 beq- cr7,ffc0c1c4 <_RBTree_Validate_insert_unprotected+0x1a0> 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]; ffc0c090: 81 49 00 04 lwz r10,4(r9) RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0c094: 7d 20 02 78 xor r0,r9,r0 ffc0c098: 7c 00 00 34 cntlzw r0,r0 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]; ffc0c09c: 7c 6a 52 78 xor r10,r3,r10 ffc0c0a0: 7d 4a 00 34 cntlzw r10,r10 ffc0c0a4: 55 4a d9 7e rlwinm r10,r10,27,5,31 RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0c0a8: 54 00 d9 7e rlwinm r0,r0,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]; ffc0c0ac: 69 4a 00 01 xori r10,r10,1 RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0c0b0: 68 00 00 01 xori r0,r0,1 /* ensure node is on the same branch direction as parent */ if (dir != pdir) { ffc0c0b4: 7f 8a 00 00 cmpw cr7,r10,r0 ffc0c0b8: 41 9e 01 20 beq- cr7,ffc0c1d8 <_RBTree_Validate_insert_unprotected+0x1b4> RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; ffc0c0bc: 20 c0 00 01 subfic r6,r0,1 ffc0c0c0: 54 ca 10 3a rlwinm r10,r6,2,0,29 ffc0c0c4: 7d 49 52 14 add r10,r9,r10 ffc0c0c8: 80 ea 00 04 lwz r7,4(r10) ffc0c0cc: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c0d0: 2f 87 00 00 cmpwi cr7,r7,0 ffc0c0d4: 41 9e 00 54 beq- cr7,ffc0c128 <_RBTree_Validate_insert_unprotected+0x104><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc0c0d8: 7c 87 02 14 add r4,r7,r0 ffc0c0dc: 83 e4 00 04 lwz r31,4(r4) ffc0c0e0: 93 ea 00 04 stw r31,4(r10) if (c->child[dir]) ffc0c0e4: 81 44 00 04 lwz r10,4(r4) ffc0c0e8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c0ec: 41 9e 00 0c beq- cr7,ffc0c0f8 <_RBTree_Validate_insert_unprotected+0xd4> c->child[dir]->parent = the_node; ffc0c0f0: 91 2a 00 00 stw r9,0(r10) ffc0c0f4: 81 69 00 00 lwz r11,0(r9) c->child[dir] = the_node; ffc0c0f8: 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; ffc0c0fc: 91 67 00 00 stw r11,0(r7) the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0c100: 91 2a 00 04 stw r9,4(r10) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c104: 81 4b 00 04 lwz r10,4(r11) c->parent = the_node->parent; the_node->parent = c; ffc0c108: 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; ffc0c10c: 7d 2a 52 78 xor r10,r9,r10 ffc0c110: 7d 4a 00 34 cntlzw r10,r10 ffc0c114: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc0c118: 69 4a 00 01 xori r10,r10,1 ffc0c11c: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc0c120: 7d 6b 52 14 add r11,r11,r10 ffc0c124: 90 eb 00 04 stw r7,4(r11) _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; ffc0c128: 7c 63 02 14 add r3,r3,r0 ffc0c12c: 80 63 00 04 lwz r3,4(r3) ffc0c130: 81 23 00 00 lwz r9,0(r3) RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; ffc0c134: 7d 48 02 14 add r10,r8,r0 } the_node->parent->color = RBT_BLACK; ffc0c138: 90 a9 00 10 stw r5,16(r9) ffc0c13c: 81 6a 00 04 lwz r11,4(r10) g->color = RBT_RED; ffc0c140: 91 88 00 10 stw r12,16(r8) ffc0c144: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0c148: 41 be fe ec beq- cr7,ffc0c034 <_RBTree_Validate_insert_unprotected+0x10><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; ffc0c14c: 54 c6 10 3a rlwinm r6,r6,2,0,29 ffc0c150: 7d 2b 32 14 add r9,r11,r6 ffc0c154: 80 09 00 04 lwz r0,4(r9) ffc0c158: 90 0a 00 04 stw r0,4(r10) if (c->child[dir]) ffc0c15c: 81 29 00 04 lwz r9,4(r9) ffc0c160: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c164: 41 9e 00 08 beq- cr7,ffc0c16c <_RBTree_Validate_insert_unprotected+0x148> c->child[dir]->parent = the_node; ffc0c168: 91 09 00 00 stw r8,0(r9) c->child[dir] = the_node; ffc0c16c: 7c cb 32 14 add r6,r11,r6 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c170: 81 28 00 00 lwz r9,0(r8) the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0c174: 91 06 00 04 stw r8,4(r6) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c178: 80 09 00 04 lwz r0,4(r9) c->parent = the_node->parent; ffc0c17c: 91 2b 00 00 stw r9,0(r11) 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; ffc0c180: 7d 00 02 78 xor r0,r8,r0 ffc0c184: 7c 00 00 34 cntlzw r0,r0 c->parent = the_node->parent; the_node->parent = c; ffc0c188: 91 68 00 00 stw r11,0(r8) 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; ffc0c18c: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0c190: 68 00 00 01 xori r0,r0,1 ffc0c194: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c198: 7d 29 02 14 add r9,r9,r0 ffc0c19c: 91 69 00 04 stw r11,4(r9) ISR_Level level; _ISR_Disable( level ); _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } ffc0c1a0: 81 23 00 00 lwz r9,0(r3) */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; ffc0c1a4: 81 69 00 00 lwz r11,0(r9) ffc0c1a8: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0c1ac: 7d 68 5b 78 mr r8,r11 ffc0c1b0: 40 9e fe 98 bne+ cr7,ffc0c048 <_RBTree_Validate_insert_unprotected+0x24><== ALWAYS TAKEN /* 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; } ffc0c1b4: 83 e1 00 0c lwz r31,12(r1) ffc0c1b8: 38 21 00 10 addi r1,r1,16 /* 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; ffc0c1bc: 91 63 00 10 stw r11,16(r3) } ffc0c1c0: 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; ffc0c1c4: 90 a9 00 10 stw r5,16(r9) u->color = RBT_BLACK; g->color = RBT_RED; ffc0c1c8: 7d 63 5b 78 mr r3,r11 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; ffc0c1cc: 90 aa 00 10 stw r5,16(r10) g->color = RBT_RED; ffc0c1d0: 90 eb 00 10 stw r7,16(r11) ffc0c1d4: 4b ff fe 60 b ffc0c034 <_RBTree_Validate_insert_unprotected+0x10> } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { ffc0c1d8: 20 ca 00 01 subfic r6,r10,1 ffc0c1dc: 55 40 10 3a rlwinm r0,r10,2,0,29 ffc0c1e0: 4b ff ff 54 b ffc0c134 <_RBTree_Validate_insert_unprotected+0x110> 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]; ffc0c1e4: 81 4b 00 08 lwz r10,8(r11) ffc0c1e8: 4b ff fe 94 b ffc0c07c <_RBTree_Validate_insert_unprotected+0x58> =============================================================================== ffc09848 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09848: 94 21 ff d8 stwu r1,-40(r1) ffc0984c: 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; ffc09850: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09854: 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; ffc09858: 39 29 20 44 addi r9,r9,8260 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc0985c: 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; ffc09860: 83 e9 00 2c lwz r31,44(r9) * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09864: 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 ) ffc09868: 2f 9f 00 00 cmpwi cr7,r31,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc0986c: 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; ffc09870: 83 a9 00 28 lwz r29,40(r9) /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc09874: 41 9e 00 5c beq- cr7,ffc098d0 <_RTEMS_tasks_Initialize_user_tasks_body+0x88> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc09878: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0987c: 41 9e 00 54 beq- cr7,ffc098d0 <_RTEMS_tasks_Initialize_user_tasks_body+0x88><== NEVER TAKEN ffc09880: 3b c0 00 00 li r30,0 return_value = rtems_task_create( ffc09884: 80 bf 00 04 lwz r5,4(r31) ffc09888: 39 01 00 08 addi r8,r1,8 ffc0988c: 80 7f 00 00 lwz r3,0(r31) ffc09890: 80 9f 00 08 lwz r4,8(r31) ffc09894: 80 df 00 14 lwz r6,20(r31) ffc09898: 80 ff 00 0c lwz r7,12(r31) ffc0989c: 4b ff fd 0d bl ffc095a8 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) ffc098a0: 7c 65 1b 79 mr. r5,r3 ffc098a4: 40 82 00 48 bne- ffc098ec <_RTEMS_tasks_Initialize_user_tasks_body+0xa4> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( ffc098a8: 80 bf 00 18 lwz r5,24(r31) ffc098ac: 80 61 00 08 lwz r3,8(r1) ffc098b0: 80 9f 00 10 lwz r4,16(r31) ffc098b4: 48 00 00 45 bl ffc098f8 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) ffc098b8: 7c 65 1b 79 mr. r5,r3 ffc098bc: 40 82 00 30 bne- ffc098ec <_RTEMS_tasks_Initialize_user_tasks_body+0xa4> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc098c0: 3b de 00 01 addi r30,r30,1 ffc098c4: 7f 9e e8 00 cmpw cr7,r30,r29 ffc098c8: 3b ff 00 1c addi r31,r31,28 ffc098cc: 40 9e ff b8 bne+ cr7,ffc09884 <_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 ); } } ffc098d0: 80 01 00 2c lwz r0,44(r1) ffc098d4: 83 a1 00 1c lwz r29,28(r1) ffc098d8: 7c 08 03 a6 mtlr r0 ffc098dc: 83 c1 00 20 lwz r30,32(r1) ffc098e0: 83 e1 00 24 lwz r31,36(r1) ffc098e4: 38 21 00 28 addi r1,r1,40 ffc098e8: 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 ); ffc098ec: 38 60 00 01 li r3,1 ffc098f0: 38 80 00 01 li r4,1 ffc098f4: 48 00 13 b1 bl ffc0aca4 <_Internal_error_Occurred> =============================================================================== ffc0fd88 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0fd88: 94 21 ff e0 stwu r1,-32(r1) ffc0fd8c: 7c 08 02 a6 mflr r0 ffc0fd90: 90 01 00 24 stw r0,36(r1) ffc0fd94: 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 ]; ffc0fd98: 83 e3 01 2c lwz r31,300(r3) */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0fd9c: 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 ) ffc0fda0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0fda4: 41 9e 00 7c beq- cr7,ffc0fe20 <_RTEMS_tasks_Post_switch_extension+0x98><== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0fda8: 7c 00 00 a6 mfmsr r0 ffc0fdac: 7d 30 42 a6 mfsprg r9,0 ffc0fdb0: 7c 09 48 78 andc r9,r0,r9 ffc0fdb4: 7d 20 01 24 mtmsr r9 asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; asr->signals_posted = 0; ffc0fdb8: 39 20 00 00 li r9,0 */ asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; ffc0fdbc: 83 df 00 14 lwz r30,20(r31) asr->signals_posted = 0; ffc0fdc0: 91 3f 00 14 stw r9,20(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0fdc4: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ ffc0fdc8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0fdcc: 41 be 00 54 beq+ cr7,ffc0fe20 <_RTEMS_tasks_Post_switch_extension+0x98> return; asr->nest_level += 1; ffc0fdd0: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0fdd4: 38 80 00 00 li r4,0 ffc0fdd8: 80 7f 00 10 lwz r3,16(r31) ffc0fddc: 60 84 ff ff ori r4,r4,65535 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; ffc0fde0: 38 09 00 01 addi r0,r9,1 ffc0fde4: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0fde8: 38 a1 00 08 addi r5,r1,8 ffc0fdec: 48 00 26 45 bl ffc12430 (*asr->handler)( signal_set ); ffc0fdf0: 80 1f 00 0c lwz r0,12(r31) ffc0fdf4: 7f c3 f3 78 mr r3,r30 ffc0fdf8: 7c 09 03 a6 mtctr r0 ffc0fdfc: 4e 80 04 21 bctrl asr->nest_level -= 1; ffc0fe00: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0fe04: 38 80 00 00 li r4,0 ffc0fe08: 80 61 00 08 lwz r3,8(r1) asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; ffc0fe0c: 38 09 ff ff addi r0,r9,-1 ffc0fe10: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0fe14: 60 84 ff ff ori r4,r4,65535 ffc0fe18: 38 a1 00 08 addi r5,r1,8 ffc0fe1c: 48 00 26 15 bl ffc12430 } ffc0fe20: 80 01 00 24 lwz r0,36(r1) ffc0fe24: 83 c1 00 18 lwz r30,24(r1) ffc0fe28: 7c 08 03 a6 mtlr r0 ffc0fe2c: 83 e1 00 1c lwz r31,28(r1) ffc0fe30: 38 21 00 20 addi r1,r1,32 ffc0fe34: 4e 80 00 20 blr =============================================================================== ffc0fcf8 <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; ffc0fcf8: 81 23 01 38 lwz r9,312(r3) while (tvp) { ffc0fcfc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0fd00: 41 9e 00 24 beq- cr7,ffc0fd24 <_RTEMS_tasks_Switch_extension+0x2c> tvp->tval = *tvp->ptr; ffc0fd04: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->gval; ffc0fd08: 80 09 00 08 lwz r0,8(r9) * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; ffc0fd0c: 81 4b 00 00 lwz r10,0(r11) ffc0fd10: 91 49 00 0c stw r10,12(r9) *tvp->ptr = tvp->gval; ffc0fd14: 90 0b 00 00 stw r0,0(r11) tvp = (rtems_task_variable_t *)tvp->next; ffc0fd18: 81 29 00 00 lwz r9,0(r9) /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { ffc0fd1c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0fd20: 40 9e ff e4 bne+ cr7,ffc0fd04 <_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; ffc0fd24: 81 24 01 38 lwz r9,312(r4) while (tvp) { ffc0fd28: 2f 89 00 00 cmpwi cr7,r9,0 ffc0fd2c: 4d 9e 00 20 beqlr cr7 tvp->gval = *tvp->ptr; ffc0fd30: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->tval; ffc0fd34: 80 09 00 0c lwz r0,12(r9) tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; ffc0fd38: 81 4b 00 00 lwz r10,0(r11) ffc0fd3c: 91 49 00 08 stw r10,8(r9) *tvp->ptr = tvp->tval; ffc0fd40: 90 0b 00 00 stw r0,0(r11) tvp = (rtems_task_variable_t *)tvp->next; ffc0fd44: 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) { ffc0fd48: 2f 89 00 00 cmpwi cr7,r9,0 ffc0fd4c: 40 9e ff e4 bne+ cr7,ffc0fd30 <_RTEMS_tasks_Switch_extension+0x38><== NEVER TAKEN ffc0fd50: 4e 80 00 20 blr =============================================================================== ffc0a7e4 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { ffc0a7e4: 94 21 ff e0 stwu r1,-32(r1) ffc0a7e8: 7c 08 02 a6 mflr r0 ffc0a7ec: 7c 64 1b 78 mr r4,r3 ffc0a7f0: 3c 60 00 00 lis r3,0 ffc0a7f4: 90 01 00 24 stw r0,36(r1) ffc0a7f8: 38 63 2c 00 addi r3,r3,11264 ffc0a7fc: 38 a1 00 08 addi r5,r1,8 ffc0a800: 93 e1 00 1c stw r31,28(r1) ffc0a804: 48 00 27 45 bl ffc0cf48 <_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 ) { ffc0a808: 80 01 00 08 lwz r0,8(r1) ffc0a80c: 7c 7f 1b 78 mr r31,r3 ffc0a810: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a814: 40 9e 00 4c bne- cr7,ffc0a860 <_Rate_monotonic_Timeout+0x7c><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; ffc0a818: 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); ffc0a81c: 80 03 00 10 lwz r0,16(r3) if ( _States_Is_waiting_for_period( the_thread->current_state ) && ffc0a820: 70 09 40 00 andi. r9,r0,16384 ffc0a824: 41 82 00 14 beq- ffc0a838 <_Rate_monotonic_Timeout+0x54> ffc0a828: 81 23 00 20 lwz r9,32(r3) ffc0a82c: 80 1f 00 08 lwz r0,8(r31) ffc0a830: 7f 89 00 00 cmpw cr7,r9,r0 ffc0a834: 41 9e 00 6c beq- cr7,ffc0a8a0 <_Rate_monotonic_Timeout+0xbc> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { ffc0a838: 80 1f 00 38 lwz r0,56(r31) ffc0a83c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0a840: 41 9e 00 34 beq- cr7,ffc0a874 <_Rate_monotonic_Timeout+0x90> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; ffc0a844: 38 00 00 04 li r0,4 ffc0a848: 90 1f 00 38 stw r0,56(r31) * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; ffc0a84c: 3d 20 00 00 lis r9,0 ffc0a850: 81 69 28 08 lwz r11,10248(r9) ffc0a854: 38 0b ff ff addi r0,r11,-1 ffc0a858: 90 09 28 08 stw r0,10248(r9) return _Thread_Dispatch_disable_level; ffc0a85c: 80 09 28 08 lwz r0,10248(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc0a860: 80 01 00 24 lwz r0,36(r1) ffc0a864: 83 e1 00 1c lwz r31,28(r1) ffc0a868: 38 21 00 20 addi r1,r1,32 ffc0a86c: 7c 08 03 a6 mtlr r0 ffc0a870: 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; ffc0a874: 38 00 00 03 li r0,3 ffc0a878: 90 1f 00 38 stw r0,56(r31) _Rate_monotonic_Initiate_statistics( the_period ); ffc0a87c: 7f e3 fb 78 mr r3,r31 ffc0a880: 4b ff f7 d1 bl ffc0a050 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a884: 80 1f 00 3c lwz r0,60(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a888: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a88c: 90 1f 00 1c stw r0,28(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a890: 38 63 2d c8 addi r3,r3,11720 ffc0a894: 38 9f 00 10 addi r4,r31,16 ffc0a898: 48 00 4a dd bl ffc0f374 <_Watchdog_Insert> ffc0a89c: 4b ff ff b0 b ffc0a84c <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc0a8a0: 3c 80 10 03 lis r4,4099 ffc0a8a4: 60 84 ff f8 ori r4,r4,65528 ffc0a8a8: 48 00 32 69 bl ffc0db10 <_Thread_Clear_state> ffc0a8ac: 4b ff ff d0 b ffc0a87c <_Rate_monotonic_Timeout+0x98> =============================================================================== ffc0b754 <_Scheduler_priority_Block>: ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; ffc0b754: 81 63 00 8c lwz r11,140(r3) ready = sched_info->ready_chain; ffc0b758: 81 2b 00 00 lwz r9,0(r11) if ( _Chain_Has_only_one_node( ready ) ) { ffc0b75c: 81 49 00 00 lwz r10,0(r9) ffc0b760: 80 09 00 08 lwz r0,8(r9) ffc0b764: 7f 8a 00 00 cmpw cr7,r10,r0 ffc0b768: 41 9e 00 a4 beq- cr7,ffc0b80c <_Scheduler_priority_Block+0xb8> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0b76c: 81 63 00 00 lwz r11,0(r3) previous = the_node->previous; ffc0b770: 81 23 00 04 lwz r9,4(r3) next->previous = previous; ffc0b774: 91 2b 00 04 stw r9,4(r11) previous->next = next; ffc0b778: 91 69 00 00 stw r11,0(r9) RTEMS_INLINE_ROUTINE bool _Thread_Is_heir ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Heir ); ffc0b77c: 3d 20 00 00 lis r9,0 ffc0b780: 39 29 2d b8 addi r9,r9,11704 { _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) ffc0b784: 80 09 00 10 lwz r0,16(r9) ffc0b788: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b78c: 41 9e 00 1c beq- cr7,ffc0b7a8 <_Scheduler_priority_Block+0x54> _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) ffc0b790: 80 09 00 0c lwz r0,12(r9) ffc0b794: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b798: 4c be 00 20 bnelr+ cr7 _Thread_Dispatch_necessary = true; ffc0b79c: 38 00 00 01 li r0,1 ffc0b7a0: 98 09 00 18 stb r0,24(r9) ffc0b7a4: 4e 80 00 20 blr 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 ); ffc0b7a8: 3c a0 00 00 lis r5,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 ffc0b7ac: 3d 40 00 00 lis r10,0 ffc0b7b0: 81 65 28 08 lwz r11,10248(r5) ffc0b7b4: 81 4a 20 e0 lwz r10,8416(r10) ffc0b7b8: 7d 66 00 34 cntlzw r6,r11 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0b7bc: 3c e0 00 00 lis r7,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 ); ffc0b7c0: 91 65 28 08 stw r11,10248(r5) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0b7c4: 38 e7 2d e0 addi r7,r7,11744 ffc0b7c8: 54 c8 10 3a rlwinm r8,r6,2,0,29 ffc0b7cc: 7c 07 40 2e lwzx r0,r7,r8 ffc0b7d0: 7c 0b 00 34 cntlzw r11,r0 return (_Priority_Bits_index( major ) << 4) + ffc0b7d4: 54 c6 20 36 rlwinm r6,r6,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 ); ffc0b7d8: 7c 07 41 2e stwx r0,r7,r8 return (_Priority_Bits_index( major ) << 4) + ffc0b7dc: 7d 66 5a 14 add r11,r6,r11 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0b7e0: 1d 6b 00 0c mulli r11,r11,12 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0b7e4: 7c 0a 58 2e lwzx r0,r10,r11 ffc0b7e8: 7d 0a 5a 14 add r8,r10,r11 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0b7ec: 39 68 00 04 addi r11,r8,4 ffc0b7f0: 7f 80 58 00 cmpw cr7,r0,r11 ffc0b7f4: 41 9e 00 60 beq- cr7,ffc0b854 <_Scheduler_priority_Block+0x100><== 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( ffc0b7f8: 90 09 00 10 stw r0,16(r9) /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) ffc0b7fc: 80 09 00 0c lwz r0,12(r9) ffc0b800: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b804: 4c be 00 20 bnelr+ cr7 ffc0b808: 4b ff ff 94 b ffc0b79c <_Scheduler_priority_Block+0x48> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0b80c: 81 4b 00 04 lwz r10,4(r11) 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 ); ffc0b810: 39 09 00 04 addi r8,r9,4 ffc0b814: 80 0b 00 14 lwz r0,20(r11) ffc0b818: 80 ea 00 00 lwz r7,0(r10) head->next = tail; ffc0b81c: 91 09 00 00 stw r8,0(r9) head->previous = NULL; ffc0b820: 39 00 00 00 li r8,0 ffc0b824: 7c e0 00 38 and r0,r7,r0 if ( *the_priority_map->minor == 0 ) ffc0b828: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b82c: 91 09 00 04 stw r8,4(r9) tail->previous = head; ffc0b830: 91 29 00 08 stw r9,8(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; ffc0b834: 90 0a 00 00 stw r0,0(r10) if ( *the_priority_map->minor == 0 ) ffc0b838: 40 be ff 44 bne- cr7,ffc0b77c <_Scheduler_priority_Block+0x28> _Priority_Major_bit_map &= the_priority_map->block_major; ffc0b83c: 3d 20 00 00 lis r9,0 ffc0b840: 80 0b 00 10 lwz r0,16(r11) ffc0b844: 81 49 28 08 lwz r10,10248(r9) ffc0b848: 7d 40 00 38 and r0,r10,r0 ffc0b84c: 90 09 28 08 stw r0,10248(r9) ffc0b850: 4b ff ff 2c b ffc0b77c <_Scheduler_priority_Block+0x28> 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; ffc0b854: 38 00 00 00 li r0,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( ffc0b858: 90 09 00 10 stw r0,16(r9) <== NOT EXECUTED ffc0b85c: 4b ff ff a0 b ffc0b7fc <_Scheduler_priority_Block+0xa8><== NOT EXECUTED =============================================================================== ffc0ba2c <_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 ); ffc0ba2c: 3c c0 00 00 lis r6,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 ffc0ba30: 3d 60 00 00 lis r11,0 ffc0ba34: 81 26 28 08 lwz r9,10248(r6) ffc0ba38: 81 6b 20 e0 lwz r11,8416(r11) ffc0ba3c: 7d 27 00 34 cntlzw r7,r9 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0ba40: 3d 00 00 00 lis r8,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 ); ffc0ba44: 91 26 28 08 stw r9,10248(r6) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0ba48: 39 08 2d e0 addi r8,r8,11744 ffc0ba4c: 54 ea 10 3a rlwinm r10,r7,2,0,29 ffc0ba50: 7c 08 50 2e lwzx r0,r8,r10 ffc0ba54: 7c 06 00 34 cntlzw r6,r0 return (_Priority_Bits_index( major ) << 4) + ffc0ba58: 54 e9 20 36 rlwinm r9,r7,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 ); ffc0ba5c: 7c 08 51 2e stwx r0,r8,r10 return (_Priority_Bits_index( major ) << 4) + ffc0ba60: 7d 29 32 14 add r9,r9,r6 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0ba64: 1d 29 00 0c mulli r9,r9,12 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0ba68: 7c 0b 48 2e lwzx r0,r11,r9 ffc0ba6c: 7d 4b 4a 14 add r10,r11,r9 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0ba70: 39 2a 00 04 addi r9,r10,4 ffc0ba74: 7f 80 48 00 cmpw cr7,r0,r9 ffc0ba78: 41 9e 00 10 beq- cr7,ffc0ba88 <_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( ffc0ba7c: 3d 20 00 00 lis r9,0 ffc0ba80: 90 09 2d c8 stw r0,11720(r9) #include void _Scheduler_priority_Schedule(void) { _Scheduler_priority_Schedule_body(); } ffc0ba84: 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; ffc0ba88: 38 00 00 00 li r0,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( ffc0ba8c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0ba90: 90 09 2d c8 stw r0,11720(r9) <== NOT EXECUTED ffc0ba94: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0bc14 <_Scheduler_priority_Yield>: Scheduler_priority_Per_thread *sched_info; ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ffc0bc14: 3d 40 00 00 lis r10,0 ffc0bc18: 39 4a 2d b8 addi r10,r10,11704 ffc0bc1c: 81 2a 00 0c lwz r9,12(r10) sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info; ready = sched_info->ready_chain; ffc0bc20: 81 69 00 8c lwz r11,140(r9) ffc0bc24: 81 6b 00 00 lwz r11,0(r11) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0bc28: 7c 00 00 a6 mfmsr r0 ffc0bc2c: 7d 10 42 a6 mfsprg r8,0 ffc0bc30: 7c 08 40 78 andc r8,r0,r8 ffc0bc34: 7d 00 01 24 mtmsr r8 _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { ffc0bc38: 80 eb 00 00 lwz r7,0(r11) ffc0bc3c: 81 0b 00 08 lwz r8,8(r11) ffc0bc40: 7f 87 40 00 cmpw cr7,r7,r8 ffc0bc44: 41 9e 00 60 beq- cr7,ffc0bca4 <_Scheduler_priority_Yield+0x90> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0bc48: 80 c9 00 00 lwz r6,0(r9) RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); ffc0bc4c: 38 ab 00 04 addi r5,r11,4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0bc50: 80 e9 00 04 lwz r7,4(r9) next->previous = previous; ffc0bc54: 90 e6 00 04 stw r7,4(r6) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; ffc0bc58: 81 0b 00 08 lwz r8,8(r11) Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; ffc0bc5c: 90 c7 00 00 stw r6,0(r7) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; ffc0bc60: 91 2b 00 08 stw r9,8(r11) ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; ffc0bc64: 90 a9 00 00 stw r5,0(r9) tail->previous = the_node; old_last->next = the_node; the_node->previous = old_last; ffc0bc68: 91 09 00 04 stw r8,4(r9) Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; old_last->next = the_node; ffc0bc6c: 91 28 00 00 stw r9,0(r8) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0bc70: 7d 00 00 a6 mfmsr r8 ffc0bc74: 7c 00 01 24 mtmsr r0 ffc0bc78: 7d 00 01 24 mtmsr r8 _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) ffc0bc7c: 81 0a 00 10 lwz r8,16(r10) ffc0bc80: 7f 89 40 00 cmpw cr7,r9,r8 ffc0bc84: 41 9e 00 14 beq- cr7,ffc0bc98 <_Scheduler_priority_Yield+0x84><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) _Chain_First( ready ); _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; ffc0bc88: 39 20 00 01 li r9,1 ffc0bc8c: 99 2a 00 18 stb r9,24(r10) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0bc90: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); } ffc0bc94: 4e 80 00 20 blr _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) _Chain_First( ready ); ffc0bc98: 81 2b 00 00 lwz r9,0(r11) ffc0bc9c: 91 2a 00 10 stw r9,16(r10) ffc0bca0: 4b ff ff e8 b ffc0bc88 <_Scheduler_priority_Yield+0x74> _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) ffc0bca4: 81 6a 00 10 lwz r11,16(r10) ffc0bca8: 7f 89 58 00 cmpw cr7,r9,r11 ffc0bcac: 40 9e ff dc bne+ cr7,ffc0bc88 <_Scheduler_priority_Yield+0x74> ffc0bcb0: 4b ff ff e0 b ffc0bc90 <_Scheduler_priority_Yield+0x7c> =============================================================================== ffc0c43c <_Scheduler_simple_Ready_queue_enqueue_first>: { Chain_Control *ready; Chain_Node *the_node; Thread_Control *current; ready = (Chain_Control *)_Scheduler.information; ffc0c43c: 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 ) { ffc0c440: 81 63 00 14 lwz r11,20(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0c444: 81 29 20 e0 lwz r9,8416(r9) ffc0c448: 81 29 00 00 lwz r9,0(r9) ffc0c44c: 80 09 00 14 lwz r0,20(r9) ffc0c450: 7f 80 58 40 cmplw cr7,r0,r11 ffc0c454: 40 9c 00 14 bge- cr7,ffc0c468 <_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 ) { ffc0c458: 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 ) { ffc0c45c: 80 09 00 14 lwz r0,20(r9) ffc0c460: 7f 80 58 40 cmplw cr7,r0,r11 ffc0c464: 41 9c ff f4 blt+ cr7,ffc0c458 <_Scheduler_simple_Ready_queue_enqueue_first+0x1c><== NEVER TAKEN current = (Thread_Control *)current->Object.Node.previous; ffc0c468: 81 29 00 04 lwz r9,4(r9) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0c46c: 81 69 00 00 lwz r11,0(r9) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0c470: 91 23 00 04 stw r9,4(r3) before_node = after_node->next; after_node->next = the_node; ffc0c474: 90 69 00 00 stw r3,0(r9) the_node->next = before_node; before_node->previous = the_node; ffc0c478: 90 6b 00 04 stw r3,4(r11) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0c47c: 91 63 00 00 stw r11,0(r3) } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } ffc0c480: 4e 80 00 20 blr =============================================================================== ffc0a774 <_TOD_Tickle_ticks>: { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc0a774: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc0a778: 94 21 ff d8 stwu r1,-40(r1) ffc0a77c: 7c 08 02 a6 mflr r0 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc0a780: 3c 60 00 00 lis r3,0 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc0a784: 81 69 20 10 lwz r11,8208(r9) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc0a788: 3d 20 00 00 lis r9,0 ffc0a78c: 81 49 27 fc lwz r10,10236(r9) /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc0a790: 38 81 00 08 addi r4,r1,8 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc0a794: 1d 6b 03 e8 mulli r11,r11,1000 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc0a798: 90 01 00 2c stw r0,44(r1) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc0a79c: 38 63 27 d0 addi r3,r3,10192 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc0a7a0: 91 61 00 0c stw r11,12(r1) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc0a7a4: 38 0a 00 01 addi r0,r10,1 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc0a7a8: 39 40 00 00 li r10,0 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc0a7ac: 90 09 27 fc stw r0,10236(r9) { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc0a7b0: 91 41 00 08 stw r10,8(r1) * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc0a7b4: 93 e1 00 24 stw r31,36(r1) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc0a7b8: 48 00 28 dd bl ffc0d094 <_Timespec_Add_to> /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); ffc0a7bc: 3c 60 00 00 lis r3,0 ffc0a7c0: 38 63 27 e0 addi r3,r3,10208 ffc0a7c4: 38 81 00 08 addi r4,r1,8 ffc0a7c8: 48 00 28 cd bl ffc0d094 <_Timespec_Add_to> while ( seconds ) { ffc0a7cc: 7c 60 1b 79 mr. r0,r3 ffc0a7d0: 90 01 00 18 stw r0,24(r1) ffc0a7d4: 41 82 00 24 beq- ffc0a7f8 <_TOD_Tickle_ticks+0x84> ffc0a7d8: 3f e0 00 00 lis r31,0 ffc0a7dc: 3b ff 2c dc addi r31,r31,11484 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); ffc0a7e0: 7f e3 fb 78 mr r3,r31 ffc0a7e4: 48 00 30 b5 bl ffc0d898 <_Watchdog_Tickle> ffc0a7e8: 80 01 00 18 lwz r0,24(r1) ffc0a7ec: 35 20 ff ff addic. r9,r0,-1 ffc0a7f0: 91 21 00 18 stw r9,24(r1) ffc0a7f4: 40 82 ff ec bne+ ffc0a7e0 <_TOD_Tickle_ticks+0x6c> <== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } ffc0a7f8: 80 01 00 2c lwz r0,44(r1) ffc0a7fc: 83 e1 00 24 lwz r31,36(r1) ffc0a800: 38 21 00 28 addi r1,r1,40 ffc0a804: 7c 08 03 a6 mtlr r0 ffc0a808: 4e 80 00 20 blr =============================================================================== ffc0bd18 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { ffc0bd18: 94 21 ff e8 stwu r1,-24(r1) ffc0bd1c: 7c 08 02 a6 mflr r0 ffc0bd20: 90 01 00 1c stw r0,28(r1) ffc0bd24: 93 e1 00 14 stw r31,20(r1) ffc0bd28: 7c 7f 1b 78 mr r31,r3 ffc0bd2c: 93 81 00 08 stw r28,8(r1) ffc0bd30: 7c bc 2b 78 mr r28,r5 ffc0bd34: 93 a1 00 0c stw r29,12(r1) ffc0bd38: 93 c1 00 10 stw r30,16(r1) ffc0bd3c: 7c 9e 23 78 mr r30,r4 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; ffc0bd40: 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 ); ffc0bd44: 48 00 11 2d bl ffc0ce70 <_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 ) ffc0bd48: 80 1f 00 14 lwz r0,20(r31) ffc0bd4c: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0bd50: 41 9e 00 10 beq- cr7,ffc0bd60 <_Thread_Change_priority+0x48> _Thread_Set_priority( the_thread, new_priority ); ffc0bd54: 7f e3 fb 78 mr r3,r31 ffc0bd58: 7f c4 f3 78 mr r4,r30 ffc0bd5c: 48 00 10 6d bl ffc0cdc8 <_Thread_Set_priority> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0bd60: 7f c0 00 a6 mfmsr r30 ffc0bd64: 7c 10 42 a6 mfsprg r0,0 ffc0bd68: 7f c0 00 78 andc r0,r30,r0 ffc0bd6c: 7c 00 01 24 mtmsr r0 /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; ffc0bd70: 80 1f 00 10 lwz r0,16(r31) if ( state != STATES_TRANSIENT ) { ffc0bd74: 2f 80 00 04 cmpwi cr7,r0,4 ffc0bd78: 41 9e 00 88 beq- cr7,ffc0be00 <_Thread_Change_priority+0xe8> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) ffc0bd7c: 73 a9 00 04 andi. r9,r29,4 ffc0bd80: 41 82 00 38 beq- ffc0bdb8 <_Thread_Change_priority+0xa0><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0bd84: 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); ffc0bd88: 3d 20 00 03 lis r9,3 <== NOT EXECUTED ffc0bd8c: 61 29 be e0 ori r9,r9,48864 <== NOT EXECUTED the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0bd90: 7c 0b 48 39 and. r11,r0,r9 <== NOT EXECUTED ffc0bd94: 40 82 00 40 bne- ffc0bdd4 <_Thread_Change_priority+0xbc><== NOT EXECUTED if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0bd98: 80 01 00 1c lwz r0,28(r1) ffc0bd9c: 83 81 00 08 lwz r28,8(r1) ffc0bda0: 7c 08 03 a6 mtlr r0 ffc0bda4: 83 a1 00 0c lwz r29,12(r1) ffc0bda8: 83 c1 00 10 lwz r30,16(r1) ffc0bdac: 83 e1 00 14 lwz r31,20(r1) ffc0bdb0: 38 21 00 18 addi r1,r1,24 ffc0bdb4: 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); ffc0bdb8: 54 09 07 b8 rlwinm r9,r0,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 ); ffc0bdbc: 91 3f 00 10 stw r9,16(r31) ffc0bdc0: 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); ffc0bdc4: 3d 20 00 03 lis r9,3 ffc0bdc8: 61 29 be e0 ori r9,r9,48864 _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0bdcc: 7c 0b 48 39 and. r11,r0,r9 ffc0bdd0: 41 82 ff c8 beq+ ffc0bd98 <_Thread_Change_priority+0x80> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc0bdd4: 80 7f 00 44 lwz r3,68(r31) ffc0bdd8: 7f e4 fb 78 mr r4,r31 ffc0bddc: 48 00 0e f1 bl ffc0cccc <_Thread_queue_Requeue> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0bde0: 80 01 00 1c lwz r0,28(r1) ffc0bde4: 83 81 00 08 lwz r28,8(r1) ffc0bde8: 7c 08 03 a6 mtlr r0 ffc0bdec: 83 a1 00 0c lwz r29,12(r1) ffc0bdf0: 83 c1 00 10 lwz r30,16(r1) ffc0bdf4: 83 e1 00 14 lwz r31,20(r1) ffc0bdf8: 38 21 00 18 addi r1,r1,24 ffc0bdfc: 4e 80 00 20 blr } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { ffc0be00: 73 bd 00 04 andi. r29,r29,4 ffc0be04: 41 82 00 74 beq- ffc0be78 <_Thread_Change_priority+0x160><== ALWAYS TAKEN ffc0be08: 3f a0 00 00 lis r29,0 <== NOT EXECUTED ffc0be0c: 3b bd 20 e0 addi r29,r29,8416 <== NOT EXECUTED static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0be10: 7c 00 00 a6 mfmsr r0 ffc0be14: 7f c0 01 24 mtmsr r30 ffc0be18: 7c 00 01 24 mtmsr r0 * 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(); ffc0be1c: 80 1d 00 08 lwz r0,8(r29) ffc0be20: 7c 09 03 a6 mtctr r0 ffc0be24: 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 ); ffc0be28: 3d 20 00 00 lis r9,0 ffc0be2c: 39 29 2d b8 addi r9,r9,11704 ffc0be30: 81 69 00 0c lwz r11,12(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() && ffc0be34: 80 09 00 10 lwz r0,16(r9) ffc0be38: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0be3c: 41 9e 00 18 beq- cr7,ffc0be54 <_Thread_Change_priority+0x13c> ffc0be40: 88 0b 00 74 lbz r0,116(r11) ffc0be44: 2f 80 00 00 cmpwi cr7,r0,0 ffc0be48: 41 9e 00 0c beq- cr7,ffc0be54 <_Thread_Change_priority+0x13c> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; ffc0be4c: 38 00 00 01 li r0,1 ffc0be50: 98 09 00 18 stb r0,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0be54: 7f c0 01 24 mtmsr r30 _ISR_Enable( level ); } ffc0be58: 80 01 00 1c lwz r0,28(r1) ffc0be5c: 83 81 00 08 lwz r28,8(r1) ffc0be60: 7c 08 03 a6 mtlr r0 ffc0be64: 83 a1 00 0c lwz r29,12(r1) ffc0be68: 83 c1 00 10 lwz r30,16(r1) ffc0be6c: 83 e1 00 14 lwz r31,20(r1) ffc0be70: 38 21 00 18 addi r1,r1,24 ffc0be74: 4e 80 00 20 blr * 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 ) ffc0be78: 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 ); ffc0be7c: 93 bf 00 10 stw r29,16(r31) */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); ffc0be80: 3f a0 00 00 lis r29,0 ffc0be84: 3b bd 20 e0 addi r29,r29,8416 if ( prepend_it ) ffc0be88: 41 9e 00 18 beq- cr7,ffc0bea0 <_Thread_Change_priority+0x188> ffc0be8c: 80 1d 00 28 lwz r0,40(r29) ffc0be90: 7f e3 fb 78 mr r3,r31 ffc0be94: 7c 09 03 a6 mtctr r0 ffc0be98: 4e 80 04 21 bctrl ffc0be9c: 4b ff ff 74 b ffc0be10 <_Thread_Change_priority+0xf8> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); ffc0bea0: 80 1d 00 24 lwz r0,36(r29) ffc0bea4: 7f e3 fb 78 mr r3,r31 ffc0bea8: 7c 09 03 a6 mtctr r0 ffc0beac: 4e 80 04 21 bctrl ffc0beb0: 4b ff ff 60 b ffc0be10 <_Thread_Change_priority+0xf8> =============================================================================== ffc0c12c <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c12c: 94 21 ff e8 stwu r1,-24(r1) ffc0c130: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c134: 38 81 00 08 addi r4,r1,8 void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c138: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c13c: 48 00 02 35 bl ffc0c370 <_Thread_Get> switch ( location ) { ffc0c140: 80 01 00 08 lwz r0,8(r1) ffc0c144: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c148: 40 9e 00 24 bne- cr7,ffc0c16c <_Thread_Delay_ended+0x40><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( ffc0c14c: 3c 80 10 00 lis r4,4096 ffc0c150: 60 84 00 18 ori r4,r4,24 ffc0c154: 4b ff fd 61 bl ffc0beb4 <_Thread_Clear_state> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; ffc0c158: 3d 20 00 00 lis r9,0 ffc0c15c: 81 69 27 c8 lwz r11,10184(r9) ffc0c160: 38 0b ff ff addi r0,r11,-1 ffc0c164: 90 09 27 c8 stw r0,10184(r9) return _Thread_Dispatch_disable_level; ffc0c168: 80 09 27 c8 lwz r0,10184(r9) | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } ffc0c16c: 80 01 00 1c lwz r0,28(r1) ffc0c170: 38 21 00 18 addi r1,r1,24 ffc0c174: 7c 08 03 a6 mtlr r0 ffc0c178: 4e 80 00 20 blr =============================================================================== ffc0c17c <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0c17c: 94 21 ff c8 stwu r1,-56(r1) ffc0c180: 7c 08 02 a6 mflr r0 ffc0c184: 93 21 00 1c stw r25,28(r1) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc0c188: 3f 20 00 00 lis r25,0 ffc0c18c: 81 39 27 c8 lwz r9,10184(r25) ffc0c190: 90 01 00 3c stw r0,60(r1) ffc0c194: 38 09 00 01 addi r0,r9,1 ffc0c198: 90 19 27 c8 stw r0,10184(r25) ffc0c19c: 93 01 00 18 stw r24,24(r1) return _Thread_Dispatch_disable_level; ffc0c1a0: 80 19 27 c8 lwz r0,10184(r25) ffc0c1a4: 93 41 00 20 stw r26,32(r1) ffc0c1a8: 93 61 00 24 stw r27,36(r1) ffc0c1ac: 93 81 00 28 stw r28,40(r1) ffc0c1b0: 93 a1 00 2c stw r29,44(r1) ffc0c1b4: 93 c1 00 30 stw r30,48(r1) ffc0c1b8: 93 e1 00 34 stw r31,52(r1) #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; ffc0c1bc: 3f a0 00 00 lis r29,0 ffc0c1c0: 3b bd 2d b8 addi r29,r29,11704 ffc0c1c4: 83 fd 00 0c lwz r31,12(r29) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0c1c8: 7c 00 00 a6 mfmsr r0 ffc0c1cc: 7d 30 42 a6 mfsprg r9,0 ffc0c1d0: 7c 09 48 78 andc r9,r0,r9 ffc0c1d4: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc0c1d8: 89 3d 00 18 lbz r9,24(r29) ffc0c1dc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c1e0: 41 9e 01 14 beq- cr7,ffc0c2f4 <_Thread_Dispatch+0x178> heir = _Thread_Heir; ffc0c1e4: 83 dd 00 10 lwz r30,16(r29) _Thread_Dispatch_necessary = false; ffc0c1e8: 39 20 00 00 li r9,0 ffc0c1ec: 99 3d 00 18 stb r9,24(r29) /* * 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 ) ffc0c1f0: 7f 9f f0 00 cmpw cr7,r31,r30 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; _Thread_Executing = heir; ffc0c1f4: 93 dd 00 0c stw r30,12(r29) /* * 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 ) ffc0c1f8: 41 9e 00 fc beq- cr7,ffc0c2f4 <_Thread_Dispatch+0x178> ffc0c1fc: 3f 80 00 00 lis r28,0 ffc0c200: 3b 7d 00 1c addi r27,r29,28 ffc0c204: 3b 9c 27 dc addi r28,r28,10204 #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; ffc0c208: 3f 00 00 00 lis r24,0 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; ffc0c20c: 3b 40 00 00 li r26,0 ffc0c210: 48 00 00 cc b ffc0c2dc <_Thread_Dispatch+0x160> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c214: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc0c218: 38 61 00 10 addi r3,r1,16 ffc0c21c: 48 00 40 61 bl ffc1027c <_TOD_Get_uptime> _Timestamp_Subtract( ffc0c220: 7f 63 db 78 mr r3,r27 ffc0c224: 38 81 00 10 addi r4,r1,16 ffc0c228: 38 a1 00 08 addi r5,r1,8 ffc0c22c: 48 00 0e c5 bl ffc0d0f0 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); ffc0c230: 38 81 00 08 addi r4,r1,8 ffc0c234: 38 7f 00 84 addi r3,r31,132 ffc0c238: 48 00 0e 5d bl ffc0d094 <_Timespec_Add_to> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c23c: 81 3c 00 00 lwz r9,0(r28) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0c240: 81 41 00 10 lwz r10,16(r1) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); ffc0c244: 7f e3 fb 78 mr r3,r31 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c248: 2f 89 00 00 cmpwi cr7,r9,0 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0c24c: 81 61 00 14 lwz r11,20(r1) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); ffc0c250: 7f c4 f3 78 mr r4,r30 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0c254: 91 5d 00 1c stw r10,28(r29) ffc0c258: 91 7d 00 20 stw r11,32(r29) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c25c: 41 9e 00 14 beq- cr7,ffc0c270 <_Thread_Dispatch+0xf4> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; ffc0c260: 80 09 00 00 lwz r0,0(r9) ffc0c264: 90 1f 01 28 stw r0,296(r31) *_Thread_libc_reent = heir->libc_reent; ffc0c268: 80 1e 01 28 lwz r0,296(r30) ffc0c26c: 90 09 00 00 stw r0,0(r9) } _User_extensions_Thread_switch( executing, heir ); ffc0c270: 48 00 13 15 bl ffc0d584 <_User_extensions_Thread_switch> * operations. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE ) if ( executing->fp_context != NULL ) ffc0c274: 80 1f 01 24 lwz r0,292(r31) _Context_Save_fp( &executing->fp_context ); ffc0c278: 38 7f 01 24 addi r3,r31,292 * operations. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE ) if ( executing->fp_context != NULL ) ffc0c27c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c280: 41 9e 00 08 beq- cr7,ffc0c288 <_Thread_Dispatch+0x10c> _Context_Save_fp( &executing->fp_context ); ffc0c284: 48 01 10 1d bl ffc1d2a0 <_CPU_Context_save_fp> #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); ffc0c288: 38 7f 00 c4 addi r3,r31,196 ffc0c28c: 38 9e 00 c4 addi r4,r30,196 ffc0c290: 48 01 11 91 bl ffc1d420 <_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 ) ffc0c294: 80 1f 01 24 lwz r0,292(r31) _Context_Restore_fp( &executing->fp_context ); ffc0c298: 38 7f 01 24 addi r3,r31,292 _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); _Thread_Allocated_fp = executing; } #else if ( executing->fp_context != NULL ) ffc0c29c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c2a0: 41 9e 00 08 beq- cr7,ffc0c2a8 <_Thread_Dispatch+0x12c> _Context_Restore_fp( &executing->fp_context ); ffc0c2a4: 48 01 10 bd bl ffc1d360 <_CPU_Context_restore_fp> #endif #endif executing = _Thread_Executing; ffc0c2a8: 83 fd 00 0c lwz r31,12(r29) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0c2ac: 7c 00 00 a6 mfmsr r0 ffc0c2b0: 7d 30 42 a6 mfsprg r9,0 ffc0c2b4: 7c 09 48 78 andc r9,r0,r9 ffc0c2b8: 7d 20 01 24 mtmsr r9 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc0c2bc: 89 3d 00 18 lbz r9,24(r29) ffc0c2c0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c2c4: 41 9e 00 30 beq- cr7,ffc0c2f4 <_Thread_Dispatch+0x178> heir = _Thread_Heir; ffc0c2c8: 83 dd 00 10 lwz r30,16(r29) _Thread_Dispatch_necessary = false; ffc0c2cc: 9b 5d 00 18 stb r26,24(r29) /* * 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 ) ffc0c2d0: 7f 9e f8 00 cmpw cr7,r30,r31 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; _Thread_Executing = heir; ffc0c2d4: 93 dd 00 0c stw r30,12(r29) /* * 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 ) ffc0c2d8: 41 9e 00 1c beq- cr7,ffc0c2f4 <_Thread_Dispatch+0x178> <== NEVER TAKEN */ #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 ) ffc0c2dc: 81 3e 00 7c lwz r9,124(r30) ffc0c2e0: 2f 89 00 01 cmpwi cr7,r9,1 ffc0c2e4: 40 9e ff 30 bne+ cr7,ffc0c214 <_Thread_Dispatch+0x98> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0c2e8: 81 38 27 c4 lwz r9,10180(r24) ffc0c2ec: 91 3e 00 78 stw r9,120(r30) ffc0c2f0: 4b ff ff 24 b ffc0c214 <_Thread_Dispatch+0x98> * 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; ffc0c2f4: 39 20 00 00 li r9,0 ffc0c2f8: 91 39 27 c8 stw r9,10184(r25) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c2fc: 7c 00 01 24 mtmsr r0 post_switch: _Thread_Dispatch_set_disable_level( 0 ); _ISR_Enable( level ); _API_extensions_Run_postswitch(); ffc0c300: 4b ff dc 31 bl ffc09f30 <_API_extensions_Run_postswitch> } ffc0c304: 80 01 00 3c lwz r0,60(r1) ffc0c308: 83 01 00 18 lwz r24,24(r1) ffc0c30c: 7c 08 03 a6 mtlr r0 ffc0c310: 83 21 00 1c lwz r25,28(r1) ffc0c314: 83 41 00 20 lwz r26,32(r1) ffc0c318: 83 61 00 24 lwz r27,36(r1) ffc0c31c: 83 81 00 28 lwz r28,40(r1) ffc0c320: 83 a1 00 2c lwz r29,44(r1) ffc0c324: 83 c1 00 30 lwz r30,48(r1) ffc0c328: 83 e1 00 34 lwz r31,52(r1) ffc0c32c: 38 21 00 38 addi r1,r1,56 ffc0c330: 4e 80 00 20 blr =============================================================================== ffc12890 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc12890: 94 21 ff f0 stwu r1,-16(r1) ffc12894: 7c 08 02 a6 mflr r0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc12898: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc1289c: 90 01 00 14 stw r0,20(r1) ffc128a0: 93 e1 00 0c stw r31,12(r1) #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc128a4: 83 e9 2d c4 lwz r31,11716(r9) * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc128a8: 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; ffc128ac: 81 3f 00 ac lwz r9,172(r31) } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc128b0: 38 00 00 00 li r0,0 ffc128b4: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc128b8: 71 2b 00 01 andi. r11,r9,1 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; __asm__ volatile ( ffc128bc: 7d 30 42 a6 mfsprg r9,0 ffc128c0: 40 82 00 54 bne- ffc12914 <_Thread_Handler+0x84> msr |= ppc_interrupt_get_disable_mask(); ffc128c4: 7d 20 03 78 or r0,r9,r0 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc128c8: 7c 00 01 24 mtmsr r0 _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; ffc128cc: 3d 20 00 00 lis r9,0 ffc128d0: 8b c9 29 80 lbz r30,10624(r9) doneConstructors = 1; ffc128d4: 38 00 00 01 li r0,1 /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); ffc128d8: 7f e3 fb 78 mr r3,r31 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; ffc128dc: 98 09 29 80 stb r0,10624(r9) /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); ffc128e0: 4b ff a9 69 bl ffc0d248 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc128e4: 4b ff 9a 51 bl ffc0c334 <_Thread_Enable_dispatch> /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { ffc128e8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc128ec: 41 9e 00 30 beq- cr7,ffc1291c <_Thread_Handler+0x8c> #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc128f0: 80 1f 00 94 lwz r0,148(r31) ffc128f4: 2f 80 00 00 cmpwi cr7,r0,0 ffc128f8: 41 9e 00 2c beq- cr7,ffc12924 <_Thread_Handler+0x94> <== ALWAYS TAKEN * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); ffc128fc: 7f e3 fb 78 mr r3,r31 ffc12900: 4b ff a9 bd bl ffc0d2bc <_User_extensions_Thread_exitted> _Internal_error_Occurred( ffc12904: 38 60 00 00 li r3,0 ffc12908: 38 80 00 01 li r4,1 ffc1290c: 38 a0 00 05 li r5,5 ffc12910: 4b ff 83 95 bl ffc0aca4 <_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(); ffc12914: 7c 00 48 78 andc r0,r0,r9 ffc12918: 4b ff ff b0 b ffc128c8 <_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 (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); ffc1291c: 48 00 b7 81 bl ffc1e09c <_init> ffc12920: 4b ff ff d0 b ffc128f0 <_Thread_Handler+0x60> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( ffc12924: 80 1f 00 90 lwz r0,144(r31) ffc12928: 80 7f 00 9c lwz r3,156(r31) ffc1292c: 7c 09 03 a6 mtctr r0 ffc12930: 4e 80 04 21 bctrl } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = ffc12934: 90 7f 00 28 stw r3,40(r31) ffc12938: 4b ff ff c4 b ffc128fc <_Thread_Handler+0x6c> =============================================================================== ffc0c440 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0c440: 94 21 ff d0 stwu r1,-48(r1) ffc0c444: 7c 08 02 a6 mflr r0 ffc0c448: 93 c1 00 28 stw r30,40(r1) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0c44c: 3b c0 00 00 li r30,0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0c450: 90 01 00 34 stw r0,52(r1) ffc0c454: 92 e1 00 0c stw r23,12(r1) ffc0c458: 93 01 00 10 stw r24,16(r1) ffc0c45c: 7d 58 53 78 mr r24,r10 ffc0c460: 93 21 00 14 stw r25,20(r1) ffc0c464: 7d 39 4b 78 mr r25,r9 ffc0c468: 93 41 00 18 stw r26,24(r1) ffc0c46c: 7d 1a 43 78 mr r26,r8 ffc0c470: 93 61 00 1c stw r27,28(r1) ffc0c474: 7c fb 3b 78 mr r27,r7 ffc0c478: 93 81 00 20 stw r28,32(r1) ffc0c47c: 7c 7c 1b 78 mr r28,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 ); ffc0c480: 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 ) { ffc0c484: 93 a1 00 24 stw r29,36(r1) ffc0c488: 7c dd 33 78 mr r29,r6 ffc0c48c: 93 e1 00 2c stw r31,44(r1) ffc0c490: 7c 9f 23 78 mr r31,r4 ffc0c494: 81 61 00 40 lwz r11,64(r1) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0c498: 93 c4 01 2c stw r30,300(r4) ffc0c49c: 93 c4 01 30 stw r30,304(r4) extensions_area = NULL; the_thread->libc_reent = NULL; ffc0c4a0: 93 c4 01 28 stw r30,296(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 ); ffc0c4a4: 7c c4 33 78 mr r4,r6 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0c4a8: 82 eb 00 00 lwz r23,0(r11) /* * 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 ); ffc0c4ac: 48 00 0a 21 bl ffc0cecc <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0c4b0: 7c 60 1b 79 mr. r0,r3 return false; /* stack allocation failed */ ffc0c4b4: 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 ) ffc0c4b8: 41 82 01 20 beq- ffc0c5d8 <_Thread_Initialize+0x198> ffc0c4bc: 7f 9d 00 40 cmplw cr7,r29,r0 ffc0c4c0: 41 9d 01 18 bgt- cr7,ffc0c5d8 <_Thread_Initialize+0x198><== NEVER TAKEN /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0c4c4: 2f 9b 00 00 cmpwi cr7,r27,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0c4c8: 81 3f 00 c0 lwz r9,192(r31) the_stack->size = size; ffc0c4cc: 90 1f 00 b4 stw r0,180(r31) extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; ffc0c4d0: 3b a0 00 00 li r29,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0c4d4: 91 3f 00 b8 stw r9,184(r31) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0c4d8: 40 9e 01 34 bne- cr7,ffc0c60c <_Thread_Initialize+0x1cc> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c4dc: 3f c0 00 00 lis r30,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; ffc0c4e0: 93 bf 01 24 stw r29,292(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0c4e4: 38 00 00 00 li r0,0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c4e8: 81 3e 27 e8 lwz r9,10216(r30) 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; ffc0c4ec: 93 bf 00 bc stw r29,188(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c4f0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c4f4: 90 1f 00 50 stw r0,80(r31) the_watchdog->routine = routine; ffc0c4f8: 90 1f 00 64 stw r0,100(r31) the_watchdog->id = id; ffc0c4fc: 90 1f 00 68 stw r0,104(r31) the_watchdog->user_data = user_data; ffc0c500: 90 1f 00 6c stw r0,108(r31) ffc0c504: 40 9e 01 24 bne- cr7,ffc0c628 <_Thread_Initialize+0x1e8> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c508: 91 3f 01 34 stw r9,308(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; ffc0c50c: 3b 60 00 00 li r27,0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0c510: 80 01 00 38 lwz r0,56(r1) */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); ffc0c514: 3d 20 00 00 lis r9,0 } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; ffc0c518: 3b c0 00 00 li r30,0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; ffc0c51c: 9b 3f 00 a0 stb r25,160(r31) ffc0c520: 7f e3 fb 78 mr r3,r31 the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0c524: 90 1f 00 a8 stw r0,168(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0c528: 80 01 00 3c lwz r0,60(r1) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; ffc0c52c: 93 1f 00 a4 stw r24,164(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0c530: 90 1f 00 ac stw r0,172(r31) the_thread->current_state = STATES_DORMANT; ffc0c534: 38 00 00 01 li r0,1 ffc0c538: 90 1f 00 10 stw r0,16(r31) ffc0c53c: 80 09 20 f8 lwz r0,8440(r9) the_thread->Wait.queue = NULL; ffc0c540: 93 df 00 44 stw r30,68(r31) ffc0c544: 7c 09 03 a6 mtctr r0 the_thread->resource_count = 0; ffc0c548: 93 df 00 1c stw r30,28(r31) the_thread->real_priority = priority; ffc0c54c: 93 5f 00 18 stw r26,24(r31) the_thread->Start.initial_priority = priority; ffc0c550: 93 5f 00 b0 stw r26,176(r31) ffc0c554: 4e 80 04 21 bctrl sched =_Scheduler_Allocate( the_thread ); if ( !sched ) ffc0c558: 7c 79 1b 79 mr. r25,r3 ffc0c55c: 41 82 00 40 beq- ffc0c59c <_Thread_Initialize+0x15c> goto failed; _Thread_Set_priority( the_thread, priority ); ffc0c560: 7f e3 fb 78 mr r3,r31 ffc0c564: 7f 44 d3 78 mr r4,r26 ffc0c568: 48 00 08 61 bl ffc0cdc8 <_Thread_Set_priority> Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( ffc0c56c: a0 1f 00 0a lhz r0,10(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0c570: 81 3c 00 1c lwz r9,28(r28) * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); ffc0c574: 7f e3 fb 78 mr r3,r31 ffc0c578: 54 00 10 3a rlwinm r0,r0,2,0,29 /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); ffc0c57c: 93 df 00 84 stw r30,132(r31) ffc0c580: 93 df 00 88 stw r30,136(r31) ffc0c584: 7f e9 01 2e stwx r31,r9,r0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0c588: 92 ff 00 0c stw r23,12(r31) * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); ffc0c58c: 48 00 0e 31 bl ffc0d3bc <_User_extensions_Thread_create> if ( extension_status ) ffc0c590: 2f 83 00 00 cmpwi cr7,r3,0 return true; ffc0c594: 38 60 00 01 li r3,1 * 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 ) ffc0c598: 40 9e 00 40 bne- cr7,ffc0c5d8 <_Thread_Initialize+0x198> return true; failed: _Workspace_Free( the_thread->libc_reent ); ffc0c59c: 80 7f 01 28 lwz r3,296(r31) ffc0c5a0: 48 00 14 89 bl ffc0da28 <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); ffc0c5a4: 80 7f 01 2c lwz r3,300(r31) ffc0c5a8: 48 00 14 81 bl ffc0da28 <_Workspace_Free> ffc0c5ac: 80 7f 01 30 lwz r3,304(r31) ffc0c5b0: 48 00 14 79 bl ffc0da28 <_Workspace_Free> _Workspace_Free( extensions_area ); ffc0c5b4: 7f 63 db 78 mr r3,r27 ffc0c5b8: 48 00 14 71 bl ffc0da28 <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); ffc0c5bc: 7f a3 eb 78 mr r3,r29 ffc0c5c0: 48 00 14 69 bl ffc0da28 <_Workspace_Free> #endif _Workspace_Free( sched ); ffc0c5c4: 7f 23 cb 78 mr r3,r25 ffc0c5c8: 48 00 14 61 bl ffc0da28 <_Workspace_Free> _Thread_Stack_Free( the_thread ); ffc0c5cc: 7f e3 fb 78 mr r3,r31 ffc0c5d0: 48 00 09 a5 bl ffc0cf74 <_Thread_Stack_Free> return false; ffc0c5d4: 38 60 00 00 li r3,0 } ffc0c5d8: 80 01 00 34 lwz r0,52(r1) ffc0c5dc: 82 e1 00 0c lwz r23,12(r1) ffc0c5e0: 7c 08 03 a6 mtlr r0 ffc0c5e4: 83 01 00 10 lwz r24,16(r1) ffc0c5e8: 83 21 00 14 lwz r25,20(r1) ffc0c5ec: 83 41 00 18 lwz r26,24(r1) ffc0c5f0: 83 61 00 1c lwz r27,28(r1) ffc0c5f4: 83 81 00 20 lwz r28,32(r1) ffc0c5f8: 83 a1 00 24 lwz r29,36(r1) ffc0c5fc: 83 c1 00 28 lwz r30,40(r1) ffc0c600: 83 e1 00 2c lwz r31,44(r1) ffc0c604: 38 21 00 30 addi r1,r1,48 ffc0c608: 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 ); ffc0c60c: 38 60 01 08 li r3,264 ffc0c610: 48 00 13 e5 bl ffc0d9f4 <_Workspace_Allocate> if ( !fp_area ) ffc0c614: 7c 7d 1b 79 mr. r29,r3 ffc0c618: 40 82 fe c4 bne+ ffc0c4dc <_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; ffc0c61c: 3b 60 00 00 li r27,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; ffc0c620: 3b 20 00 00 li r25,0 ffc0c624: 4b ff ff 78 b ffc0c59c <_Thread_Initialize+0x15c> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( ffc0c628: 39 29 00 01 addi r9,r9,1 ffc0c62c: 55 23 10 3a rlwinm r3,r9,2,0,29 ffc0c630: 48 00 13 c5 bl ffc0d9f4 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) ffc0c634: 7c 7b 1b 79 mr. r27,r3 ffc0c638: 41 82 00 40 beq- ffc0c678 <_Thread_Initialize+0x238> goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c63c: 93 7f 01 34 stw r27,308(r31) ffc0c640: 7f 6b db 78 mr r11,r27 * 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++ ) ffc0c644: 38 00 00 00 li r0,0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c648: 81 1e 27 e8 lwz r8,10216(r30) ffc0c64c: 39 20 00 00 li r9,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; ffc0c650: 39 40 00 00 li r10,0 ffc0c654: 48 00 00 08 b ffc0c65c <_Thread_Initialize+0x21c> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c658: 81 7f 01 34 lwz r11,308(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++ ) ffc0c65c: 39 29 00 01 addi r9,r9,1 ffc0c660: 7f 89 40 40 cmplw cr7,r9,r8 the_thread->extensions[i] = NULL; ffc0c664: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c668: 7d 4b 01 2e stwx r10,r11,r0 * 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++ ) ffc0c66c: 7d 20 4b 78 mr r0,r9 ffc0c670: 40 9d ff e8 ble+ cr7,ffc0c658 <_Thread_Initialize+0x218> ffc0c674: 4b ff fe 9c b ffc0c510 <_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; ffc0c678: 3b 20 00 00 li r25,0 ffc0c67c: 4b ff ff 20 b ffc0c59c <_Thread_Initialize+0x15c> =============================================================================== ffc0d894 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0d894: 94 21 ff e8 stwu r1,-24(r1) ffc0d898: 7c 08 02 a6 mflr r0 ffc0d89c: 90 01 00 1c stw r0,28(r1) */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); ffc0d8a0: 80 03 00 10 lwz r0,16(r3) ffc0d8a4: 93 e1 00 14 stw r31,20(r1) ffc0d8a8: 7c 7f 1b 78 mr r31,r3 if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0d8ac: 70 09 00 01 andi. r9,r0,1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0d8b0: 93 c1 00 10 stw r30,16(r1) _Thread_Restart_self(); return true; } return false; ffc0d8b4: 38 00 00 00 li r0,0 Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0d8b8: 41 82 00 20 beq- ffc0d8d8 <_Thread_Restart+0x44> return true; } return false; } ffc0d8bc: 7c 03 03 78 mr r3,r0 ffc0d8c0: 80 01 00 1c lwz r0,28(r1) ffc0d8c4: 83 c1 00 10 lwz r30,16(r1) ffc0d8c8: 7c 08 03 a6 mtlr r0 ffc0d8cc: 83 e1 00 14 lwz r31,20(r1) ffc0d8d0: 38 21 00 18 addi r1,r1,24 ffc0d8d4: 4e 80 00 20 blr Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); ffc0d8d8: 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 ); ffc0d8dc: 3f c0 00 00 lis r30,0 ffc0d8e0: 3b de 2d d8 addi r30,r30,11736 ffc0d8e4: 90 a1 00 0c stw r5,12(r1) ffc0d8e8: 48 00 01 05 bl ffc0d9ec <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); ffc0d8ec: 7f e3 fb 78 mr r3,r31 ffc0d8f0: 80 81 00 08 lwz r4,8(r1) ffc0d8f4: 80 a1 00 0c lwz r5,12(r1) ffc0d8f8: 48 00 3d cd bl ffc116c4 <_Thread_Reset> _Thread_Load_environment( the_thread ); ffc0d8fc: 7f e3 fb 78 mr r3,r31 ffc0d900: 48 00 3a 31 bl ffc11330 <_Thread_Load_environment> _Thread_Ready( the_thread ); ffc0d904: 7f e3 fb 78 mr r3,r31 ffc0d908: 48 00 3d 6d bl ffc11674 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); ffc0d90c: 7f e3 fb 78 mr r3,r31 ffc0d910: 48 00 07 69 bl ffc0e078 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) ffc0d914: 81 3e 00 0c lwz r9,12(r30) _Thread_Restart_self(); return true; ffc0d918: 38 00 00 01 li r0,1 _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) ffc0d91c: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0d920: 40 9e ff 9c bne+ cr7,ffc0d8bc <_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 ) ffc0d924: 80 1f 01 24 lwz r0,292(r31) ffc0d928: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d92c: 41 9e 00 0c beq- cr7,ffc0d938 <_Thread_Restart+0xa4> <== NEVER TAKEN _Context_Restore_fp( &_Thread_Executing->fp_context ); ffc0d930: 38 7f 01 24 addi r3,r31,292 ffc0d934: 48 01 06 cd bl ffc1e000 <_CPU_Context_restore_fp> #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); ffc0d938: 80 7e 00 0c lwz r3,12(r30) ffc0d93c: 38 63 00 c4 addi r3,r3,196 ffc0d940: 48 01 08 81 bl ffc1e1c0 <_CPU_Context_restore> =============================================================================== ffc0cccc <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0cccc: 94 21 ff d8 stwu r1,-40(r1) ffc0ccd0: 7c 08 02 a6 mflr r0 ffc0ccd4: 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 ) ffc0ccd8: 7c 7f 1b 79 mr. r31,r3 void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0ccdc: 93 c1 00 20 stw r30,32(r1) ffc0cce0: 7c 9e 23 78 mr r30,r4 ffc0cce4: 90 01 00 2c stw r0,44(r1) ffc0cce8: 93 a1 00 1c stw r29,28(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0ccec: 41 82 00 10 beq- ffc0ccfc <_Thread_queue_Requeue+0x30> <== 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 ) { ffc0ccf0: 80 1f 00 34 lwz r0,52(r31) ffc0ccf4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ccf8: 41 9e 00 20 beq- cr7,ffc0cd18 <_Thread_queue_Requeue+0x4c><== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } ffc0ccfc: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc0cd00: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc0cd04: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0cd08: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc0cd0c: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc0cd10: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc0cd14: 4e 80 00 20 blr <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0cd18: 7f a0 00 a6 mfmsr r29 ffc0cd1c: 7d 30 42 a6 mfsprg r9,0 ffc0cd20: 7f a9 48 78 andc r9,r29,r9 ffc0cd24: 7d 20 01 24 mtmsr r9 ffc0cd28: 3d 60 00 03 lis r11,3 ffc0cd2c: 81 24 00 10 lwz r9,16(r4) ffc0cd30: 61 6b be e0 ori r11,r11,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 ) ) { ffc0cd34: 7d 6a 48 39 and. r10,r11,r9 ffc0cd38: 40 82 00 24 bne- ffc0cd5c <_Thread_queue_Requeue+0x90> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0cd3c: 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 ); } } ffc0cd40: 80 01 00 2c lwz r0,44(r1) ffc0cd44: 83 a1 00 1c lwz r29,28(r1) ffc0cd48: 7c 08 03 a6 mtlr r0 ffc0cd4c: 83 c1 00 20 lwz r30,32(r1) ffc0cd50: 83 e1 00 24 lwz r31,36(r1) ffc0cd54: 38 21 00 28 addi r1,r1,40 ffc0cd58: 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; ffc0cd5c: 90 1f 00 30 stw r0,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 ); ffc0cd60: 38 a0 00 01 li r5,1 ffc0cd64: 48 00 3b a5 bl ffc10908 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); ffc0cd68: 7f e3 fb 78 mr r3,r31 ffc0cd6c: 7f c4 f3 78 mr r4,r30 ffc0cd70: 38 a1 00 08 addi r5,r1,8 ffc0cd74: 4b ff fc 81 bl ffc0c9f4 <_Thread_queue_Enqueue_priority> ffc0cd78: 7f a0 01 24 mtmsr r29 ffc0cd7c: 4b ff ff c4 b ffc0cd40 <_Thread_queue_Requeue+0x74> =============================================================================== ffc0cd80 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0cd80: 94 21 ff e8 stwu r1,-24(r1) ffc0cd84: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0cd88: 38 81 00 08 addi r4,r1,8 void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0cd8c: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0cd90: 4b ff f5 e1 bl ffc0c370 <_Thread_Get> switch ( location ) { ffc0cd94: 80 01 00 08 lwz r0,8(r1) ffc0cd98: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cd9c: 40 9e 00 1c bne- cr7,ffc0cdb8 <_Thread_queue_Timeout+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); ffc0cda0: 48 00 3c 69 bl ffc10a08 <_Thread_queue_Process_timeout> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; ffc0cda4: 3d 20 00 00 lis r9,0 ffc0cda8: 81 69 27 c8 lwz r11,10184(r9) ffc0cdac: 38 0b ff ff addi r0,r11,-1 ffc0cdb0: 90 09 27 c8 stw r0,10184(r9) return _Thread_Dispatch_disable_level; ffc0cdb4: 80 09 27 c8 lwz r0,10184(r9) _Thread_Unnest_dispatch(); break; } } ffc0cdb8: 80 01 00 1c lwz r0,28(r1) ffc0cdbc: 38 21 00 18 addi r1,r1,24 ffc0cdc0: 7c 08 03 a6 mtlr r0 ffc0cdc4: 4e 80 00 20 blr =============================================================================== ffc1c394 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1c394: 94 21 ff 98 stwu r1,-104(r1) ffc1c398: 7c 08 02 a6 mflr r0 ffc1c39c: 92 a1 00 3c stw r21,60(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1c3a0: 3a a1 00 14 addi r21,r1,20 ffc1c3a4: 90 01 00 6c stw r0,108(r1) head->previous = NULL; ffc1c3a8: 38 00 00 00 li r0,0 ffc1c3ac: 92 e1 00 44 stw r23,68(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1c3b0: 3a e1 00 0c addi r23,r1,12 ffc1c3b4: 93 41 00 50 stw r26,80(r1) ffc1c3b8: 3b 41 00 18 addi r26,r1,24 ffc1c3bc: 93 81 00 58 stw r28,88(r1) head->previous = NULL; tail->previous = head; ffc1c3c0: 3b 81 00 08 addi r28,r1,8 ffc1c3c4: 92 81 00 38 stw r20,56(r1) ffc1c3c8: 3e 80 00 00 lis r20,0 ffc1c3cc: 3a 94 28 9c addi r20,r20,10396 ffc1c3d0: 93 01 00 48 stw r24,72(r1) ffc1c3d4: 3f 00 00 00 lis r24,0 ffc1c3d8: 3b 18 28 d0 addi r24,r24,10448 ffc1c3dc: 93 21 00 4c stw r25,76(r1) ffc1c3e0: 3f 20 00 00 lis r25,0 ffc1c3e4: 3b 39 28 b4 addi r25,r25,10420 ffc1c3e8: 93 c1 00 60 stw r30,96(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1c3ec: 93 41 00 14 stw r26,20(r1) head->previous = NULL; ffc1c3f0: 90 01 00 18 stw r0,24(r1) tail->previous = head; ffc1c3f4: 92 a1 00 1c stw r21,28(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1c3f8: 92 e1 00 08 stw r23,8(r1) head->previous = NULL; ffc1c3fc: 90 01 00 0c stw r0,12(r1) tail->previous = head; ffc1c400: 93 81 00 10 stw r28,16(r1) ffc1c404: 92 01 00 28 stw r16,40(r1) ffc1c408: 3a 03 00 08 addi r16,r3,8 ffc1c40c: 92 21 00 2c stw r17,44(r1) ffc1c410: 3a 23 00 40 addi r17,r3,64 ffc1c414: 92 41 00 30 stw r18,48(r1) * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; ffc1c418: 3a 40 00 00 li r18,0 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1c41c: 92 61 00 34 stw r19,52(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; ffc1c420: 3a 60 00 01 li r19,1 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1c424: 92 c1 00 40 stw r22,64(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; ffc1c428: 3a c0 00 00 li r22,0 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1c42c: 93 61 00 54 stw r27,84(r1) ffc1c430: 3b 63 00 68 addi r27,r3,104 ffc1c434: 93 a1 00 5c stw r29,92(r1) ffc1c438: 3b a3 00 30 addi r29,r3,48 ffc1c43c: 93 e1 00 64 stw r31,100(r1) ffc1c440: 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; ffc1c444: 92 bf 00 78 stw r21,120(r31) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1c448: 7f 85 e3 78 mr r5,r28 ffc1c44c: 7f a3 eb 78 mr r3,r29 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc1c450: 80 18 00 00 lwz r0,0(r24) /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc1c454: 80 9f 00 3c lwz r4,60(r31) watchdogs->last_snapshot = snapshot; ffc1c458: 90 1f 00 3c stw r0,60(r31) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1c45c: 7c 84 00 50 subf r4,r4,r0 ffc1c460: 48 00 57 91 bl ffc21bf0 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc1c464: 83 d9 00 00 lwz r30,0(r25) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc1c468: 80 bf 00 74 lwz r5,116(r31) /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { ffc1c46c: 7f 9e 28 40 cmplw cr7,r30,r5 ffc1c470: 41 9d 00 98 bgt- cr7,ffc1c508 <_Timer_server_Body+0x174> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { ffc1c474: 41 9c 00 a8 blt- cr7,ffc1c51c <_Timer_server_Body+0x188> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; ffc1c478: 93 df 00 74 stw r30,116(r31) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc1c47c: 80 7f 00 78 lwz r3,120(r31) ffc1c480: 48 00 0e 35 bl ffc1d2b4 <_Chain_Get> if ( timer == NULL ) { ffc1c484: 7c 64 1b 79 mr. r4,r3 ffc1c488: 41 82 00 34 beq- ffc1c4bc <_Timer_server_Body+0x128> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1c48c: 80 04 00 38 lwz r0,56(r4) ffc1c490: 2f 80 00 01 cmpwi cr7,r0,1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1c494: 2f 00 00 03 cmpwi cr6,r0,3 static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1c498: 41 9e 00 98 beq- cr7,ffc1c530 <_Timer_server_Body+0x19c> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1c49c: 40 9a ff e0 bne+ cr6,ffc1c47c <_Timer_server_Body+0xe8> <== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1c4a0: 38 84 00 10 addi r4,r4,16 ffc1c4a4: 7f 63 db 78 mr r3,r27 ffc1c4a8: 48 00 58 01 bl ffc21ca8 <_Watchdog_Insert> } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc1c4ac: 80 7f 00 78 lwz r3,120(r31) ffc1c4b0: 48 00 0e 05 bl ffc1d2b4 <_Chain_Get> if ( timer == NULL ) { ffc1c4b4: 7c 64 1b 79 mr. r4,r3 ffc1c4b8: 40 82 ff d4 bne+ ffc1c48c <_Timer_server_Body+0xf8> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1c4bc: 7d 20 00 a6 mfmsr r9 ffc1c4c0: 7c 10 42 a6 mfsprg r0,0 ffc1c4c4: 7d 20 00 78 andc r0,r9,r0 ffc1c4c8: 7c 00 01 24 mtmsr r0 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ffc1c4cc: 80 01 00 14 lwz r0,20(r1) ffc1c4d0: 7f 80 d0 00 cmpw cr7,r0,r26 ffc1c4d4: 41 9e 00 6c beq- cr7,ffc1c540 <_Timer_server_Body+0x1ac><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1c4d8: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc1c4dc: 80 18 00 00 lwz r0,0(r24) <== NOT EXECUTED */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1c4e0: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc1c4e4: 80 9f 00 3c lwz r4,60(r31) <== NOT EXECUTED watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1c4e8: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; ffc1c4ec: 90 1f 00 3c stw r0,60(r31) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1c4f0: 7c 84 00 50 subf r4,r4,r0 <== NOT EXECUTED ffc1c4f4: 48 00 56 fd bl ffc21bf0 <_Watchdog_Adjust_to_chain> <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc1c4f8: 83 d9 00 00 lwz r30,0(r25) <== NOT EXECUTED Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc1c4fc: 80 bf 00 74 lwz r5,116(r31) <== NOT EXECUTED /* * 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 ) { ffc1c500: 7f 9e 28 40 cmplw cr7,r30,r5 <== NOT EXECUTED ffc1c504: 40 9d ff 70 ble+ cr7,ffc1c474 <_Timer_server_Body+0xe0> <== NOT EXECUTED /* * 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 ); ffc1c508: 7c 85 f0 50 subf r4,r5,r30 ffc1c50c: 7f 63 db 78 mr r3,r27 ffc1c510: 7f 85 e3 78 mr r5,r28 ffc1c514: 48 00 56 dd bl ffc21bf0 <_Watchdog_Adjust_to_chain> ffc1c518: 4b ff ff 60 b ffc1c478 <_Timer_server_Body+0xe4> /* * 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 ); ffc1c51c: 7f 63 db 78 mr r3,r27 ffc1c520: 38 80 00 01 li r4,1 ffc1c524: 7c be 28 50 subf r5,r30,r5 ffc1c528: 48 00 55 ad bl ffc21ad4 <_Watchdog_Adjust> ffc1c52c: 4b ff ff 4c b ffc1c478 <_Timer_server_Body+0xe4> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1c530: 7f a3 eb 78 mr r3,r29 ffc1c534: 38 84 00 10 addi r4,r4,16 ffc1c538: 48 00 57 71 bl ffc21ca8 <_Watchdog_Insert> ffc1c53c: 4b ff ff 40 b ffc1c47c <_Timer_server_Body+0xe8> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; ffc1c540: 90 9f 00 78 stw r4,120(r31) ffc1c544: 7d 20 01 24 mtmsr r9 _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 ) ) { ffc1c548: 80 01 00 08 lwz r0,8(r1) ffc1c54c: 7f 80 b8 00 cmpw cr7,r0,r23 ffc1c550: 40 be 00 30 bne+ cr7,ffc1c580 <_Timer_server_Body+0x1ec> ffc1c554: 48 00 00 50 b ffc1c5a4 <_Timer_server_Body+0x210> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; ffc1c558: 81 69 00 00 lwz r11,0(r9) head->next = new_first; new_first->previous = head; ffc1c55c: 93 8b 00 04 stw r28,4(r11) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; ffc1c560: 91 61 00 08 stw r11,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; ffc1c564: 92 c9 00 08 stw r22,8(r9) ffc1c568: 7c 00 01 24 mtmsr r0 /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); ffc1c56c: 80 09 00 1c lwz r0,28(r9) ffc1c570: 80 69 00 20 lwz r3,32(r9) ffc1c574: 80 89 00 24 lwz r4,36(r9) ffc1c578: 7c 09 03 a6 mtctr r0 ffc1c57c: 4e 80 04 21 bctrl static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1c580: 7c 00 00 a6 mfmsr r0 ffc1c584: 7d 30 42 a6 mfsprg r9,0 ffc1c588: 7c 09 48 78 andc r9,r0,r9 ffc1c58c: 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; ffc1c590: 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)) ffc1c594: 7f 89 b8 00 cmpw cr7,r9,r23 ffc1c598: 40 9e ff c0 bne+ cr7,ffc1c558 <_Timer_server_Body+0x1c4> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1c59c: 7c 00 01 24 mtmsr r0 ffc1c5a0: 4b ff fe a4 b ffc1c444 <_Timer_server_Body+0xb0> } } else { ts->active = false; ffc1c5a4: 9a 5f 00 7c stb r18,124(r31) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc1c5a8: 80 14 00 00 lwz r0,0(r20) ffc1c5ac: 30 00 00 01 addic r0,r0,1 ffc1c5b0: 90 14 00 00 stw r0,0(r20) return _Thread_Dispatch_disable_level; ffc1c5b4: 80 14 00 00 lwz r0,0(r20) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); ffc1c5b8: 80 7f 00 00 lwz r3,0(r31) ffc1c5bc: 38 80 00 08 li r4,8 ffc1c5c0: 48 00 4c 0d bl ffc211cc <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1c5c4: 7f e3 fb 78 mr r3,r31 ffc1c5c8: 4b ff fc a5 bl ffc1c26c <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); ffc1c5cc: 7f e3 fb 78 mr r3,r31 ffc1c5d0: 4b ff fd 31 bl ffc1c300 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); ffc1c5d4: 48 00 40 85 bl ffc20658 <_Thread_Enable_dispatch> ts->active = true; ffc1c5d8: 9a 7f 00 7c stb r19,124(r31) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc1c5dc: 7e 03 83 78 mr r3,r16 ffc1c5e0: 48 00 58 91 bl ffc21e70 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc1c5e4: 7e 23 8b 78 mr r3,r17 ffc1c5e8: 48 00 58 89 bl ffc21e70 <_Watchdog_Remove> ffc1c5ec: 4b ff fe 58 b ffc1c444 <_Timer_server_Body+0xb0> =============================================================================== ffc1c5f0 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1c5f0: 94 21 ff f0 stwu r1,-16(r1) ffc1c5f4: 7c 08 02 a6 mflr r0 ffc1c5f8: 7c 89 23 78 mr r9,r4 ffc1c5fc: 90 01 00 14 stw r0,20(r1) if ( ts->insert_chain == NULL ) { ffc1c600: 80 03 00 78 lwz r0,120(r3) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1c604: 93 e1 00 0c stw r31,12(r1) ffc1c608: 7c 7f 1b 78 mr r31,r3 if ( ts->insert_chain == NULL ) { ffc1c60c: 2f 80 00 00 cmpwi cr7,r0,0 ffc1c610: 41 9e 00 20 beq- cr7,ffc1c630 <_Timer_server_Schedule_operation_method+0x40> * 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 ); ffc1c614: 80 63 00 78 lwz r3,120(r3) ffc1c618: 48 00 0c 45 bl ffc1d25c <_Chain_Append> } } ffc1c61c: 80 01 00 14 lwz r0,20(r1) ffc1c620: 83 e1 00 0c lwz r31,12(r1) ffc1c624: 38 21 00 10 addi r1,r1,16 ffc1c628: 7c 08 03 a6 mtlr r0 ffc1c62c: 4e 80 00 20 blr * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc1c630: 3d 60 00 00 lis r11,0 ffc1c634: 81 4b 28 9c lwz r10,10396(r11) ffc1c638: 38 0a 00 01 addi r0,r10,1 ffc1c63c: 90 0b 28 9c stw r0,10396(r11) return _Thread_Dispatch_disable_level; ffc1c640: 80 0b 28 9c lwz r0,10396(r11) * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1c644: 80 04 00 38 lwz r0,56(r4) ffc1c648: 2f 80 00 01 cmpwi cr7,r0,1 ffc1c64c: 41 9e 00 ac beq- cr7,ffc1c6f8 <_Timer_server_Schedule_operation_method+0x108> _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 ) { ffc1c650: 2f 80 00 03 cmpwi cr7,r0,3 ffc1c654: 41 9e 00 1c beq- cr7,ffc1c670 <_Timer_server_Schedule_operation_method+0x80> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); ffc1c658: 48 00 40 01 bl ffc20658 <_Thread_Enable_dispatch> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } ffc1c65c: 80 01 00 14 lwz r0,20(r1) ffc1c660: 83 e1 00 0c lwz r31,12(r1) ffc1c664: 38 21 00 10 addi r1,r1,16 ffc1c668: 7c 08 03 a6 mtlr r0 ffc1c66c: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1c670: 7c c0 00 a6 mfmsr r6 ffc1c674: 7c 10 42 a6 mfsprg r0,0 ffc1c678: 7c c0 00 78 andc r0,r6,r0 ffc1c67c: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc1c680: 81 63 00 68 lwz r11,104(r3) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc1c684: 38 03 00 6c addi r0,r3,108 /* * 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(); ffc1c688: 3d 40 00 00 lis r10,0 last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { ffc1c68c: 7f 8b 00 00 cmpw cr7,r11,r0 /* * 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(); ffc1c690: 80 0a 28 b4 lwz r0,10420(r10) last_snapshot = ts->TOD_watchdogs.last_snapshot; ffc1c694: 81 43 00 74 lwz r10,116(r3) if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { ffc1c698: 41 9e 00 30 beq- cr7,ffc1c6c8 <_Timer_server_Schedule_operation_method+0xd8> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { ffc1c69c: 7f 80 50 40 cmplw cr7,r0,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; ffc1c6a0: 80 eb 00 10 lwz r7,16(r11) } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; ffc1c6a4: 7d 07 52 14 add r8,r7,r10 delta_interval += delta; ffc1c6a8: 7d 00 40 50 subf r8,r0,r8 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { ffc1c6ac: 40 9d 00 18 ble- cr7,ffc1c6c4 <_Timer_server_Schedule_operation_method+0xd4> /* * We advanced in time. */ delta = snapshot - last_snapshot; ffc1c6b0: 7d 4a 00 50 subf r10,r10,r0 if (delta_interval > delta) { ffc1c6b4: 7f 87 50 40 cmplw cr7,r7,r10 delta_interval -= delta; } else { delta_interval = 0; ffc1c6b8: 39 00 00 00 li r8,0 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { ffc1c6bc: 40 9d 00 08 ble- cr7,ffc1c6c4 <_Timer_server_Schedule_operation_method+0xd4><== NEVER TAKEN delta_interval -= delta; ffc1c6c0: 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; ffc1c6c4: 91 0b 00 10 stw r8,16(r11) } ts->TOD_watchdogs.last_snapshot = snapshot; ffc1c6c8: 90 1f 00 74 stw r0,116(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1c6cc: 7c c0 01 24 mtmsr r6 _ISR_Enable( level ); _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1c6d0: 38 7f 00 68 addi r3,r31,104 ffc1c6d4: 38 89 00 10 addi r4,r9,16 ffc1c6d8: 48 00 55 d1 bl ffc21ca8 <_Watchdog_Insert> if ( !ts->active ) { ffc1c6dc: 88 1f 00 7c lbz r0,124(r31) ffc1c6e0: 2f 80 00 00 cmpwi cr7,r0,0 ffc1c6e4: 40 9e ff 74 bne+ cr7,ffc1c658 <_Timer_server_Schedule_operation_method+0x68> _Timer_server_Reset_tod_system_watchdog( ts ); ffc1c6e8: 7f e3 fb 78 mr r3,r31 ffc1c6ec: 4b ff fc 15 bl ffc1c300 <_Timer_server_Reset_tod_system_watchdog> } } _Thread_Enable_dispatch(); ffc1c6f0: 48 00 3f 69 bl ffc20658 <_Thread_Enable_dispatch> ffc1c6f4: 4b ff ff 68 b ffc1c65c <_Timer_server_Schedule_operation_method+0x6c> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1c6f8: 7c c0 00 a6 mfmsr r6 ffc1c6fc: 7c 10 42 a6 mfsprg r0,0 ffc1c700: 7c c0 00 78 andc r0,r6,r0 ffc1c704: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc1c708: 81 63 00 30 lwz r11,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 ); ffc1c70c: 38 03 00 34 addi r0,r3,52 /* * 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; ffc1c710: 3d 40 00 00 lis r10,0 last_snapshot = ts->Interval_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc1c714: 7f 8b 00 00 cmpw cr7,r11,r0 /* * 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; ffc1c718: 80 0a 28 d0 lwz r0,10448(r10) last_snapshot = ts->Interval_watchdogs.last_snapshot; ffc1c71c: 81 03 00 3c lwz r8,60(r3) if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc1c720: 41 9e 00 20 beq- cr7,ffc1c740 <_Timer_server_Schedule_operation_method+0x150> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; ffc1c724: 80 eb 00 10 lwz r7,16(r11) first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; ffc1c728: 7d 08 00 50 subf r8,r8,r0 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; ffc1c72c: 39 40 00 00 li r10,0 * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { ffc1c730: 7f 88 38 40 cmplw cr7,r8,r7 ffc1c734: 40 9c 00 08 bge- cr7,ffc1c73c <_Timer_server_Schedule_operation_method+0x14c> delta_interval -= delta; ffc1c738: 7d 48 38 50 subf r10,r8,r7 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; ffc1c73c: 91 4b 00 10 stw r10,16(r11) } ts->Interval_watchdogs.last_snapshot = snapshot; ffc1c740: 90 1f 00 3c stw r0,60(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1c744: 7c c0 01 24 mtmsr r6 _ISR_Enable( level ); _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1c748: 38 7f 00 30 addi r3,r31,48 ffc1c74c: 38 89 00 10 addi r4,r9,16 ffc1c750: 48 00 55 59 bl ffc21ca8 <_Watchdog_Insert> if ( !ts->active ) { ffc1c754: 88 1f 00 7c lbz r0,124(r31) ffc1c758: 2f 80 00 00 cmpwi cr7,r0,0 ffc1c75c: 40 9e fe fc bne+ cr7,ffc1c658 <_Timer_server_Schedule_operation_method+0x68> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1c760: 7f e3 fb 78 mr r3,r31 ffc1c764: 4b ff fb 09 bl ffc1c26c <_Timer_server_Reset_interval_system_watchdog> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); ffc1c768: 48 00 3e f1 bl ffc20658 <_Thread_Enable_dispatch> ffc1c76c: 4b ff fe f0 b ffc1c65c <_Timer_server_Schedule_operation_method+0x6c> =============================================================================== ffc0d094 <_Timespec_Add_to>: { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0d094: 81 03 00 04 lwz r8,4(r3) uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { ffc0d098: 7c 69 1b 78 mr r9,r3 uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0d09c: 80 04 00 04 lwz r0,4(r4) uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; ffc0d0a0: 80 64 00 00 lwz r3,0(r4) /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0d0a4: 7d 08 02 14 add r8,r8,r0 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0d0a8: 81 49 00 00 lwz r10,0(r9) time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0d0ac: 3c 00 3b 9a lis r0,15258 { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0d0b0: 91 09 00 04 stw r8,4(r9) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0d0b4: 60 00 c9 ff ori r0,r0,51711 ffc0d0b8: 7f 88 00 40 cmplw cr7,r8,r0 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0d0bc: 7d 4a 1a 14 add r10,r10,r3 time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0d0c0: 7d 0b 43 78 mr r11,r8 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0d0c4: 91 49 00 00 stw r10,0(r9) time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0d0c8: 4c 9d 00 20 blelr cr7 time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ffc0d0cc: 3d 6b c4 65 addis r11,r11,-15259 ffc0d0d0: 39 6b 36 00 addi r11,r11,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 ) { ffc0d0d4: 7f 8b 00 40 cmplw cr7,r11,r0 time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; ffc0d0d8: 39 4a 00 01 addi r10,r10,1 seconds++; ffc0d0dc: 38 63 00 01 addi r3,r3,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 ) { ffc0d0e0: 41 9d ff ec bgt+ cr7,ffc0d0cc <_Timespec_Add_to+0x38> <== NEVER TAKEN ffc0d0e4: 91 69 00 04 stw r11,4(r9) ffc0d0e8: 91 49 00 00 stw r10,0(r9) time->tv_sec++; seconds++; } return seconds; } ffc0d0ec: 4e 80 00 20 blr =============================================================================== ffc0ee28 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) ffc0ee28: 81 63 00 00 lwz r11,0(r3) bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { ffc0ee2c: 7c 69 1b 78 mr r9,r3 if ( lhs->tv_sec < rhs->tv_sec ) ffc0ee30: 80 04 00 00 lwz r0,0(r4) return true; ffc0ee34: 38 60 00 01 li r3,1 bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) ffc0ee38: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0ee3c: 4d 9c 00 20 bltlr cr7 return true; if ( lhs->tv_sec > rhs->tv_sec ) ffc0ee40: 41 9d 00 1c bgt- cr7,ffc0ee5c <_Timespec_Less_than+0x34><== NEVER TAKEN #include #include #include bool _Timespec_Less_than( ffc0ee44: 81 29 00 04 lwz r9,4(r9) ffc0ee48: 80 04 00 04 lwz r0,4(r4) ffc0ee4c: 7f 89 00 00 cmpw cr7,r9,r0 ffc0ee50: 7c 60 00 26 mfcr r3 ffc0ee54: 54 63 ef fe rlwinm r3,r3,29,31,31 ffc0ee58: 4e 80 00 20 blr { if ( lhs->tv_sec < rhs->tv_sec ) return true; if ( lhs->tv_sec > rhs->tv_sec ) return false; ffc0ee5c: 38 60 00 00 li r3,0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } ffc0ee60: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0d32c <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0d32c: 94 21 ff e0 stwu r1,-32(r1) ffc0d330: 7c 08 02 a6 mflr r0 ffc0d334: 93 c1 00 18 stw r30,24(r1) ffc0d338: 3f c0 00 00 lis r30,0 ffc0d33c: 3b de 2d 74 addi r30,r30,11636 ffc0d340: 93 e1 00 1c stw r31,28(r1) ffc0d344: 83 fe 00 08 lwz r31,8(r30) ffc0d348: 93 61 00 0c stw r27,12(r1) ffc0d34c: 7c 7b 1b 78 mr r27,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d350: 7f 9f f0 00 cmpw cr7,r31,r30 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0d354: 93 81 00 10 stw r28,16(r1) ffc0d358: 7c 9c 23 78 mr r28,r4 ffc0d35c: 93 a1 00 14 stw r29,20(r1) ffc0d360: 7c bd 2b 78 mr r29,r5 ffc0d364: 90 01 00 24 stw r0,36(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d368: 41 9e 00 30 beq- cr7,ffc0d398 <_User_extensions_Fatal+0x6c><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) ffc0d36c: 80 1f 00 30 lwz r0,48(r31) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0d370: 7f 63 db 78 mr r3,r27 ffc0d374: 7f 84 e3 78 mr r4,r28 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) ffc0d378: 2f 80 00 00 cmpwi cr7,r0,0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0d37c: 7f a5 eb 78 mr r5,r29 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) ffc0d380: 41 9e 00 0c beq- cr7,ffc0d38c <_User_extensions_Fatal+0x60> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0d384: 7c 09 03 a6 mtctr r0 ffc0d388: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0d38c: 83 ff 00 04 lwz r31,4(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d390: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d394: 40 9e ff d8 bne+ cr7,ffc0d36c <_User_extensions_Fatal+0x40> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0d398: 80 01 00 24 lwz r0,36(r1) ffc0d39c: 83 61 00 0c lwz r27,12(r1) ffc0d3a0: 7c 08 03 a6 mtlr r0 ffc0d3a4: 83 81 00 10 lwz r28,16(r1) ffc0d3a8: 83 a1 00 14 lwz r29,20(r1) ffc0d3ac: 83 c1 00 18 lwz r30,24(r1) ffc0d3b0: 83 e1 00 1c lwz r31,28(r1) ffc0d3b4: 38 21 00 20 addi r1,r1,32 ffc0d3b8: 4e 80 00 20 blr =============================================================================== ffc0d13c <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d13c: 94 21 ff e8 stwu r1,-24(r1) ffc0d140: 7c 08 02 a6 mflr r0 User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; ffc0d144: 3c e0 00 00 lis r7,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d148: 90 01 00 1c stw r0,28(r1) User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; ffc0d14c: 38 e7 20 04 addi r7,r7,8196 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0d150: 3d 00 00 00 lis r8,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d154: 93 a1 00 0c stw r29,12(r1) ffc0d158: 3d 40 00 00 lis r10,0 ffc0d15c: 39 68 2d 74 addi r11,r8,11636 uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; initial_extensions = Configuration.User_extension_table; ffc0d160: 83 a7 00 3c lwz r29,60(r7) ffc0d164: 39 2a 2c 50 addi r9,r10,11344 head->previous = NULL; ffc0d168: 38 00 00 00 li r0,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d16c: 93 c1 00 10 stw r30,16(r1) initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { ffc0d170: 2f 9d 00 00 cmpwi cr7,r29,0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0d174: 38 ab 00 04 addi r5,r11,4 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0d178: 93 81 00 08 stw r28,8(r1) ffc0d17c: 38 c9 00 04 addi r6,r9,4 ffc0d180: 93 e1 00 14 stw r31,20(r1) User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; ffc0d184: 83 c7 00 38 lwz r30,56(r7) ffc0d188: 90 a8 2d 74 stw r5,11636(r8) head->previous = NULL; ffc0d18c: 90 0b 00 04 stw r0,4(r11) tail->previous = head; ffc0d190: 91 6b 00 08 stw r11,8(r11) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0d194: 90 ca 2c 50 stw r6,11344(r10) head->previous = NULL; ffc0d198: 90 09 00 04 stw r0,4(r9) tail->previous = head; ffc0d19c: 91 29 00 08 stw r9,8(r9) initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { ffc0d1a0: 41 9e 00 88 beq- cr7,ffc0d228 <_User_extensions_Handler_initialization+0xec><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ffc0d1a4: 1f 9e 00 34 mulli r28,r30,52 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) ffc0d1a8: 7f 83 e3 78 mr r3,r28 ffc0d1ac: 48 00 08 a9 bl ffc0da54 <_Workspace_Allocate_or_fatal_error> _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0d1b0: 38 80 00 00 li r4,0 ffc0d1b4: 7f 85 e3 78 mr r5,r28 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) ffc0d1b8: 7c 7f 1b 78 mr r31,r3 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0d1bc: 48 00 66 c5 bl ffc13880 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0d1c0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0d1c4: 41 9e 00 64 beq- cr7,ffc0d228 <_User_extensions_Handler_initialization+0xec><== NEVER TAKEN ffc0d1c8: 3b 80 00 00 li r28,0 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0d1cc: 81 5d 00 00 lwz r10,0(r29) _User_extensions_Add_set( extension ); ffc0d1d0: 7f e3 fb 78 mr r3,r31 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0d1d4: 81 7d 00 04 lwz r11,4(r29) ffc0d1d8: 3b 9c 00 01 addi r28,r28,1 ffc0d1dc: 81 3d 00 08 lwz r9,8(r29) ffc0d1e0: 80 1d 00 0c lwz r0,12(r29) ffc0d1e4: 91 5f 00 14 stw r10,20(r31) ffc0d1e8: 91 7f 00 18 stw r11,24(r31) ffc0d1ec: 91 3f 00 1c stw r9,28(r31) ffc0d1f0: 90 1f 00 20 stw r0,32(r31) ffc0d1f4: 81 5d 00 10 lwz r10,16(r29) ffc0d1f8: 81 7d 00 14 lwz r11,20(r29) ffc0d1fc: 81 3d 00 18 lwz r9,24(r29) ffc0d200: 80 1d 00 1c lwz r0,28(r29) ffc0d204: 3b bd 00 20 addi r29,r29,32 ffc0d208: 91 5f 00 24 stw r10,36(r31) ffc0d20c: 91 7f 00 28 stw r11,40(r31) ffc0d210: 91 3f 00 2c stw r9,44(r31) ffc0d214: 90 1f 00 30 stw r0,48(r31) _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; ffc0d218: 3b ff 00 34 addi r31,r31,52 _User_extensions_Add_set( extension ); ffc0d21c: 48 00 38 a5 bl ffc10ac0 <_User_extensions_Add_set> extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0d220: 7f 9c f0 00 cmpw cr7,r28,r30 ffc0d224: 40 9e ff a8 bne+ cr7,ffc0d1cc <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } ffc0d228: 80 01 00 1c lwz r0,28(r1) ffc0d22c: 83 81 00 08 lwz r28,8(r1) ffc0d230: 7c 08 03 a6 mtlr r0 ffc0d234: 83 a1 00 0c lwz r29,12(r1) ffc0d238: 83 c1 00 10 lwz r30,16(r1) ffc0d23c: 83 e1 00 14 lwz r31,20(r1) ffc0d240: 38 21 00 18 addi r1,r1,24 ffc0d244: 4e 80 00 20 blr =============================================================================== ffc0d248 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0d248: 94 21 ff e8 stwu r1,-24(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0d24c: 3d 20 00 00 lis r9,0 ffc0d250: 7c 08 02 a6 mflr r0 ffc0d254: 93 c1 00 10 stw r30,16(r1) ffc0d258: 3b c9 2d 74 addi r30,r9,11636 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d25c: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0d260: 93 e1 00 14 stw r31,20(r1) ffc0d264: 83 e9 2d 74 lwz r31,11636(r9) ffc0d268: 93 a1 00 0c stw r29,12(r1) ffc0d26c: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d270: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0d274: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d278: 41 9e 00 28 beq- cr7,ffc0d2a0 <_User_extensions_Thread_begin+0x58><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) ffc0d27c: 80 1f 00 28 lwz r0,40(r31) (*the_extension->Callouts.thread_begin)( executing ); ffc0d280: 7f a3 eb 78 mr r3,r29 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) ffc0d284: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d288: 41 9e 00 0c beq- cr7,ffc0d294 <_User_extensions_Thread_begin+0x4c> (*the_extension->Callouts.thread_begin)( executing ); ffc0d28c: 7c 09 03 a6 mtctr r0 ffc0d290: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0d294: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d298: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d29c: 40 9e ff e0 bne+ cr7,ffc0d27c <_User_extensions_Thread_begin+0x34> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } ffc0d2a0: 80 01 00 1c lwz r0,28(r1) ffc0d2a4: 83 a1 00 0c lwz r29,12(r1) ffc0d2a8: 7c 08 03 a6 mtlr r0 ffc0d2ac: 83 c1 00 10 lwz r30,16(r1) ffc0d2b0: 83 e1 00 14 lwz r31,20(r1) ffc0d2b4: 38 21 00 18 addi r1,r1,24 ffc0d2b8: 4e 80 00 20 blr =============================================================================== ffc0d3bc <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d3bc: 94 21 ff e8 stwu r1,-24(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0d3c0: 3d 20 00 00 lis r9,0 ffc0d3c4: 7c 08 02 a6 mflr r0 ffc0d3c8: 93 c1 00 10 stw r30,16(r1) ffc0d3cc: 3b c9 2d 74 addi r30,r9,11636 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d3d0: 3b de 00 04 addi r30,r30,4 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d3d4: 93 e1 00 14 stw r31,20(r1) ffc0d3d8: 83 e9 2d 74 lwz r31,11636(r9) ffc0d3dc: 93 a1 00 0c stw r29,12(r1) ffc0d3e0: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d3e4: 7f 9f f0 00 cmpw cr7,r31,r30 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d3e8: 90 01 00 1c stw r0,28(r1) if ( !status ) return false; } } return true; ffc0d3ec: 38 60 00 01 li r3,1 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0d3f0: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d3f4: 41 9e 00 40 beq- cr7,ffc0d434 <_User_extensions_Thread_create+0x78><== NEVER TAKEN the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( ffc0d3f8: 3f 80 00 00 lis r28,0 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { ffc0d3fc: 80 1f 00 14 lwz r0,20(r31) status = (*the_extension->Callouts.thread_create)( ffc0d400: 39 3c 2d b8 addi r9,r28,11704 ffc0d404: 7f a4 eb 78 mr r4,r29 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { ffc0d408: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d40c: 41 9e 00 18 beq- cr7,ffc0d424 <_User_extensions_Thread_create+0x68> status = (*the_extension->Callouts.thread_create)( ffc0d410: 80 69 00 0c lwz r3,12(r9) ffc0d414: 7c 09 03 a6 mtctr r0 ffc0d418: 4e 80 04 21 bctrl _Thread_Executing, the_thread ); if ( !status ) ffc0d41c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d420: 41 9e 00 34 beq- cr7,ffc0d454 <_User_extensions_Thread_create+0x98> User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0d424: 83 ff 00 00 lwz r31,0(r31) { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d428: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d42c: 40 9e ff d0 bne+ cr7,ffc0d3fc <_User_extensions_Thread_create+0x40> if ( !status ) return false; } } return true; ffc0d430: 38 60 00 01 li r3,1 } ffc0d434: 80 01 00 1c lwz r0,28(r1) ffc0d438: 83 81 00 08 lwz r28,8(r1) ffc0d43c: 7c 08 03 a6 mtlr r0 ffc0d440: 83 a1 00 0c lwz r29,12(r1) ffc0d444: 83 c1 00 10 lwz r30,16(r1) ffc0d448: 83 e1 00 14 lwz r31,20(r1) ffc0d44c: 38 21 00 18 addi r1,r1,24 ffc0d450: 4e 80 00 20 blr ffc0d454: 80 01 00 1c lwz r0,28(r1) status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; ffc0d458: 38 60 00 00 li r3,0 } } return true; } ffc0d45c: 83 81 00 08 lwz r28,8(r1) ffc0d460: 7c 08 03 a6 mtlr r0 ffc0d464: 83 a1 00 0c lwz r29,12(r1) ffc0d468: 83 c1 00 10 lwz r30,16(r1) ffc0d46c: 83 e1 00 14 lwz r31,20(r1) ffc0d470: 38 21 00 18 addi r1,r1,24 ffc0d474: 4e 80 00 20 blr =============================================================================== ffc0d478 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0d478: 94 21 ff e8 stwu r1,-24(r1) ffc0d47c: 7c 08 02 a6 mflr r0 ffc0d480: 93 c1 00 10 stw r30,16(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; ffc0d484: 3f c0 00 00 lis r30,0 ffc0d488: 3b de 2d 74 addi r30,r30,11636 ffc0d48c: 93 e1 00 14 stw r31,20(r1) ffc0d490: 83 fe 00 08 lwz r31,8(r30) ffc0d494: 93 a1 00 0c stw r29,12(r1) ffc0d498: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d49c: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0d4a0: 90 01 00 1c stw r0,28(r1) ffc0d4a4: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d4a8: 41 9e 00 34 beq- cr7,ffc0d4dc <_User_extensions_Thread_delete+0x64><== NEVER TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) (*the_extension->Callouts.thread_delete)( ffc0d4ac: 3f 80 00 00 lis r28,0 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) ffc0d4b0: 80 1f 00 20 lwz r0,32(r31) (*the_extension->Callouts.thread_delete)( ffc0d4b4: 39 3c 2d b8 addi r9,r28,11704 ffc0d4b8: 7f a4 eb 78 mr r4,r29 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) ffc0d4bc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d4c0: 41 9e 00 10 beq- cr7,ffc0d4d0 <_User_extensions_Thread_delete+0x58> (*the_extension->Callouts.thread_delete)( ffc0d4c4: 80 69 00 0c lwz r3,12(r9) ffc0d4c8: 7c 09 03 a6 mtctr r0 ffc0d4cc: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0d4d0: 83 ff 00 04 lwz r31,4(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d4d4: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d4d8: 40 9e ff d8 bne+ cr7,ffc0d4b0 <_User_extensions_Thread_delete+0x38> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } ffc0d4dc: 80 01 00 1c lwz r0,28(r1) ffc0d4e0: 83 81 00 08 lwz r28,8(r1) ffc0d4e4: 7c 08 03 a6 mtlr r0 ffc0d4e8: 83 a1 00 0c lwz r29,12(r1) ffc0d4ec: 83 c1 00 10 lwz r30,16(r1) ffc0d4f0: 83 e1 00 14 lwz r31,20(r1) ffc0d4f4: 38 21 00 18 addi r1,r1,24 ffc0d4f8: 4e 80 00 20 blr =============================================================================== ffc0d2bc <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0d2bc: 94 21 ff e8 stwu r1,-24(r1) ffc0d2c0: 7c 08 02 a6 mflr r0 ffc0d2c4: 93 c1 00 10 stw r30,16(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; ffc0d2c8: 3f c0 00 00 lis r30,0 ffc0d2cc: 3b de 2d 74 addi r30,r30,11636 ffc0d2d0: 93 e1 00 14 stw r31,20(r1) ffc0d2d4: 83 fe 00 08 lwz r31,8(r30) ffc0d2d8: 93 a1 00 0c stw r29,12(r1) ffc0d2dc: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d2e0: 7f 9f f0 00 cmpw cr7,r31,r30 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0d2e4: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d2e8: 41 9e 00 28 beq- cr7,ffc0d310 <_User_extensions_Thread_exitted+0x54><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) ffc0d2ec: 80 1f 00 2c lwz r0,44(r31) (*the_extension->Callouts.thread_exitted)( executing ); ffc0d2f0: 7f a3 eb 78 mr r3,r29 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) ffc0d2f4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d2f8: 41 9e 00 0c beq- cr7,ffc0d304 <_User_extensions_Thread_exitted+0x48> (*the_extension->Callouts.thread_exitted)( executing ); ffc0d2fc: 7c 09 03 a6 mtctr r0 ffc0d300: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0d304: 83 ff 00 04 lwz r31,4(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); ffc0d308: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d30c: 40 9e ff e0 bne+ cr7,ffc0d2ec <_User_extensions_Thread_exitted+0x30> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } ffc0d310: 80 01 00 1c lwz r0,28(r1) ffc0d314: 83 a1 00 0c lwz r29,12(r1) ffc0d318: 7c 08 03 a6 mtlr r0 ffc0d31c: 83 c1 00 10 lwz r30,16(r1) ffc0d320: 83 e1 00 14 lwz r31,20(r1) ffc0d324: 38 21 00 18 addi r1,r1,24 ffc0d328: 4e 80 00 20 blr =============================================================================== ffc0e078 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e078: 94 21 ff e8 stwu r1,-24(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0e07c: 3d 20 00 00 lis r9,0 ffc0e080: 7c 08 02 a6 mflr r0 ffc0e084: 93 c1 00 10 stw r30,16(r1) ffc0e088: 3b c9 2d 94 addi r30,r9,11668 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e08c: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e090: 93 e1 00 14 stw r31,20(r1) ffc0e094: 83 e9 2d 94 lwz r31,11668(r9) ffc0e098: 93 a1 00 0c stw r29,12(r1) ffc0e09c: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e0a0: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0e0a4: 90 01 00 1c stw r0,28(r1) ffc0e0a8: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e0ac: 41 9e 00 34 beq- cr7,ffc0e0e0 <_User_extensions_Thread_restart+0x68><== NEVER TAKEN the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) (*the_extension->Callouts.thread_restart)( ffc0e0b0: 3f 80 00 00 lis r28,0 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) ffc0e0b4: 80 1f 00 1c lwz r0,28(r31) (*the_extension->Callouts.thread_restart)( ffc0e0b8: 39 3c 2d d8 addi r9,r28,11736 ffc0e0bc: 7f a4 eb 78 mr r4,r29 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) ffc0e0c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e0c4: 41 9e 00 10 beq- cr7,ffc0e0d4 <_User_extensions_Thread_restart+0x5c> (*the_extension->Callouts.thread_restart)( ffc0e0c8: 80 69 00 0c lwz r3,12(r9) ffc0e0cc: 7c 09 03 a6 mtctr r0 ffc0e0d0: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0e0d4: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0e0d8: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0e0dc: 40 9e ff d8 bne+ cr7,ffc0e0b4 <_User_extensions_Thread_restart+0x3c> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } ffc0e0e0: 80 01 00 1c lwz r0,28(r1) ffc0e0e4: 83 81 00 08 lwz r28,8(r1) ffc0e0e8: 7c 08 03 a6 mtlr r0 ffc0e0ec: 83 a1 00 0c lwz r29,12(r1) ffc0e0f0: 83 c1 00 10 lwz r30,16(r1) ffc0e0f4: 83 e1 00 14 lwz r31,20(r1) ffc0e0f8: 38 21 00 18 addi r1,r1,24 ffc0e0fc: 4e 80 00 20 blr =============================================================================== ffc0d4fc <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d4fc: 94 21 ff e8 stwu r1,-24(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0d500: 3d 20 00 00 lis r9,0 ffc0d504: 7c 08 02 a6 mflr r0 ffc0d508: 93 c1 00 10 stw r30,16(r1) ffc0d50c: 3b c9 2d 74 addi r30,r9,11636 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d510: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d514: 93 e1 00 14 stw r31,20(r1) ffc0d518: 83 e9 2d 74 lwz r31,11636(r9) ffc0d51c: 93 a1 00 0c stw r29,12(r1) ffc0d520: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d524: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0d528: 90 01 00 1c stw r0,28(r1) ffc0d52c: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d530: 41 9e 00 34 beq- cr7,ffc0d564 <_User_extensions_Thread_start+0x68><== NEVER TAKEN the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) (*the_extension->Callouts.thread_start)( ffc0d534: 3f 80 00 00 lis r28,0 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) ffc0d538: 80 1f 00 18 lwz r0,24(r31) (*the_extension->Callouts.thread_start)( ffc0d53c: 39 3c 2d b8 addi r9,r28,11704 ffc0d540: 7f a4 eb 78 mr r4,r29 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) ffc0d544: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d548: 41 9e 00 10 beq- cr7,ffc0d558 <_User_extensions_Thread_start+0x5c> (*the_extension->Callouts.thread_start)( ffc0d54c: 80 69 00 0c lwz r3,12(r9) ffc0d550: 7c 09 03 a6 mtctr r0 ffc0d554: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0d558: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); ffc0d55c: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d560: 40 9e ff d8 bne+ cr7,ffc0d538 <_User_extensions_Thread_start+0x3c> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } ffc0d564: 80 01 00 1c lwz r0,28(r1) ffc0d568: 83 81 00 08 lwz r28,8(r1) ffc0d56c: 7c 08 03 a6 mtlr r0 ffc0d570: 83 a1 00 0c lwz r29,12(r1) ffc0d574: 83 c1 00 10 lwz r30,16(r1) ffc0d578: 83 e1 00 14 lwz r31,20(r1) ffc0d57c: 38 21 00 18 addi r1,r1,24 ffc0d580: 4e 80 00 20 blr =============================================================================== ffc0d584 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d584: 94 21 ff e8 stwu r1,-24(r1) ffc0d588: 3d 20 00 00 lis r9,0 ffc0d58c: 7c 08 02 a6 mflr r0 ffc0d590: 93 c1 00 10 stw r30,16(r1) ffc0d594: 3b c9 2c 50 addi r30,r9,11344 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); ffc0d598: 3b de 00 04 addi r30,r30,4 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d59c: 93 e1 00 14 stw r31,20(r1) ffc0d5a0: 83 e9 2c 50 lwz r31,11344(r9) ffc0d5a4: 93 81 00 08 stw r28,8(r1) ffc0d5a8: 7c 7c 1b 78 mr r28,r3 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); ffc0d5ac: 7f 9f f0 00 cmpw cr7,r31,r30 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0d5b0: 93 a1 00 0c stw r29,12(r1) ffc0d5b4: 7c 9d 23 78 mr r29,r4 ffc0d5b8: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); ffc0d5bc: 41 9e 00 24 beq- cr7,ffc0d5e0 <_User_extensions_Thread_switch+0x5c><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); ffc0d5c0: 80 1f 00 08 lwz r0,8(r31) ffc0d5c4: 7f 83 e3 78 mr r3,r28 ffc0d5c8: 7f a4 eb 78 mr r4,r29 ffc0d5cc: 7c 09 03 a6 mtctr r0 ffc0d5d0: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { ffc0d5d4: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); ffc0d5d8: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d5dc: 40 9e ff e4 bne+ cr7,ffc0d5c0 <_User_extensions_Thread_switch+0x3c> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } ffc0d5e0: 80 01 00 1c lwz r0,28(r1) ffc0d5e4: 83 81 00 08 lwz r28,8(r1) ffc0d5e8: 7c 08 03 a6 mtlr r0 ffc0d5ec: 83 a1 00 0c lwz r29,12(r1) ffc0d5f0: 83 c1 00 10 lwz r30,16(r1) ffc0d5f4: 83 e1 00 14 lwz r31,20(r1) ffc0d5f8: 38 21 00 18 addi r1,r1,24 ffc0d5fc: 4e 80 00 20 blr =============================================================================== ffc0f464 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { ffc0f464: 94 21 ff e0 stwu r1,-32(r1) ffc0f468: 7c 08 02 a6 mflr r0 ffc0f46c: 90 01 00 24 stw r0,36(r1) ffc0f470: 93 c1 00 18 stw r30,24(r1) ffc0f474: 7c be 2b 78 mr r30,r5 ffc0f478: 93 e1 00 1c stw r31,28(r1) ffc0f47c: 7c 7f 1b 78 mr r31,r3 ffc0f480: 93 61 00 0c stw r27,12(r1) ffc0f484: 93 81 00 10 stw r28,16(r1) ffc0f488: 93 a1 00 14 stw r29,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0f48c: 7c 00 00 a6 mfmsr r0 ffc0f490: 7d 30 42 a6 mfsprg r9,0 ffc0f494: 7c 09 48 78 andc r9,r0,r9 ffc0f498: 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; ffc0f49c: 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 ); ffc0f4a0: 3b 83 00 04 addi r28,r3,4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { ffc0f4a4: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0f4a8: 41 9e 00 68 beq- cr7,ffc0f510 <_Watchdog_Adjust+0xac> switch ( direction ) { ffc0f4ac: 2f 84 00 00 cmpwi cr7,r4,0 ffc0f4b0: 40 9e 00 88 bne- cr7,ffc0f538 <_Watchdog_Adjust+0xd4> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f4b4: 2f 85 00 00 cmpwi cr7,r5,0 ffc0f4b8: 41 9e 00 58 beq- cr7,ffc0f510 <_Watchdog_Adjust+0xac> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f4bc: 83 a9 00 10 lwz r29,16(r9) _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0f4c0: 3b 60 00 01 li r27,1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f4c4: 7f 85 e8 40 cmplw cr7,r5,r29 ffc0f4c8: 40 bc 00 18 bge+ cr7,ffc0f4e0 <_Watchdog_Adjust+0x7c> <== ALWAYS TAKEN ffc0f4cc: 48 00 00 a8 b ffc0f574 <_Watchdog_Adjust+0x110> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f4d0: 41 82 00 40 beq- ffc0f510 <_Watchdog_Adjust+0xac> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f4d4: 83 a9 00 10 lwz r29,16(r9) ffc0f4d8: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0f4dc: 41 9d 00 98 bgt- cr7,ffc0f574 <_Watchdog_Adjust+0x110> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0f4e0: 93 69 00 10 stw r27,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0f4e4: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Watchdog_Tickle( header ); ffc0f4e8: 7f e3 fb 78 mr r3,r31 ffc0f4ec: 48 00 03 2d bl ffc0f818 <_Watchdog_Tickle> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0f4f0: 7c 00 00 a6 mfmsr r0 ffc0f4f4: 7d 30 42 a6 mfsprg r9,0 ffc0f4f8: 7c 09 48 78 andc r9,r0,r9 ffc0f4fc: 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; ffc0f500: 81 3f 00 00 lwz r9,0(r31) switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f504: 7f dd f0 51 subf. r30,r29,r30 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0f508: 7f 9c 48 00 cmpw cr7,r28,r9 ffc0f50c: 40 9e ff c4 bne+ cr7,ffc0f4d0 <_Watchdog_Adjust+0x6c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0f510: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0f514: 80 01 00 24 lwz r0,36(r1) ffc0f518: 83 61 00 0c lwz r27,12(r1) ffc0f51c: 7c 08 03 a6 mtlr r0 ffc0f520: 83 81 00 10 lwz r28,16(r1) ffc0f524: 83 a1 00 14 lwz r29,20(r1) ffc0f528: 83 c1 00 18 lwz r30,24(r1) ffc0f52c: 83 e1 00 1c lwz r31,28(r1) ffc0f530: 38 21 00 20 addi r1,r1,32 ffc0f534: 4e 80 00 20 blr * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ffc0f538: 2f 84 00 01 cmpwi cr7,r4,1 ffc0f53c: 40 9e ff d4 bne+ cr7,ffc0f510 <_Watchdog_Adjust+0xac> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; ffc0f540: 81 69 00 10 lwz r11,16(r9) ffc0f544: 7f cb 2a 14 add r30,r11,r5 ffc0f548: 93 c9 00 10 stw r30,16(r9) ffc0f54c: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0f550: 80 01 00 24 lwz r0,36(r1) ffc0f554: 83 61 00 0c lwz r27,12(r1) ffc0f558: 7c 08 03 a6 mtlr r0 ffc0f55c: 83 81 00 10 lwz r28,16(r1) ffc0f560: 83 a1 00 14 lwz r29,20(r1) ffc0f564: 83 c1 00 18 lwz r30,24(r1) ffc0f568: 83 e1 00 1c lwz r31,28(r1) ffc0f56c: 38 21 00 20 addi r1,r1,32 ffc0f570: 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; ffc0f574: 7f de e8 50 subf r30,r30,r29 ffc0f578: 93 c9 00 10 stw r30,16(r9) break; ffc0f57c: 4b ff ff 94 b ffc0f510 <_Watchdog_Adjust+0xac> =============================================================================== ffc0d600 <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; ffc0d600: 3d 20 00 00 lis r9,0 ffc0d604: 80 09 2d c0 lwz r0,11712(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0d608: 7d 00 00 a6 mfmsr r8 ffc0d60c: 7d 30 42 a6 mfsprg r9,0 ffc0d610: 7d 09 48 78 andc r9,r8,r9 ffc0d614: 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 ) { ffc0d618: 81 24 00 08 lwz r9,8(r4) ffc0d61c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d620: 40 9e 01 04 bne- cr7,ffc0d724 <_Watchdog_Insert+0x124> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; ffc0d624: 3c c0 00 00 lis r6,0 ffc0d628: 81 26 27 f8 lwz r9,10232(r6) if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; ffc0d62c: 39 60 00 01 li r11,1 ffc0d630: 91 64 00 08 stw r11,8(r4) ffc0d634: 3c a0 00 00 lis r5,0 _Watchdog_Sync_count++; ffc0d638: 39 29 00 01 addi r9,r9,1 ffc0d63c: 91 26 27 f8 stw r9,10232(r6) restart: delta_interval = the_watchdog->initial; ffc0d640: 81 24 00 0c lwz r9,12(r4) ffc0d644: 81 63 00 00 lwz r11,0(r3) for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d648: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d64c: 41 9e 00 98 beq- cr7,ffc0d6e4 <_Watchdog_Insert+0xe4> ffc0d650: 81 4b 00 00 lwz r10,0(r11) ffc0d654: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d658: 41 9e 00 8c beq- cr7,ffc0d6e4 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0d65c: 81 4b 00 10 lwz r10,16(r11) ffc0d660: 7f 89 50 40 cmplw cr7,r9,r10 ffc0d664: 41 9c 00 c8 blt- cr7,ffc0d72c <_Watchdog_Insert+0x12c> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0d668: 7c e0 00 a6 mfmsr r7 ffc0d66c: 7d 00 01 24 mtmsr r8 ffc0d670: 7c e0 01 24 mtmsr r7 delta_interval -= after->delta_interval; _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0d674: 80 e4 00 08 lwz r7,8(r4) ffc0d678: 2f 87 00 01 cmpwi cr7,r7,1 ffc0d67c: 40 9e 00 98 bne- cr7,ffc0d714 <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0d680: 81 85 27 f0 lwz r12,10224(r5) ffc0d684: 38 e5 27 f0 addi r7,r5,10224 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0d688: 7d 2a 48 50 subf r9,r10,r9 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0d68c: 7f 80 60 40 cmplw cr7,r0,r12 ffc0d690: 40 bc 00 48 bge+ cr7,ffc0d6d8 <_Watchdog_Insert+0xd8> ffc0d694: 48 00 00 d4 b ffc0d768 <_Watchdog_Insert+0x168> for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d698: 81 4b 00 00 lwz r10,0(r11) ffc0d69c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d6a0: 41 9e 00 44 beq- cr7,ffc0d6e4 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0d6a4: 81 4b 00 10 lwz r10,16(r11) ffc0d6a8: 7f 8a 48 40 cmplw cr7,r10,r9 ffc0d6ac: 41 9d 00 80 bgt- cr7,ffc0d72c <_Watchdog_Insert+0x12c> after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0d6b0: 7d 2a 48 50 subf r9,r10,r9 ffc0d6b4: 7d 40 00 a6 mfmsr r10 ffc0d6b8: 7d 00 01 24 mtmsr r8 ffc0d6bc: 7d 40 01 24 mtmsr r10 _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0d6c0: 81 44 00 08 lwz r10,8(r4) ffc0d6c4: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0d6c8: 40 9e 00 4c bne- cr7,ffc0d714 <_Watchdog_Insert+0x114> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0d6cc: 81 47 00 00 lwz r10,0(r7) ffc0d6d0: 7f 80 50 40 cmplw cr7,r0,r10 ffc0d6d4: 41 9c 00 94 blt- cr7,ffc0d768 <_Watchdog_Insert+0x168> <== NEVER TAKEN for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d6d8: 2f 89 00 00 cmpwi cr7,r9,0 exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } ffc0d6dc: 81 6b 00 00 lwz r11,0(r11) for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0d6e0: 40 9e ff b8 bne+ cr7,ffc0d698 <_Watchdog_Insert+0x98> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0d6e4: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d6e8: 3c e0 00 00 lis r7,0 ffc0d6ec: 80 e7 27 fc lwz r7,10236(r7) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; ffc0d6f0: 38 60 00 02 li r3,2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0d6f4: 81 4b 00 00 lwz r10,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0d6f8: 91 64 00 04 stw r11,4(r4) ffc0d6fc: 90 64 00 08 stw r3,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0d700: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; ffc0d704: 90 8b 00 00 stw r4,0(r11) the_node->next = before_node; before_node->previous = the_node; ffc0d708: 90 8a 00 04 stw r4,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; ffc0d70c: 91 44 00 00 stw r10,0(r4) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d710: 90 e4 00 14 stw r7,20(r4) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; ffc0d714: 90 05 27 f0 stw r0,10224(r5) _Watchdog_Sync_count--; ffc0d718: 81 26 27 f8 lwz r9,10232(r6) ffc0d71c: 38 09 ff ff addi r0,r9,-1 ffc0d720: 90 06 27 f8 stw r0,10232(r6) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0d724: 7d 00 01 24 mtmsr r8 ffc0d728: 4e 80 00 20 blr if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; ffc0d72c: 7d 49 50 50 subf r10,r9,r10 ffc0d730: 91 4b 00 10 stw r10,16(r11) the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d734: 3c e0 00 00 lis r7,0 ffc0d738: 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 ); ffc0d73c: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d740: 80 e7 27 fc lwz r7,10236(r7) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0d744: 81 4b 00 00 lwz r10,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0d748: 91 64 00 04 stw r11,4(r4) ffc0d74c: 90 64 00 08 stw r3,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0d750: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; ffc0d754: 90 8b 00 00 stw r4,0(r11) the_node->next = before_node; before_node->previous = the_node; ffc0d758: 90 8a 00 04 stw r4,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; ffc0d75c: 91 44 00 00 stw r10,0(r4) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0d760: 90 e4 00 14 stw r7,20(r4) ffc0d764: 4b ff ff b0 b ffc0d714 <_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; ffc0d768: 90 05 27 f0 stw r0,10224(r5) goto restart; ffc0d76c: 4b ff fe d4 b ffc0d640 <_Watchdog_Insert+0x40> =============================================================================== ffc0d7c8 <_Watchdog_Remove>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0d7c8: 7d 20 00 a6 mfmsr r9 ffc0d7cc: 7c 10 42 a6 mfsprg r0,0 ffc0d7d0: 7d 20 00 78 andc r0,r9,r0 ffc0d7d4: 7c 00 01 24 mtmsr r0 ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; ffc0d7d8: 80 03 00 08 lwz r0,8(r3) switch ( previous_state ) { ffc0d7dc: 2f 80 00 01 cmpwi cr7,r0,1 ffc0d7e0: 41 9e 00 98 beq- cr7,ffc0d878 <_Watchdog_Remove+0xb0> ffc0d7e4: 2b 80 00 01 cmplwi cr7,r0,1 ffc0d7e8: 40 9c 00 1c bge- cr7,ffc0d804 <_Watchdog_Remove+0x3c> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0d7ec: 3d 60 00 00 lis r11,0 ffc0d7f0: 81 6b 27 fc lwz r11,10236(r11) ffc0d7f4: 91 63 00 18 stw r11,24(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0d7f8: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0d7fc: 7c 03 03 78 mr r3,r0 ffc0d800: 4e 80 00 20 blr Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { ffc0d804: 2b 80 00 03 cmplwi cr7,r0,3 ffc0d808: 41 bd ff e4 bgt- cr7,ffc0d7ec <_Watchdog_Remove+0x24> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; ffc0d80c: 39 60 00 00 li r11,0 ffc0d810: 91 63 00 08 stw r11,8(r3) } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } ffc0d814: 81 63 00 00 lwz r11,0(r3) case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) ffc0d818: 81 4b 00 00 lwz r10,0(r11) ffc0d81c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d820: 41 9e 00 14 beq- cr7,ffc0d834 <_Watchdog_Remove+0x6c> next_watchdog->delta_interval += the_watchdog->delta_interval; ffc0d824: 81 0b 00 10 lwz r8,16(r11) ffc0d828: 81 43 00 10 lwz r10,16(r3) ffc0d82c: 7d 48 52 14 add r10,r8,r10 ffc0d830: 91 4b 00 10 stw r10,16(r11) if ( _Watchdog_Sync_count ) ffc0d834: 3d 40 00 00 lis r10,0 ffc0d838: 81 4a 27 f8 lwz r10,10232(r10) ffc0d83c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0d840: 41 9e 00 14 beq- cr7,ffc0d854 <_Watchdog_Remove+0x8c> _Watchdog_Sync_level = _ISR_Nest_level; ffc0d844: 3d 40 00 00 lis r10,0 ffc0d848: 81 0a 2d c0 lwz r8,11712(r10) ffc0d84c: 3d 40 00 00 lis r10,0 ffc0d850: 91 0a 27 f0 stw r8,10224(r10) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0d854: 81 43 00 04 lwz r10,4(r3) next->previous = previous; ffc0d858: 91 4b 00 04 stw r10,4(r11) previous->next = next; ffc0d85c: 91 6a 00 00 stw r11,0(r10) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0d860: 3d 60 00 00 lis r11,0 ffc0d864: 81 6b 27 fc lwz r11,10236(r11) ffc0d868: 91 63 00 18 stw r11,24(r3) ffc0d86c: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0d870: 7c 03 03 78 mr r3,r0 ffc0d874: 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; ffc0d878: 39 60 00 00 li r11,0 ffc0d87c: 91 63 00 08 stw r11,8(r3) _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0d880: 3d 60 00 00 lis r11,0 ffc0d884: 81 6b 27 fc lwz r11,10236(r11) ffc0d888: 91 63 00 18 stw r11,24(r3) ffc0d88c: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0d890: 7c 03 03 78 mr r3,r0 ffc0d894: 4e 80 00 20 blr =============================================================================== ffc0ebbc <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { ffc0ebbc: 94 21 ff e8 stwu r1,-24(r1) ffc0ebc0: 7c 08 02 a6 mflr r0 ffc0ebc4: 93 c1 00 10 stw r30,16(r1) ffc0ebc8: 7c 7e 1b 78 mr r30,r3 ffc0ebcc: 93 e1 00 14 stw r31,20(r1) ffc0ebd0: 7c 9f 23 78 mr r31,r4 ffc0ebd4: 90 01 00 1c stw r0,28(r1) ffc0ebd8: 93 81 00 08 stw r28,8(r1) ffc0ebdc: 93 a1 00 0c stw r29,12(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0ebe0: 7f a0 00 a6 mfmsr r29 ffc0ebe4: 7c 10 42 a6 mfsprg r0,0 ffc0ebe8: 7f a0 00 78 andc r0,r29,r0 ffc0ebec: 7c 00 01 24 mtmsr r0 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); ffc0ebf0: 3c 60 ff c2 lis r3,-62 ffc0ebf4: 7f e5 fb 78 mr r5,r31 ffc0ebf8: 38 63 15 40 addi r3,r3,5440 ffc0ebfc: 7f c4 f3 78 mr r4,r30 ffc0ec00: 4c c6 31 82 crclr 4*cr1+eq ffc0ec04: 4b ff 81 69 bl ffc06d6c */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0ec08: 83 9f 00 00 lwz r28,0(r31) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0ec0c: 3b ff 00 04 addi r31,r31,4 if ( !_Chain_Is_empty( header ) ) { ffc0ec10: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0ec14: 41 9e 00 54 beq- cr7,ffc0ec68 <_Watchdog_Report_chain+0xac> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); ffc0ec18: 7f 84 e3 78 mr r4,r28 ffc0ec1c: 38 60 00 00 li r3,0 ffc0ec20: 48 00 00 5d bl ffc0ec7c <_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 ) ffc0ec24: 83 9c 00 00 lwz r28,0(r28) Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; ffc0ec28: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0ec2c: 40 9e ff ec bne+ cr7,ffc0ec18 <_Watchdog_Report_chain+0x5c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); ffc0ec30: 3c 60 ff c2 lis r3,-62 ffc0ec34: 38 63 15 58 addi r3,r3,5464 ffc0ec38: 7f c4 f3 78 mr r4,r30 ffc0ec3c: 4c c6 31 82 crclr 4*cr1+eq ffc0ec40: 4b ff 81 2d bl ffc06d6c return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0ec44: 7f a0 01 24 mtmsr r29 } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } ffc0ec48: 80 01 00 1c lwz r0,28(r1) ffc0ec4c: 83 81 00 08 lwz r28,8(r1) ffc0ec50: 7c 08 03 a6 mtlr r0 ffc0ec54: 83 a1 00 0c lwz r29,12(r1) ffc0ec58: 83 c1 00 10 lwz r30,16(r1) ffc0ec5c: 83 e1 00 14 lwz r31,20(r1) ffc0ec60: 38 21 00 18 addi r1,r1,24 ffc0ec64: 4e 80 00 20 blr _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); ffc0ec68: 3c 60 ff c2 lis r3,-62 ffc0ec6c: 38 63 15 68 addi r3,r3,5480 ffc0ec70: 4c c6 31 82 crclr 4*cr1+eq ffc0ec74: 4b ff 80 f9 bl ffc06d6c ffc0ec78: 4b ff ff cc b ffc0ec44 <_Watchdog_Report_chain+0x88> =============================================================================== ffc09da4 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { ffc09da4: 94 21 ff d0 stwu r1,-48(r1) ffc09da8: 7c 08 02 a6 mflr r0 ffc09dac: 93 e1 00 2c stw r31,44(r1) ffc09db0: 90 01 00 34 stw r0,52(r1) ffc09db4: 93 61 00 1c stw r27,28(r1) ffc09db8: 7c db 33 78 mr r27,r6 ffc09dbc: 93 81 00 20 stw r28,32(r1) ffc09dc0: 7c 7c 1b 78 mr r28,r3 ffc09dc4: 93 a1 00 24 stw r29,36(r1) ffc09dc8: 7c 9d 23 78 mr r29,r4 ffc09dcc: 93 c1 00 28 stw r30,40(r1) ffc09dd0: 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 ); ffc09dd4: 7f 83 e3 78 mr r3,r28 ffc09dd8: 48 00 07 89 bl ffc0a560 <_Chain_Get> while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( ffc09ddc: 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 ffc09de0: 7c 7f 1b 79 mr. r31,r3 ) { rtems_event_set out; sc = rtems_event_receive( ffc09de4: 7f c5 f3 78 mr r5,r30 ffc09de8: 38 c1 00 08 addi r6,r1,8 ffc09dec: 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 ffc09df0: 40 82 00 38 bne- ffc09e28 ) { rtems_event_set out; sc = rtems_event_receive( ffc09df4: 4b ff ef f9 bl ffc08dec ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( ffc09df8: 2c 03 00 00 cmpwi r3,0 ffc09dfc: 41 82 ff d8 beq+ ffc09dd4 <== NEVER TAKEN } *node_ptr = node; return sc; } ffc09e00: 80 01 00 34 lwz r0,52(r1) timeout, &out ); } *node_ptr = node; ffc09e04: 93 fb 00 00 stw r31,0(r27) return sc; } ffc09e08: 7c 08 03 a6 mtlr r0 ffc09e0c: 83 61 00 1c lwz r27,28(r1) ffc09e10: 83 81 00 20 lwz r28,32(r1) ffc09e14: 83 a1 00 24 lwz r29,36(r1) ffc09e18: 83 c1 00 28 lwz r30,40(r1) ffc09e1c: 83 e1 00 2c lwz r31,44(r1) ffc09e20: 38 21 00 30 addi r1,r1,48 ffc09e24: 4e 80 00 20 blr ffc09e28: 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 ffc09e2c: 38 60 00 00 li r3,0 timeout, &out ); } *node_ptr = node; ffc09e30: 93 fb 00 00 stw r31,0(r27) return sc; } ffc09e34: 7c 08 03 a6 mtlr r0 ffc09e38: 83 61 00 1c lwz r27,28(r1) ffc09e3c: 83 81 00 20 lwz r28,32(r1) ffc09e40: 83 a1 00 24 lwz r29,36(r1) ffc09e44: 83 c1 00 28 lwz r30,40(r1) ffc09e48: 83 e1 00 2c lwz r31,44(r1) ffc09e4c: 38 21 00 30 addi r1,r1,48 ffc09e50: 4e 80 00 20 blr =============================================================================== ffc0aba0 : 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 ) { ffc0aba0: 94 21 ff f0 stwu r1,-16(r1) ffc0aba4: 7c 08 02 a6 mflr r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0aba8: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { ffc0abac: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0abb0: 80 09 2e 40 lwz r0,11840(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; ffc0abb4: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { ffc0abb8: 93 e1 00 0c stw r31,12(r1) ffc0abbc: 7c 7f 1b 78 mr r31,r3 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0abc0: 2f 80 00 00 cmpwi cr7,r0,0 return RTEMS_CALLED_FROM_ISR; ffc0abc4: 38 60 00 12 li r3,18 rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; ffc0abc8: 80 09 27 e8 lwz r0,10216(r9) if ( rtems_interrupt_is_in_progress() ) ffc0abcc: 41 9e 00 18 beq- cr7,ffc0abe4 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0abd0: 80 01 00 14 lwz r0,20(r1) ffc0abd4: 83 e1 00 0c lwz r31,12(r1) ffc0abd8: 38 21 00 10 addi r1,r1,16 ffc0abdc: 7c 08 03 a6 mtlr r0 ffc0abe0: 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 ) ffc0abe4: 2f 85 00 00 cmpwi cr7,r5,0 return RTEMS_INVALID_ADDRESS; ffc0abe8: 38 60 00 09 li r3,9 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 ) ffc0abec: 41 be ff e4 beq- cr7,ffc0abd0 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) ffc0abf0: 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; ffc0abf4: 90 05 00 00 stw r0,0(r5) if ( driver_table == NULL ) ffc0abf8: 41 be ff d8 beq- cr7,ffc0abd0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0abfc: 81 64 00 00 lwz r11,0(r4) ffc0ac00: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0ac04: 41 9e 00 f4 beq- cr7,ffc0acf8 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc0ac08: 7f 80 f8 40 cmplw cr7,r0,r31 return RTEMS_INVALID_NUMBER; ffc0ac0c: 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 ) ffc0ac10: 40 9d ff c0 ble+ cr7,ffc0abd0 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc0ac14: 3d 60 00 00 lis r11,0 ffc0ac18: 81 4b 27 a0 lwz r10,10144(r11) ffc0ac1c: 38 0a 00 01 addi r0,r10,1 ffc0ac20: 90 0b 27 a0 stw r0,10144(r11) return _Thread_Dispatch_disable_level; ffc0ac24: 80 0b 27 a0 lwz r0,10144(r11) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { ffc0ac28: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0ac2c: 40 9e 00 a4 bne- cr7,ffc0acd0 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; ffc0ac30: 81 49 27 e8 lwz r10,10216(r9) rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { ffc0ac34: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0ac38: 41 9e 00 d0 beq- cr7,ffc0ad08 <== NEVER TAKEN ffc0ac3c: 3d 60 00 00 lis r11,0 ffc0ac40: 7d 49 03 a6 mtctr r10 ffc0ac44: 81 2b 27 ec lwz r9,10220(r11) ffc0ac48: 48 00 00 10 b ffc0ac58 ffc0ac4c: 3b ff 00 01 addi r31,r31,1 ffc0ac50: 39 29 00 18 addi r9,r9,24 ffc0ac54: 42 40 00 b4 bdz- ffc0ad08 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0ac58: 80 09 00 00 lwz r0,0(r9) ffc0ac5c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ac60: 40 9e ff ec bne+ cr7,ffc0ac4c ffc0ac64: 80 09 00 04 lwz r0,4(r9) ffc0ac68: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ac6c: 40 9e ff e0 bne+ cr7,ffc0ac4c } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) ffc0ac70: 7f 8a f8 00 cmpw cr7,r10,r31 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0ac74: 93 e5 00 00 stw r31,0(r5) ffc0ac78: 1c 1f 00 18 mulli r0,r31,24 if ( m != n ) ffc0ac7c: 41 9e 00 90 beq- cr7,ffc0ad0c <== NEVER TAKEN } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; ffc0ac80: 81 6b 27 ec lwz r11,10220(r11) ffc0ac84: 80 c4 00 00 lwz r6,0(r4) ffc0ac88: 80 e4 00 04 lwz r7,4(r4) ffc0ac8c: 7d 2b 02 14 add r9,r11,r0 ffc0ac90: 81 04 00 08 lwz r8,8(r4) ffc0ac94: 81 44 00 0c lwz r10,12(r4) ffc0ac98: 7c cb 01 2e stwx r6,r11,r0 ffc0ac9c: 90 e9 00 04 stw r7,4(r9) ffc0aca0: 91 09 00 08 stw r8,8(r9) ffc0aca4: 91 49 00 0c stw r10,12(r9) ffc0aca8: 81 64 00 10 lwz r11,16(r4) ffc0acac: 80 04 00 14 lwz r0,20(r4) ffc0acb0: 91 69 00 10 stw r11,16(r9) ffc0acb4: 90 09 00 14 stw r0,20(r9) _Thread_Enable_dispatch(); ffc0acb8: 48 00 26 45 bl ffc0d2fc <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); ffc0acbc: 7f e3 fb 78 mr r3,r31 ffc0acc0: 38 80 00 00 li r4,0 ffc0acc4: 38 a0 00 00 li r5,0 ffc0acc8: 48 00 9b ad bl ffc14874 ffc0accc: 4b ff ff 04 b ffc0abd0 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0acd0: 3d 60 00 00 lis r11,0 ffc0acd4: 1c 1f 00 18 mulli r0,r31,24 ffc0acd8: 81 2b 27 ec lwz r9,10220(r11) static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0acdc: 7d 49 00 2e lwzx r10,r9,r0 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0ace0: 7d 29 02 14 add r9,r9,r0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0ace4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0ace8: 41 9e 00 30 beq- cr7,ffc0ad18 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(); ffc0acec: 48 00 26 11 bl ffc0d2fc <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; ffc0acf0: 38 60 00 0c li r3,12 ffc0acf4: 4b ff fe dc b ffc0abd0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0acf8: 81 64 00 04 lwz r11,4(r4) ffc0acfc: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0ad00: 40 9e ff 08 bne+ cr7,ffc0ac08 ffc0ad04: 4b ff fe cc b ffc0abd0 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0ad08: 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(); ffc0ad0c: 48 00 25 f1 bl ffc0d2fc <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; ffc0ad10: 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; ffc0ad14: 4b ff fe bc b ffc0abd0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0ad18: 81 29 00 04 lwz r9,4(r9) ffc0ad1c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ad20: 40 9e ff cc bne+ cr7,ffc0acec if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; ffc0ad24: 93 e5 00 00 stw r31,0(r5) ffc0ad28: 4b ff ff 58 b ffc0ac80 =============================================================================== ffc0c808 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0c808: 94 21 ff e0 stwu r1,-32(r1) ffc0c80c: 7c 08 02 a6 mflr r0 ffc0c810: 90 01 00 24 stw r0,36(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0c814: 7c 60 1b 79 mr. r0,r3 #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0c818: 93 81 00 10 stw r28,16(r1) ffc0c81c: 93 a1 00 14 stw r29,20(r1) ffc0c820: 93 c1 00 18 stw r30,24(r1) ffc0c824: 93 e1 00 1c stw r31,28(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0c828: 90 01 00 08 stw r0,8(r1) ffc0c82c: 41 82 00 74 beq- ffc0c8a0 <== NEVER TAKEN ffc0c830: 3f a0 00 00 lis r29,0 ffc0c834: 3b bd 30 00 addi r29,r29,12288 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) ffc0c838: 3b 9d 00 0c addi r28,r29,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 ] ) ffc0c83c: 85 3d 00 04 lwzu r9,4(r29) ffc0c840: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c844: 41 9e 00 54 beq- cr7,ffc0c898 continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; ffc0c848: 83 c9 00 04 lwz r30,4(r9) if ( !information ) ffc0c84c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0c850: 41 9e 00 48 beq- cr7,ffc0c898 continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0c854: a0 1e 00 10 lhz r0,16(r30) ffc0c858: 70 09 ff ff andi. r9,r0,65535 ffc0c85c: 41 82 00 3c beq- ffc0c898 <== NEVER TAKEN ffc0c860: 3b e0 00 01 li r31,1 the_thread = (Thread_Control *)information->local_table[ i ]; ffc0c864: 81 7e 00 1c lwz r11,28(r30) ffc0c868: 57 e9 10 3a rlwinm r9,r31,2,0,29 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0c86c: 3b ff 00 01 addi r31,r31,1 the_thread = (Thread_Control *)information->local_table[ i ]; ffc0c870: 7c 6b 48 2e lwzx r3,r11,r9 if ( !the_thread ) ffc0c874: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c878: 41 9e 00 14 beq- cr7,ffc0c88c continue; (*routine)(the_thread); ffc0c87c: 80 01 00 08 lwz r0,8(r1) ffc0c880: 7c 09 03 a6 mtctr r0 ffc0c884: 4e 80 04 21 bctrl ffc0c888: a0 1e 00 10 lhz r0,16(r30) information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0c88c: 54 09 04 3e clrlwi r9,r0,16 ffc0c890: 7f 89 f8 40 cmplw cr7,r9,r31 ffc0c894: 40 9c ff d0 bge+ cr7,ffc0c864 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { ffc0c898: 7f 9d e0 00 cmpw cr7,r29,r28 ffc0c89c: 40 9e ff a0 bne+ cr7,ffc0c83c (*routine)(the_thread); } } } ffc0c8a0: 80 01 00 24 lwz r0,36(r1) ffc0c8a4: 83 81 00 10 lwz r28,16(r1) ffc0c8a8: 7c 08 03 a6 mtlr r0 ffc0c8ac: 83 a1 00 14 lwz r29,20(r1) ffc0c8b0: 83 c1 00 18 lwz r30,24(r1) ffc0c8b4: 83 e1 00 1c lwz r31,28(r1) ffc0c8b8: 38 21 00 20 addi r1,r1,32 ffc0c8bc: 4e 80 00 20 blr =============================================================================== ffc0afa8 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { ffc0afa8: 94 21 ff f0 stwu r1,-16(r1) ffc0afac: 7c 08 02 a6 mflr r0 ffc0afb0: 93 e1 00 0c stw r31,12(r1) int i; /* * Validate parameters and look up information structure. */ if ( !info ) ffc0afb4: 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 ) { ffc0afb8: 90 01 00 14 stw r0,20(r1) /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; ffc0afbc: 38 00 00 09 li r0,9 int i; /* * Validate parameters and look up information structure. */ if ( !info ) ffc0afc0: 41 82 00 7c beq- ffc0b03c return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); ffc0afc4: 54 84 04 3e clrlwi r4,r4,16 ffc0afc8: 48 00 24 25 bl ffc0d3ec <_Objects_Get_information> if ( !obj_info ) return RTEMS_INVALID_NUMBER; ffc0afcc: 38 00 00 0a li r0,10 */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) ffc0afd0: 2c 03 00 00 cmpwi r3,0 ffc0afd4: 41 82 00 68 beq- ffc0b03c * 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; ffc0afd8: a1 03 00 10 lhz r8,16(r3) return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; ffc0afdc: 80 03 00 08 lwz r0,8(r3) 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++ ) ffc0afe0: 2f 88 00 00 cmpwi cr7,r8,0 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; ffc0afe4: 81 63 00 0c lwz r11,12(r3) info->auto_extend = obj_info->auto_extend; ffc0afe8: 89 23 00 12 lbz r9,18(r3) return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; ffc0afec: 90 1f 00 00 stw r0,0(r31) 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++ ) ffc0aff0: 38 00 00 00 li r0,0 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; ffc0aff4: 91 7f 00 04 stw r11,4(r31) info->auto_extend = obj_info->auto_extend; ffc0aff8: 99 3f 00 0c stb r9,12(r31) info->maximum = obj_info->maximum; ffc0affc: 91 1f 00 08 stw r8,8(r31) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0b000: 41 9e 00 34 beq- cr7,ffc0b034 <== NEVER TAKEN ffc0b004: 80 e3 00 1c lwz r7,28(r3) ffc0b008: 39 60 00 01 li r11,1 ffc0b00c: 39 20 00 01 li r9,1 ffc0b010: 39 29 00 01 addi r9,r9,1 ffc0b014: 7f 88 48 40 cmplw cr7,r8,r9 if ( !obj_info->local_table[i] ) ffc0b018: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc0b01c: 7d 47 58 2e lwzx r10,r7,r11 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++ ) ffc0b020: 7d 2b 4b 78 mr r11,r9 if ( !obj_info->local_table[i] ) unallocated++; ffc0b024: 20 ca 00 00 subfic r6,r10,0 ffc0b028: 7c c0 01 94 addze r6,r0 ffc0b02c: 7c c0 33 78 mr r0,r6 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++ ) ffc0b030: 40 9c ff e0 bge+ cr7,ffc0b010 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; ffc0b034: 90 1f 00 10 stw r0,16(r31) return RTEMS_SUCCESSFUL; ffc0b038: 38 00 00 00 li r0,0 } ffc0b03c: 7c 03 03 78 mr r3,r0 ffc0b040: 80 01 00 14 lwz r0,20(r1) ffc0b044: 83 e1 00 0c lwz r31,12(r1) ffc0b048: 38 21 00 10 addi r1,r1,16 ffc0b04c: 7c 08 03 a6 mtlr r0 ffc0b050: 4e 80 00 20 blr =============================================================================== ffc19084 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc19084: 94 21 ff d0 stwu r1,-48(r1) ffc19088: 7c 08 02 a6 mflr r0 ffc1908c: 93 e1 00 2c stw r31,44(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc19090: 7c 7f 1b 79 mr. r31,r3 return RTEMS_INVALID_NAME; ffc19094: 38 60 00 03 li r3,3 uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc19098: 93 c1 00 28 stw r30,40(r1) ffc1909c: 7c be 2b 78 mr r30,r5 ffc190a0: 90 01 00 34 stw r0,52(r1) ffc190a4: 93 61 00 1c stw r27,28(r1) ffc190a8: 93 81 00 20 stw r28,32(r1) ffc190ac: 93 a1 00 24 stw r29,36(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc190b0: 40 82 00 28 bne- ffc190d8 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc190b4: 80 01 00 34 lwz r0,52(r1) ffc190b8: 83 61 00 1c lwz r27,28(r1) ffc190bc: 7c 08 03 a6 mtlr r0 ffc190c0: 83 81 00 20 lwz r28,32(r1) ffc190c4: 83 a1 00 24 lwz r29,36(r1) ffc190c8: 83 c1 00 28 lwz r30,40(r1) ffc190cc: 83 e1 00 2c lwz r31,44(r1) ffc190d0: 38 21 00 30 addi r1,r1,48 ffc190d4: 4e 80 00 20 blr register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) ffc190d8: 2f 84 00 00 cmpwi cr7,r4,0 return RTEMS_INVALID_ADDRESS; ffc190dc: 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 ) ffc190e0: 41 be ff d4 beq- cr7,ffc190b4 return RTEMS_INVALID_ADDRESS; if ( !id ) ffc190e4: 2f 88 00 00 cmpwi cr7,r8,0 ffc190e8: 41 be ff cc beq- cr7,ffc190b4 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || ffc190ec: 2f 85 00 00 cmpwi cr7,r5,0 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; ffc190f0: 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 || ffc190f4: 41 9e ff c0 beq+ cr7,ffc190b4 ffc190f8: 2f 86 00 00 cmpwi cr7,r6,0 ffc190fc: 41 9e ff b8 beq+ cr7,ffc190b4 ffc19100: 7f 85 30 40 cmplw cr7,r5,r6 ffc19104: 41 9c ff b0 blt+ cr7,ffc190b4 ffc19108: 70 c0 00 07 andi. r0,r6,7 ffc1910c: 40 82 ff a8 bne+ ffc190b4 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) ffc19110: 70 9b 00 07 andi. r27,r4,7 return RTEMS_INVALID_ADDRESS; ffc19114: 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 ) ) ffc19118: 40 82 ff 9c bne+ ffc190b4 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc1911c: 3d 20 00 00 lis r9,0 ffc19120: 80 09 28 9c lwz r0,10396(r9) ffc19124: 30 00 00 01 addic r0,r0,1 ffc19128: 90 09 28 9c stw r0,10396(r9) return _Thread_Dispatch_disable_level; ffc1912c: 80 09 28 9c lwz r0,10396(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 ); ffc19130: 3f 80 00 00 lis r28,0 ffc19134: 90 81 00 08 stw r4,8(r1) ffc19138: 3b 9c 6e c0 addi r28,r28,28352 ffc1913c: 7f 83 e3 78 mr r3,r28 ffc19140: 90 c1 00 0c stw r6,12(r1) ffc19144: 90 e1 00 10 stw r7,16(r1) ffc19148: 91 01 00 14 stw r8,20(r1) ffc1914c: 48 00 5e 95 bl ffc1efe0 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { ffc19150: 7c 7d 1b 79 mr. r29,r3 ffc19154: 80 81 00 08 lwz r4,8(r1) ffc19158: 80 c1 00 0c lwz r6,12(r1) ffc1915c: 80 e1 00 10 lwz r7,16(r1) ffc19160: 81 01 00 14 lwz r8,20(r1) ffc19164: 41 82 00 50 beq- ffc191b4 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, ffc19168: 7c be 33 96 divwu r5,r30,r6 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; ffc1916c: 90 9d 00 10 stw r4,16(r29) the_partition->length = length; the_partition->buffer_size = buffer_size; ffc19170: 90 dd 00 18 stw r6,24(r29) the_partition->attribute_set = attribute_set; ffc19174: 90 fd 00 1c stw r7,28(r29) return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; ffc19178: 93 dd 00 14 stw r30,20(r29) the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; ffc1917c: 93 7d 00 20 stw r27,32(r29) _Chain_Initialize( &the_partition->Memory, starting_address, ffc19180: 91 01 00 14 stw r8,20(r1) ffc19184: 38 7d 00 24 addi r3,r29,36 ffc19188: 48 00 41 6d bl ffc1d2f4 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc1918c: 80 1d 00 08 lwz r0,8(r29) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc19190: 81 7c 00 1c lwz r11,28(r28) ffc19194: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc19198: 7f ab 49 2e stwx r29,r11,r9 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc1919c: 93 fd 00 0c stw r31,12(r29) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; ffc191a0: 81 01 00 14 lwz r8,20(r1) ffc191a4: 90 08 00 00 stw r0,0(r8) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); ffc191a8: 48 00 74 b1 bl ffc20658 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc191ac: 38 60 00 00 li r3,0 ffc191b0: 4b ff ff 04 b ffc190b4 _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); ffc191b4: 48 00 74 a5 bl ffc20658 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; ffc191b8: 38 60 00 05 li r3,5 ffc191bc: 4b ff fe f8 b ffc190b4 =============================================================================== ffc1934c : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { ffc1934c: 94 21 ff e0 stwu r1,-32(r1) ffc19350: 7c 08 02 a6 mflr r0 ffc19354: 90 01 00 24 stw r0,36(r1) ffc19358: 7c 60 1b 78 mr r0,r3 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) ffc1935c: 3c 60 00 00 lis r3,0 ffc19360: 93 e1 00 1c stw r31,28(r1) ffc19364: 38 63 6e c0 addi r3,r3,28352 ffc19368: 7c 9f 23 78 mr r31,r4 ffc1936c: 38 a1 00 08 addi r5,r1,8 ffc19370: 93 c1 00 18 stw r30,24(r1) ffc19374: 7c 04 03 78 mr r4,r0 ffc19378: 48 00 62 99 bl ffc1f610 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc1937c: 80 01 00 08 lwz r0,8(r1) ffc19380: 7c 7e 1b 78 mr r30,r3 ffc19384: 2f 80 00 00 cmpwi cr7,r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc19388: 38 60 00 04 li r3,4 { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc1938c: 40 9e 00 58 bne- cr7,ffc193e4 ) { void *starting; void *ending; starting = the_partition->starting_address; ffc19390: 80 1e 00 10 lwz r0,16(r30) ending = _Addresses_Add_offset( starting, the_partition->length ); ffc19394: 81 3e 00 14 lwz r9,20(r30) const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc19398: 7f 9f 00 40 cmplw cr7,r31,r0 ffc1939c: 41 9c 00 60 blt- cr7,ffc193fc RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc193a0: 7d 20 4a 14 add r9,r0,r9 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc193a4: 7f 9f 48 40 cmplw cr7,r31,r9 ffc193a8: 41 9d 00 54 bgt- cr7,ffc193fc <== NEVER TAKEN offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); ffc193ac: 81 3e 00 18 lwz r9,24(r30) RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); ffc193b0: 7c 00 f8 50 subf r0,r0,r31 ffc193b4: 7d 60 4b 96 divwu r11,r0,r9 ffc193b8: 7d 2b 49 d6 mullw r9,r11,r9 starting = the_partition->starting_address; ending = _Addresses_Add_offset( starting, the_partition->length ); return ( _Addresses_Is_in_range( the_buffer, starting, ending ) && ffc193bc: 7f 80 48 00 cmpw cr7,r0,r9 ffc193c0: 40 9e 00 3c bne- cr7,ffc193fc RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); ffc193c4: 38 7e 00 24 addi r3,r30,36 ffc193c8: 7f e4 fb 78 mr r4,r31 ffc193cc: 48 00 3e 91 bl ffc1d25c <_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; ffc193d0: 81 3e 00 20 lwz r9,32(r30) ffc193d4: 38 09 ff ff addi r0,r9,-1 ffc193d8: 90 1e 00 20 stw r0,32(r30) _Thread_Enable_dispatch(); ffc193dc: 48 00 72 7d bl ffc20658 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc193e0: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc193e4: 80 01 00 24 lwz r0,36(r1) ffc193e8: 83 c1 00 18 lwz r30,24(r1) ffc193ec: 7c 08 03 a6 mtlr r0 ffc193f0: 83 e1 00 1c lwz r31,28(r1) ffc193f4: 38 21 00 20 addi r1,r1,32 ffc193f8: 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(); ffc193fc: 48 00 72 5d bl ffc20658 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc19400: 80 01 00 24 lwz r0,36(r1) the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; ffc19404: 38 60 00 09 li r3,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc19408: 83 c1 00 18 lwz r30,24(r1) ffc1940c: 7c 08 03 a6 mtlr r0 ffc19410: 83 e1 00 1c lwz r31,28(r1) ffc19414: 38 21 00 20 addi r1,r1,32 ffc19418: 4e 80 00 20 blr =============================================================================== ffc0a21c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { ffc0a21c: 94 21 ff d0 stwu r1,-48(r1) ffc0a220: 7c 08 02 a6 mflr r0 ffc0a224: 93 e1 00 2c stw r31,44(r1) ffc0a228: 7c 7f 1b 78 mr r31,r3 RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) ffc0a22c: 3c 60 00 00 lis r3,0 ffc0a230: 93 c1 00 28 stw r30,40(r1) ffc0a234: 38 63 2c 00 addi r3,r3,11264 ffc0a238: 7c 9e 23 78 mr r30,r4 ffc0a23c: 38 a1 00 08 addi r5,r1,8 ffc0a240: 90 01 00 34 stw r0,52(r1) ffc0a244: 7f e4 fb 78 mr r4,r31 ffc0a248: 93 a1 00 24 stw r29,36(r1) ffc0a24c: 93 61 00 1c stw r27,28(r1) ffc0a250: 93 81 00 20 stw r28,32(r1) ffc0a254: 48 00 2c f5 bl ffc0cf48 <_Objects_Get> ffc0a258: 7c 7d 1b 78 mr r29,r3 rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc0a25c: 80 01 00 08 lwz r0,8(r1) ffc0a260: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a264: 40 9e 00 4c bne- cr7,ffc0a2b0 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0a268: 3f 80 00 00 lis r28,0 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { ffc0a26c: 81 23 00 40 lwz r9,64(r3) ffc0a270: 3b 9c 2e 98 addi r28,r28,11928 ffc0a274: 80 1c 00 0c lwz r0,12(r28) ffc0a278: 7f 89 00 00 cmpw cr7,r9,r0 ffc0a27c: 41 9e 00 60 beq- cr7,ffc0a2dc _Thread_Enable_dispatch(); ffc0a280: 48 00 3d 11 bl ffc0df90 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a284: 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; ffc0a288: 3b e0 00 17 li r31,23 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a28c: 83 61 00 1c lwz r27,28(r1) ffc0a290: 7c 08 03 a6 mtlr r0 ffc0a294: 7f e3 fb 78 mr r3,r31 ffc0a298: 83 81 00 20 lwz r28,32(r1) ffc0a29c: 83 a1 00 24 lwz r29,36(r1) ffc0a2a0: 83 c1 00 28 lwz r30,40(r1) ffc0a2a4: 83 e1 00 2c lwz r31,44(r1) ffc0a2a8: 38 21 00 30 addi r1,r1,48 ffc0a2ac: 4e 80 00 20 blr #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0a2b0: 3b e0 00 04 li r31,4 } ffc0a2b4: 80 01 00 34 lwz r0,52(r1) ffc0a2b8: 7f e3 fb 78 mr r3,r31 ffc0a2bc: 83 61 00 1c lwz r27,28(r1) ffc0a2c0: 7c 08 03 a6 mtlr r0 ffc0a2c4: 83 81 00 20 lwz r28,32(r1) ffc0a2c8: 83 a1 00 24 lwz r29,36(r1) ffc0a2cc: 83 c1 00 28 lwz r30,40(r1) ffc0a2d0: 83 e1 00 2c lwz r31,44(r1) ffc0a2d4: 38 21 00 30 addi r1,r1,48 ffc0a2d8: 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 ) { ffc0a2dc: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0a2e0: 41 9e 00 68 beq- cr7,ffc0a348 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0a2e4: 7f 60 00 a6 mfmsr r27 ffc0a2e8: 7c 10 42 a6 mfsprg r0,0 ffc0a2ec: 7f 60 00 78 andc r0,r27,r0 ffc0a2f0: 7c 00 01 24 mtmsr r0 _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { ffc0a2f4: 80 03 00 38 lwz r0,56(r3) ffc0a2f8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a2fc: 41 9e 00 74 beq- cr7,ffc0a370 _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { ffc0a300: 2f 80 00 02 cmpwi cr7,r0,2 ffc0a304: 41 9e 00 bc beq- cr7,ffc0a3c0 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { ffc0a308: 2f 80 00 04 cmpwi cr7,r0,4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0a30c: 3b e0 00 04 li r31,4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { ffc0a310: 40 9e ff a4 bne+ cr7,ffc0a2b4 <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); ffc0a314: 4b ff fd e1 bl ffc0a0f4 <_Rate_monotonic_Update_statistics> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0a318: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a31c: 38 00 00 02 li r0,2 the_period->next_length = length; ffc0a320: 93 dd 00 3c stw r30,60(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a324: 3c 60 00 00 lis r3,0 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a328: 90 1d 00 38 stw r0,56(r29) ffc0a32c: 38 63 2d c8 addi r3,r3,11720 ffc0a330: 38 9d 00 10 addi r4,r29,16 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a334: 93 dd 00 1c stw r30,28(r29) the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; ffc0a338: 3b e0 00 06 li r31,6 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a33c: 48 00 50 39 bl ffc0f374 <_Watchdog_Insert> the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc0a340: 48 00 3c 51 bl ffc0df90 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; ffc0a344: 4b ff ff 70 b ffc0a2b4 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { ffc0a348: 80 03 00 38 lwz r0,56(r3) ffc0a34c: 3b e0 00 00 li r31,0 ffc0a350: 2b 80 00 04 cmplwi cr7,r0,4 ffc0a354: 41 9d 00 14 bgt- cr7,ffc0a368 <== NEVER TAKEN ffc0a358: 3d 20 ff c2 lis r9,-62 ffc0a35c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0a360: 39 29 13 2c addi r9,r9,4908 ffc0a364: 7f e9 00 2e lwzx r31,r9,r0 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); ffc0a368: 48 00 3c 29 bl ffc0df90 <_Thread_Enable_dispatch> return( return_value ); ffc0a36c: 4b ff ff 48 b ffc0a2b4 ffc0a370: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); ffc0a374: 4b ff fc dd bl ffc0a050 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a378: 39 20 00 02 li r9,2 ffc0a37c: 91 3d 00 38 stw r9,56(r29) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc0a380: 3d 20 ff c1 lis r9,-63 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0a384: 38 00 00 00 li r0,0 the_watchdog->routine = routine; ffc0a388: 39 29 a7 e4 addi r9,r9,-22556 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0a38c: 90 1d 00 18 stw r0,24(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a390: 3c 60 00 00 lis r3,0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc0a394: 91 3d 00 2c stw r9,44(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a398: 38 63 2d c8 addi r3,r3,11720 ffc0a39c: 38 9d 00 10 addi r4,r29,16 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc0a3a0: 93 fd 00 30 stw r31,48(r29) the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc0a3a4: 3b e0 00 00 li r31,0 the_watchdog->user_data = user_data; ffc0a3a8: 90 1d 00 34 stw r0,52(r29) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; ffc0a3ac: 93 dd 00 3c stw r30,60(r29) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a3b0: 93 dd 00 1c stw r30,28(r29) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a3b4: 48 00 4f c1 bl ffc0f374 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc0a3b8: 48 00 3b d9 bl ffc0df90 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0a3bc: 4b ff fe f8 b ffc0a2b4 if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); ffc0a3c0: 4b ff fd 35 bl ffc0a0f4 <_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; ffc0a3c4: 38 00 00 01 li r0,1 ffc0a3c8: 90 1d 00 38 stw r0,56(r29) the_period->next_length = length; ffc0a3cc: 93 dd 00 3c stw r30,60(r29) ffc0a3d0: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc0a3d4: 81 3c 00 0c lwz r9,12(r28) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc0a3d8: 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; ffc0a3dc: 80 1d 00 08 lwz r0,8(r29) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc0a3e0: 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; ffc0a3e4: 90 09 00 20 stw r0,32(r9) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc0a3e8: 48 00 46 6d bl ffc0ea54 <_Thread_Set_state> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0a3ec: 7d 20 00 a6 mfmsr r9 ffc0a3f0: 7c 10 42 a6 mfsprg r0,0 ffc0a3f4: 7d 20 00 78 andc r0,r9,r0 ffc0a3f8: 7c 00 01 24 mtmsr r0 * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a3fc: 39 60 00 02 li r11,2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; ffc0a400: 80 1d 00 38 lwz r0,56(r29) the_period->state = RATE_MONOTONIC_ACTIVE; ffc0a404: 91 7d 00 38 stw r11,56(r29) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0a408: 7d 20 01 24 mtmsr r9 /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) ffc0a40c: 2f 80 00 03 cmpwi cr7,r0,3 ffc0a410: 41 9e 00 10 beq- cr7,ffc0a420 <== NEVER TAKEN _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); ffc0a414: 48 00 3b 7d bl ffc0df90 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0a418: 3b e0 00 00 li r31,0 ffc0a41c: 4b ff fe 98 b ffc0a2b4 /* * 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 ); ffc0a420: 80 7c 00 0c lwz r3,12(r28) <== NOT EXECUTED ffc0a424: 38 80 40 00 li r4,16384 <== NOT EXECUTED ffc0a428: 48 00 36 e9 bl ffc0db10 <_Thread_Clear_state> <== NOT EXECUTED ffc0a42c: 4b ff ff e8 b ffc0a414 <== NOT EXECUTED =============================================================================== ffc0a430 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc0a430: 94 21 ff 70 stwu r1,-144(r1) ffc0a434: 7c 08 02 a6 mflr r0 ffc0a438: 90 01 00 94 stw r0,148(r1) rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) ffc0a43c: 7c 80 23 79 mr. r0,r4 */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc0a440: 93 a1 00 84 stw r29,132(r1) ffc0a444: 7c 7d 1b 78 mr r29,r3 ffc0a448: 93 01 00 70 stw r24,112(r1) ffc0a44c: 93 21 00 74 stw r25,116(r1) ffc0a450: 93 41 00 78 stw r26,120(r1) ffc0a454: 93 61 00 7c stw r27,124(r1) ffc0a458: 93 81 00 80 stw r28,128(r1) ffc0a45c: 93 c1 00 88 stw r30,136(r1) ffc0a460: 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 ) ffc0a464: 90 01 00 68 stw r0,104(r1) ffc0a468: 41 82 01 70 beq- ffc0a5d8 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); ffc0a46c: 3c 80 ff c2 lis r4,-62 ffc0a470: 7c 09 03 a6 mtctr r0 ffc0a474: 38 84 13 40 addi r4,r4,4928 /* * 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 ; ffc0a478: 3f c0 00 00 lis r30,0 ffc0a47c: 3b de 2c 00 addi r30,r30,11264 char name[5]; if ( !print ) return; (*print)( context, "Period information by period\n" ); ffc0a480: 4c c6 31 82 crclr 4*cr1+eq ffc0a484: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); ffc0a488: 80 01 00 68 lwz r0,104(r1) ffc0a48c: 3c 80 ff c2 lis r4,-62 ffc0a490: 7c 09 03 a6 mtctr r0 ffc0a494: 38 84 13 60 addi r4,r4,4960 ffc0a498: 7f a3 eb 78 mr r3,r29 ffc0a49c: 4c c6 31 82 crclr 4*cr1+eq ffc0a4a0: 4e 80 04 21 bctrl (*print)( context, "--- Wall times are in seconds ---\n" ); ffc0a4a4: 80 01 00 68 lwz r0,104(r1) ffc0a4a8: 3c 80 ff c2 lis r4,-62 ffc0a4ac: 7c 09 03 a6 mtctr r0 ffc0a4b0: 38 84 13 84 addi r4,r4,4996 ffc0a4b4: 7f a3 eb 78 mr r3,r29 ffc0a4b8: 4c c6 31 82 crclr 4*cr1+eq ffc0a4bc: 4e 80 04 21 bctrl Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " ffc0a4c0: 80 01 00 68 lwz r0,104(r1) ffc0a4c4: 3c 80 ff c2 lis r4,-62 ffc0a4c8: 7c 09 03 a6 mtctr r0 ffc0a4cc: 38 84 13 a8 addi r4,r4,5032 ffc0a4d0: 7f a3 eb 78 mr r3,r29 ffc0a4d4: 4c c6 31 82 crclr 4*cr1+eq ffc0a4d8: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " ffc0a4dc: 80 01 00 68 lwz r0,104(r1) ffc0a4e0: 3c 80 ff c2 lis r4,-62 ffc0a4e4: 7c 09 03 a6 mtctr r0 ffc0a4e8: 7f a3 eb 78 mr r3,r29 ffc0a4ec: 38 84 13 f4 addi r4,r4,5108 ffc0a4f0: 4c c6 31 82 crclr 4*cr1+eq ffc0a4f4: 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 ; ffc0a4f8: 83 fe 00 08 lwz r31,8(r30) ffc0a4fc: 80 1e 00 0c lwz r0,12(r30) ffc0a500: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0a504: 41 9d 00 d4 bgt- cr7,ffc0a5d8 <== 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, ffc0a508: 3f 40 ff c2 lis r26,-62 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, ffc0a50c: 3f 00 ff c2 lis r24,-62 ffc0a510: 3f 80 10 62 lis r28,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, ffc0a514: 3f 20 ff c2 lis r25,-62 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0a518: 3f 60 ff c2 lis r27,-62 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc0a51c: 3b 5a 14 40 addi r26,r26,5184 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, ffc0a520: 3b 18 14 58 addi r24,r24,5208 ffc0a524: 63 9c 4d d3 ori r28,r28,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, ffc0a528: 3b 39 14 78 addi r25,r25,5240 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0a52c: 3b 7b ff a0 addi r27,r27,-96 ffc0a530: 48 00 00 14 b ffc0a544 /* * 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 ; ffc0a534: 80 1e 00 0c lwz r0,12(r30) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc0a538: 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 ; ffc0a53c: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0a540: 41 9c 00 98 blt- cr7,ffc0a5d8 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); ffc0a544: 7f e3 fb 78 mr r3,r31 ffc0a548: 38 81 00 30 addi r4,r1,48 ffc0a54c: 48 00 74 79 bl ffc119c4 if ( status != RTEMS_SUCCESSFUL ) ffc0a550: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a554: 40 9e ff e0 bne+ cr7,ffc0a534 #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 ); ffc0a558: 38 81 00 18 addi r4,r1,24 ffc0a55c: 7f e3 fb 78 mr r3,r31 ffc0a560: 48 00 75 75 bl ffc11ad4 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc0a564: 80 61 00 18 lwz r3,24(r1) ffc0a568: 38 a1 00 08 addi r5,r1,8 ffc0a56c: 38 80 00 05 li r4,5 ffc0a570: 48 00 03 41 bl ffc0a8b0 /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc0a574: 80 01 00 68 lwz r0,104(r1) ffc0a578: 7f 44 d3 78 mr r4,r26 ffc0a57c: 80 e1 00 30 lwz r7,48(r1) ffc0a580: 7f e5 fb 78 mr r5,r31 ffc0a584: 7c 09 03 a6 mtctr r0 ffc0a588: 7f a3 eb 78 mr r3,r29 ffc0a58c: 81 01 00 34 lwz r8,52(r1) ffc0a590: 38 c1 00 08 addi r6,r1,8 ffc0a594: 4c c6 31 82 crclr 4*cr1+eq ffc0a598: 4e 80 04 21 bctrl ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc0a59c: 80 01 00 30 lwz r0,48(r1) struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc0a5a0: 38 61 00 48 addi r3,r1,72 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc0a5a4: 2f 80 00 00 cmpwi cr7,r0,0 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc0a5a8: 38 a1 00 10 addi r5,r1,16 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0a5ac: 7f 64 db 78 mr r4,r27 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc0a5b0: 40 9e 00 58 bne- cr7,ffc0a608 (*print)( context, "\n" ); ffc0a5b4: 80 01 00 68 lwz r0,104(r1) ffc0a5b8: 7f a3 eb 78 mr r3,r29 * 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++ ) { ffc0a5bc: 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" ); ffc0a5c0: 7c 09 03 a6 mtctr r0 ffc0a5c4: 4c c6 31 82 crclr 4*cr1+eq ffc0a5c8: 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 ; ffc0a5cc: 80 1e 00 0c lwz r0,12(r30) ffc0a5d0: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0a5d4: 40 9c ff 70 bge+ cr7,ffc0a544 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } ffc0a5d8: 80 01 00 94 lwz r0,148(r1) ffc0a5dc: 83 01 00 70 lwz r24,112(r1) ffc0a5e0: 7c 08 03 a6 mtlr r0 ffc0a5e4: 83 21 00 74 lwz r25,116(r1) ffc0a5e8: 83 41 00 78 lwz r26,120(r1) ffc0a5ec: 83 61 00 7c lwz r27,124(r1) ffc0a5f0: 83 81 00 80 lwz r28,128(r1) ffc0a5f4: 83 a1 00 84 lwz r29,132(r1) ffc0a5f8: 83 c1 00 88 lwz r30,136(r1) ffc0a5fc: 83 e1 00 8c lwz r31,140(r1) ffc0a600: 38 21 00 90 addi r1,r1,144 ffc0a604: 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 ); ffc0a608: 7c 04 03 78 mr r4,r0 ffc0a60c: 48 00 47 41 bl ffc0ed4c <_Timespec_Divide_by_integer> (*print)( context, ffc0a610: 80 01 00 14 lwz r0,20(r1) ffc0a614: 80 81 00 3c lwz r4,60(r1) ffc0a618: 7f a3 eb 78 mr r3,r29 ffc0a61c: 81 61 00 44 lwz r11,68(r1) ffc0a620: 7d 40 e0 96 mulhw r10,r0,r28 ffc0a624: 80 e1 00 40 lwz r7,64(r1) ffc0a628: 7c c4 e0 96 mulhw r6,r4,r28 ffc0a62c: 81 21 00 10 lwz r9,16(r1) ffc0a630: 80 a1 00 38 lwz r5,56(r1) ffc0a634: 7d 0b e0 96 mulhw r8,r11,r28 ffc0a638: 7c 00 fe 70 srawi r0,r0,31 ffc0a63c: 7d 4a 36 70 srawi r10,r10,6 ffc0a640: 7d 40 50 50 subf r10,r0,r10 ffc0a644: 80 01 00 68 lwz r0,104(r1) ffc0a648: 7d 6b fe 70 srawi r11,r11,31 ffc0a64c: 7c 84 fe 70 srawi r4,r4,31 ffc0a650: 7c 09 03 a6 mtctr r0 ffc0a654: 7c c6 36 70 srawi r6,r6,6 ffc0a658: 7d 08 36 70 srawi r8,r8,6 ffc0a65c: 7c c4 30 50 subf r6,r4,r6 ffc0a660: 7d 0b 40 50 subf r8,r11,r8 ffc0a664: 7f 04 c3 78 mr r4,r24 ffc0a668: 4c c6 31 82 crclr 4*cr1+eq ffc0a66c: 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); ffc0a670: 80 81 00 30 lwz r4,48(r1) ffc0a674: 38 61 00 60 addi r3,r1,96 ffc0a678: 38 a1 00 10 addi r5,r1,16 ffc0a67c: 48 00 46 d1 bl ffc0ed4c <_Timespec_Divide_by_integer> (*print)( context, ffc0a680: 80 01 00 14 lwz r0,20(r1) ffc0a684: 80 c1 00 54 lwz r6,84(r1) ffc0a688: 7f a3 eb 78 mr r3,r29 ffc0a68c: 81 61 00 5c lwz r11,92(r1) ffc0a690: 7d 40 e0 96 mulhw r10,r0,r28 ffc0a694: 80 a1 00 50 lwz r5,80(r1) ffc0a698: 7d 86 e0 96 mulhw r12,r6,r28 ffc0a69c: 80 e1 00 58 lwz r7,88(r1) ffc0a6a0: 81 21 00 10 lwz r9,16(r1) ffc0a6a4: 7d 0b e0 96 mulhw r8,r11,r28 ffc0a6a8: 7c 00 fe 70 srawi r0,r0,31 ffc0a6ac: 7d 4a 36 70 srawi r10,r10,6 ffc0a6b0: 7d 40 50 50 subf r10,r0,r10 ffc0a6b4: 80 01 00 68 lwz r0,104(r1) ffc0a6b8: 7d 8c 36 70 srawi r12,r12,6 ffc0a6bc: 7d 6b fe 70 srawi r11,r11,31 ffc0a6c0: 7c 09 03 a6 mtctr r0 ffc0a6c4: 7c c6 fe 70 srawi r6,r6,31 ffc0a6c8: 7d 08 36 70 srawi r8,r8,6 ffc0a6cc: 7f 24 cb 78 mr r4,r25 ffc0a6d0: 7c c6 60 50 subf r6,r6,r12 ffc0a6d4: 7d 0b 40 50 subf r8,r11,r8 ffc0a6d8: 4c c6 31 82 crclr 4*cr1+eq ffc0a6dc: 4e 80 04 21 bctrl ffc0a6e0: 4b ff fe 54 b ffc0a534 =============================================================================== ffc0a6f4 : * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; ffc0a6f4: 3d 20 00 00 lis r9,0 /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { ffc0a6f8: 94 21 ff f0 stwu r1,-16(r1) ffc0a6fc: 7c 08 02 a6 mflr r0 ffc0a700: 81 69 28 08 lwz r11,10248(r9) ffc0a704: 90 01 00 14 stw r0,20(r1) ffc0a708: 38 0b 00 01 addi r0,r11,1 ffc0a70c: 90 09 28 08 stw r0,10248(r9) ffc0a710: 93 c1 00 08 stw r30,8(r1) ffc0a714: 93 e1 00 0c stw r31,12(r1) return _Thread_Dispatch_disable_level; ffc0a718: 80 09 28 08 lwz r0,10248(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 ; ffc0a71c: 3f c0 00 00 lis r30,0 ffc0a720: 3b de 2c 00 addi r30,r30,11264 ffc0a724: 83 fe 00 08 lwz r31,8(r30) ffc0a728: 80 1e 00 0c lwz r0,12(r30) ffc0a72c: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0a730: 41 9d 00 1c bgt- cr7,ffc0a74c <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { (void) rtems_rate_monotonic_reset_statistics( id ); ffc0a734: 7f e3 fb 78 mr r3,r31 ffc0a738: 48 00 00 31 bl ffc0a768 /* * 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 ; ffc0a73c: 80 1e 00 0c lwz r0,12(r30) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc0a740: 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 ; ffc0a744: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0a748: 40 9c ff ec bge+ cr7,ffc0a734 } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); ffc0a74c: 48 00 38 45 bl ffc0df90 <_Thread_Enable_dispatch> } ffc0a750: 80 01 00 14 lwz r0,20(r1) ffc0a754: 83 c1 00 08 lwz r30,8(r1) ffc0a758: 7c 08 03 a6 mtlr r0 ffc0a75c: 83 e1 00 0c lwz r31,12(r1) ffc0a760: 38 21 00 10 addi r1,r1,16 ffc0a764: 4e 80 00 20 blr =============================================================================== ffc1ad24 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc1ad24: 94 21 ff e0 stwu r1,-32(r1) ffc1ad28: 7c 08 02 a6 mflr r0 ffc1ad2c: 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 ) ffc1ad30: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc1ad34: 90 01 00 24 stw r0,36(r1) Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; ffc1ad38: 38 00 00 0a li r0,10 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) ffc1ad3c: 40 82 00 1c bne- ffc1ad58 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1ad40: 7c 03 03 78 mr r3,r0 ffc1ad44: 80 01 00 24 lwz r0,36(r1) ffc1ad48: 83 e1 00 1c lwz r31,28(r1) ffc1ad4c: 38 21 00 20 addi r1,r1,32 ffc1ad50: 7c 08 03 a6 mtlr r0 ffc1ad54: 4e 80 00 20 blr ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); ffc1ad58: 38 81 00 08 addi r4,r1,8 ffc1ad5c: 48 00 59 39 bl ffc20694 <_Thread_Get> switch ( location ) { ffc1ad60: 80 01 00 08 lwz r0,8(r1) ffc1ad64: 2f 80 00 00 cmpwi cr7,r0,0 ffc1ad68: 40 9e 00 6c bne- cr7,ffc1add4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; ffc1ad6c: 81 23 01 2c lwz r9,300(r3) asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { ffc1ad70: 80 09 00 0c lwz r0,12(r9) ffc1ad74: 2f 80 00 00 cmpwi cr7,r0,0 ffc1ad78: 41 9e 00 78 beq- cr7,ffc1adf0 if ( asr->is_enabled ) { ffc1ad7c: 88 09 00 08 lbz r0,8(r9) ffc1ad80: 2f 80 00 00 cmpwi cr7,r0,0 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1ad84: 7c 00 00 a6 mfmsr r0 ffc1ad88: 7d 70 42 a6 mfsprg r11,0 ffc1ad8c: 7c 0b 58 78 andc r11,r0,r11 ffc1ad90: 7d 60 01 24 mtmsr r11 ffc1ad94: 41 9e 00 68 beq- cr7,ffc1adfc ) { ISR_Level _level; _ISR_Disable( _level ); *signal_set |= signals; ffc1ad98: 81 69 00 14 lwz r11,20(r9) ffc1ad9c: 7d 7f fb 78 or r31,r11,r31 ffc1ada0: 93 e9 00 14 stw r31,20(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1ada4: 7c 00 01 24 mtmsr r0 _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc1ada8: 3d 20 00 00 lis r9,0 ffc1adac: 39 29 71 d8 addi r9,r9,29144 ffc1adb0: 80 09 00 08 lwz r0,8(r9) ffc1adb4: 2f 80 00 00 cmpwi cr7,r0,0 ffc1adb8: 41 9e 00 10 beq- cr7,ffc1adc8 ffc1adbc: 80 09 00 0c lwz r0,12(r9) ffc1adc0: 7f 83 00 00 cmpw cr7,r3,r0 ffc1adc4: 41 9e 00 4c beq- cr7,ffc1ae10 <== ALWAYS TAKEN _Thread_Dispatch_necessary = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); ffc1adc8: 48 00 58 91 bl ffc20658 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc1adcc: 38 00 00 00 li r0,0 ffc1add0: 4b ff ff 70 b ffc1ad40 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc1add4: 38 00 00 04 li r0,4 } ffc1add8: 83 e1 00 1c lwz r31,28(r1) ffc1addc: 7c 03 03 78 mr r3,r0 ffc1ade0: 80 01 00 24 lwz r0,36(r1) ffc1ade4: 38 21 00 20 addi r1,r1,32 ffc1ade8: 7c 08 03 a6 mtlr r0 ffc1adec: 4e 80 00 20 blr _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc1adf0: 48 00 58 69 bl ffc20658 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; ffc1adf4: 38 00 00 0b li r0,11 ffc1adf8: 4b ff ff 48 b ffc1ad40 ffc1adfc: 81 69 00 18 lwz r11,24(r9) ffc1ae00: 7d 7f fb 78 or r31,r11,r31 ffc1ae04: 93 e9 00 18 stw r31,24(r9) ffc1ae08: 7c 00 01 24 mtmsr r0 ffc1ae0c: 4b ff ff bc b ffc1adc8 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; ffc1ae10: 38 00 00 01 li r0,1 ffc1ae14: 98 09 00 18 stb r0,24(r9) ffc1ae18: 4b ff ff b0 b ffc1adc8 =============================================================================== ffc12430 : ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc12430: 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 ) { ffc12434: 7c 08 02 a6 mflr r0 ffc12438: 94 21 ff f8 stwu r1,-8(r1) ffc1243c: 90 01 00 0c stw r0,12(r1) ffc12440: 7c 60 1b 78 mr r0,r3 bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; ffc12444: 38 60 00 09 li r3,9 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc12448: 41 82 01 34 beq- ffc1257c return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; ffc1244c: 3c c0 00 00 lis r6,0 ffc12450: 38 c6 2d b8 addi r6,r6,11704 ffc12454: 81 26 00 0c lwz r9,12(r6) 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 ) ffc12458: 81 69 00 7c lwz r11,124(r9) executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc1245c: 89 09 00 74 lbz r8,116(r9) if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc12460: 2f 8b 00 00 cmpwi cr7,r11,0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc12464: 81 69 01 2c lwz r11,300(r9) asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc12468: 7d 08 00 34 cntlzw r8,r8 ffc1246c: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc12470: 55 07 40 2e rlwinm r7,r8,8,0,23 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc12474: 40 9e 01 18 bne- cr7,ffc1258c old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc12478: 89 0b 00 08 lbz r8,8(r11) #ifndef ASM static inline uint32_t _CPU_ISR_Get_level( void ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc1247c: 39 40 00 00 li r10,0 ffc12480: 7d 08 00 34 cntlzw r8,r8 ffc12484: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc12488: 55 08 50 2a rlwinm r8,r8,10,0,21 ffc1248c: 7d 07 3b 78 or r7,r8,r7 ffc12490: 7d 40 00 a6 mfmsr r10 if (msr & MSR_EE) return 0; ffc12494: 55 48 8f fe rlwinm r8,r10,17,31,31 ffc12498: 2f 88 00 00 cmpwi cr7,r8,0 *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc1249c: 70 8a 01 00 andi. r10,r4,256 ffc124a0: 7d 40 00 26 mfcr r10 ffc124a4: 55 4a ff fe rlwinm r10,r10,31,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(); ffc124a8: 7c e7 53 78 or r7,r7,r10 *previous_mode_set = old_mode; ffc124ac: 90 e5 00 00 stw r7,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc124b0: 41 82 00 14 beq- ffc124c4 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; ffc124b4: 70 08 01 00 andi. r8,r0,256 ffc124b8: 7d 40 00 26 mfcr r10 ffc124bc: 55 4a 1f fe rlwinm r10,r10,3,31,31 ffc124c0: 99 49 00 74 stb r10,116(r9) if ( mask & RTEMS_TIMESLICE_MASK ) { ffc124c4: 70 8a 02 00 andi. r10,r4,512 ffc124c8: 41 82 00 20 beq- ffc124e8 if ( _Modes_Is_timeslice(mode_set) ) { ffc124cc: 70 0a 02 00 andi. r10,r0,512 ffc124d0: 41 82 01 44 beq- ffc12614 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc124d4: 3d 40 00 00 lis r10,0 ffc124d8: 81 4a 27 c4 lwz r10,10180(r10) if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; ffc124dc: 39 00 00 01 li r8,1 ffc124e0: 91 09 00 7c stw r8,124(r9) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc124e4: 91 49 00 78 stw r10,120(r9) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc124e8: 70 88 00 01 andi. r8,r4,1 ffc124ec: 41 82 00 20 beq- ffc1250c } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc124f0: 39 20 00 00 li r9,0 ffc124f4: 7d 20 00 a6 mfmsr r9 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc124f8: 70 0a 00 01 andi. r10,r0,1 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; __asm__ volatile ( ffc124fc: 7d 50 42 a6 mfsprg r10,0 ffc12500: 40 82 01 24 bne- ffc12624 msr |= ppc_interrupt_get_disable_mask(); ffc12504: 7d 49 4b 78 or r9,r10,r9 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc12508: 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 ) { ffc1250c: 70 88 04 00 andi. r8,r4,1024 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; ffc12510: 39 40 00 00 li r10,0 if ( mask & RTEMS_ASR_MASK ) { ffc12514: 41 82 00 54 beq- ffc12568 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc12518: 70 09 04 00 andi. r9,r0,1024 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { ffc1251c: 89 2b 00 08 lbz r9,8(r11) * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc12520: 7c 00 00 26 mfcr r0 ffc12524: 54 00 1f fe rlwinm r0,r0,3,31,31 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { ffc12528: 7f 89 00 00 cmpw cr7,r9,r0 ffc1252c: 41 9e 00 3c beq- cr7,ffc12568 asr->is_enabled = is_asr_enabled; ffc12530: 98 0b 00 08 stb r0,8(r11) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc12534: 7c 00 00 a6 mfmsr r0 ffc12538: 7d 30 42 a6 mfsprg r9,0 ffc1253c: 7c 09 48 78 andc r9,r0,r9 ffc12540: 7d 20 01 24 mtmsr r9 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; ffc12544: 81 4b 00 18 lwz r10,24(r11) information->signals_pending = information->signals_posted; ffc12548: 81 2b 00 14 lwz r9,20(r11) information->signals_posted = _signals; ffc1254c: 91 4b 00 14 stw r10,20(r11) rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; ffc12550: 91 2b 00 18 stw r9,24(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc12554: 7c 00 01 24 mtmsr r0 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { ffc12558: 80 0b 00 14 lwz r0,20(r11) needs_asr_dispatching = true; ffc1255c: 39 40 00 01 li r10,1 if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { ffc12560: 2f 80 00 00 cmpwi cr7,r0,0 ffc12564: 41 9e 00 cc beq- cr7,ffc12630 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc12568: 3d 20 00 00 lis r9,0 ffc1256c: 80 09 28 04 lwz r0,10244(r9) if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; ffc12570: 38 60 00 00 li r3,0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc12574: 2f 80 00 03 cmpwi cr7,r0,3 ffc12578: 41 9e 00 58 beq- cr7,ffc125d0 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; } ffc1257c: 80 01 00 0c lwz r0,12(r1) ffc12580: 38 21 00 08 addi r1,r1,8 ffc12584: 7c 08 03 a6 mtlr r0 ffc12588: 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; ffc1258c: 89 0b 00 08 lbz r8,8(r11) 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; ffc12590: 60 e7 02 00 ori r7,r7,512 #ifndef ASM static inline uint32_t _CPU_ISR_Get_level( void ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc12594: 39 40 00 00 li r10,0 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc12598: 7d 08 00 34 cntlzw r8,r8 ffc1259c: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc125a0: 55 08 50 2a rlwinm r8,r8,10,0,21 ffc125a4: 7d 07 3b 78 or r7,r8,r7 ffc125a8: 7d 40 00 a6 mfmsr r10 if (msr & MSR_EE) return 0; ffc125ac: 55 48 8f fe rlwinm r8,r10,17,31,31 ffc125b0: 2f 88 00 00 cmpwi cr7,r8,0 *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc125b4: 70 8a 01 00 andi. r10,r4,256 ffc125b8: 7d 40 00 26 mfcr r10 ffc125bc: 55 4a ff fe rlwinm r10,r10,31,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(); ffc125c0: 7c e7 53 78 or r7,r7,r10 *previous_mode_set = old_mode; ffc125c4: 90 e5 00 00 stw r7,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc125c8: 41 a2 fe fc beq- ffc124c4 ffc125cc: 4b ff fe e8 b ffc124b4 { Thread_Control *executing; executing = _Thread_Executing; if ( are_signals_pending || ffc125d0: 2f 8a 00 00 cmpwi cr7,r10,0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; ffc125d4: 81 26 00 0c lwz r9,12(r6) if ( are_signals_pending || ffc125d8: 40 9e 00 1c bne- cr7,ffc125f4 ffc125dc: 80 06 00 10 lwz r0,16(r6) ffc125e0: 7f 89 00 00 cmpw cr7,r9,r0 ffc125e4: 41 be ff 98 beq- cr7,ffc1257c (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { ffc125e8: 88 09 00 74 lbz r0,116(r9) ffc125ec: 2f 80 00 00 cmpwi cr7,r0,0 ffc125f0: 41 be ff 8c beq- cr7,ffc1257c <== NEVER TAKEN _Thread_Dispatch_necessary = true; ffc125f4: 38 00 00 01 li r0,1 ffc125f8: 98 06 00 18 stb r0,24(r6) } } if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); ffc125fc: 4b ff 9b 81 bl ffc0c17c <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; } ffc12600: 80 01 00 0c lwz r0,12(r1) if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; ffc12604: 38 60 00 00 li r3,0 } ffc12608: 7c 08 03 a6 mtlr r0 ffc1260c: 38 21 00 08 addi r1,r1,8 ffc12610: 4e 80 00 20 blr } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc12614: 70 88 00 01 andi. r8,r4,1 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; ffc12618: 91 49 00 7c stw r10,124(r9) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc1261c: 41 a2 fe f0 beq- ffc1250c ffc12620: 4b ff fe d0 b ffc124f0 _CPU_MSR_GET(msr); if (!(level & CPU_MODES_INTERRUPT_MASK)) { msr |= ppc_interrupt_get_disable_mask(); } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc12624: 7d 29 50 78 andc r9,r9,r10 } _CPU_MSR_SET(msr); ffc12628: 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 ) ); ffc1262c: 4b ff fe e0 b ffc1250c needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc12630: 3d 20 00 00 lis r9,0 ffc12634: 80 09 28 04 lwz r0,10244(r9) /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; ffc12638: 39 40 00 00 li r10,0 if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; ffc1263c: 38 60 00 00 li r3,0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc12640: 2f 80 00 03 cmpwi cr7,r0,3 ffc12644: 40 9e ff 38 bne+ cr7,ffc1257c <== NEVER TAKEN ffc12648: 4b ff ff 88 b ffc125d0 =============================================================================== ffc0e8a8 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0e8a8: 7d 80 00 26 mfcr r12 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0e8ac: 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 ) { ffc0e8b0: 94 21 ff d8 stwu r1,-40(r1) ffc0e8b4: 7c 08 02 a6 mflr r0 ffc0e8b8: 93 e1 00 24 stw r31,36(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0e8bc: 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 ) { ffc0e8c0: 90 01 00 2c stw r0,44(r1) ffc0e8c4: 91 81 00 20 stw r12,32(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0e8c8: 41 92 00 18 beq- cr4,ffc0e8e0 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 ) ); ffc0e8cc: 3d 20 00 00 lis r9,0 ffc0e8d0: 89 29 27 04 lbz r9,9988(r9) !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; ffc0e8d4: 38 00 00 13 li r0,19 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ffc0e8d8: 7f 84 48 40 cmplw cr7,r4,r9 ffc0e8dc: 41 9d 00 68 bgt- cr7,ffc0e944 if ( !old_priority ) ffc0e8e0: 2f 85 00 00 cmpwi cr7,r5,0 return RTEMS_INVALID_ADDRESS; ffc0e8e4: 38 00 00 09 li r0,9 if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) ffc0e8e8: 41 9e 00 5c beq- cr7,ffc0e944 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); ffc0e8ec: 38 81 00 08 addi r4,r1,8 ffc0e8f0: 90 a1 00 18 stw r5,24(r1) ffc0e8f4: 48 00 2d 4d bl ffc11640 <_Thread_Get> switch ( location ) { ffc0e8f8: 80 01 00 08 lwz r0,8(r1) ffc0e8fc: 80 a1 00 18 lwz r5,24(r1) ffc0e900: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e904: 40 9e 00 60 bne- cr7,ffc0e964 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; ffc0e908: 80 03 00 14 lwz r0,20(r3) ffc0e90c: 90 05 00 00 stw r0,0(r5) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { ffc0e910: 41 92 00 2c beq- cr4,ffc0e93c the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || ffc0e914: 80 03 00 1c lwz r0,28(r3) case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; if ( new_priority != RTEMS_CURRENT_PRIORITY ) { the_thread->real_priority = new_priority; ffc0e918: 93 e3 00 18 stw r31,24(r3) if ( the_thread->resource_count == 0 || ffc0e91c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e920: 41 9e 00 10 beq- cr7,ffc0e930 ffc0e924: 80 03 00 14 lwz r0,20(r3) ffc0e928: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0e92c: 40 9c 00 10 bge- cr7,ffc0e93c <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); ffc0e930: 7f e4 fb 78 mr r4,r31 ffc0e934: 38 a0 00 00 li r5,0 ffc0e938: 48 00 26 b1 bl ffc10fe8 <_Thread_Change_priority> } _Thread_Enable_dispatch(); ffc0e93c: 48 00 2c c9 bl ffc11604 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0e940: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0e944: 7c 03 03 78 mr r3,r0 ffc0e948: 80 01 00 2c lwz r0,44(r1) ffc0e94c: 81 81 00 20 lwz r12,32(r1) ffc0e950: 7c 08 03 a6 mtlr r0 ffc0e954: 83 e1 00 24 lwz r31,36(r1) ffc0e958: 7d 80 81 20 mtcrf 8,r12 ffc0e95c: 38 21 00 28 addi r1,r1,40 ffc0e960: 4e 80 00 20 blr case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0e964: 38 00 00 04 li r0,4 } ffc0e968: 81 81 00 20 lwz r12,32(r1) ffc0e96c: 7c 03 03 78 mr r3,r0 ffc0e970: 80 01 00 2c lwz r0,44(r1) ffc0e974: 83 e1 00 24 lwz r31,36(r1) ffc0e978: 7d 80 81 20 mtcrf 8,r12 ffc0e97c: 7c 08 03 a6 mtlr r0 ffc0e980: 38 21 00 28 addi r1,r1,40 ffc0e984: 4e 80 00 20 blr =============================================================================== ffc0a4d8 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { ffc0a4d8: 94 21 ff e0 stwu r1,-32(r1) ffc0a4dc: 7c 08 02 a6 mflr r0 ffc0a4e0: 93 e1 00 1c stw r31,28(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) ffc0a4e4: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { ffc0a4e8: 90 01 00 24 stw r0,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) return RTEMS_INVALID_ADDRESS; ffc0a4ec: 38 00 00 09 li r0,9 { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) ffc0a4f0: 41 82 00 58 beq- ffc0a548 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); ffc0a4f4: 38 81 00 08 addi r4,r1,8 ffc0a4f8: 48 00 2a e1 bl ffc0cfd8 <_Thread_Get> switch (location) { ffc0a4fc: 80 01 00 08 lwz r0,8(r1) ffc0a500: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a504: 40 9e 00 5c bne- cr7,ffc0a560 case OBJECTS_LOCAL: tvp = the_thread->task_variables; ffc0a508: 81 23 01 38 lwz r9,312(r3) while (tvp) { ffc0a50c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a510: 41 9e 00 30 beq- cr7,ffc0a540 if (tvp->ptr == ptr) { ffc0a514: 80 09 00 04 lwz r0,4(r9) ffc0a518: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0a51c: 40 be 00 18 bne+ cr7,ffc0a534 ffc0a520: 48 00 00 74 b ffc0a594 ffc0a524: 80 04 00 04 lwz r0,4(r4) ffc0a528: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0a52c: 41 9e 00 50 beq- cr7,ffc0a57c ffc0a530: 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; ffc0a534: 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) { ffc0a538: 2f 84 00 00 cmpwi cr7,r4,0 ffc0a53c: 40 9e ff e8 bne+ cr7,ffc0a524 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc0a540: 48 00 2a 5d bl ffc0cf9c <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; ffc0a544: 38 00 00 09 li r0,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a548: 7c 03 03 78 mr r3,r0 ffc0a54c: 80 01 00 24 lwz r0,36(r1) ffc0a550: 83 e1 00 1c lwz r31,28(r1) ffc0a554: 38 21 00 20 addi r1,r1,32 ffc0a558: 7c 08 03 a6 mtlr r0 ffc0a55c: 4e 80 00 20 blr case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0a560: 38 00 00 04 li r0,4 } ffc0a564: 83 e1 00 1c lwz r31,28(r1) ffc0a568: 7c 03 03 78 mr r3,r0 ffc0a56c: 80 01 00 24 lwz r0,36(r1) ffc0a570: 38 21 00 20 addi r1,r1,32 ffc0a574: 7c 08 03 a6 mtlr r0 ffc0a578: 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; ffc0a57c: 80 04 00 00 lwz r0,0(r4) ffc0a580: 90 09 00 00 stw r0,0(r9) else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); ffc0a584: 48 00 00 d9 bl ffc0a65c <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); ffc0a588: 48 00 2a 15 bl ffc0cf9c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0a58c: 38 00 00 00 li r0,0 ffc0a590: 4b ff ff b8 b ffc0a548 while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; ffc0a594: 80 09 00 00 lwz r0,0(r9) ffc0a598: 7d 24 4b 78 mr r4,r9 ffc0a59c: 90 03 01 38 stw r0,312(r3) ffc0a5a0: 4b ff ff e4 b ffc0a584 =============================================================================== ffc0a5a4 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc0a5a4: 94 21 ff d8 stwu r1,-40(r1) ffc0a5a8: 7c 08 02 a6 mflr r0 ffc0a5ac: 93 e1 00 24 stw r31,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) ffc0a5b0: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc0a5b4: 90 01 00 2c stw r0,44(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) return RTEMS_INVALID_ADDRESS; ffc0a5b8: 38 00 00 09 li r0,9 { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) ffc0a5bc: 41 82 00 60 beq- ffc0a61c return RTEMS_INVALID_ADDRESS; if ( !result ) ffc0a5c0: 2f 85 00 00 cmpwi cr7,r5,0 ffc0a5c4: 41 9e 00 58 beq- cr7,ffc0a61c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); ffc0a5c8: 38 81 00 08 addi r4,r1,8 ffc0a5cc: 90 a1 00 18 stw r5,24(r1) ffc0a5d0: 48 00 2a 09 bl ffc0cfd8 <_Thread_Get> switch (location) { ffc0a5d4: 80 01 00 08 lwz r0,8(r1) ffc0a5d8: 80 a1 00 18 lwz r5,24(r1) ffc0a5dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a5e0: 40 9e 00 54 bne- cr7,ffc0a634 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; ffc0a5e4: 81 23 01 38 lwz r9,312(r3) while (tvp) { ffc0a5e8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a5ec: 40 be 00 14 bne+ cr7,ffc0a600 ffc0a5f0: 48 00 00 60 b ffc0a650 */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; ffc0a5f4: 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) { ffc0a5f8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a5fc: 41 9e 00 54 beq- cr7,ffc0a650 <== NEVER TAKEN if (tvp->ptr == ptr) { ffc0a600: 80 09 00 04 lwz r0,4(r9) ffc0a604: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0a608: 40 9e ff ec bne+ cr7,ffc0a5f4 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; ffc0a60c: 80 09 00 0c lwz r0,12(r9) ffc0a610: 90 05 00 00 stw r0,0(r5) _Thread_Enable_dispatch(); ffc0a614: 48 00 29 89 bl ffc0cf9c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0a618: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a61c: 7c 03 03 78 mr r3,r0 ffc0a620: 80 01 00 2c lwz r0,44(r1) ffc0a624: 83 e1 00 24 lwz r31,36(r1) ffc0a628: 38 21 00 28 addi r1,r1,40 ffc0a62c: 7c 08 03 a6 mtlr r0 ffc0a630: 4e 80 00 20 blr #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0a634: 38 00 00 04 li r0,4 } ffc0a638: 83 e1 00 24 lwz r31,36(r1) ffc0a63c: 7c 03 03 78 mr r3,r0 ffc0a640: 80 01 00 2c lwz r0,44(r1) ffc0a644: 38 21 00 28 addi r1,r1,40 ffc0a648: 7c 08 03 a6 mtlr r0 ffc0a64c: 4e 80 00 20 blr _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc0a650: 48 00 29 4d bl ffc0cf9c <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; ffc0a654: 38 00 00 09 li r0,9 ffc0a658: 4b ff ff c4 b ffc0a61c =============================================================================== ffc1ba64 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { ffc1ba64: 94 21 ff e8 stwu r1,-24(r1) ffc1ba68: 7c 08 02 a6 mflr r0 ffc1ba6c: 7c 64 1b 78 mr r4,r3 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) ffc1ba70: 3c 60 00 00 lis r3,0 ffc1ba74: 90 01 00 1c stw r0,28(r1) ffc1ba78: 38 63 72 80 addi r3,r3,29312 ffc1ba7c: 38 a1 00 08 addi r5,r1,8 ffc1ba80: 48 00 3b 91 bl ffc1f610 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1ba84: 80 01 00 08 lwz r0,8(r1) ffc1ba88: 2f 80 00 00 cmpwi cr7,r0,0 ffc1ba8c: 40 9e 00 30 bne- cr7,ffc1babc case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) ffc1ba90: 80 03 00 38 lwz r0,56(r3) ffc1ba94: 2f 80 00 04 cmpwi cr7,r0,4 ffc1ba98: 41 9e 00 0c beq- cr7,ffc1baa4 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1ba9c: 38 63 00 10 addi r3,r3,16 ffc1baa0: 48 00 63 d1 bl ffc21e70 <_Watchdog_Remove> _Thread_Enable_dispatch(); ffc1baa4: 48 00 4b b5 bl ffc20658 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1baa8: 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; ffc1baac: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1bab0: 7c 08 03 a6 mtlr r0 ffc1bab4: 38 21 00 18 addi r1,r1,24 ffc1bab8: 4e 80 00 20 blr ffc1babc: 80 01 00 1c lwz r0,28(r1) #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc1bac0: 38 60 00 04 li r3,4 } ffc1bac4: 38 21 00 18 addi r1,r1,24 ffc1bac8: 7c 08 03 a6 mtlr r0 ffc1bacc: 4e 80 00 20 blr =============================================================================== ffc1c120 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1c120: 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; ffc1c124: 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 ) { ffc1c128: 7c 08 02 a6 mflr r0 ffc1c12c: 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; ffc1c130: 83 e9 28 ec lwz r31,10476(r9) rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1c134: 93 41 00 28 stw r26,40(r1) Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; ffc1c138: 3b 40 00 0e li r26,14 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1c13c: 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 ) { ffc1c140: 93 a1 00 34 stw r29,52(r1) ffc1c144: 7c 7d 1b 78 mr r29,r3 ffc1c148: 93 c1 00 38 stw r30,56(r1) ffc1c14c: 7c be 2b 78 mr r30,r5 ffc1c150: 90 01 00 44 stw r0,68(r1) ffc1c154: 93 21 00 24 stw r25,36(r1) ffc1c158: 93 61 00 2c stw r27,44(r1) ffc1c15c: 93 81 00 30 stw r28,48(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1c160: 41 9e 00 18 beq- cr7,ffc1c178 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) ffc1c164: 3d 20 00 00 lis r9,0 ffc1c168: 88 09 28 a0 lbz r0,10400(r9) return RTEMS_NOT_DEFINED; ffc1c16c: 3b 40 00 0b li r26,11 Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) ffc1c170: 2f 80 00 00 cmpwi cr7,r0,0 ffc1c174: 40 9e 00 34 bne- cr7,ffc1c1a8 <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1c178: 80 01 00 44 lwz r0,68(r1) ffc1c17c: 7f 43 d3 78 mr r3,r26 ffc1c180: 83 21 00 24 lwz r25,36(r1) ffc1c184: 7c 08 03 a6 mtlr r0 ffc1c188: 83 41 00 28 lwz r26,40(r1) ffc1c18c: 83 61 00 2c lwz r27,44(r1) ffc1c190: 83 81 00 30 lwz r28,48(r1) ffc1c194: 83 a1 00 34 lwz r29,52(r1) ffc1c198: 83 c1 00 38 lwz r30,56(r1) ffc1c19c: 83 e1 00 3c lwz r31,60(r1) ffc1c1a0: 38 21 00 40 addi r1,r1,64 ffc1c1a4: 4e 80 00 20 blr return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) ffc1c1a8: 2f 85 00 00 cmpwi cr7,r5,0 return RTEMS_INVALID_ADDRESS; ffc1c1ac: 3b 40 00 09 li r26,9 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) ffc1c1b0: 41 be ff c8 beq- cr7,ffc1c178 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc1c1b4: 7c 83 23 78 mr r3,r4 ffc1c1b8: 90 81 00 18 stw r4,24(r1) return RTEMS_INVALID_CLOCK; ffc1c1bc: 3b 40 00 14 li r26,20 return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc1c1c0: 90 c1 00 1c stw r6,28(r1) ffc1c1c4: 4b ff c0 c1 bl ffc18284 <_TOD_Validate> ffc1c1c8: 2f 83 00 00 cmpwi cr7,r3,0 ffc1c1cc: 80 81 00 18 lwz r4,24(r1) ffc1c1d0: 41 9e ff a8 beq+ cr7,ffc1c178 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1c1d4: 7c 83 23 78 mr r3,r4 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1c1d8: 3f 60 00 00 lis r27,0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1c1dc: 4b ff c0 0d bl ffc181e8 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1c1e0: 80 1b 28 b4 lwz r0,10420(r27) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1c1e4: 7c 7c 1b 78 mr r28,r3 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1c1e8: 7f 83 00 40 cmplw cr7,r3,r0 ffc1c1ec: 40 9d ff 8c ble+ cr7,ffc1c178 ffc1c1f0: 3c 60 00 00 lis r3,0 ffc1c1f4: 38 63 72 80 addi r3,r3,29312 ffc1c1f8: 7f a4 eb 78 mr r4,r29 ffc1c1fc: 38 a1 00 08 addi r5,r1,8 ffc1c200: 48 00 34 11 bl ffc1f610 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1c204: 83 21 00 08 lwz r25,8(r1) ffc1c208: 7c 7a 1b 78 mr r26,r3 ffc1c20c: 2f 99 00 00 cmpwi cr7,r25,0 ffc1c210: 40 9e 00 54 bne- cr7,ffc1c264 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1c214: 38 63 00 10 addi r3,r3,16 ffc1c218: 48 00 5c 59 bl ffc21e70 <_Watchdog_Remove> 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(); ffc1c21c: 80 1b 28 b4 lwz r0,10420(r27) ffc1c220: 80 c1 00 1c lwz r6,28(r1) the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; ffc1c224: 39 20 00 03 li r9,3 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); ffc1c228: 7f 80 e0 50 subf r28,r0,r28 (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1c22c: 80 1f 00 04 lwz r0,4(r31) ffc1c230: 7f 44 d3 78 mr r4,r26 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; ffc1c234: 91 3a 00 38 stw r9,56(r26) _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 ); ffc1c238: 7f e3 fb 78 mr r3,r31 ffc1c23c: 7c 09 03 a6 mtctr r0 ffc1c240: 90 da 00 34 stw r6,52(r26) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1c244: 93 3a 00 18 stw r25,24(r26) the_watchdog->routine = routine; ffc1c248: 93 da 00 2c stw r30,44(r26) the_watchdog->id = id; ffc1c24c: 93 ba 00 30 stw r29,48(r26) 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(); ffc1c250: 93 9a 00 1c stw r28,28(r26) (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc1c254: 3b 40 00 00 li r26,0 (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(); (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1c258: 4e 80 04 21 bctrl _Thread_Enable_dispatch(); ffc1c25c: 48 00 43 fd bl ffc20658 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc1c260: 4b ff ff 18 b ffc1c178 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc1c264: 3b 40 00 04 li r26,4 ffc1c268: 4b ff ff 10 b ffc1c178