Annotated Report
ffc0edac <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) {
ffc0edac: 7c 08 02 a6 mflr r0 ffc0edb0: 94 21 ff f8 stwu r1,-8(r1)
{ Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing;
ffc0edb4: 3d 20 00 00 lis r9,0 ffc0edb8: 81 29 27 6c lwz r9,10092(r9) ffc0edbc: 90 01 00 0c stw r0,12(r1)
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
ffc0edc0: 38 00 00 00 li r0,0 ffc0edc4: 90 09 00 34 stw r0,52(r9)
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
ffc0edc8: 81 63 00 50 lwz r11,80(r3) ffc0edcc: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0edd0: 41 9e 00 4c beq- cr7,ffc0ee1c <_CORE_mutex_Seize_interrupt_trylock+0x70>
*/ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
ffc0edd4: 81 63 00 48 lwz r11,72(r3)
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1;
ffc0edd8: 39 40 00 01 li r10,1
/* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED;
ffc0eddc: 90 03 00 50 stw r0,80(r3)
the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
ffc0ede0: 2f 8b 00 02 cmpwi cr7,r11,2
executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id;
ffc0ede4: 81 09 00 08 lwz r8,8(r9)
executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing;
ffc0ede8: 91 23 00 5c stw r9,92(r3)
the_mutex->holder_id = executing->Object.id;
ffc0edec: 91 03 00 60 stw r8,96(r3)
the_mutex->nest_count = 1;
ffc0edf0: 91 43 00 54 stw r10,84(r3)
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
ffc0edf4: 41 9e 00 48 beq- cr7,ffc0ee3c <_CORE_mutex_Seize_interrupt_trylock+0x90> ffc0edf8: 2f 8b 00 03 cmpwi cr7,r11,3 ffc0edfc: 41 9e 00 78 beq- cr7,ffc0ee74 <_CORE_mutex_Seize_interrupt_trylock+0xc8> ffc0ee00: 80 04 00 00 lwz r0,0(r4) ffc0ee04: 7c 00 01 24 mtmsr r0
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); }
ffc0ee08: 80 01 00 0c lwz r0,12(r1) ffc0ee0c: 38 60 00 00 li r3,0 ffc0ee10: 38 21 00 08 addi r1,r1,8 ffc0ee14: 7c 08 03 a6 mtlr r0 ffc0ee18: 4e 80 00 20 blr
/* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) {
ffc0ee1c: 80 03 00 5c lwz r0,92(r3) ffc0ee20: 7f 89 00 00 cmpw cr7,r9,r0 ffc0ee24: 41 9e 00 28 beq- cr7,ffc0ee4c <_CORE_mutex_Seize_interrupt_trylock+0xa0> ffc0ee28: 38 60 00 01 li r3,1 ffc0ee2c: 80 01 00 0c lwz r0,12(r1) ffc0ee30: 38 21 00 08 addi r1,r1,8 ffc0ee34: 7c 08 03 a6 mtlr r0 ffc0ee38: 4e 80 00 20 blr
_Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++;
ffc0ee3c: 81 69 00 1c lwz r11,28(r9) ffc0ee40: 38 0b 00 01 addi r0,r11,1 ffc0ee44: 90 09 00 1c stw r0,28(r9) ffc0ee48: 4b ff ff b8 b ffc0ee00 <_CORE_mutex_Seize_interrupt_trylock+0x54>
* At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) {
ffc0ee4c: 80 03 00 40 lwz r0,64(r3) ffc0ee50: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ee54: 40 9e 00 74 bne- cr7,ffc0eec8 <_CORE_mutex_Seize_interrupt_trylock+0x11c>
case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++;
ffc0ee58: 81 23 00 54 lwz r9,84(r3) ffc0ee5c: 38 09 00 01 addi r0,r9,1 ffc0ee60: 90 03 00 54 stw r0,84(r3) ffc0ee64: 80 04 00 00 lwz r0,0(r4) ffc0ee68: 7c 00 01 24 mtmsr r0 ffc0ee6c: 38 60 00 00 li r3,0 ffc0ee70: 4b ff ff bc b ffc0ee2c <_CORE_mutex_Seize_interrupt_trylock+0x80>
_Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++;
ffc0ee74: 80 e9 00 1c lwz r7,28(r9)
{ Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority;
ffc0ee78: 81 69 00 14 lwz r11,20(r9)
_Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++;
ffc0ee7c: 39 07 00 01 addi r8,r7,1 ffc0ee80: 91 09 00 1c stw r8,28(r9)
*/ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling;
ffc0ee84: 81 03 00 4c lwz r8,76(r3)
current = executing->current_priority; if ( current == ceiling ) {
ffc0ee88: 7f 88 58 00 cmpw cr7,r8,r11 ffc0ee8c: 41 9e 00 90 beq- cr7,ffc0ef1c <_CORE_mutex_Seize_interrupt_trylock+0x170>
_ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) {
ffc0ee90: 7f 88 58 40 cmplw cr7,r8,r11 ffc0ee94: 41 9c 00 54 blt- cr7,ffc0eee8 <_CORE_mutex_Seize_interrupt_trylock+0x13c>
); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
ffc0ee98: 39 60 00 06 li r11,6 ffc0ee9c: 91 69 00 34 stw r11,52(r9)
the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */
ffc0eea0: 90 03 00 54 stw r0,84(r3)
_Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED;
ffc0eea4: 91 43 00 50 stw r10,80(r3)
the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */
ffc0eea8: 90 e9 00 1c stw r7,28(r9) ffc0eeac: 80 04 00 00 lwz r0,0(r4) ffc0eeb0: 7c 00 01 24 mtmsr r0 ffc0eeb4: 80 01 00 0c lwz r0,12(r1) ffc0eeb8: 38 60 00 00 li r3,0 ffc0eebc: 38 21 00 08 addi r1,r1,8 ffc0eec0: 7c 08 03 a6 mtlr r0 ffc0eec4: 4e 80 00 20 blr
* At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) {
ffc0eec8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0eecc: 40 9e ff 5c bne+ cr7,ffc0ee28 <_CORE_mutex_Seize_interrupt_trylock+0x7c>
case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
ffc0eed0: 38 00 00 02 li r0,2 <== NOT EXECUTED ffc0eed4: 90 09 00 34 stw r0,52(r9) <== NOT EXECUTED ffc0eed8: 80 04 00 00 lwz r0,0(r4) <== NOT EXECUTED ffc0eedc: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED ffc0eee0: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc0eee4: 4b ff ff 48 b ffc0ee2c <_CORE_mutex_Seize_interrupt_trylock+0x80><== NOT EXECUTED
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
ffc0eee8: 3d 20 00 00 lis r9,0 ffc0eeec: 81 69 27 2c lwz r11,10028(r9) ffc0eef0: 38 0b 00 01 addi r0,r11,1 ffc0eef4: 90 09 27 2c stw r0,10028(r9) ffc0eef8: 80 04 00 00 lwz r0,0(r4) ffc0eefc: 7c 00 01 24 mtmsr r0
} if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority(
ffc0ef00: 80 83 00 4c lwz r4,76(r3) ffc0ef04: 38 a0 00 00 li r5,0 ffc0ef08: 80 63 00 5c lwz r3,92(r3) ffc0ef0c: 4b ff ba ed bl ffc0a9f8 <_Thread_Change_priority>
the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch();
ffc0ef10: 4b ff c1 f5 bl ffc0b104 <_Thread_Enable_dispatch> ffc0ef14: 38 60 00 00 li r3,0 ffc0ef18: 4b ff ff 14 b ffc0ee2c <_CORE_mutex_Seize_interrupt_trylock+0x80> ffc0ef1c: 80 04 00 00 lwz r0,0(r4) ffc0ef20: 7c 00 01 24 mtmsr r0 ffc0ef24: 38 60 00 00 li r3,0 ffc0ef28: 4b ff ff 04 b ffc0ee2c <_CORE_mutex_Seize_interrupt_trylock+0x80>
ffc099bc <_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 ) {
ffc099bc: 94 21 ff f0 stwu r1,-16(r1) ffc099c0: 7c 08 02 a6 mflr r0 ffc099c4: 93 e1 00 0c stw r31,12(r1) ffc099c8: 7c 7f 1b 78 mr r31,r3 ffc099cc: 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)) ) {
ffc099d0: 48 00 1b dd bl ffc0b5ac <_Thread_queue_Dequeue> ffc099d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc099d8: 38 60 00 00 li r3,0 ffc099dc: 41 9e 00 18 beq- cr7,ffc099f4 <_CORE_semaphore_Surrender+0x38>
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; }
ffc099e0: 80 01 00 14 lwz r0,20(r1) ffc099e4: 83 e1 00 0c lwz r31,12(r1) ffc099e8: 38 21 00 10 addi r1,r1,16 ffc099ec: 7c 08 03 a6 mtlr r0 ffc099f0: 4e 80 00 20 blr
static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile (
ffc099f4: 7c 00 00 a6 mfmsr r0 ffc099f8: 7d 30 42 a6 mfsprg r9,0 ffc099fc: 7c 09 48 78 andc r9,r0,r9 ffc09a00: 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 )
ffc09a04: 81 3f 00 48 lwz r9,72(r31) ffc09a08: 38 60 00 04 li r3,4 ffc09a0c: 81 7f 00 40 lwz r11,64(r31) ffc09a10: 7f 89 58 40 cmplw cr7,r9,r11 ffc09a14: 41 9c 00 1c blt- cr7,ffc09a30 <_CORE_semaphore_Surrender+0x74>
return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile (
ffc09a18: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; }
ffc09a1c: 80 01 00 14 lwz r0,20(r1) ffc09a20: 83 e1 00 0c lwz r31,12(r1) ffc09a24: 38 21 00 10 addi r1,r1,16 ffc09a28: 7c 08 03 a6 mtlr r0 ffc09a2c: 4e 80 00 20 blr
#endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1;
ffc09a30: 39 29 00 01 addi r9,r9,1 ffc09a34: 91 3f 00 48 stw r9,72(r31) ffc09a38: 38 60 00 00 li r3,0 ffc09a3c: 7c 00 01 24 mtmsr r0 ffc09a40: 4b ff ff dc b ffc09a1c <_CORE_semaphore_Surrender+0x60>
ffc0ab7c <_Heap_Walk>: uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing;
ffc0ab7c: 2f 85 00 00 cmpwi cr7,r5,0
bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) {
ffc0ab80: 94 21 ff 98 stwu r1,-104(r1) ffc0ab84: 7c 08 02 a6 mflr r0 ffc0ab88: 93 21 00 4c stw r25,76(r1) ffc0ab8c: 90 01 00 6c stw r0,108(r1) ffc0ab90: 93 41 00 50 stw r26,80(r1) ffc0ab94: 93 61 00 54 stw r27,84(r1) ffc0ab98: 93 81 00 58 stw r28,88(r1) ffc0ab9c: 7c 9c 23 78 mr r28,r4 ffc0aba0: 93 c1 00 60 stw r30,96(r1) ffc0aba4: 93 e1 00 64 stw r31,100(r1) ffc0aba8: 7c 7f 1b 78 mr r31,r3 ffc0abac: 91 c1 00 20 stw r14,32(r1) ffc0abb0: 91 e1 00 24 stw r15,36(r1) ffc0abb4: 92 01 00 28 stw r16,40(r1) ffc0abb8: 92 21 00 2c stw r17,44(r1) ffc0abbc: 92 41 00 30 stw r18,48(r1) ffc0abc0: 92 61 00 34 stw r19,52(r1) ffc0abc4: 92 81 00 38 stw r20,56(r1) ffc0abc8: 92 a1 00 3c stw r21,60(r1) ffc0abcc: 92 c1 00 40 stw r22,64(r1) ffc0abd0: 92 e1 00 44 stw r23,68(r1) ffc0abd4: 93 01 00 48 stw r24,72(r1) ffc0abd8: 93 a1 00 5c stw r29,92(r1)
uintptr_t const page_size = heap->page_size;
ffc0abdc: 83 63 00 10 lwz r27,16(r3)
uintptr_t const min_block_size = heap->min_block_size;
ffc0abe0: 83 43 00 14 lwz r26,20(r3)
Heap_Block *const last_block = heap->last_block;
ffc0abe4: 83 23 00 24 lwz r25,36(r3)
Heap_Block *block = heap->first_block;
ffc0abe8: 83 c3 00 20 lwz r30,32(r3)
Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing;
ffc0abec: 40 9e 00 7c bne- cr7,ffc0ac68 <_Heap_Walk+0xec> ffc0abf0: 3d 20 ff c1 lis r9,-63 ffc0abf4: 39 29 ab 78 addi r9,r9,-21640 ffc0abf8: 91 21 00 18 stw r9,24(r1)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc0abfc: 3d 20 00 00 lis r9,0 ffc0ac00: 80 09 27 90 lwz r0,10128(r9) ffc0ac04: 2f 80 00 03 cmpwi cr7,r0,3 ffc0ac08: 41 9e 00 7c beq- cr7,ffc0ac84 <_Heap_Walk+0x108>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) {
ffc0ac0c: 38 60 00 01 li r3,1
block = next_block; } return true; }
ffc0ac10: 80 01 00 6c lwz r0,108(r1) ffc0ac14: 81 c1 00 20 lwz r14,32(r1) ffc0ac18: 7c 08 03 a6 mtlr r0 ffc0ac1c: 81 e1 00 24 lwz r15,36(r1) ffc0ac20: 82 01 00 28 lwz r16,40(r1) ffc0ac24: 82 21 00 2c lwz r17,44(r1) ffc0ac28: 82 41 00 30 lwz r18,48(r1) ffc0ac2c: 82 61 00 34 lwz r19,52(r1) ffc0ac30: 82 81 00 38 lwz r20,56(r1) ffc0ac34: 82 a1 00 3c lwz r21,60(r1) ffc0ac38: 82 c1 00 40 lwz r22,64(r1) ffc0ac3c: 82 e1 00 44 lwz r23,68(r1) ffc0ac40: 83 01 00 48 lwz r24,72(r1) ffc0ac44: 83 21 00 4c lwz r25,76(r1) ffc0ac48: 83 41 00 50 lwz r26,80(r1) ffc0ac4c: 83 61 00 54 lwz r27,84(r1) ffc0ac50: 83 81 00 58 lwz r28,88(r1) ffc0ac54: 83 a1 00 5c lwz r29,92(r1) ffc0ac58: 83 c1 00 60 lwz r30,96(r1) ffc0ac5c: 83 e1 00 64 lwz r31,100(r1) ffc0ac60: 38 21 00 68 addi r1,r1,104 ffc0ac64: 4e 80 00 20 blr
uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing;
ffc0ac68: 3d 20 ff c1 lis r9,-63 ffc0ac6c: 39 29 b1 94 addi r9,r9,-20076 ffc0ac70: 91 21 00 18 stw r9,24(r1)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc0ac74: 3d 20 00 00 lis r9,0 ffc0ac78: 80 09 27 90 lwz r0,10128(r9) ffc0ac7c: 2f 80 00 03 cmpwi cr7,r0,3 ffc0ac80: 40 9e ff 8c bne+ cr7,ffc0ac0c <_Heap_Walk+0x90>
Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)(
ffc0ac84: 80 1f 00 0c lwz r0,12(r31) ffc0ac88: 3c a0 ff c2 lis r5,-62 ffc0ac8c: 81 1f 00 18 lwz r8,24(r31) ffc0ac90: 38 a5 f5 80 addi r5,r5,-2688 ffc0ac94: 81 3f 00 1c lwz r9,28(r31) ffc0ac98: 7f 83 e3 78 mr r3,r28 ffc0ac9c: 81 7f 00 08 lwz r11,8(r31) ffc0aca0: 38 80 00 00 li r4,0 ffc0aca4: 90 01 00 10 stw r0,16(r1) ffc0aca8: 7f 66 db 78 mr r6,r27 ffc0acac: 7f 47 d3 78 mr r7,r26 ffc0acb0: 80 01 00 18 lwz r0,24(r1) ffc0acb4: 7f ca f3 78 mr r10,r30 ffc0acb8: 91 61 00 0c stw r11,12(r1) ffc0acbc: 7c 09 03 a6 mtctr r0 ffc0acc0: 93 21 00 08 stw r25,8(r1) ffc0acc4: 4c c6 31 82 crclr 4*cr1+eq ffc0acc8: 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 ) {
ffc0accc: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0acd0: 41 9e 00 d0 beq- cr7,ffc0ada0 <_Heap_Walk+0x224>
(*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
ffc0acd4: 73 67 00 07 andi. r7,r27,7 ffc0acd8: 40 82 00 f0 bne- ffc0adc8 <_Heap_Walk+0x24c>
); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
ffc0acdc: 7c 1a db 96 divwu r0,r26,r27 ffc0ace0: 7c 00 d9 d6 mullw r0,r0,r27 ffc0ace4: 7f 9a 00 00 cmpw cr7,r26,r0 ffc0ace8: 40 9e 00 f4 bne- cr7,ffc0addc <_Heap_Walk+0x260>
); return false; } if (
ffc0acec: 38 1e 00 08 addi r0,r30,8 ffc0acf0: 7d 20 db 96 divwu r9,r0,r27 ffc0acf4: 7d 29 d9 d6 mullw r9,r9,r27 ffc0acf8: 7f 80 48 00 cmpw cr7,r0,r9 ffc0acfc: 40 9e 00 f4 bne- cr7,ffc0adf0 <_Heap_Walk+0x274>
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;
ffc0ad00: 83 1e 00 04 lwz r24,4(r30)
); return false; } if ( !_Heap_Is_prev_used( first_block ) ) {
ffc0ad04: 73 00 00 01 andi. r0,r24,1 ffc0ad08: 41 82 00 fc beq- ffc0ae04 <_Heap_Walk+0x288>
); return false; } if ( first_block->prev_size != page_size ) {
ffc0ad0c: 80 de 00 00 lwz r6,0(r30) ffc0ad10: 7f 9b 30 00 cmpw cr7,r27,r6 ffc0ad14: 40 9e 00 60 bne- cr7,ffc0ad74 <_Heap_Walk+0x1f8>
); return false; } if ( _Heap_Is_free( last_block ) ) {
ffc0ad18: 81 39 00 04 lwz r9,4(r25) ffc0ad1c: 55 29 00 3c rlwinm r9,r9,0,0,30 ffc0ad20: 7d 39 4a 14 add r9,r25,r9 ffc0ad24: 81 29 00 04 lwz r9,4(r9) ffc0ad28: 71 27 00 01 andi. r7,r9,1 ffc0ad2c: 41 82 04 28 beq- ffc0b154 <_Heap_Walk+0x5d8>
return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next;
ffc0ad30: 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;
ffc0ad34: 80 bf 00 10 lwz r5,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 ) {
ffc0ad38: 7f 9f 30 00 cmpw cr7,r31,r6 ffc0ad3c: 41 9e 01 78 beq- cr7,ffc0aeb4 <_Heap_Walk+0x338>
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;
ffc0ad40: 81 5f 00 20 lwz r10,32(r31)
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
ffc0ad44: 7f 8a 30 40 cmplw cr7,r10,r6 ffc0ad48: 40 9d 00 cc ble- cr7,ffc0ae14 <_Heap_Walk+0x298>
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)(
ffc0ad4c: 3c a0 ff c2 lis r5,-62 ffc0ad50: 7f 83 e3 78 mr r3,r28 ffc0ad54: 38 a5 f7 14 addi r5,r5,-2284
return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)(
ffc0ad58: 80 01 00 18 lwz r0,24(r1) ffc0ad5c: 38 80 00 01 li r4,1 ffc0ad60: 7c 09 03 a6 mtctr r0 ffc0ad64: 4c c6 31 82 crclr 4*cr1+eq ffc0ad68: 4e 80 04 21 bctrl ffc0ad6c: 38 60 00 00 li r3,0 ffc0ad70: 4b ff fe a0 b ffc0ac10 <_Heap_Walk+0x94>
return false; } if ( first_block->prev_size != page_size ) { (*printer)(
ffc0ad74: 3c a0 ff c2 lis r5,-62 ffc0ad78: 7f 83 e3 78 mr r3,r28 ffc0ad7c: 38 a5 f6 d0 addi r5,r5,-2352 ffc0ad80: 7f 67 db 78 mr r7,r27
return false; } if ( next_block_begin <= block_begin ) { (*printer)(
ffc0ad84: 80 01 00 18 lwz r0,24(r1) ffc0ad88: 38 80 00 01 li r4,1 ffc0ad8c: 7c 09 03 a6 mtctr r0 ffc0ad90: 4c c6 31 82 crclr 4*cr1+eq ffc0ad94: 4e 80 04 21 bctrl ffc0ad98: 38 60 00 00 li r3,0
"block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false;
ffc0ad9c: 4b ff fe 74 b ffc0ac10 <_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" );
ffc0ada0: 3c a0 ff c2 lis r5,-62 ffc0ada4: 7f 83 e3 78 mr r3,r28 ffc0ada8: 38 a5 f6 14 addi r5,r5,-2540
return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)(
ffc0adac: 80 01 00 18 lwz r0,24(r1) ffc0adb0: 38 80 00 01 li r4,1 ffc0adb4: 7c 09 03 a6 mtctr r0 ffc0adb8: 4c c6 31 82 crclr 4*cr1+eq ffc0adbc: 4e 80 04 21 bctrl ffc0adc0: 38 60 00 00 li r3,0 ffc0adc4: 4b ff fe 4c b ffc0ac10 <_Heap_Walk+0x94>
return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)(
ffc0adc8: 3c a0 ff c2 lis r5,-62 ffc0adcc: 7f 83 e3 78 mr r3,r28 ffc0add0: 38 a5 f6 28 addi r5,r5,-2520 ffc0add4: 7f 66 db 78 mr r6,r27 ffc0add8: 4b ff ff 80 b ffc0ad58 <_Heap_Walk+0x1dc>
return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)(
ffc0addc: 3c a0 ff c2 lis r5,-62 ffc0ade0: 7f 83 e3 78 mr r3,r28 ffc0ade4: 38 a5 f6 48 addi r5,r5,-2488 ffc0ade8: 7f 46 d3 78 mr r6,r26 ffc0adec: 4b ff ff 6c b ffc0ad58 <_Heap_Walk+0x1dc>
} if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)(
ffc0adf0: 3c a0 ff c2 lis r5,-62 ffc0adf4: 7f 83 e3 78 mr r3,r28 ffc0adf8: 38 a5 f6 6c addi r5,r5,-2452 ffc0adfc: 7f c6 f3 78 mr r6,r30 ffc0ae00: 4b ff ff 58 b ffc0ad58 <_Heap_Walk+0x1dc>
return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)(
ffc0ae04: 3c a0 ff c2 lis r5,-62 ffc0ae08: 7f 83 e3 78 mr r3,r28 ffc0ae0c: 38 a5 f6 a0 addi r5,r5,-2400 ffc0ae10: 4b ff ff 9c b ffc0adac <_Heap_Walk+0x230>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
ffc0ae14: 81 1f 00 24 lwz r8,36(r31)
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
ffc0ae18: 7f 88 30 40 cmplw cr7,r8,r6 ffc0ae1c: 41 bc ff 30 blt- cr7,ffc0ad4c <_Heap_Walk+0x1d0>
); return false; } if (
ffc0ae20: 39 26 00 08 addi r9,r6,8 ffc0ae24: 7d 69 2b 96 divwu r11,r9,r5 ffc0ae28: 7d 6b 29 d6 mullw r11,r11,r5 ffc0ae2c: 7f 89 58 00 cmpw cr7,r9,r11 ffc0ae30: 40 9e 03 34 bne- cr7,ffc0b164 <_Heap_Walk+0x5e8>
); return false; } if ( _Heap_Is_used( free_block ) ) {
ffc0ae34: 81 26 00 04 lwz r9,4(r6) ffc0ae38: 55 29 00 3c rlwinm r9,r9,0,0,30 ffc0ae3c: 7d 26 4a 14 add r9,r6,r9 ffc0ae40: 81 29 00 04 lwz r9,4(r9) ffc0ae44: 71 27 00 01 andi. r7,r9,1 ffc0ae48: 40 82 03 3c bne- ffc0b184 <_Heap_Walk+0x608>
); return false; } if ( free_block->prev != prev_block ) {
ffc0ae4c: 80 e6 00 0c lwz r7,12(r6) ffc0ae50: 7f 9f 38 00 cmpw cr7,r31,r7 ffc0ae54: 41 be 00 48 beq+ cr7,ffc0ae9c <_Heap_Walk+0x320>
ffc0ae58: 48 00 03 1c b ffc0b174 <_Heap_Walk+0x5f8> <== NOT EXECUTED
ffc0ae5c: 41 b8 fe f0 blt- cr6,ffc0ad4c <_Heap_Walk+0x1d0>
); return false; } if (
ffc0ae60: 39 66 00 08 addi r11,r6,8 ffc0ae64: 41 a4 fe e8 blt- cr1,ffc0ad4c <_Heap_Walk+0x1d0> ffc0ae68: 7c eb 2b 96 divwu r7,r11,r5 ffc0ae6c: 7c e7 29 d6 mullw r7,r7,r5 ffc0ae70: 7f 8b 38 00 cmpw cr7,r11,r7 ffc0ae74: 40 9e 02 f0 bne- cr7,ffc0b164 <_Heap_Walk+0x5e8>
); return false; } if ( _Heap_Is_used( free_block ) ) {
ffc0ae78: 81 66 00 04 lwz r11,4(r6) ffc0ae7c: 55 6b 00 3c rlwinm r11,r11,0,0,30 ffc0ae80: 7d 6b 32 14 add r11,r11,r6 ffc0ae84: 81 6b 00 04 lwz r11,4(r11) ffc0ae88: 71 67 00 01 andi. r7,r11,1 ffc0ae8c: 40 82 02 f8 bne- ffc0b184 <_Heap_Walk+0x608>
); return false; } if ( free_block->prev != prev_block ) {
ffc0ae90: 80 e6 00 0c lwz r7,12(r6) ffc0ae94: 7f 87 48 00 cmpw cr7,r7,r9 ffc0ae98: 40 9e 02 dc bne- cr7,ffc0b174 <_Heap_Walk+0x5f8>
(*printer)(
ffc0ae9c: 7c c9 33 78 mr r9,r6
return false; } prev_block = free_block; free_block = free_block->next;
ffc0aea0: 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 ) {
ffc0aea4: 7f 9f 30 00 cmpw cr7,r31,r6 ffc0aea8: 7f 06 50 40 cmplw cr6,r6,r10 ffc0aeac: 7c 88 30 40 cmplw cr1,r8,r6 ffc0aeb0: 40 9e ff ac bne+ cr7,ffc0ae5c <_Heap_Walk+0x2e0>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) {
ffc0aeb4: 7f 99 f0 00 cmpw cr7,r25,r30 ffc0aeb8: 41 be fd 54 beq- cr7,ffc0ac0c <_Heap_Walk+0x90>
bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { (*printer)(
ffc0aebc: 3e 60 ff c2 lis r19,-62
"block 0x%08x: size %u\n", block, block_size ); } else { (*printer)(
ffc0aec0: 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)(
ffc0aec4: 3e 40 ff c2 lis r18,-62
" (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "")
ffc0aec8: 3d e0 ff c2 lis r15,-62 ffc0aecc: 3e a0 ff c2 lis r21,-62
Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)(
ffc0aed0: 3e 20 ff c2 lis r17,-62
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""),
ffc0aed4: 3d c0 ff c2 lis r14,-62
return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next;
ffc0aed8: 3e 00 ff c2 lis r16,-62
bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { (*printer)(
ffc0aedc: 3a 73 f7 b4 addi r19,r19,-2124
"block 0x%08x: size %u\n", block, block_size ); } else { (*printer)(
ffc0aee0: 3a 94 f7 cc addi r20,r20,-2100
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)(
ffc0aee4: 3a 52 f8 e4 addi r18,r18,-1820
" (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "")
ffc0aee8: 39 ef f8 d8 addi r15,r15,-1832 ffc0aeec: 3a b5 f9 48 addi r21,r21,-1720
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)(
ffc0aef0: 3a 31 f8 cc addi r17,r17,-1844
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""),
ffc0aef4: 39 ce f8 c0 addi r14,r14,-1856 ffc0aef8: 3a 10 f8 b4 addi r16,r16,-1868
uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) {
ffc0aefc: 2f 80 00 00 cmpwi cr7,r0,0
- 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;
ffc0af00: 57 18 00 3c rlwinm r24,r24,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);
ffc0af04: 7f b8 f2 14 add r29,r24,r30 ffc0af08: 41 9e 00 4c beq- cr7,ffc0af54 <_Heap_Walk+0x3d8>
(*printer)(
ffc0af0c: 80 01 00 18 lwz r0,24(r1) ffc0af10: 7f 83 e3 78 mr r3,r28 ffc0af14: 38 80 00 00 li r4,0 ffc0af18: 7c 09 03 a6 mtctr r0 ffc0af1c: 7e 65 9b 78 mr r5,r19 ffc0af20: 7f c6 f3 78 mr r6,r30 ffc0af24: 7f 07 c3 78 mr r7,r24 ffc0af28: 4c c6 31 82 crclr 4*cr1+eq ffc0af2c: 4e 80 04 21 bctrl
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
ffc0af30: 80 1f 00 20 lwz r0,32(r31) ffc0af34: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0af38: 40 9d 00 50 ble- cr7,ffc0af88 <_Heap_Walk+0x40c>
block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)(
ffc0af3c: 3c a0 ff c2 lis r5,-62 ffc0af40: 7f 83 e3 78 mr r3,r28 ffc0af44: 38 a5 f7 f4 addi r5,r5,-2060 ffc0af48: 7f c6 f3 78 mr r6,r30 ffc0af4c: 7f a7 eb 78 mr r7,r29 ffc0af50: 4b ff fe 34 b ffc0ad84 <_Heap_Walk+0x208>
"block 0x%08x: size %u\n", block, block_size ); } else { (*printer)(
ffc0af54: 80 01 00 18 lwz r0,24(r1) ffc0af58: 7f 83 e3 78 mr r3,r28 ffc0af5c: 38 80 00 00 li r4,0 ffc0af60: 81 1e 00 00 lwz r8,0(r30) ffc0af64: 7c 09 03 a6 mtctr r0 ffc0af68: 7e 85 a3 78 mr r5,r20 ffc0af6c: 7f c6 f3 78 mr r6,r30 ffc0af70: 7f 07 c3 78 mr r7,r24 ffc0af74: 4c c6 31 82 crclr 4*cr1+eq ffc0af78: 4e 80 04 21 bctrl ffc0af7c: 80 1f 00 20 lwz r0,32(r31) ffc0af80: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0af84: 41 bd ff b8 bgt- cr7,ffc0af3c <_Heap_Walk+0x3c0> ffc0af88: 80 1f 00 24 lwz r0,36(r31) ffc0af8c: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0af90: 41 bc ff ac blt- cr7,ffc0af3c <_Heap_Walk+0x3c0>
); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) {
ffc0af94: 7c 18 db 96 divwu r0,r24,r27 ffc0af98: 7c 00 d9 d6 mullw r0,r0,r27 ffc0af9c: 7f 98 00 00 cmpw cr7,r24,r0 ffc0afa0: 40 9e 01 50 bne- cr7,ffc0b0f0 <_Heap_Walk+0x574>
); return false; } if ( block_size < min_block_size ) {
ffc0afa4: 7f 9a c0 40 cmplw cr7,r26,r24 ffc0afa8: 41 9d 01 60 bgt- cr7,ffc0b108 <_Heap_Walk+0x58c>
); return false; } if ( next_block_begin <= block_begin ) {
ffc0afac: 7f 9e e8 40 cmplw cr7,r30,r29 ffc0afb0: 40 9c 01 8c bge- cr7,ffc0b13c <_Heap_Walk+0x5c0>
); return false; } if ( !_Heap_Is_prev_used( next_block ) ) {
ffc0afb4: 80 1d 00 04 lwz r0,4(r29) ffc0afb8: 70 07 00 01 andi. r7,r0,1 ffc0afbc: 40 82 00 b0 bne- ffc0b06c <_Heap_Walk+0x4f0>
return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next;
ffc0afc0: 80 1f 00 08 lwz r0,8(r31) ffc0afc4: 7e 08 83 78 mr r8,r16
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)(
ffc0afc8: 80 fe 00 0c lwz r7,12(r30)
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;
ffc0afcc: 82 de 00 04 lwz r22,4(r30)
return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next;
ffc0afd0: 7f 80 38 00 cmpw cr7,r0,r7
} RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev;
ffc0afd4: 80 1f 00 0c lwz r0,12(r31)
- 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;
ffc0afd8: 56 d8 00 3c rlwinm r24,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);
ffc0afdc: 7e fe c2 14 add r23,r30,r24
return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next;
ffc0afe0: 41 9e 00 10 beq- cr7,ffc0aff0 <_Heap_Walk+0x474>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""),
ffc0afe4: 7f 87 f8 00 cmpw cr7,r7,r31 ffc0afe8: 7e a8 ab 78 mr r8,r21 ffc0afec: 41 9e 00 fc beq- cr7,ffc0b0e8 <_Heap_Walk+0x56c>
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)(
ffc0aff0: 81 3e 00 08 lwz r9,8(r30) ffc0aff4: 7e 2a 8b 78 mr r10,r17 ffc0aff8: 7f 80 48 00 cmpw cr7,r0,r9 ffc0affc: 41 9e 00 10 beq- cr7,ffc0b00c <_Heap_Walk+0x490>
" (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "")
ffc0b000: 7f 89 f8 00 cmpw cr7,r9,r31 ffc0b004: 7e aa ab 78 mr r10,r21 ffc0b008: 41 9e 00 d8 beq- cr7,ffc0b0e0 <_Heap_Walk+0x564>
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)(
ffc0b00c: 80 01 00 18 lwz r0,24(r1) ffc0b010: 7f 83 e3 78 mr r3,r28 ffc0b014: 38 80 00 00 li r4,0 ffc0b018: 7e 45 93 78 mr r5,r18 ffc0b01c: 7c 09 03 a6 mtctr r0 ffc0b020: 7f c6 f3 78 mr r6,r30 ffc0b024: 4c c6 31 82 crclr 4*cr1+eq ffc0b028: 4e 80 04 21 bctrl
block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) {
ffc0b02c: 81 17 00 00 lwz r8,0(r23) ffc0b030: 7f 98 40 00 cmpw cr7,r24,r8 ffc0b034: 41 9e 00 50 beq- cr7,ffc0b084 <_Heap_Walk+0x508>
(*printer)(
ffc0b038: 80 01 00 18 lwz r0,24(r1) ffc0b03c: 3c a0 ff c2 lis r5,-62 ffc0b040: 7f 83 e3 78 mr r3,r28 ffc0b044: 38 a5 f9 10 addi r5,r5,-1776 ffc0b048: 7c 09 03 a6 mtctr r0 ffc0b04c: 7f c6 f3 78 mr r6,r30 ffc0b050: 7f 07 c3 78 mr r7,r24 ffc0b054: 7e e9 bb 78 mr r9,r23 ffc0b058: 38 80 00 01 li r4,1 ffc0b05c: 4c c6 31 82 crclr 4*cr1+eq ffc0b060: 4e 80 04 21 bctrl ffc0b064: 38 60 00 00 li r3,0 ffc0b068: 4b ff fb a8 b ffc0ac10 <_Heap_Walk+0x94>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) {
ffc0b06c: 7f 99 e8 00 cmpw cr7,r25,r29 ffc0b070: 41 be fb 9c beq- cr7,ffc0ac0c <_Heap_Walk+0x90>
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 ) {
ffc0b074: 83 1d 00 04 lwz r24,4(r29) ffc0b078: 7f be eb 78 mr r30,r29 ffc0b07c: 57 00 07 fe clrlwi r0,r24,31 ffc0b080: 4b ff fe 7c b ffc0aefc <_Heap_Walk+0x380>
); return false; } if ( !prev_used ) {
ffc0b084: 72 c7 00 01 andi. r7,r22,1 ffc0b088: 41 82 00 44 beq- ffc0b0cc <_Heap_Walk+0x550> ffc0b08c: 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 ) {
ffc0b090: 7f 89 f8 00 cmpw cr7,r9,r31 ffc0b094: 41 9e 00 24 beq- cr7,ffc0b0b8 <_Heap_Walk+0x53c>
if ( free_block == block ) {
ffc0b098: 7f 89 f0 00 cmpw cr7,r9,r30 ffc0b09c: 40 be 00 0c bne+ cr7,ffc0b0a8 <_Heap_Walk+0x52c> ffc0b0a0: 4b ff ff cc b ffc0b06c <_Heap_Walk+0x4f0> ffc0b0a4: 41 ba ff c8 beq- cr6,ffc0b06c <_Heap_Walk+0x4f0>
return true; } free_block = free_block->next;
ffc0b0a8: 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 ) {
ffc0b0ac: 7f 89 f8 00 cmpw cr7,r9,r31
if ( free_block == block ) {
ffc0b0b0: 7f 09 f0 00 cmpw cr6,r9,r30
) { 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 ) {
ffc0b0b4: 40 9e ff f0 bne+ cr7,ffc0b0a4 <_Heap_Walk+0x528>
return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)(
ffc0b0b8: 3c a0 ff c2 lis r5,-62 ffc0b0bc: 7f 83 e3 78 mr r3,r28 ffc0b0c0: 38 a5 f9 7c addi r5,r5,-1668 ffc0b0c4: 7f c6 f3 78 mr r6,r30 ffc0b0c8: 4b ff fc 90 b ffc0ad58 <_Heap_Walk+0x1dc>
return false; } if ( !prev_used ) { (*printer)(
ffc0b0cc: 3c a0 ff c2 lis r5,-62 ffc0b0d0: 7f 83 e3 78 mr r3,r28 ffc0b0d4: 38 a5 f9 4c addi r5,r5,-1716
return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)(
ffc0b0d8: 7f c6 f3 78 mr r6,r30 ffc0b0dc: 4b ff fc 7c b ffc0ad58 <_Heap_Walk+0x1dc>
" (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "")
ffc0b0e0: 7d ea 7b 78 mr r10,r15 ffc0b0e4: 4b ff ff 28 b ffc0b00c <_Heap_Walk+0x490>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""),
ffc0b0e8: 7d c8 73 78 mr r8,r14 ffc0b0ec: 4b ff ff 04 b ffc0aff0 <_Heap_Walk+0x474>
return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)(
ffc0b0f0: 3c a0 ff c2 lis r5,-62 ffc0b0f4: 7f 83 e3 78 mr r3,r28 ffc0b0f8: 38 a5 f8 24 addi r5,r5,-2012 ffc0b0fc: 7f c6 f3 78 mr r6,r30 ffc0b100: 7f 07 c3 78 mr r7,r24 ffc0b104: 4b ff fc 80 b ffc0ad84 <_Heap_Walk+0x208>
return false; } if ( block_size < min_block_size ) { (*printer)(
ffc0b108: 80 01 00 18 lwz r0,24(r1) ffc0b10c: 3c a0 ff c2 lis r5,-62 ffc0b110: 7f 83 e3 78 mr r3,r28 ffc0b114: 38 a5 f8 54 addi r5,r5,-1964 ffc0b118: 7c 09 03 a6 mtctr r0 ffc0b11c: 7f c6 f3 78 mr r6,r30 ffc0b120: 7f 07 c3 78 mr r7,r24 ffc0b124: 7f 48 d3 78 mr r8,r26 ffc0b128: 38 80 00 01 li r4,1 ffc0b12c: 4c c6 31 82 crclr 4*cr1+eq ffc0b130: 4e 80 04 21 bctrl ffc0b134: 38 60 00 00 li r3,0
block, block_size, min_block_size ); return false;
ffc0b138: 4b ff fa d8 b ffc0ac10 <_Heap_Walk+0x94>
} if ( next_block_begin <= block_begin ) { (*printer)(
ffc0b13c: 3c a0 ff c2 lis r5,-62 ffc0b140: 7f 83 e3 78 mr r3,r28 ffc0b144: 38 a5 f8 80 addi r5,r5,-1920 ffc0b148: 7f c6 f3 78 mr r6,r30 ffc0b14c: 7f a7 eb 78 mr r7,r29 ffc0b150: 4b ff fc 34 b ffc0ad84 <_Heap_Walk+0x208>
return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)(
ffc0b154: 3c a0 ff c2 lis r5,-62 ffc0b158: 7f 83 e3 78 mr r3,r28 ffc0b15c: 38 a5 f6 fc addi r5,r5,-2308 ffc0b160: 4b ff fc 4c b ffc0adac <_Heap_Walk+0x230>
} if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)(
ffc0b164: 3c a0 ff c2 lis r5,-62 ffc0b168: 7f 83 e3 78 mr r3,r28 ffc0b16c: 38 a5 f7 34 addi r5,r5,-2252 ffc0b170: 4b ff fb e8 b ffc0ad58 <_Heap_Walk+0x1dc>
return false; } if ( free_block->prev != prev_block ) { (*printer)(
ffc0b174: 3c a0 ff c2 lis r5,-62 ffc0b178: 7f 83 e3 78 mr r3,r28 ffc0b17c: 38 a5 f7 80 addi r5,r5,-2176 ffc0b180: 4b ff fc 04 b ffc0ad84 <_Heap_Walk+0x208>
return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)(
ffc0b184: 3c a0 ff c2 lis r5,-62 ffc0b188: 7f 83 e3 78 mr r3,r28 ffc0b18c: 38 a5 f7 64 addi r5,r5,-2204 ffc0b190: 4b ff fb c8 b ffc0ad58 <_Heap_Walk+0x1dc>
ffc0b194 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) {
ffc0b194: 94 21 ff 88 stwu r1,-120(r1) ffc0b198: 7c 08 02 a6 mflr r0 ffc0b19c: 93 e1 00 74 stw r31,116(r1) ffc0b1a0: 90 01 00 7c stw r0,124(r1) ffc0b1a4: 7c 60 1b 78 mr r0,r3 ffc0b1a8: 90 c1 00 1c stw r6,28(r1) ffc0b1ac: 90 e1 00 20 stw r7,32(r1) ffc0b1b0: 91 01 00 24 stw r8,36(r1) ffc0b1b4: 91 21 00 28 stw r9,40(r1) ffc0b1b8: 91 41 00 2c stw r10,44(r1) ffc0b1bc: 40 86 00 24 bne- cr1,ffc0b1e0 <_Heap_Walk_print+0x4c>
ffc0b1c0: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc0b1c4: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc0b1c8: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0b1cc: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0b1d0: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0b1d4: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0b1d8: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0b1dc: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list ap; if ( error ) {
ffc0b1e0: 2f 84 00 00 cmpwi cr7,r4,0
{ /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) {
ffc0b1e4: 7c bf 2b 78 mr r31,r5
va_list ap; if ( error ) {
ffc0b1e8: 40 9e 00 58 bne- cr7,ffc0b240 <_Heap_Walk_print+0xac>
printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source );
ffc0b1ec: 3c 60 ff c2 lis r3,-62 ffc0b1f0: 7c 04 03 78 mr r4,r0 ffc0b1f4: 38 63 f9 b4 addi r3,r3,-1612 ffc0b1f8: 4c c6 31 82 crclr 4*cr1+eq ffc0b1fc: 4b ff ad d9 bl ffc05fd4 <printk>
} va_start( ap, fmt );
ffc0b200: 38 00 00 03 li r0,3 ffc0b204: 98 01 00 08 stb r0,8(r1) ffc0b208: 38 00 00 00 li r0,0
vprintk( fmt, ap );
ffc0b20c: 7f e3 fb 78 mr r3,r31
printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt );
ffc0b210: 98 01 00 09 stb r0,9(r1) ffc0b214: 38 01 00 80 addi r0,r1,128
vprintk( fmt, ap );
ffc0b218: 38 81 00 08 addi r4,r1,8
printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt );
ffc0b21c: 90 01 00 0c stw r0,12(r1) ffc0b220: 38 01 00 10 addi r0,r1,16 ffc0b224: 90 01 00 10 stw r0,16(r1)
vprintk( fmt, ap );
ffc0b228: 4b ff d0 e1 bl ffc08308 <vprintk>
va_end( ap ); }
ffc0b22c: 80 01 00 7c lwz r0,124(r1) ffc0b230: 83 e1 00 74 lwz r31,116(r1) ffc0b234: 38 21 00 78 addi r1,r1,120 ffc0b238: 7c 08 03 a6 mtlr r0 ffc0b23c: 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 );
ffc0b240: 3c 60 ff c2 lis r3,-62 ffc0b244: 7c 04 03 78 mr r4,r0 ffc0b248: 38 63 f9 a8 addi r3,r3,-1624 ffc0b24c: 4c c6 31 82 crclr 4*cr1+eq ffc0b250: 4b ff ad 85 bl ffc05fd4 <printk>
} else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt );
ffc0b254: 38 00 00 03 li r0,3 ffc0b258: 98 01 00 08 stb r0,8(r1) ffc0b25c: 38 00 00 00 li r0,0
vprintk( fmt, ap );
ffc0b260: 7f e3 fb 78 mr r3,r31
printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt );
ffc0b264: 98 01 00 09 stb r0,9(r1) ffc0b268: 38 01 00 80 addi r0,r1,128
vprintk( fmt, ap );
ffc0b26c: 38 81 00 08 addi r4,r1,8
printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt );
ffc0b270: 90 01 00 0c stw r0,12(r1) ffc0b274: 38 01 00 10 addi r0,r1,16 ffc0b278: 90 01 00 10 stw r0,16(r1)
vprintk( fmt, ap );
ffc0b27c: 4b ff d0 8d bl ffc08308 <vprintk>
va_end( ap ); }
ffc0b280: 80 01 00 7c lwz r0,124(r1) ffc0b284: 83 e1 00 74 lwz r31,116(r1) ffc0b288: 38 21 00 78 addi r1,r1,120 ffc0b28c: 7c 08 03 a6 mtlr r0 ffc0b290: 4e 80 00 20 blr
ffc09f18 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) {
ffc09f18: 94 21 ff f0 stwu r1,-16(r1) ffc09f1c: 7c 08 02 a6 mflr r0
_Internal_errors_What_happened.the_source = the_source;
ffc09f20: 3d 60 00 00 lis r11,0 ffc09f24: 39 2b 2c 90 addi r9,r11,11408
void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) {
ffc09f28: 90 01 00 14 stw r0,20(r1)
_Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error;
ffc09f2c: 90 a9 00 08 stw r5,8(r9)
Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal;
ffc09f30: 98 89 00 04 stb r4,4(r9)
void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) {
ffc09f34: 93 e1 00 0c stw r31,12(r1) ffc09f38: 7c bf 2b 78 mr r31,r5
_Internal_errors_What_happened.the_source = the_source;
ffc09f3c: 90 6b 2c 90 stw r3,11408(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 );
ffc09f40: 48 00 25 cd bl ffc0c50c <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state;
ffc09f44: 38 00 00 05 li r0,5 ffc09f48: 3d 20 00 00 lis r9,0
_System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error );
ffc09f4c: 7f e3 fb 78 mr r3,r31 ffc09f50: 90 09 27 90 stw r0,10128(r9) ffc09f54: 4b ff 9a e1 bl ffc03a34 <_BSP_Fatal_error>
ffc09f58: 48 00 00 00 b ffc09f58 <_Internal_error_Occurred+0x40><== NOT EXECUTED
ffc0a074 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) {
ffc0a074: 94 21 ff b8 stwu r1,-72(r1) ffc0a078: 7c 08 02 a6 mflr r0 ffc0a07c: 90 01 00 4c stw r0,76(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 )
ffc0a080: 81 63 00 34 lwz r11,52(r3)
*/ void _Objects_Extend_information( Objects_Information *information ) {
ffc0a084: 93 a1 00 3c stw r29,60(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 )
ffc0a088: 2f 8b 00 00 cmpwi cr7,r11,0
*/ void _Objects_Extend_information( Objects_Information *information ) {
ffc0a08c: 93 e1 00 44 stw r31,68(r1) ffc0a090: 7c 7f 1b 78 mr r31,r3 ffc0a094: 92 a1 00 1c stw r21,28(r1) ffc0a098: 92 c1 00 20 stw r22,32(r1) ffc0a09c: 92 e1 00 24 stw r23,36(r1) ffc0a0a0: 93 01 00 28 stw r24,40(r1) ffc0a0a4: 93 21 00 2c stw r25,44(r1) ffc0a0a8: 93 41 00 30 stw r26,48(r1) ffc0a0ac: 93 61 00 34 stw r27,52(r1) ffc0a0b0: 93 81 00 38 stw r28,56(r1) ffc0a0b4: 93 c1 00 40 stw r30,64(r1)
/* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id );
ffc0a0b8: a3 a3 00 0a lhz r29,10(r3)
index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL )
ffc0a0bc: 41 9e 02 9c beq- cr7,ffc0a358 <_Objects_Extend_information+0x2e4>
block_count = 0; else { block_count = information->maximum / information->allocation_size;
ffc0a0c0: a3 23 00 10 lhz r25,16(r3) ffc0a0c4: a1 23 00 14 lhz r9,20(r3) ffc0a0c8: 7e b9 4b 96 divwu r21,r25,r9
for ( ; block < block_count; block++ ) {
ffc0a0cc: 2f 95 00 00 cmpwi cr7,r21,0 ffc0a0d0: 41 9e 02 a0 beq- cr7,ffc0a370 <_Objects_Extend_information+0x2fc>
if ( information->object_blocks[ block ] == NULL )
ffc0a0d4: 80 0b 00 00 lwz r0,0(r11) ffc0a0d8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a0dc: 41 9e 02 94 beq- cr7,ffc0a370 <_Objects_Extend_information+0x2fc> ffc0a0e0: 7d 2a 4b 78 mr r10,r9 ffc0a0e4: 7e a9 03 a6 mtctr r21 ffc0a0e8: 7f be eb 78 mr r30,r29 ffc0a0ec: 3b 60 00 00 li r27,0 ffc0a0f0: 48 00 00 10 b ffc0a100 <_Objects_Extend_information+0x8c> ffc0a0f4: 7c 0b 00 2e lwzx r0,r11,r0 ffc0a0f8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a0fc: 41 9e 00 14 beq- cr7,ffc0a110 <_Objects_Extend_information+0x9c>
if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) {
ffc0a100: 3b 7b 00 01 addi r27,r27,1
if ( information->object_blocks[ block ] == NULL )
ffc0a104: 57 60 10 3a rlwinm r0,r27,2,0,29
break; else index_base += information->allocation_size;
ffc0a108: 7f de 4a 14 add r30,r30,r9
if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) {
ffc0a10c: 42 00 ff e8 bdnz+ ffc0a0f4 <_Objects_Extend_information+0x80>
else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size;
ffc0a110: 7f 39 52 14 add r25,r25,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 ) {
ffc0a114: 2b 99 ff ff cmplwi cr7,r25,65535 ffc0a118: 41 9d 01 b8 bgt- cr7,ffc0a2d0 <_Objects_Extend_information+0x25c>
/* * 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 ) {
ffc0a11c: 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;
ffc0a120: 80 7f 00 18 lwz r3,24(r31)
if ( information->auto_extend ) {
ffc0a124: 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;
ffc0a128: 7c 6a 19 d6 mullw r3,r10,r3
if ( information->auto_extend ) {
ffc0a12c: 40 9e 01 e0 bne- cr7,ffc0a30c <_Objects_Extend_information+0x298>
new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
ffc0a130: 48 00 29 f9 bl ffc0cb28 <_Workspace_Allocate_or_fatal_error> ffc0a134: 7c 7c 1b 78 mr r28,r3
} /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) {
ffc0a138: a0 1f 00 10 lhz r0,16(r31) ffc0a13c: 7f 9e 00 40 cmplw cr7,r30,r0 ffc0a140: 41 9c 01 08 blt- cr7,ffc0a248 <_Objects_Extend_information+0x1d4>
*/ /* * Up the block count and maximum */ block_count++;
ffc0a144: 3b 55 00 01 addi r26,r21,1
* Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size );
ffc0a148: 1c 7a 00 03 mulli r3,r26,3 ffc0a14c: 7c 79 1a 14 add r3,r25,r3 ffc0a150: 7c 63 ea 14 add r3,r3,r29 ffc0a154: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0a158: 48 00 2a 19 bl ffc0cb70 <_Workspace_Allocate>
if ( !object_blocks ) {
ffc0a15c: 7c 76 1b 79 mr. r22,r3 ffc0a160: 41 82 02 20 beq- ffc0a380 <_Objects_Extend_information+0x30c>
* Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) {
ffc0a164: a0 1f 00 10 lhz r0,16(r31)
} /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset(
ffc0a168: 57 5a 10 3a rlwinm r26,r26,2,0,29
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset);
ffc0a16c: 7f 16 d2 14 add r24,r22,r26
* Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) {
ffc0a170: 7f 9d 00 40 cmplw cr7,r29,r0 ffc0a174: 7f 58 d2 14 add r26,r24,r26 ffc0a178: 41 9c 01 a4 blt- cr7,ffc0a31c <_Objects_Extend_information+0x2a8>
} else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) {
ffc0a17c: 2f 9d 00 00 cmpwi cr7,r29,0
information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table,
ffc0a180: 39 20 00 00 li r9,0
} else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) {
ffc0a184: 56 b7 10 3a rlwinm r23,r21,2,0,29 ffc0a188: 41 9e 00 20 beq- cr7,ffc0a1a8 <_Objects_Extend_information+0x134>
local_table[ index ] = NULL;
ffc0a18c: 7f a9 03 a6 mtctr r29 ffc0a190: 38 00 00 00 li r0,0 ffc0a194: 55 2b 10 3a rlwinm r11,r9,2,0,29 ffc0a198: 7c 0b d1 2e stwx r0,r11,r26
} else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) {
ffc0a19c: 39 29 00 01 addi r9,r9,1 ffc0a1a0: 42 00 ff f4 bdnz+ ffc0a194 <_Objects_Extend_information+0x120> ffc0a1a4: 56 b7 10 3a rlwinm r23,r21,2,0,29
*/ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base );
ffc0a1a8: a1 7f 00 14 lhz r11,20(r31)
} /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL;
ffc0a1ac: 38 00 00 00 li r0,0
inactive_per_block[block_count] = 0;
ffc0a1b0: 7c 18 b9 2e stwx r0,r24,r23
for ( index=index_base ; index < ( information->allocation_size + index_base );
ffc0a1b4: 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 ;
ffc0a1b8: 7f 9e 58 40 cmplw cr7,r30,r11
} /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL;
ffc0a1bc: 7c 16 b9 2e stwx r0,r22,r23
inactive_per_block[block_count] = 0; for ( index=index_base ;
ffc0a1c0: 40 9c 00 30 bge- cr7,ffc0a1f0 <_Objects_Extend_information+0x17c> ffc0a1c4: 38 1e 00 01 addi r0,r30,1 ffc0a1c8: 7f 80 58 40 cmplw cr7,r0,r11 ffc0a1cc: 57 c9 10 3a rlwinm r9,r30,2,0,29
index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL;
ffc0a1d0: 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 ;
ffc0a1d4: 7d 3a 4a 14 add r9,r26,r9
index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL;
ffc0a1d8: 7d 69 03 a6 mtctr r11 ffc0a1dc: 38 00 00 00 li r0,0 ffc0a1e0: 41 9d 01 ac bgt- cr7,ffc0a38c <_Objects_Extend_information+0x318> ffc0a1e4: 90 09 00 00 stw r0,0(r9)
object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) {
ffc0a1e8: 39 29 00 04 addi r9,r9,4
* Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ;
ffc0a1ec: 42 00 ff f8 bdnz+ ffc0a1e4 <_Objects_Extend_information+0x170>
static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile (
ffc0a1f0: 7c 00 00 a6 mfmsr r0 ffc0a1f4: 7d 30 42 a6 mfsprg r9,0 ffc0a1f8: 7c 09 48 78 andc r9,r0,r9 ffc0a1fc: 7d 20 01 24 mtmsr r9
information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id(
ffc0a200: 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;
ffc0a204: 57 39 04 3e clrlwi r25,r25,16
information->maximum_id = _Objects_Build_id(
ffc0a208: a1 3f 00 04 lhz r9,4(r31) ffc0a20c: 55 6b c0 0e rlwinm r11,r11,24,0,7
local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks;
ffc0a210: 80 7f 00 34 lwz r3,52(r31)
information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id(
ffc0a214: 65 6b 00 01 oris r11,r11,1
_ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block;
ffc0a218: 93 1f 00 30 stw r24,48(r31)
information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id(
ffc0a21c: 55 29 d8 08 rlwinm r9,r9,27,0,4 ffc0a220: 7d 69 4b 78 or r9,r11,r9
old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table;
ffc0a224: 93 5f 00 1c stw r26,28(r31)
information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id(
ffc0a228: 7d 29 cb 78 or r9,r9,r25 ffc0a22c: 91 3f 00 0c stw r9,12(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;
ffc0a230: b3 3f 00 10 sth r25,16(r31)
_ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks;
ffc0a234: 92 df 00 34 stw r22,52(r31)
return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile (
ffc0a238: 7c 00 01 24 mtmsr r0
information->maximum ); _ISR_Enable( level ); if ( old_tables )
ffc0a23c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a240: 41 9e 00 08 beq- cr7,ffc0a248 <_Objects_Extend_information+0x1d4>
_Workspace_Free( old_tables );
ffc0a244: 48 00 29 61 bl ffc0cba4 <_Workspace_Free>
} /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block;
ffc0a248: 81 3f 00 34 lwz r9,52(r31) ffc0a24c: 57 7b 10 3a rlwinm r27,r27,2,0,29
/* * Initialize objects .. add to a local chain first. */ _Chain_Initialize(
ffc0a250: 3b a1 00 08 addi r29,r1,8 ffc0a254: a0 bf 00 14 lhz r5,20(r31)
} /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block;
ffc0a258: 7f 89 d9 2e stwx r28,r9,r27
/* * Initialize objects .. add to a local chain first. */ _Chain_Initialize(
ffc0a25c: 7f 84 e3 78 mr r4,r28 ffc0a260: 7f a3 eb 78 mr r3,r29 ffc0a264: 80 df 00 18 lwz r6,24(r31)
information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node );
ffc0a268: 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(
ffc0a26c: 48 00 4a fd bl ffc0ed68 <_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 ) {
ffc0a270: 48 00 00 2c b ffc0a29c <_Objects_Extend_information+0x228>
the_object->id = _Objects_Build_id(
ffc0a274: 81 7f 00 00 lwz r11,0(r31) ffc0a278: a0 1f 00 04 lhz r0,4(r31) ffc0a27c: 55 6b c0 0e rlwinm r11,r11,24,0,7 ffc0a280: 65 6b 00 01 oris r11,r11,1 ffc0a284: 54 00 d8 08 rlwinm r0,r0,27,0,4 ffc0a288: 7d 60 03 78 or r0,r11,r0 ffc0a28c: 7c 00 f3 78 or r0,r0,r30 ffc0a290: 90 09 00 08 stw r0,8(r9)
index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++;
ffc0a294: 3b de 00 01 addi r30,r30,1
information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node );
ffc0a298: 4b ff f1 fd bl ffc09494 <_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 ) {
ffc0a29c: 7f a3 eb 78 mr r3,r29 ffc0a2a0: 4b ff f2 25 bl ffc094c4 <_Chain_Get> ffc0a2a4: 7c 69 1b 79 mr. r9,r3
information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node );
ffc0a2a8: 7f 83 e3 78 mr r3,r28 ffc0a2ac: 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 ) {
ffc0a2b0: 40 82 ff c4 bne+ ffc0a274 <_Objects_Extend_information+0x200>
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
ffc0a2b4: a0 1f 00 14 lhz r0,20(r31)
information->inactive =
ffc0a2b8: a1 3f 00 2c lhz r9,44(r31)
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
ffc0a2bc: 81 7f 00 30 lwz r11,48(r31)
information->inactive =
ffc0a2c0: 7d 20 4a 14 add r9,r0,r9
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
ffc0a2c4: 54 00 04 3e clrlwi r0,r0,16
information->inactive =
ffc0a2c8: b1 3f 00 2c sth r9,44(r31)
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
ffc0a2cc: 7c 0b d9 2e stwx r0,r11,r27
information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); }
ffc0a2d0: 80 01 00 4c lwz r0,76(r1) ffc0a2d4: 82 a1 00 1c lwz r21,28(r1) ffc0a2d8: 7c 08 03 a6 mtlr r0 ffc0a2dc: 82 c1 00 20 lwz r22,32(r1) ffc0a2e0: 82 e1 00 24 lwz r23,36(r1) ffc0a2e4: 83 01 00 28 lwz r24,40(r1) ffc0a2e8: 83 21 00 2c lwz r25,44(r1) ffc0a2ec: 83 41 00 30 lwz r26,48(r1) ffc0a2f0: 83 61 00 34 lwz r27,52(r1) ffc0a2f4: 83 81 00 38 lwz r28,56(r1) ffc0a2f8: 83 a1 00 3c lwz r29,60(r1) ffc0a2fc: 83 c1 00 40 lwz r30,64(r1) ffc0a300: 83 e1 00 44 lwz r31,68(r1) ffc0a304: 38 21 00 48 addi r1,r1,72 ffc0a308: 4e 80 00 20 blr
* Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size );
ffc0a30c: 48 00 28 65 bl ffc0cb70 <_Workspace_Allocate>
if ( !new_object_block )
ffc0a310: 7c 7c 1b 79 mr. r28,r3 ffc0a314: 40 82 fe 24 bne+ ffc0a138 <_Objects_Extend_information+0xc4> ffc0a318: 4b ff ff b8 b ffc0a2d0 <_Objects_Extend_information+0x25c>
* separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) );
ffc0a31c: 56 b7 10 3a rlwinm r23,r21,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,
ffc0a320: 80 9f 00 34 lwz r4,52(r31) ffc0a324: 7e e5 bb 78 mr r5,r23 ffc0a328: 48 00 84 79 bl ffc127a0 <memcpy>
information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block,
ffc0a32c: 80 9f 00 30 lwz r4,48(r31) ffc0a330: 7e e5 bb 78 mr r5,r23 ffc0a334: 7f 03 c3 78 mr r3,r24 ffc0a338: 48 00 84 69 bl ffc127a0 <memcpy>
information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table,
ffc0a33c: a0 bf 00 10 lhz r5,16(r31) ffc0a340: 80 9f 00 1c lwz r4,28(r31) ffc0a344: 7f 43 d3 78 mr r3,r26 ffc0a348: 7c bd 2a 14 add r5,r29,r5 ffc0a34c: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0a350: 48 00 84 51 bl ffc127a0 <memcpy> ffc0a354: 4b ff fe 54 b ffc0a1a8 <_Objects_Extend_information+0x134>
minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL )
ffc0a358: a3 23 00 10 lhz r25,16(r3) ffc0a35c: 7f be eb 78 mr r30,r29 ffc0a360: a1 43 00 14 lhz r10,20(r3) ffc0a364: 3b 60 00 00 li r27,0 ffc0a368: 3a a0 00 00 li r21,0 ffc0a36c: 4b ff fd a4 b ffc0a110 <_Objects_Extend_information+0x9c>
block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL )
ffc0a370: 7d 2a 4b 78 mr r10,r9 <== NOT EXECUTED ffc0a374: 7f be eb 78 mr r30,r29 <== NOT EXECUTED ffc0a378: 3b 60 00 00 li r27,0 <== NOT EXECUTED ffc0a37c: 4b ff fd 94 b ffc0a110 <_Objects_Extend_information+0x9c><== 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 );
ffc0a380: 7f 83 e3 78 mr r3,r28 ffc0a384: 48 00 28 21 bl ffc0cba4 <_Workspace_Free>
return;
ffc0a388: 4b ff ff 48 b ffc0a2d0 <_Objects_Extend_information+0x25c>
ffc0a38c: 39 60 00 01 li r11,1 <== NOT EXECUTED ffc0a390: 7d 69 03 a6 mtctr r11 <== NOT EXECUTED ffc0a394: 4b ff fe 50 b ffc0a1e4 <_Objects_Extend_information+0x170><== NOT EXECUTED
ffc0a79c <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) {
ffc0a79c: 94 21 ff e8 stwu r1,-24(r1) ffc0a7a0: 7c 08 02 a6 mflr r0 ffc0a7a4: 90 01 00 1c stw r0,28(r1) ffc0a7a8: 93 c1 00 10 stw r30,16(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) /
ffc0a7ac: a1 23 00 10 lhz r9,16(r3)
/* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id );
ffc0a7b0: a3 c3 00 0a lhz r30,10(r3)
block_count = (information->maximum - index_base) /
ffc0a7b4: a0 03 00 14 lhz r0,20(r3) ffc0a7b8: 7d 3e 48 50 subf r9,r30,r9
*/ void _Objects_Shrink_information( Objects_Information *information ) {
ffc0a7bc: 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) /
ffc0a7c0: 7d 29 03 96 divwu r9,r9,r0
*/ void _Objects_Shrink_information( Objects_Information *information ) {
ffc0a7c4: 93 a1 00 0c stw r29,12(r1) ffc0a7c8: 93 e1 00 14 stw r31,20(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++ ) {
ffc0a7cc: 2f 89 00 00 cmpwi cr7,r9,0
*/ void _Objects_Shrink_information( Objects_Information *information ) {
ffc0a7d0: 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++ ) {
ffc0a7d4: 41 9e 00 3c beq- cr7,ffc0a810 <_Objects_Shrink_information+0x74>
if ( information->inactive_per_block[ block ] ==
ffc0a7d8: 81 63 00 30 lwz r11,48(r3) ffc0a7dc: 7d 29 03 a6 mtctr r9
information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return;
ffc0a7e0: 3b e0 00 04 li r31,4
index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] ==
ffc0a7e4: 81 2b 00 00 lwz r9,0(r11) ffc0a7e8: 7f 80 48 00 cmpw cr7,r0,r9 ffc0a7ec: 41 9e 00 44 beq- cr7,ffc0a830 <_Objects_Shrink_information+0x94>
index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) {
ffc0a7f0: 42 40 00 20 bdz- ffc0a810 <_Objects_Shrink_information+0x74>
if ( information->inactive_per_block[ block ] ==
ffc0a7f4: 7d 2b f8 2e lwzx r9,r11,r31
information->inactive -= information->allocation_size; return; } index_base += information->allocation_size;
ffc0a7f8: 7f de 02 14 add r30,r30,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 ] ==
ffc0a7fc: 7f 80 48 00 cmpw cr7,r0,r9
information->inactive -= information->allocation_size; return; } index_base += information->allocation_size;
ffc0a800: 39 3f 00 04 addi r9,r31,4
index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] ==
ffc0a804: 41 9e 00 30 beq- cr7,ffc0a834 <_Objects_Shrink_information+0x98> ffc0a808: 7d 3f 4b 78 mr r31,r9
index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) {
ffc0a80c: 42 00 ff e8 bdnz+ ffc0a7f4 <_Objects_Shrink_information+0x58>
return; } index_base += information->allocation_size; } }
ffc0a810: 80 01 00 1c lwz r0,28(r1) ffc0a814: 83 81 00 08 lwz r28,8(r1) ffc0a818: 7c 08 03 a6 mtlr r0 ffc0a81c: 83 a1 00 0c lwz r29,12(r1) ffc0a820: 83 c1 00 10 lwz r30,16(r1) ffc0a824: 83 e1 00 14 lwz r31,20(r1) ffc0a828: 38 21 00 18 addi r1,r1,24 ffc0a82c: 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 ] ==
ffc0a830: 3b e0 00 00 li r31,0 <== NOT EXECUTED
information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first;
ffc0a834: 80 7c 00 20 lwz r3,32(r28) ffc0a838: 48 00 00 10 b ffc0a848 <_Objects_Shrink_information+0xac>
if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object );
ffc0a83c: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a840: 7f a3 eb 78 mr r3,r29 ffc0a844: 41 9e 00 34 beq- cr7,ffc0a878 <_Objects_Shrink_information+0xdc>
* Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id );
ffc0a848: 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;
ffc0a84c: 83 a3 00 00 lwz r29,0(r3)
if ((index >= index_base) &&
ffc0a850: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0a854: 41 bc ff e8 blt- cr7,ffc0a83c <_Objects_Shrink_information+0xa0>
(index < (index_base + information->allocation_size))) {
ffc0a858: a1 3c 00 14 lhz r9,20(r28) ffc0a85c: 7d 3e 4a 14 add r9,r30,r9 ffc0a860: 7f 80 48 40 cmplw cr7,r0,r9 ffc0a864: 40 9c ff d8 bge+ cr7,ffc0a83c <_Objects_Shrink_information+0xa0>
_Chain_Extract( &extract_me->Node );
ffc0a868: 48 00 44 d9 bl ffc0ed40 <_Chain_Extract>
} } while ( the_object );
ffc0a86c: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a870: 7f a3 eb 78 mr r3,r29 ffc0a874: 40 9e ff d4 bne+ cr7,ffc0a848 <_Objects_Shrink_information+0xac>
/* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] );
ffc0a878: 81 3c 00 34 lwz r9,52(r28) ffc0a87c: 7c 69 f8 2e lwzx r3,r9,r31 ffc0a880: 48 00 23 25 bl ffc0cba4 <_Workspace_Free>
information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size;
ffc0a884: a1 5c 00 2c lhz r10,44(r28) ffc0a888: 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;
ffc0a88c: 81 3c 00 34 lwz r9,52(r28)
information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size;
ffc0a890: 7c 00 50 50 subf r0,r0,r10
* 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;
ffc0a894: 81 7c 00 30 lwz r11,48(r28)
information->inactive -= information->allocation_size;
ffc0a898: b0 1c 00 2c sth r0,44(r28)
return; } index_base += information->allocation_size; } }
ffc0a89c: 80 01 00 1c lwz r0,28(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;
ffc0a8a0: 7f ab f9 2e stwx r29,r11,r31
return; } index_base += information->allocation_size; } }
ffc0a8a4: 7c 08 03 a6 mtlr r0
/* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL;
ffc0a8a8: 7f a9 f9 2e stwx r29,r9,r31
return; } index_base += information->allocation_size; } }
ffc0a8ac: 83 81 00 08 lwz r28,8(r1) ffc0a8b0: 83 a1 00 0c lwz r29,12(r1) ffc0a8b4: 83 c1 00 10 lwz r30,16(r1) ffc0a8b8: 83 e1 00 14 lwz r31,20(r1) ffc0a8bc: 38 21 00 18 addi r1,r1,24 ffc0a8c0: 4e 80 00 20 blr
ffc0a9f8 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) {
ffc0a9f8: 94 21 ff e8 stwu r1,-24(r1) ffc0a9fc: 7c 08 02 a6 mflr r0 ffc0aa00: 90 01 00 1c stw r0,28(r1) ffc0aa04: 93 e1 00 14 stw r31,20(r1) ffc0aa08: 7c 7f 1b 78 mr r31,r3 ffc0aa0c: 93 81 00 08 stw r28,8(r1) ffc0aa10: 7c bc 2b 78 mr r28,r5 ffc0aa14: 93 a1 00 0c stw r29,12(r1) ffc0aa18: 93 c1 00 10 stw r30,16(r1) ffc0aa1c: 7c 9e 23 78 mr r30,r4
*/ /* * Save original state */ original_state = the_thread->current_state;
ffc0aa20: 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 );
ffc0aa24: 48 00 13 8d bl ffc0bdb0 <_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 )
ffc0aa28: 80 1f 00 14 lwz r0,20(r31) ffc0aa2c: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0aa30: 41 9e 00 10 beq- cr7,ffc0aa40 <_Thread_Change_priority+0x48>
_Thread_Set_priority( the_thread, new_priority );
ffc0aa34: 7f c4 f3 78 mr r4,r30 ffc0aa38: 7f e3 fb 78 mr r3,r31 ffc0aa3c: 48 00 11 f5 bl ffc0bc30 <_Thread_Set_priority>
static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile (
ffc0aa40: 7d 20 00 a6 mfmsr r9 ffc0aa44: 7c 10 42 a6 mfsprg r0,0 ffc0aa48: 7d 20 00 78 andc r0,r9,r0 ffc0aa4c: 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;
ffc0aa50: 80 1f 00 10 lwz r0,16(r31)
if ( state != STATES_TRANSIENT ) {
ffc0aa54: 2f 80 00 04 cmpwi cr7,r0,4 ffc0aa58: 41 9e 00 88 beq- cr7,ffc0aae0 <_Thread_Change_priority+0xe8>
/* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) )
ffc0aa5c: 73 ab 00 04 andi. r11,r29,4 ffc0aa60: 41 82 00 38 beq- ffc0aa98 <_Thread_Change_priority+0xa0>
return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile (
ffc0aa64: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) {
ffc0aa68: 3d 20 00 03 lis r9,3 <== NOT EXECUTED ffc0aa6c: 61 29 be e0 ori r9,r9,48864 <== NOT EXECUTED ffc0aa70: 7c 0b 48 39 and. r11,r0,r9 <== NOT EXECUTED ffc0aa74: 40 82 00 40 bne- ffc0aab4 <_Thread_Change_priority+0xbc><== NOT EXECUTED
if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); }
ffc0aa78: 80 01 00 1c lwz r0,28(r1) ffc0aa7c: 83 81 00 08 lwz r28,8(r1) ffc0aa80: 7c 08 03 a6 mtlr r0 ffc0aa84: 83 a1 00 0c lwz r29,12(r1) ffc0aa88: 83 c1 00 10 lwz r30,16(r1) ffc0aa8c: 83 e1 00 14 lwz r31,20(r1) ffc0aa90: 38 21 00 18 addi r1,r1,24 ffc0aa94: 4e 80 00 20 blr
*/ 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 );
ffc0aa98: 54 0b 07 b8 rlwinm r11,r0,0,30,28 ffc0aa9c: 91 7f 00 10 stw r11,16(r31) ffc0aaa0: 7d 20 01 24 mtmsr r9
_ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) {
ffc0aaa4: 3d 20 00 03 lis r9,3 ffc0aaa8: 61 29 be e0 ori r9,r9,48864 ffc0aaac: 7c 0b 48 39 and. r11,r0,r9 ffc0aab0: 41 82 ff c8 beq+ ffc0aa78 <_Thread_Change_priority+0x80>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
ffc0aab4: 80 7f 00 44 lwz r3,68(r31) ffc0aab8: 7f e4 fb 78 mr r4,r31 ffc0aabc: 48 00 10 7d bl ffc0bb38 <_Thread_queue_Requeue>
if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); }
ffc0aac0: 80 01 00 1c lwz r0,28(r1) ffc0aac4: 83 81 00 08 lwz r28,8(r1) ffc0aac8: 7c 08 03 a6 mtlr r0 ffc0aacc: 83 a1 00 0c lwz r29,12(r1) ffc0aad0: 83 c1 00 10 lwz r30,16(r1) ffc0aad4: 83 e1 00 14 lwz r31,20(r1) ffc0aad8: 38 21 00 18 addi r1,r1,24 ffc0aadc: 4e 80 00 20 blr
} return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) {
ffc0aae0: 73 bd 00 04 andi. r29,r29,4 ffc0aae4: 3d 40 00 00 lis r10,0 ffc0aae8: 40 82 00 4c bne- ffc0ab34 <_Thread_Change_priority+0x13c>
* 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 );
ffc0aaec: 93 bf 00 10 stw r29,16(r31)
_Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it )
ffc0aaf0: 2f 9c 00 00 cmpwi cr7,r28,0
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor;
ffc0aaf4: 81 7f 00 90 lwz r11,144(r31) ffc0aaf8: 80 1f 00 98 lwz r0,152(r31) ffc0aafc: 81 0b 00 00 lwz r8,0(r11) ffc0ab00: 7d 00 03 78 or r0,r8,r0 ffc0ab04: 90 0b 00 00 stw r0,0(r11)
_Priority_Major_bit_map |= the_priority_map->ready_major;
ffc0ab08: 81 6a 27 60 lwz r11,10080(r10) ffc0ab0c: 80 1f 00 94 lwz r0,148(r31) ffc0ab10: 7d 60 03 78 or r0,r11,r0 ffc0ab14: 90 0a 27 60 stw r0,10080(r10) ffc0ab18: 41 9e 00 b8 beq- cr7,ffc0abd0 <_Thread_Change_priority+0x1d8>
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain;
ffc0ab1c: 81 7f 00 8c lwz r11,140(r31)
) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next;
ffc0ab20: 81 0b 00 00 lwz r8,0(r11)
Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node;
ffc0ab24: 91 7f 00 04 stw r11,4(r31)
before_node = after_node->next; after_node->next = the_node;
ffc0ab28: 93 eb 00 00 stw r31,0(r11)
the_node->next = before_node; before_node->previous = the_node;
ffc0ab2c: 93 e8 00 04 stw r31,4(r8)
Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node;
ffc0ab30: 91 1f 00 00 stw r8,0(r31)
static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile (
ffc0ab34: 7c 00 00 a6 mfmsr r0 ffc0ab38: 7d 20 01 24 mtmsr r9 ffc0ab3c: 7c 00 01 24 mtmsr r0
*/ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first;
ffc0ab40: 3d 00 00 00 lis r8,0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc0ab44: 81 6a 27 60 lwz r11,10080(r10) ffc0ab48: 80 a8 27 20 lwz r5,10016(r8) ffc0ab4c: 7d 66 00 34 cntlzw r6,r11
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0ab50: 3c e0 00 00 lis r7,0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc0ab54: 91 6a 27 60 stw r11,10080(r10)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0ab58: 38 e7 2d 00 addi r7,r7,11520 ffc0ab5c: 54 c8 10 3a rlwinm r8,r6,2,0,29 ffc0ab60: 7c 07 40 2e lwzx r0,r7,r8 ffc0ab64: 7c 0b 00 34 cntlzw r11,r0
* ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *)
ffc0ab68: 54 c6 20 36 rlwinm r6,r6,4,0,27 ffc0ab6c: 7c 07 41 2e stwx r0,r7,r8 ffc0ab70: 7c c6 5a 14 add r6,r6,r11 ffc0ab74: 1c c6 00 0c mulli r6,r6,12
* is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir );
ffc0ab78: 3d 60 00 00 lis r11,0
* ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *)
ffc0ab7c: 7c 05 30 2e lwzx r0,r5,r6
* is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir );
ffc0ab80: 81 6b 27 6c lwz r11,10092(r11)
* ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *)
ffc0ab84: 3d 40 00 00 lis r10,0 ffc0ab88: 90 0a 27 48 stw r0,10056(r10)
* We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() &&
ffc0ab8c: 7f 80 58 00 cmpw cr7,r0,r11 ffc0ab90: 41 9e 00 1c beq- cr7,ffc0abac <_Thread_Change_priority+0x1b4>
_Thread_Executing->is_preemptible )
ffc0ab94: 88 0b 00 75 lbz r0,117(r11) ffc0ab98: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ab9c: 41 9e 00 10 beq- cr7,ffc0abac <_Thread_Change_priority+0x1b4>
_Context_Switch_necessary = true;
ffc0aba0: 38 00 00 01 li r0,1 ffc0aba4: 3d 60 00 00 lis r11,0 ffc0aba8: 98 0b 27 7c stb r0,10108(r11)
return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile (
ffc0abac: 7d 20 01 24 mtmsr r9
_ISR_Enable( level ); }
ffc0abb0: 80 01 00 1c lwz r0,28(r1) ffc0abb4: 83 81 00 08 lwz r28,8(r1) ffc0abb8: 7c 08 03 a6 mtlr r0 ffc0abbc: 83 a1 00 0c lwz r29,12(r1) ffc0abc0: 83 c1 00 10 lwz r30,16(r1) ffc0abc4: 83 e1 00 14 lwz r31,20(r1) ffc0abc8: 38 21 00 18 addi r1,r1,24 ffc0abcc: 4e 80 00 20 blr
_Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
ffc0abd0: 81 7f 00 8c lwz r11,140(r31)
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
ffc0abd4: 38 0b 00 04 addi r0,r11,4 ffc0abd8: 90 1f 00 00 stw r0,0(r31)
old_last_node = the_chain->last;
ffc0abdc: 81 0b 00 08 lwz r8,8(r11)
the_chain->last = the_node;
ffc0abe0: 93 eb 00 08 stw r31,8(r11)
old_last_node->next = the_node; the_node->previous = old_last_node;
ffc0abe4: 91 1f 00 04 stw r8,4(r31)
Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node;
ffc0abe8: 93 e8 00 00 stw r31,0(r8) ffc0abec: 4b ff ff 48 b ffc0ab34 <_Thread_Change_priority+0x13c>
ffc0b1f0 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) {
ffc0b1f0: 94 21 ff d0 stwu r1,-48(r1) ffc0b1f4: 7c 08 02 a6 mflr r0 ffc0b1f8: 7d 80 00 26 mfcr r12 ffc0b1fc: 90 01 00 34 stw r0,52(r1)
/* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL;
ffc0b200: 38 00 00 00 li r0,0
Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) {
ffc0b204: 93 41 00 18 stw r26,24(r1) ffc0b208: 7d 3a 4b 78 mr r26,r9
*/ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; the_thread->libc_reent = NULL;
ffc0b20c: 90 04 01 3c stw r0,316(r4)
/* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL;
ffc0b210: 90 04 01 40 stw r0,320(r4) ffc0b214: 90 04 01 44 stw r0,324(r4) ffc0b218: 90 04 01 48 stw r0,328(r4)
Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) {
ffc0b21c: 81 21 00 40 lwz r9,64(r1) ffc0b220: 93 a1 00 24 stw r29,36(r1) ffc0b224: 7c 7d 1b 78 mr r29,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 );
ffc0b228: 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 ) {
ffc0b22c: 93 e1 00 2c stw r31,44(r1) ffc0b230: 7c 9f 23 78 mr r31,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 );
ffc0b234: 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 ) {
ffc0b238: 93 01 00 10 stw r24,16(r1) ffc0b23c: 93 21 00 14 stw r25,20(r1) ffc0b240: 7d 59 53 78 mr r25,r10 ffc0b244: 93 61 00 1c stw r27,28(r1) ffc0b248: 7d 1b 43 78 mr r27,r8 ffc0b24c: 93 81 00 20 stw r28,32(r1) ffc0b250: 7c fc 3b 78 mr r28,r7 ffc0b254: 93 c1 00 28 stw r30,40(r1) ffc0b258: 7c de 33 78 mr r30,r6 ffc0b25c: 92 e1 00 0c stw r23,12(r1) ffc0b260: 91 81 00 08 stw r12,8(r1) ffc0b264: 83 09 00 00 lwz r24,0(r9)
/* * 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 );
ffc0b268: 48 00 0b dd bl ffc0be44 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
ffc0b26c: 2c 03 00 00 cmpwi r3,0 ffc0b270: 41 82 01 74 beq- ffc0b3e4 <_Thread_Initialize+0x1f4> ffc0b274: 7f 9e 18 40 cmplw cr7,r30,r3 ffc0b278: 41 9d 01 6c bgt- cr7,ffc0b3e4 <_Thread_Initialize+0x1f4>
/* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) {
ffc0b27c: 2f 9c 00 00 cmpwi cr7,r28,0
Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address;
ffc0b280: 80 1f 00 d4 lwz r0,212(r31)
the_stack->size = size;
ffc0b284: 90 7f 00 c8 stw r3,200(r31) ffc0b288: 39 20 00 00 li r9,0 ffc0b28c: 3b 80 00 00 li r28,0
Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address;
ffc0b290: 90 1f 00 cc stw r0,204(r31) ffc0b294: 40 9e 01 90 bne- cr7,ffc0b424 <_Thread_Initialize+0x234>
#endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) {
ffc0b298: 3f c0 00 00 lis r30,0
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;
ffc0b29c: 91 3f 00 d0 stw r9,208(r31)
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
ffc0b2a0: 38 00 00 00 li r0,0
#endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) {
ffc0b2a4: 81 7e 27 58 lwz r11,10072(r30)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
ffc0b2a8: 90 1f 00 6c stw r0,108(r31) ffc0b2ac: 2f 8b 00 00 cmpwi cr7,r11,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;
ffc0b2b0: 91 3f 01 38 stw r9,312(r31)
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
ffc0b2b4: 90 1f 00 50 stw r0,80(r31)
the_watchdog->routine = routine;
ffc0b2b8: 90 1f 00 64 stw r0,100(r31)
the_watchdog->id = id;
ffc0b2bc: 90 1f 00 68 stw r0,104(r31)
#endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) {
ffc0b2c0: 40 9e 01 88 bne- cr7,ffc0b448 <_Thread_Initialize+0x258>
(_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area;
ffc0b2c4: 91 7f 01 4c stw r11,332(r31) ffc0b2c8: 3a e0 00 00 li r23,0
* General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout;
ffc0b2cc: 80 01 00 38 lwz r0,56(r1)
} the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL;
ffc0b2d0: 3b c0 00 00 li r30,0
/* * General initialization */ the_thread->Start.is_preemptible = is_preemptible;
ffc0b2d4: 9b 5f 00 b4 stb r26,180(r31)
#if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority );
ffc0b2d8: 7f 64 db 78 mr r4,r27 ffc0b2dc: 7f e3 fb 78 mr r3,r31
* General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout;
ffc0b2e0: 90 1f 00 bc stw r0,188(r31) ffc0b2e4: 2e 1c 00 00 cmpwi cr4,r28,0 ffc0b2e8: 2d 97 00 00 cmpwi cr3,r23,0
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level;
ffc0b2ec: 80 01 00 3c lwz r0,60(r1)
/* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm;
ffc0b2f0: 93 3f 00 b8 stw r25,184(r31)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level;
ffc0b2f4: 90 1f 00 c0 stw r0,192(r31)
the_thread->current_state = STATES_DORMANT;
ffc0b2f8: 38 00 00 01 li r0,1 ffc0b2fc: 90 1f 00 10 stw r0,16(r31)
the_thread->Wait.queue = NULL;
ffc0b300: 93 df 00 44 stw r30,68(r31)
the_thread->resource_count = 0;
ffc0b304: 93 df 00 1c stw r30,28(r31)
#if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority;
ffc0b308: 93 7f 00 18 stw r27,24(r31)
the_thread->Start.initial_priority = priority;
ffc0b30c: 93 7f 00 c4 stw r27,196(r31)
_Thread_Set_priority( the_thread, priority );
ffc0b310: 48 00 09 21 bl ffc0bc30 <_Thread_Set_priority>
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
ffc0b314: a0 1f 00 0a lhz r0,10(r31) ffc0b318: 81 3d 00 1c lwz r9,28(r29)
* 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 );
ffc0b31c: 7f e3 fb 78 mr r3,r31 ffc0b320: 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 );
ffc0b324: 93 df 00 88 stw r30,136(r31) ffc0b328: 7f e9 01 2e stwx r31,r9,r0
information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name;
ffc0b32c: 93 1f 00 0c stw r24,12(r31) ffc0b330: 93 df 00 84 stw r30,132(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 );
ffc0b334: 48 00 12 69 bl ffc0c59c <_User_extensions_Thread_create>
if ( extension_status )
ffc0b338: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b33c: 38 60 00 01 li r3,1 ffc0b340: 40 9e 00 a8 bne- cr7,ffc0b3e8 <_Thread_Initialize+0x1f8>
return true; failed: if ( the_thread->libc_reent )
ffc0b344: 80 7f 01 3c lwz r3,316(r31) ffc0b348: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b34c: 41 9e 00 08 beq- cr7,ffc0b354 <_Thread_Initialize+0x164>
_Workspace_Free( the_thread->libc_reent );
ffc0b350: 48 00 18 55 bl ffc0cba4 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] )
ffc0b354: 80 7f 01 40 lwz r3,320(r31) ffc0b358: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b35c: 41 9e 00 08 beq- cr7,ffc0b364 <_Thread_Initialize+0x174>
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0b360: 48 00 18 45 bl ffc0cba4 <_Workspace_Free>
failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] )
ffc0b364: 80 7f 01 44 lwz r3,324(r31) ffc0b368: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b36c: 41 9e 00 08 beq- cr7,ffc0b374 <_Thread_Initialize+0x184>
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0b370: 48 00 18 35 bl ffc0cba4 <_Workspace_Free> <== NOT EXECUTED
failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] )
ffc0b374: 80 7f 01 48 lwz r3,328(r31) ffc0b378: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b37c: 41 9e 00 08 beq- cr7,ffc0b384 <_Thread_Initialize+0x194>
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0b380: 48 00 18 25 bl ffc0cba4 <_Workspace_Free> <== NOT EXECUTED
if ( extensions_area )
ffc0b384: 41 8e 00 0c beq- cr3,ffc0b390 <_Thread_Initialize+0x1a0>
(void) _Workspace_Free( extensions_area );
ffc0b388: 7e e3 bb 78 mr r3,r23 ffc0b38c: 48 00 18 19 bl ffc0cba4 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area )
ffc0b390: 41 92 00 0c beq- cr4,ffc0b39c <_Thread_Initialize+0x1ac>
(void) _Workspace_Free( fp_area );
ffc0b394: 7f 83 e3 78 mr r3,r28 ffc0b398: 48 00 18 0d bl ffc0cba4 <_Workspace_Free>
#endif _Thread_Stack_Free( the_thread );
ffc0b39c: 7f e3 fb 78 mr r3,r31 ffc0b3a0: 48 00 0b 5d bl ffc0befc <_Thread_Stack_Free>
return false; }
ffc0b3a4: 80 01 00 34 lwz r0,52(r1) ffc0b3a8: 81 81 00 08 lwz r12,8(r1)
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread );
ffc0b3ac: 38 60 00 00 li r3,0
return false; }
ffc0b3b0: 7c 08 03 a6 mtlr r0 ffc0b3b4: 82 e1 00 0c lwz r23,12(r1) ffc0b3b8: 83 01 00 10 lwz r24,16(r1) ffc0b3bc: 7d 81 81 20 mtcrf 24,r12 ffc0b3c0: 83 21 00 14 lwz r25,20(r1) ffc0b3c4: 83 41 00 18 lwz r26,24(r1) ffc0b3c8: 83 61 00 1c lwz r27,28(r1) ffc0b3cc: 83 81 00 20 lwz r28,32(r1) ffc0b3d0: 83 a1 00 24 lwz r29,36(r1) ffc0b3d4: 83 c1 00 28 lwz r30,40(r1) ffc0b3d8: 83 e1 00 2c lwz r31,44(r1) ffc0b3dc: 38 21 00 30 addi r1,r1,48 ffc0b3e0: 4e 80 00 20 blr
if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false;
ffc0b3e4: 38 60 00 00 li r3,0
}
ffc0b3e8: 80 01 00 34 lwz r0,52(r1) ffc0b3ec: 81 81 00 08 lwz r12,8(r1) ffc0b3f0: 7c 08 03 a6 mtlr r0 ffc0b3f4: 82 e1 00 0c lwz r23,12(r1) ffc0b3f8: 83 01 00 10 lwz r24,16(r1) ffc0b3fc: 7d 81 81 20 mtcrf 24,r12 ffc0b400: 83 21 00 14 lwz r25,20(r1) ffc0b404: 83 41 00 18 lwz r26,24(r1) ffc0b408: 83 61 00 1c lwz r27,28(r1) ffc0b40c: 83 81 00 20 lwz r28,32(r1) ffc0b410: 83 a1 00 24 lwz r29,36(r1) ffc0b414: 83 c1 00 28 lwz r30,40(r1) ffc0b418: 83 e1 00 2c lwz r31,44(r1) ffc0b41c: 38 21 00 30 addi r1,r1,48 ffc0b420: 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 );
ffc0b424: 38 60 01 08 li r3,264 ffc0b428: 48 00 17 49 bl ffc0cb70 <_Workspace_Allocate>
if ( !fp_area )
ffc0b42c: 2e 03 00 00 cmpwi cr4,r3,0
/* * 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 );
ffc0b430: 7c 7c 1b 78 mr r28,r3
if ( !fp_area )
ffc0b434: 7c 69 1b 78 mr r9,r3 ffc0b438: 40 92 fe 60 bne+ cr4,ffc0b298 <_Thread_Initialize+0xa8> ffc0b43c: 3a e0 00 00 li r23,0 ffc0b440: 4d 90 00 00 mcrf cr3,cr4 ffc0b444: 4b ff ff 00 b ffc0b344 <_Thread_Initialize+0x154>
/* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate(
ffc0b448: 39 6b 00 01 addi r11,r11,1 ffc0b44c: 55 63 10 3a rlwinm r3,r11,2,0,29 ffc0b450: 48 00 17 21 bl ffc0cb70 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area )
ffc0b454: 2d 83 00 00 cmpwi cr3,r3,0 ffc0b458: 7c 77 1b 78 mr r23,r3 ffc0b45c: 41 8e 00 40 beq- cr3,ffc0b49c <_Thread_Initialize+0x2ac>
goto failed; } the_thread->extensions = (void **) extensions_area;
ffc0b460: 90 7f 01 4c stw r3,332(r31) ffc0b464: 7c 6b 1b 78 mr r11,r3
* create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
ffc0b468: 38 00 00 00 li r0,0 ffc0b46c: 81 1e 27 58 lwz r8,10072(r30) ffc0b470: 39 20 00 00 li r9,0
the_thread->extensions[i] = NULL;
ffc0b474: 39 40 00 00 li r10,0 ffc0b478: 48 00 00 08 b ffc0b480 <_Thread_Initialize+0x290>
* 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++ )
ffc0b47c: 81 7f 01 4c lwz r11,332(r31) ffc0b480: 39 29 00 01 addi r9,r9,1 ffc0b484: 7f 88 48 40 cmplw cr7,r8,r9
the_thread->extensions[i] = NULL;
ffc0b488: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0b48c: 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++ )
ffc0b490: 7d 20 4b 78 mr r0,r9 ffc0b494: 40 9c ff e8 bge+ cr7,ffc0b47c <_Thread_Initialize+0x28c> ffc0b498: 4b ff fe 34 b ffc0b2cc <_Thread_Initialize+0xdc> ffc0b49c: 2e 1c 00 00 cmpwi cr4,r28,0 ffc0b4a0: 4b ff fe a4 b ffc0b344 <_Thread_Initialize+0x154>
ffc0f894 <_Thread_Reset_timeslice>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing;
ffc0f894: 3d 20 00 00 lis r9,0 ffc0f898: 81 29 27 6c lwz r9,10092(r9)
ready = executing->ready;
ffc0f89c: 81 69 00 8c lwz r11,140(r9)
static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile (
ffc0f8a0: 7c 00 00 a6 mfmsr r0 ffc0f8a4: 7d 50 42 a6 mfsprg r10,0 ffc0f8a8: 7c 0a 50 78 andc r10,r0,r10 ffc0f8ac: 7d 40 01 24 mtmsr r10
_ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) {
ffc0f8b0: 81 0b 00 00 lwz r8,0(r11) ffc0f8b4: 81 4b 00 08 lwz r10,8(r11) ffc0f8b8: 7f 88 50 00 cmpw cr7,r8,r10 ffc0f8bc: 41 9e 00 78 beq- cr7,ffc0f934 <_Thread_Reset_timeslice+0xa0>
) { Chain_Node *next; Chain_Node *previous; next = the_node->next;
ffc0f8c0: 81 49 00 00 lwz r10,0(r9)
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
ffc0f8c4: 38 eb 00 04 addi r7,r11,4
{ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous;
ffc0f8c8: 81 09 00 04 lwz r8,4(r9)
next->previous = previous; previous->next = next;
ffc0f8cc: 91 48 00 00 stw r10,0(r8)
Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous;
ffc0f8d0: 91 0a 00 04 stw r8,4(r10)
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
ffc0f8d4: 90 e9 00 00 stw r7,0(r9)
old_last_node = the_chain->last;
ffc0f8d8: 81 4b 00 08 lwz r10,8(r11)
the_chain->last = the_node;
ffc0f8dc: 91 2b 00 08 stw r9,8(r11)
old_last_node->next = the_node; the_node->previous = old_last_node;
ffc0f8e0: 91 49 00 04 stw r10,4(r9)
Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node;
ffc0f8e4: 91 2a 00 00 stw r9,0(r10)
static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile (
ffc0f8e8: 7d 40 00 a6 mfmsr r10 ffc0f8ec: 7c 00 01 24 mtmsr r0 ffc0f8f0: 7d 40 01 24 mtmsr r10
_Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) )
ffc0f8f4: 3d 40 00 00 lis r10,0 ffc0f8f8: 81 0a 27 48 lwz r8,10056(r10) ffc0f8fc: 7f 89 40 00 cmpw cr7,r9,r8 ffc0f900: 41 9e 00 18 beq- cr7,ffc0f918 <_Thread_Reset_timeslice+0x84>
_Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true;
ffc0f904: 39 60 00 01 li r11,1 <== NOT EXECUTED ffc0f908: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0f90c: 99 69 27 7c stb r11,10108(r9) <== NOT EXECUTED
return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile (
ffc0f910: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED ffc0f914: 4e 80 00 20 blr <== NOT EXECUTED
_Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first;
ffc0f918: 81 2b 00 00 lwz r9,0(r11)
_Context_Switch_necessary = true;
ffc0f91c: 39 60 00 01 li r11,1
_Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first;
ffc0f920: 91 2a 27 48 stw r9,10056(r10)
_Context_Switch_necessary = true;
ffc0f924: 3d 20 00 00 lis r9,0 ffc0f928: 99 69 27 7c stb r11,10108(r9) ffc0f92c: 7c 00 01 24 mtmsr r0 ffc0f930: 4e 80 00 20 blr ffc0f934: 7c 00 01 24 mtmsr r0 ffc0f938: 4e 80 00 20 blr
ffc0ccac <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) {
ffc0ccac: 94 21 ff e8 stwu r1,-24(r1) ffc0ccb0: 7c 08 02 a6 mflr r0 ffc0ccb4: 90 01 00 1c stw r0,28(r1)
if ( !_States_Is_dormant( the_thread->current_state ) ) {
ffc0ccb8: 80 03 00 10 lwz r0,16(r3)
bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) {
ffc0ccbc: 93 e1 00 14 stw r31,20(r1) ffc0ccc0: 7c 7f 1b 78 mr r31,r3
if ( !_States_Is_dormant( the_thread->current_state ) ) {
ffc0ccc4: 70 09 00 01 andi. r9,r0,1
bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) {
ffc0ccc8: 93 c1 00 10 stw r30,16(r1)
if ( !_States_Is_dormant( the_thread->current_state ) ) {
ffc0cccc: 38 00 00 00 li r0,0 ffc0ccd0: 41 82 00 20 beq- ffc0ccf0 <_Thread_Restart+0x44>
return true; } return false; }
ffc0ccd4: 7c 03 03 78 mr r3,r0 ffc0ccd8: 80 01 00 1c lwz r0,28(r1) ffc0ccdc: 83 c1 00 10 lwz r30,16(r1) ffc0cce0: 7c 08 03 a6 mtlr r0 ffc0cce4: 83 e1 00 14 lwz r31,20(r1) ffc0cce8: 38 21 00 18 addi r1,r1,24 ffc0ccec: 4e 80 00 20 blr
Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread );
ffc0ccf0: 90 81 00 08 stw r4,8(r1)
_Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) )
ffc0ccf4: 3f c0 00 00 lis r30,0
Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread );
ffc0ccf8: 90 a1 00 0c stw r5,12(r1) ffc0ccfc: 48 00 01 e5 bl ffc0cee0 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
ffc0cd00: 7f e3 fb 78 mr r3,r31 ffc0cd04: 80 81 00 08 lwz r4,8(r1) ffc0cd08: 80 a1 00 0c lwz r5,12(r1) ffc0cd0c: 48 00 3e 6d bl ffc10b78 <_Thread_Reset>
_Thread_Load_environment( the_thread );
ffc0cd10: 7f e3 fb 78 mr r3,r31 ffc0cd14: 48 00 3a 19 bl ffc1072c <_Thread_Load_environment>
_Thread_Ready( the_thread );
ffc0cd18: 7f e3 fb 78 mr r3,r31 ffc0cd1c: 48 00 3d 81 bl ffc10a9c <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
ffc0cd20: 7f e3 fb 78 mr r3,r31 ffc0cd24: 48 00 0a c1 bl ffc0d7e4 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
ffc0cd28: 81 3e 27 98 lwz r9,10136(r30) ffc0cd2c: 38 00 00 01 li r0,1 ffc0cd30: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0cd34: 40 9e ff a0 bne+ cr7,ffc0ccd4 <_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 )
ffc0cd38: 80 1f 01 38 lwz r0,312(r31) ffc0cd3c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cd40: 41 9e 00 10 beq- cr7,ffc0cd50 <_Thread_Restart+0xa4>
_Context_Restore_fp( &_Thread_Executing->fp_context );
ffc0cd44: 38 7f 01 38 addi r3,r31,312 ffc0cd48: 48 01 35 f9 bl ffc20340 <_CPU_Context_restore_fp> ffc0cd4c: 83 fe 27 98 lwz r31,10136(r30)
#endif _CPU_Context_Restart_self( &_Thread_Executing->Registers );
ffc0cd50: 38 7f 00 d8 addi r3,r31,216 ffc0cd54: 48 01 37 ad bl ffc20500 <_CPU_Context_restore>
ffc0cd58: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0cd5c: 4b ff ff 78 b ffc0ccd4 <_Thread_Restart+0x28> <== NOT EXECUTED
ffc0b870 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority;
ffc0b870: 80 04 00 14 lwz r0,20(r4)
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
ffc0b874: 39 04 00 3c addi r8,r4,60
Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) {
ffc0b878: 94 21 ff f0 stwu r1,-16(r1)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
ffc0b87c: 39 64 00 38 addi r11,r4,56
priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) )
ffc0b880: 70 09 00 20 andi. r9,r0,32
_Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ];
ffc0b884: 54 0a d1 be rlwinm r10,r0,26,6,31
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
ffc0b888: 91 04 00 38 stw r8,56(r4) ffc0b88c: 1d 4a 00 0c mulli r10,r10,12
Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) {
ffc0b890: 93 e1 00 0c stw r31,12(r1)
the_chain->permanent_null = NULL;
ffc0b894: 39 00 00 00 li r8,0
_Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state;
ffc0b898: 81 23 00 38 lwz r9,56(r3)
_Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ];
ffc0b89c: 7d 43 52 14 add r10,r3,r10 ffc0b8a0: 91 04 00 3c stw r8,60(r4)
the_chain->last = _Chain_Head(the_chain);
ffc0b8a4: 91 64 00 40 stw r11,64(r4)
block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) )
ffc0b8a8: 40 82 00 7c bne- ffc0b924 <_Thread_queue_Enqueue_priority+0xb4>
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
ffc0b8ac: 39 8a 00 04 addi r12,r10,4
static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile (
ffc0b8b0: 7c c0 00 a6 mfmsr r6 ffc0b8b4: 7d 70 42 a6 mfsprg r11,0 ffc0b8b8: 7c cb 58 78 andc r11,r6,r11 ffc0b8bc: 7d 60 01 24 mtmsr r11
goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first;
ffc0b8c0: 81 6a 00 00 lwz r11,0(r10)
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
ffc0b8c4: 7f 8b 60 00 cmpw cr7,r11,r12 ffc0b8c8: 40 be 00 2c bne+ cr7,ffc0b8f4 <_Thread_queue_Enqueue_priority+0x84> ffc0b8cc: 48 00 01 78 b ffc0ba44 <_Thread_queue_Enqueue_priority+0x1d4>
static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile (
ffc0b8d0: 7c e0 00 a6 mfmsr r7 ffc0b8d4: 7c c0 01 24 mtmsr r6 ffc0b8d8: 7c e0 01 24 mtmsr r7
search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) {
ffc0b8dc: 80 eb 00 10 lwz r7,16(r11) ffc0b8e0: 7d 3f 38 39 and. r31,r9,r7 ffc0b8e4: 41 82 00 f4 beq- ffc0b9d8 <_Thread_queue_Enqueue_priority+0x168>
_ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next;
ffc0b8e8: 81 6b 00 00 lwz r11,0(r11)
restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
ffc0b8ec: 7f 8b 60 00 cmpw cr7,r11,r12 ffc0b8f0: 41 9e 00 10 beq- cr7,ffc0b900 <_Thread_queue_Enqueue_priority+0x90>
search_priority = search_thread->current_priority;
ffc0b8f4: 81 0b 00 14 lwz r8,20(r11)
if ( priority <= search_priority )
ffc0b8f8: 7f 80 40 40 cmplw cr7,r0,r8 ffc0b8fc: 41 9d ff d4 bgt+ cr7,ffc0b8d0 <_Thread_queue_Enqueue_priority+0x60>
restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
ffc0b900: 7c ca 33 78 mr r10,r6
} search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state !=
ffc0b904: 81 23 00 30 lwz r9,48(r3) ffc0b908: 2f 89 00 01 cmpwi cr7,r9,1 ffc0b90c: 41 9e 00 d4 beq- cr7,ffc0b9e0 <_Thread_queue_Enqueue_priority+0x170>
* For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level;
ffc0b910: 91 45 00 00 stw r10,0(r5)
return the_thread_queue->sync_state;
ffc0b914: 7d 23 4b 78 mr r3,r9
}
ffc0b918: 83 e1 00 0c lwz r31,12(r1) ffc0b91c: 38 21 00 10 addi r1,r1,16 ffc0b920: 4e 80 00 20 blr ffc0b924: 3d 80 00 00 lis r12,0 ffc0b928: 39 8c 26 64 addi r12,r12,9828
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1;
ffc0b92c: 89 0c 00 00 lbz r8,0(r12) ffc0b930: 39 08 00 01 addi r8,r8,1
static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile (
ffc0b934: 7c c0 00 a6 mfmsr r6 ffc0b938: 7d 70 42 a6 mfsprg r11,0 ffc0b93c: 7c cb 58 78 andc r11,r6,r11 ffc0b940: 7d 60 01 24 mtmsr r11
_ISR_Disable( level ); search_thread = (Thread_Control *) header->last;
ffc0b944: 81 6a 00 08 lwz r11,8(r10)
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
ffc0b948: 7f 8b 50 00 cmpw cr7,r11,r10 ffc0b94c: 40 be 00 2c bne+ cr7,ffc0b978 <_Thread_queue_Enqueue_priority+0x108> ffc0b950: 48 00 00 34 b ffc0b984 <_Thread_queue_Enqueue_priority+0x114>
static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile (
ffc0b954: 7c e0 00 a6 mfmsr r7 ffc0b958: 7c c0 01 24 mtmsr r6 ffc0b95c: 7c e0 01 24 mtmsr r7
search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) {
ffc0b960: 80 eb 00 10 lwz r7,16(r11) ffc0b964: 7d 3f 38 39 and. r31,r9,r7 ffc0b968: 41 82 00 68 beq- ffc0b9d0 <_Thread_queue_Enqueue_priority+0x160>
_ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *)
ffc0b96c: 81 6b 00 04 lwz r11,4(r11)
restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
ffc0b970: 7f 8b 50 00 cmpw cr7,r11,r10 ffc0b974: 41 9e 00 10 beq- cr7,ffc0b984 <_Thread_queue_Enqueue_priority+0x114>
search_priority = search_thread->current_priority;
ffc0b978: 81 0b 00 14 lwz r8,20(r11)
if ( priority >= search_priority )
ffc0b97c: 7f 80 40 40 cmplw cr7,r0,r8 ffc0b980: 41 9c ff d4 blt+ cr7,ffc0b954 <_Thread_queue_Enqueue_priority+0xe4>
} search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state !=
ffc0b984: 81 23 00 30 lwz r9,48(r3)
restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
ffc0b988: 7c ca 33 78 mr r10,r6
} search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state !=
ffc0b98c: 2f 89 00 01 cmpwi cr7,r9,1 ffc0b990: 40 9e ff 80 bne+ cr7,ffc0b910 <_Thread_queue_Enqueue_priority+0xa0>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority )
ffc0b994: 7f 80 40 00 cmpw cr7,r0,r8
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
ffc0b998: 38 00 00 00 li r0,0 ffc0b99c: 90 03 00 30 stw r0,48(r3)
if ( priority == search_priority )
ffc0b9a0: 41 9e 00 7c beq- cr7,ffc0ba1c <_Thread_queue_Enqueue_priority+0x1ac>
goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next;
ffc0b9a4: 81 2b 00 00 lwz r9,0(r11)
the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node;
ffc0b9a8: 91 64 00 04 stw r11,4(r4)
search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node;
ffc0b9ac: 91 24 00 00 stw r9,0(r4)
the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
ffc0b9b0: 90 64 00 44 stw r3,68(r4)
next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node;
ffc0b9b4: 90 8b 00 00 stw r4,0(r11)
next_node->previous = the_node;
ffc0b9b8: 90 89 00 04 stw r4,4(r9)
return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile (
ffc0b9bc: 7c c0 01 24 mtmsr r6 ffc0b9c0: 38 60 00 01 li r3,1
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
ffc0b9c4: 83 e1 00 0c lwz r31,12(r1) ffc0b9c8: 38 21 00 10 addi r1,r1,16 ffc0b9cc: 4e 80 00 20 blr ffc0b9d0: 7c c0 01 24 mtmsr r6 ffc0b9d4: 4b ff ff 58 b ffc0b92c <_Thread_queue_Enqueue_priority+0xbc>
ffc0b9d8: 7c c0 01 24 mtmsr r6 <== NOT EXECUTED ffc0b9dc: 4b ff fe d4 b ffc0b8b0 <_Thread_queue_Enqueue_priority+0x40><== NOT EXECUTED
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority )
ffc0b9e0: 7f 80 40 00 cmpw cr7,r0,r8
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
ffc0b9e4: 38 00 00 00 li r0,0 ffc0b9e8: 90 03 00 30 stw r0,48(r3)
if ( priority == search_priority )
ffc0b9ec: 41 9e 00 30 beq- cr7,ffc0ba1c <_Thread_queue_Enqueue_priority+0x1ac>
goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous;
ffc0b9f0: 81 2b 00 04 lwz r9,4(r11)
the_node = (Chain_Node *) the_thread; the_node->next = search_node;
ffc0b9f4: 91 64 00 00 stw r11,0(r4)
the_node->previous = previous_node;
ffc0b9f8: 91 24 00 04 stw r9,4(r4)
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
ffc0b9fc: 90 64 00 44 stw r3,68(r4)
previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node;
ffc0ba00: 90 89 00 00 stw r4,0(r9)
search_node->previous = the_node;
ffc0ba04: 90 8b 00 04 stw r4,4(r11) ffc0ba08: 7c c0 01 24 mtmsr r6 ffc0ba0c: 38 60 00 01 li r3,1
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
ffc0ba10: 83 e1 00 0c lwz r31,12(r1) ffc0ba14: 38 21 00 10 addi r1,r1,16 ffc0ba18: 4e 80 00 20 blr ffc0ba1c: 39 6b 00 3c addi r11,r11,60
the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
ffc0ba20: 90 64 00 44 stw r3,68(r4)
_ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous;
ffc0ba24: 81 2b 00 04 lwz r9,4(r11)
the_node = (Chain_Node *) the_thread; the_node->next = search_node;
ffc0ba28: 91 64 00 00 stw r11,0(r4)
the_node->previous = previous_node;
ffc0ba2c: 91 24 00 04 stw r9,4(r4)
previous_node->next = the_node;
ffc0ba30: 90 89 00 00 stw r4,0(r9)
search_node->previous = the_node;
ffc0ba34: 90 8b 00 04 stw r4,4(r11) ffc0ba38: 7d 40 01 24 mtmsr r10 ffc0ba3c: 38 60 00 01 li r3,1
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
ffc0ba40: 4b ff fe d8 b ffc0b918 <_Thread_queue_Enqueue_priority+0xa8>
restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
ffc0ba44: 7c ca 33 78 mr r10,r6 ffc0ba48: 39 00 ff ff li r8,-1 ffc0ba4c: 4b ff fe b8 b ffc0b904 <_Thread_queue_Enqueue_priority+0x94>
ffc0bb38 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) {
ffc0bb38: 94 21 ff d8 stwu r1,-40(r1) ffc0bb3c: 7c 08 02 a6 mflr r0 ffc0bb40: 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 )
ffc0bb44: 7c 7f 1b 79 mr. r31,r3
void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) {
ffc0bb48: 93 c1 00 20 stw r30,32(r1) ffc0bb4c: 7c 9e 23 78 mr r30,r4 ffc0bb50: 90 01 00 2c stw r0,44(r1) ffc0bb54: 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 )
ffc0bb58: 41 82 00 10 beq- ffc0bb68 <_Thread_queue_Requeue+0x30>
/* * 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 ) {
ffc0bb5c: 80 1f 00 34 lwz r0,52(r31) ffc0bb60: 2f 80 00 01 cmpwi cr7,r0,1 ffc0bb64: 41 9e 00 20 beq- cr7,ffc0bb84 <_Thread_queue_Requeue+0x4c>
_Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } }
ffc0bb68: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc0bb6c: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc0bb70: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0bb74: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc0bb78: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc0bb7c: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc0bb80: 4e 80 00 20 blr <== NOT EXECUTED
static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile (
ffc0bb84: 7f a0 00 a6 mfmsr r29 ffc0bb88: 7d 30 42 a6 mfsprg r9,0 ffc0bb8c: 7f a9 48 78 andc r9,r29,r9 ffc0bb90: 7d 20 01 24 mtmsr r9
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 ) ) {
ffc0bb94: 3d 60 00 03 lis r11,3 ffc0bb98: 81 24 00 10 lwz r9,16(r4) ffc0bb9c: 61 6b be e0 ori r11,r11,48864 ffc0bba0: 7d 6a 48 39 and. r10,r11,r9 ffc0bba4: 40 82 00 24 bne- ffc0bbc8 <_Thread_queue_Requeue+0x90>
return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile (
ffc0bba8: 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 ); } }
ffc0bbac: 80 01 00 2c lwz r0,44(r1) ffc0bbb0: 83 a1 00 1c lwz r29,28(r1) ffc0bbb4: 7c 08 03 a6 mtlr r0 ffc0bbb8: 83 c1 00 20 lwz r30,32(r1) ffc0bbbc: 83 e1 00 24 lwz r31,36(r1) ffc0bbc0: 38 21 00 28 addi r1,r1,40 ffc0bbc4: 4e 80 00 20 blr ffc0bbc8: 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 );
ffc0bbcc: 38 a0 00 01 li r5,1 ffc0bbd0: 48 00 3a 6d bl ffc0f63c <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
ffc0bbd4: 7f e3 fb 78 mr r3,r31 ffc0bbd8: 7f c4 f3 78 mr r4,r30 ffc0bbdc: 38 a1 00 08 addi r5,r1,8 ffc0bbe0: 4b ff fc 91 bl ffc0b870 <_Thread_queue_Enqueue_priority> ffc0bbe4: 7f a0 01 24 mtmsr r29 ffc0bbe8: 4b ff ff c4 b ffc0bbac <_Thread_queue_Requeue+0x74>
ffc1bb04 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) {
ffc1bb04: 94 21 ff 98 stwu r1,-104(r1) ffc1bb08: 7c 08 02 a6 mflr r0 ffc1bb0c: 92 a1 00 3c stw r21,60(r1)
Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
ffc1bb10: 3a a1 00 08 addi r21,r1,8 ffc1bb14: 90 01 00 6c stw r0,108(r1)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL;
ffc1bb18: 38 00 00 00 li r0,0 ffc1bb1c: 92 e1 00 44 stw r23,68(r1)
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
ffc1bb20: 3a e1 00 18 addi r23,r1,24 ffc1bb24: 93 41 00 50 stw r26,80(r1) ffc1bb28: 3b 41 00 0c addi r26,r1,12 ffc1bb2c: 93 81 00 58 stw r28,88(r1) ffc1bb30: 3b 81 00 14 addi r28,r1,20 ffc1bb34: 92 81 00 38 stw r20,56(r1) ffc1bb38: 3e 80 00 00 lis r20,0 ffc1bb3c: 3a 94 28 24 addi r20,r20,10276 ffc1bb40: 93 01 00 48 stw r24,72(r1) ffc1bb44: 3f 00 00 00 lis r24,0 ffc1bb48: 3b 18 28 7c addi r24,r24,10364 ffc1bb4c: 93 21 00 4c stw r25,76(r1) ffc1bb50: 3f 20 00 00 lis r25,0 ffc1bb54: 3b 39 28 44 addi r25,r25,10308 ffc1bb58: 93 c1 00 60 stw r30,96(r1)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL;
ffc1bb5c: 90 01 00 18 stw r0,24(r1)
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
ffc1bb60: 93 41 00 08 stw r26,8(r1)
the_chain->permanent_null = NULL;
ffc1bb64: 90 01 00 0c stw r0,12(r1)
the_chain->last = _Chain_Head(the_chain);
ffc1bb68: 92 a1 00 10 stw r21,16(r1)
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
ffc1bb6c: 92 e1 00 14 stw r23,20(r1)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
ffc1bb70: 93 81 00 1c stw r28,28(r1) ffc1bb74: 92 01 00 28 stw r16,40(r1)
static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
ffc1bb78: 3a 03 00 08 addi r16,r3,8
* @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) {
ffc1bb7c: 92 21 00 2c stw r17,44(r1)
static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc1bb80: 3a 23 00 40 addi r17,r3,64
* @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) {
ffc1bb84: 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;
ffc1bb88: 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 ) {
ffc1bb8c: 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;
ffc1bb90: 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 ) {
ffc1bb94: 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;
ffc1bb98: 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 ) {
ffc1bb9c: 93 61 00 54 stw r27,84(r1)
/* * 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 );
ffc1bba0: 3b 63 00 68 addi r27,r3,104
* @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) {
ffc1bba4: 93 a1 00 5c stw r29,92(r1)
*/ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1bba8: 3b a3 00 30 addi r29,r3,48
* @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) {
ffc1bbac: 93 e1 00 64 stw r31,100(r1) ffc1bbb0: 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;
ffc1bbb4: 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 );
ffc1bbb8: 7f a3 eb 78 mr r3,r29 ffc1bbbc: 7f 85 e3 78 mr r5,r28
static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc1bbc0: 80 18 00 00 lwz r0,0(r24)
/* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
ffc1bbc4: 80 9f 00 3c lwz r4,60(r31)
watchdogs->last_snapshot = snapshot;
ffc1bbc8: 90 1f 00 3c stw r0,60(r31)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1bbcc: 7c 84 00 50 subf r4,r4,r0 ffc1bbd0: 48 00 52 ad bl ffc20e7c <_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();
ffc1bbd4: 83 d9 00 00 lwz r30,0(r25)
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
ffc1bbd8: 80 9f 00 74 lwz r4,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 ) {
ffc1bbdc: 7f 9e 20 40 cmplw cr7,r30,r4 ffc1bbe0: 41 9d 00 98 bgt- cr7,ffc1bc78 <_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 ) {
ffc1bbe4: 41 9c 00 a8 blt- cr7,ffc1bc8c <_Timer_server_Body+0x188>
*/ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot;
ffc1bbe8: 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 );
ffc1bbec: 80 7f 00 78 lwz r3,120(r31) ffc1bbf0: 48 00 0b ad bl ffc1c79c <_Chain_Get>
if ( timer == NULL ) {
ffc1bbf4: 2c 03 00 00 cmpwi r3,0 ffc1bbf8: 41 82 00 34 beq- ffc1bc2c <_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 ) {
ffc1bbfc: 80 03 00 38 lwz r0,56(r3) ffc1bc00: 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 ) {
ffc1bc04: 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 ) {
ffc1bc08: 41 9e 00 98 beq- cr7,ffc1bca0 <_Timer_server_Body+0x19c>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc1bc0c: 40 9a ff e0 bne+ cr6,ffc1bbec <_Timer_server_Body+0xe8>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc1bc10: 38 83 00 10 addi r4,r3,16 ffc1bc14: 7f 63 db 78 mr r3,r27 ffc1bc18: 48 00 53 21 bl ffc20f38 <_Watchdog_Insert>
} static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
ffc1bc1c: 80 7f 00 78 lwz r3,120(r31) ffc1bc20: 48 00 0b 7d bl ffc1c79c <_Chain_Get>
if ( timer == NULL ) {
ffc1bc24: 2c 03 00 00 cmpwi r3,0 ffc1bc28: 40 82 ff d4 bne+ ffc1bbfc <_Timer_server_Body+0xf8>
static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile (
ffc1bc2c: 7d 20 00 a6 mfmsr r9 ffc1bc30: 7c 10 42 a6 mfsprg r0,0 ffc1bc34: 7d 20 00 78 andc r0,r9,r0 ffc1bc38: 7c 00 01 24 mtmsr r0
* body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) {
ffc1bc3c: 80 01 00 08 lwz r0,8(r1) ffc1bc40: 7f 9a 00 00 cmpw cr7,r26,r0 ffc1bc44: 41 9e 00 6c beq- cr7,ffc1bcb0 <_Timer_server_Body+0x1ac>
return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile (
ffc1bc48: 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;
ffc1bc4c: 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 );
ffc1bc50: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
ffc1bc54: 80 9f 00 3c lwz r4,60(r31) <== NOT EXECUTED
watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1bc58: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
/* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot;
ffc1bc5c: 90 1f 00 3c stw r0,60(r31) <== NOT EXECUTED
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1bc60: 7c 84 00 50 subf r4,r4,r0 <== NOT EXECUTED ffc1bc64: 48 00 52 19 bl ffc20e7c <_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();
ffc1bc68: 83 d9 00 00 lwz r30,0(r25) <== NOT EXECUTED
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
ffc1bc6c: 80 9f 00 74 lwz r4,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 ) {
ffc1bc70: 7f 9e 20 40 cmplw cr7,r30,r4 <== NOT EXECUTED ffc1bc74: 40 9d ff 70 ble+ cr7,ffc1bbe4 <_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 );
ffc1bc78: 7c 84 f0 50 subf r4,r4,r30 ffc1bc7c: 7f 63 db 78 mr r3,r27 ffc1bc80: 7f 85 e3 78 mr r5,r28 ffc1bc84: 48 00 51 f9 bl ffc20e7c <_Watchdog_Adjust_to_chain> ffc1bc88: 4b ff ff 60 b ffc1bbe8 <_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 );
ffc1bc8c: 7c be 20 50 subf r5,r30,r4 ffc1bc90: 7f 63 db 78 mr r3,r27 ffc1bc94: 38 80 00 01 li r4,1 ffc1bc98: 48 00 50 c5 bl ffc20d5c <_Watchdog_Adjust> ffc1bc9c: 4b ff ff 4c b ffc1bbe8 <_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 );
ffc1bca0: 38 83 00 10 addi r4,r3,16 ffc1bca4: 7f a3 eb 78 mr r3,r29 ffc1bca8: 48 00 52 91 bl ffc20f38 <_Watchdog_Insert> ffc1bcac: 4b ff ff 40 b ffc1bbec <_Timer_server_Body+0xe8>
*/ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL;
ffc1bcb0: 90 7f 00 78 stw r3,120(r31) ffc1bcb4: 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 ) ) {
ffc1bcb8: 80 01 00 14 lwz r0,20(r1) ffc1bcbc: 7f 97 00 00 cmpw cr7,r23,r0 ffc1bcc0: 40 be 00 30 bne+ cr7,ffc1bcf0 <_Timer_server_Body+0x1ec> ffc1bcc4: 48 00 00 50 b ffc1bd14 <_Timer_server_Body+0x210>
{ Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next;
ffc1bcc8: 81 69 00 00 lwz r11,0(r9)
* 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;
ffc1bccc: 92 c9 00 08 stw r22,8(r9)
the_chain->first = new_first;
ffc1bcd0: 91 61 00 14 stw r11,20(r1)
new_first->previous = _Chain_Head(the_chain);
ffc1bcd4: 93 8b 00 04 stw r28,4(r11) ffc1bcd8: 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 );
ffc1bcdc: 80 09 00 1c lwz r0,28(r9) ffc1bce0: 80 89 00 24 lwz r4,36(r9) ffc1bce4: 80 69 00 20 lwz r3,32(r9) ffc1bce8: 7c 09 03 a6 mtctr r0 ffc1bcec: 4e 80 04 21 bctrl
static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile (
ffc1bcf0: 7c 00 00 a6 mfmsr r0 ffc1bcf4: 7d 30 42 a6 mfsprg r9,0 ffc1bcf8: 7c 09 48 78 andc r9,r0,r9 ffc1bcfc: 7d 20 01 24 mtmsr r9
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
ffc1bd00: 81 21 00 14 lwz r9,20(r1)
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain))
ffc1bd04: 7f 97 48 00 cmpw cr7,r23,r9 ffc1bd08: 40 9e ff c0 bne+ cr7,ffc1bcc8 <_Timer_server_Body+0x1c4>
return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile (
ffc1bd0c: 7c 00 01 24 mtmsr r0 ffc1bd10: 4b ff fe a4 b ffc1bbb4 <_Timer_server_Body+0xb0>
} } else { ts->active = false;
ffc1bd14: 9a 5f 00 7c stb r18,124(r31) ffc1bd18: 80 14 00 00 lwz r0,0(r20) ffc1bd1c: 30 00 00 01 addic r0,r0,1 ffc1bd20: 90 14 00 00 stw r0,0(r20)
/* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING );
ffc1bd24: 80 7f 00 00 lwz r3,0(r31) ffc1bd28: 38 80 00 08 li r4,8 ffc1bd2c: 48 00 44 05 bl ffc20130 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc1bd30: 7f e3 fb 78 mr r3,r31 ffc1bd34: 4b ff fc a9 bl ffc1b9dc <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
ffc1bd38: 7f e3 fb 78 mr r3,r31 ffc1bd3c: 4b ff fd 35 bl ffc1ba70 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
ffc1bd40: 48 00 36 9d bl ffc1f3dc <_Thread_Enable_dispatch>
ts->active = true;
ffc1bd44: 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 );
ffc1bd48: 7e 03 83 78 mr r3,r16 ffc1bd4c: 48 00 53 b5 bl ffc21100 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc1bd50: 7e 23 8b 78 mr r3,r17 ffc1bd54: 48 00 53 ad bl ffc21100 <_Watchdog_Remove> ffc1bd58: 4b ff fe 5c b ffc1bbb4 <_Timer_server_Body+0xb0>
ffc472e0 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec )
ffc472e0: 81 63 00 00 lwz r11,0(r3)
bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) {
ffc472e4: 7c 69 1b 78 mr r9,r3
if ( lhs->tv_sec < rhs->tv_sec )
ffc472e8: 80 04 00 00 lwz r0,0(r4) ffc472ec: 38 60 00 01 li r3,1 ffc472f0: 7f 8b 00 00 cmpw cr7,r11,r0 ffc472f4: 4d 9c 00 20 bltlr cr7
return true; if ( lhs->tv_sec > rhs->tv_sec )
ffc472f8: 41 9d 00 1c bgt- cr7,ffc47314 <_Timespec_Less_than+0x34>
#include <rtems/system.h> #include <rtems/score/timespec.h> #include <rtems/score/tod.h> bool _Timespec_Less_than(
ffc472fc: 81 29 00 04 lwz r9,4(r9) ffc47300: 80 04 00 04 lwz r0,4(r4) ffc47304: 7f 89 00 00 cmpw cr7,r9,r0 ffc47308: 7c 60 00 26 mfcr r3 ffc4730c: 54 63 ef fe rlwinm r3,r3,29,31,31
/* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; }
ffc47310: 4e 80 00 20 blr
) { if ( lhs->tv_sec < rhs->tv_sec ) return true; if ( lhs->tv_sec > rhs->tv_sec )
ffc47314: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc47318: 4e 80 00 20 blr <== NOT EXECUTED
ffc0edd4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) {
ffc0edd4: 94 21 ff e0 stwu r1,-32(r1) ffc0edd8: 7c 08 02 a6 mflr r0 ffc0eddc: 90 01 00 24 stw r0,36(r1) ffc0ede0: 93 c1 00 18 stw r30,24(r1) ffc0ede4: 7c be 2b 78 mr r30,r5 ffc0ede8: 93 e1 00 1c stw r31,28(r1) ffc0edec: 7c 7f 1b 78 mr r31,r3 ffc0edf0: 93 61 00 0c stw r27,12(r1) ffc0edf4: 93 81 00 10 stw r28,16(r1) ffc0edf8: 93 a1 00 14 stw r29,20(r1)
static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile (
ffc0edfc: 7c 00 00 a6 mfmsr r0 ffc0ee00: 7d 30 42 a6 mfsprg r9,0 ffc0ee04: 7c 09 48 78 andc r9,r0,r9 ffc0ee08: 7d 20 01 24 mtmsr r9
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
ffc0ee0c: 81 23 00 00 lwz r9,0(r3)
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
ffc0ee10: 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 ) ) {
ffc0ee14: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0ee18: 41 9e 00 6c beq- cr7,ffc0ee84 <_Watchdog_Adjust+0xb0>
switch ( direction ) {
ffc0ee1c: 2f 84 00 00 cmpwi cr7,r4,0 ffc0ee20: 40 9e 00 8c bne- cr7,ffc0eeac <_Watchdog_Adjust+0xd8>
case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) {
ffc0ee24: 2f 85 00 00 cmpwi cr7,r5,0 ffc0ee28: 41 9e 00 5c beq- cr7,ffc0ee84 <_Watchdog_Adjust+0xb0>
if ( units < _Watchdog_First( header )->delta_interval ) {
ffc0ee2c: 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;
ffc0ee30: 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 ) {
ffc0ee34: 7f 85 e8 40 cmplw cr7,r5,r29 ffc0ee38: 40 bc 00 18 bge+ cr7,ffc0ee50 <_Watchdog_Adjust+0x7c>
ffc0ee3c: 48 00 00 ac b ffc0eee8 <_Watchdog_Adjust+0x114> <== NOT EXECUTED
switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) {
ffc0ee40: 41 82 00 44 beq- ffc0ee84 <_Watchdog_Adjust+0xb0>
if ( units < _Watchdog_First( header )->delta_interval ) {
ffc0ee44: 83 a9 00 10 lwz r29,16(r9) ffc0ee48: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0ee4c: 41 9d 00 9c bgt- cr7,ffc0eee8 <_Watchdog_Adjust+0x114>
_Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1;
ffc0ee50: 93 69 00 10 stw r27,16(r9)
return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile (
ffc0ee54: 7c 00 01 24 mtmsr r0
_ISR_Enable( level ); _Watchdog_Tickle( header );
ffc0ee58: 7f e3 fb 78 mr r3,r31 ffc0ee5c: 48 00 03 31 bl ffc0f18c <_Watchdog_Tickle>
static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile (
ffc0ee60: 7c 00 00 a6 mfmsr r0 ffc0ee64: 7d 30 42 a6 mfsprg r9,0 ffc0ee68: 7c 09 48 78 andc r9,r0,r9 ffc0ee6c: 7d 20 01 24 mtmsr r9
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
ffc0ee70: 81 7f 00 00 lwz r11,0(r31)
switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) {
ffc0ee74: 7f dd f0 51 subf. r30,r29,r30
_Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) )
ffc0ee78: 7f 9c 58 00 cmpw cr7,r28,r11
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first );
ffc0ee7c: 7d 69 5b 78 mr r9,r11 ffc0ee80: 40 9e ff c0 bne+ cr7,ffc0ee40 <_Watchdog_Adjust+0x6c>
return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile (
ffc0ee84: 7c 00 01 24 mtmsr r0
} } _ISR_Enable( level ); }
ffc0ee88: 80 01 00 24 lwz r0,36(r1) ffc0ee8c: 83 61 00 0c lwz r27,12(r1) ffc0ee90: 7c 08 03 a6 mtlr r0 ffc0ee94: 83 81 00 10 lwz r28,16(r1) ffc0ee98: 83 a1 00 14 lwz r29,20(r1) ffc0ee9c: 83 c1 00 18 lwz r30,24(r1) ffc0eea0: 83 e1 00 1c lwz r31,28(r1) ffc0eea4: 38 21 00 20 addi r1,r1,32 ffc0eea8: 4e 80 00 20 blr
* unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) {
ffc0eeac: 2f 84 00 01 cmpwi cr7,r4,1 ffc0eeb0: 40 9e ff d4 bne+ cr7,ffc0ee84 <_Watchdog_Adjust+0xb0>
case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units;
ffc0eeb4: 81 69 00 10 lwz r11,16(r9) ffc0eeb8: 7f cb 2a 14 add r30,r11,r5 ffc0eebc: 93 c9 00 10 stw r30,16(r9) ffc0eec0: 7c 00 01 24 mtmsr r0
} } _ISR_Enable( level ); }
ffc0eec4: 80 01 00 24 lwz r0,36(r1) ffc0eec8: 83 61 00 0c lwz r27,12(r1) ffc0eecc: 7c 08 03 a6 mtlr r0 ffc0eed0: 83 81 00 10 lwz r28,16(r1) ffc0eed4: 83 a1 00 14 lwz r29,20(r1) ffc0eed8: 83 c1 00 18 lwz r30,24(r1) ffc0eedc: 83 e1 00 1c lwz r31,28(r1) ffc0eee0: 38 21 00 20 addi r1,r1,32 ffc0eee4: 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;
ffc0eee8: 7f de e8 50 subf r30,r30,r29 ffc0eeec: 93 c9 00 10 stw r30,16(r9)
break;
ffc0eef0: 4b ff ff 94 b ffc0ee84 <_Watchdog_Adjust+0xb0>
ffc0b09c <rtems_io_register_driver>: rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) {
ffc0b09c: 94 21 ff f0 stwu r1,-16(r1) ffc0b0a0: 7c 08 02 a6 mflr r0
rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() )
ffc0b0a4: 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 ) {
ffc0b0a8: 90 01 00 14 stw r0,20(r1)
rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() )
ffc0b0ac: 80 09 27 74 lwz r0,10100(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;
ffc0b0b0: 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 ) {
ffc0b0b4: 93 e1 00 0c stw r31,12(r1) ffc0b0b8: 7c 7f 1b 78 mr r31,r3
rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() )
ffc0b0bc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b0c0: 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;
ffc0b0c4: 80 09 27 c0 lwz r0,10176(r9)
if ( rtems_interrupt_is_in_progress() )
ffc0b0c8: 40 9e 00 e8 bne- cr7,ffc0b1b0 <rtems_io_register_driver+0x114>
return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL )
ffc0b0cc: 2f 85 00 00 cmpwi cr7,r5,0 ffc0b0d0: 41 9e 01 38 beq- cr7,ffc0b208 <rtems_io_register_driver+0x16c>
return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL )
ffc0b0d4: 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;
ffc0b0d8: 90 05 00 00 stw r0,0(r5)
if ( driver_table == NULL )
ffc0b0dc: 41 9e 01 2c beq- cr7,ffc0b208 <rtems_io_register_driver+0x16c>
static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0b0e0: 81 64 00 00 lwz r11,0(r4) ffc0b0e4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b0e8: 41 9e 01 14 beq- cr7,ffc0b1fc <rtems_io_register_driver+0x160>
return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit )
ffc0b0ec: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0b0f0: 38 60 00 0a li r3,10 ffc0b0f4: 40 9d 00 bc ble- cr7,ffc0b1b0 <rtems_io_register_driver+0x114>
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
ffc0b0f8: 3d 60 00 00 lis r11,0 ffc0b0fc: 81 4b 27 4c lwz r10,10060(r11) ffc0b100: 38 0a 00 01 addi r0,r10,1 ffc0b104: 90 0b 27 4c stw r0,10060(r11)
return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) {
ffc0b108: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0b10c: 40 9e 00 b8 bne- cr7,ffc0b1c4 <rtems_io_register_driver+0x128>
static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers;
ffc0b110: 81 69 27 c0 lwz r11,10176(r9)
rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) {
ffc0b114: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b118: 41 9e 01 08 beq- cr7,ffc0b220 <rtems_io_register_driver+0x184> ffc0b11c: 3d 20 00 00 lis r9,0 ffc0b120: 7d 69 03 a6 mtctr r11 ffc0b124: 81 49 27 c4 lwz r10,10180(r9) ffc0b128: 7d 49 53 78 mr r9,r10 ffc0b12c: 40 be 00 14 bne+ cr7,ffc0b140 <rtems_io_register_driver+0xa4>
ffc0b130: 48 00 01 14 b ffc0b244 <rtems_io_register_driver+0x1a8><== NOT EXECUTED
ffc0b134: 3b ff 00 01 addi r31,r31,1 ffc0b138: 39 29 00 18 addi r9,r9,24 ffc0b13c: 42 40 00 1c bdz- ffc0b158 <rtems_io_register_driver+0xbc>
static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0b140: 80 09 00 00 lwz r0,0(r9) ffc0b144: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b148: 40 9e ff ec bne+ cr7,ffc0b134 <rtems_io_register_driver+0x98> ffc0b14c: 80 09 00 04 lwz r0,4(r9) ffc0b150: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b154: 40 9e ff e0 bne+ cr7,ffc0b134 <rtems_io_register_driver+0x98>
} /* Assigns invalid value in case of failure */ *major = m; if ( m != n )
ffc0b158: 7f 8b f8 00 cmpw cr7,r11,r31
if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m;
ffc0b15c: 93 e5 00 00 stw r31,0(r5)
if ( m != n )
ffc0b160: 41 9e 00 c4 beq- cr7,ffc0b224 <rtems_io_register_driver+0x188> ffc0b164: 1d 3f 00 18 mulli r9,r31,24 ffc0b168: 7d 2a 4a 14 add r9,r10,r9
} *registered_major = major; } _IO_Driver_address_table [major] = *driver_table;
ffc0b16c: 81 64 00 08 lwz r11,8(r4) ffc0b170: 80 04 00 0c lwz r0,12(r4) ffc0b174: 81 04 00 00 lwz r8,0(r4) ffc0b178: 81 44 00 04 lwz r10,4(r4) ffc0b17c: 91 09 00 00 stw r8,0(r9) ffc0b180: 91 49 00 04 stw r10,4(r9) ffc0b184: 91 69 00 08 stw r11,8(r9) ffc0b188: 90 09 00 0c stw r0,12(r9) ffc0b18c: 81 64 00 14 lwz r11,20(r4) ffc0b190: 80 04 00 10 lwz r0,16(r4) ffc0b194: 91 69 00 14 stw r11,20(r9) ffc0b198: 90 09 00 10 stw r0,16(r9)
_Thread_Enable_dispatch();
ffc0b19c: 48 00 21 95 bl ffc0d330 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
ffc0b1a0: 7f e3 fb 78 mr r3,r31 ffc0b1a4: 38 80 00 00 li r4,0 ffc0b1a8: 38 a0 00 00 li r5,0 ffc0b1ac: 48 00 a3 9d bl ffc15548 <rtems_io_initialize>
}
ffc0b1b0: 80 01 00 14 lwz r0,20(r1) ffc0b1b4: 83 e1 00 0c lwz r31,12(r1) ffc0b1b8: 38 21 00 10 addi r1,r1,16 ffc0b1bc: 7c 08 03 a6 mtlr r0 ffc0b1c0: 4e 80 00 20 blr
_Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major;
ffc0b1c4: 3d 20 00 00 lis r9,0 ffc0b1c8: 81 29 27 c4 lwz r9,10180(r9) ffc0b1cc: 1c 1f 00 18 mulli r0,r31,24
static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0b1d0: 7d 69 00 2e lwzx r11,r9,r0
_Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major;
ffc0b1d4: 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;
ffc0b1d8: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b1dc: 41 9e 00 54 beq- cr7,ffc0b230 <rtems_io_register_driver+0x194>
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();
ffc0b1e0: 48 00 21 51 bl ffc0d330 <_Thread_Enable_dispatch>
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); }
ffc0b1e4: 80 01 00 14 lwz r0,20(r1)
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();
ffc0b1e8: 38 60 00 0c li r3,12
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); }
ffc0b1ec: 83 e1 00 0c lwz r31,12(r1) ffc0b1f0: 7c 08 03 a6 mtlr r0 ffc0b1f4: 38 21 00 10 addi r1,r1,16 ffc0b1f8: 4e 80 00 20 blr
static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0b1fc: 81 64 00 04 lwz r11,4(r4) ffc0b200: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b204: 40 9e fe e8 bne+ cr7,ffc0b0ec <rtems_io_register_driver+0x50>
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); }
ffc0b208: 80 01 00 14 lwz r0,20(r1)
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL );
ffc0b20c: 38 60 00 09 li r3,9
}
ffc0b210: 83 e1 00 0c lwz r31,12(r1) ffc0b214: 38 21 00 10 addi r1,r1,16 ffc0b218: 7c 08 03 a6 mtlr r0 ffc0b21c: 4e 80 00 20 blr
if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m;
ffc0b220: 93 e5 00 00 stw r31,0(r5) <== NOT EXECUTED
if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch();
ffc0b224: 48 00 21 0d bl ffc0d330 <_Thread_Enable_dispatch> ffc0b228: 38 60 00 05 li r3,5
return sc;
ffc0b22c: 4b ff ff 84 b ffc0b1b0 <rtems_io_register_driver+0x114>
static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0b230: 80 09 00 04 lwz r0,4(r9) ffc0b234: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b238: 40 9e ff a8 bne+ cr7,ffc0b1e0 <rtems_io_register_driver+0x144>
if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major;
ffc0b23c: 93 e5 00 00 stw r31,0(r5) ffc0b240: 4b ff ff 2c b ffc0b16c <rtems_io_register_driver+0xd0>
ffc0b244: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0b248: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0b24c: 4b ff fe f4 b ffc0b140 <rtems_io_register_driver+0xa4><== NOT EXECUTED
ffc468e0 <rtems_rate_monotonic_period>: rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) {
ffc468e0: 94 21 ff d0 stwu r1,-48(r1) ffc468e4: 7c 08 02 a6 mflr r0 ffc468e8: 93 e1 00 2c stw r31,44(r1) ffc468ec: 7c 7f 1b 78 mr r31,r3 ffc468f0: 3c 60 00 00 lis r3,0 ffc468f4: 93 c1 00 28 stw r30,40(r1) ffc468f8: 38 63 68 c4 addi r3,r3,26820 ffc468fc: 7c 9e 23 78 mr r30,r4 ffc46900: 38 a1 00 08 addi r5,r1,8 ffc46904: 90 01 00 34 stw r0,52(r1) ffc46908: 7f e4 fb 78 mr r4,r31 ffc4690c: 93 a1 00 24 stw r29,36(r1) ffc46910: 93 61 00 1c stw r27,28(r1) ffc46914: 93 81 00 20 stw r28,32(r1) ffc46918: 4b fc 82 f1 bl ffc0ec08 <_Objects_Get> ffc4691c: 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 ) {
ffc46920: 80 01 00 08 lwz r0,8(r1) ffc46924: 2f 80 00 00 cmpwi cr7,r0,0 ffc46928: 40 9e 00 48 bne- cr7,ffc46970 <rtems_rate_monotonic_period+0x90>
case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) {
ffc4692c: 3f 80 00 00 lis r28,0 ffc46930: 81 23 00 40 lwz r9,64(r3) ffc46934: 80 1c 36 14 lwz r0,13844(r28) ffc46938: 7f 89 00 00 cmpw cr7,r9,r0 ffc4693c: 41 9e 00 60 beq- cr7,ffc4699c <rtems_rate_monotonic_period+0xbc>
_Thread_Enable_dispatch();
ffc46940: 4b fc 8f 81 bl ffc0f8c0 <_Thread_Enable_dispatch> ffc46944: 3b e0 00 17 li r31,23
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
ffc46948: 80 01 00 34 lwz r0,52(r1) ffc4694c: 7f e3 fb 78 mr r3,r31 ffc46950: 83 61 00 1c lwz r27,28(r1) ffc46954: 7c 08 03 a6 mtlr r0 ffc46958: 83 81 00 20 lwz r28,32(r1) ffc4695c: 83 a1 00 24 lwz r29,36(r1) ffc46960: 83 c1 00 28 lwz r30,40(r1) ffc46964: 83 e1 00 2c lwz r31,44(r1) ffc46968: 38 21 00 30 addi r1,r1,48 ffc4696c: 4e 80 00 20 blr ffc46970: 80 01 00 34 lwz r0,52(r1)
the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT;
ffc46974: 3b e0 00 04 li r31,4
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
ffc46978: 7f e3 fb 78 mr r3,r31 ffc4697c: 83 61 00 1c lwz r27,28(r1) ffc46980: 7c 08 03 a6 mtlr r0 ffc46984: 83 81 00 20 lwz r28,32(r1) ffc46988: 83 a1 00 24 lwz r29,36(r1) ffc4698c: 83 c1 00 28 lwz r30,40(r1) ffc46990: 83 e1 00 2c lwz r31,44(r1) ffc46994: 38 21 00 30 addi r1,r1,48 ffc46998: 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 ) {
ffc4699c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc469a0: 41 9e 00 b4 beq- cr7,ffc46a54 <rtems_rate_monotonic_period+0x174>
static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile (
ffc469a4: 7f 60 00 a6 mfmsr r27 ffc469a8: 7c 10 42 a6 mfsprg r0,0 ffc469ac: 7f 60 00 78 andc r0,r27,r0 ffc469b0: 7c 00 01 24 mtmsr r0
_Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); switch ( the_period->state ) {
ffc469b4: 80 03 00 38 lwz r0,56(r3) ffc469b8: 2f 80 00 02 cmpwi cr7,r0,2 ffc469bc: 41 9e 00 c0 beq- cr7,ffc46a7c <rtems_rate_monotonic_period+0x19c> ffc469c0: 2f 80 00 04 cmpwi cr7,r0,4 ffc469c4: 41 9e 00 5c beq- cr7,ffc46a20 <rtems_rate_monotonic_period+0x140> ffc469c8: 2f 80 00 00 cmpwi cr7,r0,0 ffc469cc: 40 be ff a4 bne- cr7,ffc46970 <rtems_rate_monotonic_period+0x90>
return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile (
ffc469d0: 7f 60 01 24 mtmsr r27
_ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period );
ffc469d4: 4b ff fc 1d bl ffc465f0 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc469d8: 39 20 00 02 li r9,2 ffc469dc: 91 3d 00 38 stw r9,56(r29)
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
ffc469e0: 3d 20 ff c4 lis r9,-60
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
ffc469e4: 38 00 00 00 li r0,0
the_watchdog->routine = routine;
ffc469e8: 39 29 6a ec addi r9,r9,27372
the_watchdog->id = id;
ffc469ec: 93 fd 00 30 stw r31,48(r29)
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc469f0: 3c 60 00 00 lis r3,0
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
ffc469f4: 91 3d 00 2c stw r9,44(r29)
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc469f8: 38 63 65 68 addi r3,r3,25960 ffc469fc: 38 9d 00 10 addi r4,r29,16
) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
ffc46a00: 90 1d 00 34 stw r0,52(r29)
); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch();
ffc46a04: 3b e0 00 00 li r31,0
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
ffc46a08: 93 dd 00 1c stw r30,28(r29)
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
ffc46a0c: 90 1d 00 18 stw r0,24(r29)
_Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length;
ffc46a10: 93 dd 00 3c stw r30,60(r29)
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc46a14: 4b fc a5 61 bl ffc10f74 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch();
ffc46a18: 4b fc 8e a9 bl ffc0f8c0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc46a1c: 4b ff ff 2c b ffc46948 <rtems_rate_monotonic_period+0x68>
case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period );
ffc46a20: 4b ff fd 79 bl ffc46798 <_Rate_monotonic_Update_statistics> ffc46a24: 7f 60 01 24 mtmsr r27
_ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE;
ffc46a28: 38 00 00 02 li r0,2
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
ffc46a2c: 93 dd 00 1c stw r30,28(r29)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc46a30: 3c 60 00 00 lis r3,0 ffc46a34: 90 1d 00 38 stw r0,56(r29) ffc46a38: 38 63 65 68 addi r3,r3,25960 ffc46a3c: 38 9d 00 10 addi r4,r29,16
the_period->next_length = length;
ffc46a40: 93 dd 00 3c stw r30,60(r29)
_Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch();
ffc46a44: 3b e0 00 06 li r31,6 ffc46a48: 4b fc a5 2d bl ffc10f74 <_Watchdog_Insert> ffc46a4c: 4b fc 8e 75 bl ffc0f8c0 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
ffc46a50: 4b ff fe f8 b ffc46948 <rtems_rate_monotonic_period+0x68>
_Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) {
ffc46a54: 80 03 00 38 lwz r0,56(r3) ffc46a58: 3b e0 00 00 li r31,0 ffc46a5c: 2b 80 00 04 cmplwi cr7,r0,4 ffc46a60: 41 bd ff b8 bgt- cr7,ffc46a18 <rtems_rate_monotonic_period+0x138> ffc46a64: 3d 20 ff c7 lis r9,-57 ffc46a68: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc46a6c: 39 29 24 80 addi r9,r9,9344 ffc46a70: 7f e9 00 2e lwzx r31,r9,r0
); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch();
ffc46a74: 4b fc 8e 4d bl ffc0f8c0 <_Thread_Enable_dispatch> ffc46a78: 4b ff fe d0 b ffc46948 <rtems_rate_monotonic_period+0x68>
case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period );
ffc46a7c: 4b ff fd 1d bl ffc46798 <_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;
ffc46a80: 38 00 00 01 li r0,1
the_period->next_length = length;
ffc46a84: 93 dd 00 3c stw r30,60(r29)
/* * 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;
ffc46a88: 90 1d 00 38 stw r0,56(r29) ffc46a8c: 7f 60 01 24 mtmsr r27
the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id;
ffc46a90: 81 3c 36 14 lwz r9,13844(r28)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc46a94: 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;
ffc46a98: 80 1d 00 08 lwz r0,8(r29)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc46a9c: 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;
ffc46aa0: 90 09 00 20 stw r0,32(r9)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc46aa4: 4b fc 99 a5 bl ffc10448 <_Thread_Set_state>
static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile (
ffc46aa8: 7d 20 00 a6 mfmsr r9 ffc46aac: 7c 10 42 a6 mfsprg r0,0 ffc46ab0: 7d 20 00 78 andc r0,r9,r0 ffc46ab4: 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;
ffc46ab8: 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;
ffc46abc: 80 1d 00 38 lwz r0,56(r29)
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc46ac0: 91 7d 00 38 stw r11,56(r29)
return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile (
ffc46ac4: 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 )
ffc46ac8: 2f 80 00 03 cmpwi cr7,r0,3 ffc46acc: 41 9e 00 10 beq- cr7,ffc46adc <rtems_rate_monotonic_period+0x1fc>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch();
ffc46ad0: 4b fc 8d f1 bl ffc0f8c0 <_Thread_Enable_dispatch> ffc46ad4: 3b e0 00 00 li r31,0
return RTEMS_SUCCESSFUL;
ffc46ad8: 4b ff fe 70 b ffc46948 <rtems_rate_monotonic_period+0x68>
/* * 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 );
ffc46adc: 80 7c 36 14 lwz r3,13844(r28) <== NOT EXECUTED ffc46ae0: 38 80 40 00 li r4,16384 <== NOT EXECUTED ffc46ae4: 4b fc 88 c9 bl ffc0f3ac <_Thread_Clear_state> <== NOT EXECUTED ffc46ae8: 4b ff ff e8 b ffc46ad0 <rtems_rate_monotonic_period+0x1f0><== NOT EXECUTED