ffc0ff80 : #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { ffc0ff80: 3d 20 00 00 lis r9,0 ffc0ff84: 80 09 20 c4 lwz r0,8388(r9) return (microseconds / rtems_configuration_get_microseconds_per_tick()); } ffc0ff88: 7c 63 03 96 divwu r3,r3,r0 ffc0ff8c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09d24 : #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { ffc09d24: 3d 20 00 00 lis r9,0 ffc09d28: 81 29 20 ac lwz r9,8364(r9) ffc09d2c: 38 00 03 e8 li r0,1000 ffc09d30: 7c 09 03 96 divwu r0,r9,r0 return (milliseconds / rtems_configuration_get_milliseconds_per_tick()); } ffc09d34: 7c 63 03 96 divwu r3,r3,r0 ffc09d38: 4e 80 00 20 blr <== ALWAYS TAKEN ffc29d80 : #include #include #include uint32_t TOD_TICKS_PER_SECOND_method(void) { ffc29d80: 3d 20 00 00 lis r9,0 ffc29d84: 80 09 20 ac lwz r0,8364(r9) ffc29d88: 3c 60 00 0f lis r3,15 ffc29d8c: 60 63 42 40 ori r3,r3,16960 return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); } ffc29d90: 7c 63 03 96 divwu r3,r3,r0 ffc29d94: 4e 80 00 20 blr <== ALWAYS TAKEN ffc086cc <_API_Mutex_Allocate>: #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { ffc086cc: 94 21 ff d8 stwu r1,-40(r1) ffc086d0: 7c 08 02 a6 mflr r0 CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; ffc086d4: 3d 60 ff c2 lis r11,-62 #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { ffc086d8: 93 c1 00 20 stw r30,32(r1) CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; ffc086dc: 39 2b c7 10 addi r9,r11,-14576 mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information ); ffc086e0: 3f c0 00 00 lis r30,0 CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; ffc086e4: 81 4b c7 10 lwz r10,-14576(r11) mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information ); ffc086e8: 3b de 2c b4 addi r30,r30,11444 CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; ffc086ec: 81 69 00 04 lwz r11,4(r9) #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { ffc086f0: 90 01 00 2c stw r0,44(r1) CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; ffc086f4: 80 09 00 0c lwz r0,12(r9) ffc086f8: 81 29 00 08 lwz r9,8(r9) #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { ffc086fc: 93 a1 00 1c stw r29,28(r1) ffc08700: 7c 7d 1b 78 mr r29,r3 false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information ); ffc08704: 7f c3 f3 78 mr r3,r30 CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; ffc08708: 91 21 00 10 stw r9,16(r1) ffc0870c: 90 01 00 14 stw r0,20(r1) #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { ffc08710: 93 e1 00 24 stw r31,36(r1) CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; ffc08714: 91 41 00 08 stw r10,8(r1) <== ALWAYS TAKEN ffc08718: 91 61 00 0c stw r11,12(r1) mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information ); ffc0871c: 48 00 0b 19 bl ffc09234 <_Objects_Allocate> <== ALWAYS TAKEN ffc08720: 7c 7f 1b 78 mr r31,r3 _CORE_mutex_Initialize( &mutex->Mutex, &attr, CORE_MUTEX_UNLOCKED ); ffc08724: 38 81 00 08 addi r4,r1,8 <== ALWAYS TAKEN ffc08728: 38 63 00 10 addi r3,r3,16 <== ALWAYS TAKEN ffc0872c: 38 a0 00 01 li r5,1 ffc08730: 48 00 01 8d bl ffc088bc <_CORE_mutex_Initialize> <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc08734: a0 1f 00 0a lhz r0,10(r31) ffc08738: 81 3e 00 1c lwz r9,28(r30) ffc0873c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc08740: 7f e9 01 2e stwx r31,r9,r0 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; ffc08744: 38 00 00 01 li r0,1 ffc08748: 90 1f 00 0c stw r0,12(r31) _Objects_Open_u32( &_API_Mutex_Information, &mutex->Object, 1 ); *the_mutex = mutex; } ffc0874c: 80 01 00 2c lwz r0,44(r1) _CORE_mutex_Initialize( &mutex->Mutex, &attr, CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_API_Mutex_Information, &mutex->Object, 1 ); *the_mutex = mutex; ffc08750: 93 fd 00 00 stw r31,0(r29) } ffc08754: 7c 08 03 a6 mtlr r0 ffc08758: 83 a1 00 1c lwz r29,28(r1) ffc0875c: 83 c1 00 20 lwz r30,32(r1) ffc08760: 83 e1 00 24 lwz r31,36(r1) ffc08764: 38 21 00 28 addi r1,r1,40 ffc08768: 4e 80 00 20 blr <== ALWAYS TAKEN ffc087ac <_API_Mutex_Initialization>: #include void _API_Mutex_Initialization( uint32_t maximum_mutexes ) { ffc087ac: 94 21 ff f8 stwu r1,-8(r1) <== ALWAYS TAKEN ffc087b0: 7c 08 02 a6 mflr r0 ffc087b4: 7c 66 1b 78 mr r6,r3 _Objects_Initialize_information( ffc087b8: 3c 60 00 00 lis r3,0 #include void _API_Mutex_Initialization( uint32_t maximum_mutexes ) { ffc087bc: 90 01 00 0c stw r0,12(r1) <== ALWAYS TAKEN _Objects_Initialize_information( ffc087c0: 38 63 2c b4 addi r3,r3,11444 <== ALWAYS TAKEN ffc087c4: 38 80 00 01 li r4,1 ffc087c8: 38 a0 00 02 li r5,2 ffc087cc: 38 e0 00 74 li r7,116 ffc087d0: 39 00 00 00 li r8,0 ffc087d4: 39 20 00 00 li r9,0 ffc087d8: 48 00 10 99 bl ffc09870 <_Objects_Initialize_information> <== ALWAYS TAKEN , true, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc087dc: 80 01 00 0c lwz r0,12(r1) ffc087e0: 38 21 00 08 addi r1,r1,8 <== ALWAYS TAKEN ffc087e4: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc087e8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0876c <_API_Mutex_Lock>: #include void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) { ffc0876c: 94 21 ff f8 stwu r1,-8(r1) ffc08770: 7c 08 02 a6 mflr r0 ffc08774: 90 01 00 0c stw r0,12(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08778: 7c e0 00 a6 mfmsr r7 ffc0877c: 7c 10 42 a6 mfsprg r0,0 <== ALWAYS TAKEN ffc08780: 7c e0 00 78 andc r0,r7,r0 ffc08784: 7c 00 01 24 mtmsr r0 ISR_Level level; _ISR_Disable( level ); _CORE_mutex_Seize( ffc08788: 80 83 00 08 lwz r4,8(r3) ffc0878c: 38 a0 00 01 li r5,1 ffc08790: 38 63 00 10 addi r3,r3,16 ffc08794: 38 c0 00 00 li r6,0 ffc08798: 48 00 02 7d bl ffc08a14 <_CORE_mutex_Seize> <== ALWAYS TAKEN the_mutex->Object.id, true, 0, level ); } ffc0879c: 80 01 00 0c lwz r0,12(r1) ffc087a0: 38 21 00 08 addi r1,r1,8 ffc087a4: 7c 08 03 a6 mtlr r0 ffc087a8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc087ec <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { ffc087ec: 94 21 ff f8 stwu r1,-8(r1) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc087f0: 3d 20 00 00 lis r9,0 ffc087f4: 7c 08 02 a6 mflr r0 ffc087f8: 81 69 27 2c lwz r11,10028(r9) ffc087fc: 90 01 00 0c stw r0,12(r1) ffc08800: 39 6b 00 01 addi r11,r11,1 ffc08804: 91 69 27 2c stw r11,10028(r9) _Thread_Disable_dispatch(); _CORE_mutex_Surrender( ffc08808: 80 83 00 08 lwz r4,8(r3) ffc0880c: 38 a0 00 00 li r5,0 ffc08810: 38 63 00 10 addi r3,r3,16 ffc08814: 48 00 02 f9 bl ffc08b0c <_CORE_mutex_Surrender> <== ALWAYS TAKEN &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); ffc08818: 48 00 1a 95 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN } ffc0881c: 80 01 00 0c lwz r0,12(r1) ffc08820: 38 21 00 08 addi r1,r1,8 ffc08824: 7c 08 03 a6 mtlr r0 ffc08828: 4e 80 00 20 blr <== ALWAYS TAKEN ffc086a0 <_API_extensions_Add>: */ void _API_extensions_Add( API_extensions_Control *the_extension ) { ffc086a0: 94 21 ff f8 stwu r1,-8(r1) ffc086a4: 7c 08 02 a6 mflr r0 ffc086a8: 7c 64 1b 78 mr r4,r3 _Chain_Append( &_API_extensions_List, &the_extension->Node ); ffc086ac: 3c 60 00 00 lis r3,0 */ void _API_extensions_Add( API_extensions_Control *the_extension ) { ffc086b0: 90 01 00 0c stw r0,12(r1) _Chain_Append( &_API_extensions_List, &the_extension->Node ); ffc086b4: 38 63 2d 8c addi r3,r3,11660 <== ALWAYS TAKEN ffc086b8: 48 00 01 75 bl ffc0882c <_Chain_Append> <== ALWAYS TAKEN } ffc086bc: 80 01 00 0c lwz r0,12(r1) ffc086c0: 38 21 00 08 addi r1,r1,8 <== ALWAYS TAKEN ffc086c4: 7c 08 03 a6 mtlr r0 ffc086c8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc085bc <_API_extensions_Initialization>: */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc085bc: 3d 60 00 00 lis r11,0 ffc085c0: 39 2b 2d 8c addi r9,r11,11660 ffc085c4: 38 09 00 04 addi r0,r9,4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc085c8: 91 29 00 08 stw r9,8(r9) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc085cc: 90 0b 2d 8c stw r0,11660(r11) <== ALWAYS TAKEN the_chain->permanent_null = NULL; ffc085d0: 38 00 00 00 li r0,0 ffc085d4: 90 09 00 04 stw r0,4(r9) */ void _API_extensions_Initialization( void ) { _Chain_Initialize_empty( &_API_extensions_List ); } ffc085d8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc085dc <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc085dc: 94 21 ff f0 stwu r1,-16(r1) ffc085e0: 7c 08 02 a6 mflr r0 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc085e4: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc085e8: 93 c1 00 08 stw r30,8(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc085ec: 3f c0 00 00 lis r30,0 <== ALWAYS TAKEN ffc085f0: 3b de 2d 90 addi r30,r30,11664 ffc085f4: 93 e1 00 0c stw r31,12(r1) ffc085f8: 90 01 00 14 stw r0,20(r1) <== ALWAYS TAKEN Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc085fc: 83 e9 2d 8c lwz r31,11660(r9) ffc08600: 48 00 00 14 b ffc08614 <_API_extensions_Run_postdriver+0x38> <== ALWAYS TAKEN * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); ffc08604: 80 1f 00 08 lwz r0,8(r31) ffc08608: 7c 09 03 a6 mtctr r0 ffc0860c: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { ffc08610: 83 ff 00 00 lwz r31,0(r31) ffc08614: 7f 9f f0 00 cmpw cr7,r31,r30 ffc08618: 40 9e ff ec bne+ cr7,ffc08604 <_API_extensions_Run_postdriver+0x28> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } ffc0861c: 80 01 00 14 lwz r0,20(r1) ffc08620: 83 c1 00 08 lwz r30,8(r1) <== ALWAYS TAKEN ffc08624: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc08628: 83 e1 00 0c lwz r31,12(r1) ffc0862c: 38 21 00 10 addi r1,r1,16 ffc08630: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08634 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc08634: 94 21 ff e8 stwu r1,-24(r1) ffc08638: 7c 08 02 a6 mflr r0 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc0863c: 3d 20 00 00 lis r9,0 * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc08640: 93 a1 00 0c stw r29,12(r1) ffc08644: 3f a0 00 00 lis r29,0 ffc08648: 3b bd 2d 90 addi r29,r29,11664 ffc0864c: 93 c1 00 10 stw r30,16(r1) * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); ffc08650: 3f c0 00 00 lis r30,0 ffc08654: 3b de 27 6c addi r30,r30,10092 * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc08658: 93 e1 00 14 stw r31,20(r1) ffc0865c: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc08660: 83 e9 2d 8c lwz r31,11660(r9) ffc08664: 48 00 00 18 b ffc0867c <_API_extensions_Run_postswitch+0x48> <== ALWAYS TAKEN * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); ffc08668: 80 1f 00 0c lwz r0,12(r31) ffc0866c: 80 7e 00 00 lwz r3,0(r30) ffc08670: 7c 09 03 a6 mtctr r0 ffc08674: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { ffc08678: 83 ff 00 00 lwz r31,0(r31) ffc0867c: 7f 9f e8 00 cmpw cr7,r31,r29 ffc08680: 40 9e ff e8 bne+ cr7,ffc08668 <_API_extensions_Run_postswitch+0x34> #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc08684: 80 01 00 1c lwz r0,28(r1) ffc08688: 83 a1 00 0c lwz r29,12(r1) ffc0868c: 7c 08 03 a6 mtlr r0 ffc08690: 83 c1 00 10 lwz r30,16(r1) ffc08694: 83 e1 00 14 lwz r31,20(r1) ffc08698: 38 21 00 18 addi r1,r1,24 ffc0869c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d370 <_Barrier_Manager_initialization>: * Output parameters: NONE */ void _Barrier_Manager_initialization(void) { _Objects_Initialize_information( ffc0d370: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Barrier_Manager_initialization(void) { ffc0d374: 94 21 ff f8 stwu r1,-8(r1) ffc0d378: 7c 08 02 a6 mflr r0 _Objects_Initialize_information( ffc0d37c: 3c 60 00 00 lis r3,0 ffc0d380: 80 c9 20 94 lwz r6,8340(r9) <== ALWAYS TAKEN ffc0d384: 38 63 2e 04 addi r3,r3,11780 ffc0d388: 38 80 00 02 li r4,2 * * Output parameters: NONE */ void _Barrier_Manager_initialization(void) { ffc0d38c: 90 01 00 0c stw r0,12(r1) _Objects_Initialize_information( ffc0d390: 38 a0 00 0a li r5,10 ffc0d394: 38 e0 00 60 li r7,96 ffc0d398: 39 00 00 00 li r8,0 ffc0d39c: 39 20 00 04 li r9,4 ffc0d3a0: 4b ff c4 d1 bl ffc09870 <_Objects_Initialize_information> <== ALWAYS TAKEN , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc0d3a4: 80 01 00 0c lwz r0,12(r1) ffc0d3a8: 38 21 00 08 addi r1,r1,8 ffc0d3ac: 7c 08 03 a6 mtlr r0 ffc0d3b0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1032c <_Barrier_Translate_core_barrier_return_code>: #if defined(RTEMS_DEBUG) if ( the_barrier_status > CORE_BARRIER_STATUS_LAST ) return RTEMS_INTERNAL_ERROR; #endif return _Barrier_Translate_core_barrier_return_code_[the_barrier_status]; } ffc1032c: 3d 20 00 00 lis r9,0 ffc10330: 39 29 21 c0 addi r9,r9,8640 }; rtems_status_code _Barrier_Translate_core_barrier_return_code ( CORE_barrier_Status the_barrier_status ) { ffc10334: 54 63 10 3a rlwinm r3,r3,2,0,29 #if defined(RTEMS_DEBUG) if ( the_barrier_status > CORE_BARRIER_STATUS_LAST ) return RTEMS_INTERNAL_ERROR; #endif return _Barrier_Translate_core_barrier_return_code_[the_barrier_status]; } ffc10338: 7c 69 18 2e lwzx r3,r9,r3 ffc1033c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0fb20 <_CORE_barrier_Initialize>: void _CORE_barrier_Initialize( CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { ffc0fb20: 94 21 ff f8 stwu r1,-8(r1) ffc0fb24: 7c 08 02 a6 mflr r0 the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( ffc0fb28: 3c a0 00 01 lis r5,1 void _CORE_barrier_Initialize( CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { ffc0fb2c: 90 01 00 0c stw r0,12(r1) the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; ffc0fb30: 38 00 00 00 li r0,0 _Thread_queue_Initialize( ffc0fb34: 38 c0 00 03 li r6,3 CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; ffc0fb38: 81 64 00 00 lwz r11,0(r4) ffc0fb3c: 81 84 00 04 lwz r12,4(r4) the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( ffc0fb40: 38 80 00 00 li r4,0 CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; ffc0fb44: 90 03 00 48 stw r0,72(r3) CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; ffc0fb48: 91 63 00 40 stw r11,64(r3) ffc0fb4c: 91 83 00 44 stw r12,68(r3) the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( ffc0fb50: 4b ff b0 3d bl ffc0ab8c <_Thread_queue_Initialize> <== ALWAYS TAKEN &the_barrier->Wait_queue, THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_BARRIER, CORE_BARRIER_TIMEOUT ); } ffc0fb54: 80 01 00 0c lwz r0,12(r1) ffc0fb58: 38 21 00 08 addi r1,r1,8 ffc0fb5c: 7c 08 03 a6 mtlr r0 ffc0fb60: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0fb64 <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { ffc0fb64: 94 21 ff f0 stwu r1,-16(r1) ffc0fb68: 7c 08 02 a6 mflr r0 ffc0fb6c: 93 c1 00 08 stw r30,8(r1) ffc0fb70: 7c 7e 1b 78 mr r30,r3 ffc0fb74: 93 e1 00 0c stw r31,12(r1) Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { ffc0fb78: 3b e0 00 00 li r31,0 #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { ffc0fb7c: 90 01 00 14 stw r0,20(r1) Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { ffc0fb80: 48 00 00 08 b ffc0fb88 <_CORE_barrier_Release+0x24> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; ffc0fb84: 3b ff 00 01 addi r31,r31,1 { Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { ffc0fb88: 7f c3 f3 78 mr r3,r30 ffc0fb8c: 4b ff ab 31 bl ffc0a6bc <_Thread_queue_Dequeue> <== ALWAYS TAKEN ffc0fb90: 2c 03 00 00 cmpwi r3,0 ffc0fb94: 40 82 ff f0 bne+ ffc0fb84 <_CORE_barrier_Release+0x20> #endif count++; } the_barrier->number_of_waiting_threads = 0; return count; } ffc0fb98: 80 01 00 14 lwz r0,20(r1) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; } the_barrier->number_of_waiting_threads = 0; ffc0fb9c: 90 7e 00 48 stw r3,72(r30) return count; } ffc0fba0: 7f e3 fb 78 mr r3,r31 ffc0fba4: 7c 08 03 a6 mtlr r0 ffc0fba8: 83 c1 00 08 lwz r30,8(r1) ffc0fbac: 83 e1 00 0c lwz r31,12(r1) ffc0fbb0: 38 21 00 10 addi r1,r1,16 ffc0fbb4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0fbb8 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { ffc0fbb8: 94 21 ff f8 stwu r1,-8(r1) ffc0fbbc: 7c 08 02 a6 mflr r0 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; ffc0fbc0: 3d 20 00 00 lis r9,0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { ffc0fbc4: 90 01 00 0c stw r0,12(r1) Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; ffc0fbc8: 38 00 00 00 li r0,0 ) { Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; ffc0fbcc: 81 29 27 6c lwz r9,10092(r9) executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; ffc0fbd0: 90 09 00 34 stw r0,52(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0fbd4: 7c 00 00 a6 mfmsr r0 ffc0fbd8: 7d 70 42 a6 mfsprg r11,0 ffc0fbdc: 7c 0b 58 78 andc r11,r0,r11 ffc0fbe0: 7d 60 01 24 mtmsr r11 _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { ffc0fbe4: 81 43 00 40 lwz r10,64(r3) ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; ffc0fbe8: 81 63 00 48 lwz r11,72(r3) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { ffc0fbec: 2f 8a 00 00 cmpwi cr7,r10,0 ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; ffc0fbf0: 39 6b 00 01 addi r11,r11,1 ffc0fbf4: 91 63 00 48 stw r11,72(r3) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { ffc0fbf8: 40 9e 00 28 bne- cr7,ffc0fc20 <_CORE_barrier_Wait+0x68> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { ffc0fbfc: 81 43 00 44 lwz r10,68(r3) ffc0fc00: 7f 8b 50 00 cmpw cr7,r11,r10 ffc0fc04: 40 be 00 1c bne+ cr7,ffc0fc20 <_CORE_barrier_Wait+0x68> executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; ffc0fc08: 39 60 00 01 li r11,1 ffc0fc0c: 91 69 00 34 stw r11,52(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0fc10: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); ffc0fc14: 7c e5 3b 78 mr r5,r7 ffc0fc18: 4b ff ff 4d bl ffc0fb64 <_CORE_barrier_Release> <== ALWAYS TAKEN return; ffc0fc1c: 48 00 00 28 b ffc0fc44 <_CORE_barrier_Wait+0x8c> <== ALWAYS TAKEN ffc0fc20: 39 60 00 01 li r11,1 } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; ffc0fc24: 90 89 00 20 stw r4,32(r9) ffc0fc28: 91 63 00 30 stw r11,48(r3) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; ffc0fc2c: 90 69 00 44 stw r3,68(r9) ffc0fc30: 7c 00 01 24 mtmsr r0 executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); ffc0fc34: 3c a0 ff c1 lis r5,-63 ffc0fc38: 7c c4 33 78 mr r4,r6 ffc0fc3c: 38 a5 ac 70 addi r5,r5,-21392 ffc0fc40: 4b ff ac 39 bl ffc0a878 <_Thread_queue_Enqueue_with_handler> <== ALWAYS TAKEN } ffc0fc44: 80 01 00 0c lwz r0,12(r1) ffc0fc48: 38 21 00 08 addi r1,r1,8 ffc0fc4c: 7c 08 03 a6 mtlr r0 ffc0fc50: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1a2e8 <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc1a2e8: 94 21 ff e0 stwu r1,-32(r1) ffc1a2ec: 7c 08 02 a6 mflr r0 ffc1a2f0: 90 01 00 24 stw r0,36(r1) Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc1a2f4: 80 03 00 4c lwz r0,76(r3) Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc1a2f8: 93 61 00 0c stw r27,12(r1) ffc1a2fc: 7d 1b 43 78 mr r27,r8 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc1a300: 7f 85 00 40 cmplw cr7,r5,r0 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc1a304: 93 a1 00 14 stw r29,20(r1) <== ALWAYS TAKEN ffc1a308: 7c 9d 23 78 mr r29,r4 ffc1a30c: 93 c1 00 18 stw r30,24(r1) ffc1a310: 7c be 2b 78 mr r30,r5 ffc1a314: 93 e1 00 1c stw r31,28(r1) ffc1a318: 7c 7f 1b 78 mr r31,r3 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc1a31c: 38 60 00 01 li r3,1 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc1a320: 93 41 00 08 stw r26,8(r1) ffc1a324: 93 81 00 10 stw r28,16(r1) Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc1a328: 41 9d 00 54 bgt- cr7,ffc1a37c <_CORE_message_queue_Broadcast+0x94> <== NEVER TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { ffc1a32c: 80 1f 00 48 lwz r0,72(r31) * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { ffc1a330: 3b 80 00 00 li r28,0 * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { ffc1a334: 2f 80 00 00 cmpwi cr7,r0,0 ffc1a338: 41 be 00 28 beq+ cr7,ffc1a360 <_CORE_message_queue_Broadcast+0x78> *count = 0; ffc1a33c: 38 00 00 00 li r0,0 ffc1a340: 90 08 00 00 stw r0,0(r8) ffc1a344: 38 60 00 00 li r3,0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc1a348: 48 00 00 34 b ffc1a37c <_CORE_message_queue_Broadcast+0x94> <== ALWAYS TAKEN const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc1a34c: 80 7a 00 2c lwz r3,44(r26) */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; ffc1a350: 3b 9c 00 01 addi r28,r28,1 ffc1a354: 48 00 94 cd bl ffc23820 <== ALWAYS TAKEN buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; ffc1a358: 81 3a 00 28 lwz r9,40(r26) ffc1a35c: 93 c9 00 00 stw r30,0(r9) * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { ffc1a360: 7f e3 fb 78 mr r3,r31 ffc1a364: 48 00 2c bd bl ffc1d020 <_Thread_queue_Dequeue> <== ALWAYS TAKEN ffc1a368: 7f a4 eb 78 mr r4,r29 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = ffc1a36c: 7c 7a 1b 79 mr. r26,r3 ffc1a370: 7f c5 f3 78 mr r5,r30 ffc1a374: 40 82 ff d8 bne+ ffc1a34c <_CORE_message_queue_Broadcast+0x64> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; ffc1a378: 93 9b 00 00 stw r28,0(r27) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } ffc1a37c: 80 01 00 24 lwz r0,36(r1) ffc1a380: 83 41 00 08 lwz r26,8(r1) ffc1a384: 7c 08 03 a6 mtlr r0 ffc1a388: 83 61 00 0c lwz r27,12(r1) ffc1a38c: 83 81 00 10 lwz r28,16(r1) ffc1a390: 83 a1 00 14 lwz r29,20(r1) ffc1a394: 83 c1 00 18 lwz r30,24(r1) ffc1a398: 83 e1 00 1c lwz r31,28(r1) ffc1a39c: 38 21 00 20 addi r1,r1,32 ffc1a3a0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc15ef8 <_CORE_message_queue_Close>: void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { ffc15ef8: 94 21 ff f0 stwu r1,-16(r1) ffc15efc: 7c 08 02 a6 mflr r0 ffc15f00: 93 e1 00 0c stw r31,12(r1) ffc15f04: 7c 7f 1b 78 mr r31,r3 ffc15f08: 90 01 00 14 stw r0,20(r1) /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( ffc15f0c: 4b ff 9b b1 bl ffc0fabc <_Thread_queue_Flush> <== ALWAYS TAKEN * This removes all messages from the pending message queue. Since * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) ffc15f10: 80 1f 00 48 lwz r0,72(r31) ffc15f14: 2f 80 00 00 cmpwi cr7,r0,0 ffc15f18: 41 be 00 0c beq+ cr7,ffc15f24 <_CORE_message_queue_Close+0x2c> (void) _CORE_message_queue_Flush_support( the_message_queue ); ffc15f1c: 7f e3 fb 78 mr r3,r31 ffc15f20: 48 00 00 21 bl ffc15f40 <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN (void) _Workspace_Free( the_message_queue->message_buffers ); ffc15f24: 80 7f 00 5c lwz r3,92(r31) ffc15f28: 4b ff ab f1 bl ffc10b18 <_Workspace_Free> <== ALWAYS TAKEN } ffc15f2c: 80 01 00 14 lwz r0,20(r1) ffc15f30: 83 e1 00 0c lwz r31,12(r1) ffc15f34: 38 21 00 10 addi r1,r1,16 ffc15f38: 7c 08 03 a6 mtlr r0 ffc15f3c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1a3ec <_CORE_message_queue_Flush>: */ uint32_t _CORE_message_queue_Flush( CORE_message_queue_Control *the_message_queue ) { ffc1a3ec: 7c 08 02 a6 mflr r0 ffc1a3f0: 94 21 ff f8 stwu r1,-8(r1) ffc1a3f4: 90 01 00 0c stw r0,12(r1) if ( the_message_queue->number_of_pending_messages != 0 ) ffc1a3f8: 38 00 00 00 li r0,0 ffc1a3fc: 81 23 00 48 lwz r9,72(r3) ffc1a400: 2f 89 00 00 cmpwi cr7,r9,0 ffc1a404: 41 be 00 0c beq+ cr7,ffc1a410 <_CORE_message_queue_Flush+0x24> return _CORE_message_queue_Flush_support( the_message_queue ); ffc1a408: 48 00 00 1d bl ffc1a424 <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN ffc1a40c: 7c 60 1b 78 mr r0,r3 else return 0; } ffc1a410: 7c 03 03 78 mr r3,r0 ffc1a414: 80 01 00 0c lwz r0,12(r1) ffc1a418: 38 21 00 08 addi r1,r1,8 ffc1a41c: 7c 08 03 a6 mtlr r0 ffc1a420: 4e 80 00 20 blr <== ALWAYS TAKEN ffc15f40 <_CORE_message_queue_Flush_support>: */ uint32_t _CORE_message_queue_Flush_support( CORE_message_queue_Control *the_message_queue ) { ffc15f40: 7c 69 1b 78 mr r9,r3 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc15f44: 7c c0 00 a6 mfmsr r6 ffc15f48: 7c 10 42 a6 mfsprg r0,0 ffc15f4c: 7c c0 00 78 andc r0,r6,r0 ffc15f50: 7c 00 01 24 mtmsr r0 * fixed execution time that only deals with pending messages. */ _ISR_Disable( level ); inactive_first = the_message_queue->Inactive_messages.first; message_queue_first = the_message_queue->Pending_messages.first; ffc15f54: 80 e3 00 50 lwz r7,80(r3) message_queue_last = the_message_queue->Pending_messages.last; the_message_queue->Inactive_messages.first = message_queue_first; ffc15f58: 7c 6b 1b 78 mr r11,r3 * For now, though, we are very happy to have a small routine with * fixed execution time that only deals with pending messages. */ _ISR_Disable( level ); inactive_first = the_message_queue->Inactive_messages.first; ffc15f5c: 81 03 00 60 lwz r8,96(r3) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc15f60: 38 00 00 00 li r0,0 message_queue_first = the_message_queue->Pending_messages.first; message_queue_last = the_message_queue->Pending_messages.last; ffc15f64: 81 43 00 58 lwz r10,88(r3) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc15f68: 38 83 00 54 addi r4,r3,84 the_message_queue->Inactive_messages.first = message_queue_first; ffc15f6c: 94 eb 00 60 stwu r7,96(r11) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc15f70: 38 a3 00 50 addi r5,r3,80 message_queue_last->next = inactive_first; inactive_first->previous = message_queue_last; ffc15f74: 91 48 00 04 stw r10,4(r8) inactive_first = the_message_queue->Inactive_messages.first; message_queue_first = the_message_queue->Pending_messages.first; message_queue_last = the_message_queue->Pending_messages.last; the_message_queue->Inactive_messages.first = message_queue_first; message_queue_last->next = inactive_first; ffc15f78: 91 0a 00 00 stw r8,0(r10) inactive_first->previous = message_queue_last; message_queue_first->previous = ffc15f7c: 91 67 00 04 stw r11,4(r7) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc15f80: 90 83 00 50 stw r4,80(r3) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc15f84: 90 a3 00 58 stw r5,88(r3) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc15f88: 90 03 00 54 stw r0,84(r3) _Chain_Head( &the_message_queue->Inactive_messages ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); count = the_message_queue->number_of_pending_messages; ffc15f8c: 80 63 00 48 lwz r3,72(r3) the_message_queue->number_of_pending_messages = 0; ffc15f90: 90 09 00 48 stw r0,72(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc15f94: 7c c0 01 24 mtmsr r6 _ISR_Enable( level ); return count; } ffc15f98: 4e 80 00 20 blr <== ALWAYS TAKEN ffc12cc0 <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { ffc12cc0: 94 21 ff e0 stwu r1,-32(r1) ffc12cc4: 7c 08 02 a6 mflr r0 /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc12cc8: 7c c9 33 78 mr r9,r6 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { ffc12ccc: 90 01 00 24 stw r0,36(r1) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc12cd0: 70 c0 00 03 andi. r0,r6,3 { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; ffc12cd4: 38 00 00 00 li r0,0 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { ffc12cd8: 93 c1 00 18 stw r30,24(r1) ffc12cdc: 7c 9e 23 78 mr r30,r4 ffc12ce0: 93 e1 00 1c stw r31,28(r1) <== ALWAYS TAKEN ffc12ce4: 7c 7f 1b 78 mr r31,r3 ffc12ce8: 93 a1 00 14 stw r29,20(r1) size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; ffc12cec: 90 03 00 48 stw r0,72(r3) ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; ffc12cf0: 90 a3 00 44 stw r5,68(r3) the_message_queue->number_of_pending_messages = 0; the_message_queue->maximum_message_size = maximum_message_size; ffc12cf4: 90 c3 00 4c stw r6,76(r3) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc12cf8: 41 82 00 14 beq- ffc12d0c <_CORE_message_queue_Initialize+0x4c> allocated_message_size += sizeof(uint32_t); ffc12cfc: 39 26 00 04 addi r9,r6,4 allocated_message_size &= ~(sizeof(uint32_t) - 1); ffc12d00: 55 29 00 3a rlwinm r9,r9,0,0,29 } if (allocated_message_size < maximum_message_size) ffc12d04: 7f 89 30 40 cmplw cr7,r9,r6 ffc12d08: 41 bc 00 7c blt+ cr7,ffc12d84 <_CORE_message_queue_Initialize+0xc4> <== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); ffc12d0c: 3b a9 00 10 addi r29,r9,16 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * ffc12d10: 7c 7d 29 d6 mullw r3,r29,r5 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) ffc12d14: 7f 83 48 40 cmplw cr7,r3,r9 ffc12d18: 41 bc 00 6c blt+ cr7,ffc12d84 <_CORE_message_queue_Initialize+0xc4> <== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) ffc12d1c: 90 a1 00 08 stw r5,8(r1) ffc12d20: 48 00 35 cd bl ffc162ec <_Workspace_Allocate> <== ALWAYS TAKEN _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) ffc12d24: 2f 83 00 00 cmpwi cr7,r3,0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) ffc12d28: 7c 64 1b 78 mr r4,r3 ffc12d2c: 90 7f 00 5c stw r3,92(r31) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) ffc12d30: 80 a1 00 08 lwz r5,8(r1) ffc12d34: 41 9e 00 50 beq- cr7,ffc12d84 <_CORE_message_queue_Initialize+0xc4> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( ffc12d38: 7f a6 eb 78 mr r6,r29 ffc12d3c: 38 7f 00 60 addi r3,r31,96 ffc12d40: 48 00 54 25 bl ffc18164 <_Chain_Initialize> <== ALWAYS TAKEN allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc12d44: 80 9e 00 00 lwz r4,0(r30) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc12d48: 39 3f 00 54 addi r9,r31,84 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc12d4c: 38 1f 00 50 addi r0,r31,80 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc12d50: 91 3f 00 50 stw r9,80(r31) ffc12d54: 68 84 00 01 xori r4,r4,1 the_chain->permanent_null = NULL; ffc12d58: 39 20 00 00 li r9,0 the_chain->last = _Chain_Head(the_chain); ffc12d5c: 90 1f 00 58 stw r0,88(r31) ffc12d60: 7c 84 00 34 cntlzw r4,r4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc12d64: 91 3f 00 54 stw r9,84(r31) ffc12d68: 7f e3 fb 78 mr r3,r31 ffc12d6c: 54 84 d9 7e rlwinm r4,r4,27,5,31 ffc12d70: 38 a0 00 80 li r5,128 ffc12d74: 38 c0 00 06 li r6,6 ffc12d78: 48 00 26 31 bl ffc153a8 <_Thread_queue_Initialize> <== ALWAYS TAKEN ffc12d7c: 38 60 00 01 li r3,1 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; ffc12d80: 48 00 00 08 b ffc12d88 <_CORE_message_queue_Initialize+0xc8> <== ALWAYS TAKEN ffc12d84: 38 60 00 00 li r3,0 } ffc12d88: 80 01 00 24 lwz r0,36(r1) ffc12d8c: 83 a1 00 14 lwz r29,20(r1) ffc12d90: 7c 08 03 a6 mtlr r0 ffc12d94: 83 c1 00 18 lwz r30,24(r1) ffc12d98: 83 e1 00 1c lwz r31,28(r1) ffc12d9c: 38 21 00 20 addi r1,r1,32 ffc12da0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc181a0 <_CORE_message_queue_Insert_message>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc181a0: 7c 00 00 a6 mfmsr r0 ffc181a4: 7d 30 42 a6 mfsprg r9,0 ffc181a8: 7c 09 48 78 andc r9,r0,r9 ffc181ac: 7d 20 01 24 mtmsr r9 #if !defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) ffc181b0: 3d 20 7f ff lis r9,32767 ffc181b4: 61 29 ff ff ori r9,r9,65535 ffc181b8: 7f 85 48 00 cmpw cr7,r5,r9 _CORE_message_queue_Set_message_priority( the_message, submit_type ); #if !defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; ffc181bc: 81 23 00 48 lwz r9,72(r3) ffc181c0: 39 29 00 01 addi r9,r9,1 ffc181c4: 91 23 00 48 stw r9,72(r3) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) ffc181c8: 40 be 00 20 bne+ cr7,ffc181e8 <_CORE_message_queue_Insert_message+0x48> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc181cc: 39 23 00 54 addi r9,r3,84 ffc181d0: 91 24 00 00 stw r9,0(r4) old_last_node = the_chain->last; ffc181d4: 81 23 00 58 lwz r9,88(r3) the_chain->last = the_node; ffc181d8: 90 83 00 58 stw r4,88(r3) old_last_node->next = the_node; the_node->previous = old_last_node; ffc181dc: 91 24 00 04 stw r9,4(r4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc181e0: 90 89 00 00 stw r4,0(r9) ffc181e4: 48 00 00 1c b ffc18200 <_CORE_message_queue_Insert_message+0x60> <== ALWAYS TAKEN ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc181e8: 81 23 00 50 lwz r9,80(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; ffc181ec: 39 63 00 50 addi r11,r3,80 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc181f0: 91 64 00 04 stw r11,4(r4) before_node = after_node->next; after_node->next = the_node; ffc181f4: 90 83 00 50 stw r4,80(r3) the_node->next = before_node; before_node->previous = the_node; ffc181f8: 90 89 00 04 stw r4,4(r9) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc181fc: 91 24 00 00 stw r9,0(r4) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc18200: 7c 00 01 24 mtmsr r0 * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } ffc18204: 4e 80 00 20 blr <== ALWAYS TAKEN ffc12da4 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc12da4: 94 21 ff f0 stwu r1,-16(r1) ffc12da8: 7c 08 02 a6 mflr r0 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; ffc12dac: 3d 20 00 00 lis r9,0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc12db0: 90 01 00 14 stw r0,20(r1) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc12db4: 38 00 00 00 li r0,0 { ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; ffc12db8: 81 29 28 0c lwz r9,10252(r9) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc12dbc: 93 e1 00 0c stw r31,12(r1) ffc12dc0: 7c 7f 1b 78 mr r31,r3 ffc12dc4: 7c a3 2b 78 mr r3,r5 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc12dc8: 90 09 00 34 stw r0,52(r9) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc12dcc: 7c 80 23 78 mr r0,r4 ffc12dd0: 93 c1 00 08 stw r30,8(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc12dd4: 7d 60 00 a6 mfmsr r11 ffc12dd8: 7d 50 42 a6 mfsprg r10,0 ffc12ddc: 7d 6a 50 78 andc r10,r11,r10 ffc12de0: 7d 40 01 24 mtmsr r10 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc12de4: 83 df 00 50 lwz r30,80(r31) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc12de8: 39 5f 00 54 addi r10,r31,84 ffc12dec: 7f 9e 50 00 cmpw cr7,r30,r10 ffc12df0: 41 9e 00 5c beq- cr7,ffc12e4c <_CORE_message_queue_Seize+0xa8> executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { ffc12df4: 2f 9e 00 00 cmpwi cr7,r30,0 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; ffc12df8: 80 be 00 00 lwz r5,0(r30) the_chain->first = new_first; ffc12dfc: 7f ea fb 78 mr r10,r31 ffc12e00: 94 aa 00 50 stwu r5,80(r10) new_first->previous = _Chain_Head(the_chain); ffc12e04: 91 45 00 04 stw r10,4(r5) ffc12e08: 41 9e 00 44 beq- cr7,ffc12e4c <_CORE_message_queue_Seize+0xa8> <== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; ffc12e0c: 81 3f 00 48 lwz r9,72(r31) ffc12e10: 38 09 ff ff addi r0,r9,-1 ffc12e14: 90 1f 00 48 stw r0,72(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc12e18: 7d 60 01 24 mtmsr r11 _ISR_Enable( level ); *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = ffc12e1c: 3d 20 00 00 lis r9,0 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; ffc12e20: 80 be 00 08 lwz r5,8(r30) _Thread_Executing->Wait.count = ffc12e24: 81 29 28 0c lwz r9,10252(r9) ffc12e28: 38 00 00 00 li r0,0 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; ffc12e2c: 90 a6 00 00 stw r5,0(r6) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc12e30: 38 9e 00 0c addi r4,r30,12 _Thread_Executing->Wait.count = ffc12e34: 90 09 00 24 stw r0,36(r9) ffc12e38: 48 00 85 9d bl ffc1b3d4 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); ffc12e3c: 38 7f 00 60 addi r3,r31,96 ffc12e40: 7f c4 f3 78 mr r4,r30 ffc12e44: 4b ff fd b9 bl ffc12bfc <_Chain_Append> <== ALWAYS TAKEN /* * There is not an API with blocking sends enabled. * So return immediately. */ _CORE_message_queue_Free_message_buffer(the_message_queue, the_message); return; ffc12e48: 48 00 00 4c b ffc12e94 <_CORE_message_queue_Seize+0xf0> <== ALWAYS TAKEN return; } #endif } if ( !wait ) { ffc12e4c: 2f 87 00 00 cmpwi cr7,r7,0 ffc12e50: 40 9e 00 14 bne- cr7,ffc12e64 <_CORE_message_queue_Seize+0xc0> ffc12e54: 7d 60 01 24 mtmsr r11 _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; ffc12e58: 38 00 00 04 li r0,4 ffc12e5c: 90 09 00 34 stw r0,52(r9) return; ffc12e60: 48 00 00 34 b ffc12e94 <_CORE_message_queue_Seize+0xf0> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc12e64: 39 40 00 01 li r10,1 _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; ffc12e68: 90 c9 00 28 stw r6,40(r9) ffc12e6c: 91 5f 00 30 stw r10,48(r31) return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; ffc12e70: 90 09 00 20 stw r0,32(r9) executing->Wait.return_argument_second.mutable_object = buffer; ffc12e74: 90 69 00 2c stw r3,44(r9) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; ffc12e78: 93 e9 00 44 stw r31,68(r9) ffc12e7c: 7d 60 01 24 mtmsr r11 executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); ffc12e80: 3c a0 ff c1 lis r5,-63 ffc12e84: 7f e3 fb 78 mr r3,r31 ffc12e88: 7d 04 43 78 mr r4,r8 ffc12e8c: 38 a5 54 8c addi r5,r5,21644 ffc12e90: 48 00 22 05 bl ffc15094 <_Thread_queue_Enqueue_with_handler> <== ALWAYS TAKEN } ffc12e94: 80 01 00 14 lwz r0,20(r1) ffc12e98: 83 c1 00 08 lwz r30,8(r1) ffc12e9c: 7c 08 03 a6 mtlr r0 ffc12ea0: 83 e1 00 0c lwz r31,12(r1) ffc12ea4: 38 21 00 10 addi r1,r1,16 ffc12ea8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc12eac <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { ffc12eac: 94 21 ff e0 stwu r1,-32(r1) ffc12eb0: 7c 08 02 a6 mflr r0 ffc12eb4: 90 01 00 24 stw r0,36(r1) CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { ffc12eb8: 80 03 00 4c lwz r0,76(r3) #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { ffc12ebc: 93 61 00 0c stw r27,12(r1) ffc12ec0: 7c 9b 23 78 mr r27,r4 CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { ffc12ec4: 7f 85 00 40 cmplw cr7,r5,r0 #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { ffc12ec8: 93 81 00 10 stw r28,16(r1) CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { ffc12ecc: 38 00 00 01 li r0,1 #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { ffc12ed0: 7d 1c 43 78 mr r28,r8 ffc12ed4: 93 c1 00 18 stw r30,24(r1) ffc12ed8: 7c be 2b 78 mr r30,r5 ffc12edc: 93 e1 00 1c stw r31,28(r1) ffc12ee0: 7c 7f 1b 78 mr r31,r3 ffc12ee4: 93 a1 00 14 stw r29,20(r1) CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { ffc12ee8: 41 9d 00 88 bgt- cr7,ffc12f70 <_CORE_message_queue_Submit+0xc4> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { ffc12eec: 80 03 00 48 lwz r0,72(r3) ffc12ef0: 2f 80 00 00 cmpwi cr7,r0,0 ffc12ef4: 40 be 00 34 bne+ cr7,ffc12f28 <_CORE_message_queue_Submit+0x7c> the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); ffc12ef8: 48 00 1f e1 bl ffc14ed8 <_Thread_queue_Dequeue> <== ALWAYS TAKEN if ( the_thread ) { ffc12efc: 7c 7d 1b 79 mr. r29,r3 ffc12f00: 41 82 00 28 beq- ffc12f28 <_CORE_message_queue_Submit+0x7c> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc12f04: 80 7d 00 2c lwz r3,44(r29) ffc12f08: 7f 64 db 78 mr r4,r27 ffc12f0c: 7f c5 f3 78 mr r5,r30 ffc12f10: 48 00 84 c5 bl ffc1b3d4 <== ALWAYS TAKEN _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; ffc12f14: 81 3d 00 28 lwz r9,40(r29) the_thread->Wait.count = (uint32_t) submit_type; ffc12f18: 93 9d 00 24 stw r28,36(r29) ffc12f1c: 38 00 00 00 li r0,0 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; ffc12f20: 93 c9 00 00 stw r30,0(r9) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc12f24: 48 00 00 4c b ffc12f70 <_CORE_message_queue_Submit+0xc4> <== ALWAYS TAKEN /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { ffc12f28: 81 7f 00 48 lwz r11,72(r31) ffc12f2c: 38 00 00 02 li r0,2 ffc12f30: 81 3f 00 44 lwz r9,68(r31) ffc12f34: 7f 8b 48 40 cmplw cr7,r11,r9 ffc12f38: 40 bc 00 38 bge+ cr7,ffc12f70 <_CORE_message_queue_Submit+0xc4> RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) ffc12f3c: 38 7f 00 60 addi r3,r31,96 ffc12f40: 4b ff fd 15 bl ffc12c54 <_Chain_Get> <== ALWAYS TAKEN const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc12f44: 7f 64 db 78 mr r4,r27 RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) ffc12f48: 7c 7d 1b 78 mr r29,r3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc12f4c: 7f c5 f3 78 mr r5,r30 ffc12f50: 38 63 00 0c addi r3,r3,12 ffc12f54: 48 00 84 81 bl ffc1b3d4 <== ALWAYS TAKEN _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; ffc12f58: 93 dd 00 08 stw r30,8(r29) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( ffc12f5c: 7f e3 fb 78 mr r3,r31 ffc12f60: 7f a4 eb 78 mr r4,r29 ffc12f64: 7f 85 e3 78 mr r5,r28 ffc12f68: 48 00 52 39 bl ffc181a0 <_CORE_message_queue_Insert_message> <== ALWAYS TAKEN ffc12f6c: 38 00 00 00 li r0,0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } ffc12f70: 7c 03 03 78 mr r3,r0 ffc12f74: 80 01 00 24 lwz r0,36(r1) ffc12f78: 83 61 00 0c lwz r27,12(r1) ffc12f7c: 7c 08 03 a6 mtlr r0 ffc12f80: 83 81 00 10 lwz r28,16(r1) ffc12f84: 83 a1 00 14 lwz r29,20(r1) ffc12f88: 83 c1 00 18 lwz r30,24(r1) ffc12f8c: 83 e1 00 1c lwz r31,28(r1) ffc12f90: 38 21 00 20 addi r1,r1,32 ffc12f94: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0889c <_CORE_mutex_Flush>: void _CORE_mutex_Flush( CORE_mutex_Control *the_mutex, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { ffc0889c: 94 21 ff f8 stwu r1,-8(r1) ffc088a0: 7c 08 02 a6 mflr r0 ffc088a4: 90 01 00 0c stw r0,12(r1) _Thread_queue_Flush( ffc088a8: 48 00 22 99 bl ffc0ab40 <_Thread_queue_Flush> <== ALWAYS TAKEN &the_mutex->Wait_queue, remote_extract_callout, status ); } ffc088ac: 80 01 00 0c lwz r0,12(r1) ffc088b0: 38 21 00 08 addi r1,r1,8 ffc088b4: 7c 08 03 a6 mtlr r0 ffc088b8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc088bc <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { ffc088bc: 7c 08 02 a6 mflr r0 ffc088c0: 94 21 ff f8 stwu r1,-8(r1) the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { ffc088c4: 2f 85 00 00 cmpwi cr7,r5,0 CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { ffc088c8: 90 01 00 0c stw r0,12(r1) initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; ffc088cc: 39 00 00 00 li r8,0 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; ffc088d0: 81 44 00 00 lwz r10,0(r4) ffc088d4: 81 64 00 04 lwz r11,4(r4) ffc088d8: 80 04 00 08 lwz r0,8(r4) ffc088dc: 81 24 00 0c lwz r9,12(r4) ffc088e0: 91 43 00 40 stw r10,64(r3) ffc088e4: 91 63 00 44 stw r11,68(r3) ffc088e8: 91 23 00 4c stw r9,76(r3) <== ALWAYS TAKEN ffc088ec: 90 03 00 48 stw r0,72(r3) the_mutex->lock = initial_lock; ffc088f0: 90 a3 00 50 stw r5,80(r3) the_mutex->blocked_count = 0; ffc088f4: 91 03 00 58 stw r8,88(r3) if ( initial_lock == CORE_MUTEX_LOCKED ) { ffc088f8: 40 9e 00 54 bne- cr7,ffc0894c <_CORE_mutex_Initialize+0x90> the_mutex->nest_count = 1; ffc088fc: 39 20 00 01 li r9,1 ffc08900: 91 23 00 54 stw r9,84(r3) <== ALWAYS TAKEN the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || ffc08904: 2f 80 00 02 cmpwi cr7,r0,2 <== ALWAYS TAKEN the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; ffc08908: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN ffc0890c: 81 29 27 6c lwz r9,10092(r9) the_mutex->holder_id = _Thread_Executing->Object.id; ffc08910: 81 69 00 08 lwz r11,8(r9) the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; ffc08914: 91 23 00 5c stw r9,92(r3) the_mutex->holder_id = _Thread_Executing->Object.id; ffc08918: 91 63 00 60 stw r11,96(r3) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || ffc0891c: 41 9e 00 0c beq- cr7,ffc08928 <_CORE_mutex_Initialize+0x6c> ffc08920: 2f 80 00 03 cmpwi cr7,r0,3 ffc08924: 40 be 00 34 bne+ cr7,ffc08958 <_CORE_mutex_Initialize+0x9c> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) ffc08928: 81 49 00 14 lwz r10,20(r9) ffc0892c: 38 00 00 06 li r0,6 ffc08930: 81 63 00 4c lwz r11,76(r3) ffc08934: 7f 8a 58 40 cmplw cr7,r10,r11 ffc08938: 41 9c 00 40 blt- cr7,ffc08978 <_CORE_mutex_Initialize+0xbc> _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; ffc0893c: 81 69 00 1c lwz r11,28(r9) ffc08940: 38 0b 00 01 addi r0,r11,1 ffc08944: 90 09 00 1c stw r0,28(r9) ffc08948: 48 00 00 10 b ffc08958 <_CORE_mutex_Initialize+0x9c> <== ALWAYS TAKEN } } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; ffc0894c: 91 03 00 60 stw r8,96(r3) #endif _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; ffc08950: 91 03 00 54 stw r8,84(r3) <== ALWAYS TAKEN the_mutex->holder = NULL; ffc08954: 91 03 00 5c stw r8,92(r3) the_mutex->holder_id = 0; } _Thread_queue_Initialize( ffc08958: 80 84 00 08 lwz r4,8(r4) ffc0895c: 38 a0 04 00 li r5,1024 ffc08960: 38 c0 00 05 li r6,5 <== ALWAYS TAKEN ffc08964: 31 24 ff ff addic r9,r4,-1 ffc08968: 7c 09 21 10 subfe r0,r9,r4 ffc0896c: 7c 04 03 78 mr r4,r0 <== ALWAYS TAKEN ffc08970: 48 00 22 1d bl ffc0ab8c <_Thread_queue_Initialize> <== ALWAYS TAKEN ffc08974: 38 00 00 00 li r0,0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } ffc08978: 7c 03 03 78 mr r3,r0 <== ALWAYS TAKEN ffc0897c: 80 01 00 0c lwz r0,12(r1) ffc08980: 38 21 00 08 addi r1,r1,8 ffc08984: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc08988: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08a14 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc08a14: 94 21 ff e0 stwu r1,-32(r1) ffc08a18: 7c 08 02 a6 mflr r0 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc08a1c: 3d 20 00 00 lis r9,0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc08a20: 90 01 00 24 stw r0,36(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc08a24: 80 09 27 2c lwz r0,10028(r9) Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc08a28: 93 81 00 10 stw r28,16(r1) ffc08a2c: 7c dc 33 78 mr r28,r6 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc08a30: 2f 80 00 00 cmpwi cr7,r0,0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc08a34: 93 a1 00 14 stw r29,20(r1) ffc08a38: 7c bd 2b 78 mr r29,r5 ffc08a3c: 93 c1 00 18 stw r30,24(r1) ffc08a40: 7c 9e 23 78 mr r30,r4 ffc08a44: 93 e1 00 1c stw r31,28(r1) ffc08a48: 7c 7f 1b 78 mr r31,r3 ffc08a4c: 90 e1 00 08 stw r7,8(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc08a50: 41 9e 00 2c beq- cr7,ffc08a7c <_CORE_mutex_Seize+0x68> ffc08a54: 2f 85 00 00 cmpwi cr7,r5,0 ffc08a58: 41 9e 00 24 beq- cr7,ffc08a7c <_CORE_mutex_Seize+0x68> <== NEVER TAKEN ffc08a5c: 3d 20 00 00 lis r9,0 ffc08a60: 80 09 27 90 lwz r0,10128(r9) ffc08a64: 2b 80 00 01 cmplwi cr7,r0,1 ffc08a68: 40 bd 00 14 ble+ cr7,ffc08a7c <_CORE_mutex_Seize+0x68> ffc08a6c: 38 60 00 00 li r3,0 ffc08a70: 38 80 00 00 li r4,0 ffc08a74: 38 a0 00 13 li r5,19 ffc08a78: 48 00 07 5d bl ffc091d4 <_Internal_error_Occurred> <== ALWAYS TAKEN ffc08a7c: 7f e3 fb 78 mr r3,r31 ffc08a80: 38 81 00 08 addi r4,r1,8 ffc08a84: 48 00 4f 79 bl ffc0d9fc <_CORE_mutex_Seize_interrupt_trylock> <== ALWAYS TAKEN ffc08a88: 2f 83 00 00 cmpwi cr7,r3,0 ffc08a8c: 41 9e 00 60 beq- cr7,ffc08aec <_CORE_mutex_Seize+0xd8> ffc08a90: 2f 9d 00 00 cmpwi cr7,r29,0 ffc08a94: 3d 60 00 00 lis r11,0 ffc08a98: 40 9e 00 1c bne- cr7,ffc08ab4 <_CORE_mutex_Seize+0xa0> ffc08a9c: 80 01 00 08 lwz r0,8(r1) ffc08aa0: 7c 00 01 24 mtmsr r0 ffc08aa4: 81 2b 27 6c lwz r9,10092(r11) ffc08aa8: 38 00 00 01 li r0,1 ffc08aac: 90 09 00 34 stw r0,52(r9) ffc08ab0: 48 00 00 3c b ffc08aec <_CORE_mutex_Seize+0xd8> <== ALWAYS TAKEN ffc08ab4: 3d 20 00 00 lis r9,0 ffc08ab8: 81 6b 27 6c lwz r11,10092(r11) ffc08abc: 81 49 27 2c lwz r10,10028(r9) ffc08ac0: 93 cb 00 20 stw r30,32(r11) ffc08ac4: 38 0a 00 01 addi r0,r10,1 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc08ac8: 39 40 00 01 li r10,1 ffc08acc: 93 eb 00 44 stw r31,68(r11) ffc08ad0: 91 5f 00 30 stw r10,48(r31) ffc08ad4: 90 09 27 2c stw r0,10028(r9) ffc08ad8: 80 01 00 08 lwz r0,8(r1) ffc08adc: 7c 00 01 24 mtmsr r0 ffc08ae0: 7f e3 fb 78 mr r3,r31 ffc08ae4: 7f 84 e3 78 mr r4,r28 ffc08ae8: 4b ff fe a5 bl ffc0898c <_CORE_mutex_Seize_interrupt_blocking> <== ALWAYS TAKEN } ffc08aec: 80 01 00 24 lwz r0,36(r1) <== ALWAYS TAKEN ffc08af0: 83 81 00 10 lwz r28,16(r1) ffc08af4: 7c 08 03 a6 mtlr r0 ffc08af8: 83 a1 00 14 lwz r29,20(r1) ffc08afc: 83 c1 00 18 lwz r30,24(r1) ffc08b00: 83 e1 00 1c lwz r31,28(r1) ffc08b04: 38 21 00 20 addi r1,r1,32 ffc08b08: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0898c <_CORE_mutex_Seize_interrupt_blocking>: void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { ffc0898c: 94 21 ff f0 stwu r1,-16(r1) ffc08990: 7c 08 02 a6 mflr r0 Thread_Control *executing; executing = _Thread_Executing; ffc08994: 3d 20 00 00 lis r9,0 void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { ffc08998: 90 01 00 14 stw r0,20(r1) Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { ffc0899c: 80 03 00 48 lwz r0,72(r3) void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { ffc089a0: 93 c1 00 08 stw r30,8(r1) ffc089a4: 7c 9e 23 78 mr r30,r4 <== ALWAYS TAKEN Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { ffc089a8: 2f 80 00 02 cmpwi cr7,r0,2 void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { ffc089ac: 93 e1 00 0c stw r31,12(r1) ffc089b0: 7c 7f 1b 78 mr r31,r3 Thread_Control *executing; executing = _Thread_Executing; ffc089b4: 81 29 27 6c lwz r9,10092(r9) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { ffc089b8: 40 be 00 20 bne+ cr7,ffc089d8 <_CORE_mutex_Seize_interrupt_blocking+0x4c> if ( the_mutex->holder->current_priority > executing->current_priority ) { ffc089bc: 80 63 00 5c lwz r3,92(r3) ffc089c0: 80 89 00 14 lwz r4,20(r9) ffc089c4: 80 03 00 14 lwz r0,20(r3) ffc089c8: 7f 80 20 40 cmplw cr7,r0,r4 ffc089cc: 40 bd 00 0c ble+ cr7,ffc089d8 <_CORE_mutex_Seize_interrupt_blocking+0x4c> _Thread_Change_priority( ffc089d0: 38 a0 00 00 li r5,0 ffc089d4: 48 00 12 51 bl ffc09c24 <_Thread_Change_priority> <== ALWAYS TAKEN false ); } } the_mutex->blocked_count++; ffc089d8: 81 3f 00 58 lwz r9,88(r31) _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); ffc089dc: 3c a0 ff c1 lis r5,-63 ffc089e0: 7f e3 fb 78 mr r3,r31 false ); } } the_mutex->blocked_count++; ffc089e4: 38 09 00 01 addi r0,r9,1 ffc089e8: 90 1f 00 58 stw r0,88(r31) _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); ffc089ec: 7f c4 f3 78 mr r4,r30 ffc089f0: 38 a5 ac 70 addi r5,r5,-21392 ffc089f4: 48 00 1e 85 bl ffc0a878 <_Thread_queue_Enqueue_with_handler> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc089f8: 48 00 18 b5 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN } ffc089fc: 80 01 00 14 lwz r0,20(r1) ffc08a00: 83 c1 00 08 lwz r30,8(r1) ffc08a04: 7c 08 03 a6 mtlr r0 ffc08a08: 83 e1 00 0c lwz r31,12(r1) ffc08a0c: 38 21 00 10 addi r1,r1,16 ffc08a10: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d9fc <_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 ) { ffc0d9fc: 7c 08 02 a6 mflr r0 ffc0da00: 94 21 ff f8 stwu r1,-8(r1) <== ALWAYS TAKEN { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; ffc0da04: 3d 20 00 00 lis r9,0 ffc0da08: 81 29 27 6c lwz r9,10092(r9) ffc0da0c: 90 01 00 0c stw r0,12(r1) <== ALWAYS TAKEN executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; ffc0da10: 38 00 00 00 li r0,0 ffc0da14: 90 09 00 34 stw r0,52(r9) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { ffc0da18: 81 63 00 50 lwz r11,80(r3) ffc0da1c: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0da20: 41 9e 00 bc beq- cr7,ffc0dadc <_CORE_mutex_Seize_interrupt_trylock+0xe0> */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; ffc0da24: 81 63 00 48 lwz r11,72(r3) /* 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; ffc0da28: 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 ) || ffc0da2c: 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; ffc0da30: 80 09 00 08 lwz r0,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; ffc0da34: 91 23 00 5c stw r9,92(r3) <== ALWAYS TAKEN the_mutex->holder_id = executing->Object.id; ffc0da38: 90 03 00 60 stw r0,96(r3) the_mutex->nest_count = 1; ffc0da3c: 38 00 00 01 li r0,1 ffc0da40: 90 03 00 54 stw r0,84(r3) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || ffc0da44: 41 9e 00 0c beq- cr7,ffc0da50 <_CORE_mutex_Seize_interrupt_trylock+0x54> ffc0da48: 2f 8b 00 03 cmpwi cr7,r11,3 ffc0da4c: 40 be 00 18 bne+ cr7,ffc0da64 <_CORE_mutex_Seize_interrupt_trylock+0x68> #endif executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { ffc0da50: 2f 8b 00 03 cmpwi cr7,r11,3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; ffc0da54: 81 69 00 1c lwz r11,28(r9) ffc0da58: 38 0b 00 01 addi r0,r11,1 ffc0da5c: 90 09 00 1c stw r0,28(r9) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { ffc0da60: 41 be 00 08 beq+ cr7,ffc0da68 <_CORE_mutex_Seize_interrupt_trylock+0x6c> _ISR_Enable( *level_p ); ffc0da64: 48 00 00 a8 b ffc0db0c <_CORE_mutex_Seize_interrupt_trylock+0x110> <== ALWAYS TAKEN */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; ffc0da68: 80 03 00 4c lwz r0,76(r3) current = executing->current_priority; ffc0da6c: 81 69 00 14 lwz r11,20(r9) if ( current == ceiling ) { ffc0da70: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0da74: 40 be 00 08 bne+ cr7,ffc0da7c <_CORE_mutex_Seize_interrupt_trylock+0x80> _ISR_Enable( *level_p ); ffc0da78: 48 00 00 94 b ffc0db0c <_CORE_mutex_Seize_interrupt_trylock+0x110> <== ALWAYS TAKEN return 0; } if ( current > ceiling ) { ffc0da7c: 7f 8b 00 40 cmplw cr7,r11,r0 ffc0da80: 40 bd 00 34 ble+ cr7,ffc0dab4 <_CORE_mutex_Seize_interrupt_trylock+0xb8> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0da84: 3d 20 00 00 lis r9,0 ffc0da88: 81 69 27 2c lwz r11,10028(r9) ffc0da8c: 38 0b 00 01 addi r0,r11,1 ffc0da90: 90 09 27 2c stw r0,10028(r9) ffc0da94: 80 04 00 00 lwz r0,0(r4) ffc0da98: 7c 00 01 24 mtmsr r0 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( ffc0da9c: 80 83 00 4c lwz r4,76(r3) ffc0daa0: 38 a0 00 00 li r5,0 ffc0daa4: 80 63 00 5c lwz r3,92(r3) ffc0daa8: 4b ff c1 7d bl ffc09c24 <_Thread_Change_priority> <== ALWAYS TAKEN the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); ffc0daac: 4b ff c8 01 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0dab0: 48 00 00 64 b ffc0db14 <_CORE_mutex_Seize_interrupt_trylock+0x118> <== ALWAYS TAKEN return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; ffc0dab4: 38 00 00 06 li r0,6 ffc0dab8: 90 09 00 34 stw r0,52(r9) the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ ffc0dabc: 38 00 00 00 li r0,0 ffc0dac0: 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; ffc0dac4: 38 00 00 01 li r0,1 ffc0dac8: 90 03 00 50 stw r0,80(r3) the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ ffc0dacc: 81 69 00 1c lwz r11,28(r9) ffc0dad0: 38 0b ff ff addi r0,r11,-1 ffc0dad4: 90 09 00 1c stw r0,28(r9) _ISR_Enable( *level_p ); ffc0dad8: 48 00 00 34 b ffc0db0c <_CORE_mutex_Seize_interrupt_trylock+0x110> <== ALWAYS TAKEN /* * 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 ) ) { ffc0dadc: 81 63 00 5c lwz r11,92(r3) ffc0dae0: 7f 8b 48 00 cmpw cr7,r11,r9 ffc0dae4: 40 be 00 44 bne+ cr7,ffc0db28 <_CORE_mutex_Seize_interrupt_trylock+0x12c> switch ( the_mutex->Attributes.lock_nesting_behavior ) { ffc0dae8: 80 03 00 40 lwz r0,64(r3) ffc0daec: 2f 80 00 00 cmpwi cr7,r0,0 ffc0daf0: 41 9e 00 10 beq- cr7,ffc0db00 <_CORE_mutex_Seize_interrupt_trylock+0x104> ffc0daf4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0daf8: 40 be 00 30 bne+ cr7,ffc0db28 <_CORE_mutex_Seize_interrupt_trylock+0x12c> <== ALWAYS TAKEN ffc0dafc: 48 00 00 20 b ffc0db1c <_CORE_mutex_Seize_interrupt_trylock+0x120> <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; ffc0db00: 81 23 00 54 lwz r9,84(r3) ffc0db04: 38 09 00 01 addi r0,r9,1 ffc0db08: 90 03 00 54 stw r0,84(r3) ffc0db0c: 80 04 00 00 lwz r0,0(r4) ffc0db10: 7c 00 01 24 mtmsr r0 ffc0db14: 38 60 00 00 li r3,0 ffc0db18: 48 00 00 14 b ffc0db2c <_CORE_mutex_Seize_interrupt_trylock+0x130> <== ALWAYS TAKEN _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; ffc0db1c: 38 00 00 02 li r0,2 <== NOT EXECUTED ffc0db20: 90 0b 00 34 stw r0,52(r11) <== NOT EXECUTED _ISR_Enable( *level_p ); ffc0db24: 4b ff ff e8 b ffc0db0c <_CORE_mutex_Seize_interrupt_trylock+0x110> <== NOT EXECUTED ffc0db28: 38 60 00 01 li r3,1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } ffc0db2c: 80 01 00 0c lwz r0,12(r1) ffc0db30: 38 21 00 08 addi r1,r1,8 ffc0db34: 7c 08 03 a6 mtlr r0 ffc0db38: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08b0c <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { ffc08b0c: 94 21 ff f0 stwu r1,-16(r1) ffc08b10: 7c 08 02 a6 mflr r0 ffc08b14: 90 01 00 14 stw r0,20(r1) * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { ffc08b18: 88 03 00 44 lbz r0,68(r3) <== ALWAYS TAKEN #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { ffc08b1c: 93 e1 00 0c stw r31,12(r1) ffc08b20: 7c 7f 1b 78 mr r31,r3 * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { ffc08b24: 2f 80 00 00 cmpwi cr7,r0,0 Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; ffc08b28: 81 23 00 5c lwz r9,92(r3) * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { ffc08b2c: 41 9e 00 18 beq- cr7,ffc08b44 <_CORE_mutex_Surrender+0x38> if ( !_Thread_Is_executing( holder ) ) ffc08b30: 3d 60 00 00 lis r11,0 ffc08b34: 80 0b 27 6c lwz r0,10092(r11) ffc08b38: 38 60 00 03 li r3,3 <== ALWAYS TAKEN ffc08b3c: 7f 89 00 00 cmpw cr7,r9,r0 ffc08b40: 40 be 01 0c bne+ cr7,ffc08c4c <_CORE_mutex_Surrender+0x140> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) ffc08b44: 81 7f 00 54 lwz r11,84(r31) ffc08b48: 2f 8b 00 00 cmpwi cr7,r11,0 ffc08b4c: 41 9e 00 fc beq- cr7,ffc08c48 <_CORE_mutex_Surrender+0x13c> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; ffc08b50: 38 0b ff ff addi r0,r11,-1 if ( the_mutex->nest_count != 0 ) { ffc08b54: 2f 80 00 00 cmpwi cr7,r0,0 /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; ffc08b58: 90 1f 00 54 stw r0,84(r31) if ( the_mutex->nest_count != 0 ) { ffc08b5c: 40 9e 00 ec bne- cr7,ffc08c48 <_CORE_mutex_Surrender+0x13c> */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; ffc08b60: 80 1f 00 48 lwz r0,72(r31) /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || ffc08b64: 2f 80 00 02 cmpwi cr7,r0,2 <== ALWAYS TAKEN ffc08b68: 41 9e 00 0c beq- cr7,ffc08b74 <_CORE_mutex_Surrender+0x68> ffc08b6c: 2f 80 00 03 cmpwi cr7,r0,3 ffc08b70: 40 be 00 10 bne+ cr7,ffc08b80 <_CORE_mutex_Surrender+0x74> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; ffc08b74: 81 69 00 1c lwz r11,28(r9) ffc08b78: 38 0b ff ff addi r0,r11,-1 ffc08b7c: 90 09 00 1c stw r0,28(r9) ffc08b80: 80 1f 00 48 lwz r0,72(r31) } the_mutex->holder = NULL; ffc08b84: 39 60 00 00 li r11,0 the_mutex->holder_id = 0; ffc08b88: 91 7f 00 60 stw r11,96(r31) <== ALWAYS TAKEN /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || ffc08b8c: 2f 80 00 02 cmpwi cr7,r0,2 } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; ffc08b90: 91 7f 00 5c stw r11,92(r31) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || ffc08b94: 41 9e 00 0c beq- cr7,ffc08ba0 <_CORE_mutex_Surrender+0x94> ffc08b98: 2f 80 00 03 cmpwi cr7,r0,3 ffc08b9c: 40 be 00 2c bne+ cr7,ffc08bc8 <_CORE_mutex_Surrender+0xbc> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && ffc08ba0: 80 09 00 1c lwz r0,28(r9) ffc08ba4: 2f 80 00 00 cmpwi cr7,r0,0 ffc08ba8: 40 9e 00 20 bne- cr7,ffc08bc8 <_CORE_mutex_Surrender+0xbc> holder->real_priority != holder->current_priority ) { ffc08bac: 80 89 00 18 lwz r4,24(r9) ffc08bb0: 80 09 00 14 lwz r0,20(r9) ffc08bb4: 7f 84 00 00 cmpw cr7,r4,r0 <== ALWAYS TAKEN ffc08bb8: 41 9e 00 10 beq- cr7,ffc08bc8 <_CORE_mutex_Surrender+0xbc> _Thread_Change_priority( holder, holder->real_priority, true ); ffc08bbc: 7d 23 4b 78 mr r3,r9 ffc08bc0: 38 a0 00 01 li r5,1 ffc08bc4: 48 00 10 61 bl ffc09c24 <_Thread_Change_priority> <== ALWAYS TAKEN /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { ffc08bc8: 7f e3 fb 78 mr r3,r31 ffc08bcc: 48 00 1a f1 bl ffc0a6bc <_Thread_queue_Dequeue> <== ALWAYS TAKEN ffc08bd0: 7c 69 1b 79 mr. r9,r3 ffc08bd4: 41 82 00 6c beq- ffc08c40 <_CORE_mutex_Surrender+0x134> the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { ffc08bd8: 80 1f 00 48 lwz r0,72(r31) } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; ffc08bdc: 81 69 00 08 lwz r11,8(r9) the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { ffc08be0: 2f 80 00 02 cmpwi cr7,r0,2 } else #endif { the_mutex->holder = the_thread; ffc08be4: 91 3f 00 5c stw r9,92(r31) the_mutex->holder_id = the_thread->Object.id; ffc08be8: 91 7f 00 60 stw r11,96(r31) the_mutex->nest_count = 1; ffc08bec: 39 60 00 01 li r11,1 ffc08bf0: 91 7f 00 54 stw r11,84(r31) switch ( the_mutex->Attributes.discipline ) { ffc08bf4: 41 9e 00 10 beq- cr7,ffc08c04 <_CORE_mutex_Surrender+0xf8> ffc08bf8: 2f 80 00 03 cmpwi cr7,r0,3 ffc08bfc: 40 be 00 4c bne+ cr7,ffc08c48 <_CORE_mutex_Surrender+0x13c> ffc08c00: 48 00 00 18 b ffc08c18 <_CORE_mutex_Surrender+0x10c> <== ALWAYS TAKEN case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; ffc08c04: 81 69 00 1c lwz r11,28(r9) ffc08c08: 38 60 00 00 li r3,0 ffc08c0c: 38 0b 00 01 addi r0,r11,1 ffc08c10: 90 09 00 1c stw r0,28(r9) break; ffc08c14: 48 00 00 38 b ffc08c4c <_CORE_mutex_Surrender+0x140> <== ALWAYS TAKEN case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; ffc08c18: 81 69 00 1c lwz r11,28(r9) if (the_mutex->Attributes.priority_ceiling < the_thread->current_priority){ ffc08c1c: 80 09 00 14 lwz r0,20(r9) case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; ffc08c20: 39 6b 00 01 addi r11,r11,1 ffc08c24: 91 69 00 1c stw r11,28(r9) if (the_mutex->Attributes.priority_ceiling < ffc08c28: 80 9f 00 4c lwz r4,76(r31) the_thread->current_priority){ ffc08c2c: 7f 84 00 40 cmplw cr7,r4,r0 ffc08c30: 40 bc 00 18 bge+ cr7,ffc08c48 <_CORE_mutex_Surrender+0x13c> <== ALWAYS TAKEN _Thread_Change_priority( ffc08c34: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc08c38: 48 00 0f ed bl ffc09c24 <_Thread_Change_priority> <== NOT EXECUTED ffc08c3c: 48 00 00 0c b ffc08c48 <_CORE_mutex_Surrender+0x13c> <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; ffc08c40: 38 00 00 01 li r0,1 ffc08c44: 90 1f 00 50 stw r0,80(r31) ffc08c48: 38 60 00 00 li r3,0 return CORE_MUTEX_STATUS_SUCCESSFUL; } ffc08c4c: 80 01 00 14 lwz r0,20(r1) ffc08c50: 83 e1 00 0c lwz r31,12(r1) ffc08c54: 38 21 00 10 addi r1,r1,16 ffc08c58: 7c 08 03 a6 mtlr r0 ffc08c5c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08c60 <_CORE_semaphore_Flush>: void _CORE_semaphore_Flush( CORE_semaphore_Control *the_semaphore, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { ffc08c60: 94 21 ff f8 stwu r1,-8(r1) ffc08c64: 7c 08 02 a6 mflr r0 ffc08c68: 90 01 00 0c stw r0,12(r1) _Thread_queue_Flush( ffc08c6c: 48 00 1e d5 bl ffc0ab40 <_Thread_queue_Flush> <== ALWAYS TAKEN &the_semaphore->Wait_queue, remote_extract_callout, status ); } ffc08c70: 80 01 00 0c lwz r0,12(r1) ffc08c74: 38 21 00 08 addi r1,r1,8 ffc08c78: 7c 08 03 a6 mtlr r0 ffc08c7c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08c80 <_CORE_semaphore_Initialize>: void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { ffc08c80: 94 21 ff f8 stwu r1,-8(r1) ffc08c84: 7c 08 02 a6 mflr r0 the_semaphore->Attributes = *the_semaphore_attributes; the_semaphore->count = initial_value; _Thread_queue_Initialize( ffc08c88: 38 c0 00 03 li r6,3 void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { ffc08c8c: 90 01 00 0c stw r0,12(r1) the_semaphore->Attributes = *the_semaphore_attributes; ffc08c90: 81 64 00 00 lwz r11,0(r4) ffc08c94: 81 84 00 04 lwz r12,4(r4) ffc08c98: 91 63 00 40 stw r11,64(r3) ffc08c9c: 91 83 00 44 stw r12,68(r3) the_semaphore->count = initial_value; _Thread_queue_Initialize( ffc08ca0: 80 84 00 04 lwz r4,4(r4) uint32_t initial_value ) { the_semaphore->Attributes = *the_semaphore_attributes; the_semaphore->count = initial_value; ffc08ca4: 90 a3 00 48 stw r5,72(r3) _Thread_queue_Initialize( ffc08ca8: 38 a0 02 00 li r5,512 ffc08cac: 68 84 00 01 xori r4,r4,1 ffc08cb0: 7c 84 00 34 cntlzw r4,r4 ffc08cb4: 54 84 d9 7e rlwinm r4,r4,27,5,31 ffc08cb8: 48 00 1e d5 bl ffc0ab8c <_Thread_queue_Initialize> <== ALWAYS TAKEN _CORE_semaphore_Is_priority( the_semaphore_attributes ) ? THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_SEMAPHORE, CORE_SEMAPHORE_TIMEOUT ); } ffc08cbc: 80 01 00 0c lwz r0,12(r1) ffc08cc0: 38 21 00 08 addi r1,r1,8 ffc08cc4: 7c 08 03 a6 mtlr r0 ffc08cc8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08ccc <_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 ) { ffc08ccc: 94 21 ff f0 stwu r1,-16(r1) ffc08cd0: 7c 08 02 a6 mflr r0 ffc08cd4: 93 e1 00 0c stw r31,12(r1) ffc08cd8: 7c 7f 1b 78 mr r31,r3 ffc08cdc: 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)) ) { ffc08ce0: 48 00 19 dd bl ffc0a6bc <_Thread_queue_Dequeue> <== ALWAYS TAKEN ffc08ce4: 2f 83 00 00 cmpwi cr7,r3,0 ffc08ce8: 38 60 00 00 li r3,0 ffc08cec: 40 be 00 38 bne+ cr7,ffc08d24 <_CORE_semaphore_Surrender+0x58> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08cf0: 7c 00 00 a6 mfmsr r0 ffc08cf4: 7d 30 42 a6 mfsprg r9,0 ffc08cf8: 7c 09 48 78 andc r9,r0,r9 ffc08cfc: 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 ) ffc08d00: 81 3f 00 48 lwz r9,72(r31) ffc08d04: 38 60 00 04 li r3,4 ffc08d08: 81 7f 00 40 lwz r11,64(r31) ffc08d0c: 7f 89 58 40 cmplw cr7,r9,r11 ffc08d10: 40 9c 00 10 bge- cr7,ffc08d20 <_CORE_semaphore_Surrender+0x54> <== NEVER TAKEN the_semaphore->count += 1; ffc08d14: 39 29 00 01 addi r9,r9,1 ffc08d18: 91 3f 00 48 stw r9,72(r31) ffc08d1c: 38 60 00 00 li r3,0 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08d20: 7c 00 01 24 mtmsr r0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc08d24: 80 01 00 14 lwz r0,20(r1) ffc08d28: 83 e1 00 0c lwz r31,12(r1) ffc08d2c: 38 21 00 10 addi r1,r1,16 ffc08d30: 7c 08 03 a6 mtlr r0 ffc08d34: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0882c <_Chain_Append>: ffc0882c: 7c 00 00 a6 mfmsr r0 ffc08830: 7d 30 42 a6 mfsprg r9,0 ffc08834: 7c 09 48 78 andc r9,r0,r9 ffc08838: 7d 20 01 24 mtmsr r9 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0883c: 39 23 00 04 addi r9,r3,4 ffc08840: 91 24 00 00 stw r9,0(r4) old_last_node = the_chain->last; ffc08844: 81 23 00 08 lwz r9,8(r3) the_chain->last = the_node; ffc08848: 90 83 00 08 stw r4,8(r3) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0884c: 91 24 00 04 stw r9,4(r4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc08850: 90 89 00 00 stw r4,0(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08854: 7c 00 01 24 mtmsr r0 ISR_Level level; _ISR_Disable( level ); _Chain_Append_unprotected( the_chain, node ); _ISR_Enable( level ); } ffc08858: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d998 <_Chain_Extract>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0d998: 7c 00 00 a6 mfmsr r0 ffc0d99c: 7d 30 42 a6 mfsprg r9,0 ffc0d9a0: 7c 09 48 78 andc r9,r0,r9 ffc0d9a4: 7d 20 01 24 mtmsr r9 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0d9a8: 81 63 00 04 lwz r11,4(r3) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0d9ac: 81 23 00 00 lwz r9,0(r3) previous = the_node->previous; next->previous = previous; previous->next = next; ffc0d9b0: 91 2b 00 00 stw r9,0(r11) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0d9b4: 91 69 00 04 stw r11,4(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0d9b8: 7c 00 01 24 mtmsr r0 ISR_Level level; _ISR_Disable( level ); _Chain_Extract_unprotected( node ); _ISR_Enable( level ); } ffc0d9bc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0885c <_Chain_Get>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0885c: 7c 00 00 a6 mfmsr r0 ffc08860: 7d 30 42 a6 mfsprg r9,0 ffc08864: 7c 09 48 78 andc r9,r0,r9 ffc08868: 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)); ffc0886c: 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; ffc08870: 39 63 00 04 addi r11,r3,4 ffc08874: 7f 89 58 00 cmpw cr7,r9,r11 <== ALWAYS TAKEN ffc08878: 40 be 00 0c bne+ cr7,ffc08884 <_Chain_Get+0x28> ffc0887c: 39 20 00 00 li r9,0 ffc08880: 48 00 00 10 b ffc08890 <_Chain_Get+0x34> <== ALWAYS TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; ffc08884: 81 69 00 00 lwz r11,0(r9) the_chain->first = new_first; ffc08888: 91 63 00 00 stw r11,0(r3) new_first->previous = _Chain_Head(the_chain); ffc0888c: 90 6b 00 04 stw r3,4(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08890: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); return return_node; } ffc08894: 7d 23 4b 78 mr r3,r9 ffc08898: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d9c0 <_Chain_Initialize>: Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; ffc0d9c0: 38 00 00 00 li r0,0 next = starting_address; ffc0d9c4: 38 a5 00 01 addi r5,r5,1 Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; ffc0d9c8: 90 03 00 04 stw r0,4(r3) next = starting_address; ffc0d9cc: 7c a9 03 a6 mtctr r5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; ffc0d9d0: 7c 69 1b 78 mr r9,r3 while ( count-- ) { ffc0d9d4: 48 00 00 14 b ffc0d9e8 <_Chain_Initialize+0x28> <== ALWAYS TAKEN current->next = next; next->previous = current; ffc0d9d8: 91 24 00 04 stw r9,4(r4) count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; ffc0d9dc: 90 89 00 00 stw r4,0(r9) next->previous = current; current = next; next = (Chain_Node *) ffc0d9e0: 7c 89 23 78 mr r9,r4 ffc0d9e4: 7c 84 32 14 add r4,r4,r6 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { ffc0d9e8: 42 00 ff f0 bdnz+ ffc0d9d8 <_Chain_Initialize+0x18> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); ffc0d9ec: 38 03 00 04 addi r0,r3,4 ffc0d9f0: 90 09 00 00 stw r0,0(r9) the_chain->last = current; ffc0d9f4: 91 23 00 08 stw r9,8(r3) } ffc0d9f8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc13a7c <_Chain_Insert>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc13a7c: 7c 00 00 a6 mfmsr r0 ffc13a80: 7d 30 42 a6 mfsprg r9,0 ffc13a84: 7c 09 48 78 andc r9,r0,r9 ffc13a88: 7d 20 01 24 mtmsr r9 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc13a8c: 81 23 00 00 lwz r9,0(r3) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc13a90: 90 64 00 04 stw r3,4(r4) before_node = after_node->next; after_node->next = the_node; ffc13a94: 90 83 00 00 stw r4,0(r3) the_node->next = before_node; before_node->previous = the_node; ffc13a98: 90 89 00 04 stw r4,4(r9) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc13a9c: 91 24 00 00 stw r9,0(r4) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc13aa0: 7c 00 01 24 mtmsr r0 ISR_Level level; _ISR_Disable( level ); _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); } ffc13aa4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d8e8 <_Debug_Manager_initialization>: */ void rtems_debug_disable ( rtems_debug_control to_be_disabled ) { _Debug_Level &= ~to_be_disabled; ffc0d8e8: 38 00 00 00 li r0,0 ffc0d8ec: 3d 20 00 00 lis r9,0 ffc0d8f0: 90 09 27 70 stw r0,10096(r9) * _Debug_Manager_initialization */ void _Debug_Manager_initialization( void ) { rtems_debug_disable( RTEMS_DEBUG_ALL_MASK ); } ffc0d8f4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d3b4 <_Dual_ported_memory_Manager_initialization>: * Output parameters: NONE */ void _Dual_ported_memory_Manager_initialization(void) { _Objects_Initialize_information( ffc0d3b4: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Dual_ported_memory_Manager_initialization(void) { ffc0d3b8: 94 21 ff f8 stwu r1,-8(r1) ffc0d3bc: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN _Objects_Initialize_information( ffc0d3c0: 3c 60 00 00 lis r3,0 ffc0d3c4: 80 c9 20 8c lwz r6,8332(r9) ffc0d3c8: 38 63 2e 44 addi r3,r3,11844 ffc0d3cc: 38 80 00 02 li r4,2 * * Output parameters: NONE */ void _Dual_ported_memory_Manager_initialization(void) { ffc0d3d0: 90 01 00 0c stw r0,12(r1) <== ALWAYS TAKEN _Objects_Initialize_information( ffc0d3d4: 38 a0 00 07 li r5,7 ffc0d3d8: 38 e0 00 1c li r7,28 <== ALWAYS TAKEN ffc0d3dc: 39 00 00 00 li r8,0 ffc0d3e0: 39 20 00 04 li r9,4 ffc0d3e4: 4b ff c4 8d bl ffc09870 <_Objects_Initialize_information> <== ALWAYS TAKEN , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc0d3e8: 80 01 00 0c lwz r0,12(r1) <== ALWAYS TAKEN ffc0d3ec: 38 21 00 08 addi r1,r1,8 ffc0d3f0: 7c 08 03 a6 mtlr r0 ffc0d3f4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d3f8 <_Event_Manager_initialization>: * This routine performs the initialization necessary for this manager. */ void _Event_Manager_initialization( void ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0d3f8: 38 00 00 00 li r0,0 ffc0d3fc: 3d 20 00 00 lis r9,0 ffc0d400: 90 09 27 a0 stw r0,10144(r9) */ #if defined(RTEMS_MULTIPROCESSING) _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet ); #endif } ffc0d404: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07574 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc07574: 94 21 ff f0 stwu r1,-16(r1) ffc07578: 7c 08 02 a6 mflr r0 rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; ffc0757c: 3d 20 00 00 lis r9,0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc07580: 93 e1 00 0c stw r31,12(r1) rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; ffc07584: 83 e9 27 6c lwz r31,10092(r9) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc07588: 90 01 00 14 stw r0,20(r1) ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; ffc0758c: 38 00 00 00 li r0,0 ffc07590: 90 1f 00 34 stw r0,52(r31) api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc07594: 81 5f 01 40 lwz r10,320(r31) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc07598: 7d 20 00 a6 mfmsr r9 ffc0759c: 7c 10 42 a6 mfsprg r0,0 ffc075a0: 7d 20 00 78 andc r0,r9,r0 ffc075a4: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); pending_events = api->pending_events; ffc075a8: 81 6a 00 00 lwz r11,0(r10) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && ffc075ac: 7c 60 58 39 and. r0,r3,r11 ffc075b0: 41 82 00 24 beq- ffc075d4 <_Event_Seize+0x60> ffc075b4: 7f 80 18 00 cmpw cr7,r0,r3 ffc075b8: 41 9e 00 0c beq- cr7,ffc075c4 <_Event_Seize+0x50> ffc075bc: 70 88 00 02 andi. r8,r4,2 ffc075c0: 41 a2 00 14 beq+ ffc075d4 <_Event_Seize+0x60> <== NEVER TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = ffc075c4: 7d 6b 00 78 andc r11,r11,r0 ffc075c8: 91 6a 00 00 stw r11,0(r10) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc075cc: 7d 20 01 24 mtmsr r9 ffc075d0: 48 00 00 18 b ffc075e8 <_Event_Seize+0x74> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { ffc075d4: 70 8b 00 01 andi. r11,r4,1 ffc075d8: 41 a2 00 18 beq+ ffc075f0 <_Event_Seize+0x7c> ffc075dc: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); executing->Wait.return_code = RTEMS_UNSATISFIED; ffc075e0: 39 20 00 0d li r9,13 ffc075e4: 91 3f 00 34 stw r9,52(r31) *event_out = seized_events; ffc075e8: 90 06 00 00 stw r0,0(r6) return; ffc075ec: 48 00 00 a0 b ffc0768c <_Event_Seize+0x118> <== ALWAYS TAKEN */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc075f0: 38 00 00 01 li r0,1 * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; ffc075f4: 90 9f 00 30 stw r4,48(r31) executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc075f8: 3d 60 00 00 lis r11,0 ffc075fc: 90 0b 27 a0 stw r0,10144(r11) * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; ffc07600: 90 7f 00 24 stw r3,36(r31) executing->Wait.return_argument = event_out; ffc07604: 90 df 00 28 stw r6,40(r31) ffc07608: 7d 20 01 24 mtmsr r9 _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { ffc0760c: 2f 85 00 00 cmpwi cr7,r5,0 ffc07610: 41 be 00 38 beq+ cr7,ffc07648 <_Event_Seize+0xd4> _Watchdog_Initialize( ffc07614: 81 3f 00 08 lwz r9,8(r31) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc07618: 3d 60 ff c0 lis r11,-64 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0761c: 38 00 00 00 li r0,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc07620: 90 bf 00 54 stw r5,84(r31) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc07624: 39 6b 78 5c addi r11,r11,30812 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc07628: 3c 60 00 00 lis r3,0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc0762c: 91 7f 00 64 stw r11,100(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc07630: 38 63 2c a8 addi r3,r3,11432 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc07634: 91 3f 00 68 stw r9,104(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc07638: 38 9f 00 48 addi r4,r31,72 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc0763c: 90 1f 00 6c stw r0,108(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc07640: 90 1f 00 50 stw r0,80(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc07644: 48 00 41 6d bl ffc0b7b0 <_Watchdog_Insert> <== ALWAYS TAKEN NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); ffc07648: 7f e3 fb 78 mr r3,r31 ffc0764c: 38 80 01 00 li r4,256 ffc07650: 48 00 36 c1 bl ffc0ad10 <_Thread_Set_state> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc07654: 7c a0 00 a6 mfmsr r5 ffc07658: 7c 10 42 a6 mfsprg r0,0 ffc0765c: 7c a0 00 78 andc r0,r5,r0 ffc07660: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); sync_state = _Event_Sync_state; ffc07664: 3d 20 00 00 lis r9,0 ffc07668: 80 69 27 a0 lwz r3,10144(r9) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0766c: 38 00 00 00 li r0,0 ffc07670: 90 09 27 a0 stw r0,10144(r9) if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { ffc07674: 2f 83 00 01 cmpwi cr7,r3,1 ffc07678: 40 be 00 0c bne+ cr7,ffc07684 <_Event_Seize+0x110> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0767c: 7c a0 01 24 mtmsr r5 ffc07680: 48 00 00 0c b ffc0768c <_Event_Seize+0x118> <== ALWAYS TAKEN * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); ffc07684: 7f e4 fb 78 mr r4,r31 ffc07688: 48 00 25 35 bl ffc09bbc <_Thread_blocking_operation_Cancel> <== ALWAYS TAKEN } ffc0768c: 80 01 00 14 lwz r0,20(r1) ffc07690: 83 e1 00 0c lwz r31,12(r1) ffc07694: 38 21 00 10 addi r1,r1,16 ffc07698: 7c 08 03 a6 mtlr r0 ffc0769c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07714 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { ffc07714: 94 21 ff f0 stwu r1,-16(r1) ffc07718: 7c 08 02 a6 mflr r0 ffc0771c: 90 01 00 14 stw r0,20(r1) ffc07720: 93 e1 00 0c stw r31,12(r1) ffc07724: 7c 7f 1b 78 mr r31,r3 rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; ffc07728: 81 03 01 40 lwz r8,320(r3) option_set = (rtems_option) the_thread->Wait.option; ffc0772c: 80 e3 00 30 lwz r7,48(r3) <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc07730: 7c 00 00 a6 mfmsr r0 ffc07734: 7d 30 42 a6 mfsprg r9,0 ffc07738: 7c 09 48 78 andc r9,r0,r9 ffc0773c: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); pending_events = api->pending_events; ffc07740: 81 68 00 00 lwz r11,0(r8) event_condition = (rtems_event_set) the_thread->Wait.count; ffc07744: 81 43 00 24 lwz r10,36(r3) seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { ffc07748: 7d 49 58 39 and. r9,r10,r11 ffc0774c: 40 a2 00 08 bne+ ffc07754 <_Event_Surrender+0x40> _ISR_Enable( level ); ffc07750: 48 00 00 f4 b ffc07844 <_Event_Surrender+0x130> <== ALWAYS TAKEN /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && ffc07754: 3c c0 00 00 lis r6,0 ffc07758: 80 c6 27 54 lwz r6,10068(r6) ffc0775c: 2f 86 00 00 cmpwi cr7,r6,0 ffc07760: 41 9e 00 68 beq- cr7,ffc077c8 <_Event_Surrender+0xb4> ffc07764: 3c c0 00 00 lis r6,0 ffc07768: 80 c6 27 6c lwz r6,10092(r6) ffc0776c: 7f 83 30 00 cmpw cr7,r3,r6 ffc07770: 40 be 00 58 bne+ cr7,ffc077c8 <_Event_Surrender+0xb4> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || ffc07774: 3c c0 00 00 lis r6,0 ffc07778: 80 a6 27 a0 lwz r5,10144(r6) /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && ffc0777c: 2f 85 00 02 cmpwi cr7,r5,2 ffc07780: 41 9e 00 10 beq- cr7,ffc07790 <_Event_Surrender+0x7c> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { ffc07784: 80 c6 27 a0 lwz r6,10144(r6) /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && ffc07788: 2f 86 00 01 cmpwi cr7,r6,1 ffc0778c: 40 be 00 3c bne+ cr7,ffc077c8 <_Event_Surrender+0xb4> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { ffc07790: 7f 89 50 00 cmpw cr7,r9,r10 ffc07794: 41 9e 00 0c beq- cr7,ffc077a0 <_Event_Surrender+0x8c> ffc07798: 70 e5 00 02 andi. r5,r7,2 ffc0779c: 41 82 00 28 beq- ffc077c4 <_Event_Surrender+0xb0> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); ffc077a0: 7d 6b 48 78 andc r11,r11,r9 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc077a4: 81 5f 00 28 lwz r10,40(r31) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); ffc077a8: 91 68 00 00 stw r11,0(r8) the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc077ac: 3d 60 00 00 lis r11,0 ffc077b0: 39 00 00 03 li r8,3 ffc077b4: 91 0b 27 a0 stw r8,10144(r11) _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; ffc077b8: 39 60 00 00 li r11,0 ffc077bc: 91 7f 00 24 stw r11,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc077c0: 91 2a 00 00 stw r9,0(r10) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; } _ISR_Enable( level ); ffc077c4: 48 00 00 80 b ffc07844 <_Event_Surrender+0x130> <== ALWAYS TAKEN } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { ffc077c8: 80 df 00 10 lwz r6,16(r31) ffc077cc: 70 c5 01 00 andi. r5,r6,256 ffc077d0: 41 82 00 74 beq- ffc07844 <_Event_Surrender+0x130> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { ffc077d4: 7f 89 50 00 cmpw cr7,r9,r10 ffc077d8: 41 9e 00 0c beq- cr7,ffc077e4 <_Event_Surrender+0xd0> ffc077dc: 70 ea 00 02 andi. r10,r7,2 ffc077e0: 41 82 00 64 beq- ffc07844 <_Event_Surrender+0x130> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc077e4: 81 5f 00 28 lwz r10,40(r31) /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); ffc077e8: 7d 6b 48 78 andc r11,r11,r9 ffc077ec: 91 68 00 00 stw r11,0(r8) the_thread->Wait.count = 0; ffc077f0: 39 60 00 00 li r11,0 ffc077f4: 91 7f 00 24 stw r11,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc077f8: 91 2a 00 00 stw r9,0(r10) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc077fc: 7d 20 00 a6 mfmsr r9 ffc07800: 7c 00 01 24 mtmsr r0 ffc07804: 7d 20 01 24 mtmsr r9 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc07808: 81 3f 00 50 lwz r9,80(r31) ffc0780c: 2f 89 00 02 cmpwi cr7,r9,2 ffc07810: 41 9e 00 0c beq- cr7,ffc0781c <_Event_Surrender+0x108> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc07814: 7c 00 01 24 mtmsr r0 ffc07818: 48 00 00 18 b ffc07830 <_Event_Surrender+0x11c> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc0781c: 39 20 00 03 li r9,3 ffc07820: 91 3f 00 50 stw r9,80(r31) ffc07824: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc07828: 38 7f 00 48 addi r3,r31,72 ffc0782c: 48 00 40 dd bl ffc0b908 <_Watchdog_Remove> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc07830: 3c 80 10 03 lis r4,4099 ffc07834: 7f e3 fb 78 mr r3,r31 ffc07838: 60 84 ff f8 ori r4,r4,65528 ffc0783c: 48 00 25 8d bl ffc09dc8 <_Thread_Clear_state> <== ALWAYS TAKEN ffc07840: 48 00 00 08 b ffc07848 <_Event_Surrender+0x134> <== ALWAYS TAKEN ffc07844: 7c 00 01 24 mtmsr r0 } return; } } _ISR_Enable( level ); } ffc07848: 80 01 00 14 lwz r0,20(r1) ffc0784c: 83 e1 00 0c lwz r31,12(r1) ffc07850: 38 21 00 10 addi r1,r1,16 ffc07854: 7c 08 03 a6 mtlr r0 ffc07858: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0785c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { ffc0785c: 94 21 ff e8 stwu r1,-24(r1) ffc07860: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc07864: 38 81 00 08 addi r4,r1,8 void _Event_Timeout( Objects_Id id, void *ignored ) { ffc07868: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc0786c: 48 00 2a 61 bl ffc0a2cc <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc07870: 80 01 00 08 lwz r0,8(r1) ffc07874: 2f 80 00 00 cmpwi cr7,r0,0 ffc07878: 40 9e 00 68 bne- cr7,ffc078e0 <_Event_Timeout+0x84> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0787c: 7d 60 00 a6 mfmsr r11 ffc07880: 7d 30 42 a6 mfsprg r9,0 ffc07884: 7d 69 48 78 andc r9,r11,r9 ffc07888: 7d 20 01 24 mtmsr r9 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { ffc0788c: 3d 20 00 00 lis r9,0 _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; ffc07890: 90 03 00 24 stw r0,36(r3) if ( _Thread_Is_executing( the_thread ) ) { ffc07894: 81 29 27 6c lwz r9,10092(r9) ffc07898: 7f 83 48 00 cmpw cr7,r3,r9 ffc0789c: 40 be 00 1c bne+ cr7,ffc078b8 <_Event_Timeout+0x5c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) ffc078a0: 3d 20 00 00 lis r9,0 ffc078a4: 80 09 27 a0 lwz r0,10144(r9) ffc078a8: 2f 80 00 01 cmpwi cr7,r0,1 ffc078ac: 40 be 00 0c bne+ cr7,ffc078b8 <_Event_Timeout+0x5c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc078b0: 38 00 00 02 li r0,2 ffc078b4: 90 09 27 a0 stw r0,10144(r9) } the_thread->Wait.return_code = RTEMS_TIMEOUT; ffc078b8: 38 00 00 06 li r0,6 ffc078bc: 90 03 00 34 stw r0,52(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc078c0: 7d 60 01 24 mtmsr r11 ffc078c4: 3c 80 10 03 lis r4,4099 ffc078c8: 60 84 ff f8 ori r4,r4,65528 ffc078cc: 48 00 24 fd bl ffc09dc8 <_Thread_Clear_state> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc078d0: 3d 20 00 00 lis r9,0 ffc078d4: 81 69 27 2c lwz r11,10028(r9) ffc078d8: 38 0b ff ff addi r0,r11,-1 ffc078dc: 90 09 27 2c stw r0,10028(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc078e0: 80 01 00 1c lwz r0,28(r1) ffc078e4: 38 21 00 18 addi r1,r1,24 ffc078e8: 7c 08 03 a6 mtlr r0 ffc078ec: 4e 80 00 20 blr <== ALWAYS TAKEN ffc083a4 <_Extension_Manager_initialization>: * Output parameters: NONE */ void _Extension_Manager_initialization(void) { _Objects_Initialize_information( ffc083a4: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Extension_Manager_initialization(void) { ffc083a8: 94 21 ff f8 stwu r1,-8(r1) ffc083ac: 7c 08 02 a6 mflr r0 _Objects_Initialize_information( ffc083b0: 3c 60 00 00 lis r3,0 ffc083b4: 80 c9 20 a8 lwz r6,8360(r9) ffc083b8: 38 63 2d c4 addi r3,r3,11716 ffc083bc: 38 80 00 02 li r4,2 * * Output parameters: NONE */ void _Extension_Manager_initialization(void) { ffc083c0: 90 01 00 0c stw r0,12(r1) _Objects_Initialize_information( ffc083c4: 38 a0 00 09 li r5,9 ffc083c8: 38 e0 00 44 li r7,68 ffc083cc: 39 00 00 00 li r8,0 ffc083d0: 39 20 00 04 li r9,4 ffc083d4: 48 00 14 9d bl ffc09870 <_Objects_Initialize_information> <== ALWAYS TAKEN , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc083d8: 80 01 00 0c lwz r0,12(r1) ffc083dc: 38 21 00 08 addi r1,r1,8 ffc083e0: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc083e4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0dc84 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc0dc84: 94 21 ff d8 stwu r1,-40(r1) ffc0dc88: 7c 08 02 a6 mflr r0 ffc0dc8c: 7d 80 00 26 mfcr r12 <== ALWAYS TAKEN ffc0dc90: 7c 89 23 78 mr r9,r4 <== ALWAYS TAKEN ffc0dc94: 90 01 00 2c stw r0,44(r1) Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; ffc0dc98: 38 04 00 04 addi r0,r4,4 uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { ffc0dc9c: 7f 80 20 40 cmplw cr7,r0,r4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc0dca0: 93 c1 00 20 stw r30,32(r1) <== ALWAYS TAKEN ffc0dca4: 7c 7e 1b 78 mr r30,r3 <== ALWAYS TAKEN ffc0dca8: 93 41 00 10 stw r26,16(r1) ffc0dcac: 93 61 00 14 stw r27,20(r1) ffc0dcb0: 93 81 00 18 stw r28,24(r1) ffc0dcb4: 93 a1 00 1c stw r29,28(r1) <== ALWAYS TAKEN ffc0dcb8: 93 e1 00 24 stw r31,36(r1) ffc0dcbc: 91 81 00 0c stw r12,12(r1) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0dcc0: 80 83 00 08 lwz r4,8(r3) Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; ffc0dcc4: 81 43 00 10 lwz r10,16(r3) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { ffc0dcc8: 41 9c 01 48 blt- cr7,ffc0de10 <_Heap_Allocate_aligned_with_boundary+0x18c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { ffc0dccc: 2f 86 00 00 cmpwi cr7,r6,0 ffc0dcd0: 41 be 00 18 beq+ cr7,ffc0dce8 <_Heap_Allocate_aligned_with_boundary+0x64> if ( boundary < alloc_size ) { ffc0dcd4: 7f 86 48 40 cmplw cr7,r6,r9 ffc0dcd8: 41 9c 01 38 blt- cr7,ffc0de10 <_Heap_Allocate_aligned_with_boundary+0x18c> return NULL; } if ( alignment == 0 ) { ffc0dcdc: 2f 85 00 00 cmpwi cr7,r5,0 ffc0dce0: 40 9e 00 08 bne- cr7,ffc0dce8 <_Heap_Allocate_aligned_with_boundary+0x64> ffc0dce4: 7d 45 53 78 mr r5,r10 ffc0dce8: 3b a0 00 00 li r29,0 <== ALWAYS TAKEN * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { if ( alignment == 0 ) { ffc0dcec: 2f 05 00 00 cmpwi cr6,r5,0 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; ffc0dcf0: 3b 8a 00 07 addi r28,r10,7 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; ffc0dcf4: 21 89 00 04 subfic r12,r9,4 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { ffc0dcf8: 2f 86 00 00 cmpwi cr7,r6,0 <== ALWAYS TAKEN ffc0dcfc: 48 00 00 d0 b ffc0ddcc <_Heap_Allocate_aligned_with_boundary+0x148> <== ALWAYS TAKEN /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { ffc0dd00: 81 64 00 04 lwz r11,4(r4) while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; ffc0dd04: 3b bd 00 01 addi r29,r29,1 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { ffc0dd08: 7c 8b 00 40 cmplw cr1,r11,r0 ffc0dd0c: 40 85 00 bc ble- cr1,ffc0ddc8 <_Heap_Allocate_aligned_with_boundary+0x144> ffc0dd10: 38 e4 00 08 addi r7,r4,8 if ( alignment == 0 ) { ffc0dd14: 40 9a 00 0c bne- cr6,ffc0dd20 <_Heap_Allocate_aligned_with_boundary+0x9c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0dd18: 7c ff 3b 78 mr r31,r7 ffc0dd1c: 48 00 00 a4 b ffc0ddc0 <_Heap_Allocate_aligned_with_boundary+0x13c> <== ALWAYS TAKEN uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; ffc0dd20: 55 6b 00 3c rlwinm r11,r11,0,0,30 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; ffc0dd24: 80 7e 00 14 lwz r3,20(r30) uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; ffc0dd28: 7d 64 5a 14 add r11,r4,r11 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; ffc0dd2c: 7f ec 5a 14 add r31,r12,r11 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0dd30: 7f ff 2b 96 divwu r31,r31,r5 ffc0dd34: 7f ff 29 d6 mullw r31,r31,r5 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; ffc0dd38: 7d 03 e0 50 subf r8,r3,r28 ffc0dd3c: 7d 68 5a 14 add r11,r8,r11 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { ffc0dd40: 7c 9f 58 40 cmplw cr1,r31,r11 ffc0dd44: 40 85 00 0c ble- cr1,ffc0dd50 <_Heap_Allocate_aligned_with_boundary+0xcc> ffc0dd48: 7f eb 2b 96 divwu r31,r11,r5 ffc0dd4c: 7f ff 29 d6 mullw r31,r31,r5 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { ffc0dd50: 41 9e 00 48 beq- cr7,ffc0dd98 <_Heap_Allocate_aligned_with_boundary+0x114> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; ffc0dd54: 7d 1f 4a 14 add r8,r31,r9 ffc0dd58: 7d 68 33 96 divwu r11,r8,r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; ffc0dd5c: 7f 67 4a 14 add r27,r7,r9 ffc0dd60: 7d 6b 31 d6 mullw r11,r11,r6 ffc0dd64: 48 00 00 1c b ffc0dd80 <_Heap_Allocate_aligned_with_boundary+0xfc> <== ALWAYS TAKEN uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { ffc0dd68: 41 80 00 60 blt- ffc0ddc8 <_Heap_Allocate_aligned_with_boundary+0x144> ffc0dd6c: 7f fa 2b 96 divwu r31,r26,r5 ffc0dd70: 7f ff 29 d6 mullw r31,r31,r5 return 0; } alloc_begin = boundary_line - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; ffc0dd74: 7d 1f 4a 14 add r8,r31,r9 ffc0dd78: 7d 68 33 96 divwu r11,r8,r6 ffc0dd7c: 7d 6b 31 d6 mullw r11,r11,r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc0dd80: 7e 1f 58 40 cmplw cr4,r31,r11 if ( boundary_line < boundary_floor ) { return 0; } alloc_begin = boundary_line - alloc_size; ffc0dd84: 7f 49 58 50 subf r26,r9,r11 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc0dd88: 7c 8b 40 40 cmplw cr1,r11,r8 if ( boundary_line < boundary_floor ) { ffc0dd8c: 7c 0b d8 40 cmplw r11,r27 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc0dd90: 40 90 00 08 bge- cr4,ffc0dd98 <_Heap_Allocate_aligned_with_boundary+0x114> ffc0dd94: 41 84 ff d4 blt+ cr1,ffc0dd68 <_Heap_Allocate_aligned_with_boundary+0xe4> boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { ffc0dd98: 7c 9f 38 40 cmplw cr1,r31,r7 ffc0dd9c: 41 84 00 2c blt- cr1,ffc0ddc8 <_Heap_Allocate_aligned_with_boundary+0x144> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; ffc0dda0: 7d 7f 53 96 divwu r11,r31,r10 ffc0dda4: 7d 6b 51 d6 mullw r11,r11,r10 ffc0dda8: 21 04 ff f8 subfic r8,r4,-8 ffc0ddac: 7d 68 5a 14 add r11,r8,r11 if ( free_size >= min_block_size || free_size == 0 ) { ffc0ddb0: 7c 8b 18 40 cmplw cr1,r11,r3 ffc0ddb4: 40 84 00 0c bge- cr1,ffc0ddc0 <_Heap_Allocate_aligned_with_boundary+0x13c> ffc0ddb8: 2c 8b 00 00 cmpwi cr1,r11,0 ffc0ddbc: 40 86 00 0c bne- cr1,ffc0ddc8 <_Heap_Allocate_aligned_with_boundary+0x144> boundary ); } } if ( alloc_begin != 0 ) { ffc0ddc0: 2c 9f 00 00 cmpwi cr1,r31,0 ffc0ddc4: 40 86 00 18 bne- cr1,ffc0dddc <_Heap_Allocate_aligned_with_boundary+0x158> <== ALWAYS TAKEN break; } block = block->next; ffc0ddc8: 80 84 00 08 lwz r4,8(r4) <== ALWAYS TAKEN if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { ffc0ddcc: 7c 84 f0 00 cmpw cr1,r4,r30 ffc0ddd0: 40 86 ff 30 bne+ cr1,ffc0dd00 <_Heap_Allocate_aligned_with_boundary+0x7c> ffc0ddd4: 3b e0 00 00 li r31,0 ffc0ddd8: 48 00 00 20 b ffc0ddf8 <_Heap_Allocate_aligned_with_boundary+0x174> <== ALWAYS TAKEN block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; ffc0dddc: 80 1e 00 4c lwz r0,76(r30) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc0dde0: 7d 26 4b 78 mr r6,r9 ffc0dde4: 7f c3 f3 78 mr r3,r30 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; ffc0dde8: 7c 00 ea 14 add r0,r0,r29 ffc0ddec: 90 1e 00 4c stw r0,76(r30) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc0ddf0: 7f e5 fb 78 mr r5,r31 ffc0ddf4: 4b ff b2 69 bl ffc0905c <_Heap_Block_allocate> <== ALWAYS TAKEN uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; ffc0ddf8: 80 1e 00 44 lwz r0,68(r30) <== ALWAYS TAKEN ffc0ddfc: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0de00: 40 9c 00 08 bge- cr7,ffc0de08 <_Heap_Allocate_aligned_with_boundary+0x184> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; ffc0de04: 93 be 00 44 stw r29,68(r30) } return (void *) alloc_begin; ffc0de08: 7f e3 fb 78 mr r3,r31 ffc0de0c: 48 00 00 08 b ffc0de14 <_Heap_Allocate_aligned_with_boundary+0x190> <== ALWAYS TAKEN ffc0de10: 38 60 00 00 li r3,0 } ffc0de14: 80 01 00 2c lwz r0,44(r1) ffc0de18: 81 81 00 0c lwz r12,12(r1) ffc0de1c: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0de20: 83 41 00 10 lwz r26,16(r1) ffc0de24: 83 61 00 14 lwz r27,20(r1) ffc0de28: 7d 80 81 20 mtcrf 8,r12 ffc0de2c: 83 81 00 18 lwz r28,24(r1) ffc0de30: 83 a1 00 1c lwz r29,28(r1) ffc0de34: 83 c1 00 20 lwz r30,32(r1) ffc0de38: 83 e1 00 24 lwz r31,36(r1) ffc0de3c: 38 21 00 28 addi r1,r1,40 <== ALWAYS TAKEN ffc0de40: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0905c <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { ffc0905c: 94 21 ff e8 stwu r1,-24(r1) ffc09060: 7c 08 02 a6 mflr r0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc09064: 39 45 ff f8 addi r10,r5,-8 ffc09068: 90 01 00 1c stw r0,28(r1) ffc0906c: 7c a9 2b 78 mr r9,r5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { ffc09070: 80 04 00 04 lwz r0,4(r4) Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { ffc09074: 93 e1 00 14 stw r31,20(r1) <== ALWAYS TAKEN ffc09078: 7c 9f 23 78 mr r31,r4 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { ffc0907c: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc09080: 7d 64 02 14 add r11,r4,r0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { ffc09084: 93 c1 00 10 stw r30,16(r1) Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; ffc09088: 7c ff 50 50 subf r7,r31,r10 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { ffc0908c: 80 0b 00 04 lwz r0,4(r11) Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { ffc09090: 7c 7e 1b 78 mr r30,r3 ffc09094: 93 a1 00 0c stw r29,12(r1) /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); ffc09098: 7c 6b 1b 78 mr r11,r3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { ffc0909c: 70 08 00 01 andi. r8,r0,1 ffc090a0: 40 82 00 40 bne- ffc090e0 <_Heap_Block_allocate+0x84> _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; ffc090a4: 81 03 00 40 lwz r8,64(r3) free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ffc090a8: 81 63 00 38 lwz r11,56(r3) ++stats->used_blocks; ffc090ac: 38 08 00 01 addi r0,r8,1 stats->free_size -= _Heap_Block_size( block ); ffc090b0: 80 a3 00 30 lwz r5,48(r3) free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ffc090b4: 39 6b ff ff addi r11,r11,-1 ++stats->used_blocks; ffc090b8: 90 03 00 40 stw r0,64(r3) free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ffc090bc: 91 63 00 38 stw r11,56(r3) ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); ffc090c0: 80 1f 00 04 lwz r0,4(r31) Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { free_list_anchor = block->prev; ffc090c4: 81 7f 00 0c lwz r11,12(r31) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; ffc090c8: 81 1f 00 08 lwz r8,8(r31) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); ffc090cc: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc090d0: 7c 00 28 50 subf r0,r0,r5 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; ffc090d4: 91 68 00 0c stw r11,12(r8) ffc090d8: 90 03 00 30 stw r0,48(r3) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; ffc090dc: 91 0b 00 08 stw r8,8(r11) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { ffc090e0: 81 1e 00 10 lwz r8,16(r30) ffc090e4: 7f 87 40 40 cmplw cr7,r7,r8 ffc090e8: 40 bc 00 1c bge+ cr7,ffc09104 <_Heap_Block_allocate+0xa8> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); ffc090ec: 7c c7 32 14 add r6,r7,r6 ffc090f0: 7d 65 5b 78 mr r5,r11 ffc090f4: 7f c3 f3 78 mr r3,r30 ffc090f8: 7f e4 fb 78 mr r4,r31 ffc090fc: 4b ff fe 6d bl ffc08f68 <_Heap_Block_split> <== ALWAYS TAKEN ffc09100: 48 00 00 a0 b ffc091a0 <_Heap_Block_allocate+0x144> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) ffc09104: 7f a9 43 96 divwu r29,r9,r8 _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; ffc09108: 80 fe 00 30 lwz r7,48(r30) - 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; ffc0910c: 80 1f 00 04 lwz r0,4(r31) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) ffc09110: 7f bd 41 d6 mullw r29,r29,r8 ffc09114: 7f bd 48 50 subf r29,r29,r9 ffc09118: 7f bd 50 50 subf r29,r29,r10 _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; ffc0911c: 7d 3f e8 50 subf r9,r31,r29 _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; ffc09120: 7d 47 4a 14 add r10,r7,r9 ffc09124: 91 5e 00 30 stw r10,48(r30) if ( _Heap_Is_prev_used( block ) ) { ffc09128: 81 5f 00 04 lwz r10,4(r31) ffc0912c: 71 48 00 01 andi. r8,r10,1 ffc09130: 41 82 00 2c beq- ffc0915c <_Heap_Block_allocate+0x100> _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; ffc09134: 81 1e 00 38 lwz r8,56(r30) ffc09138: 7f e5 fb 78 mr r5,r31 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc0913c: 81 4b 00 08 lwz r10,8(r11) ffc09140: 39 08 00 01 addi r8,r8,1 new_block->next = next; new_block->prev = block_before; ffc09144: 91 7f 00 0c stw r11,12(r31) Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; ffc09148: 91 5f 00 08 stw r10,8(r31) ffc0914c: 91 1e 00 38 stw r8,56(r30) new_block->prev = block_before; block_before->next = new_block; ffc09150: 93 eb 00 08 stw r31,8(r11) next->prev = new_block; ffc09154: 93 ea 00 0c stw r31,12(r10) ffc09158: 48 00 00 1c b ffc09174 <_Heap_Block_allocate+0x118> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); ffc0915c: 81 5f 00 00 lwz r10,0(r31) Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; ffc09160: 7d 65 5b 78 mr r5,r11 ffc09164: 7f ea f8 50 subf r31,r10,r31 ffc09168: 81 7f 00 04 lwz r11,4(r31) ffc0916c: 55 6b 00 3c rlwinm r11,r11,0,0,30 ffc09170: 7d 29 5a 14 add r9,r9,r11 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; ffc09174: 54 00 00 3c rlwinm r0,r0,0,0,30 block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; ffc09178: 91 3d 00 00 stw r9,0(r29) new_block->size_and_flag = new_block_size; ffc0917c: 7c 04 02 14 add r0,r4,r0 ffc09180: 7c 1d 00 50 subf r0,r29,r0 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; ffc09184: 61 2b 00 01 ori r11,r9,1 ffc09188: 91 7f 00 04 stw r11,4(r31) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); ffc0918c: 7f c3 f3 78 mr r3,r30 <== ALWAYS TAKEN ffc09190: 7f a4 eb 78 mr r4,r29 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; ffc09194: 90 1d 00 04 stw r0,4(r29) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); ffc09198: 7f bf eb 78 mr r31,r29 ffc0919c: 4b ff fd cd bl ffc08f68 <_Heap_Block_split> <== ALWAYS TAKEN alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { ffc091a0: 80 1e 00 30 lwz r0,48(r30) Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; ffc091a4: 81 3e 00 34 lwz r9,52(r30) ffc091a8: 7f 89 00 40 cmplw cr7,r9,r0 ffc091ac: 40 9d 00 08 ble- cr7,ffc091b4 <_Heap_Block_allocate+0x158> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; ffc091b0: 90 1e 00 34 stw r0,52(r30) } return block; } ffc091b4: 80 01 00 1c lwz r0,28(r1) ffc091b8: 7f e3 fb 78 mr r3,r31 ffc091bc: 83 a1 00 0c lwz r29,12(r1) ffc091c0: 7c 08 03 a6 mtlr r0 ffc091c4: 83 c1 00 10 lwz r30,16(r1) ffc091c8: 83 e1 00 14 lwz r31,20(r1) ffc091cc: 38 21 00 18 addi r1,r1,24 ffc091d0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08f68 <_Heap_Block_split>: ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; ffc08f68: 81 23 00 14 lwz r9,20(r3) - 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; ffc08f6c: 81 64 00 04 lwz r11,4(r4) <== ALWAYS TAKEN uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; ffc08f70: 38 09 ff f8 addi r0,r9,-8 uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; ffc08f74: 80 e3 00 10 lwz r7,16(r3) <== ALWAYS TAKEN uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; ffc08f78: 7f 86 00 40 cmplw cr7,r6,r0 ffc08f7c: 55 68 00 3c rlwinm r8,r11,0,0,30 ffc08f80: 40 9c 00 08 bge- cr7,ffc08f88 <_Heap_Block_split+0x20> ffc08f84: 7c 06 03 78 mr r6,r0 ffc08f88: 38 c6 00 08 addi r6,r6,8 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; ffc08f8c: 7d 46 3b 96 divwu r10,r6,r7 ffc08f90: 7d 4a 39 d6 mullw r10,r10,r7 if ( remainder != 0 ) { ffc08f94: 7f 86 50 00 cmpw cr7,r6,r10 return value - remainder + alignment; ffc08f98: 7d 4a 3a 14 add r10,r10,r7 uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { ffc08f9c: 40 9e 00 08 bne- cr7,ffc08fa4 <_Heap_Block_split+0x3c> ffc08fa0: 7c ca 33 78 mr r10,r6 Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { ffc08fa4: 38 08 00 04 addi r0,r8,4 ffc08fa8: 39 29 00 04 addi r9,r9,4 <== ALWAYS TAKEN ffc08fac: 7c c6 00 50 subf r6,r6,r0 ffc08fb0: 7f 86 48 40 cmplw cr7,r6,r9 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc08fb4: 7d 24 42 14 add r9,r4,r8 ffc08fb8: 41 9c 00 94 blt- cr7,ffc0904c <_Heap_Block_split+0xe4> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; ffc08fbc: 55 6b 07 fe clrlwi r11,r11,31 ffc08fc0: 7d 4b 5b 78 or r11,r10,r11 ffc08fc4: 91 64 00 04 stw r11,4(r4) <== ALWAYS TAKEN Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; ffc08fc8: 7c 0a 40 50 subf r0,r10,r8 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc08fcc: 7c 8a 22 14 add r4,r10,r4 _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; ffc08fd0: 81 63 00 30 lwz r11,48(r3) ffc08fd4: 7d 6b 02 14 add r11,r11,r0 ffc08fd8: 91 63 00 30 stw r11,48(r3) - 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; ffc08fdc: 81 09 00 04 lwz r8,4(r9) ffc08fe0: 55 08 00 3c rlwinm r8,r8,0,0,30 if ( _Heap_Is_used( next_block ) ) { ffc08fe4: 7d 69 42 14 add r11,r9,r8 ffc08fe8: 81 6b 00 04 lwz r11,4(r11) ffc08fec: 71 6a 00 01 andi. r10,r11,1 ffc08ff0: 41 82 00 24 beq- ffc09014 <_Heap_Block_split+0xac> _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; ffc08ff4: 81 43 00 38 lwz r10,56(r3) RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc08ff8: 81 65 00 08 lwz r11,8(r5) ffc08ffc: 39 4a 00 01 addi r10,r10,1 <== ALWAYS TAKEN new_block->next = next; new_block->prev = block_before; ffc09000: 90 a4 00 0c stw r5,12(r4) <== ALWAYS TAKEN Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; ffc09004: 91 64 00 08 stw r11,8(r4) ffc09008: 91 43 00 38 stw r10,56(r3) <== ALWAYS TAKEN new_block->prev = block_before; block_before->next = new_block; ffc0900c: 90 85 00 08 stw r4,8(r5) ffc09010: 48 00 00 20 b ffc09030 <_Heap_Block_split+0xc8> <== ALWAYS TAKEN Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; ffc09014: 81 49 00 0c lwz r10,12(r9) } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; ffc09018: 7c 00 42 14 add r0,r0,r8 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; ffc0901c: 81 69 00 08 lwz r11,8(r9) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc09020: 7d 20 22 14 add r9,r0,r4 { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; ffc09024: 91 44 00 0c stw r10,12(r4) ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; ffc09028: 91 64 00 08 stw r11,8(r4) new_block->prev = prev; next->prev = new_block; prev->next = new_block; ffc0902c: 90 8a 00 08 stw r4,8(r10) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; ffc09030: 90 8b 00 0c stw r4,12(r11) <== ALWAYS TAKEN next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; ffc09034: 60 0b 00 01 ori r11,r0,1 ffc09038: 91 64 00 04 stw r11,4(r4) next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc0903c: 81 69 00 04 lwz r11,4(r9) next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; ffc09040: 90 09 00 00 stw r0,0(r9) <== ALWAYS TAKEN next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc09044: 55 60 00 3c rlwinm r0,r11,0,0,30 <== ALWAYS TAKEN ffc09048: 48 00 00 0c b ffc09054 <_Heap_Block_split+0xec> <== ALWAYS TAKEN } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; ffc0904c: 80 09 00 04 lwz r0,4(r9) <== ALWAYS TAKEN ffc09050: 60 00 00 01 ori r0,r0,1 ffc09054: 90 09 00 04 stw r0,4(r9) ffc09058: 4e 80 00 20 blr <== ALWAYS TAKEN ffc128ac <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { ffc128ac: 7c 08 02 a6 mflr r0 ffc128b0: 94 21 ff f8 stwu r1,-8(r1) ffc128b4: 7c 69 1b 78 mr r9,r3 ffc128b8: 90 01 00 0c stw r0,12(r1) Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; ffc128bc: 80 03 00 18 lwz r0,24(r3) uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; ffc128c0: 81 43 00 24 lwz r10,36(r3) uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; ffc128c4: 7f 84 00 40 cmplw cr7,r4,r0 uintptr_t const heap_area_end = heap->area_end; ffc128c8: 80 03 00 1c lwz r0,28(r3) uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; ffc128cc: 41 bc 00 10 blt+ cr7,ffc128dc <_Heap_Extend+0x30> * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { ffc128d0: 7f 84 00 40 cmplw cr7,r4,r0 ffc128d4: 38 60 00 01 li r3,1 ffc128d8: 41 9c 00 9c blt- cr7,ffc12974 <_Heap_Extend+0xc8> return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { ffc128dc: 7f 84 00 00 cmpw cr7,r4,r0 ffc128e0: 38 60 00 02 li r3,2 ffc128e4: 40 be 00 90 bne+ cr7,ffc12974 <_Heap_Extend+0xc8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc128e8: 81 69 00 10 lwz r11,16(r9) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; ffc128ec: 7c 84 2a 14 add r4,r4,r5 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end ffc128f0: 20 0a ff f8 subfic r0,r10,-8 * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; ffc128f4: 90 89 00 1c stw r4,28(r9) extend_size = new_heap_area_end ffc128f8: 7c 00 22 14 add r0,r0,r4 ffc128fc: 7c 00 5b 96 divwu r0,r0,r11 ffc12900: 7c 00 59 d6 mullw r0,r0,r11 - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; if( extend_size >= heap->min_block_size ) { ffc12904: 38 60 00 00 li r3,0 extend_size = new_heap_area_end - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; ffc12908: 90 06 00 00 stw r0,0(r6) if( extend_size >= heap->min_block_size ) { ffc1290c: 81 69 00 14 lwz r11,20(r9) ffc12910: 7f 80 58 40 cmplw cr7,r0,r11 ffc12914: 41 bc 00 60 blt+ cr7,ffc12974 <_Heap_Extend+0xc8> <== NEVER TAKEN uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; ffc12918: 80 ea 00 04 lwz r7,4(r10) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc1291c: 7d 60 52 14 add r11,r0,r10 Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = ffc12920: 81 09 00 20 lwz r8,32(r9) /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); ffc12924: 38 8a 00 08 addi r4,r10,8 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; ffc12928: 54 e7 07 fe clrlwi r7,r7,31 new_last_block->size_and_flag = ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; ffc1292c: 91 69 00 24 stw r11,36(r9) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = ffc12930: 7d 0b 40 50 subf r8,r11,r8 ffc12934: 7c 07 3b 78 or r7,r0,r7 ffc12938: 61 08 00 01 ori r8,r8,1 ffc1293c: 90 ea 00 04 stw r7,4(r10) /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); ffc12940: 7d 23 4b 78 mr r3,r9 if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = ffc12944: 91 0b 00 04 stw r8,4(r11) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ffc12948: 80 e9 00 2c lwz r7,44(r9) ++stats->used_blocks; ffc1294c: 81 09 00 40 lwz r8,64(r9) --stats->frees; /* Do not count subsequent call as actual free() */ ffc12950: 81 49 00 50 lwz r10,80(r9) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ffc12954: 7c 07 02 14 add r0,r7,r0 ++stats->used_blocks; ffc12958: 39 08 00 01 addi r8,r8,1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ffc1295c: 90 09 00 2c stw r0,44(r9) ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ ffc12960: 39 4a ff ff addi r10,r10,-1 heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ++stats->used_blocks; ffc12964: 91 09 00 40 stw r8,64(r9) --stats->frees; /* Do not count subsequent call as actual free() */ ffc12968: 91 49 00 50 stw r10,80(r9) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); ffc1296c: 4b ff a3 99 bl ffc0cd04 <_Heap_Free> <== ALWAYS TAKEN ffc12970: 38 60 00 00 li r3,0 } return HEAP_EXTEND_SUCCESSFUL; } ffc12974: 80 01 00 0c lwz r0,12(r1) ffc12978: 38 21 00 08 addi r1,r1,8 ffc1297c: 7c 08 03 a6 mtlr r0 ffc12980: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0de44 <_Heap_Free>: RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) ffc0de44: 81 63 00 10 lwz r11,16(r3) #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc0de48: 7c 69 1b 78 mr r9,r3 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; ffc0de4c: 80 03 00 20 lwz r0,32(r3) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block ffc0de50: 39 40 00 00 li r10,0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) ffc0de54: 7c 84 5b 96 divwu r4,r4,r11 ffc0de58: 7d 64 59 d6 mullw r11,r4,r11 ffc0de5c: 39 6b ff f8 addi r11,r11,-8 <== ALWAYS TAKEN 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 ffc0de60: 7f 8b 00 40 cmplw cr7,r11,r0 ffc0de64: 41 9c 00 14 blt- cr7,ffc0de78 <_Heap_Free+0x34> ffc0de68: 81 43 00 24 lwz r10,36(r3) ffc0de6c: 7d 4b 50 10 subfc r10,r11,r10 ffc0de70: 39 40 00 00 li r10,0 <== ALWAYS TAKEN ffc0de74: 7d 4a 51 14 adde r10,r10,r10 <== ALWAYS TAKEN Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { ffc0de78: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0de7c: 41 9e 01 a8 beq- cr7,ffc0e024 <_Heap_Free+0x1e0> - 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; ffc0de80: 80 ab 00 04 lwz r5,4(r11) 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 ffc0de84: 38 e0 00 00 li r7,0 <== ALWAYS TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0de88: 54 a8 00 3c rlwinm r8,r5,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); ffc0de8c: 7d 4b 42 14 add r10,r11,r8 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block ffc0de90: 7f 8a 00 40 cmplw cr7,r10,r0 ffc0de94: 41 9c 00 14 blt- cr7,ffc0dea8 <_Heap_Free+0x64> <== NEVER TAKEN ffc0de98: 80 e9 00 24 lwz r7,36(r9) ffc0de9c: 7c ea 38 10 subfc r7,r10,r7 ffc0dea0: 38 e0 00 00 li r7,0 ffc0dea4: 7c e7 39 14 adde r7,r7,r7 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { ffc0dea8: 2f 87 00 00 cmpwi cr7,r7,0 ffc0deac: 41 9e 01 78 beq- cr7,ffc0e024 <_Heap_Free+0x1e0> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0deb0: 80 ca 00 04 lwz r6,4(r10) _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0deb4: 70 c3 00 01 andi. r3,r6,1 ffc0deb8: 41 82 01 6c beq- ffc0e024 <_Heap_Free+0x1e0> <== NEVER TAKEN return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); ffc0debc: 81 89 00 24 lwz r12,36(r9) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0dec0: 54 c6 00 3c rlwinm r6,r6,0,0,30 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block ffc0dec4: 38 80 00 00 li r4,0 ffc0dec8: 7f 8a 60 00 cmpw cr7,r10,r12 ffc0decc: 41 9e 00 14 beq- cr7,ffc0dee0 <_Heap_Free+0x9c> ffc0ded0: 7c ea 32 14 add r7,r10,r6 ffc0ded4: 80 87 00 04 lwz r4,4(r7) ffc0ded8: 54 84 07 fe clrlwi r4,r4,31 <== ALWAYS TAKEN ffc0dedc: 68 84 00 01 xori r4,r4,1 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { ffc0dee0: 70 a7 00 01 andi. r7,r5,1 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block ffc0dee4: 54 84 06 3e clrlwi r4,r4,24 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { ffc0dee8: 40 82 00 94 bne- ffc0df7c <_Heap_Free+0x138> uintptr_t const prev_size = block->prev_size; ffc0deec: 80 ab 00 00 lwz r5,0(r11) 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 ffc0def0: 38 60 00 00 li r3,0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0def4: 7c e5 58 50 subf r7,r5,r11 <== ALWAYS TAKEN 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 ffc0def8: 7f 87 00 40 cmplw cr7,r7,r0 ffc0defc: 41 9c 00 10 blt- cr7,ffc0df0c <_Heap_Free+0xc8> <== NEVER TAKEN ffc0df00: 7c 67 60 10 subfc r3,r7,r12 ffc0df04: 38 60 00 00 li r3,0 ffc0df08: 7c 63 19 14 adde r3,r3,r3 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { ffc0df0c: 2f 83 00 00 cmpwi cr7,r3,0 <== ALWAYS TAKEN ffc0df10: 41 9e 01 14 beq- cr7,ffc0e024 <_Heap_Free+0x1e0> <== NEVER TAKEN return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { ffc0df14: 80 07 00 04 lwz r0,4(r7) ffc0df18: 70 03 00 01 andi. r3,r0,1 ffc0df1c: 41 82 01 08 beq- ffc0e024 <_Heap_Free+0x1e0> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ ffc0df20: 2f 84 00 00 cmpwi cr7,r4,0 ffc0df24: 41 9e 00 38 beq- cr7,ffc0df5c <_Heap_Free+0x118> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc0df28: 80 89 00 38 lwz r4,56(r9) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc0df2c: 7c c8 32 14 add r6,r8,r6 ffc0df30: 7c a6 2a 14 add r5,r6,r5 <== ALWAYS TAKEN } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; ffc0df34: 81 6a 00 0c lwz r11,12(r10) <== ALWAYS TAKEN return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; ffc0df38: 81 4a 00 08 lwz r10,8(r10) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc0df3c: 38 c4 ff ff addi r6,r4,-1 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0df40: 60 a0 00 01 ori r0,r5,1 } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc0df44: 90 c9 00 38 stw r6,56(r9) Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; ffc0df48: 91 6a 00 0c stw r11,12(r10) <== ALWAYS TAKEN prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; ffc0df4c: 7c a7 29 2e stwx r5,r7,r5 if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0df50: 90 07 00 04 stw r0,4(r7) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; ffc0df54: 91 4b 00 08 stw r10,8(r11) ffc0df58: 48 00 00 a0 b ffc0dff8 <_Heap_Free+0x1b4> <== ALWAYS TAKEN next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; ffc0df5c: 7c a8 2a 14 add r5,r8,r5 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0df60: 60 a0 00 01 ori r0,r5,1 <== ALWAYS TAKEN next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; ffc0df64: 7c ab 41 2e stwx r5,r11,r8 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0df68: 90 07 00 04 stw r0,4(r7) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc0df6c: 80 0a 00 04 lwz r0,4(r10) ffc0df70: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc0df74: 90 0a 00 04 stw r0,4(r10) ffc0df78: 48 00 00 80 b ffc0dff8 <_Heap_Free+0x1b4> <== ALWAYS TAKEN next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ ffc0df7c: 2f 84 00 00 cmpwi cr7,r4,0 ffc0df80: 41 9e 00 30 beq- cr7,ffc0dfb0 <_Heap_Free+0x16c> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; ffc0df84: 80 aa 00 0c lwz r5,12(r10) uintptr_t const size = block_size + next_block_size; ffc0df88: 7c e6 42 14 add r7,r6,r8 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; ffc0df8c: 81 4a 00 08 lwz r10,8(r10) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0df90: 60 e0 00 01 ori r0,r7,1 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; ffc0df94: 90 ab 00 0c stw r5,12(r11) <== ALWAYS TAKEN ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; ffc0df98: 91 4b 00 08 stw r10,8(r11) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; ffc0df9c: 7c eb 39 2e stwx r7,r11,r7 next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0dfa0: 90 0b 00 04 stw r0,4(r11) new_block->prev = prev; next->prev = new_block; prev->next = new_block; ffc0dfa4: 91 65 00 08 stw r11,8(r5) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; ffc0dfa8: 91 6a 00 0c stw r11,12(r10) ffc0dfac: 48 00 00 4c b ffc0dff8 <_Heap_Free+0x1b4> <== ALWAYS TAKEN next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; ffc0dfb0: 61 00 00 01 ori r0,r8,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; ffc0dfb4: 7d 0b 41 2e stwx r8,r11,r8 next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; ffc0dfb8: 90 0b 00 04 stw r0,4(r11) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc0dfbc: 80 0a 00 04 lwz r0,4(r10) ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; ffc0dfc0: 91 2b 00 0c stw r9,12(r11) ffc0dfc4: 54 00 00 3c rlwinm r0,r0,0,0,30 <== ALWAYS TAKEN ffc0dfc8: 90 0a 00 04 stw r0,4(r10) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc0dfcc: 80 e9 00 38 lwz r7,56(r9) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; ffc0dfd0: 81 49 00 3c lwz r10,60(r9) block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc0dfd4: 38 07 00 01 addi r0,r7,1 #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; ffc0dfd8: 7f 8a 00 40 cmplw cr7,r10,r0 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc0dfdc: 81 49 00 08 lwz r10,8(r9) block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc0dfe0: 90 09 00 38 stw r0,56(r9) new_block->next = next; ffc0dfe4: 91 4b 00 08 stw r10,8(r11) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; ffc0dfe8: 91 6a 00 0c stw r11,12(r10) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; ffc0dfec: 91 69 00 08 stw r11,8(r9) <== ALWAYS TAKEN #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; ffc0dff0: 40 9c 00 08 bge- cr7,ffc0dff8 <_Heap_Free+0x1b4> next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; ffc0dff4: 90 09 00 3c stw r0,60(r9) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; ffc0dff8: 80 09 00 30 lwz r0,48(r9) ffc0dffc: 38 60 00 01 li r3,1 <== ALWAYS TAKEN stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0e000: 81 69 00 40 lwz r11,64(r9) ++stats->frees; ffc0e004: 81 49 00 50 lwz r10,80(r9) stats->free_size += block_size; ffc0e008: 7d 00 42 14 add r8,r0,r8 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0e00c: 39 6b ff ff addi r11,r11,-1 ++stats->frees; stats->free_size += block_size; ffc0e010: 91 09 00 30 stw r8,48(r9) } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc0e014: 38 0a 00 01 addi r0,r10,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0e018: 91 69 00 40 stw r11,64(r9) ++stats->frees; ffc0e01c: 90 09 00 50 stw r0,80(r9) <== ALWAYS TAKEN stats->free_size += block_size; return( true ); ffc0e020: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e024: 38 60 00 00 li r3,0 } ffc0e028: 4e 80 00 20 blr <== ALWAYS TAKEN ffc2ea90 <_Heap_Get_free_information>: ) { Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; ffc2ea90: 38 00 00 00 li r0,0 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc2ea94: 81 23 00 08 lwz r9,8(r3) info->largest = 0; info->total = 0; ffc2ea98: 90 04 00 08 stw r0,8(r4) ) { Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; ffc2ea9c: 90 04 00 00 stw r0,0(r4) info->largest = 0; ffc2eaa0: 90 04 00 04 stw r0,4(r4) info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); ffc2eaa4: 48 00 00 38 b ffc2eadc <_Heap_Get_free_information+0x4c> <== ALWAYS TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc2eaa8: 80 09 00 04 lwz r0,4(r9) /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; if ( info->largest < the_size ) ffc2eaac: 81 64 00 04 lwz r11,4(r4) ffc2eab0: 54 00 00 3c rlwinm r0,r0,0,0,30 uint32_t const the_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; ffc2eab4: 81 44 00 00 lwz r10,0(r4) info->total += the_size; if ( info->largest < the_size ) ffc2eab8: 7f 8b 00 40 cmplw cr7,r11,r0 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; ffc2eabc: 81 64 00 08 lwz r11,8(r4) uint32_t const the_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; ffc2eac0: 39 4a 00 01 addi r10,r10,1 info->total += the_size; ffc2eac4: 7d 6b 02 14 add r11,r11,r0 uint32_t const the_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; ffc2eac8: 91 44 00 00 stw r10,0(r4) info->total += the_size; ffc2eacc: 91 64 00 08 stw r11,8(r4) if ( info->largest < the_size ) ffc2ead0: 40 9c 00 08 bge- cr7,ffc2ead8 <_Heap_Get_free_information+0x48> info->largest = the_size; ffc2ead4: 90 04 00 04 stw r0,4(r4) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) ffc2ead8: 81 29 00 08 lwz r9,8(r9) info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); ffc2eadc: 7f 89 18 00 cmpw cr7,r9,r3 ffc2eae0: 40 9e ff c8 bne+ cr7,ffc2eaa8 <_Heap_Get_free_information+0x18> info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } ffc2eae4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc40b18 <_Heap_Get_information>: Heap_Block *const end = the_heap->last_block; _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; ffc40b18: 38 00 00 00 li r0,0 Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; ffc40b1c: 81 43 00 24 lwz r10,36(r3) the_info->Free.number = 0; the_info->Free.total = 0; the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; ffc40b20: 90 04 00 10 stw r0,16(r4) uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; ffc40b24: 39 04 00 0c addi r8,r4,12 Heap_Block *const end = the_heap->last_block; _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; ffc40b28: 90 04 00 00 stw r0,0(r4) the_info->Free.total = 0; ffc40b2c: 90 04 00 08 stw r0,8(r4) the_info->Free.largest = 0; ffc40b30: 90 04 00 04 stw r0,4(r4) the_info->Used.number = 0; ffc40b34: 90 04 00 0c stw r0,12(r4) the_info->Used.total = 0; ffc40b38: 90 04 00 14 stw r0,20(r4) void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; ffc40b3c: 81 63 00 20 lwz r11,32(r3) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { ffc40b40: 48 00 00 48 b ffc40b88 <_Heap_Get_information+0x70> <== ALWAYS TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc40b44: 80 0b 00 04 lwz r0,4(r11) ffc40b48: 54 00 00 3c rlwinm r0,r0,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); ffc40b4c: 7d 6b 02 14 add r11,r11,r0 uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) ffc40b50: 80 eb 00 04 lwz r7,4(r11) ffc40b54: 70 e6 00 01 andi. r6,r7,1 ffc40b58: 41 82 00 08 beq- ffc40b60 <_Heap_Get_information+0x48> ffc40b5c: 7d 09 43 78 mr r9,r8 else info = &the_info->Free; info->number++; info->total += the_size; if ( info->largest < the_size ) ffc40b60: 80 e9 00 04 lwz r7,4(r9) if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; ffc40b64: 80 c9 00 00 lwz r6,0(r9) info->total += the_size; if ( info->largest < the_size ) ffc40b68: 7f 87 00 40 cmplw cr7,r7,r0 info = &the_info->Used; else info = &the_info->Free; info->number++; info->total += the_size; ffc40b6c: 80 e9 00 08 lwz r7,8(r9) if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; ffc40b70: 38 c6 00 01 addi r6,r6,1 info->total += the_size; ffc40b74: 7c e7 02 14 add r7,r7,r0 if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; ffc40b78: 90 c9 00 00 stw r6,0(r9) info->total += the_size; ffc40b7c: 90 e9 00 08 stw r7,8(r9) if ( info->largest < the_size ) ffc40b80: 40 9c 00 08 bge- cr7,ffc40b88 <_Heap_Get_information+0x70> info->largest = the_size; ffc40b84: 90 09 00 04 stw r0,4(r9) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { ffc40b88: 7f 8b 50 00 cmpw cr7,r11,r10 uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) ffc40b8c: 7c 89 23 78 mr r9,r4 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { ffc40b90: 40 9e ff b4 bne+ cr7,ffc40b44 <_Heap_Get_information+0x2c> /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; ffc40b94: 81 24 00 14 lwz r9,20(r4) ffc40b98: 38 09 00 08 addi r0,r9,8 ffc40b9c: 90 04 00 14 stw r0,20(r4) } ffc40ba0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08e0c <_Heap_Initialize>: uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { ffc08e0c: 2c 06 00 00 cmpwi r6,0 Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { ffc08e10: 94 21 ff e8 stwu r1,-24(r1) ffc08e14: 7c 69 1b 78 mr r9,r3 <== ALWAYS TAKEN ffc08e18: 93 81 00 08 stw r28,8(r1) ffc08e1c: 93 a1 00 0c stw r29,12(r1) ffc08e20: 93 c1 00 10 stw r30,16(r1) ffc08e24: 93 e1 00 14 stw r31,20(r1) uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { ffc08e28: 40 82 00 0c bne- ffc08e34 <_Heap_Initialize+0x28> ffc08e2c: 38 c0 00 08 li r6,8 ffc08e30: 48 00 00 1c b ffc08e4c <_Heap_Initialize+0x40> <== ALWAYS TAKEN uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { ffc08e34: 70 c0 00 07 andi. r0,r6,7 ffc08e38: 41 82 00 0c beq- ffc08e44 <_Heap_Initialize+0x38> return value - remainder + alignment; ffc08e3c: 38 c6 00 08 addi r6,r6,8 <== ALWAYS TAKEN ffc08e40: 7c c0 30 50 subf r6,r0,r6 page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { ffc08e44: 2b 86 00 07 cmplwi cr7,r6,7 ffc08e48: 40 9d 01 04 ble- cr7,ffc08f4c <_Heap_Initialize+0x140> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; ffc08e4c: 39 00 00 10 li r8,16 ffc08e50: 7d 08 33 96 divwu r8,r8,r6 ffc08e54: 7d 08 31 d6 mullw r8,r8,r6 if ( remainder != 0 ) { return value - remainder + alignment; ffc08e58: 20 08 00 10 subfic r0,r8,16 <== ALWAYS TAKEN uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { ffc08e5c: 2f 80 00 00 cmpwi cr7,r0,0 <== ALWAYS TAKEN return value - remainder + alignment; ffc08e60: 7d 06 42 14 add r8,r6,r8 <== ALWAYS TAKEN uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { ffc08e64: 40 9e 00 08 bne- cr7,ffc08e6c <_Heap_Initialize+0x60> ffc08e68: 39 00 00 10 li r8,16 ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE; ffc08e6c: 39 64 00 08 addi r11,r4,8 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; ffc08e70: 7c 0b 33 96 divwu r0,r11,r6 <== ALWAYS TAKEN ffc08e74: 7c 00 31 d6 mullw r0,r0,r6 <== ALWAYS TAKEN if ( remainder != 0 ) { ffc08e78: 7c 00 58 51 subf. r0,r0,r11 <== ALWAYS TAKEN ffc08e7c: 41 82 00 0c beq- ffc08e88 <_Heap_Initialize+0x7c> return value - remainder + alignment; ffc08e80: 7d 66 5a 14 add r11,r6,r11 ffc08e84: 7d 60 58 50 subf r11,r0,r11 uintptr_t page_size ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; ffc08e88: 7f c4 2a 14 add r30,r4,r5 overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( ffc08e8c: 7f 9e 20 40 cmplw cr7,r30,r4 <== ALWAYS TAKEN ffc08e90: 41 9c 00 bc blt- cr7,ffc08f4c <_Heap_Initialize+0x140> } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); ffc08e94: 7c 04 58 50 subf r0,r4,r11 first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( ffc08e98: 7f 85 00 40 cmplw cr7,r5,r0 } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); ffc08e9c: 39 6b ff f8 addi r11,r11,-8 first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( ffc08ea0: 40 9d 00 ac ble- cr7,ffc08f4c <_Heap_Initialize+0x140> min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; ffc08ea4: 7c a0 28 50 subf r5,r0,r5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc08ea8: 7c a5 33 96 divwu r5,r5,r6 ffc08eac: 7c a5 31 d6 mullw r5,r5,r6 <== ALWAYS TAKEN first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( ffc08eb0: 7f 85 40 40 cmplw cr7,r5,r8 ffc08eb4: 41 9c 00 98 blt- cr7,ffc08f4c <_Heap_Initialize+0x140> stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; ffc08eb8: 3c e0 00 00 lis r7,0 <== ALWAYS TAKEN /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; first_block->next = _Heap_Free_list_tail( heap ); ffc08ebc: 91 2b 00 08 stw r9,8(r11) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc08ec0: 7d 45 5a 14 add r10,r5,r11 stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; ffc08ec4: 83 e7 28 f0 lwz r31,10480(r7) stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; stats->free_blocks = 1; stats->max_free_blocks = 1; stats->used_blocks = 0; ffc08ec8: 38 00 00 00 li r0,0 /* Statistics */ stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; stats->free_blocks = 1; ffc08ecc: 39 80 00 01 li r12,1 return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; ffc08ed0: 90 cb 00 00 stw r6,0(r11) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; ffc08ed4: 60 a3 00 01 ori r3,r5,1 stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; ffc08ed8: 3b bf 00 01 addi r29,r31,1 } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; ffc08edc: 90 6b 00 04 stw r3,4(r11) * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; ffc08ee0: 7f 8a 58 50 subf r28,r10,r11 ffc08ee4: 93 8a 00 04 stw r28,4(r10) alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; ffc08ee8: 38 65 ff f8 addi r3,r5,-8 <== ALWAYS TAKEN * block indicates that the previous block is used, this ensures that the * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; ffc08eec: 7c a5 59 2e stwx r5,r5,r11 /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; first_block->next = _Heap_Free_list_tail( heap ); first_block->prev = _Heap_Free_list_head( heap ); ffc08ef0: 91 2b 00 0c stw r9,12(r11) last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; /* Heap control */ heap->page_size = page_size; ffc08ef4: 90 c9 00 10 stw r6,16(r9) heap->min_block_size = min_block_size; ffc08ef8: 91 09 00 14 stw r8,20(r9) heap->area_begin = heap_area_begin; ffc08efc: 90 89 00 18 stw r4,24(r9) heap->area_end = heap_area_end; ffc08f00: 93 c9 00 1c stw r30,28(r9) _Heap_Free_list_tail( heap )->prev = first_block; /* Statistics */ stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; ffc08f04: 90 a9 00 34 stw r5,52(r9) stats->free_blocks = 1; stats->max_free_blocks = 1; ffc08f08: 91 89 00 3c stw r12,60(r9) stats->used_blocks = 0; stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; ffc08f0c: 90 09 00 54 stw r0,84(r9) stats->instance = instance++; ffc08f10: 93 e9 00 28 stw r31,40(r9) heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; _Heap_Free_list_tail( heap )->prev = first_block; /* Statistics */ stats->size = first_block_size; ffc08f14: 90 a9 00 2c stw r5,44(r9) stats->free_size = first_block_size; ffc08f18: 90 a9 00 30 stw r5,48(r9) stats->min_free_size = first_block_size; stats->free_blocks = 1; ffc08f1c: 91 89 00 38 stw r12,56(r9) <== ALWAYS TAKEN stats->max_free_blocks = 1; stats->used_blocks = 0; ffc08f20: 90 09 00 40 stw r0,64(r9) stats->max_search = 0; ffc08f24: 90 09 00 44 stw r0,68(r9) <== ALWAYS TAKEN stats->allocs = 0; ffc08f28: 90 09 00 48 stw r0,72(r9) stats->searches = 0; ffc08f2c: 90 09 00 4c stw r0,76(r9) stats->frees = 0; ffc08f30: 90 09 00 50 stw r0,80(r9) heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; heap->last_block = last_block; ffc08f34: 91 49 00 24 stw r10,36(r9) _Heap_Free_list_head( heap )->next = first_block; _Heap_Free_list_tail( heap )->prev = first_block; ffc08f38: 91 69 00 0c stw r11,12(r9) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; ffc08f3c: 93 a7 28 f0 stw r29,10480(r7) /* Heap control */ heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; ffc08f40: 91 69 00 20 stw r11,32(r9) heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; ffc08f44: 91 69 00 08 stw r11,8(r9) ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; ffc08f48: 48 00 00 08 b ffc08f50 <_Heap_Initialize+0x144> <== ALWAYS TAKEN ffc08f4c: 38 60 00 00 li r3,0 } ffc08f50: 83 81 00 08 lwz r28,8(r1) ffc08f54: 83 a1 00 0c lwz r29,12(r1) ffc08f58: 83 c1 00 10 lwz r30,16(r1) ffc08f5c: 83 e1 00 14 lwz r31,20(r1) <== ALWAYS TAKEN ffc08f60: 38 21 00 18 addi r1,r1,24 ffc08f64: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1b5e0 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { ffc1b5e0: 94 21 ff e8 stwu r1,-24(r1) ffc1b5e4: 7c 08 02 a6 mflr r0 ffc1b5e8: 7c cb 33 78 mr r11,r6 ffc1b5ec: 90 01 00 1c stw r0,28(r1) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) ffc1b5f0: 80 03 00 10 lwz r0,16(r3) ffc1b5f4: 93 c1 00 10 stw r30,16(r1) ffc1b5f8: 7c 9e 23 78 mr r30,r4 ffc1b5fc: 7c 84 03 96 divwu r4,r4,r0 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 ffc1b600: 81 23 00 20 lwz r9,32(r3) ffc1b604: 93 a1 00 0c stw r29,12(r1) ffc1b608: 93 e1 00 14 stw r31,20(r1) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) ffc1b60c: 7c 84 01 d6 mullw r4,r4,r0 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; ffc1b610: 38 00 00 00 li r0,0 ffc1b614: 38 84 ff f8 addi r4,r4,-8 ffc1b618: 90 06 00 00 stw r0,0(r6) 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 ffc1b61c: 7f 89 20 40 cmplw cr7,r9,r4 void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { ffc1b620: 7c 7f 1b 78 mr r31,r3 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; *new_size = 0; ffc1b624: 90 07 00 00 stw r0,0(r7) void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { ffc1b628: 7c fd 3b 78 mr r29,r7 ffc1b62c: 7c a6 2b 78 mr r6,r5 ffc1b630: 41 9d 00 e4 bgt- cr7,ffc1b714 <_Heap_Resize_block+0x134> ffc1b634: 80 03 00 24 lwz r0,36(r3) ffc1b638: 7f 80 20 40 cmplw cr7,r0,r4 ffc1b63c: 41 9c 00 d8 blt- cr7,ffc1b714 <_Heap_Resize_block+0x134> - 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; ffc1b640: 80 04 00 04 lwz r0,4(r4) uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; ffc1b644: 21 1e 00 04 subfic r8,r30,4 ffc1b648: 54 00 00 3c rlwinm r0,r0,0,0,30 { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; ffc1b64c: 7d 24 02 14 add r9,r4,r0 ffc1b650: 81 49 00 04 lwz r10,4(r9) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; ffc1b654: 7d 08 4a 14 add r8,r8,r9 ffc1b658: 55 4a 00 3c rlwinm r10,r10,0,0,30 RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); ffc1b65c: 7c e9 52 14 add r7,r9,r10 ffc1b660: 80 e7 00 04 lwz r7,4(r7) bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; ffc1b664: 91 0b 00 00 stw r8,0(r11) ffc1b668: 54 e7 07 fe clrlwi r7,r7,31 ffc1b66c: 68 e7 00 01 xori r7,r7,1 if ( next_block_is_free ) { ffc1b670: 2f 87 00 00 cmpwi cr7,r7,0 ffc1b674: 41 9e 00 0c beq- cr7,ffc1b680 <_Heap_Resize_block+0xa0> block_size += next_block_size; ffc1b678: 7c 00 52 14 add r0,r0,r10 alloc_size += next_block_size; ffc1b67c: 7d 08 52 14 add r8,r8,r10 } if ( new_alloc_size > alloc_size ) { ffc1b680: 7f 86 40 40 cmplw cr7,r6,r8 ffc1b684: 39 60 00 01 li r11,1 ffc1b688: 41 9d 00 90 bgt- cr7,ffc1b718 <_Heap_Resize_block+0x138> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { ffc1b68c: 2f 87 00 00 cmpwi cr7,r7,0 ffc1b690: 41 9e 00 4c beq- cr7,ffc1b6dc <_Heap_Resize_block+0xfc> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; ffc1b694: 81 64 00 04 lwz r11,4(r4) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc1b698: 7d 00 22 14 add r8,r0,r4 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; ffc1b69c: 55 6b 07 fe clrlwi r11,r11,31 ffc1b6a0: 7c 00 5b 78 or r0,r0,r11 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; ffc1b6a4: 81 69 00 0c lwz r11,12(r9) uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; ffc1b6a8: 90 04 00 04 stw r0,4(r4) _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; ffc1b6ac: 80 08 00 04 lwz r0,4(r8) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; ffc1b6b0: 81 29 00 08 lwz r9,8(r9) ffc1b6b4: 60 00 00 01 ori r0,r0,1 ffc1b6b8: 90 08 00 04 stw r0,4(r8) /* Statistics */ --stats->free_blocks; stats->free_size -= next_block_size; ffc1b6bc: 80 1f 00 30 lwz r0,48(r31) next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; /* Statistics */ --stats->free_blocks; ffc1b6c0: 81 1f 00 38 lwz r8,56(r31) stats->free_size -= next_block_size; ffc1b6c4: 7d 4a 00 50 subf r10,r10,r0 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; ffc1b6c8: 91 69 00 0c stw r11,12(r9) next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; /* Statistics */ --stats->free_blocks; ffc1b6cc: 38 08 ff ff addi r0,r8,-1 ffc1b6d0: 90 1f 00 38 stw r0,56(r31) stats->free_size -= next_block_size; ffc1b6d4: 91 5f 00 30 stw r10,48(r31) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; ffc1b6d8: 91 2b 00 08 stw r9,8(r11) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); ffc1b6dc: 7f c5 f3 78 mr r5,r30 ffc1b6e0: 7f e3 fb 78 mr r3,r31 ffc1b6e4: 4b fe d9 79 bl ffc0905c <_Heap_Block_allocate> <== ALWAYS TAKEN block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; /* Statistics */ ++stats->resizes; ffc1b6e8: 39 60 00 00 li r11,0 block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; ffc1b6ec: 81 23 00 04 lwz r9,4(r3) ffc1b6f0: 55 29 00 3c rlwinm r9,r9,0,0,30 ffc1b6f4: 38 09 00 04 addi r0,r9,4 ffc1b6f8: 7f de 00 50 subf r30,r30,r0 ffc1b6fc: 7c 63 f2 14 add r3,r3,r30 ffc1b700: 90 7d 00 00 stw r3,0(r29) /* Statistics */ ++stats->resizes; ffc1b704: 81 3f 00 54 lwz r9,84(r31) ffc1b708: 38 09 00 01 addi r0,r9,1 ffc1b70c: 90 1f 00 54 stw r0,84(r31) ffc1b710: 48 00 00 08 b ffc1b718 <_Heap_Resize_block+0x138> <== ALWAYS TAKEN ffc1b714: 39 60 00 02 li r11,2 new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } ffc1b718: 80 01 00 1c lwz r0,28(r1) ffc1b71c: 7d 63 5b 78 mr r3,r11 ffc1b720: 83 a1 00 0c lwz r29,12(r1) ffc1b724: 7c 08 03 a6 mtlr r0 ffc1b728: 83 c1 00 10 lwz r30,16(r1) ffc1b72c: 83 e1 00 14 lwz r31,20(r1) ffc1b730: 38 21 00 18 addi r1,r1,24 ffc1b734: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1b738 <_Heap_Size_of_alloc_area>: RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) ffc1b738: 80 03 00 10 lwz r0,16(r3) 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; ffc1b73c: 81 23 00 20 lwz r9,32(r3) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) ffc1b740: 7d 64 03 96 divwu r11,r4,r0 ffc1b744: 7d 6b 01 d6 mullw r11,r11,r0 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 ffc1b748: 38 00 00 00 li r0,0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) ffc1b74c: 39 6b ff f8 addi r11,r11,-8 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 ffc1b750: 7f 8b 48 40 cmplw cr7,r11,r9 ffc1b754: 41 9c 00 14 blt- cr7,ffc1b768 <_Heap_Size_of_alloc_area+0x30> <== NEVER TAKEN ffc1b758: 80 03 00 24 lwz r0,36(r3) ffc1b75c: 7c 0b 00 10 subfc r0,r11,r0 ffc1b760: 38 00 00 00 li r0,0 ffc1b764: 7c 00 01 14 adde r0,r0,r0 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { ffc1b768: 2f 80 00 00 cmpwi cr7,r0,0 ffc1b76c: 41 9e 00 54 beq- cr7,ffc1b7c0 <_Heap_Size_of_alloc_area+0x88> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc1b770: 80 0b 00 04 lwz r0,4(r11) 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 ffc1b774: 39 40 00 00 li r10,0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc1b778: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc1b77c: 7d 6b 02 14 add r11,r11,r0 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 ffc1b780: 7f 8b 48 40 cmplw cr7,r11,r9 ffc1b784: 41 9c 00 14 blt- cr7,ffc1b798 <_Heap_Size_of_alloc_area+0x60> <== NEVER TAKEN ffc1b788: 81 43 00 24 lwz r10,36(r3) ffc1b78c: 7d 4b 50 10 subfc r10,r11,r10 ffc1b790: 39 40 00 00 li r10,0 ffc1b794: 7d 4a 51 14 adde r10,r10,r10 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( ffc1b798: 2f 8a 00 00 cmpwi cr7,r10,0 ffc1b79c: 41 9e 00 24 beq- cr7,ffc1b7c0 <_Heap_Size_of_alloc_area+0x88> <== NEVER TAKEN ffc1b7a0: 80 0b 00 04 lwz r0,4(r11) ffc1b7a4: 70 09 00 01 andi. r9,r0,1 ffc1b7a8: 41 82 00 18 beq- ffc1b7c0 <_Heap_Size_of_alloc_area+0x88> <== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; ffc1b7ac: 20 84 00 04 subfic r4,r4,4 ffc1b7b0: 7d 64 5a 14 add r11,r4,r11 ffc1b7b4: 91 65 00 00 stw r11,0(r5) ffc1b7b8: 38 60 00 01 li r3,1 return true; ffc1b7bc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1b7c0: 38 60 00 00 li r3,0 } ffc1b7c4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09e58 <_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; ffc09e58: 2f 85 00 00 cmpwi cr7,r5,0 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { ffc09e5c: 94 21 ff 98 stwu r1,-104(r1) ffc09e60: 7c 08 02 a6 mflr r0 ffc09e64: 93 21 00 4c stw r25,76(r1) ffc09e68: 90 01 00 6c stw r0,108(r1) ffc09e6c: 93 61 00 54 stw r27,84(r1) ffc09e70: 93 81 00 58 stw r28,88(r1) ffc09e74: 93 a1 00 5c stw r29,92(r1) ffc09e78: 7c 7d 1b 78 mr r29,r3 ffc09e7c: 93 c1 00 60 stw r30,96(r1) ffc09e80: 7c 9e 23 78 mr r30,r4 ffc09e84: 93 e1 00 64 stw r31,100(r1) ffc09e88: 91 c1 00 20 stw r14,32(r1) ffc09e8c: 91 e1 00 24 stw r15,36(r1) ffc09e90: 92 01 00 28 stw r16,40(r1) ffc09e94: 92 21 00 2c stw r17,44(r1) ffc09e98: 92 41 00 30 stw r18,48(r1) ffc09e9c: 92 61 00 34 stw r19,52(r1) ffc09ea0: 92 81 00 38 stw r20,56(r1) ffc09ea4: 92 a1 00 3c stw r21,60(r1) ffc09ea8: 92 c1 00 40 stw r22,64(r1) ffc09eac: 92 e1 00 44 stw r23,68(r1) ffc09eb0: 93 01 00 48 stw r24,72(r1) ffc09eb4: 93 41 00 50 stw r26,80(r1) uintptr_t const page_size = heap->page_size; ffc09eb8: 83 83 00 10 lwz r28,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc09ebc: 83 63 00 14 lwz r27,20(r3) Heap_Block *const last_block = heap->last_block; ffc09ec0: 83 23 00 24 lwz r25,36(r3) Heap_Block *block = heap->first_block; ffc09ec4: 83 e3 00 20 lwz r31,32(r3) Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc09ec8: 40 9e 00 10 bne- cr7,ffc09ed8 <_Heap_Walk+0x80> ffc09ecc: 3d 20 ff c1 lis r9,-63 ffc09ed0: 39 29 9e 54 addi r9,r9,-25004 ffc09ed4: 48 00 00 0c b ffc09ee0 <_Heap_Walk+0x88> <== ALWAYS TAKEN ffc09ed8: 3d 20 ff c1 lis r9,-63 ffc09edc: 39 29 a3 f0 addi r9,r9,-23568 ffc09ee0: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc09ee4: 3d 20 00 00 lis r9,0 ffc09ee8: 80 09 27 90 lwz r0,10128(r9) ffc09eec: 2f 80 00 03 cmpwi cr7,r0,3 ffc09ef0: 40 be 04 94 bne+ cr7,ffc0a384 <_Heap_Walk+0x52c> 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)( ffc09ef4: 80 1d 00 0c lwz r0,12(r29) ffc09ef8: 3c a0 ff c2 lis r5,-62 ffc09efc: 81 1d 00 18 lwz r8,24(r29) ffc09f00: 38 a5 db 14 addi r5,r5,-9452 ffc09f04: 81 3d 00 1c lwz r9,28(r29) ffc09f08: 7f c3 f3 78 mr r3,r30 ffc09f0c: 81 7d 00 08 lwz r11,8(r29) ffc09f10: 38 80 00 00 li r4,0 ffc09f14: 90 01 00 10 stw r0,16(r1) ffc09f18: 7f 86 e3 78 mr r6,r28 ffc09f1c: 7f 67 db 78 mr r7,r27 ffc09f20: 80 01 00 18 lwz r0,24(r1) ffc09f24: 7f ea fb 78 mr r10,r31 ffc09f28: 91 61 00 0c stw r11,12(r1) ffc09f2c: 7c 09 03 a6 mtctr r0 ffc09f30: 93 21 00 08 stw r25,8(r1) ffc09f34: 4c c6 31 82 crclr 4*cr1+eq ffc09f38: 4e 80 04 21 bctrl <== ALWAYS TAKEN heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { ffc09f3c: 2f 9c 00 00 cmpwi cr7,r28,0 ffc09f40: 40 be 00 14 bne+ cr7,ffc09f54 <_Heap_Walk+0xfc> (*printer)( source, true, "page size is zero\n" ); ffc09f44: 3c a0 ff c2 lis r5,-62 ffc09f48: 7f c3 f3 78 mr r3,r30 ffc09f4c: 38 a5 db a5 addi r5,r5,-9307 ffc09f50: 48 00 00 c8 b ffc0a018 <_Heap_Walk+0x1c0> <== ALWAYS TAKEN return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { ffc09f54: 73 89 00 07 andi. r9,r28,7 ffc09f58: 41 a2 00 18 beq+ ffc09f70 <_Heap_Walk+0x118> (*printer)( ffc09f5c: 3c a0 ff c2 lis r5,-62 ffc09f60: 7f c3 f3 78 mr r3,r30 ffc09f64: 38 a5 db b8 addi r5,r5,-9288 ffc09f68: 7f 86 e3 78 mr r6,r28 ffc09f6c: 48 00 03 8c b ffc0a2f8 <_Heap_Walk+0x4a0> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { ffc09f70: 7c 1b e3 96 divwu r0,r27,r28 ffc09f74: 7c 00 e1 d6 mullw r0,r0,r28 ffc09f78: 7f 9b 00 00 cmpw cr7,r27,r0 ffc09f7c: 41 be 00 18 beq+ cr7,ffc09f94 <_Heap_Walk+0x13c> (*printer)( ffc09f80: 3c a0 ff c2 lis r5,-62 ffc09f84: 7f c3 f3 78 mr r3,r30 ffc09f88: 38 a5 db d6 addi r5,r5,-9258 ffc09f8c: 7f 66 db 78 mr r6,r27 ffc09f90: 48 00 03 68 b ffc0a2f8 <_Heap_Walk+0x4a0> <== ALWAYS TAKEN ); return false; } if ( ffc09f94: 38 1f 00 08 addi r0,r31,8 ffc09f98: 7d 20 e3 96 divwu r9,r0,r28 ffc09f9c: 7d 29 e1 d6 mullw r9,r9,r28 ffc09fa0: 7f 80 48 00 cmpw cr7,r0,r9 ffc09fa4: 41 be 00 14 beq+ cr7,ffc09fb8 <_Heap_Walk+0x160> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( ffc09fa8: 3c a0 ff c2 lis r5,-62 ffc09fac: 7f c3 f3 78 mr r3,r30 ffc09fb0: 38 a5 db fa addi r5,r5,-9222 ffc09fb4: 48 00 03 40 b ffc0a2f4 <_Heap_Walk+0x49c> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { ffc09fb8: 80 1f 00 04 lwz r0,4(r31) ffc09fbc: 70 09 00 01 andi. r9,r0,1 ffc09fc0: 40 a2 00 14 bne+ ffc09fd4 <_Heap_Walk+0x17c> (*printer)( ffc09fc4: 3c a0 ff c2 lis r5,-62 ffc09fc8: 7f c3 f3 78 mr r3,r30 ffc09fcc: 38 a5 dc 2b addi r5,r5,-9173 ffc09fd0: 48 00 00 48 b ffc0a018 <_Heap_Walk+0x1c0> <== ALWAYS TAKEN ); return false; } if ( first_block->prev_size != page_size ) { ffc09fd4: 83 5f 00 00 lwz r26,0(r31) ffc09fd8: 7f 9a e0 00 cmpw cr7,r26,r28 ffc09fdc: 41 be 00 18 beq+ cr7,ffc09ff4 <_Heap_Walk+0x19c> (*printer)( ffc09fe0: 3c a0 ff c2 lis r5,-62 ffc09fe4: 7f c3 f3 78 mr r3,r30 ffc09fe8: 38 a5 dc 59 addi r5,r5,-9127 ffc09fec: 7f 46 d3 78 mr r6,r26 ffc09ff0: 48 00 02 18 b ffc0a208 <_Heap_Walk+0x3b0> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_free( last_block ) ) { ffc09ff4: 81 39 00 04 lwz r9,4(r25) ffc09ff8: 55 29 00 3c rlwinm r9,r9,0,0,30 ffc09ffc: 7d 39 4a 14 add r9,r25,r9 <== ALWAYS TAKEN ffc0a000: 80 09 00 04 lwz r0,4(r9) ffc0a004: 70 09 00 01 andi. r9,r0,1 ffc0a008: 40 a2 00 28 bne+ ffc0a030 <_Heap_Walk+0x1d8> (*printer)( ffc0a00c: 3c a0 ff c2 lis r5,-62 ffc0a010: 7f c3 f3 78 mr r3,r30 ffc0a014: 38 a5 dc 84 addi r5,r5,-9084 ffc0a018: 80 01 00 18 lwz r0,24(r1) ffc0a01c: 38 80 00 01 li r4,1 ffc0a020: 7c 09 03 a6 mtctr r0 ffc0a024: 4c c6 31 82 crclr 4*cr1+eq ffc0a028: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0a02c: 48 00 02 e0 b ffc0a30c <_Heap_Walk+0x4b4> <== ALWAYS TAKEN int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; ffc0a030: 81 3d 00 10 lwz r9,16(r29) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0a034: 7f a0 eb 78 mr r0,r29 ffc0a038: 80 dd 00 08 lwz r6,8(r29) ffc0a03c: 48 00 00 a4 b ffc0a0e0 <_Heap_Walk+0x288> <== ALWAYS TAKEN 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 ffc0a040: 81 1d 00 20 lwz r8,32(r29) ffc0a044: 7f 88 30 40 cmplw cr7,r8,r6 ffc0a048: 41 9d 00 14 bgt- cr7,ffc0a05c <_Heap_Walk+0x204> ffc0a04c: 81 7d 00 24 lwz r11,36(r29) ffc0a050: 7d 66 58 10 subfc r11,r6,r11 ffc0a054: 39 60 00 00 li r11,0 ffc0a058: 7d 6b 59 14 adde r11,r11,r11 const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { ffc0a05c: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0a060: 40 be 00 14 bne+ cr7,ffc0a074 <_Heap_Walk+0x21c> (*printer)( ffc0a064: 3c a0 ff c2 lis r5,-62 ffc0a068: 7f c3 f3 78 mr r3,r30 ffc0a06c: 38 a5 dc 99 addi r5,r5,-9063 ffc0a070: 48 00 02 88 b ffc0a2f8 <_Heap_Walk+0x4a0> <== ALWAYS TAKEN ); return false; } if ( ffc0a074: 7d 6a 4b 96 divwu r11,r10,r9 ffc0a078: 7d 6b 49 d6 mullw r11,r11,r9 ffc0a07c: 7f 8a 58 00 cmpw cr7,r10,r11 ffc0a080: 41 be 00 14 beq+ cr7,ffc0a094 <_Heap_Walk+0x23c> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( ffc0a084: 3c a0 ff c2 lis r5,-62 ffc0a088: 7f c3 f3 78 mr r3,r30 ffc0a08c: 38 a5 dc b9 addi r5,r5,-9031 ffc0a090: 48 00 02 68 b ffc0a2f8 <_Heap_Walk+0x4a0> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0a094: 81 66 00 04 lwz r11,4(r6) ffc0a098: 55 6b 00 3c rlwinm r11,r11,0,0,30 ffc0a09c: 7d 66 5a 14 add r11,r6,r11 ffc0a0a0: 81 6b 00 04 lwz r11,4(r11) ffc0a0a4: 71 6a 00 01 andi. r10,r11,1 ffc0a0a8: 41 a2 00 14 beq+ ffc0a0bc <_Heap_Walk+0x264> (*printer)( ffc0a0ac: 3c a0 ff c2 lis r5,-62 ffc0a0b0: 7f c3 f3 78 mr r3,r30 ffc0a0b4: 38 a5 dc e9 addi r5,r5,-8983 ffc0a0b8: 48 00 02 40 b ffc0a2f8 <_Heap_Walk+0x4a0> <== ALWAYS TAKEN ); return false; } if ( free_block->prev != prev_block ) { ffc0a0bc: 80 e6 00 0c lwz r7,12(r6) ffc0a0c0: 7f 87 00 00 cmpw cr7,r7,r0 return false; } prev_block = free_block; free_block = free_block->next; ffc0a0c4: 7c c0 33 78 mr r0,r6 ); return false; } if ( free_block->prev != prev_block ) { ffc0a0c8: 41 be 00 14 beq+ cr7,ffc0a0dc <_Heap_Walk+0x284> (*printer)( ffc0a0cc: 3c a0 ff c2 lis r5,-62 ffc0a0d0: 7f c3 f3 78 mr r3,r30 ffc0a0d4: 38 a5 dd 05 addi r5,r5,-8955 ffc0a0d8: 48 00 01 34 b ffc0a20c <_Heap_Walk+0x3b4> <== ALWAYS TAKEN return false; } prev_block = free_block; free_block = free_block->next; ffc0a0dc: 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 ) { ffc0a0e0: 7f 86 e8 00 cmpw cr7,r6,r29 ); return false; } if ( ffc0a0e4: 39 46 00 08 addi r10,r6,8 ffc0a0e8: 39 60 00 00 li r11,0 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 ) { ffc0a0ec: 40 9e ff 54 bne+ cr7,ffc0a040 <_Heap_Walk+0x1e8> ffc0a0f0: 48 00 02 4c b ffc0a33c <_Heap_Walk+0x4e4> <== ALWAYS TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0a0f4: 83 1f 00 04 lwz r24,4(r31) 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 ) { ffc0a0f8: 73 09 00 01 andi. r9,r24,1 ffc0a0fc: 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); ffc0a100: 7f 9f c2 14 add r28,r31,r24 ffc0a104: 41 82 00 2c beq- ffc0a130 <_Heap_Walk+0x2d8> (*printer)( ffc0a108: 80 01 00 18 lwz r0,24(r1) ffc0a10c: 7f c3 f3 78 mr r3,r30 ffc0a110: 38 80 00 00 li r4,0 ffc0a114: 7e 85 a3 78 mr r5,r20 ffc0a118: 7c 09 03 a6 mtctr r0 ffc0a11c: 7f e6 fb 78 mr r6,r31 ffc0a120: 7f 07 c3 78 mr r7,r24 ffc0a124: 4c c6 31 82 crclr 4*cr1+eq ffc0a128: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0a12c: 48 00 00 2c b ffc0a158 <_Heap_Walk+0x300> <== ALWAYS TAKEN "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0a130: 80 01 00 18 lwz r0,24(r1) ffc0a134: 7f c3 f3 78 mr r3,r30 ffc0a138: 38 80 00 00 li r4,0 ffc0a13c: 81 1f 00 00 lwz r8,0(r31) ffc0a140: 7e 65 9b 78 mr r5,r19 ffc0a144: 7c 09 03 a6 mtctr r0 ffc0a148: 7f e6 fb 78 mr r6,r31 ffc0a14c: 7f 07 c3 78 mr r7,r24 ffc0a150: 4c c6 31 82 crclr 4*cr1+eq ffc0a154: 4e 80 04 21 bctrl <== ALWAYS TAKEN 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 ffc0a158: 81 3d 00 20 lwz r9,32(r29) ffc0a15c: 38 00 00 00 li r0,0 ffc0a160: 7f 89 e0 40 cmplw cr7,r9,r28 ffc0a164: 41 9d 00 14 bgt- cr7,ffc0a178 <_Heap_Walk+0x320> <== NEVER TAKEN ffc0a168: 80 1d 00 24 lwz r0,36(r29) ffc0a16c: 7c 1c 00 10 subfc r0,r28,r0 ffc0a170: 38 00 00 00 li r0,0 ffc0a174: 7c 00 01 14 adde r0,r0,r0 block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { ffc0a178: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a17c: 40 be 00 14 bne+ cr7,ffc0a190 <_Heap_Walk+0x338> (*printer)( ffc0a180: 3c a0 ff c2 lis r5,-62 ffc0a184: 7f c3 f3 78 mr r3,r30 ffc0a188: 38 a5 dd 73 addi r5,r5,-8845 ffc0a18c: 48 00 00 78 b ffc0a204 <_Heap_Walk+0x3ac> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { ffc0a190: 7c 18 d3 96 divwu r0,r24,r26 ffc0a194: 7c 00 d1 d6 mullw r0,r0,r26 ffc0a198: 7f 98 00 00 cmpw cr7,r24,r0 ffc0a19c: 41 be 00 1c beq+ cr7,ffc0a1b8 <_Heap_Walk+0x360> (*printer)( ffc0a1a0: 3c a0 ff c2 lis r5,-62 ffc0a1a4: 7f c3 f3 78 mr r3,r30 ffc0a1a8: 38 a5 dd a0 addi r5,r5,-8800 ffc0a1ac: 7f e6 fb 78 mr r6,r31 ffc0a1b0: 7f 07 c3 78 mr r7,r24 ffc0a1b4: 48 00 00 58 b ffc0a20c <_Heap_Walk+0x3b4> <== ALWAYS TAKEN ); return false; } if ( block_size < min_block_size ) { ffc0a1b8: 7f 98 d8 40 cmplw cr7,r24,r27 ffc0a1bc: 40 bc 00 34 bge+ cr7,ffc0a1f0 <_Heap_Walk+0x398> (*printer)( ffc0a1c0: 80 01 00 18 lwz r0,24(r1) ffc0a1c4: 3c a0 ff c2 lis r5,-62 ffc0a1c8: 7f c3 f3 78 mr r3,r30 ffc0a1cc: 38 a5 dd ce addi r5,r5,-8754 ffc0a1d0: 7c 09 03 a6 mtctr r0 ffc0a1d4: 7f e6 fb 78 mr r6,r31 ffc0a1d8: 7f 07 c3 78 mr r7,r24 ffc0a1dc: 7f 68 db 78 mr r8,r27 ffc0a1e0: 38 80 00 01 li r4,1 ffc0a1e4: 4c c6 31 82 crclr 4*cr1+eq ffc0a1e8: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0a1ec: 48 00 01 20 b ffc0a30c <_Heap_Walk+0x4b4> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin ) { ffc0a1f0: 7f 9c f8 40 cmplw cr7,r28,r31 ffc0a1f4: 41 bd 00 30 bgt+ cr7,ffc0a224 <_Heap_Walk+0x3cc> (*printer)( ffc0a1f8: 3c a0 ff c2 lis r5,-62 ffc0a1fc: 7f c3 f3 78 mr r3,r30 ffc0a200: 38 a5 dd f9 addi r5,r5,-8711 ffc0a204: 7f e6 fb 78 mr r6,r31 ffc0a208: 7f 87 e3 78 mr r7,r28 ffc0a20c: 80 01 00 18 lwz r0,24(r1) ffc0a210: 38 80 00 01 li r4,1 ffc0a214: 7c 09 03 a6 mtctr r0 ffc0a218: 4c c6 31 82 crclr 4*cr1+eq ffc0a21c: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0a220: 48 00 00 ec b ffc0a30c <_Heap_Walk+0x4b4> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0a224: 80 1c 00 04 lwz r0,4(r28) ffc0a228: 70 09 00 01 andi. r9,r0,1 ffc0a22c: 40 82 01 08 bne- ffc0a334 <_Heap_Walk+0x4dc> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0a230: 80 1d 00 08 lwz r0,8(r29) ffc0a234: 7d c8 73 78 mr r8,r14 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)( ffc0a238: 80 ff 00 0c lwz r7,12(r31) 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; ffc0a23c: 82 bf 00 04 lwz r21,4(r31) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0a240: 7f 87 00 00 cmpw cr7,r7,r0 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; ffc0a244: 80 1d 00 0c lwz r0,12(r29) - 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; ffc0a248: 56 b8 00 3c rlwinm r24,r21,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); ffc0a24c: 7e df c2 14 add r22,r31,r24 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0a250: 41 9e 00 14 beq- cr7,ffc0a264 <_Heap_Walk+0x40c> "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)" : ""), ffc0a254: 7f 87 e8 00 cmpw cr7,r7,r29 ffc0a258: 7e e8 bb 78 mr r8,r23 ffc0a25c: 40 be 00 08 bne+ cr7,ffc0a264 <_Heap_Walk+0x40c> ffc0a260: 7d e8 7b 78 mr r8,r15 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)( ffc0a264: 81 3f 00 08 lwz r9,8(r31) ffc0a268: 7e 0a 83 78 mr r10,r16 ffc0a26c: 7f 89 00 00 cmpw cr7,r9,r0 ffc0a270: 41 9e 00 14 beq- cr7,ffc0a284 <_Heap_Walk+0x42c> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0a274: 7f 89 e8 00 cmpw cr7,r9,r29 ffc0a278: 7e ea bb 78 mr r10,r23 ffc0a27c: 40 be 00 08 bne+ cr7,ffc0a284 <_Heap_Walk+0x42c> ffc0a280: 7e 2a 8b 78 mr r10,r17 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)( ffc0a284: 80 01 00 18 lwz r0,24(r1) ffc0a288: 7f c3 f3 78 mr r3,r30 ffc0a28c: 38 80 00 00 li r4,0 ffc0a290: 7e 45 93 78 mr r5,r18 ffc0a294: 7c 09 03 a6 mtctr r0 ffc0a298: 7f e6 fb 78 mr r6,r31 ffc0a29c: 4c c6 31 82 crclr 4*cr1+eq ffc0a2a0: 4e 80 04 21 bctrl <== ALWAYS TAKEN block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { ffc0a2a4: 81 16 00 00 lwz r8,0(r22) ffc0a2a8: 7f 98 40 00 cmpw cr7,r24,r8 ffc0a2ac: 41 9e 00 34 beq- cr7,ffc0a2e0 <_Heap_Walk+0x488> (*printer)( ffc0a2b0: 80 01 00 18 lwz r0,24(r1) ffc0a2b4: 3c a0 ff c2 lis r5,-62 ffc0a2b8: 7f c3 f3 78 mr r3,r30 ffc0a2bc: 38 a5 de 82 addi r5,r5,-8574 ffc0a2c0: 7c 09 03 a6 mtctr r0 ffc0a2c4: 7f e6 fb 78 mr r6,r31 ffc0a2c8: 7f 07 c3 78 mr r7,r24 ffc0a2cc: 7e c9 b3 78 mr r9,r22 ffc0a2d0: 38 80 00 01 li r4,1 ffc0a2d4: 4c c6 31 82 crclr 4*cr1+eq ffc0a2d8: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0a2dc: 48 00 00 30 b ffc0a30c <_Heap_Walk+0x4b4> <== ALWAYS TAKEN ); return false; } if ( !prev_used ) { ffc0a2e0: 72 a9 00 01 andi. r9,r21,1 ffc0a2e4: 40 a2 00 30 bne+ ffc0a314 <_Heap_Walk+0x4bc> (*printer)( ffc0a2e8: 3c a0 ff c2 lis r5,-62 ffc0a2ec: 7f c3 f3 78 mr r3,r30 ffc0a2f0: 38 a5 de bb addi r5,r5,-8517 ffc0a2f4: 7f e6 fb 78 mr r6,r31 ffc0a2f8: 80 01 00 18 lwz r0,24(r1) ffc0a2fc: 38 80 00 01 li r4,1 ffc0a300: 7c 09 03 a6 mtctr r0 ffc0a304: 4c c6 31 82 crclr 4*cr1+eq ffc0a308: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0a30c: 38 60 00 00 li r3,0 ffc0a310: 48 00 00 78 b ffc0a388 <_Heap_Walk+0x530> <== ALWAYS TAKEN ffc0a314: 81 3d 00 08 lwz r9,8(r29) ffc0a318: 48 00 00 0c b ffc0a324 <_Heap_Walk+0x4cc> <== ALWAYS TAKEN { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { ffc0a31c: 41 9a 00 18 beq- cr6,ffc0a334 <_Heap_Walk+0x4dc> return true; } free_block = free_block->next; ffc0a320: 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 ) { ffc0a324: 7f 89 e8 00 cmpw cr7,r9,r29 if ( free_block == block ) { ffc0a328: 7f 09 f8 00 cmpw cr6,r9,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 ) { ffc0a32c: 40 9e ff f0 bne+ cr7,ffc0a31c <_Heap_Walk+0x4c4> ffc0a330: 48 00 00 b0 b ffc0a3e0 <_Heap_Walk+0x588> <== ALWAYS TAKEN ffc0a334: 7f 9f e3 78 mr r31,r28 ffc0a338: 48 00 00 44 b ffc0a37c <_Heap_Walk+0x524> <== ALWAYS TAKEN "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0a33c: 3e 60 ff c2 lis r19,-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)( ffc0a340: 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)( ffc0a344: 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)" : "") ffc0a348: 3e 20 ff c2 lis r17,-62 ffc0a34c: 3e e0 ff c2 lis r23,-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)( ffc0a350: 3e 00 ff c2 lis r16,-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)" : ""), ffc0a354: 3d e0 ff c2 lis r15,-62 ffc0a358: 3d c0 ff c2 lis r14,-62 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0a35c: 3a 73 dd 4e addi r19,r19,-8882 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)( ffc0a360: 3a 94 dd 37 addi r20,r20,-8905 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)( ffc0a364: 3a 52 de 56 addi r18,r18,-8618 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0a368: 3a 31 de 4c addi r17,r17,-8628 ffc0a36c: 3a f7 da 60 addi r23,r23,-9632 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)( ffc0a370: 3a 10 de 42 addi r16,r16,-8638 "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)" : ""), ffc0a374: 39 ef de 38 addi r15,r15,-8648 ffc0a378: 39 ce de 2d addi r14,r14,-8659 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { ffc0a37c: 7f 9f c8 00 cmpw cr7,r31,r25 ffc0a380: 40 9e fd 74 bne+ cr7,ffc0a0f4 <_Heap_Walk+0x29c> ffc0a384: 38 60 00 01 li r3,1 block = next_block; } return true; } ffc0a388: 80 01 00 6c lwz r0,108(r1) ffc0a38c: 81 c1 00 20 lwz r14,32(r1) ffc0a390: 7c 08 03 a6 mtlr r0 ffc0a394: 81 e1 00 24 lwz r15,36(r1) ffc0a398: 82 01 00 28 lwz r16,40(r1) ffc0a39c: 82 21 00 2c lwz r17,44(r1) ffc0a3a0: 82 41 00 30 lwz r18,48(r1) ffc0a3a4: 82 61 00 34 lwz r19,52(r1) ffc0a3a8: 82 81 00 38 lwz r20,56(r1) ffc0a3ac: 82 a1 00 3c lwz r21,60(r1) ffc0a3b0: 82 c1 00 40 lwz r22,64(r1) ffc0a3b4: 82 e1 00 44 lwz r23,68(r1) ffc0a3b8: 83 01 00 48 lwz r24,72(r1) ffc0a3bc: 83 21 00 4c lwz r25,76(r1) ffc0a3c0: 83 41 00 50 lwz r26,80(r1) ffc0a3c4: 83 61 00 54 lwz r27,84(r1) ffc0a3c8: 83 81 00 58 lwz r28,88(r1) ffc0a3cc: 83 a1 00 5c lwz r29,92(r1) ffc0a3d0: 83 c1 00 60 lwz r30,96(r1) ffc0a3d4: 83 e1 00 64 lwz r31,100(r1) ffc0a3d8: 38 21 00 68 addi r1,r1,104 ffc0a3dc: 4e 80 00 20 blr <== ALWAYS TAKEN return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0a3e0: 3c a0 ff c2 lis r5,-62 ffc0a3e4: 7f c3 f3 78 mr r3,r30 ffc0a3e8: 38 a5 de ea addi r5,r5,-8470 ffc0a3ec: 4b ff ff 08 b ffc0a2f4 <_Heap_Walk+0x49c> <== ALWAYS TAKEN ffc0a3f0 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0a3f0: 94 21 ff 88 stwu r1,-120(r1) ffc0a3f4: 7c 08 02 a6 mflr r0 ffc0a3f8: 93 e1 00 74 stw r31,116(r1) ffc0a3fc: 90 01 00 7c stw r0,124(r1) ffc0a400: 7c 60 1b 78 mr r0,r3 ffc0a404: 90 c1 00 1c stw r6,28(r1) ffc0a408: 90 e1 00 20 stw r7,32(r1) ffc0a40c: 91 01 00 24 stw r8,36(r1) ffc0a410: 91 21 00 28 stw r9,40(r1) ffc0a414: 91 41 00 2c stw r10,44(r1) ffc0a418: 40 86 00 24 bne- cr1,ffc0a43c <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN ffc0a41c: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc0a420: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc0a424: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0a428: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0a42c: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0a430: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0a434: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0a438: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list ap; if ( error ) { ffc0a43c: 2f 84 00 00 cmpwi cr7,r4,0 { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0a440: 7c bf 2b 78 mr r31,r5 va_list ap; if ( error ) { ffc0a444: 41 be 00 10 beq+ cr7,ffc0a454 <_Heap_Walk_print+0x64> printk( "FAIL[%d]: ", source ); ffc0a448: 3c 60 ff c2 lis r3,-62 ffc0a44c: 38 63 df 15 addi r3,r3,-8427 ffc0a450: 48 00 00 0c b ffc0a45c <_Heap_Walk_print+0x6c> <== ALWAYS TAKEN } else { printk( "PASS[%d]: ", source ); ffc0a454: 3c 60 ff c2 lis r3,-62 ffc0a458: 38 63 df 20 addi r3,r3,-8416 ffc0a45c: 7c 04 03 78 mr r4,r0 ffc0a460: 4c c6 31 82 crclr 4*cr1+eq ffc0a464: 4b ff b4 a5 bl ffc05908 <== ALWAYS TAKEN } va_start( ap, fmt ); ffc0a468: 38 00 00 03 li r0,3 ffc0a46c: 98 01 00 08 stb r0,8(r1) ffc0a470: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0a474: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0a478: 98 01 00 09 stb r0,9(r1) ffc0a47c: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0a480: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0a484: 90 01 00 0c stw r0,12(r1) ffc0a488: 38 01 00 10 addi r0,r1,16 ffc0a48c: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0a490: 4b ff d4 d5 bl ffc07964 <== ALWAYS TAKEN va_end( ap ); } ffc0a494: 80 01 00 7c lwz r0,124(r1) ffc0a498: 83 e1 00 74 lwz r31,116(r1) ffc0a49c: 38 21 00 78 addi r1,r1,120 ffc0a4a0: 7c 08 03 a6 mtlr r0 ffc0a4a4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09e54 <_Heap_Walk_print_nothing>: const char *fmt, ... ) { /* Do nothing */ } ffc09e54: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08404 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc08404: 94 21 ff f0 stwu r1,-16(r1) ffc08408: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN ffc0840c: 93 c1 00 08 stw r30,8(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc08410: 3f c0 00 00 lis r30,0 ffc08414: 3b de 27 a4 addi r30,r30,10148 * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc08418: 93 e1 00 0c stw r31,12(r1) ffc0841c: 3b e0 00 00 li r31,0 ffc08420: 90 01 00 14 stw r0,20(r1) <== ALWAYS TAKEN rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc08424: 48 00 00 08 b ffc0842c <_IO_Initialize_all_drivers+0x28> <== ALWAYS TAKEN (void) rtems_io_initialize( major, 0, NULL ); ffc08428: 48 00 55 15 bl ffc0d93c <== ALWAYS TAKEN void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc0842c: 80 1e 00 00 lwz r0,0(r30) (void) rtems_io_initialize( major, 0, NULL ); ffc08430: 7f e3 fb 78 mr r3,r31 ffc08434: 38 80 00 00 li r4,0 <== ALWAYS TAKEN void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc08438: 7f 9f 00 40 cmplw cr7,r31,r0 (void) rtems_io_initialize( major, 0, NULL ); ffc0843c: 38 a0 00 00 li r5,0 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc08440: 3b ff 00 01 addi r31,r31,1 ffc08444: 41 9c ff e4 blt+ cr7,ffc08428 <_IO_Initialize_all_drivers+0x24> (void) rtems_io_initialize( major, 0, NULL ); } ffc08448: 80 01 00 14 lwz r0,20(r1) ffc0844c: 83 c1 00 08 lwz r30,8(r1) ffc08450: 7c 08 03 a6 mtlr r0 ffc08454: 83 e1 00 0c lwz r31,12(r1) ffc08458: 38 21 00 10 addi r1,r1,16 ffc0845c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08460 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { ffc08460: 94 21 ff d8 stwu r1,-40(r1) <== ALWAYS TAKEN ffc08464: 7c 08 02 a6 mflr r0 uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; ffc08468: 3d 20 00 00 lis r9,0 * workspace. * */ void _IO_Manager_initialization(void) { ffc0846c: 90 01 00 2c stw r0,44(r1) uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; ffc08470: 39 29 20 a0 addi r9,r9,8352 * workspace. * */ void _IO_Manager_initialization(void) { ffc08474: 93 c1 00 20 stw r30,32(r1) ffc08478: 93 e1 00 24 stw r31,36(r1) uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; drivers_in_table = Configuration.number_of_device_drivers; number_of_drivers = Configuration.maximum_drivers; ffc0847c: 83 c9 00 2c lwz r30,44(r9) rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; drivers_in_table = Configuration.number_of_device_drivers; ffc08480: 83 e9 00 30 lwz r31,48(r9) * workspace. * */ void _IO_Manager_initialization(void) { ffc08484: 93 61 00 14 stw r27,20(r1) <== ALWAYS TAKEN /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) ffc08488: 7f 9e f8 40 cmplw cr7,r30,r31 * workspace. * */ void _IO_Manager_initialization(void) { ffc0848c: 93 81 00 18 stw r28,24(r1) ffc08490: 3f 80 00 00 lis r28,0 ffc08494: 93 a1 00 1c stw r29,28(r1) ffc08498: 3f a0 00 00 lis r29,0 ffc0849c: 93 21 00 0c stw r25,12(r1) ffc084a0: 93 41 00 10 stw r26,16(r1) uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; ffc084a4: 83 69 00 34 lwz r27,52(r9) /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) ffc084a8: 40 9d 00 40 ble- cr7,ffc084e8 <_IO_Manager_initialization+0x88> * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ffc084ac: 1f 3e 00 18 mulli r25,r30,24 /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) ffc084b0: 7f 23 cb 78 mr r3,r25 ffc084b4: 48 00 35 d5 bl ffc0ba88 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( ffc084b8: 7f 25 cb 78 mr r5,r25 ffc084bc: 38 80 00 00 li r4,0 _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; ffc084c0: 93 dd 27 a4 stw r30,10148(r29) /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) ffc084c4: 7c 7a 1b 78 mr r26,r3 ffc084c8: 90 7c 27 a8 stw r3,10152(r28) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( ffc084cc: 48 00 8b e1 bl ffc110ac <== ALWAYS TAKEN ffc084d0: 2f 9f 00 00 cmpwi cr7,r31,0 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; ffc084d4: 39 40 00 00 li r10,0 ffc084d8: 3b ff 00 01 addi r31,r31,1 ffc084dc: 40 be 00 4c bne+ cr7,ffc08528 <_IO_Manager_initialization+0xc8> <== ALWAYS TAKEN ffc084e0: 3b e0 00 01 li r31,1 <== NOT EXECUTED ffc084e4: 48 00 00 44 b ffc08528 <_IO_Manager_initialization+0xc8> <== NOT EXECUTED * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; ffc084e8: 93 7c 27 a8 stw r27,10152(r28) <== ALWAYS TAKEN _IO_Number_of_drivers = number_of_drivers; ffc084ec: 93 fd 27 a4 stw r31,10148(r29) return; ffc084f0: 48 00 00 48 b ffc08538 <_IO_Manager_initialization+0xd8> <== ALWAYS TAKEN _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; ffc084f4: 7c c9 50 6e lwzux r6,r9,r10 ffc084f8: 81 09 00 08 lwz r8,8(r9) ffc084fc: 80 09 00 0c lwz r0,12(r9) ffc08500: 80 e9 00 04 lwz r7,4(r9) ffc08504: 7c da 51 2e stwx r6,r26,r10 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc08508: 39 4a 00 18 addi r10,r10,24 _IO_Driver_address_table[index] = driver_table[index]; ffc0850c: 90 eb 00 04 stw r7,4(r11) ffc08510: 91 0b 00 08 stw r8,8(r11) ffc08514: 90 0b 00 0c stw r0,12(r11) ffc08518: 81 09 00 14 lwz r8,20(r9) ffc0851c: 80 09 00 10 lwz r0,16(r9) ffc08520: 91 0b 00 14 stw r8,20(r11) ffc08524: 90 0b 00 10 stw r0,16(r11) <== ALWAYS TAKEN memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc08528: 37 ff ff ff addic. r31,r31,-1 _IO_Driver_address_table[index] = driver_table[index]; ffc0852c: 7f 69 db 78 mr r9,r27 ffc08530: 7d 7a 52 14 add r11,r26,r10 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc08534: 40 82 ff c0 bne+ ffc084f4 <_IO_Manager_initialization+0x94> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } ffc08538: 80 01 00 2c lwz r0,44(r1) ffc0853c: 83 21 00 0c lwz r25,12(r1) ffc08540: 7c 08 03 a6 mtlr r0 ffc08544: 83 41 00 10 lwz r26,16(r1) ffc08548: 83 61 00 14 lwz r27,20(r1) ffc0854c: 83 81 00 18 lwz r28,24(r1) ffc08550: 83 a1 00 1c lwz r29,28(r1) ffc08554: 83 c1 00 20 lwz r30,32(r1) ffc08558: 83 e1 00 24 lwz r31,36(r1) ffc0855c: 38 21 00 28 addi r1,r1,40 ffc08560: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09218 <_ISR_Handler_initialization>: * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; ffc09218: 38 00 00 00 li r0,0 ffc0921c: 3d 20 00 00 lis r9,0 ffc09220: 98 09 27 88 stb r0,10120(r9) _ISR_Nest_level = 0; ffc09224: 38 00 00 00 li r0,0 ffc09228: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN ffc0922c: 90 09 27 54 stw r0,10068(r9) #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } ffc09230: 4e 80 00 20 blr <== ALWAYS TAKEN ffc091d4 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc091d4: 94 21 ff f0 stwu r1,-16(r1) ffc091d8: 7c 08 02 a6 mflr r0 _Internal_errors_What_happened.the_source = the_source; ffc091dc: 3d 60 00 00 lis r11,0 ffc091e0: 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 ) { ffc091e4: 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; ffc091e8: 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; ffc091ec: 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 ) { ffc091f0: 93 e1 00 0c stw r31,12(r1) ffc091f4: 7c bf 2b 78 mr r31,r5 _Internal_errors_What_happened.the_source = the_source; ffc091f8: 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 ); ffc091fc: 48 00 23 15 bl ffc0b510 <_User_extensions_Fatal> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc09200: 38 00 00 05 li r0,5 ffc09204: 3d 20 00 00 lis r9,0 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc09208: 7f e3 fb 78 mr r3,r31 ffc0920c: 90 09 27 90 stw r0,10128(r9) ffc09210: 4b ff a3 55 bl ffc03564 <_BSP_Fatal_error> <== ALWAYS TAKEN ffc09214: 48 00 00 00 b ffc09214 <_Internal_error_Occurred+0x40> <== NOT EXECUTED ffc17bf0 <_Message_queue_Allocate>: * Output parameters: * the_message_queue - set if successful, NULL otherwise */ Message_queue_Control *_Message_queue_Allocate(void) { ffc17bf0: 94 21 ff f8 stwu r1,-8(r1) ffc17bf4: 7c 08 02 a6 mflr r0 return (Message_queue_Control *) ffc17bf8: 3c 60 00 00 lis r3,0 ffc17bfc: 38 63 2f 64 addi r3,r3,12132 * Output parameters: * the_message_queue - set if successful, NULL otherwise */ Message_queue_Control *_Message_queue_Allocate(void) { ffc17c00: 90 01 00 0c stw r0,12(r1) return (Message_queue_Control *) ffc17c04: 4b ff bd 2d bl ffc13930 <_Objects_Allocate> <== ALWAYS TAKEN _Objects_Allocate(&_Message_queue_Information); } ffc17c08: 80 01 00 0c lwz r0,12(r1) <== ALWAYS TAKEN ffc17c0c: 38 21 00 08 addi r1,r1,8 <== ALWAYS TAKEN ffc17c10: 7c 08 03 a6 mtlr r0 ffc17c14: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d408 <_Message_queue_Manager_initialization>: * Output parameters: NONE */ void _Message_queue_Manager_initialization(void) { _Objects_Initialize_information( ffc0d408: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Message_queue_Manager_initialization(void) { ffc0d40c: 94 21 ff f8 stwu r1,-8(r1) ffc0d410: 7c 08 02 a6 mflr r0 _Objects_Initialize_information( ffc0d414: 3c 60 00 00 lis r3,0 ffc0d418: 80 c9 20 80 lwz r6,8320(r9) ffc0d41c: 38 63 2e 84 addi r3,r3,11908 ffc0d420: 38 80 00 02 li r4,2 * * Output parameters: NONE */ void _Message_queue_Manager_initialization(void) { ffc0d424: 90 01 00 0c stw r0,12(r1) _Objects_Initialize_information( ffc0d428: 38 a0 00 04 li r5,4 ffc0d42c: 38 e0 00 80 li r7,128 <== ALWAYS TAKEN ffc0d430: 39 00 00 00 li r8,0 <== ALWAYS TAKEN ffc0d434: 39 20 00 04 li r9,4 <== ALWAYS TAKEN ffc0d438: 4b ff c4 39 bl ffc09870 <_Objects_Initialize_information> <== ALWAYS TAKEN MP_PACKET_MESSAGE_QUEUE, _Message_queue_MP_Process_packet ); #endif } ffc0d43c: 80 01 00 0c lwz r0,12(r1) <== ALWAYS TAKEN ffc0d440: 38 21 00 08 addi r1,r1,8 ffc0d444: 7c 08 03 a6 mtlr r0 ffc0d448: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1183c <_Message_queue_Translate_core_message_queue_return_code>: if ( status > CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ) return RTEMS_INTERNAL_ERROR; #endif return _Message_queue_Translate_core_return_code_[status]; } ffc1183c: 3d 20 00 00 lis r9,0 ffc11840: 39 29 21 d8 addi r9,r9,8664 }; rtems_status_code _Message_queue_Translate_core_message_queue_return_code ( uint32_t status ) { ffc11844: 54 63 10 3a rlwinm r3,r3,2,0,29 if ( status > CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ) return RTEMS_INTERNAL_ERROR; #endif return _Message_queue_Translate_core_return_code_[status]; } ffc11848: 7c 69 18 2e lwzx r3,r9,r3 ffc1184c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e02c <_Objects_API_maximum_class>: case OBJECTS_NO_API: default: break; } return 0; } ffc0e02c: 38 03 ff ff addi r0,r3,-1 ffc0e030: 2b 80 00 03 cmplwi cr7,r0,3 ffc0e034: 38 60 00 00 li r3,0 <== ALWAYS TAKEN ffc0e038: 4d 9d 00 20 bgtlr cr7 ffc0e03c: 3d 20 ff c2 lis r9,-62 ffc0e040: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0e044: 39 29 c9 7c addi r9,r9,-13956 ffc0e048: 7c 69 00 2e lwzx r3,r9,r0 ffc0e04c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09234 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc09234: 94 21 ff f0 stwu r1,-16(r1) ffc09238: 7c 08 02 a6 mflr r0 ffc0923c: 90 01 00 14 stw r0,20(r1) <== ALWAYS TAKEN * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) ffc09240: 80 03 00 18 lwz r0,24(r3) */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc09244: 93 e1 00 0c stw r31,12(r1) ffc09248: 7c 7f 1b 78 mr r31,r3 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) ffc0924c: 2f 80 00 00 cmpwi cr7,r0,0 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc09250: 93 c1 00 08 stw r30,8(r1) * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) ffc09254: 38 60 00 00 li r3,0 ffc09258: 41 be 00 70 beq+ cr7,ffc092c8 <_Objects_Allocate+0x94> <== NEVER TAKEN /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc0925c: 3b df 00 20 addi r30,r31,32 ffc09260: 7f c3 f3 78 mr r3,r30 ffc09264: 4b ff f5 f9 bl ffc0885c <_Chain_Get> <== ALWAYS TAKEN if ( information->auto_extend ) { ffc09268: 88 1f 00 12 lbz r0,18(r31) ffc0926c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09270: 41 9e 00 58 beq- cr7,ffc092c8 <_Objects_Allocate+0x94> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { ffc09274: 2f 83 00 00 cmpwi cr7,r3,0 ffc09278: 40 be 00 1c bne+ cr7,ffc09294 <_Objects_Allocate+0x60> _Objects_Extend_information( information ); ffc0927c: 7f e3 fb 78 mr r3,r31 ffc09280: 48 00 00 95 bl ffc09314 <_Objects_Extend_information> <== ALWAYS TAKEN the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc09284: 7f c3 f3 78 mr r3,r30 ffc09288: 4b ff f5 d5 bl ffc0885c <_Chain_Get> <== ALWAYS TAKEN } if ( the_object ) { ffc0928c: 2c 03 00 00 cmpwi r3,0 ffc09290: 41 a2 00 38 beq+ ffc092c8 <_Objects_Allocate+0x94> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc09294: a1 63 00 0a lhz r11,10(r3) ffc09298: a0 1f 00 0a lhz r0,10(r31) _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc0929c: a1 3f 00 14 lhz r9,20(r31) } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc092a0: 7c 00 58 50 subf r0,r0,r11 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; ffc092a4: a1 7f 00 2c lhz r11,44(r31) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc092a8: 7c 00 4b 96 divwu r0,r0,r9 ffc092ac: 81 3f 00 30 lwz r9,48(r31) ffc092b0: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc092b4: 7d 49 00 2e lwzx r10,r9,r0 information->inactive--; ffc092b8: 39 6b ff ff addi r11,r11,-1 ffc092bc: b1 7f 00 2c sth r11,44(r31) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc092c0: 39 4a ff ff addi r10,r10,-1 ffc092c4: 7d 49 01 2e stwx r10,r9,r0 information->inactive--; } } return the_object; } ffc092c8: 80 01 00 14 lwz r0,20(r1) ffc092cc: 83 c1 00 08 lwz r30,8(r1) ffc092d0: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc092d4: 83 e1 00 0c lwz r31,12(r1) ffc092d8: 38 21 00 10 addi r1,r1,16 ffc092dc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc092e0 <_Objects_Close>: void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { ffc092e0: 94 21 ff f8 stwu r1,-8(r1) ffc092e4: 7c 08 02 a6 mflr r0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc092e8: 39 60 00 00 li r11,0 ffc092ec: 90 01 00 0c stw r0,12(r1) <== ALWAYS TAKEN ffc092f0: a0 04 00 0a lhz r0,10(r4) <== ALWAYS TAKEN ffc092f4: 81 23 00 1c lwz r9,28(r3) ffc092f8: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc092fc: 7d 69 01 2e stwx r11,r9,r0 _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); ffc09300: 48 00 06 61 bl ffc09960 <_Objects_Namespace_remove> <== ALWAYS TAKEN } ffc09304: 80 01 00 0c lwz r0,12(r1) ffc09308: 38 21 00 08 addi r1,r1,8 ffc0930c: 7c 08 03 a6 mtlr r0 ffc09310: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09314 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { ffc09314: 94 21 ff b8 stwu r1,-72(r1) ffc09318: 7c 08 02 a6 mflr r0 ffc0931c: 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 ) ffc09320: 81 63 00 34 lwz r11,52(r3) */ void _Objects_Extend_information( Objects_Information *information ) { ffc09324: 93 61 00 34 stw r27,52(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 ) ffc09328: 2f 8b 00 00 cmpwi cr7,r11,0 */ void _Objects_Extend_information( Objects_Information *information ) { ffc0932c: 93 e1 00 44 stw r31,68(r1) ffc09330: 7c 7f 1b 78 mr r31,r3 ffc09334: 92 a1 00 1c stw r21,28(r1) ffc09338: 92 c1 00 20 stw r22,32(r1) ffc0933c: 92 e1 00 24 stw r23,36(r1) ffc09340: 93 01 00 28 stw r24,40(r1) ffc09344: 93 21 00 2c stw r25,44(r1) ffc09348: 93 41 00 30 stw r26,48(r1) ffc0934c: 93 81 00 38 stw r28,56(r1) ffc09350: 93 a1 00 3c stw r29,60(r1) ffc09354: 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 ); ffc09358: a3 63 00 0a lhz r27,10(r3) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0935c: 40 be 00 14 bne+ cr7,ffc09370 <_Objects_Extend_information+0x5c> ffc09360: 7f 7e db 78 mr r30,r27 ffc09364: 3b 80 00 00 li r28,0 ffc09368: 3b 40 00 00 li r26,0 <== ALWAYS TAKEN ffc0936c: 48 00 00 4c b ffc093b8 <_Objects_Extend_information+0xa4> <== ALWAYS TAKEN block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc09370: a1 23 00 14 lhz r9,20(r3) ffc09374: 7f 7e db 78 mr r30,r27 ffc09378: a3 43 00 10 lhz r26,16(r3) ffc0937c: 3b 80 00 00 li r28,0 ffc09380: 7f 5a 4b 96 divwu r26,r26,r9 ffc09384: 2f 9a 00 00 cmpwi cr7,r26,0 ffc09388: 38 1a 00 01 addi r0,r26,1 ffc0938c: 40 be 00 20 bne+ cr7,ffc093ac <_Objects_Extend_information+0x98> <== ALWAYS TAKEN ffc09390: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc09394: 48 00 00 18 b ffc093ac <_Objects_Extend_information+0x98> <== NOT EXECUTED for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) ffc09398: 7d 4b 50 2e lwzx r10,r11,r10 ffc0939c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc093a0: 41 9e 00 18 beq- cr7,ffc093b8 <_Objects_Extend_information+0xa4> ffc093a4: 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++ ) { ffc093a8: 3b 9c 00 01 addi r28,r28,1 ffc093ac: 34 00 ff ff addic. r0,r0,-1 if ( information->object_blocks[ block ] == NULL ) ffc093b0: 57 8a 10 3a rlwinm r10,r28,2,0,29 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc093b4: 40 82 ff e4 bne+ ffc09398 <_Objects_Extend_information+0x84> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; ffc093b8: a0 1f 00 14 lhz r0,20(r31) ffc093bc: a2 df 00 10 lhz r22,16(r31) <== ALWAYS TAKEN ffc093c0: 7e c0 b2 14 add r22,r0,r22 /* * 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 ) { ffc093c4: 2b 96 ff ff cmplwi cr7,r22,65535 ffc093c8: 41 9d 02 1c bgt- cr7,ffc095e4 <_Objects_Extend_information+0x2d0> <== NEVER TAKEN /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { ffc093cc: 89 3f 00 12 lbz r9,18(r31) /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; ffc093d0: 80 7f 00 18 lwz r3,24(r31) if ( information->auto_extend ) { ffc093d4: 2f 89 00 00 cmpwi cr7,r9,0 /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; ffc093d8: 7c 60 19 d6 mullw r3,r0,r3 if ( information->auto_extend ) { ffc093dc: 41 9e 00 14 beq- cr7,ffc093f0 <_Objects_Extend_information+0xdc> new_object_block = _Workspace_Allocate( block_size ); ffc093e0: 48 00 26 f1 bl ffc0bad0 <_Workspace_Allocate> <== ALWAYS TAKEN if ( !new_object_block ) ffc093e4: 7c 7d 1b 79 mr. r29,r3 ffc093e8: 40 a2 00 10 bne+ ffc093f8 <_Objects_Extend_information+0xe4> ffc093ec: 48 00 01 f8 b ffc095e4 <_Objects_Extend_information+0x2d0> <== ALWAYS TAKEN return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); ffc093f0: 48 00 26 99 bl ffc0ba88 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN ffc093f4: 7c 7d 1b 78 mr r29,r3 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { ffc093f8: a0 1f 00 10 lhz r0,16(r31) ffc093fc: 7f 9e 00 40 cmplw cr7,r30,r0 ffc09400: 41 9c 01 5c blt- cr7,ffc0955c <_Objects_Extend_information+0x248> */ /* * Up the block count and maximum */ block_count++; ffc09404: 3b 3a 00 01 addi r25,r26,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 ); ffc09408: 1c 19 00 03 mulli r0,r25,3 <== ALWAYS TAKEN ffc0940c: 7c 76 da 14 add r3,r22,r27 ffc09410: 7c 63 02 14 add r3,r3,r0 ffc09414: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc09418: 48 00 26 b9 bl ffc0bad0 <_Workspace_Allocate> <== ALWAYS TAKEN if ( !object_blocks ) { ffc0941c: 7c 77 1b 79 mr. r23,r3 ffc09420: 40 a2 00 10 bne+ ffc09430 <_Objects_Extend_information+0x11c> _Workspace_Free( new_object_block ); ffc09424: 7f a3 eb 78 mr r3,r29 ffc09428: 48 00 26 dd bl ffc0bb04 <_Workspace_Free> <== ALWAYS TAKEN return; ffc0942c: 48 00 01 b8 b ffc095e4 <_Objects_Extend_information+0x2d0> <== ALWAYS TAKEN * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc09430: a0 1f 00 10 lhz r0,16(r31) } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( ffc09434: 57 39 10 3a rlwinm r25,r25,2,0,29 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc09438: 7f 17 ca 14 add r24,r23,r25 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0943c: 7f 80 d8 40 cmplw cr7,r0,r27 ffc09440: 7f 38 ca 14 add r25,r24,r25 ffc09444: 41 9d 00 20 bgt- cr7,ffc09464 <_Objects_Extend_information+0x150> ffc09448: 2f 9b 00 00 cmpwi cr7,r27,0 <== ALWAYS TAKEN ffc0944c: 39 20 00 00 li r9,0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; ffc09450: 38 00 00 00 li r0,0 ffc09454: 3b 7b 00 01 addi r27,r27,1 ffc09458: 40 be 00 50 bne+ cr7,ffc094a8 <_Objects_Extend_information+0x194> <== ALWAYS TAKEN ffc0945c: 3b 60 00 01 li r27,1 <== NOT EXECUTED ffc09460: 48 00 00 48 b ffc094a8 <_Objects_Extend_information+0x194> <== NOT EXECUTED * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); ffc09464: 57 55 10 3a rlwinm r21,r26,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, ffc09468: 80 9f 00 34 lwz r4,52(r31) ffc0946c: 7e a5 ab 78 mr r5,r21 ffc09470: 48 00 7b 3d bl ffc10fac <== ALWAYS TAKEN information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, ffc09474: 80 9f 00 30 lwz r4,48(r31) ffc09478: 7e a5 ab 78 mr r5,r21 ffc0947c: 7f 03 c3 78 mr r3,r24 ffc09480: 48 00 7b 2d bl ffc10fac <== ALWAYS TAKEN information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc09484: a0 1f 00 10 lhz r0,16(r31) ffc09488: 80 9f 00 1c lwz r4,28(r31) <== ALWAYS TAKEN ffc0948c: 7f 23 cb 78 mr r3,r25 ffc09490: 7f 7b 02 14 add r27,r27,r0 ffc09494: 57 65 10 3a rlwinm r5,r27,2,0,29 ffc09498: 48 00 7b 15 bl ffc10fac <== ALWAYS TAKEN ffc0949c: 48 00 00 18 b ffc094b4 <_Objects_Extend_information+0x1a0> <== ALWAYS TAKEN /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; ffc094a0: 7c 0b c9 2e stwx r0,r11,r25 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc094a4: 39 29 00 01 addi r9,r9,1 ffc094a8: 37 7b ff ff addic. r27,r27,-1 local_table[ index ] = NULL; ffc094ac: 55 2b 10 3a rlwinm r11,r9,2,0,29 <== ALWAYS TAKEN } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc094b0: 40 82 ff f0 bne+ ffc094a0 <_Objects_Extend_information+0x18c> */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc094b4: a1 5f 00 14 lhz r10,20(r31) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc094b8: 38 00 00 00 li r0,0 ffc094bc: 57 5a 10 3a rlwinm r26,r26,2,0,29 <== ALWAYS TAKEN inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc094c0: 7d 7e 52 14 add r11,r30,r10 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; ffc094c4: 7c 18 d1 2e stwx r0,r24,r26 ffc094c8: 7f 9e 58 40 cmplw cr7,r30,r11 for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc094cc: 57 c9 10 3a rlwinm r9,r30,2,0,29 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc094d0: 7c 17 d1 2e stwx r0,r23,r26 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc094d4: 7d 39 4a 14 add r9,r25,r9 index++ ) { local_table[ index ] = NULL; ffc094d8: 38 0a 00 01 addi r0,r10,1 ffc094dc: 39 40 00 00 li r10,0 <== ALWAYS TAKEN ffc094e0: 41 9d 00 0c bgt- cr7,ffc094ec <_Objects_Extend_information+0x1d8> <== NEVER TAKEN ffc094e4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc094e8: 40 be 00 14 bne+ cr7,ffc094fc <_Objects_Extend_information+0x1e8> <== ALWAYS TAKEN ffc094ec: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc094f0: 48 00 00 0c b ffc094fc <_Objects_Extend_information+0x1e8> <== NOT EXECUTED ffc094f4: 91 49 00 00 stw r10,0(r9) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { ffc094f8: 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 ; ffc094fc: 34 00 ff ff addic. r0,r0,-1 ffc09500: 40 82 ff f4 bne+ ffc094f4 <_Objects_Extend_information+0x1e0> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09504: 7c 00 00 a6 mfmsr r0 ffc09508: 7d 30 42 a6 mfsprg r9,0 ffc0950c: 7c 09 48 78 andc r9,r0,r9 ffc09510: 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( ffc09514: 81 7f 00 00 lwz r11,0(r31) <== ALWAYS TAKEN 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; ffc09518: 56 d6 04 3e clrlwi r22,r22,16 information->maximum_id = _Objects_Build_id( ffc0951c: a1 3f 00 04 lhz r9,4(r31) ffc09520: 55 6b c0 0e rlwinm r11,r11,24,0,7 <== ALWAYS TAKEN local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; ffc09524: 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( ffc09528: 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; ffc0952c: 93 1f 00 30 stw r24,48(r31) <== ALWAYS TAKEN information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc09530: 55 29 d8 08 rlwinm r9,r9,27,0,4 ffc09534: 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; ffc09538: 93 3f 00 1c stw r25,28(r31) <== ALWAYS TAKEN information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0953c: 7d 29 b3 78 or r9,r9,r22 ffc09540: 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; ffc09544: b2 df 00 10 sth r22,16(r31) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; ffc09548: 92 ff 00 34 stw r23,52(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0954c: 7c 00 01 24 mtmsr r0 information->maximum ); _ISR_Enable( level ); if ( old_tables ) ffc09550: 2f 83 00 00 cmpwi cr7,r3,0 ffc09554: 41 9e 00 08 beq- cr7,ffc0955c <_Objects_Extend_information+0x248> _Workspace_Free( old_tables ); ffc09558: 48 00 25 ad bl ffc0bb04 <_Workspace_Free> <== ALWAYS TAKEN } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0955c: 81 3f 00 34 lwz r9,52(r31) ffc09560: 57 9c 10 3a rlwinm r28,r28,2,0,29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc09564: 3b 61 00 08 addi r27,r1,8 ffc09568: 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; ffc0956c: 7f a9 e1 2e stwx r29,r9,r28 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc09570: 7f a4 eb 78 mr r4,r29 ffc09574: 7f 63 db 78 mr r3,r27 ffc09578: 80 df 00 18 lwz r6,24(r31) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0957c: 3b bf 00 20 addi r29,r31,32 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc09580: 48 00 44 41 bl ffc0d9c0 <_Chain_Initialize> <== ALWAYS TAKEN /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc09584: 48 00 00 2c b ffc095b0 <_Objects_Extend_information+0x29c> <== ALWAYS TAKEN the_object->id = _Objects_Build_id( ffc09588: 81 7f 00 00 lwz r11,0(r31) ffc0958c: a0 1f 00 04 lhz r0,4(r31) ffc09590: 55 6b c0 0e rlwinm r11,r11,24,0,7 ffc09594: 65 6b 00 01 oris r11,r11,1 ffc09598: 54 00 d8 08 rlwinm r0,r0,27,0,4 ffc0959c: 7d 60 03 78 or r0,r11,r0 ffc095a0: 7c 00 f3 78 or r0,r0,r30 ffc095a4: 90 09 00 08 stw r0,8(r9) index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; ffc095a8: 3b de 00 01 addi r30,r30,1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc095ac: 4b ff f2 81 bl ffc0882c <_Chain_Append> <== ALWAYS TAKEN /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc095b0: 7f 63 db 78 mr r3,r27 ffc095b4: 4b ff f2 a9 bl ffc0885c <_Chain_Get> <== ALWAYS TAKEN ffc095b8: 7c 69 1b 79 mr. r9,r3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc095bc: 7f a3 eb 78 mr r3,r29 ffc095c0: 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 ) { ffc095c4: 40 82 ff c4 bne+ ffc09588 <_Objects_Extend_information+0x274> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc095c8: a0 1f 00 14 lhz r0,20(r31) information->inactive = ffc095cc: a1 3f 00 2c lhz r9,44(r31) <== ALWAYS TAKEN _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc095d0: 81 7f 00 30 lwz r11,48(r31) information->inactive = ffc095d4: 7d 20 4a 14 add r9,r0,r9 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc095d8: 54 00 04 3e clrlwi r0,r0,16 information->inactive = ffc095dc: b1 3f 00 2c sth r9,44(r31) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc095e0: 7c 0b e1 2e stwx r0,r11,r28 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } ffc095e4: 80 01 00 4c lwz r0,76(r1) ffc095e8: 82 a1 00 1c lwz r21,28(r1) ffc095ec: 7c 08 03 a6 mtlr r0 ffc095f0: 82 c1 00 20 lwz r22,32(r1) ffc095f4: 82 e1 00 24 lwz r23,36(r1) ffc095f8: 83 01 00 28 lwz r24,40(r1) <== ALWAYS TAKEN ffc095fc: 83 21 00 2c lwz r25,44(r1) ffc09600: 83 41 00 30 lwz r26,48(r1) ffc09604: 83 61 00 34 lwz r27,52(r1) ffc09608: 83 81 00 38 lwz r28,56(r1) ffc0960c: 83 a1 00 3c lwz r29,60(r1) ffc09610: 83 c1 00 40 lwz r30,64(r1) ffc09614: 83 e1 00 44 lwz r31,68(r1) ffc09618: 38 21 00 48 addi r1,r1,72 ffc0961c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09620 <_Objects_Free>: void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { ffc09620: 94 21 ff e8 stwu r1,-24(r1) ffc09624: 7c 08 02 a6 mflr r0 ffc09628: 90 01 00 1c stw r0,28(r1) ffc0962c: 93 e1 00 14 stw r31,20(r1) ffc09630: 7c 7f 1b 78 mr r31,r3 <== ALWAYS TAKEN uint32_t allocation_size = information->allocation_size; _Chain_Append( &information->Inactive, &the_object->Node ); ffc09634: 38 63 00 20 addi r3,r3,32 void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { ffc09638: 93 a1 00 0c stw r29,12(r1) ffc0963c: 7c 9d 23 78 mr r29,r4 ffc09640: 93 c1 00 10 stw r30,16(r1) uint32_t allocation_size = information->allocation_size; ffc09644: a3 df 00 14 lhz r30,20(r31) <== ALWAYS TAKEN _Chain_Append( &information->Inactive, &the_object->Node ); ffc09648: 4b ff f1 e5 bl ffc0882c <_Chain_Append> <== ALWAYS TAKEN if ( information->auto_extend ) { ffc0964c: 88 1f 00 12 lbz r0,18(r31) ffc09650: 2f 80 00 00 cmpwi cr7,r0,0 ffc09654: 41 9e 00 54 beq- cr7,ffc096a8 <_Objects_Free+0x88> uint32_t block; block = (uint32_t) (_Objects_Get_index( the_object->id ) - ffc09658: a1 7d 00 0a lhz r11,10(r29) /* * Check if the threshold level has been met of * 1.5 x allocation_size are free. */ if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) { ffc0965c: 57 ca f8 7e rlwinm r10,r30,31,1,31 _Chain_Append( &information->Inactive, &the_object->Node ); if ( information->auto_extend ) { uint32_t block; block = (uint32_t) (_Objects_Get_index( the_object->id ) - ffc09660: a0 1f 00 0a lhz r0,10(r31) /* * Check if the threshold level has been met of * 1.5 x allocation_size are free. */ if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) { ffc09664: 7f ca f2 14 add r30,r10,r30 block = (uint32_t) (_Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id )); block /= information->allocation_size; information->inactive_per_block[ block ]++; ffc09668: a1 3f 00 14 lhz r9,20(r31) _Chain_Append( &information->Inactive, &the_object->Node ); if ( information->auto_extend ) { uint32_t block; block = (uint32_t) (_Objects_Get_index( the_object->id ) - ffc0966c: 7c 00 58 50 subf r0,r0,r11 _Objects_Get_index( information->minimum_id )); block /= information->allocation_size; information->inactive_per_block[ block ]++; information->inactive++; ffc09670: a1 7f 00 2c lhz r11,44(r31) block = (uint32_t) (_Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id )); block /= information->allocation_size; information->inactive_per_block[ block ]++; ffc09674: 7c 00 4b 96 divwu r0,r0,r9 ffc09678: 81 3f 00 30 lwz r9,48(r31) information->inactive++; ffc0967c: 39 6b 00 01 addi r11,r11,1 ffc09680: 55 6b 04 3e clrlwi r11,r11,16 /* * Check if the threshold level has been met of * 1.5 x allocation_size are free. */ if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) { ffc09684: 7f 8b f0 40 cmplw cr7,r11,r30 block = (uint32_t) (_Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id )); block /= information->allocation_size; information->inactive_per_block[ block ]++; information->inactive++; ffc09688: b1 7f 00 2c sth r11,44(r31) block = (uint32_t) (_Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id )); block /= information->allocation_size; information->inactive_per_block[ block ]++; ffc0968c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc09690: 7d 49 00 2e lwzx r10,r9,r0 ffc09694: 39 6a 00 01 addi r11,r10,1 ffc09698: 7d 69 01 2e stwx r11,r9,r0 /* * Check if the threshold level has been met of * 1.5 x allocation_size are free. */ if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) { ffc0969c: 40 bd 00 0c ble+ cr7,ffc096a8 <_Objects_Free+0x88> _Objects_Shrink_information( information ); ffc096a0: 7f e3 fb 78 mr r3,r31 ffc096a4: 48 00 03 55 bl ffc099f8 <_Objects_Shrink_information> <== ALWAYS TAKEN } } } ffc096a8: 80 01 00 1c lwz r0,28(r1) ffc096ac: 83 a1 00 0c lwz r29,12(r1) ffc096b0: 7c 08 03 a6 mtlr r0 ffc096b4: 83 c1 00 10 lwz r30,16(r1) <== ALWAYS TAKEN ffc096b8: 83 e1 00 14 lwz r31,20(r1) ffc096bc: 38 21 00 18 addi r1,r1,24 ffc096c0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc097e0 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { ffc097e0: 94 21 ff f0 stwu r1,-16(r1) <== ALWAYS TAKEN ffc097e4: 7c 08 02 a6 mflr r0 ffc097e8: 90 01 00 14 stw r0,20(r1) <== ALWAYS TAKEN * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; ffc097ec: 81 23 00 08 lwz r9,8(r3) /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { ffc097f0: a0 03 00 10 lhz r0,16(r3) <== ALWAYS TAKEN * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; ffc097f4: 21 29 00 01 subfic r9,r9,1 Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { ffc097f8: 93 c1 00 08 stw r30,8(r1) * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; ffc097fc: 7d 29 22 14 add r9,r9,r4 <== ALWAYS TAKEN /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { ffc09800: 7f 89 00 40 cmplw cr7,r9,r0 Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { ffc09804: 93 e1 00 0c stw r31,12(r1) ffc09808: 7c be 2b 78 mr r30,r5 /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { ffc0980c: 41 9d 00 3c bgt- cr7,ffc09848 <_Objects_Get+0x68> ffc09810: 3d 60 00 00 lis r11,0 ffc09814: 81 4b 27 2c lwz r10,10028(r11) ffc09818: 38 0a 00 01 addi r0,r10,1 <== ALWAYS TAKEN ffc0981c: 90 0b 27 2c stw r0,10028(r11) _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { ffc09820: 81 63 00 1c lwz r11,28(r3) ffc09824: 55 29 10 3a rlwinm r9,r9,2,0,29 *location = OBJECTS_LOCAL; ffc09828: 38 00 00 00 li r0,0 * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { ffc0982c: 7f eb 48 2e lwzx r31,r11,r9 ffc09830: 2f 9f 00 00 cmpwi cr7,r31,0 ffc09834: 40 be 00 0c bne+ cr7,ffc09840 <_Objects_Get+0x60> /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); ffc09838: 48 00 0a 75 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN *location = OBJECTS_ERROR; ffc0983c: 38 00 00 01 li r0,1 ffc09840: 90 1e 00 00 stw r0,0(r30) return NULL; ffc09844: 48 00 00 10 b ffc09854 <_Objects_Get+0x74> <== ALWAYS TAKEN /* * Object Id is not within this API and Class on this node. So * it may be global in a multiprocessing system. But it is clearly * invalid on a single processor system. */ *location = OBJECTS_ERROR; ffc09848: 38 00 00 01 li r0,1 ffc0984c: 90 05 00 00 stw r0,0(r5) ffc09850: 3b e0 00 00 li r31,0 _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } ffc09854: 80 01 00 14 lwz r0,20(r1) ffc09858: 7f e3 fb 78 mr r3,r31 <== ALWAYS TAKEN ffc0985c: 83 c1 00 08 lwz r30,8(r1) <== ALWAYS TAKEN ffc09860: 7c 08 03 a6 mtlr r0 ffc09864: 83 e1 00 0c lwz r31,12(r1) ffc09868: 38 21 00 10 addi r1,r1,16 ffc0986c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc096ec <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { ffc096ec: 94 21 ff f0 stwu r1,-16(r1) ffc096f0: 7c 08 02 a6 mflr r0 ffc096f4: 93 e1 00 0c stw r31,12(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc096f8: 7c 9f 23 79 mr. r31,r4 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { ffc096fc: 93 c1 00 08 stw r30,8(r1) ffc09700: 7c 7e 1b 78 mr r30,r3 ffc09704: 90 01 00 14 stw r0,20(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc09708: 41 a2 00 4c beq+ ffc09754 <_Objects_Get_information+0x68> /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); ffc0970c: 48 00 49 21 bl ffc0e02c <_Objects_API_maximum_class> <== ALWAYS TAKEN if ( the_class_api_maximum == 0 ) ffc09710: 2c 03 00 00 cmpwi r3,0 ffc09714: 41 a2 00 40 beq+ ffc09754 <_Objects_Get_information+0x68> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) ffc09718: 7f 9f 18 40 cmplw cr7,r31,r3 ffc0971c: 41 bd 00 38 bgt+ cr7,ffc09754 <_Objects_Get_information+0x68> return NULL; if ( !_Objects_Information_table[ the_api ] ) ffc09720: 3d 20 00 00 lis r9,0 ffc09724: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc09728: 39 29 2b 80 addi r9,r9,11136 <== ALWAYS TAKEN ffc0972c: 7d 29 f0 2e lwzx r9,r9,r30 ffc09730: 2f 89 00 00 cmpwi cr7,r9,0 ffc09734: 41 be 00 20 beq+ cr7,ffc09754 <_Objects_Get_information+0x68> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; ffc09738: 57 ff 10 3a rlwinm r31,r31,2,0,29 ffc0973c: 7c 69 f8 2e lwzx r3,r9,r31 if ( !info ) ffc09740: 2f 83 00 00 cmpwi cr7,r3,0 ffc09744: 41 be 00 14 beq+ cr7,ffc09758 <_Objects_Get_information+0x6c> <== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) ffc09748: a0 03 00 10 lhz r0,16(r3) ffc0974c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09750: 40 be 00 08 bne+ cr7,ffc09758 <_Objects_Get_information+0x6c> ffc09754: 38 60 00 00 li r3,0 return NULL; #endif return info; } ffc09758: 80 01 00 14 lwz r0,20(r1) ffc0975c: 83 c1 00 08 lwz r30,8(r1) ffc09760: 7c 08 03 a6 mtlr r0 ffc09764: 83 e1 00 0c lwz r31,12(r1) ffc09768: 38 21 00 10 addi r1,r1,16 ffc0976c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc096c4 <_Objects_Get_information_id>: #include Objects_Information *_Objects_Get_information_id( Objects_Id id ) { ffc096c4: 94 21 ff f8 stwu r1,-8(r1) ffc096c8: 7c 08 02 a6 mflr r0 return _Objects_Get_information( ffc096cc: 54 64 2e fe rlwinm r4,r3,5,27,31 ffc096d0: 54 63 47 7e rlwinm r3,r3,8,29,31 #include Objects_Information *_Objects_Get_information_id( Objects_Id id ) { ffc096d4: 90 01 00 0c stw r0,12(r1) return _Objects_Get_information( ffc096d8: 48 00 00 15 bl ffc096ec <_Objects_Get_information> <== ALWAYS TAKEN _Objects_Get_API( id ), _Objects_Get_class( id ) ); } ffc096dc: 80 01 00 0c lwz r0,12(r1) ffc096e0: 38 21 00 08 addi r1,r1,8 ffc096e4: 7c 08 03 a6 mtlr r0 ffc096e8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09770 <_Objects_Get_isr_disable>: { Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; ffc09770: 80 03 00 08 lwz r0,8(r3) <== ALWAYS TAKEN ffc09774: 20 00 00 01 subfic r0,r0,1 ffc09778: 7c 00 22 14 add r0,r0,r4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0977c: 7d 20 00 a6 mfmsr r9 ffc09780: 7d 70 42 a6 mfsprg r11,0 ffc09784: 7d 2b 58 78 andc r11,r9,r11 ffc09788: 7d 60 01 24 mtmsr r11 _ISR_Disable( level ); if ( information->maximum >= index ) { ffc0978c: a1 63 00 10 lhz r11,16(r3) ffc09790: 7f 8b 00 40 cmplw cr7,r11,r0 ffc09794: 41 9c 00 38 blt- cr7,ffc097cc <_Objects_Get_isr_disable+0x5c> if ( (the_object = information->local_table[ index ]) != NULL ) { ffc09798: 81 63 00 1c lwz r11,28(r3) ffc0979c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc097a0: 7c 6b 00 2e lwzx r3,r11,r0 ffc097a4: 2f 83 00 00 cmpwi cr7,r3,0 ffc097a8: 41 9e 00 14 beq- cr7,ffc097bc <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; ffc097ac: 38 00 00 00 li r0,0 <== ALWAYS TAKEN *level_p = level; ffc097b0: 91 26 00 00 stw r9,0(r6) index = id - information->minimum_id + 1; _ISR_Disable( level ); if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; ffc097b4: 90 05 00 00 stw r0,0(r5) *level_p = level; return the_object; ffc097b8: 4e 80 00 20 blr <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc097bc: 7d 20 01 24 mtmsr r9 } _ISR_Enable( level ); *location = OBJECTS_ERROR; ffc097c0: 38 00 00 01 li r0,1 ffc097c4: 90 05 00 00 stw r0,0(r5) return NULL; ffc097c8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc097cc: 7d 20 01 24 mtmsr r9 } _ISR_Enable( level ); *location = OBJECTS_ERROR; ffc097d0: 38 00 00 01 li r0,1 ffc097d4: 90 05 00 00 stw r0,0(r5) ffc097d8: 38 60 00 00 li r3,0 <== ALWAYS TAKEN _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } ffc097dc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc167e4 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc167e4: 94 21 ff d8 stwu r1,-40(r1) ffc167e8: 7c 08 02 a6 mflr r0 ffc167ec: 93 c1 00 20 stw r30,32(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc167f0: 7c 9e 23 79 mr. r30,r4 char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc167f4: 93 e1 00 24 stw r31,36(r1) <== ALWAYS TAKEN ffc167f8: 7c bf 2b 78 mr r31,r5 ffc167fc: 90 01 00 2c stw r0,44(r1) ffc16800: 93 a1 00 1c stw r29,28(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc16804: 41 a2 00 d0 beq+ ffc168d4 <_Objects_Get_name_as_string+0xf0> return NULL; if ( name == NULL ) ffc16808: 2f 85 00 00 cmpwi cr7,r5,0 ffc1680c: 41 be 00 cc beq+ cr7,ffc168d8 <_Objects_Get_name_as_string+0xf4> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc16810: 2f 83 00 00 cmpwi cr7,r3,0 ffc16814: 7c 7d 1b 78 mr r29,r3 ffc16818: 40 9e 00 10 bne- cr7,ffc16828 <_Objects_Get_name_as_string+0x44> ffc1681c: 3d 20 00 00 lis r9,0 ffc16820: 81 29 29 70 lwz r9,10608(r9) ffc16824: 83 a9 00 08 lwz r29,8(r9) information = _Objects_Get_information_id( tmpId ); ffc16828: 7f a3 eb 78 mr r3,r29 ffc1682c: 4b ff 7d 1d bl ffc0e548 <_Objects_Get_information_id> <== ALWAYS TAKEN if ( !information ) ffc16830: 2f 83 00 00 cmpwi cr7,r3,0 ffc16834: 41 be 00 a0 beq+ cr7,ffc168d4 <_Objects_Get_name_as_string+0xf0> return NULL; the_object = _Objects_Get( information, tmpId, &location ); ffc16838: 7f a4 eb 78 mr r4,r29 ffc1683c: 38 a1 00 08 addi r5,r1,8 ffc16840: 4b ff 7e 25 bl ffc0e664 <_Objects_Get> <== ALWAYS TAKEN switch ( location ) { ffc16844: 81 41 00 08 lwz r10,8(r1) ffc16848: 2f 8a 00 00 cmpwi cr7,r10,0 ffc1684c: 40 9e 00 88 bne- cr7,ffc168d4 <_Objects_Get_name_as_string+0xf0> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; ffc16850: 80 03 00 0c lwz r0,12(r3) } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc16854: 7f c9 03 a6 mtctr r30 lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; ffc16858: 99 41 00 10 stb r10,16(r1) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc1685c: 39 41 00 0c addi r10,r1,12 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc16860: 54 08 46 3e rlwinm r8,r0,8,24,31 lname[ 1 ] = (u32_name >> 16) & 0xff; ffc16864: 54 0b 84 3e rlwinm r11,r0,16,16,31 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc16868: 99 01 00 0c stb r8,12(r1) lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; ffc1686c: 54 09 c2 3e rlwinm r9,r0,24,8,31 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc16870: 3d 00 00 00 lis r8,0 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; ffc16874: 99 61 00 0d stb r11,13(r1) } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc16878: 39 08 28 a4 addi r8,r8,10404 { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; ffc1687c: 99 21 00 0e stb r9,14(r1) lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; ffc16880: 39 60 00 00 li r11,0 ffc16884: 7f e9 fb 78 mr r9,r31 uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; ffc16888: 98 01 00 0f stb r0,15(r1) ffc1688c: 48 00 00 24 b ffc168b0 <_Objects_Get_name_as_string+0xcc> <== ALWAYS TAKEN } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc16890: 80 e8 00 00 lwz r7,0(r8) ffc16894: 7c e7 02 14 add r7,r7,r0 ffc16898: 88 e7 00 01 lbz r7,1(r7) ffc1689c: 70 e6 00 97 andi. r6,r7,151 ffc168a0: 40 82 00 08 bne- ffc168a8 <_Objects_Get_name_as_string+0xc4> ffc168a4: 38 00 00 2a li r0,42 ffc168a8: 98 09 00 00 stb r0,0(r9) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc168ac: 39 29 00 01 addi r9,r9,1 ffc168b0: 42 40 00 14 bdz- ffc168c4 <_Objects_Get_name_as_string+0xe0> ffc168b4: 7c 0a 58 ae lbzx r0,r10,r11 ffc168b8: 39 6b 00 01 addi r11,r11,1 ffc168bc: 2f 80 00 00 cmpwi cr7,r0,0 ffc168c0: 40 9e ff d0 bne+ cr7,ffc16890 <_Objects_Get_name_as_string+0xac> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; ffc168c4: 38 00 00 00 li r0,0 ffc168c8: 98 09 00 00 stb r0,0(r9) _Thread_Enable_dispatch(); ffc168cc: 4b ff 89 11 bl ffc0f1dc <_Thread_Enable_dispatch> <== ALWAYS TAKEN return name; ffc168d0: 48 00 00 08 b ffc168d8 <_Objects_Get_name_as_string+0xf4> <== ALWAYS TAKEN ffc168d4: 3b e0 00 00 li r31,0 } return NULL; /* unreachable path */ } ffc168d8: 80 01 00 2c lwz r0,44(r1) ffc168dc: 7f e3 fb 78 mr r3,r31 ffc168e0: 83 a1 00 1c lwz r29,28(r1) ffc168e4: 7c 08 03 a6 mtlr r0 ffc168e8: 83 c1 00 20 lwz r30,32(r1) ffc168ec: 83 e1 00 24 lwz r31,36(r1) ffc168f0: 38 21 00 28 addi r1,r1,40 ffc168f4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc195d4 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { ffc195d4: 94 21 ff e8 stwu r1,-24(r1) ffc195d8: 7c 08 02 a6 mflr r0 ffc195dc: 93 c1 00 10 stw r30,16(r1) Objects_Control *object; Objects_Id next_id; if ( !information ) ffc195e0: 7c 7e 1b 79 mr. r30,r3 Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { ffc195e4: 93 81 00 08 stw r28,8(r1) ffc195e8: 7c dc 33 78 mr r28,r6 ffc195ec: 93 e1 00 14 stw r31,20(r1) ffc195f0: 7c bf 2b 78 mr r31,r5 ffc195f4: 90 01 00 1c stw r0,28(r1) ffc195f8: 93 a1 00 0c stw r29,12(r1) Objects_Control *object; Objects_Id next_id; if ( !information ) ffc195fc: 41 a2 00 78 beq+ ffc19674 <_Objects_Get_next+0xa0> return NULL; if ( !location_p ) ffc19600: 2f 85 00 00 cmpwi cr7,r5,0 ffc19604: 41 be 00 70 beq+ cr7,ffc19674 <_Objects_Get_next+0xa0> return NULL; if ( !next_id_p ) ffc19608: 2f 86 00 00 cmpwi cr7,r6,0 ffc1960c: 41 9e 00 68 beq- cr7,ffc19674 <_Objects_Get_next+0xa0> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) ffc19610: 54 80 04 3e clrlwi r0,r4,16 ffc19614: 2f 80 00 00 cmpwi cr7,r0,0 ffc19618: 7c 9d 23 78 mr r29,r4 ffc1961c: 40 9e 00 08 bne- cr7,ffc19624 <_Objects_Get_next+0x50> next_id = information->minimum_id; ffc19620: 83 be 00 08 lwz r29,8(r30) else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc19624: a1 3e 00 10 lhz r9,16(r30) ffc19628: 57 a0 04 3e clrlwi r0,r29,16 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1962c: 7f a4 eb 78 mr r4,r29 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc19630: 7f 89 00 40 cmplw cr7,r9,r0 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc19634: 7f c3 f3 78 mr r3,r30 ffc19638: 7f e5 fb 78 mr r5,r31 next_id++; ffc1963c: 3b bd 00 01 addi r29,r29,1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc19640: 40 bc 00 1c bge+ cr7,ffc1965c <_Objects_Get_next+0x88> { *location_p = OBJECTS_ERROR; ffc19644: 38 00 00 01 li r0,1 ffc19648: 90 1f 00 00 stw r0,0(r31) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; ffc1964c: 38 00 ff ff li r0,-1 ffc19650: 38 60 00 00 li r3,0 ffc19654: 90 1c 00 00 stw r0,0(r28) return 0; ffc19658: 48 00 00 20 b ffc19678 <_Objects_Get_next+0xa4> <== ALWAYS TAKEN *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1965c: 4b ff 50 09 bl ffc0e664 <_Objects_Get> <== ALWAYS TAKEN next_id++; } while (*location_p != OBJECTS_LOCAL); ffc19660: 80 1f 00 00 lwz r0,0(r31) ffc19664: 2f 80 00 00 cmpwi cr7,r0,0 ffc19668: 40 9e ff bc bne+ cr7,ffc19624 <_Objects_Get_next+0x50> *next_id_p = next_id; ffc1966c: 93 bc 00 00 stw r29,0(r28) return object; ffc19670: 48 00 00 08 b ffc19678 <_Objects_Get_next+0xa4> <== ALWAYS TAKEN final: *next_id_p = OBJECTS_ID_FINAL; return 0; ffc19674: 38 60 00 00 li r3,0 } ffc19678: 80 01 00 1c lwz r0,28(r1) ffc1967c: 83 81 00 08 lwz r28,8(r1) ffc19680: 7c 08 03 a6 mtlr r0 ffc19684: 83 a1 00 0c lwz r29,12(r1) ffc19688: 83 c1 00 10 lwz r30,16(r1) ffc1968c: 83 e1 00 14 lwz r31,20(r1) ffc19690: 38 21 00 18 addi r1,r1,24 ffc19694: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1c004 <_Objects_Get_no_protection>: /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; ffc1c004: 81 23 00 08 lwz r9,8(r3) if ( information->maximum >= index ) { ffc1c008: a0 03 00 10 lhz r0,16(r3) /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; ffc1c00c: 21 29 00 01 subfic r9,r9,1 ffc1c010: 7d 29 22 14 add r9,r9,r4 if ( information->maximum >= index ) { ffc1c014: 7f 80 48 40 cmplw cr7,r0,r9 ffc1c018: 41 9c 00 24 blt- cr7,ffc1c03c <_Objects_Get_no_protection+0x38> if ( (the_object = information->local_table[ index ]) != NULL ) { ffc1c01c: 81 63 00 1c lwz r11,28(r3) ffc1c020: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc1c024: 7c 6b 48 2e lwzx r3,r11,r9 ffc1c028: 2f 83 00 00 cmpwi cr7,r3,0 ffc1c02c: 41 9e 00 10 beq- cr7,ffc1c03c <_Objects_Get_no_protection+0x38> <== NEVER TAKEN *location = OBJECTS_LOCAL; ffc1c030: 38 00 00 00 li r0,0 ffc1c034: 90 05 00 00 stw r0,0(r5) return the_object; ffc1c038: 4e 80 00 20 blr <== ALWAYS TAKEN /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; ffc1c03c: 38 00 00 01 li r0,1 ffc1c040: 90 05 00 00 stw r0,0(r5) ffc1c044: 38 60 00 00 li r3,0 return NULL; } ffc1c048: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e6f4 <_Objects_Id_to_name>: /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0e6f4: 2c 03 00 00 cmpwi r3,0 */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0e6f8: 94 21 ff e0 stwu r1,-32(r1) ffc0e6fc: 7c 08 02 a6 mflr r0 ffc0e700: 93 e1 00 1c stw r31,28(r1) ffc0e704: 7c 9f 23 78 mr r31,r4 ffc0e708: 90 01 00 24 stw r0,36(r1) /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0e70c: 41 82 00 0c beq- ffc0e718 <_Objects_Id_to_name+0x24> ffc0e710: 7c 64 1b 78 mr r4,r3 ffc0e714: 48 00 00 10 b ffc0e724 <_Objects_Id_to_name+0x30> <== ALWAYS TAKEN ffc0e718: 3d 20 00 00 lis r9,0 ffc0e71c: 81 29 29 70 lwz r9,10608(r9) ffc0e720: 80 89 00 08 lwz r4,8(r9) */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); ffc0e724: 54 89 47 7e rlwinm r9,r4,8,29,31 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) ffc0e728: 38 09 ff ff addi r0,r9,-1 ffc0e72c: 2b 80 00 03 cmplwi cr7,r0,3 ffc0e730: 41 9d 00 3c bgt- cr7,ffc0e76c <_Objects_Id_to_name+0x78> ffc0e734: 48 00 00 50 b ffc0e784 <_Objects_Id_to_name+0x90> <== ALWAYS TAKEN if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; ffc0e738: 54 80 3e 7a rlwinm r0,r4,7,25,29 ffc0e73c: 7c 69 00 2e lwzx r3,r9,r0 if ( !information ) ffc0e740: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e744: 41 9e 00 28 beq- cr7,ffc0e76c <_Objects_Id_to_name+0x78> <== NEVER TAKEN #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); ffc0e748: 38 a1 00 08 addi r5,r1,8 ffc0e74c: 4b ff ff 19 bl ffc0e664 <_Objects_Get> <== ALWAYS TAKEN if ( !the_object ) ffc0e750: 2c 03 00 00 cmpwi r3,0 ffc0e754: 41 82 00 18 beq- ffc0e76c <_Objects_Id_to_name+0x78> return OBJECTS_INVALID_ID; *name = the_object->name; ffc0e758: 80 03 00 0c lwz r0,12(r3) ffc0e75c: 90 1f 00 00 stw r0,0(r31) _Thread_Enable_dispatch(); ffc0e760: 48 00 0a 7d bl ffc0f1dc <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0e764: 38 60 00 00 li r3,0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc0e768: 48 00 00 08 b ffc0e770 <_Objects_Id_to_name+0x7c> <== ALWAYS TAKEN ffc0e76c: 38 60 00 03 li r3,3 } ffc0e770: 80 01 00 24 lwz r0,36(r1) ffc0e774: 83 e1 00 1c lwz r31,28(r1) ffc0e778: 38 21 00 20 addi r1,r1,32 ffc0e77c: 7c 08 03 a6 mtlr r0 ffc0e780: 4e 80 00 20 blr <== ALWAYS TAKEN the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) ffc0e784: 3d 60 00 00 lis r11,0 ffc0e788: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0e78c: 39 6b 34 c0 addi r11,r11,13504 ffc0e790: 7d 2b 48 2e lwzx r9,r11,r9 ffc0e794: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e798: 40 9e ff a0 bne+ cr7,ffc0e738 <_Objects_Id_to_name+0x44> ffc0e79c: 4b ff ff d0 b ffc0e76c <_Objects_Id_to_name+0x78> <== ALWAYS TAKEN ffc09870 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { ffc09870: 7c 08 02 a6 mflr r0 ffc09874: 94 21 ff f8 stwu r1,-8(r1) information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; ffc09878: 3d 40 00 00 lis r10,0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { ffc0987c: 90 01 00 0c stw r0,12(r1) <== ALWAYS TAKEN /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; ffc09880: 54 c0 0f fe rlwinm r0,r6,1,31,31 <== ALWAYS TAKEN maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { ffc09884: 2f 80 00 00 cmpwi cr7,r0,0 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; ffc09888: 39 4a 2b 80 addi r10,r10,11136 uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; ffc0988c: 90 e3 00 18 stw r7,24(r3) information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; ffc09890: 54 8b 10 3a rlwinm r11,r4,2,0,29 ffc09894: 7d 6a 58 2e lwzx r11,r10,r11 ffc09898: 54 a8 10 3a rlwinm r8,r5,2,0,29 #endif information->the_api = the_api; information->the_class = the_class; information->size = size; information->local_table = 0; ffc0989c: 39 40 00 00 li r10,0 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; ffc098a0: 90 83 00 00 stw r4,0(r3) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; ffc098a4: 54 c6 00 7e clrlwi r6,r6,1 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; ffc098a8: 7c 6b 41 2e stwx r3,r11,r8 /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; ffc098ac: b1 43 00 10 sth r10,16(r3) #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; ffc098b0: b0 a3 00 04 sth r5,4(r3) information->size = size; information->local_table = 0; ffc098b4: 91 43 00 1c stw r10,28(r3) information->inactive_per_block = 0; ffc098b8: 91 43 00 30 stw r10,48(r3) <== ALWAYS TAKEN information->object_blocks = 0; ffc098bc: 91 43 00 34 stw r10,52(r3) information->inactive = 0; ffc098c0: b1 43 00 2c sth r10,44(r3) _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = ffc098c4: 98 03 00 12 stb r0,18(r3) <== ALWAYS TAKEN maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { ffc098c8: 41 9e 00 1c beq- cr7,ffc098e4 <_Objects_Initialize_information+0x74> ffc098cc: 2f 86 00 00 cmpwi cr7,r6,0 ffc098d0: 40 be 00 14 bne+ cr7,ffc098e4 <_Objects_Initialize_information+0x74> _Internal_error_Occurred( ffc098d4: 38 60 00 00 li r3,0 ffc098d8: 38 80 00 01 li r4,1 ffc098dc: 38 a0 00 14 li r5,20 ffc098e0: 4b ff f8 f5 bl ffc091d4 <_Internal_error_Occurred> <== ALWAYS TAKEN /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) ffc098e4: 71 20 00 03 andi. r0,r9,3 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; ffc098e8: b0 c3 00 14 sth r6,20(r3) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = ffc098ec: 54 84 c0 0e rlwinm r4,r4,24,0,7 ffc098f0: 64 84 00 01 oris r4,r4,1 ffc098f4: 54 a5 d8 08 rlwinm r5,r5,27,0,4 ffc098f8: 7c 06 00 d0 neg r0,r6 ffc098fc: 54 00 0f fe rlwinm r0,r0,1,31,31 ffc09900: 7c 85 2b 78 or r5,r4,r5 <== ALWAYS TAKEN information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; ffc09904: 3d 60 00 00 lis r11,0 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = ffc09908: 7c a5 03 78 or r5,r5,r0 <== ALWAYS TAKEN information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; ffc0990c: 39 6b 28 f4 addi r11,r11,10484 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = ffc09910: 90 a3 00 08 stw r5,8(r3) <== ALWAYS TAKEN * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ffc09914: 38 09 00 04 addi r0,r9,4 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; ffc09918: 91 63 00 1c stw r11,28(r3) * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ffc0991c: 54 00 00 3a rlwinm r0,r0,0,0,29 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) ffc09920: 40 82 00 08 bne- ffc09928 <_Objects_Initialize_information+0xb8> <== NEVER TAKEN ffc09924: 7d 20 4b 78 mr r0,r9 _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { ffc09928: 2f 86 00 00 cmpwi cr7,r6,0 if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; ffc0992c: b0 03 00 38 sth r0,56(r3) <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc09930: 39 63 00 24 addi r11,r3,36 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc09934: 39 23 00 20 addi r9,r3,32 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc09938: 91 63 00 20 stw r11,32(r3) <== ALWAYS TAKEN the_chain->permanent_null = NULL; ffc0993c: 38 00 00 00 li r0,0 <== ALWAYS TAKEN ffc09940: 90 03 00 24 stw r0,36(r3) the_chain->last = _Chain_Head(the_chain); ffc09944: 91 23 00 28 stw r9,40(r3) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { ffc09948: 41 be 00 08 beq+ cr7,ffc09950 <_Objects_Initialize_information+0xe0> /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); ffc0994c: 4b ff f9 c9 bl ffc09314 <_Objects_Extend_information> <== ALWAYS TAKEN _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } ffc09950: 80 01 00 0c lwz r0,12(r1) <== ALWAYS TAKEN ffc09954: 38 21 00 08 addi r1,r1,8 ffc09958: 7c 08 03 a6 mtlr r0 ffc0995c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0996c <_Objects_Name_to_id_u32>: Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) ffc0996c: 2c 06 00 00 cmpwi r6,0 Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { ffc09970: 7c 69 1b 78 mr r9,r3 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) ffc09974: 38 60 00 02 li r3,2 ffc09978: 4d 82 00 20 beqlr return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) ffc0997c: 2f 84 00 00 cmpwi cr7,r4,0 ffc09980: 41 9e 00 70 beq- cr7,ffc099f0 <_Objects_Name_to_id_u32+0x84> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && ffc09984: a0 09 00 10 lhz r0,16(r9) ffc09988: 2f 80 00 00 cmpwi cr7,r0,0 ffc0998c: 41 9e 00 64 beq- cr7,ffc099f0 <_Objects_Name_to_id_u32+0x84> ffc09990: 2f 85 00 00 cmpwi cr7,r5,0 ffc09994: 41 9e 00 48 beq- cr7,ffc099dc <_Objects_Name_to_id_u32+0x70> ffc09998: 6c ab 80 00 xoris r11,r5,32768 ffc0999c: 2f 8b ff ff cmpwi cr7,r11,-1 ffc099a0: 41 9e 00 3c beq- cr7,ffc099dc <_Objects_Name_to_id_u32+0x70> ffc099a4: 2f 85 00 01 cmpwi cr7,r5,1 ffc099a8: 40 be 00 48 bne+ cr7,ffc099f0 <_Objects_Name_to_id_u32+0x84> ffc099ac: 48 00 00 30 b ffc099dc <_Objects_Name_to_id_u32+0x70> <== ALWAYS TAKEN if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; ffc099b0: 81 09 00 1c lwz r8,28(r9) ffc099b4: 7d 48 50 2e lwzx r10,r8,r10 <== ALWAYS TAKEN if ( !the_object ) ffc099b8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc099bc: 41 9e 00 24 beq- cr7,ffc099e0 <_Objects_Name_to_id_u32+0x74> continue; if ( name == the_object->name.name_u32 ) { ffc099c0: 81 0a 00 0c lwz r8,12(r10) ffc099c4: 7f 84 40 00 cmpw cr7,r4,r8 ffc099c8: 40 be 00 18 bne+ cr7,ffc099e0 <_Objects_Name_to_id_u32+0x74> *id = the_object->id; ffc099cc: 80 0a 00 08 lwz r0,8(r10) ffc099d0: 38 60 00 00 li r3,0 ffc099d4: 90 06 00 00 stw r0,0(r6) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc099d8: 4e 80 00 20 blr <== ALWAYS TAKEN search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { ffc099dc: 39 60 00 01 li r11,1 ffc099e0: 7f 8b 00 40 cmplw cr7,r11,r0 the_object = information->local_table[ index ]; ffc099e4: 55 6a 10 3a rlwinm r10,r11,2,0,29 search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { ffc099e8: 39 6b 00 01 addi r11,r11,1 ffc099ec: 40 9d ff c4 ble+ cr7,ffc099b0 <_Objects_Name_to_id_u32+0x44> ffc099f0: 38 60 00 01 li r3,1 name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } ffc099f4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09960 <_Objects_Namespace_remove>: * Clear out either format. */ #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) the_object->name.name_p = NULL; #endif the_object->name.name_u32 = 0; ffc09960: 38 00 00 00 li r0,0 ffc09964: 90 04 00 0c stw r0,12(r4) } ffc09968: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0c130 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { ffc0c130: 94 21 ff f0 stwu r1,-16(r1) ffc0c134: 7c 08 02 a6 mflr r0 ffc0c138: 90 01 00 14 stw r0,20(r1) size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); ffc0c13c: a0 03 00 38 lhz r0,56(r3) ffc0c140: 7c a3 2b 78 mr r3,r5 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { ffc0c144: 93 c1 00 08 stw r30,8(r1) ffc0c148: 7c 9e 23 78 mr r30,r4 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); ffc0c14c: 7c 04 03 78 mr r4,r0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { ffc0c150: 93 e1 00 0c stw r31,12(r1) ffc0c154: 7c bf 2b 78 mr r31,r5 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); ffc0c158: 48 00 85 a1 bl ffc146f8 <== ALWAYS TAKEN d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( ffc0c15c: 2b 83 00 01 cmplwi cr7,r3,1 ffc0c160: 89 5f 00 00 lbz r10,0(r31) ffc0c164: 40 9d 00 5c ble- cr7,ffc0c1c0 <_Objects_Set_name+0x90> ffc0c168: 2b 83 00 02 cmplwi cr7,r3,2 ffc0c16c: 89 7f 00 01 lbz r11,1(r31) ffc0c170: 55 6b 80 1e rlwinm r11,r11,16,0,15 ffc0c174: 40 9d 00 50 ble- cr7,ffc0c1c4 <_Objects_Set_name+0x94> ffc0c178: 2b 83 00 03 cmplwi cr7,r3,3 ffc0c17c: 89 3f 00 02 lbz r9,2(r31) ffc0c180: 38 00 00 20 li r0,32 ffc0c184: 55 29 40 2e rlwinm r9,r9,8,0,23 ffc0c188: 40 9d 00 08 ble- cr7,ffc0c190 <_Objects_Set_name+0x60> ffc0c18c: 88 1f 00 03 lbz r0,3(r31) ffc0c190: 55 4a c0 0e rlwinm r10,r10,24,0,7 ffc0c194: 7d 6b 53 78 or r11,r11,r10 ffc0c198: 7d 69 4b 78 or r9,r11,r9 ffc0c19c: 7d 20 03 78 or r0,r9,r0 ffc0c1a0: 90 1e 00 0c stw r0,12(r30) ); } return true; } ffc0c1a4: 38 60 00 01 li r3,1 ffc0c1a8: 80 01 00 14 lwz r0,20(r1) ffc0c1ac: 83 c1 00 08 lwz r30,8(r1) ffc0c1b0: 7c 08 03 a6 mtlr r0 ffc0c1b4: 83 e1 00 0c lwz r31,12(r1) ffc0c1b8: 38 21 00 10 addi r1,r1,16 ffc0c1bc: 4e 80 00 20 blr <== ALWAYS TAKEN d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( ffc0c1c0: 3d 60 00 20 lis r11,32 ffc0c1c4: 39 20 20 00 li r9,8192 ffc0c1c8: 38 00 00 20 li r0,32 ffc0c1cc: 4b ff ff c4 b ffc0c190 <_Objects_Set_name+0x60> <== ALWAYS TAKEN ffc099f8 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { ffc099f8: 94 21 ff e8 stwu r1,-24(r1) ffc099fc: 7c 08 02 a6 mflr r0 /* * 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) / ffc09a00: 39 20 00 00 li r9,0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc09a04: 90 01 00 1c stw r0,28(r1) ffc09a08: 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) / ffc09a0c: a1 43 00 10 lhz r10,16(r3) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); ffc09a10: a3 c3 00 0a lhz r30,10(r3) block_count = (information->maximum - index_base) / ffc09a14: a1 63 00 14 lhz r11,20(r3) ffc09a18: 7d 5e 50 50 subf r10,r30,r10 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc09a1c: 93 e1 00 14 stw r31,20(r1) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / ffc09a20: 7d 4a 5b 96 divwu r10,r10,r11 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc09a24: 93 81 00 08 stw r28,8(r1) ffc09a28: 93 a1 00 0c stw r29,12(r1) ffc09a2c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc09a30: 7c 7f 1b 78 mr r31,r3 /* * 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) / ffc09a34: 38 0a 00 01 addi r0,r10,1 ffc09a38: 40 be 00 88 bne+ cr7,ffc09ac0 <_Objects_Shrink_information+0xc8> <== ALWAYS TAKEN ffc09a3c: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc09a40: 48 00 00 80 b ffc09ac0 <_Objects_Shrink_information+0xc8> <== NOT EXECUTED information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == ffc09a44: 81 5f 00 30 lwz r10,48(r31) index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc09a48: 39 29 00 01 addi r9,r9,1 if ( information->inactive_per_block[ block ] == ffc09a4c: 7d 4a e8 2e lwzx r10,r10,r29 ffc09a50: 7f 8a 58 00 cmpw cr7,r10,r11 ffc09a54: 40 be 00 68 bne+ cr7,ffc09abc <_Objects_Shrink_information+0xc4> information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; ffc09a58: 80 7f 00 20 lwz r3,32(r31) do { index = _Objects_Get_index( the_object->id ); ffc09a5c: 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; ffc09a60: 83 83 00 00 lwz r28,0(r3) if ((index >= index_base) && ffc09a64: 7f 80 f0 40 cmplw cr7,r0,r30 ffc09a68: 41 9c 00 18 blt- cr7,ffc09a80 <_Objects_Shrink_information+0x88> (index < (index_base + information->allocation_size))) { ffc09a6c: a1 3f 00 14 lhz r9,20(r31) ffc09a70: 7d 3e 4a 14 add r9,r30,r9 ffc09a74: 7f 80 48 40 cmplw cr7,r0,r9 ffc09a78: 40 bc 00 08 bge+ cr7,ffc09a80 <_Objects_Shrink_information+0x88> _Chain_Extract( &extract_me->Node ); ffc09a7c: 48 00 3f 1d bl ffc0d998 <_Chain_Extract> <== ALWAYS TAKEN } } while ( the_object ); ffc09a80: 2f 9c 00 00 cmpwi cr7,r28,0 ffc09a84: 7f 83 e3 78 mr r3,r28 ffc09a88: 40 9e ff d4 bne+ cr7,ffc09a5c <_Objects_Shrink_information+0x64> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); ffc09a8c: 81 3f 00 34 lwz r9,52(r31) ffc09a90: 7c 69 e8 2e lwzx r3,r9,r29 ffc09a94: 48 00 20 71 bl ffc0bb04 <_Workspace_Free> <== ALWAYS TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc09a98: a1 5f 00 2c lhz r10,44(r31) ffc09a9c: a0 1f 00 14 lhz r0,20(r31) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc09aa0: 81 3f 00 34 lwz r9,52(r31) information->inactive_per_block[ block ] = 0; ffc09aa4: 81 7f 00 30 lwz r11,48(r31) information->inactive -= information->allocation_size; ffc09aa8: 7c 00 50 50 subf r0,r0,r10 ffc09aac: b0 1f 00 2c sth r0,44(r31) * 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; ffc09ab0: 7f 8b e9 2e stwx r28,r11,r29 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc09ab4: 7f 89 e9 2e stwx r28,r9,r29 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; ffc09ab8: 48 00 00 14 b ffc09acc <_Objects_Shrink_information+0xd4> <== ALWAYS TAKEN } index_base += information->allocation_size; ffc09abc: 7f de 5a 14 add r30,r30,r11 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc09ac0: 34 00 ff ff addic. r0,r0,-1 ffc09ac4: 55 3d 10 3a rlwinm r29,r9,2,0,29 ffc09ac8: 40 82 ff 7c bne+ ffc09a44 <_Objects_Shrink_information+0x4c> return; } index_base += information->allocation_size; } } ffc09acc: 80 01 00 1c lwz r0,28(r1) ffc09ad0: 83 81 00 08 lwz r28,8(r1) ffc09ad4: 7c 08 03 a6 mtlr r0 ffc09ad8: 83 a1 00 0c lwz r29,12(r1) ffc09adc: 83 c1 00 10 lwz r30,16(r1) ffc09ae0: 83 e1 00 14 lwz r31,20(r1) ffc09ae4: 38 21 00 18 addi r1,r1,24 ffc09ae8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d44c <_Partition_Manager_initialization>: * Output parameters: NONE */ void _Partition_Manager_initialization(void) { _Objects_Initialize_information( ffc0d44c: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN * * Output parameters: NONE */ void _Partition_Manager_initialization(void) { ffc0d450: 94 21 ff f8 stwu r1,-8(r1) ffc0d454: 7c 08 02 a6 mflr r0 _Objects_Initialize_information( ffc0d458: 3c 60 00 00 lis r3,0 <== ALWAYS TAKEN ffc0d45c: 80 c9 20 84 lwz r6,8324(r9) <== ALWAYS TAKEN ffc0d460: 38 63 2e c4 addi r3,r3,11972 ffc0d464: 38 80 00 02 li r4,2 <== ALWAYS TAKEN * * Output parameters: NONE */ void _Partition_Manager_initialization(void) { ffc0d468: 90 01 00 0c stw r0,12(r1) _Objects_Initialize_information( ffc0d46c: 38 a0 00 05 li r5,5 ffc0d470: 38 e0 00 30 li r7,48 ffc0d474: 39 00 00 00 li r8,0 ffc0d478: 39 20 00 04 li r9,4 ffc0d47c: 4b ff c3 f5 bl ffc09870 <_Objects_Initialize_information> <== ALWAYS TAKEN MP_PACKET_PARTITION, _Partition_MP_Process_packet ); #endif } ffc0d480: 80 01 00 0c lwz r0,12(r1) ffc0d484: 38 21 00 08 addi r1,r1,8 ffc0d488: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0d48c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09aec <_Protected_heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary ) { ffc09aec: 94 21 ff e0 stwu r1,-32(r1) ffc09af0: 7c 08 02 a6 mflr r0 ffc09af4: 93 e1 00 1c stw r31,28(r1) void *p; _RTEMS_Lock_allocator(); ffc09af8: 3f e0 00 00 lis r31,0 Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary ) { ffc09afc: 93 c1 00 18 stw r30,24(r1) ffc09b00: 7c 7e 1b 78 mr r30,r3 void *p; _RTEMS_Lock_allocator(); ffc09b04: 80 7f 27 64 lwz r3,10084(r31) Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary ) { ffc09b08: 90 01 00 24 stw r0,36(r1) void *p; _RTEMS_Lock_allocator(); ffc09b0c: 90 81 00 08 stw r4,8(r1) ffc09b10: 90 a1 00 0c stw r5,12(r1) <== ALWAYS TAKEN ffc09b14: 90 c1 00 10 stw r6,16(r1) ffc09b18: 4b ff ec 55 bl ffc0876c <_API_Mutex_Lock> <== ALWAYS TAKEN p = _Heap_Allocate_aligned_with_boundary( ffc09b1c: 7f c3 f3 78 mr r3,r30 ffc09b20: 80 81 00 08 lwz r4,8(r1) ffc09b24: 80 a1 00 0c lwz r5,12(r1) ffc09b28: 80 c1 00 10 lwz r6,16(r1) ffc09b2c: 48 00 41 59 bl ffc0dc84 <_Heap_Allocate_aligned_with_boundary> <== ALWAYS TAKEN ffc09b30: 7c 7e 1b 78 mr r30,r3 heap, size, alignment, boundary ); _RTEMS_Unlock_allocator(); ffc09b34: 80 7f 27 64 lwz r3,10084(r31) ffc09b38: 4b ff ec b5 bl ffc087ec <_API_Mutex_Unlock> <== ALWAYS TAKEN return p; } ffc09b3c: 80 01 00 24 lwz r0,36(r1) <== ALWAYS TAKEN ffc09b40: 7f c3 f3 78 mr r3,r30 ffc09b44: 83 e1 00 1c lwz r31,28(r1) ffc09b48: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc09b4c: 83 c1 00 18 lwz r30,24(r1) ffc09b50: 38 21 00 20 addi r1,r1,32 ffc09b54: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e3e4 <_Protected_heap_Extend>: bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, uintptr_t size ) { ffc0e3e4: 94 21 ff d8 stwu r1,-40(r1) ffc0e3e8: 7c 08 02 a6 mflr r0 ffc0e3ec: 93 e1 00 24 stw r31,36(r1) Heap_Extend_status status; uintptr_t amount_extended; _RTEMS_Lock_allocator(); ffc0e3f0: 3f e0 00 00 lis r31,0 bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, uintptr_t size ) { ffc0e3f4: 93 c1 00 20 stw r30,32(r1) ffc0e3f8: 7c 7e 1b 78 mr r30,r3 Heap_Extend_status status; uintptr_t amount_extended; _RTEMS_Lock_allocator(); ffc0e3fc: 80 7f 27 e8 lwz r3,10216(r31) bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, uintptr_t size ) { ffc0e400: 90 01 00 2c stw r0,44(r1) Heap_Extend_status status; uintptr_t amount_extended; _RTEMS_Lock_allocator(); ffc0e404: 90 81 00 18 stw r4,24(r1) ffc0e408: 90 a1 00 1c stw r5,28(r1) ffc0e40c: 4b ff df 61 bl ffc0c36c <_API_Mutex_Lock> <== ALWAYS TAKEN status = _Heap_Extend(the_heap, starting_address, size, &amount_extended); ffc0e410: 38 c1 00 08 addi r6,r1,8 ffc0e414: 80 81 00 18 lwz r4,24(r1) ffc0e418: 7f c3 f3 78 mr r3,r30 ffc0e41c: 80 a1 00 1c lwz r5,28(r1) ffc0e420: 48 00 44 8d bl ffc128ac <_Heap_Extend> <== ALWAYS TAKEN ffc0e424: 7c 7e 1b 78 mr r30,r3 _RTEMS_Unlock_allocator(); ffc0e428: 80 7f 27 e8 lwz r3,10216(r31) ffc0e42c: 4b ff df c1 bl ffc0c3ec <_API_Mutex_Unlock> <== ALWAYS TAKEN return (status == HEAP_EXTEND_SUCCESSFUL); } ffc0e430: 80 01 00 2c lwz r0,44(r1) ffc0e434: 7f c3 00 34 cntlzw r3,r30 ffc0e438: 83 e1 00 24 lwz r31,36(r1) ffc0e43c: 7c 08 03 a6 mtlr r0 ffc0e440: 54 63 d9 7e rlwinm r3,r3,27,5,31 ffc0e444: 83 c1 00 20 lwz r30,32(r1) ffc0e448: 38 21 00 28 addi r1,r1,40 ffc0e44c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09b58 <_Protected_heap_Free>: bool _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { ffc09b58: 94 21 ff e8 stwu r1,-24(r1) ffc09b5c: 7c 08 02 a6 mflr r0 ffc09b60: 93 e1 00 14 stw r31,20(r1) bool status; _RTEMS_Lock_allocator(); ffc09b64: 3f e0 00 00 lis r31,0 bool _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { ffc09b68: 93 c1 00 10 stw r30,16(r1) ffc09b6c: 7c 7e 1b 78 mr r30,r3 bool status; _RTEMS_Lock_allocator(); ffc09b70: 80 7f 27 64 lwz r3,10084(r31) bool _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { ffc09b74: 90 01 00 1c stw r0,28(r1) bool status; _RTEMS_Lock_allocator(); ffc09b78: 90 81 00 08 stw r4,8(r1) <== ALWAYS TAKEN ffc09b7c: 4b ff eb f1 bl ffc0876c <_API_Mutex_Lock> <== ALWAYS TAKEN status = _Heap_Free( the_heap, start_address ); ffc09b80: 7f c3 f3 78 mr r3,r30 ffc09b84: 80 81 00 08 lwz r4,8(r1) ffc09b88: 48 00 42 bd bl ffc0de44 <_Heap_Free> <== ALWAYS TAKEN ffc09b8c: 7c 7e 1b 78 mr r30,r3 _RTEMS_Unlock_allocator(); ffc09b90: 80 7f 27 64 lwz r3,10084(r31) ffc09b94: 4b ff ec 59 bl ffc087ec <_API_Mutex_Unlock> <== ALWAYS TAKEN return status; } ffc09b98: 80 01 00 1c lwz r0,28(r1) ffc09b9c: 7f c3 f3 78 mr r3,r30 ffc09ba0: 83 e1 00 14 lwz r31,20(r1) ffc09ba4: 7c 08 03 a6 mtlr r0 ffc09ba8: 83 c1 00 10 lwz r30,16(r1) ffc09bac: 38 21 00 18 addi r1,r1,24 ffc09bb0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1b50c <_Protected_heap_Get_block_size>: bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, uintptr_t *size ) { ffc1b50c: 94 21 ff e8 stwu r1,-24(r1) ffc1b510: 7c 08 02 a6 mflr r0 ffc1b514: 93 e1 00 14 stw r31,20(r1) bool status; _RTEMS_Lock_allocator(); ffc1b518: 3f e0 00 00 lis r31,0 bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, uintptr_t *size ) { ffc1b51c: 93 c1 00 10 stw r30,16(r1) ffc1b520: 7c 7e 1b 78 mr r30,r3 bool status; _RTEMS_Lock_allocator(); ffc1b524: 80 7f 27 64 lwz r3,10084(r31) bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, uintptr_t *size ) { ffc1b528: 90 01 00 1c stw r0,28(r1) bool status; _RTEMS_Lock_allocator(); ffc1b52c: 90 81 00 08 stw r4,8(r1) ffc1b530: 90 a1 00 0c stw r5,12(r1) ffc1b534: 4b fe d2 39 bl ffc0876c <_API_Mutex_Lock> <== ALWAYS TAKEN status = _Heap_Size_of_alloc_area( the_heap, starting_address, size ); ffc1b538: 7f c3 f3 78 mr r3,r30 ffc1b53c: 80 81 00 08 lwz r4,8(r1) ffc1b540: 80 a1 00 0c lwz r5,12(r1) ffc1b544: 48 00 01 f5 bl ffc1b738 <_Heap_Size_of_alloc_area> <== ALWAYS TAKEN ffc1b548: 7c 7e 1b 78 mr r30,r3 _RTEMS_Unlock_allocator(); ffc1b54c: 80 7f 27 64 lwz r3,10084(r31) ffc1b550: 4b fe d2 9d bl ffc087ec <_API_Mutex_Unlock> <== ALWAYS TAKEN return status; } ffc1b554: 80 01 00 1c lwz r0,28(r1) ffc1b558: 7f c3 f3 78 mr r3,r30 ffc1b55c: 83 e1 00 14 lwz r31,20(r1) ffc1b560: 7c 08 03 a6 mtlr r0 ffc1b564: 83 c1 00 10 lwz r30,16(r1) ffc1b568: 38 21 00 18 addi r1,r1,24 ffc1b56c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f6c0 <_Protected_heap_Get_free_information>: bool _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { ffc0f6c0: 94 21 ff e8 stwu r1,-24(r1) ffc0f6c4: 7c 08 02 a6 mflr r0 ffc0f6c8: 93 e1 00 14 stw r31,20(r1) /* * TBD: _Heap_Get_free_information does not error check or return status. */ _RTEMS_Lock_allocator(); ffc0f6cc: 3f e0 00 00 lis r31,0 bool _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { ffc0f6d0: 93 c1 00 10 stw r30,16(r1) ffc0f6d4: 7c 7e 1b 78 mr r30,r3 /* * TBD: _Heap_Get_free_information does not error check or return status. */ _RTEMS_Lock_allocator(); ffc0f6d8: 80 7f 36 0c lwz r3,13836(r31) bool _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { ffc0f6dc: 90 01 00 1c stw r0,28(r1) /* * TBD: _Heap_Get_free_information does not error check or return status. */ _RTEMS_Lock_allocator(); ffc0f6e0: 90 81 00 08 stw r4,8(r1) ffc0f6e4: 4b ff e8 a1 bl ffc0df84 <_API_Mutex_Lock> <== ALWAYS TAKEN _Heap_Get_free_information( the_heap, info ); ffc0f6e8: 7f c3 f3 78 mr r3,r30 ffc0f6ec: 80 81 00 08 lwz r4,8(r1) ffc0f6f0: 48 01 f3 a1 bl ffc2ea90 <_Heap_Get_free_information> <== ALWAYS TAKEN _RTEMS_Unlock_allocator(); ffc0f6f4: 80 7f 36 0c lwz r3,13836(r31) ffc0f6f8: 4b ff e9 0d bl ffc0e004 <_API_Mutex_Unlock> <== ALWAYS TAKEN return true; } ffc0f6fc: 80 01 00 1c lwz r0,28(r1) ffc0f700: 38 60 00 01 li r3,1 ffc0f704: 83 c1 00 10 lwz r30,16(r1) ffc0f708: 7c 08 03 a6 mtlr r0 ffc0f70c: 83 e1 00 14 lwz r31,20(r1) ffc0f710: 38 21 00 18 addi r1,r1,24 ffc0f714: 4e 80 00 20 blr <== ALWAYS TAKEN ffc2ecf4 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { ffc2ecf4: 94 21 ff e8 stwu r1,-24(r1) ffc2ecf8: 7c 08 02 a6 mflr r0 ffc2ecfc: 93 c1 00 10 stw r30,16(r1) if ( !the_heap ) ffc2ed00: 7c 7e 1b 79 mr. r30,r3 bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { ffc2ed04: 90 01 00 1c stw r0,28(r1) ffc2ed08: 93 e1 00 14 stw r31,20(r1) if ( !the_heap ) ffc2ed0c: 41 82 00 38 beq- ffc2ed44 <_Protected_heap_Get_information+0x50> return false; if ( !the_info ) ffc2ed10: 2f 84 00 00 cmpwi cr7,r4,0 ffc2ed14: 41 9e 00 30 beq- cr7,ffc2ed44 <_Protected_heap_Get_information+0x50> return false; _RTEMS_Lock_allocator(); ffc2ed18: 3f e0 00 00 lis r31,0 ffc2ed1c: 90 81 00 08 stw r4,8(r1) ffc2ed20: 80 7f 36 0c lwz r3,13836(r31) ffc2ed24: 4b fd f2 61 bl ffc0df84 <_API_Mutex_Lock> <== ALWAYS TAKEN _Heap_Get_information( the_heap, the_info ); ffc2ed28: 80 81 00 08 lwz r4,8(r1) ffc2ed2c: 7f c3 f3 78 mr r3,r30 ffc2ed30: 48 01 1d e9 bl ffc40b18 <_Heap_Get_information> <== ALWAYS TAKEN _RTEMS_Unlock_allocator(); ffc2ed34: 80 7f 36 0c lwz r3,13836(r31) ffc2ed38: 4b fd f2 cd bl ffc0e004 <_API_Mutex_Unlock> <== ALWAYS TAKEN ffc2ed3c: 38 60 00 01 li r3,1 return true; ffc2ed40: 48 00 00 08 b ffc2ed48 <_Protected_heap_Get_information+0x54> <== ALWAYS TAKEN ffc2ed44: 38 60 00 00 li r3,0 } ffc2ed48: 80 01 00 1c lwz r0,28(r1) ffc2ed4c: 83 c1 00 10 lwz r30,16(r1) ffc2ed50: 7c 08 03 a6 mtlr r0 ffc2ed54: 83 e1 00 14 lwz r31,20(r1) ffc2ed58: 38 21 00 18 addi r1,r1,24 ffc2ed5c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09bb4 <_Protected_heap_Get_size>: uintptr_t _Protected_heap_Get_size( Heap_Control *the_heap ) { return _Heap_Get_size( the_heap ); } ffc09bb4: 80 63 00 2c lwz r3,44(r3) ffc09bb8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1b570 <_Protected_heap_Resize_block>: bool _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, uintptr_t size ) { ffc1b570: 94 21 ff d8 stwu r1,-40(r1) ffc1b574: 7c 08 02 a6 mflr r0 ffc1b578: 93 e1 00 24 stw r31,36(r1) Heap_Resize_status status; uintptr_t old_mem_size; uintptr_t avail_mem_size; _RTEMS_Lock_allocator(); ffc1b57c: 3f e0 00 00 lis r31,0 bool _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, uintptr_t size ) { ffc1b580: 93 c1 00 20 stw r30,32(r1) ffc1b584: 7c 7e 1b 78 mr r30,r3 Heap_Resize_status status; uintptr_t old_mem_size; uintptr_t avail_mem_size; _RTEMS_Lock_allocator(); ffc1b588: 80 7f 27 64 lwz r3,10084(r31) bool _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, uintptr_t size ) { ffc1b58c: 90 01 00 2c stw r0,44(r1) Heap_Resize_status status; uintptr_t old_mem_size; uintptr_t avail_mem_size; _RTEMS_Lock_allocator(); ffc1b590: 90 81 00 18 stw r4,24(r1) ffc1b594: 90 a1 00 1c stw r5,28(r1) ffc1b598: 4b fe d1 d5 bl ffc0876c <_API_Mutex_Lock> <== ALWAYS TAKEN status = _Heap_Resize_block( ffc1b59c: 38 c1 00 08 addi r6,r1,8 ffc1b5a0: 80 81 00 18 lwz r4,24(r1) ffc1b5a4: 38 e1 00 0c addi r7,r1,12 ffc1b5a8: 80 a1 00 1c lwz r5,28(r1) ffc1b5ac: 7f c3 f3 78 mr r3,r30 ffc1b5b0: 48 00 00 31 bl ffc1b5e0 <_Heap_Resize_block> <== ALWAYS TAKEN ffc1b5b4: 7c 7e 1b 78 mr r30,r3 the_heap, starting_address, size, &old_mem_size, &avail_mem_size ); _RTEMS_Unlock_allocator(); ffc1b5b8: 80 7f 27 64 lwz r3,10084(r31) ffc1b5bc: 4b fe d2 31 bl ffc087ec <_API_Mutex_Unlock> <== ALWAYS TAKEN return (status == HEAP_RESIZE_SUCCESSFUL); } ffc1b5c0: 80 01 00 2c lwz r0,44(r1) ffc1b5c4: 7f c3 00 34 cntlzw r3,r30 ffc1b5c8: 83 e1 00 24 lwz r31,36(r1) ffc1b5cc: 7c 08 03 a6 mtlr r0 ffc1b5d0: 54 63 d9 7e rlwinm r3,r3,27,5,31 ffc1b5d4: 83 c1 00 20 lwz r30,32(r1) ffc1b5d8: 38 21 00 28 addi r1,r1,40 ffc1b5dc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e64c <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { ffc0e64c: 94 21 ff e8 stwu r1,-24(r1) ffc0e650: 7c 08 02 a6 mflr r0 * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { ffc0e654: 3d 20 00 00 lis r9,0 bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { ffc0e658: 90 01 00 1c stw r0,28(r1) * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { ffc0e65c: 80 09 27 b0 lwz r0,10160(r9) bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { ffc0e660: 93 81 00 08 stw r28,8(r1) ffc0e664: 7c 7c 1b 78 mr r28,r3 * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { ffc0e668: 2f 80 00 00 cmpwi cr7,r0,0 bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { ffc0e66c: 93 a1 00 0c stw r29,12(r1) ffc0e670: 7c 9d 23 78 mr r29,r4 ffc0e674: 93 c1 00 10 stw r30,16(r1) ffc0e678: 7c be 2b 78 mr r30,r5 ffc0e67c: 93 e1 00 14 stw r31,20(r1) * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { ffc0e680: 40 be 00 30 bne+ cr7,ffc0e6b0 <_Protected_heap_Walk+0x64> _RTEMS_Lock_allocator(); ffc0e684: 3f e0 00 00 lis r31,0 ffc0e688: 80 7f 27 e8 lwz r3,10216(r31) ffc0e68c: 4b ff dc e1 bl ffc0c36c <_API_Mutex_Lock> <== ALWAYS TAKEN status = _Heap_Walk( the_heap, source, do_dump ); ffc0e690: 7f c5 f3 78 mr r5,r30 ffc0e694: 7f 83 e3 78 mr r3,r28 ffc0e698: 7f a4 eb 78 mr r4,r29 ffc0e69c: 4b ff ed 75 bl ffc0d410 <_Heap_Walk> <== ALWAYS TAKEN ffc0e6a0: 7c 7e 1b 78 mr r30,r3 _RTEMS_Unlock_allocator(); ffc0e6a4: 80 7f 27 e8 lwz r3,10216(r31) ffc0e6a8: 4b ff dd 45 bl ffc0c3ec <_API_Mutex_Unlock> <== ALWAYS TAKEN ffc0e6ac: 48 00 00 0c b ffc0e6b8 <_Protected_heap_Walk+0x6c> <== ALWAYS TAKEN } else { status = _Heap_Walk( the_heap, source, do_dump ); ffc0e6b0: 4b ff ed 61 bl ffc0d410 <_Heap_Walk> <== ALWAYS TAKEN ffc0e6b4: 7c 7e 1b 78 mr r30,r3 } return status; } ffc0e6b8: 80 01 00 1c lwz r0,28(r1) ffc0e6bc: 7f c3 f3 78 mr r3,r30 ffc0e6c0: 83 81 00 08 lwz r28,8(r1) ffc0e6c4: 7c 08 03 a6 mtlr r0 ffc0e6c8: 83 a1 00 0c lwz r29,12(r1) ffc0e6cc: 83 c1 00 10 lwz r30,16(r1) ffc0e6d0: 83 e1 00 14 lwz r31,20(r1) ffc0e6d4: 38 21 00 18 addi r1,r1,24 ffc0e6d8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08564 <_RTEMS_API_Initialize>: * * XXX */ void _RTEMS_API_Initialize(void) { ffc08564: 94 21 ff f8 stwu r1,-8(r1) ffc08568: 7c 08 02 a6 mflr r0 /* * Install our API Object Management Table and initialize the * various managers. */ _Objects_Information_table[OBJECTS_CLASSIC_API] = _RTEMS_Objects; ffc0856c: 3d 20 00 00 lis r9,0 * * XXX */ void _RTEMS_API_Initialize(void) { ffc08570: 90 01 00 0c stw r0,12(r1) <== ALWAYS TAKEN /* * Install our API Object Management Table and initialize the * various managers. */ _Objects_Information_table[OBJECTS_CLASSIC_API] = _RTEMS_Objects; ffc08574: 38 09 2d 98 addi r0,r9,11672 ffc08578: 3d 20 00 00 lis r9,0 ffc0857c: 90 09 2b 88 stw r0,11144(r9) #if defined(RTEMS_MULTIPROCESSING) _Multiprocessing_Manager_initialization(); #endif _RTEMS_tasks_Manager_initialization(); ffc08580: 48 00 50 c9 bl ffc0d648 <_RTEMS_tasks_Manager_initialization> <== ALWAYS TAKEN _Timer_Manager_initialization(); ffc08584: 48 00 4f 95 bl ffc0d518 <_Timer_Manager_initialization> <== ALWAYS TAKEN _Signal_Manager_initialization(); ffc08588: 48 00 50 25 bl ffc0d5ac <_Signal_Manager_initialization> <== ALWAYS TAKEN _Event_Manager_initialization(); ffc0858c: 48 00 4e 6d bl ffc0d3f8 <_Event_Manager_initialization> <== ALWAYS TAKEN _Message_queue_Manager_initialization(); ffc08590: 48 00 4e 79 bl ffc0d408 <_Message_queue_Manager_initialization> <== ALWAYS TAKEN _Semaphore_Manager_initialization(); ffc08594: 48 00 4f d5 bl ffc0d568 <_Semaphore_Manager_initialization> <== ALWAYS TAKEN _Partition_Manager_initialization(); ffc08598: 48 00 4e b5 bl ffc0d44c <_Partition_Manager_initialization> <== ALWAYS TAKEN _Region_Manager_initialization(); ffc0859c: 48 00 4f 39 bl ffc0d4d4 <_Region_Manager_initialization> <== ALWAYS TAKEN _Dual_ported_memory_Manager_initialization(); ffc085a0: 48 00 4e 15 bl ffc0d3b4 <_Dual_ported_memory_Manager_initialization> <== ALWAYS TAKEN _Rate_monotonic_Manager_initialization(); ffc085a4: 48 00 4e ed bl ffc0d490 <_Rate_monotonic_Manager_initialization> <== ALWAYS TAKEN _Barrier_Manager_initialization(); ffc085a8: 48 00 4d c9 bl ffc0d370 <_Barrier_Manager_initialization> <== ALWAYS TAKEN } ffc085ac: 80 01 00 0c lwz r0,12(r1) ffc085b0: 38 21 00 08 addi r1,r1,8 ffc085b4: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc085b8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d87c <_RTEMS_Tasks_Invoke_task_variable_dtor>: void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { ffc0d87c: 94 21 ff f0 stwu r1,-16(r1) ffc0d880: 7c 08 02 a6 mflr r0 void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { ffc0d884: 3d 20 00 00 lis r9,0 void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { ffc0d888: 90 01 00 14 stw r0,20(r1) void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { ffc0d88c: 80 09 27 6c lwz r0,10092(r9) void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { ffc0d890: 93 e1 00 0c stw r31,12(r1) ffc0d894: 7c 9f 23 78 mr r31,r4 void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { ffc0d898: 7f 80 18 00 cmpw cr7,r0,r3 ) { void (*dtor)(void *); void *value; dtor = tvp->dtor; ffc0d89c: 80 04 00 10 lwz r0,16(r4) if (_Thread_Is_executing(the_thread)) { ffc0d8a0: 40 be 00 18 bne+ cr7,ffc0d8b8 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x3c> value = *tvp->ptr; ffc0d8a4: 81 24 00 04 lwz r9,4(r4) *tvp->ptr = tvp->gval; ffc0d8a8: 81 64 00 08 lwz r11,8(r4) void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { value = *tvp->ptr; ffc0d8ac: 80 69 00 00 lwz r3,0(r9) *tvp->ptr = tvp->gval; ffc0d8b0: 91 69 00 00 stw r11,0(r9) ffc0d8b4: 48 00 00 08 b ffc0d8bc <_RTEMS_Tasks_Invoke_task_variable_dtor+0x40> <== ALWAYS TAKEN } else { value = tvp->tval; ffc0d8b8: 80 64 00 0c lwz r3,12(r4) } if ( dtor ) ffc0d8bc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d8c0: 41 9e 00 0c beq- cr7,ffc0d8cc <_RTEMS_Tasks_Invoke_task_variable_dtor+0x50> (*dtor)(value); ffc0d8c4: 7c 09 03 a6 mtctr r0 ffc0d8c8: 4e 80 04 21 bctrl <== ALWAYS TAKEN _Workspace_Free(tvp); ffc0d8cc: 7f e3 fb 78 mr r3,r31 ffc0d8d0: 4b ff e2 35 bl ffc0bb04 <_Workspace_Free> <== ALWAYS TAKEN } ffc0d8d4: 80 01 00 14 lwz r0,20(r1) ffc0d8d8: 83 e1 00 0c lwz r31,12(r1) ffc0d8dc: 38 21 00 10 addi r1,r1,16 ffc0d8e0: 7c 08 03 a6 mtlr r0 ffc0d8e4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d7cc <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { ffc0d7cc: 94 21 ff f0 stwu r1,-16(r1) ffc0d7d0: 7c 08 02 a6 mflr r0 ffc0d7d4: 93 e1 00 0c stw r31,12(r1) /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) ffc0d7d8: 3f e0 00 00 lis r31,0 ffc0d7dc: 3b ff 20 70 addi r31,r31,8304 bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { ffc0d7e0: 90 01 00 14 stw r0,20(r1) <== ALWAYS TAKEN /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) ffc0d7e4: 88 1f 00 04 lbz r0,4(r31) bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { ffc0d7e8: 93 c1 00 08 stw r30,8(r1) ffc0d7ec: 7c 9e 23 78 mr r30,r4 /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) ffc0d7f0: 7c 00 00 d0 neg r0,r0 ffc0d7f4: 54 03 3e 72 rlwinm r3,r0,7,25,25 to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); ffc0d7f8: 38 63 00 20 addi r3,r3,32 ffc0d7fc: 4b ff e2 d5 bl ffc0bad0 <_Workspace_Allocate> <== ALWAYS TAKEN if ( !api ) ffc0d800: 7c 69 1b 79 mr. r9,r3 ffc0d804: 38 60 00 00 li r3,0 ffc0d808: 41 82 00 5c beq- ffc0d864 <_RTEMS_tasks_Create_extension+0x98> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; api->pending_events = EVENT_SETS_NONE_PENDING; ffc0d80c: 38 00 00 00 li r0,0 api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; ffc0d810: 91 3e 01 40 stw r9,320(r30) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; ffc0d814: 98 09 00 08 stb r0,8(r9) api->pending_events = EVENT_SETS_NONE_PENDING; api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { ffc0d818: 89 7f 00 04 lbz r11,4(r31) created->API_Extensions[ THREAD_API_RTEMS ] = api; api->pending_events = EVENT_SETS_NONE_PENDING; api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; ffc0d81c: 90 1e 01 50 stw r0,336(r30) if ( rtems_configuration_get_notepads_enabled() ) { ffc0d820: 2f 8b 00 00 cmpwi cr7,r11,0 if ( !api ) return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; api->pending_events = EVENT_SETS_NONE_PENDING; ffc0d824: 90 09 00 00 stw r0,0(r9) api->event_condition = 0; ffc0d828: 90 09 00 04 stw r0,4(r9) information->handler = NULL; ffc0d82c: 90 09 00 0c stw r0,12(r9) information->mode_set = RTEMS_DEFAULT_MODES; ffc0d830: 90 09 00 10 stw r0,16(r9) <== ALWAYS TAKEN information->signals_posted = 0; ffc0d834: 90 09 00 14 stw r0,20(r9) information->signals_pending = 0; ffc0d838: 90 09 00 18 stw r0,24(r9) information->nest_level = 0; ffc0d83c: 90 09 00 1c stw r0,28(r9) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { ffc0d840: 41 9e 00 20 beq- cr7,ffc0d860 <_RTEMS_tasks_Create_extension+0x94> for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; ffc0d844: 39 40 00 10 li r10,16 ffc0d848: 7d 49 03 a6 mtctr r10 api->pending_events = EVENT_SETS_NONE_PENDING; api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { ffc0d84c: 39 60 00 00 li r11,0 for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; ffc0d850: 7d 49 5a 14 add r10,r9,r11 ffc0d854: 90 0a 00 20 stw r0,32(r10) ffc0d858: 39 6b 00 04 addi r11,r11,4 api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) ffc0d85c: 42 00 ff f4 bdnz+ ffc0d850 <_RTEMS_tasks_Create_extension+0x84> ffc0d860: 38 60 00 01 li r3,1 api->Notepads[i] = 0; } return true; } ffc0d864: 80 01 00 14 lwz r0,20(r1) ffc0d868: 83 c1 00 08 lwz r30,8(r1) ffc0d86c: 7c 08 03 a6 mtlr r0 ffc0d870: 83 e1 00 0c lwz r31,12(r1) ffc0d874: 38 21 00 10 addi r1,r1,16 ffc0d878: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d768 <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { ffc0d768: 94 21 ff f0 stwu r1,-16(r1) ffc0d76c: 7c 08 02 a6 mflr r0 ffc0d770: 90 01 00 14 stw r0,20(r1) /* * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; ffc0d774: 38 00 00 00 li r0,0 void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { ffc0d778: 93 c1 00 08 stw r30,8(r1) ffc0d77c: 93 e1 00 0c stw r31,12(r1) ffc0d780: 7c 9f 23 78 mr r31,r4 /* * Free per task variable memory */ tvp = deleted->task_variables; ffc0d784: 83 c4 01 50 lwz r30,336(r4) deleted->task_variables = NULL; ffc0d788: 90 04 01 50 stw r0,336(r4) while (tvp) { ffc0d78c: 48 00 00 0c b ffc0d798 <_RTEMS_tasks_Delete_extension+0x30> <== ALWAYS TAKEN next = (rtems_task_variable_t *)tvp->next; ffc0d790: 83 de 00 00 lwz r30,0(r30) _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); ffc0d794: 48 00 00 e9 bl ffc0d87c <_RTEMS_Tasks_Invoke_task_variable_dtor> <== ALWAYS TAKEN * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { ffc0d798: 2f 9e 00 00 cmpwi cr7,r30,0 next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); ffc0d79c: 7f c4 f3 78 mr r4,r30 ffc0d7a0: 7f e3 fb 78 mr r3,r31 * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { ffc0d7a4: 40 9e ff ec bne+ cr7,ffc0d790 <_RTEMS_tasks_Delete_extension+0x28> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); ffc0d7a8: 80 7f 01 40 lwz r3,320(r31) ffc0d7ac: 4b ff e3 59 bl ffc0bb04 <_Workspace_Free> <== ALWAYS TAKEN deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; } ffc0d7b0: 80 01 00 14 lwz r0,20(r1) /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; ffc0d7b4: 93 df 01 40 stw r30,320(r31) } ffc0d7b8: 7c 08 03 a6 mtlr r0 ffc0d7bc: 83 c1 00 08 lwz r30,8(r1) ffc0d7c0: 83 e1 00 0c lwz r31,12(r1) ffc0d7c4: 38 21 00 10 addi r1,r1,16 ffc0d7c8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d614 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { ffc0d614: 7c 08 02 a6 mflr r0 ffc0d618: 94 21 ff f8 stwu r1,-8(r1) if ( _RTEMS_tasks_Initialize_user_tasks_p ) ffc0d61c: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { ffc0d620: 90 01 00 0c stw r0,12(r1) if ( _RTEMS_tasks_Initialize_user_tasks_p ) ffc0d624: 80 09 26 68 lwz r0,9832(r9) ffc0d628: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d62c: 41 9e 00 0c beq- cr7,ffc0d638 <_RTEMS_tasks_Initialize_user_tasks+0x24> (*_RTEMS_tasks_Initialize_user_tasks_p)(); ffc0d630: 7c 09 03 a6 mtctr r0 ffc0d634: 4e 80 04 21 bctrl <== ALWAYS TAKEN } ffc0d638: 80 01 00 0c lwz r0,12(r1) ffc0d63c: 38 21 00 08 addi r1,r1,8 ffc0d640: 7c 08 03 a6 mtlr r0 ffc0d644: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0804c <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc0804c: 94 21 ff d8 stwu r1,-40(r1) ffc08050: 7c 08 02 a6 mflr r0 rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc08054: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc08058: 90 01 00 2c stw r0,44(r1) <== ALWAYS TAKEN rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc0805c: 39 29 20 70 addi r9,r9,8304 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc08060: 93 e1 00 24 stw r31,36(r1) rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc08064: 83 e9 00 2c lwz r31,44(r9) * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc08068: 93 81 00 18 stw r28,24(r1) maximum = Configuration_RTEMS_API.number_of_initialization_tasks; /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc0806c: 2f 9f 00 00 cmpwi cr7,r31,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc08070: 93 a1 00 1c stw r29,28(r1) /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( ffc08074: 3b a1 00 08 addi r29,r1,8 <== ALWAYS TAKEN * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc08078: 93 c1 00 20 stw r30,32(r1) maximum = Configuration_RTEMS_API.number_of_initialization_tasks; /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc0807c: 3b c0 00 00 li r30,0 /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; maximum = Configuration_RTEMS_API.number_of_initialization_tasks; ffc08080: 83 89 00 28 lwz r28,40(r9) /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc08084: 40 be 00 58 bne+ cr7,ffc080dc <_RTEMS_tasks_Initialize_user_tasks_body+0x90> ffc08088: 48 00 00 5c b ffc080e4 <_RTEMS_tasks_Initialize_user_tasks_body+0x98> <== ALWAYS TAKEN /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( ffc0808c: 80 bf 00 04 lwz r5,4(r31) ffc08090: 7f a8 eb 78 mr r8,r29 ffc08094: 80 7f 00 00 lwz r3,0(r31) ffc08098: 80 9f 00 08 lwz r4,8(r31) ffc0809c: 80 df 00 14 lwz r6,20(r31) ffc080a0: 80 ff 00 0c lwz r7,12(r31) ffc080a4: 4b ff fd 29 bl ffc07dcc <== ALWAYS TAKEN user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) ffc080a8: 7c 65 1b 79 mr. r5,r3 ffc080ac: 40 82 00 20 bne- ffc080cc <_RTEMS_tasks_Initialize_user_tasks_body+0x80> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( ffc080b0: 80 bf 00 18 lwz r5,24(r31) ffc080b4: 80 9f 00 10 lwz r4,16(r31) ffc080b8: 3b ff 00 1c addi r31,r31,28 ffc080bc: 80 61 00 08 lwz r3,8(r1) ffc080c0: 48 00 00 45 bl ffc08104 <== ALWAYS TAKEN id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) ffc080c4: 7c 65 1b 79 mr. r5,r3 <== ALWAYS TAKEN ffc080c8: 41 a2 00 10 beq+ ffc080d8 <_RTEMS_tasks_Initialize_user_tasks_body+0x8c> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); ffc080cc: 38 60 00 01 li r3,1 ffc080d0: 38 80 00 01 li r4,1 ffc080d4: 48 00 11 01 bl ffc091d4 <_Internal_error_Occurred> <== ALWAYS TAKEN return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc080d8: 3b de 00 01 addi r30,r30,1 ffc080dc: 7f 9e e0 40 cmplw cr7,r30,r28 ffc080e0: 41 9c ff ac blt+ cr7,ffc0808c <_RTEMS_tasks_Initialize_user_tasks_body+0x40> user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } ffc080e4: 80 01 00 2c lwz r0,44(r1) ffc080e8: 83 81 00 18 lwz r28,24(r1) ffc080ec: 7c 08 03 a6 mtlr r0 ffc080f0: 83 a1 00 1c lwz r29,28(r1) ffc080f4: 83 c1 00 20 lwz r30,32(r1) <== ALWAYS TAKEN ffc080f8: 83 e1 00 24 lwz r31,36(r1) ffc080fc: 38 21 00 28 addi r1,r1,40 ffc08100: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d648 <_RTEMS_tasks_Manager_initialization>: * * Output parameters: NONE */ void _RTEMS_tasks_Manager_initialization(void) { ffc0d648: 94 21 ff f0 stwu r1,-16(r1) _Objects_Initialize_information( ffc0d64c: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _RTEMS_tasks_Manager_initialization(void) { ffc0d650: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN _Objects_Initialize_information( ffc0d654: 3c 60 00 00 lis r3,0 ffc0d658: 80 c9 20 70 lwz r6,8304(r9) ffc0d65c: 38 80 00 02 li r4,2 <== ALWAYS TAKEN * * Output parameters: NONE */ void _RTEMS_tasks_Manager_initialization(void) { ffc0d660: 93 e1 00 0c stw r31,12(r1) RTEMS_INLINE_ROUTINE void _User_extensions_Add_API_set( User_extensions_Control *extension ) { _User_extensions_Add_set( extension ); ffc0d664: 3f e0 00 00 lis r31,0 _Objects_Initialize_information( ffc0d668: 38 a0 00 01 li r5,1 ffc0d66c: 38 e0 01 54 li r7,340 * * Output parameters: NONE */ void _RTEMS_tasks_Manager_initialization(void) { ffc0d670: 90 01 00 14 stw r0,20(r1) _Objects_Initialize_information( ffc0d674: 39 00 00 00 li r8,0 ffc0d678: 39 20 00 04 li r9,4 ffc0d67c: 3b ff 21 78 addi r31,r31,8568 ffc0d680: 38 63 2b 2c addi r3,r3,11052 ffc0d684: 4b ff c1 ed bl ffc09870 <_Objects_Initialize_information> <== ALWAYS TAKEN ffc0d688: 7f e3 fb 78 mr r3,r31 <== ALWAYS TAKEN ffc0d68c: 48 00 0e 59 bl ffc0e4e4 <_User_extensions_Add_set> <== ALWAYS TAKEN * Add all the extensions for this API */ _User_extensions_Add_API_set( &_RTEMS_tasks_User_extensions ); _API_extensions_Add( &_RTEMS_tasks_API_extensions ); ffc0d690: 38 7f 00 34 addi r3,r31,52 ffc0d694: 4b ff b0 0d bl ffc086a0 <_API_extensions_Add> <== ALWAYS TAKEN MP_PACKET_TASKS, _RTEMS_tasks_MP_Process_packet ); #endif } ffc0d698: 80 01 00 14 lwz r0,20(r1) ffc0d69c: 83 e1 00 0c lwz r31,12(r1) ffc0d6a0: 38 21 00 10 addi r1,r1,16 <== ALWAYS TAKEN ffc0d6a4: 7c 08 03 a6 mtlr r0 ffc0d6a8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d6ac <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0d6ac: 94 21 ff d8 stwu r1,-40(r1) ffc0d6b0: 7c 08 02 a6 mflr r0 ffc0d6b4: 90 01 00 2c stw r0,44(r1) ffc0d6b8: 93 e1 00 24 stw r31,36(r1) RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc0d6bc: 83 e3 01 40 lwz r31,320(r3) */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0d6c0: 93 a1 00 1c stw r29,28(r1) ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; if ( !api ) ffc0d6c4: 2f 9f 00 00 cmpwi cr7,r31,0 */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0d6c8: 93 c1 00 20 stw r30,32(r1) ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; if ( !api ) ffc0d6cc: 41 9e 00 80 beq- cr7,ffc0d74c <_RTEMS_tasks_Post_switch_extension+0xa0> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0d6d0: 7c 00 00 a6 mfmsr r0 ffc0d6d4: 7d 30 42 a6 mfsprg r9,0 ffc0d6d8: 7c 09 48 78 andc r9,r0,r9 ffc0d6dc: 7d 20 01 24 mtmsr r9 asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; asr->signals_posted = 0; ffc0d6e0: 39 20 00 00 li r9,0 */ asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; ffc0d6e4: 83 bf 00 14 lwz r29,20(r31) asr->signals_posted = 0; ffc0d6e8: 91 3f 00 14 stw r9,20(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0d6ec: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ ffc0d6f0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0d6f4: 41 be 00 58 beq+ cr7,ffc0d74c <_RTEMS_tasks_Post_switch_extension+0xa0> <== NEVER TAKEN return; asr->nest_level += 1; ffc0d6f8: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0d6fc: 3b c1 00 08 addi r30,r1,8 ffc0d700: 80 7f 00 10 lwz r3,16(r31) ffc0d704: 38 80 00 00 li r4,0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; ffc0d708: 38 09 00 01 addi r0,r9,1 ffc0d70c: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0d710: 60 84 ff ff ori r4,r4,65535 ffc0d714: 7f c5 f3 78 mr r5,r30 ffc0d718: 48 00 20 9d bl ffc0f7b4 <== ALWAYS TAKEN (*asr->handler)( signal_set ); ffc0d71c: 80 1f 00 0c lwz r0,12(r31) ffc0d720: 7f a3 eb 78 mr r3,r29 ffc0d724: 7c 09 03 a6 mtctr r0 ffc0d728: 4e 80 04 21 bctrl <== ALWAYS TAKEN asr->nest_level -= 1; ffc0d72c: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0d730: 38 80 00 00 li r4,0 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; ffc0d734: 38 09 ff ff addi r0,r9,-1 ffc0d738: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0d73c: 60 84 ff ff ori r4,r4,65535 ffc0d740: 7f c5 f3 78 mr r5,r30 ffc0d744: 80 61 00 08 lwz r3,8(r1) ffc0d748: 48 00 20 6d bl ffc0f7b4 <== ALWAYS TAKEN } ffc0d74c: 80 01 00 2c lwz r0,44(r1) ffc0d750: 83 a1 00 1c lwz r29,28(r1) ffc0d754: 7c 08 03 a6 mtlr r0 ffc0d758: 83 c1 00 20 lwz r30,32(r1) ffc0d75c: 83 e1 00 24 lwz r31,36(r1) ffc0d760: 38 21 00 28 addi r1,r1,40 ffc0d764: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d5b0 <_RTEMS_tasks_Start_extension>: { RTEMS_API_Control *api; api = started->API_Extensions[ THREAD_API_RTEMS ]; api->pending_events = EVENT_SETS_NONE_PENDING; ffc0d5b0: 81 24 01 40 lwz r9,320(r4) ffc0d5b4: 38 00 00 00 li r0,0 <== ALWAYS TAKEN ffc0d5b8: 90 09 00 00 stw r0,0(r9) } ffc0d5bc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d5c0 <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; ffc0d5c0: 81 23 01 50 lwz r9,336(r3) while (tvp) { ffc0d5c4: 48 00 00 1c b ffc0d5e0 <_RTEMS_tasks_Switch_extension+0x20> <== ALWAYS TAKEN tvp->tval = *tvp->ptr; ffc0d5c8: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->gval; ffc0d5cc: 80 09 00 08 lwz r0,8(r9) * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; ffc0d5d0: 81 4b 00 00 lwz r10,0(r11) ffc0d5d4: 91 49 00 0c stw r10,12(r9) *tvp->ptr = tvp->gval; ffc0d5d8: 90 0b 00 00 stw r0,0(r11) tvp = (rtems_task_variable_t *)tvp->next; ffc0d5dc: 81 29 00 00 lwz r9,0(r9) /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { ffc0d5e0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d5e4: 40 9e ff e4 bne+ cr7,ffc0d5c8 <_RTEMS_tasks_Switch_extension+0x8> tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; ffc0d5e8: 81 24 01 50 lwz r9,336(r4) while (tvp) { ffc0d5ec: 48 00 00 1c b ffc0d608 <_RTEMS_tasks_Switch_extension+0x48> <== ALWAYS TAKEN tvp->gval = *tvp->ptr; ffc0d5f0: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->tval; ffc0d5f4: 80 09 00 0c lwz r0,12(r9) tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; ffc0d5f8: 81 4b 00 00 lwz r10,0(r11) ffc0d5fc: 91 49 00 08 stw r10,8(r9) *tvp->ptr = tvp->tval; ffc0d600: 90 0b 00 00 stw r0,0(r11) tvp = (rtems_task_variable_t *)tvp->next; ffc0d604: 81 29 00 00 lwz r9,0(r9) *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { ffc0d608: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d60c: 40 9e ff e4 bne+ cr7,ffc0d5f0 <_RTEMS_tasks_Switch_extension+0x30> tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } ffc0d610: 4e 80 00 20 blr <== ALWAYS TAKEN ffc401dc <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { ffc401dc: 94 21 ff c0 stwu r1,-64(r1) ffc401e0: 7c 08 02 a6 mflr r0 ffc401e4: 93 e1 00 3c stw r31,60(r1) /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); ffc401e8: 3b e1 00 08 addi r31,r1,8 bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { ffc401ec: 90 01 00 44 stw r0,68(r1) ffc401f0: 93 61 00 2c stw r27,44(r1) ffc401f4: 7c 9b 23 78 mr r27,r4 ffc401f8: 93 c1 00 38 stw r30,56(r1) ffc401fc: 7c 7e 1b 78 mr r30,r3 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); ffc40200: 7f e3 fb 78 mr r3,r31 bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { ffc40204: 93 81 00 30 stw r28,48(r1) ffc40208: 7c bc 2b 78 mr r28,r5 ffc4020c: 93 a1 00 34 stw r29,52(r1) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; ffc40210: 83 be 00 40 lwz r29,64(r30) /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); ffc40214: 4b fe e3 5d bl ffc2e570 <_TOD_Get_uptime> <== ALWAYS TAKEN _Timestamp_Subtract( ffc40218: 38 7e 00 4c addi r3,r30,76 ffc4021c: 7f 65 db 78 mr r5,r27 ffc40220: 7f e4 fb 78 mr r4,r31 ffc40224: 4b fd 0c 9d bl ffc10ec0 <_Timespec_Subtract> <== ALWAYS TAKEN * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc40228: 3d 20 00 00 lis r9,0 ffc4022c: 80 09 36 14 lwz r0,13844(r9) ffc40230: 38 60 00 01 li r3,1 #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; ffc40234: 81 3d 00 84 lwz r9,132(r29) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc40238: 7f 9d 00 00 cmpw cr7,r29,r0 #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; ffc4023c: 81 5d 00 88 lwz r10,136(r29) ffc40240: 91 21 00 10 stw r9,16(r1) ffc40244: 91 41 00 14 stw r10,20(r1) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc40248: 40 be 00 5c bne+ cr7,ffc402a4 <_Rate_monotonic_Get_status+0xc8> Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( ffc4024c: 3b a1 00 18 addi r29,r1,24 ffc40250: 3c 60 00 00 lis r3,0 ffc40254: 7f e4 fb 78 mr r4,r31 ffc40258: 7f a5 eb 78 mr r5,r29 ffc4025c: 38 63 36 1c addi r3,r3,13852 &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); ffc40260: 3b e1 00 10 addi r31,r1,16 if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( ffc40264: 4b fd 0c 5d bl ffc10ec0 <_Timespec_Subtract> <== ALWAYS TAKEN /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) ffc40268: 3b de 00 44 addi r30,r30,68 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); ffc4026c: 7f a4 eb 78 mr r4,r29 ffc40270: 7f e3 fb 78 mr r3,r31 ffc40274: 4b fd 0b e9 bl ffc10e5c <_Timespec_Add_to> <== ALWAYS TAKEN /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) ffc40278: 7f e3 fb 78 mr r3,r31 ffc4027c: 7f c4 f3 78 mr r4,r30 ffc40280: 48 00 0a ad bl ffc40d2c <_Timespec_Less_than> <== ALWAYS TAKEN ffc40284: 2f 83 00 00 cmpwi cr7,r3,0 ffc40288: 38 60 00 00 li r3,0 ffc4028c: 40 be 00 18 bne+ cr7,ffc402a4 <_Rate_monotonic_Get_status+0xc8> return false; /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( ffc40290: 7f c3 f3 78 mr r3,r30 ffc40294: 7f e4 fb 78 mr r4,r31 ffc40298: 7f 85 e3 78 mr r5,r28 ffc4029c: 4b fd 0c 25 bl ffc10ec0 <_Timespec_Subtract> <== ALWAYS TAKEN ffc402a0: 38 60 00 01 li r3,1 return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } ffc402a4: 80 01 00 44 lwz r0,68(r1) ffc402a8: 83 61 00 2c lwz r27,44(r1) ffc402ac: 7c 08 03 a6 mtlr r0 ffc402b0: 83 81 00 30 lwz r28,48(r1) ffc402b4: 83 a1 00 34 lwz r29,52(r1) ffc402b8: 83 c1 00 38 lwz r30,56(r1) ffc402bc: 83 e1 00 3c lwz r31,60(r1) ffc402c0: 38 21 00 40 addi r1,r1,64 ffc402c4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc40140 <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { ffc40140: 94 21 ff d8 stwu r1,-40(r1) ffc40144: 7c 08 02 a6 mflr r0 ffc40148: 93 a1 00 1c stw r29,28(r1) * If using nanosecond statistics, we need to obtain the uptime. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; _TOD_Get_uptime( &uptime ); ffc4014c: 3b a1 00 08 addi r29,r1,8 } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { ffc40150: 90 01 00 2c stw r0,44(r1) ffc40154: 93 e1 00 24 stw r31,36(r1) ffc40158: 7c 7f 1b 78 mr r31,r3 * If using nanosecond statistics, we need to obtain the uptime. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; _TOD_Get_uptime( &uptime ); ffc4015c: 7f a3 eb 78 mr r3,r29 } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { ffc40160: 93 c1 00 20 stw r30,32(r1) Thread_Control *owning_thread = the_period->owner; ffc40164: 83 df 00 40 lwz r30,64(r31) * If using nanosecond statistics, we need to obtain the uptime. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; _TOD_Get_uptime( &uptime ); ffc40168: 4b fe e4 09 bl ffc2e570 <_TOD_Get_uptime> <== ALWAYS TAKEN * routine is invoked from rtems_rate_monotonic_period, the owner will * be the executing thread. When this routine is invoked from * _Rate_monotonic_Timeout, it will not. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc4016c: 3d 20 00 00 lis r9,0 /* * Set the starting point and the CPU time used for the statistics. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ the_period->time_period_initiated = uptime; ffc40170: 81 41 00 0c lwz r10,12(r1) * routine is invoked from rtems_rate_monotonic_period, the owner will * be the executing thread. When this routine is invoked from * _Rate_monotonic_Timeout, it will not. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc40174: 80 09 36 14 lwz r0,13844(r9) /* * Set the starting point and the CPU time used for the statistics. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ the_period->time_period_initiated = uptime; ffc40178: 81 21 00 08 lwz r9,8(r1) * routine is invoked from rtems_rate_monotonic_period, the owner will * be the executing thread. When this routine is invoked from * _Rate_monotonic_Timeout, it will not. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc4017c: 7f 9e 00 00 cmpw cr7,r30,r0 /* * Set the starting point and the CPU time used for the statistics. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ the_period->time_period_initiated = uptime; ffc40180: 91 5f 00 50 stw r10,80(r31) ffc40184: 91 3f 00 4c stw r9,76(r31) #else the_period->time_period_initiated = _Watchdog_Ticks_since_boot; #endif the_period->cpu_usage_period_initiated = owning_thread->cpu_time_used; ffc40188: 81 3e 00 84 lwz r9,132(r30) ffc4018c: 81 5e 00 88 lwz r10,136(r30) ffc40190: 91 3f 00 44 stw r9,68(r31) ffc40194: 91 5f 00 48 stw r10,72(r31) * routine is invoked from rtems_rate_monotonic_period, the owner will * be the executing thread. When this routine is invoked from * _Rate_monotonic_Timeout, it will not. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc40198: 40 be 00 28 bne+ cr7,ffc401c0 <_Rate_monotonic_Initiate_statistics+0x80> /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( ffc4019c: 3b c1 00 10 addi r30,r1,16 ffc401a0: 3c 60 00 00 lis r3,0 ffc401a4: 38 63 36 1c addi r3,r3,13852 ffc401a8: 7f a4 eb 78 mr r4,r29 ffc401ac: 7f c5 f3 78 mr r5,r30 ffc401b0: 4b fd 0d 11 bl ffc10ec0 <_Timespec_Subtract> <== ALWAYS TAKEN &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); ffc401b4: 38 7f 00 44 addi r3,r31,68 ffc401b8: 7f c4 f3 78 mr r4,r30 ffc401bc: 4b fd 0c a1 bl ffc10e5c <_Timespec_Add_to> <== ALWAYS TAKEN } #endif } ffc401c0: 80 01 00 2c lwz r0,44(r1) ffc401c4: 83 a1 00 1c lwz r29,28(r1) ffc401c8: 7c 08 03 a6 mtlr r0 ffc401cc: 83 c1 00 20 lwz r30,32(r1) ffc401d0: 83 e1 00 24 lwz r31,36(r1) ffc401d4: 38 21 00 28 addi r1,r1,40 ffc401d8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d490 <_Rate_monotonic_Manager_initialization>: * Handler. */ void _Rate_monotonic_Manager_initialization(void) { _Objects_Initialize_information( ffc0d490: 3d 20 00 00 lis r9,0 * NOTE: The Rate Monotonic Manager is built on top of the Watchdog * Handler. */ void _Rate_monotonic_Manager_initialization(void) { ffc0d494: 94 21 ff f8 stwu r1,-8(r1) ffc0d498: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN _Objects_Initialize_information( ffc0d49c: 3c 60 00 00 lis r3,0 ffc0d4a0: 80 c9 20 90 lwz r6,8336(r9) <== ALWAYS TAKEN ffc0d4a4: 38 63 2f 04 addi r3,r3,12036 ffc0d4a8: 38 80 00 02 li r4,2 <== ALWAYS TAKEN * NOTE: The Rate Monotonic Manager is built on top of the Watchdog * Handler. */ void _Rate_monotonic_Manager_initialization(void) { ffc0d4ac: 90 01 00 0c stw r0,12(r1) <== ALWAYS TAKEN _Objects_Initialize_information( ffc0d4b0: 38 a0 00 08 li r5,8 ffc0d4b4: 38 e0 00 8c li r7,140 ffc0d4b8: 39 00 00 00 li r8,0 ffc0d4bc: 39 20 00 04 li r9,4 ffc0d4c0: 4b ff c3 b1 bl ffc09870 <_Objects_Initialize_information> <== ALWAYS TAKEN , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc0d4c4: 80 01 00 0c lwz r0,12(r1) ffc0d4c8: 38 21 00 08 addi r1,r1,8 ffc0d4cc: 7c 08 03 a6 mtlr r0 ffc0d4d0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc405c0 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { ffc405c0: 94 21 ff e0 stwu r1,-32(r1) ffc405c4: 7c 08 02 a6 mflr r0 ffc405c8: 7c 64 1b 78 mr r4,r3 ffc405cc: 3c 60 00 00 lis r3,0 ffc405d0: 90 01 00 24 stw r0,36(r1) ffc405d4: 38 63 68 c4 addi r3,r3,26820 ffc405d8: 38 a1 00 08 addi r5,r1,8 ffc405dc: 93 e1 00 1c stw r31,28(r1) ffc405e0: 4b fc ec a9 bl ffc0f288 <_Objects_Get> <== ALWAYS TAKEN /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc405e4: 80 01 00 08 lwz r0,8(r1) ffc405e8: 7c 7f 1b 78 mr r31,r3 ffc405ec: 2f 80 00 00 cmpwi cr7,r0,0 ffc405f0: 40 9e 00 84 bne- cr7,ffc40674 <_Rate_monotonic_Timeout+0xb4> <== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; ffc405f4: 80 63 00 40 lwz r3,64(r3) if ( _States_Is_waiting_for_period( the_thread->current_state ) && ffc405f8: 80 03 00 10 lwz r0,16(r3) ffc405fc: 70 09 40 00 andi. r9,r0,16384 ffc40600: 41 82 00 24 beq- ffc40624 <_Rate_monotonic_Timeout+0x64> the_thread->Wait.id == the_period->Object.id ) { ffc40604: 81 23 00 20 lwz r9,32(r3) ffc40608: 80 1f 00 08 lwz r0,8(r31) ffc4060c: 7f 89 00 00 cmpw cr7,r9,r0 ffc40610: 40 be 00 14 bne+ cr7,ffc40624 <_Rate_monotonic_Timeout+0x64> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc40614: 3c 80 10 03 lis r4,4099 ffc40618: 60 84 ff f8 ori r4,r4,65528 ffc4061c: 4b fc f3 81 bl ffc0f99c <_Thread_Clear_state> <== ALWAYS TAKEN ffc40620: 48 00 00 18 b ffc40638 <_Rate_monotonic_Timeout+0x78> <== ALWAYS TAKEN _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { ffc40624: 80 1f 00 38 lwz r0,56(r31) ffc40628: 2f 80 00 01 cmpwi cr7,r0,1 ffc4062c: 40 be 00 30 bne+ cr7,ffc4065c <_Rate_monotonic_Timeout+0x9c> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; ffc40630: 38 00 00 03 li r0,3 ffc40634: 90 1f 00 38 stw r0,56(r31) _Rate_monotonic_Initiate_statistics( the_period ); ffc40638: 7f e3 fb 78 mr r3,r31 ffc4063c: 4b ff fb 05 bl ffc40140 <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc40640: 80 1f 00 3c lwz r0,60(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc40644: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc40648: 90 1f 00 1c stw r0,28(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc4064c: 38 63 65 68 addi r3,r3,25960 ffc40650: 38 9f 00 10 addi r4,r31,16 ffc40654: 4b fd 0d 31 bl ffc11384 <_Watchdog_Insert> <== ALWAYS TAKEN ffc40658: 48 00 00 0c b ffc40664 <_Rate_monotonic_Timeout+0xa4> <== ALWAYS TAKEN _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; ffc4065c: 38 00 00 04 li r0,4 ffc40660: 90 1f 00 38 stw r0,56(r31) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc40664: 3d 20 00 00 lis r9,0 ffc40668: 81 69 35 d4 lwz r11,13780(r9) ffc4066c: 38 0b ff ff addi r0,r11,-1 ffc40670: 90 09 35 d4 stw r0,13780(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc40674: 80 01 00 24 lwz r0,36(r1) ffc40678: 83 e1 00 1c lwz r31,28(r1) ffc4067c: 38 21 00 20 addi r1,r1,32 ffc40680: 7c 08 03 a6 mtlr r0 ffc40684: 4e 80 00 20 blr <== ALWAYS TAKEN ffc402c8 <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { ffc402c8: 94 21 ff e0 stwu r1,-32(r1) ffc402cc: 7c 08 02 a6 mflr r0 ffc402d0: 90 01 00 24 stw r0,36(r1) * Update the counts. */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) ffc402d4: 80 03 00 38 lwz r0,56(r3) /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; ffc402d8: 81 23 00 54 lwz r9,84(r3) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) ffc402dc: 2f 80 00 04 cmpwi cr7,r0,4 } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { ffc402e0: 93 e1 00 1c stw r31,28(r1) /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; ffc402e4: 38 09 00 01 addi r0,r9,1 } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { ffc402e8: 93 c1 00 18 stw r30,24(r1) ffc402ec: 7c 7f 1b 78 mr r31,r3 /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; ffc402f0: 90 03 00 54 stw r0,84(r3) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) ffc402f4: 40 be 00 10 bne+ cr7,ffc40304 <_Rate_monotonic_Update_statistics+0x3c> stats->missed_count++; ffc402f8: 81 23 00 58 lwz r9,88(r3) ffc402fc: 38 09 00 01 addi r0,r9,1 ffc40300: 90 03 00 58 stw r0,88(r3) /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); ffc40304: 3b c1 00 08 addi r30,r1,8 ffc40308: 7f e3 fb 78 mr r3,r31 ffc4030c: 38 81 00 10 addi r4,r1,16 ffc40310: 7f c5 f3 78 mr r5,r30 ffc40314: 4b ff fe c9 bl ffc401dc <_Rate_monotonic_Get_status> <== ALWAYS TAKEN if (!valid_status) ffc40318: 2f 83 00 00 cmpwi cr7,r3,0 ffc4031c: 41 be 00 b0 beq+ cr7,ffc403cc <_Rate_monotonic_Update_statistics+0x104> /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); ffc40320: 7f c4 f3 78 mr r4,r30 ffc40324: 38 7f 00 6c addi r3,r31,108 <== ALWAYS TAKEN ffc40328: 4b fd 0b 35 bl ffc10e5c <_Timespec_Add_to> <== ALWAYS TAKEN if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) ffc4032c: 7f c3 f3 78 mr r3,r30 ffc40330: 38 9f 00 5c addi r4,r31,92 ffc40334: 48 00 09 f9 bl ffc40d2c <_Timespec_Less_than> <== ALWAYS TAKEN ffc40338: 2f 83 00 00 cmpwi cr7,r3,0 ffc4033c: 41 9e 00 14 beq- cr7,ffc40350 <_Rate_monotonic_Update_statistics+0x88> stats->min_cpu_time = executed; ffc40340: 81 21 00 08 lwz r9,8(r1) ffc40344: 81 41 00 0c lwz r10,12(r1) ffc40348: 91 3f 00 5c stw r9,92(r31) ffc4034c: 91 5f 00 60 stw r10,96(r31) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) ffc40350: 38 61 00 08 addi r3,r1,8 ffc40354: 38 9f 00 64 addi r4,r31,100 ffc40358: 48 00 09 99 bl ffc40cf0 <_Timespec_Greater_than> <== ALWAYS TAKEN ffc4035c: 2f 83 00 00 cmpwi cr7,r3,0 ffc40360: 41 9e 00 14 beq- cr7,ffc40374 <_Rate_monotonic_Update_statistics+0xac> stats->max_cpu_time = executed; ffc40364: 81 21 00 08 lwz r9,8(r1) ffc40368: 81 41 00 0c lwz r10,12(r1) ffc4036c: 91 3f 00 64 stw r9,100(r31) ffc40370: 91 5f 00 68 stw r10,104(r31) /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); ffc40374: 3b c1 00 10 addi r30,r1,16 ffc40378: 7f c4 f3 78 mr r4,r30 ffc4037c: 38 7f 00 84 addi r3,r31,132 ffc40380: 4b fd 0a dd bl ffc10e5c <_Timespec_Add_to> <== ALWAYS TAKEN if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) ffc40384: 7f c3 f3 78 mr r3,r30 ffc40388: 38 9f 00 74 addi r4,r31,116 ffc4038c: 48 00 09 a1 bl ffc40d2c <_Timespec_Less_than> <== ALWAYS TAKEN ffc40390: 2f 83 00 00 cmpwi cr7,r3,0 ffc40394: 41 9e 00 14 beq- cr7,ffc403a8 <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; ffc40398: 81 21 00 10 lwz r9,16(r1) ffc4039c: 81 41 00 14 lwz r10,20(r1) ffc403a0: 91 3f 00 74 stw r9,116(r31) ffc403a4: 91 5f 00 78 stw r10,120(r31) if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) ffc403a8: 38 61 00 10 addi r3,r1,16 ffc403ac: 38 9f 00 7c addi r4,r31,124 ffc403b0: 48 00 09 41 bl ffc40cf0 <_Timespec_Greater_than> <== ALWAYS TAKEN ffc403b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc403b8: 41 9e 00 14 beq- cr7,ffc403cc <_Rate_monotonic_Update_statistics+0x104> stats->max_wall_time = since_last_period; ffc403bc: 81 21 00 10 lwz r9,16(r1) ffc403c0: 81 41 00 14 lwz r10,20(r1) ffc403c4: 91 3f 00 7c stw r9,124(r31) ffc403c8: 91 5f 00 80 stw r10,128(r31) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } ffc403cc: 80 01 00 24 lwz r0,36(r1) ffc403d0: 83 c1 00 18 lwz r30,24(r1) ffc403d4: 7c 08 03 a6 mtlr r0 ffc403d8: 83 e1 00 1c lwz r31,28(r1) ffc403dc: 38 21 00 20 addi r1,r1,32 ffc403e0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d4d4 <_Region_Manager_initialization>: * Output parameters: NONE */ void _Region_Manager_initialization(void) { _Objects_Initialize_information( ffc0d4d4: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Region_Manager_initialization(void) { ffc0d4d8: 94 21 ff f8 stwu r1,-8(r1) ffc0d4dc: 7c 08 02 a6 mflr r0 _Objects_Initialize_information( ffc0d4e0: 3c 60 00 00 lis r3,0 ffc0d4e4: 80 c9 20 88 lwz r6,8328(r9) ffc0d4e8: 38 63 2f 44 addi r3,r3,12100 ffc0d4ec: 38 80 00 02 li r4,2 <== ALWAYS TAKEN * * Output parameters: NONE */ void _Region_Manager_initialization(void) { ffc0d4f0: 90 01 00 0c stw r0,12(r1) <== ALWAYS TAKEN _Objects_Initialize_information( ffc0d4f4: 38 a0 00 06 li r5,6 <== ALWAYS TAKEN ffc0d4f8: 38 e0 00 c0 li r7,192 ffc0d4fc: 39 00 00 00 li r8,0 ffc0d500: 39 20 00 04 li r9,4 ffc0d504: 4b ff c3 6d bl ffc09870 <_Objects_Initialize_information> <== ALWAYS TAKEN MP_PACKET_REGION, 0 /* XXX _Region_MP_Process_packet */ ); #endif } ffc0d508: 80 01 00 0c lwz r0,12(r1) ffc0d50c: 38 21 00 08 addi r1,r1,8 ffc0d510: 7c 08 03 a6 mtlr r0 ffc0d514: 4e 80 00 20 blr <== ALWAYS TAKEN ffc20378 <_Region_Process_queue>: ffc20378: 3d 20 00 00 lis r9,0 */ void _Region_Process_queue( Region_Control *the_region ) { ffc2037c: 94 21 ff e8 stwu r1,-24(r1) ffc20380: 7c 08 02 a6 mflr r0 ffc20384: 81 69 28 24 lwz r11,10276(r9) ffc20388: 93 e1 00 14 stw r31,20(r1) ffc2038c: 7c 7f 1b 78 mr r31,r3 ffc20390: 39 6b 00 01 addi r11,r11,1 ffc20394: 90 01 00 1c stw r0,28(r1) ffc20398: 93 81 00 08 stw r28,8(r1) ffc2039c: 93 a1 00 0c stw r29,12(r1) ffc203a0: 93 c1 00 10 stw r30,16(r1) ffc203a4: 91 69 28 24 stw r11,10276(r9) * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); ffc203a8: 3d 20 00 00 lis r9,0 ffc203ac: 80 69 28 5c lwz r3,10332(r9) /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); ffc203b0: 3b bf 00 10 addi r29,r31,16 RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); ffc203b4: 3b 9f 00 68 addi r28,r31,104 * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); ffc203b8: 4b ff 9e 45 bl ffc1a1fc <_API_Mutex_Unlock> <== ALWAYS TAKEN /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); ffc203bc: 7f a3 eb 78 mr r3,r29 ffc203c0: 48 00 08 f9 bl ffc20cb8 <_Thread_queue_First> <== ALWAYS TAKEN ffc203c4: 38 a0 00 00 li r5,0 if ( the_thread == NULL ) ffc203c8: 7c 7e 1b 79 mr. r30,r3 ffc203cc: 38 c0 00 00 li r6,0 ffc203d0: 7f 83 e3 78 mr r3,r28 ffc203d4: 41 82 00 40 beq- ffc20414 <_Region_Process_queue+0x9c> ffc203d8: 80 9e 00 24 lwz r4,36(r30) ffc203dc: 4b ff ab 09 bl ffc1aee4 <_Heap_Allocate_aligned_with_boundary> <== ALWAYS TAKEN if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); ffc203e0: 7f c4 f3 78 mr r4,r30 the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) ffc203e4: 7c 6b 1b 79 mr. r11,r3 break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); ffc203e8: 7f a3 eb 78 mr r3,r29 the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) ffc203ec: 41 82 00 28 beq- ffc20414 <_Region_Process_queue+0x9c> break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; ffc203f0: 81 5f 00 64 lwz r10,100(r31) ); if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; ffc203f4: 81 3e 00 28 lwz r9,40(r30) the_region->number_of_used_blocks += 1; ffc203f8: 38 0a 00 01 addi r0,r10,1 ffc203fc: 90 1f 00 64 stw r0,100(r31) ); if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; ffc20400: 91 69 00 00 stw r11,0(r9) the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); ffc20404: 48 00 07 81 bl ffc20b84 <_Thread_queue_Extract> <== ALWAYS TAKEN the_thread->Wait.return_code = RTEMS_SUCCESSFUL; ffc20408: 38 00 00 00 li r0,0 ffc2040c: 90 1e 00 34 stw r0,52(r30) } ffc20410: 4b ff ff ac b ffc203bc <_Region_Process_queue+0x44> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc20414: 4b ff c7 b1 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN } ffc20418: 80 01 00 1c lwz r0,28(r1) ffc2041c: 83 81 00 08 lwz r28,8(r1) ffc20420: 7c 08 03 a6 mtlr r0 ffc20424: 83 a1 00 0c lwz r29,12(r1) ffc20428: 83 c1 00 10 lwz r30,16(r1) ffc2042c: 83 e1 00 14 lwz r31,20(r1) ffc20430: 38 21 00 18 addi r1,r1,24 ffc20434: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d568 <_Semaphore_Manager_initialization>: * Output parameters: NONE */ void _Semaphore_Manager_initialization(void) { _Objects_Initialize_information( ffc0d568: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Semaphore_Manager_initialization(void) { ffc0d56c: 94 21 ff f8 stwu r1,-8(r1) ffc0d570: 7c 08 02 a6 mflr r0 _Objects_Initialize_information( ffc0d574: 3c 60 00 00 lis r3,0 ffc0d578: 80 c9 20 7c lwz r6,8316(r9) ffc0d57c: 38 63 2a ec addi r3,r3,10988 <== ALWAYS TAKEN ffc0d580: 38 80 00 02 li r4,2 * * Output parameters: NONE */ void _Semaphore_Manager_initialization(void) { ffc0d584: 90 01 00 0c stw r0,12(r1) <== ALWAYS TAKEN _Objects_Initialize_information( ffc0d588: 38 a0 00 03 li r5,3 ffc0d58c: 38 e0 00 78 li r7,120 ffc0d590: 39 00 00 00 li r8,0 ffc0d594: 39 20 00 04 li r9,4 ffc0d598: 4b ff c2 d9 bl ffc09870 <_Objects_Initialize_information> <== ALWAYS TAKEN MP_PACKET_SEMAPHORE, _Semaphore_MP_Process_packet ); #endif } ffc0d59c: 80 01 00 0c lwz r0,12(r1) ffc0d5a0: 38 21 00 08 addi r1,r1,8 ffc0d5a4: 7c 08 03 a6 mtlr r0 ffc0d5a8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07da0 <_Semaphore_Translate_core_mutex_return_code>: #if defined(RTEMS_DEBUG) if ( status > CORE_MUTEX_STATUS_LAST ) return RTEMS_INTERNAL_ERROR; #endif return _Semaphore_Translate_core_mutex_return_code_[status]; } ffc07da0: 3d 20 ff c2 lis r9,-62 ffc07da4: 39 29 c6 80 addi r9,r9,-14720 }; rtems_status_code _Semaphore_Translate_core_mutex_return_code ( uint32_t status ) { ffc07da8: 54 63 10 3a rlwinm r3,r3,2,0,29 #if defined(RTEMS_DEBUG) if ( status > CORE_MUTEX_STATUS_LAST ) return RTEMS_INTERNAL_ERROR; #endif return _Semaphore_Translate_core_mutex_return_code_[status]; } ffc07dac: 7c 69 18 2e lwzx r3,r9,r3 ffc07db0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07db4 <_Semaphore_Translate_core_semaphore_return_code>: }; rtems_status_code _Semaphore_Translate_core_semaphore_return_code ( uint32_t status ) { ffc07db4: 3d 20 ff c2 lis r9,-62 ffc07db8: 38 09 c6 80 addi r0,r9,-14720 ffc07dbc: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc07dc0: 7c 60 1a 14 add r3,r0,r3 #if defined(RTEMS_DEBUG) if ( status > CORE_SEMAPHORE_STATUS_LAST ) return RTEMS_INTERNAL_ERROR; #endif return _Semaphore_Translate_core_semaphore_return_code_[status]; } ffc07dc4: 80 63 00 1c lwz r3,28(r3) ffc07dc8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d5ac <_Signal_Manager_initialization>: _MPCI_Register_packet_processor( MP_PACKET_SIGNAL, _Signal_MP_Process_packet ); #endif } ffc0d5ac: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0db3c <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { ffc0db3c: 94 21 ff e0 stwu r1,-32(r1) ffc0db40: 7c 08 02 a6 mflr r0 ffc0db44: 93 e1 00 1c stw r31,28(r1) ffc0db48: 7c 7f 1b 78 mr r31,r3 ffc0db4c: 90 01 00 24 stw r0,36(r1) ffc0db50: 93 c1 00 18 stw r30,24(r1) <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0db54: 7f c0 00 a6 mfmsr r30 ffc0db58: 7c 10 42 a6 mfsprg r0,0 ffc0db5c: 7f c0 00 78 andc r0,r30,r0 ffc0db60: 7c 00 01 24 mtmsr r0 /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) ffc0db64: 3d 20 00 00 lis r9,0 ffc0db68: 81 29 27 94 lwz r9,10132(r9) /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; ffc0db6c: 3d 60 00 00 lis r11,0 ffc0db70: 39 6b 27 4c addi r11,r11,10060 if ( _Watchdog_Nanoseconds_since_tick_handler ) ffc0db74: 2f 89 00 00 cmpwi cr7,r9,0 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; ffc0db78: 81 8b 00 04 lwz r12,4(r11) ffc0db7c: 81 6b 00 00 lwz r11,0(r11) if ( _Watchdog_Nanoseconds_since_tick_handler ) ffc0db80: 38 00 00 00 li r0,0 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; ffc0db84: 91 81 00 14 stw r12,20(r1) ffc0db88: 91 61 00 10 stw r11,16(r1) if ( _Watchdog_Nanoseconds_since_tick_handler ) ffc0db8c: 41 9e 00 10 beq- cr7,ffc0db9c <_TOD_Get+0x60> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); ffc0db90: 7d 29 03 a6 mtctr r9 ffc0db94: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0db98: 7c 60 1b 78 mr r0,r3 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0db9c: 7f c0 01 24 mtmsr r30 _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); ffc0dba0: 39 20 00 00 li r9,0 ffc0dba4: 90 01 00 0c stw r0,12(r1) _Timestamp_Add_to( &now, &offset ); ffc0dba8: 38 61 00 10 addi r3,r1,16 ffc0dbac: 38 81 00 08 addi r4,r1,8 now = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); ffc0dbb0: 91 21 00 08 stw r9,8(r1) _Timestamp_Add_to( &now, &offset ); ffc0dbb4: 4b ff d6 d5 bl ffc0b288 <_Timespec_Add_to> <== ALWAYS TAKEN _Timestamp_To_timespec( &now, time ); } ffc0dbb8: 80 01 00 24 lwz r0,36(r1) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &now, &offset ); _Timestamp_To_timespec( &now, time ); ffc0dbbc: 81 21 00 10 lwz r9,16(r1) } ffc0dbc0: 7c 08 03 a6 mtlr r0 nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &now, &offset ); _Timestamp_To_timespec( &now, time ); ffc0dbc4: 81 41 00 14 lwz r10,20(r1) } ffc0dbc8: 83 c1 00 18 lwz r30,24(r1) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &now, &offset ); _Timestamp_To_timespec( &now, time ); ffc0dbcc: 91 3f 00 00 stw r9,0(r31) ffc0dbd0: 91 5f 00 04 stw r10,4(r31) <== ALWAYS TAKEN } ffc0dbd4: 83 e1 00 1c lwz r31,28(r1) ffc0dbd8: 38 21 00 20 addi r1,r1,32 ffc0dbdc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0dbe0 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( Timestamp_Control *uptime ) { ffc0dbe0: 94 21 ff e0 stwu r1,-32(r1) ffc0dbe4: 7c 08 02 a6 mflr r0 ffc0dbe8: 93 e1 00 1c stw r31,28(r1) ffc0dbec: 7c 7f 1b 78 mr r31,r3 <== ALWAYS TAKEN ffc0dbf0: 90 01 00 24 stw r0,36(r1) ffc0dbf4: 93 c1 00 18 stw r30,24(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0dbf8: 7f c0 00 a6 mfmsr r30 <== ALWAYS TAKEN ffc0dbfc: 7c 10 42 a6 mfsprg r0,0 ffc0dc00: 7f c0 00 78 andc r0,r30,r0 <== ALWAYS TAKEN ffc0dc04: 7c 00 01 24 mtmsr r0 /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) ffc0dc08: 3d 20 00 00 lis r9,0 ffc0dc0c: 81 29 27 94 lwz r9,10132(r9) /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; ffc0dc10: 3d 60 00 00 lis r11,0 ffc0dc14: 39 6b 27 38 addi r11,r11,10040 if ( _Watchdog_Nanoseconds_since_tick_handler ) ffc0dc18: 2f 89 00 00 cmpwi cr7,r9,0 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; ffc0dc1c: 81 8b 00 04 lwz r12,4(r11) ffc0dc20: 81 6b 00 00 lwz r11,0(r11) if ( _Watchdog_Nanoseconds_since_tick_handler ) ffc0dc24: 38 00 00 00 li r0,0 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; ffc0dc28: 91 81 00 14 stw r12,20(r1) ffc0dc2c: 91 61 00 10 stw r11,16(r1) if ( _Watchdog_Nanoseconds_since_tick_handler ) ffc0dc30: 41 9e 00 10 beq- cr7,ffc0dc40 <_TOD_Get_uptime+0x60> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); ffc0dc34: 7d 29 03 a6 mtctr r9 ffc0dc38: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0dc3c: 7c 60 1b 78 mr r0,r3 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0dc40: 7f c0 01 24 mtmsr r30 _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); ffc0dc44: 39 20 00 00 li r9,0 ffc0dc48: 90 01 00 0c stw r0,12(r1) _Timestamp_Add_to( &up, &offset ); ffc0dc4c: 38 61 00 10 addi r3,r1,16 ffc0dc50: 38 81 00 08 addi r4,r1,8 up = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); ffc0dc54: 91 21 00 08 stw r9,8(r1) <== ALWAYS TAKEN _Timestamp_Add_to( &up, &offset ); ffc0dc58: 4b ff d6 31 bl ffc0b288 <_Timespec_Add_to> <== ALWAYS TAKEN *uptime = up; } ffc0dc5c: 80 01 00 24 lwz r0,36(r1) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &up, &offset ); *uptime = up; ffc0dc60: 81 21 00 10 lwz r9,16(r1) } ffc0dc64: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &up, &offset ); *uptime = up; ffc0dc68: 81 41 00 14 lwz r10,20(r1) } ffc0dc6c: 83 c1 00 18 lwz r30,24(r1) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &up, &offset ); *uptime = up; ffc0dc70: 91 3f 00 00 stw r9,0(r31) ffc0dc74: 91 5f 00 04 stw r10,4(r31) } ffc0dc78: 83 e1 00 1c lwz r31,28(r1) ffc0dc7c: 38 21 00 20 addi r1,r1,32 ffc0dc80: 4e 80 00 20 blr <== ALWAYS TAKEN ffc2e614 <_TOD_Get_uptime_as_timespec>: */ void _TOD_Get_uptime_as_timespec( struct timespec *uptime ) { ffc2e614: 94 21 ff e0 stwu r1,-32(r1) ffc2e618: 7c 08 02 a6 mflr r0 ffc2e61c: 93 e1 00 1c stw r31,28(r1) ffc2e620: 7c 7f 1b 78 mr r31,r3 Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); ffc2e624: 38 61 00 08 addi r3,r1,8 */ void _TOD_Get_uptime_as_timespec( struct timespec *uptime ) { ffc2e628: 90 01 00 24 stw r0,36(r1) Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); ffc2e62c: 4b ff ff 45 bl ffc2e570 <_TOD_Get_uptime> <== ALWAYS TAKEN _Timestamp_To_timespec( &uptime_ts, uptime ); } ffc2e630: 80 01 00 24 lwz r0,36(r1) { Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); _Timestamp_To_timespec( &uptime_ts, uptime ); ffc2e634: 81 21 00 08 lwz r9,8(r1) } ffc2e638: 7c 08 03 a6 mtlr r0 { Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); _Timestamp_To_timespec( &uptime_ts, uptime ); ffc2e63c: 81 41 00 0c lwz r10,12(r1) ffc2e640: 91 3f 00 00 stw r9,0(r31) ffc2e644: 91 5f 00 04 stw r10,4(r31) } ffc2e648: 83 e1 00 1c lwz r31,28(r1) ffc2e64c: 38 21 00 20 addi r1,r1,32 ffc2e650: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08d38 <_TOD_Handler_initialization>: */ void _TOD_Handler_initialization(void) { /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, TOD_SECONDS_1970_THROUGH_1988, 0 ); ffc08d38: 3c e0 21 da lis r7,8666 ffc08d3c: 3d 60 00 00 lis r11,0 /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); ffc08d40: 3d 20 00 00 lis r9,0 */ void _TOD_Handler_initialization(void) { /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, TOD_SECONDS_1970_THROUGH_1988, 0 ); ffc08d44: 60 e7 e5 00 ori r7,r7,58624 <== ALWAYS TAKEN ffc08d48: 38 00 00 00 li r0,0 ffc08d4c: 90 eb 27 4c stw r7,10060(r11) ffc08d50: 39 0b 27 4c addi r8,r11,10060 /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); ffc08d54: 39 49 27 38 addi r10,r9,10040 */ void _TOD_Handler_initialization(void) { /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, TOD_SECONDS_1970_THROUGH_1988, 0 ); ffc08d58: 90 08 00 04 stw r0,4(r8) /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); /* TOD has not been set */ _TOD_Is_set = false; ffc08d5c: 3d 60 00 00 lis r11,0 ffc08d60: 98 0b 27 34 stb r0,10036(r11) { /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, TOD_SECONDS_1970_THROUGH_1988, 0 ); /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); ffc08d64: 90 09 27 38 stw r0,10040(r9) <== ALWAYS TAKEN ffc08d68: 90 0a 00 04 stw r0,4(r10) /* TOD has not been set */ _TOD_Is_set = false; _TOD_Activate(); } ffc08d6c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0acd8 <_TOD_Set>: ffc0acd8: 3d 20 00 00 lis r9,0 */ void _TOD_Set( const struct timespec *time ) { ffc0acdc: 94 21 ff f0 stwu r1,-16(r1) <== ALWAYS TAKEN ffc0ace0: 7c 08 02 a6 mflr r0 ffc0ace4: 81 69 27 d8 lwz r11,10200(r9) <== ALWAYS TAKEN ffc0ace8: 90 01 00 14 stw r0,20(r1) ffc0acec: 39 6b 00 01 addi r11,r11,1 ffc0acf0: 93 e1 00 0c stw r31,12(r1) ffc0acf4: 7c 7f 1b 78 mr r31,r3 ffc0acf8: 91 69 27 d8 stw r11,10200(r9) long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); ffc0acfc: 3d 20 00 00 lis r9,0 if ( time->tv_sec < seconds ) ffc0ad00: 80 a3 00 00 lwz r5,0(r3) long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); ffc0ad04: 80 09 27 f8 lwz r0,10232(r9) ffc0ad08: 3c 60 00 01 lis r3,1 <== ALWAYS TAKEN ffc0ad0c: 38 63 aa 9c addi r3,r3,-21860 if ( time->tv_sec < seconds ) ffc0ad10: 7f 85 00 00 cmpw cr7,r5,r0 ffc0ad14: 40 bc 00 10 bge+ cr7,ffc0ad24 <_TOD_Set+0x4c> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); ffc0ad18: 7c a5 00 50 subf r5,r5,r0 ffc0ad1c: 38 80 00 01 li r4,1 ffc0ad20: 48 00 00 0c b ffc0ad2c <_TOD_Set+0x54> <== ALWAYS TAKEN ffc0ad24: 7c a0 28 50 subf r5,r0,r5 ffc0ad28: 38 80 00 00 li r4,0 ffc0ad2c: 48 00 2e a1 bl ffc0dbcc <_Watchdog_Adjust> <== ALWAYS TAKEN _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); ffc0ad30: 80 1f 00 04 lwz r0,4(r31) ffc0ad34: 3d 20 00 00 lis r9,0 ffc0ad38: 81 5f 00 00 lwz r10,0(r31) ffc0ad3c: 39 69 27 f8 addi r11,r9,10232 ffc0ad40: 90 0b 00 04 stw r0,4(r11) _TOD_Is_set = true; ffc0ad44: 38 00 00 01 li r0,1 _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); ffc0ad48: 91 49 27 f8 stw r10,10232(r9) _TOD_Is_set = true; ffc0ad4c: 3d 20 00 00 lis r9,0 ffc0ad50: 98 09 27 e0 stb r0,10208(r9) _TOD_Activate(); _Thread_Enable_dispatch(); ffc0ad54: 48 00 17 19 bl ffc0c46c <_Thread_Enable_dispatch> <== ALWAYS TAKEN } ffc0ad58: 80 01 00 14 lwz r0,20(r1) ffc0ad5c: 83 e1 00 0c lwz r31,12(r1) ffc0ad60: 38 21 00 10 addi r1,r1,16 ffc0ad64: 7c 08 03 a6 mtlr r0 ffc0ad68: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08d70 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc08d70: 94 21 ff e0 stwu r1,-32(r1) ffc08d74: 7c 08 02 a6 mflr r0 Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc08d78: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc08d7c: 90 01 00 24 stw r0,36(r1) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc08d80: 3c 60 00 00 lis r3,0 ffc08d84: 38 63 27 38 addi r3,r3,10040 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc08d88: 80 09 20 ac lwz r0,8364(r9) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc08d8c: 3d 20 00 00 lis r9,0 ffc08d90: 81 69 27 84 lwz r11,10116(r9) { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc08d94: 1c 00 03 e8 mulli r0,r0,1000 <== ALWAYS TAKEN * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc08d98: 93 e1 00 1c stw r31,28(r1) /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc08d9c: 39 6b 00 01 addi r11,r11,1 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { ffc08da0: 93 c1 00 18 stw r30,24(r1) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc08da4: 3b e1 00 08 addi r31,r1,8 ffc08da8: 7f e4 fb 78 mr r4,r31 /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; ffc08dac: 91 69 27 84 stw r11,10116(r9) { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); ffc08db0: 39 20 00 00 li r9,0 ffc08db4: 91 21 00 08 stw r9,8(r1) <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); ffc08db8: 3f c0 00 00 lis r30,0 ffc08dbc: 3b de 2c 9c addi r30,r30,11420 <== ALWAYS TAKEN ffc08dc0: 90 01 00 0c stw r0,12(r1) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); ffc08dc4: 48 00 24 c5 bl ffc0b288 <_Timespec_Add_to> <== ALWAYS TAKEN /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); ffc08dc8: 3c 60 00 00 lis r3,0 ffc08dcc: 7f e4 fb 78 mr r4,r31 ffc08dd0: 38 63 27 4c addi r3,r3,10060 <== ALWAYS TAKEN ffc08dd4: 48 00 24 b5 bl ffc0b288 <_Timespec_Add_to> <== ALWAYS TAKEN ffc08dd8: 7c 7f 1b 78 mr r31,r3 while ( seconds ) { ffc08ddc: 48 00 00 08 b ffc08de4 <_TOD_Tickle_ticks+0x74> <== ALWAYS TAKEN ffc08de0: 48 00 2b d5 bl ffc0b9b4 <_Watchdog_Tickle> <== ALWAYS TAKEN ffc08de4: 2f 9f 00 00 cmpwi cr7,r31,0 ffc08de8: 7f c3 f3 78 mr r3,r30 _Watchdog_Tickle_seconds(); seconds--; ffc08dec: 3b ff ff ff addi r31,r31,-1 _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); while ( seconds ) { ffc08df0: 40 9e ff f0 bne+ cr7,ffc08de0 <_TOD_Tickle_ticks+0x70> _Watchdog_Tickle_seconds(); seconds--; } } ffc08df4: 80 01 00 24 lwz r0,36(r1) ffc08df8: 83 c1 00 18 lwz r30,24(r1) ffc08dfc: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc08e00: 83 e1 00 1c lwz r31,28(r1) ffc08e04: 38 21 00 20 addi r1,r1,32 ffc08e08: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08e98 <_TOD_To_seconds>: { uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; ffc08e98: 81 23 00 00 lwz r9,0(r3) ) { uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; ffc08e9c: 81 63 00 08 lwz r11,8(r3) year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) ffc08ea0: 71 28 00 03 andi. r8,r9,3 ffc08ea4: 81 43 00 04 lwz r10,4(r3) ) { uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; ffc08ea8: 38 0b ff ff addi r0,r11,-1 ffc08eac: 3d 60 ff c2 lis r11,-62 ffc08eb0: 39 6b 25 46 addi r11,r11,9542 year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) ffc08eb4: 40 a2 00 08 bne+ ffc08ebc <_TOD_To_seconds+0x24> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; ffc08eb8: 39 4a 00 0d addi r10,r10,13 else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; ffc08ebc: 55 4a 08 3c rlwinm r10,r10,1,0,30 ffc08ec0: 7d 6b 52 2e lhzx r11,r11,r10 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ffc08ec4: 39 49 f8 3c addi r10,r9,-1988 time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; ffc08ec8: 81 23 00 0c lwz r9,12(r3) if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ffc08ecc: 55 4a f0 be rlwinm r10,r10,30,2,31 year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; ffc08ed0: 7c 0b 02 14 add r0,r11,r0 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ffc08ed4: 55 0b 08 3c rlwinm r11,r8,1,0,30 ffc08ed8: 3d 00 00 00 lis r8,0 ffc08edc: 39 08 27 20 addi r8,r8,10016 ffc08ee0: 7d 08 5a 2e lhzx r8,r8,r11 ffc08ee4: 1d 4a 05 b5 mulli r10,r10,1461 time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; ffc08ee8: 81 63 00 10 lwz r11,16(r3) ffc08eec: 1d 29 00 3c mulli r9,r9,60 time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) ffc08ef0: 80 63 00 14 lwz r3,20(r3) if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ffc08ef4: 7d 48 52 14 add r10,r8,r10 time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; ffc08ef8: 7d 29 5a 14 add r9,r9,r11 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; ffc08efc: 3d 60 00 01 lis r11,1 time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; ffc08f00: 7c 0a 02 14 add r0,r10,r0 time *= TOD_SECONDS_PER_DAY; ffc08f04: 61 6b 51 80 ori r11,r11,20864 ffc08f08: 7c 00 59 d6 mullw r0,r0,r11 time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; ffc08f0c: 1d 29 00 3c mulli r9,r9,60 time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) ffc08f10: 3c 63 21 db addis r3,r3,8667 <== ALWAYS TAKEN ffc08f14: 38 63 e5 00 addi r3,r3,-6912 * TOD_SECONDS_PER_MINUTE; time += the_tod->second; ffc08f18: 7c 63 4a 14 add r3,r3,r9 time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } ffc08f1c: 7c 63 02 14 add r3,r3,r0 <== ALWAYS TAKEN ffc08f20: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08f24 <_TOD_Validate>: uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc08f24: 2c 03 00 00 cmpwi r3,0 { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); ffc08f28: 3d 20 00 00 lis r9,0 ffc08f2c: 81 29 20 cc lwz r9,8396(r9) if ((!the_tod) || ffc08f30: 41 82 00 98 beq- ffc08fc8 <_TOD_Validate+0xa4> <== NEVER TAKEN (the_tod->ticks >= ticks_per_second) || ffc08f34: 3c 00 00 0f lis r0,15 ffc08f38: 60 00 42 40 ori r0,r0,16960 ffc08f3c: 7c 00 4b 96 divwu r0,r0,r9 ffc08f40: 81 23 00 18 lwz r9,24(r3) ffc08f44: 7f 89 00 40 cmplw cr7,r9,r0 ffc08f48: 40 9c 00 80 bge- cr7,ffc08fc8 <_TOD_Validate+0xa4> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || ffc08f4c: 80 03 00 14 lwz r0,20(r3) ffc08f50: 2b 80 00 3b cmplwi cr7,r0,59 ffc08f54: 41 9d 00 74 bgt- cr7,ffc08fc8 <_TOD_Validate+0xa4> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || ffc08f58: 80 03 00 10 lwz r0,16(r3) ffc08f5c: 2b 80 00 3b cmplwi cr7,r0,59 ffc08f60: 41 9d 00 68 bgt- cr7,ffc08fc8 <_TOD_Validate+0xa4> (the_tod->hour >= TOD_HOURS_PER_DAY) || ffc08f64: 80 03 00 0c lwz r0,12(r3) ffc08f68: 2b 80 00 17 cmplwi cr7,r0,23 ffc08f6c: 41 9d 00 5c bgt- cr7,ffc08fc8 <_TOD_Validate+0xa4> (the_tod->month == 0) || ffc08f70: 81 23 00 04 lwz r9,4(r3) uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc08f74: 2f 89 00 00 cmpwi cr7,r9,0 ffc08f78: 41 9e 00 50 beq- cr7,ffc08fc8 <_TOD_Validate+0xa4> <== NEVER TAKEN ffc08f7c: 2b 89 00 0c cmplwi cr7,r9,12 <== ALWAYS TAKEN ffc08f80: 41 9d 00 48 bgt- cr7,ffc08fc8 <_TOD_Validate+0xa4> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || ffc08f84: 80 03 00 00 lwz r0,0(r3) uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc08f88: 2b 80 07 c3 cmplwi cr7,r0,1987 ffc08f8c: 40 9d 00 3c ble- cr7,ffc08fc8 <_TOD_Validate+0xa4> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) ffc08f90: 80 63 00 08 lwz r3,8(r3) uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc08f94: 2f 83 00 00 cmpwi cr7,r3,0 ffc08f98: 41 9e 00 30 beq- cr7,ffc08fc8 <_TOD_Validate+0xa4> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) ffc08f9c: 70 0b 00 03 andi. r11,r0,3 ffc08fa0: 3d 60 ff c2 lis r11,-62 ffc08fa4: 39 6b 25 7c addi r11,r11,9596 ffc08fa8: 40 82 00 08 bne- ffc08fb0 <_TOD_Validate+0x8c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; ffc08fac: 39 29 00 0d addi r9,r9,13 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; ffc08fb0: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc08fb4: 7c 0b 48 2e lwzx r0,r11,r9 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( ffc08fb8: 7c 63 00 10 subfc r3,r3,r0 ffc08fbc: 38 60 00 00 li r3,0 ffc08fc0: 7c 63 19 14 adde r3,r3,r3 ffc08fc4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08fc8: 38 60 00 00 li r3,0 if ( the_tod->day > days_in_month ) return false; return true; } ffc08fcc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09c24 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { ffc09c24: 94 21 ff e0 stwu r1,-32(r1) ffc09c28: 7c 08 02 a6 mflr r0 ffc09c2c: 90 01 00 24 stw r0,36(r1) ffc09c30: 93 e1 00 1c stw r31,28(r1) ffc09c34: 7c 7f 1b 78 mr r31,r3 ffc09c38: 93 a1 00 14 stw r29,20(r1) ffc09c3c: 93 c1 00 18 stw r30,24(r1) ffc09c40: 7c be 2b 78 mr r30,r5 /* * 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 ); ffc09c44: 90 81 00 08 stw r4,8(r1) */ /* * Save original state */ original_state = the_thread->current_state; ffc09c48: 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 ); ffc09c4c: 48 00 11 dd bl ffc0ae28 <_Thread_Set_transient> <== ALWAYS TAKEN /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) ffc09c50: 80 1f 00 14 lwz r0,20(r31) ffc09c54: 80 81 00 08 lwz r4,8(r1) ffc09c58: 7f 80 20 00 cmpw cr7,r0,r4 ffc09c5c: 41 9e 00 0c beq- cr7,ffc09c68 <_Thread_Change_priority+0x44> _Thread_Set_priority( the_thread, new_priority ); ffc09c60: 7f e3 fb 78 mr r3,r31 ffc09c64: 48 00 10 51 bl ffc0acb4 <_Thread_Set_priority> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09c68: 7d 60 00 a6 mfmsr r11 ffc09c6c: 7c 10 42 a6 mfsprg r0,0 ffc09c70: 7d 60 00 78 andc r0,r11,r0 ffc09c74: 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; ffc09c78: 80 1f 00 10 lwz r0,16(r31) ffc09c7c: 57 bd 07 7a rlwinm r29,r29,0,29,29 if ( state != STATES_TRANSIENT ) { ffc09c80: 2f 80 00 04 cmpwi cr7,r0,4 ffc09c84: 41 9e 00 38 beq- cr7,ffc09cbc <_Thread_Change_priority+0x98> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) ffc09c88: 2f 9d 00 00 cmpwi cr7,r29,0 ffc09c8c: 40 9e 00 0c bne- cr7,ffc09c98 <_Thread_Change_priority+0x74> <== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc09c90: 54 09 07 b8 rlwinm r9,r0,0,30,28 ffc09c94: 91 3f 00 10 stw r9,16(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09c98: 7d 60 01 24 mtmsr r11 _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc09c9c: 3d 20 00 03 lis r9,3 ffc09ca0: 61 29 be e0 ori r9,r9,48864 ffc09ca4: 7c 0b 48 39 and. r11,r0,r9 ffc09ca8: 41 a2 01 04 beq+ ffc09dac <_Thread_Change_priority+0x188> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc09cac: 80 7f 00 44 lwz r3,68(r31) ffc09cb0: 7f e4 fb 78 mr r4,r31 ffc09cb4: 48 00 0f 2d bl ffc0abe0 <_Thread_queue_Requeue> <== ALWAYS TAKEN ffc09cb8: 48 00 00 f4 b ffc09dac <_Thread_Change_priority+0x188> <== ALWAYS TAKEN } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { ffc09cbc: 2f 9d 00 00 cmpwi cr7,r29,0 ffc09cc0: 40 9e 00 6c bne- cr7,ffc09d2c <_Thread_Change_priority+0x108> <== NEVER TAKEN * 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 ); ffc09cc4: 93 bf 00 10 stw r29,16(r31) _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) ffc09cc8: 2f 9e 00 00 cmpwi cr7,r30,0 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; _Priority_Major_bit_map |= the_priority_map->ready_major; ffc09ccc: 3d 40 00 00 lis r10,0 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc09cd0: 81 3f 00 90 lwz r9,144(r31) ffc09cd4: 80 1f 00 98 lwz r0,152(r31) ffc09cd8: 81 09 00 00 lwz r8,0(r9) ffc09cdc: 7d 00 03 78 or r0,r8,r0 ffc09ce0: 90 09 00 00 stw r0,0(r9) <== ALWAYS TAKEN _Priority_Major_bit_map |= the_priority_map->ready_major; ffc09ce4: 81 0a 27 60 lwz r8,10080(r10) ffc09ce8: 80 1f 00 94 lwz r0,148(r31) ffc09cec: 81 3f 00 8c lwz r9,140(r31) ffc09cf0: 7d 00 03 78 or r0,r8,r0 ffc09cf4: 90 0a 27 60 stw r0,10080(r10) ffc09cf8: 41 9e 00 1c beq- cr7,ffc09d14 <_Thread_Change_priority+0xf0> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc09cfc: 81 49 00 00 lwz r10,0(r9) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc09d00: 91 3f 00 04 stw r9,4(r31) before_node = after_node->next; after_node->next = the_node; ffc09d04: 93 e9 00 00 stw r31,0(r9) the_node->next = before_node; before_node->previous = the_node; ffc09d08: 93 ea 00 04 stw r31,4(r10) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc09d0c: 91 5f 00 00 stw r10,0(r31) ffc09d10: 48 00 00 1c b ffc09d2c <_Thread_Change_priority+0x108> <== ALWAYS TAKEN Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc09d14: 38 09 00 04 addi r0,r9,4 ffc09d18: 90 1f 00 00 stw r0,0(r31) old_last_node = the_chain->last; ffc09d1c: 81 49 00 08 lwz r10,8(r9) the_chain->last = the_node; ffc09d20: 93 e9 00 08 stw r31,8(r9) old_last_node->next = the_node; the_node->previous = old_last_node; ffc09d24: 91 5f 00 04 stw r10,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; ffc09d28: 93 ea 00 00 stw r31,0(r10) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc09d2c: 7c 00 00 a6 mfmsr r0 ffc09d30: 7d 60 01 24 mtmsr r11 ffc09d34: 7c 00 01 24 mtmsr r0 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 ); ffc09d38: 3c c0 00 00 lis r6,0 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; ffc09d3c: 3d 40 00 00 lis r10,0 ffc09d40: 81 26 27 60 lwz r9,10080(r6) ffc09d44: 80 aa 27 20 lwz r5,10016(r10) ffc09d48: 7d 27 00 34 cntlzw r7,r9 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc09d4c: 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 ); ffc09d50: 91 26 27 60 stw r9,10080(r6) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc09d54: 39 08 2d 00 addi r8,r8,11520 ffc09d58: 54 ea 10 3a rlwinm r10,r7,2,0,29 ffc09d5c: 7c 08 50 2e lwzx r0,r8,r10 ffc09d60: 7c 09 00 34 cntlzw r9,r0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc09d64: 54 e7 20 36 rlwinm r7,r7,4,0,27 ffc09d68: 7c 08 51 2e stwx r0,r8,r10 ffc09d6c: 7c e7 4a 14 add r7,r7,r9 ffc09d70: 1c e7 00 0c mulli r7,r7,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 ); ffc09d74: 3d 20 00 00 lis r9,0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc09d78: 7c 05 38 2e lwzx r0,r5,r7 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); ffc09d7c: 81 29 27 6c lwz r9,10092(r9) * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc09d80: 3d 40 00 00 lis r10,0 ffc09d84: 90 0a 27 48 stw r0,10056(r10) <== ALWAYS TAKEN * 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() && ffc09d88: 7f 89 00 00 cmpw cr7,r9,r0 ffc09d8c: 41 9e 00 1c beq- cr7,ffc09da8 <_Thread_Change_priority+0x184> _Thread_Executing->is_preemptible ) ffc09d90: 88 09 00 75 lbz r0,117(r9) ffc09d94: 2f 80 00 00 cmpwi cr7,r0,0 ffc09d98: 41 9e 00 10 beq- cr7,ffc09da8 <_Thread_Change_priority+0x184> _Context_Switch_necessary = true; ffc09d9c: 38 00 00 01 li r0,1 ffc09da0: 3d 20 00 00 lis r9,0 ffc09da4: 98 09 27 7c stb r0,10108(r9) <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09da8: 7d 60 01 24 mtmsr r11 _ISR_Enable( level ); } ffc09dac: 80 01 00 24 lwz r0,36(r1) ffc09db0: 83 a1 00 14 lwz r29,20(r1) ffc09db4: 7c 08 03 a6 mtlr r0 ffc09db8: 83 c1 00 18 lwz r30,24(r1) ffc09dbc: 83 e1 00 1c lwz r31,28(r1) ffc09dc0: 38 21 00 20 addi r1,r1,32 ffc09dc4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09dc8 <_Thread_Clear_state>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09dc8: 7c 00 00 a6 mfmsr r0 ffc09dcc: 7d 30 42 a6 mfsprg r9,0 ffc09dd0: 7c 09 48 78 andc r9,r0,r9 ffc09dd4: 7d 20 01 24 mtmsr r9 { ISR_Level level; States_Control current_state; _ISR_Disable( level ); current_state = the_thread->current_state; ffc09dd8: 81 23 00 10 lwz r9,16(r3) if ( current_state & state ) { ffc09ddc: 7c 8b 48 39 and. r11,r4,r9 ffc09de0: 41 82 00 a8 beq- ffc09e88 <_Thread_Clear_state+0xc0> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); ffc09de4: 7d 24 20 78 andc r4,r9,r4 current_state = the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { ffc09de8: 2f 84 00 00 cmpwi cr7,r4,0 _ISR_Disable( level ); current_state = the_thread->current_state; if ( current_state & state ) { current_state = ffc09dec: 90 83 00 10 stw r4,16(r3) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { ffc09df0: 40 9e 00 98 bne- cr7,ffc09e88 <_Thread_Clear_state+0xc0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc09df4: 81 63 00 90 lwz r11,144(r3) ffc09df8: 81 43 00 98 lwz r10,152(r3) ffc09dfc: 81 0b 00 00 lwz r8,0(r11) <== ALWAYS TAKEN _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); ffc09e00: 81 23 00 8c lwz r9,140(r3) ffc09e04: 7d 0a 53 78 or r10,r8,r10 ffc09e08: 91 4b 00 00 stw r10,0(r11) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc09e0c: 39 69 00 04 addi r11,r9,4 _Priority_Major_bit_map |= the_priority_map->ready_major; ffc09e10: 3d 40 00 00 lis r10,0 ffc09e14: 91 63 00 00 stw r11,0(r3) ffc09e18: 80 ea 27 60 lwz r7,10080(r10) ffc09e1c: 81 03 00 94 lwz r8,148(r3) old_last_node = the_chain->last; ffc09e20: 81 69 00 08 lwz r11,8(r9) ffc09e24: 7c e8 43 78 or r8,r7,r8 the_chain->last = the_node; ffc09e28: 90 69 00 08 stw r3,8(r9) ffc09e2c: 91 0a 27 60 stw r8,10080(r10) old_last_node->next = the_node; the_node->previous = old_last_node; ffc09e30: 91 63 00 04 stw r11,4(r3) 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; ffc09e34: 90 6b 00 00 stw r3,0(r11) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc09e38: 7d 20 00 a6 mfmsr r9 ffc09e3c: 7c 00 01 24 mtmsr r0 ffc09e40: 7d 20 01 24 mtmsr r9 * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { ffc09e44: 3d 60 00 00 lis r11,0 <== ALWAYS TAKEN ffc09e48: 81 23 00 14 lwz r9,20(r3) ffc09e4c: 81 4b 27 48 lwz r10,10056(r11) ffc09e50: 81 4a 00 14 lwz r10,20(r10) ffc09e54: 7f 89 50 40 cmplw cr7,r9,r10 ffc09e58: 40 9c 00 30 bge- cr7,ffc09e88 <_Thread_Clear_state+0xc0> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc09e5c: 3d 40 00 00 lis r10,0 * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; ffc09e60: 90 6b 27 48 stw r3,10056(r11) <== ALWAYS TAKEN if ( _Thread_Executing->is_preemptible || ffc09e64: 81 4a 27 6c lwz r10,10092(r10) ffc09e68: 89 6a 00 75 lbz r11,117(r10) ffc09e6c: 2f 8b 00 00 cmpwi cr7,r11,0 ffc09e70: 40 9e 00 0c bne- cr7,ffc09e7c <_Thread_Clear_state+0xb4> ffc09e74: 2f 89 00 00 cmpwi cr7,r9,0 ffc09e78: 40 9e 00 10 bne- cr7,ffc09e88 <_Thread_Clear_state+0xc0> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; ffc09e7c: 39 60 00 01 li r11,1 ffc09e80: 3d 20 00 00 lis r9,0 ffc09e84: 99 69 27 7c stb r11,10108(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09e88: 7c 00 01 24 mtmsr r0 } } } _ISR_Enable( level ); } ffc09e8c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09e90 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { ffc09e90: 94 21 ff e8 stwu r1,-24(r1) ffc09e94: 7c 08 02 a6 mflr r0 ffc09e98: 39 60 00 00 li r11,0 ffc09e9c: 90 01 00 1c stw r0,28(r1) ffc09ea0: a0 04 00 0a lhz r0,10(r4) ffc09ea4: 81 23 00 1c lwz r9,28(r3) ffc09ea8: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc09eac: 93 a1 00 0c stw r29,12(r1) ffc09eb0: 7c 7d 1b 78 mr r29,r3 ffc09eb4: 93 e1 00 14 stw r31,20(r1) ffc09eb8: 7c 9f 23 78 mr r31,r4 ffc09ebc: 93 c1 00 10 stw r30,16(r1) ffc09ec0: 7d 69 01 2e stwx r11,r9,r0 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc09ec4: 3f c0 00 00 lis r30,0 ffc09ec8: 81 3e 27 2c lwz r9,10028(r30) * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); ffc09ecc: 7c 83 23 78 mr r3,r4 ffc09ed0: 38 09 ff ff addi r0,r9,-1 ffc09ed4: 90 1e 27 2c stw r0,10028(r30) ffc09ed8: 48 00 17 59 bl ffc0b630 <_User_extensions_Thread_delete> <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc09edc: 81 3e 27 2c lwz r9,10028(r30) ffc09ee0: 38 09 00 01 addi r0,r9,1 ffc09ee4: 90 1e 27 2c stw r0,10028(r30) /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); ffc09ee8: 7f a3 eb 78 mr r3,r29 <== ALWAYS TAKEN ffc09eec: 7f e4 fb 78 mr r4,r31 ffc09ef0: 4b ff f3 f1 bl ffc092e0 <_Objects_Close> <== ALWAYS TAKEN /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); ffc09ef4: 7f e3 fb 78 mr r3,r31 ffc09ef8: 38 80 00 01 li r4,1 ffc09efc: 48 00 0e 15 bl ffc0ad10 <_Thread_Set_state> <== ALWAYS TAKEN if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { ffc09f00: 7f e3 fb 78 mr r3,r31 ffc09f04: 48 00 0b f9 bl ffc0aafc <_Thread_queue_Extract_with_proxy> <== ALWAYS TAKEN ffc09f08: 2f 83 00 00 cmpwi cr7,r3,0 ffc09f0c: 40 9e 00 18 bne- cr7,ffc09f24 <_Thread_Close+0x94> if ( _Watchdog_Is_active( &the_thread->Timer ) ) ffc09f10: 80 1f 00 50 lwz r0,80(r31) ffc09f14: 2f 80 00 02 cmpwi cr7,r0,2 ffc09f18: 40 be 00 0c bne+ cr7,ffc09f24 <_Thread_Close+0x94> (void) _Watchdog_Remove( &the_thread->Timer ); ffc09f1c: 38 7f 00 48 addi r3,r31,72 ffc09f20: 48 00 19 e9 bl ffc0b908 <_Watchdog_Remove> <== ALWAYS TAKEN if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) ffc09f24: 80 7f 00 d0 lwz r3,208(r31) <== ALWAYS TAKEN #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; ffc09f28: 38 00 00 00 li r0,0 ffc09f2c: 90 1f 01 38 stw r0,312(r31) if ( the_thread->Start.fp_context ) ffc09f30: 2f 83 00 00 cmpwi cr7,r3,0 ffc09f34: 41 9e 00 08 beq- cr7,ffc09f3c <_Thread_Close+0xac> <== NEVER TAKEN (void) _Workspace_Free( the_thread->Start.fp_context ); ffc09f38: 48 00 1b cd bl ffc0bb04 <_Workspace_Free> <== ALWAYS TAKEN /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); ffc09f3c: 7f e3 fb 78 mr r3,r31 ffc09f40: 48 00 10 09 bl ffc0af48 <_Thread_Stack_Free> <== ALWAYS TAKEN the_thread->Start.stack = NULL; if ( the_thread->extensions ) ffc09f44: 80 7f 01 4c lwz r3,332(r31) /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; ffc09f48: 38 00 00 00 li r0,0 if ( the_thread->extensions ) ffc09f4c: 2f 83 00 00 cmpwi cr7,r3,0 /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; ffc09f50: 90 1f 00 d4 stw r0,212(r31) if ( the_thread->extensions ) ffc09f54: 41 9e 00 08 beq- cr7,ffc09f5c <_Thread_Close+0xcc> (void) _Workspace_Free( the_thread->extensions ); ffc09f58: 48 00 1b ad bl ffc0bb04 <_Workspace_Free> <== ALWAYS TAKEN the_thread->extensions = NULL; ffc09f5c: 38 00 00 00 li r0,0 <== ALWAYS TAKEN } ffc09f60: 83 a1 00 0c lwz r29,12(r1) _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; if ( the_thread->extensions ) (void) _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; ffc09f64: 90 1f 01 4c stw r0,332(r31) <== ALWAYS TAKEN } ffc09f68: 80 01 00 1c lwz r0,28(r1) ffc09f6c: 83 c1 00 10 lwz r30,16(r1) ffc09f70: 7c 08 03 a6 mtlr r0 ffc09f74: 83 e1 00 14 lwz r31,20(r1) ffc09f78: 38 21 00 18 addi r1,r1,24 ffc09f7c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09f80 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { ffc09f80: 94 21 ff d8 stwu r1,-40(r1) ffc09f84: 7c 08 02 a6 mflr r0 ffc09f88: 93 e1 00 24 stw r31,36(r1) * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); ffc09f8c: 3f e0 00 00 lis r31,0 ffc09f90: 3b ff 2d 40 addi r31,r31,11584 <== ALWAYS TAKEN ffc09f94: 7f e3 fb 78 mr r3,r31 ffc09f98: 90 01 00 2c stw r0,44(r1) ffc09f9c: 4b ff f2 99 bl ffc09234 <_Objects_Allocate> <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc09fa0: 3d 60 00 00 lis r11,0 ffc09fa4: 81 4b 27 2c lwz r10,10028(r11) /* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate(); ffc09fa8: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN ffc09fac: 90 69 27 98 stw r3,10136(r9) ffc09fb0: 38 0a 00 01 addi r0,r10,1 ffc09fb4: 90 0b 27 2c stw r0,10028(r11) _Thread_Initialize( &_Thread_Internal_information, _Thread_Idle, NULL, /* allocate the stack */ _Stack_Ensure_minimum( Configuration.idle_task_stack_size ), ffc09fb8: 3d 60 00 00 lis r11,0 * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( ffc09fbc: 80 89 27 98 lwz r4,10136(r9) &_Thread_Internal_information, _Thread_Idle, NULL, /* allocate the stack */ _Stack_Ensure_minimum( Configuration.idle_task_stack_size ), ffc09fc0: 80 0b 20 b8 lwz r0,8376(r11) * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( ffc09fc4: 3d 60 00 00 lis r11,0 <== ALWAYS TAKEN ffc09fc8: 80 cb 26 60 lwz r6,9824(r11) ffc09fcc: 3d 60 49 44 lis r11,18756 ffc09fd0: 61 6b 4c 45 ori r11,r11,19525 ffc09fd4: 7f 86 00 40 cmplw cr7,r6,r0 ffc09fd8: 91 61 00 18 stw r11,24(r1) ffc09fdc: 40 9c 00 08 bge- cr7,ffc09fe4 <_Thread_Create_idle+0x64> ffc09fe0: 7c 06 03 78 mr r6,r0 ffc09fe4: 3d 20 00 00 lis r9,0 ffc09fe8: 89 09 26 64 lbz r8,9828(r9) <== ALWAYS TAKEN ffc09fec: 38 00 00 00 li r0,0 ffc09ff0: 39 61 00 18 addi r11,r1,24 <== ALWAYS TAKEN ffc09ff4: 90 01 00 0c stw r0,12(r1) ffc09ff8: 7f e3 fb 78 mr r3,r31 ffc09ffc: 38 a0 00 00 li r5,0 <== ALWAYS TAKEN ffc0a000: 91 61 00 10 stw r11,16(r1) ffc0a004: 38 e0 00 00 li r7,0 ffc0a008: 39 20 00 01 li r9,1 ffc0a00c: 90 01 00 08 stw r0,8(r1) ffc0a010: 39 40 00 00 li r10,0 ffc0a014: 48 00 03 6d bl ffc0a380 <_Thread_Initialize> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0a018: 3d 20 00 00 lis r9,0 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; ffc0a01c: 3d 60 00 00 lis r11,0 ffc0a020: 80 0b 27 98 lwz r0,10136(r11) <== ALWAYS TAKEN _Thread_Start( ffc0a024: 3d 40 00 00 lis r10,0 ffc0a028: 81 69 27 2c lwz r11,10028(r9) ffc0a02c: 38 80 00 00 li r4,0 ffc0a030: 80 aa 20 b4 lwz r5,8372(r10) ffc0a034: 7c 03 03 78 mr r3,r0 ffc0a038: 39 6b ff ff addi r11,r11,-1 ffc0a03c: 91 69 27 2c stw r11,10028(r9) /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = ffc0a040: 3d 20 00 00 lis r9,0 _Thread_Executing = _Thread_Idle; _Thread_Start( ffc0a044: 38 c0 00 00 li r6,0 <== ALWAYS TAKEN /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = ffc0a048: 90 09 27 6c stw r0,10092(r9) _Thread_Executing = _Thread_Idle; _Thread_Start( ffc0a04c: 38 e0 00 00 li r7,0 <== ALWAYS TAKEN /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = ffc0a050: 3d 20 00 00 lis r9,0 ffc0a054: 90 09 27 48 stw r0,10056(r9) <== ALWAYS TAKEN _Thread_Executing = _Thread_Idle; _Thread_Start( ffc0a058: 48 00 0f a1 bl ffc0aff8 <_Thread_Start> <== ALWAYS TAKEN Configuration.idle_task, NULL, 0 ); } ffc0a05c: 80 01 00 2c lwz r0,44(r1) ffc0a060: 83 e1 00 24 lwz r31,36(r1) ffc0a064: 38 21 00 28 addi r1,r1,40 ffc0a068: 7c 08 03 a6 mtlr r0 ffc0a06c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a070 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0a070: 94 21 ff e8 stwu r1,-24(r1) ffc0a074: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0a078: 38 81 00 08 addi r4,r1,8 void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0a07c: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0a080: 48 00 02 4d bl ffc0a2cc <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc0a084: 80 01 00 08 lwz r0,8(r1) ffc0a088: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a08c: 40 9e 00 20 bne- cr7,ffc0a0ac <_Thread_Delay_ended+0x3c> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( ffc0a090: 3c 80 10 00 lis r4,4096 ffc0a094: 60 84 00 18 ori r4,r4,24 ffc0a098: 4b ff fd 31 bl ffc09dc8 <_Thread_Clear_state> <== ALWAYS TAKEN ffc0a09c: 3d 20 00 00 lis r9,0 ffc0a0a0: 81 69 27 2c lwz r11,10028(r9) <== ALWAYS TAKEN ffc0a0a4: 38 0b ff ff addi r0,r11,-1 ffc0a0a8: 90 09 27 2c stw r0,10028(r9) | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } ffc0a0ac: 80 01 00 1c lwz r0,28(r1) ffc0a0b0: 38 21 00 18 addi r1,r1,24 ffc0a0b4: 7c 08 03 a6 mtlr r0 ffc0a0b8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a0bc <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0a0bc: 94 21 ff b0 stwu r1,-80(r1) ffc0a0c0: 7c 08 02 a6 mflr r0 ffc0a0c4: 93 41 00 38 stw r26,56(r1) Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; ffc0a0c8: 3f 40 00 00 lis r26,0 * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0a0cc: 93 e1 00 4c stw r31,76(r1) ffc0a0d0: 90 01 00 54 stw r0,84(r1) ffc0a0d4: 92 61 00 1c stw r19,28(r1) ffc0a0d8: 92 81 00 20 stw r20,32(r1) ffc0a0dc: 92 a1 00 24 stw r21,36(r1) ffc0a0e0: 92 c1 00 28 stw r22,40(r1) ffc0a0e4: 92 e1 00 2c stw r23,44(r1) ffc0a0e8: 93 01 00 30 stw r24,48(r1) ffc0a0ec: 93 21 00 34 stw r25,52(r1) ffc0a0f0: 93 61 00 3c stw r27,60(r1) ffc0a0f4: 93 81 00 40 stw r28,64(r1) ffc0a0f8: 93 a1 00 44 stw r29,68(r1) ffc0a0fc: 93 c1 00 48 stw r30,72(r1) Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; ffc0a100: 83 fa 27 6c lwz r31,10092(r26) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a104: 7c 00 00 a6 mfmsr r0 ffc0a108: 7d 30 42 a6 mfsprg r9,0 ffc0a10c: 7c 09 48 78 andc r9,r0,r9 ffc0a110: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { ffc0a114: 3f 20 00 00 lis r25,0 heir = _Thread_Heir; ffc0a118: 3e 60 00 00 lis r19,0 _Thread_Dispatch_disable_level = 1; ffc0a11c: 3e 80 00 00 lis r20,0 #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0a120: 3e a0 00 00 lis r21,0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( ffc0a124: 3f 60 00 00 lis r27,0 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0a128: 3e c0 00 00 lis r22,0 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { ffc0a12c: 3b 39 27 7c addi r25,r25,10108 heir = _Thread_Heir; ffc0a130: 3a 73 27 48 addi r19,r19,10056 _Thread_Dispatch_disable_level = 1; ffc0a134: 3a 94 27 2c addi r20,r20,10028 _Context_Switch_necessary = false; _Thread_Executing = heir; ffc0a138: 3b 5a 27 6c addi r26,r26,10092 #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0a13c: 3a b5 27 24 addi r21,r21,10020 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( ffc0a140: 3b 7b 27 74 addi r27,r27,10100 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0a144: 3a d6 27 44 addi r22,r22,10052 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; ffc0a148: 3a e0 00 01 li r23,1 _Context_Switch_necessary = false; ffc0a14c: 3b 00 00 00 li r24,0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc0a150: 3b 81 00 08 addi r28,r1,8 _Timestamp_Subtract( ffc0a154: 3b a1 00 10 addi r29,r1,16 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { ffc0a158: 48 00 00 d0 b ffc0a228 <_Thread_Dispatch+0x16c> <== ALWAYS TAKEN heir = _Thread_Heir; ffc0a15c: 83 d3 00 00 lwz r30,0(r19) _Thread_Dispatch_disable_level = 1; ffc0a160: 92 f4 00 00 stw r23,0(r20) _Thread_Executing = heir; #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) ffc0a164: 81 3e 00 7c lwz r9,124(r30) executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; ffc0a168: 9b 19 00 00 stb r24,0(r25) _Thread_Executing = heir; #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) ffc0a16c: 2f 89 00 01 cmpwi cr7,r9,1 _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; _Thread_Executing = heir; ffc0a170: 93 da 00 00 stw r30,0(r26) #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) ffc0a174: 40 be 00 0c bne+ cr7,ffc0a180 <_Thread_Dispatch+0xc4> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0a178: 81 35 00 00 lwz r9,0(r21) ffc0a17c: 91 3e 00 78 stw r9,120(r30) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a180: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc0a184: 7f 83 e3 78 mr r3,r28 ffc0a188: 48 00 3a 59 bl ffc0dbe0 <_TOD_Get_uptime> <== ALWAYS TAKEN _Timestamp_Subtract( ffc0a18c: 7f 63 db 78 mr r3,r27 ffc0a190: 7f 84 e3 78 mr r4,r28 <== ALWAYS TAKEN ffc0a194: 7f a5 eb 78 mr r5,r29 ffc0a198: 48 00 11 55 bl ffc0b2ec <_Timespec_Subtract> <== ALWAYS TAKEN &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); ffc0a19c: 7f a4 eb 78 mr r4,r29 ffc0a1a0: 38 7f 00 84 addi r3,r31,132 ffc0a1a4: 48 00 10 e5 bl ffc0b288 <_Timespec_Add_to> <== ALWAYS TAKEN #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0a1a8: 81 36 00 00 lwz r9,0(r22) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0a1ac: 81 61 00 08 lwz r11,8(r1) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); ffc0a1b0: 7f e3 fb 78 mr r3,r31 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0a1b4: 2f 89 00 00 cmpwi cr7,r9,0 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0a1b8: 81 81 00 0c lwz r12,12(r1) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); ffc0a1bc: 7f c4 f3 78 mr r4,r30 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0a1c0: 91 7b 00 00 stw r11,0(r27) ffc0a1c4: 91 9b 00 04 stw r12,4(r27) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0a1c8: 41 9e 00 14 beq- cr7,ffc0a1dc <_Thread_Dispatch+0x120> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; ffc0a1cc: 80 09 00 00 lwz r0,0(r9) ffc0a1d0: 90 1f 01 3c stw r0,316(r31) *_Thread_libc_reent = heir->libc_reent; ffc0a1d4: 80 1e 01 3c lwz r0,316(r30) ffc0a1d8: 90 09 00 00 stw r0,0(r9) } _User_extensions_Thread_switch( executing, heir ); ffc0a1dc: 48 00 15 5d bl ffc0b738 <_User_extensions_Thread_switch> <== ALWAYS TAKEN * operations. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE ) if ( executing->fp_context != NULL ) ffc0a1e0: 80 1f 01 38 lwz r0,312(r31) _Context_Save_fp( &executing->fp_context ); ffc0a1e4: 38 7f 01 38 addi r3,r31,312 * operations. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE ) if ( executing->fp_context != NULL ) ffc0a1e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a1ec: 41 9e 00 08 beq- cr7,ffc0a1f4 <_Thread_Dispatch+0x138> _Context_Save_fp( &executing->fp_context ); ffc0a1f0: 48 01 09 31 bl ffc1ab20 <_CPU_Context_save_fp> <== ALWAYS TAKEN #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); ffc0a1f4: 38 7f 00 d8 addi r3,r31,216 ffc0a1f8: 38 9e 00 d8 addi r4,r30,216 ffc0a1fc: 48 01 0a a5 bl ffc1aca0 <_CPU_Context_switch> <== ALWAYS TAKEN _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); _Thread_Allocated_fp = executing; } #else if ( executing->fp_context != NULL ) ffc0a200: 80 1f 01 38 lwz r0,312(r31) _Context_Restore_fp( &executing->fp_context ); ffc0a204: 38 7f 01 38 addi r3,r31,312 _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); _Thread_Allocated_fp = executing; } #else if ( executing->fp_context != NULL ) ffc0a208: 2f 80 00 00 cmpwi cr7,r0,0 <== ALWAYS TAKEN ffc0a20c: 41 9e 00 08 beq- cr7,ffc0a214 <_Thread_Dispatch+0x158> _Context_Restore_fp( &executing->fp_context ); ffc0a210: 48 01 09 d1 bl ffc1abe0 <_CPU_Context_restore_fp> <== ALWAYS TAKEN #endif #endif executing = _Thread_Executing; ffc0a214: 83 fa 00 00 lwz r31,0(r26) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a218: 7c 00 00 a6 mfmsr r0 ffc0a21c: 7d 30 42 a6 mfsprg r9,0 ffc0a220: 7c 09 48 78 andc r9,r0,r9 ffc0a224: 7d 20 01 24 mtmsr r9 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { ffc0a228: 89 39 00 00 lbz r9,0(r25) <== ALWAYS TAKEN ffc0a22c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a230: 40 9e ff 2c bne+ cr7,ffc0a15c <_Thread_Dispatch+0xa0> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; ffc0a234: 3d 60 00 00 lis r11,0 ffc0a238: 91 2b 27 2c stw r9,10028(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a23c: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); if ( _Thread_Do_post_task_switch_extension || ffc0a240: 3d 20 00 00 lis r9,0 ffc0a244: 80 09 27 5c lwz r0,10076(r9) ffc0a248: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a24c: 40 9e 00 10 bne- cr7,ffc0a25c <_Thread_Dispatch+0x1a0> <== NEVER TAKEN executing->do_post_task_switch_extension ) { ffc0a250: 88 1f 00 74 lbz r0,116(r31) ffc0a254: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a258: 41 9e 00 10 beq- cr7,ffc0a268 <_Thread_Dispatch+0x1ac> executing->do_post_task_switch_extension = false; ffc0a25c: 38 00 00 00 li r0,0 ffc0a260: 98 1f 00 74 stb r0,116(r31) _API_extensions_Run_postswitch(); ffc0a264: 4b ff e3 d1 bl ffc08634 <_API_extensions_Run_postswitch> <== ALWAYS TAKEN } } ffc0a268: 80 01 00 54 lwz r0,84(r1) ffc0a26c: 82 61 00 1c lwz r19,28(r1) ffc0a270: 7c 08 03 a6 mtlr r0 ffc0a274: 82 81 00 20 lwz r20,32(r1) ffc0a278: 82 a1 00 24 lwz r21,36(r1) ffc0a27c: 82 c1 00 28 lwz r22,40(r1) ffc0a280: 82 e1 00 2c lwz r23,44(r1) ffc0a284: 83 01 00 30 lwz r24,48(r1) <== ALWAYS TAKEN ffc0a288: 83 21 00 34 lwz r25,52(r1) ffc0a28c: 83 41 00 38 lwz r26,56(r1) ffc0a290: 83 61 00 3c lwz r27,60(r1) ffc0a294: 83 81 00 40 lwz r28,64(r1) <== ALWAYS TAKEN ffc0a298: 83 a1 00 44 lwz r29,68(r1) ffc0a29c: 83 c1 00 48 lwz r30,72(r1) <== ALWAYS TAKEN ffc0a2a0: 83 e1 00 4c lwz r31,76(r1) <== ALWAYS TAKEN ffc0a2a4: 38 21 00 50 addi r1,r1,80 ffc0a2a8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a2ac <_Thread_Enable_dispatch>: #if ( (defined(CPU_INLINE_ENABLE_DISPATCH) && \ (CPU_INLINE_ENABLE_DISPATCH == FALSE)) || \ (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) ffc0a2ac: 3d 20 00 00 lis r9,0 ffc0a2b0: 81 69 27 2c lwz r11,10028(r9) ffc0a2b4: 38 0b ff ff addi r0,r11,-1 ffc0a2b8: 90 09 27 2c stw r0,10028(r9) ffc0a2bc: 80 09 27 2c lwz r0,10028(r9) ffc0a2c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a2c4: 4c be 00 20 bnelr+ cr7 return; _Thread_Dispatch(); ffc0a2c8: 4b ff fd f4 b ffc0a0bc <_Thread_Dispatch> <== ALWAYS TAKEN ffc0fc54 <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; ffc0fc54: 3d 20 00 00 lis r9,0 ffc0fc58: 81 29 27 6c lwz r9,10092(r9) if ( !_States_Is_ready( executing->current_state ) || ffc0fc5c: 80 09 00 10 lwz r0,16(r9) ffc0fc60: 2f 80 00 00 cmpwi cr7,r0,0 ffc0fc64: 40 9e 00 20 bne- cr7,ffc0fc84 <_Thread_Evaluate_mode+0x30> <== NEVER TAKEN ffc0fc68: 3d 60 00 00 lis r11,0 ffc0fc6c: 80 0b 27 48 lwz r0,10056(r11) ffc0fc70: 7f 89 00 00 cmpw cr7,r9,r0 ffc0fc74: 41 9e 00 24 beq- cr7,ffc0fc98 <_Thread_Evaluate_mode+0x44> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { ffc0fc78: 88 09 00 75 lbz r0,117(r9) ffc0fc7c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0fc80: 41 9e 00 18 beq- cr7,ffc0fc98 <_Thread_Evaluate_mode+0x44> <== NEVER TAKEN _Context_Switch_necessary = true; ffc0fc84: 38 00 00 01 li r0,1 ffc0fc88: 3d 20 00 00 lis r9,0 ffc0fc8c: 98 09 27 7c stb r0,10108(r9) ffc0fc90: 38 60 00 01 li r3,1 return true; ffc0fc94: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0fc98: 38 60 00 00 li r3,0 } return false; } ffc0fc9c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a2cc <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { ffc0a2cc: 7c 08 02 a6 mflr r0 ffc0a2d0: 94 21 ff f8 stwu r1,-8(r1) <== ALWAYS TAKEN ffc0a2d4: 7c 85 23 78 mr r5,r4 ffc0a2d8: 90 01 00 0c stw r0,12(r1) uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { ffc0a2dc: 7c 60 1b 79 mr. r0,r3 ffc0a2e0: 40 a2 00 24 bne+ ffc0a304 <_Thread_Get+0x38> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0a2e4: 3d 20 00 00 lis r9,0 ffc0a2e8: 81 69 27 2c lwz r11,10028(r9) ffc0a2ec: 39 6b 00 01 addi r11,r11,1 ffc0a2f0: 91 69 27 2c stw r11,10028(r9) <== ALWAYS TAKEN _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; ffc0a2f4: 3d 20 00 00 lis r9,0 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; ffc0a2f8: 90 04 00 00 stw r0,0(r4) tp = _Thread_Executing; ffc0a2fc: 80 69 27 6c lwz r3,10092(r9) goto done; ffc0a300: 48 00 00 60 b ffc0a360 <_Thread_Get+0x94> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); ffc0a304: 54 0b 47 7e rlwinm r11,r0,8,29,31 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) ffc0a308: 39 2b ff ff addi r9,r11,-1 ffc0a30c: 2b 89 00 03 cmplwi cr7,r9,3 ffc0a310: 40 9d 00 60 ble- cr7,ffc0a370 <_Thread_Get+0xa4> goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; ffc0a314: 38 00 00 01 li r0,1 ffc0a318: 90 05 00 00 stw r0,0(r5) ffc0a31c: 48 00 00 20 b ffc0a33c <_Thread_Get+0x70> <== ALWAYS TAKEN goto done; } api_information = _Objects_Information_table[ the_api ]; ffc0a320: 3d 40 00 00 lis r10,0 ffc0a324: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc0a328: 39 4a 2b 80 addi r10,r10,11136 ffc0a32c: 7d 6a 58 2e lwzx r11,r10,r11 if ( !api_information ) { ffc0a330: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0a334: 40 be 00 10 bne+ cr7,ffc0a344 <_Thread_Get+0x78> *location = OBJECTS_ERROR; ffc0a338: 91 25 00 00 stw r9,0(r5) ffc0a33c: 38 60 00 00 li r3,0 goto done; ffc0a340: 48 00 00 20 b ffc0a360 <_Thread_Get+0x94> <== ALWAYS TAKEN } information = api_information[ the_class ]; ffc0a344: 80 6b 00 04 lwz r3,4(r11) if ( !information ) { ffc0a348: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a34c: 40 be 00 0c bne+ cr7,ffc0a358 <_Thread_Get+0x8c> *location = OBJECTS_ERROR; ffc0a350: 91 25 00 00 stw r9,0(r5) goto done; ffc0a354: 48 00 00 0c b ffc0a360 <_Thread_Get+0x94> <== ALWAYS TAKEN } tp = (Thread_Control *) _Objects_Get( information, id, location ); ffc0a358: 7c 04 03 78 mr r4,r0 ffc0a35c: 4b ff f4 85 bl ffc097e0 <_Objects_Get> <== ALWAYS TAKEN done: return tp; } ffc0a360: 80 01 00 0c lwz r0,12(r1) ffc0a364: 38 21 00 08 addi r1,r1,8 <== ALWAYS TAKEN ffc0a368: 7c 08 03 a6 mtlr r0 ffc0a36c: 4e 80 00 20 blr <== ALWAYS TAKEN *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ ffc0a370: 54 09 2e fe rlwinm r9,r0,5,27,31 ffc0a374: 2f 89 00 01 cmpwi cr7,r9,1 ffc0a378: 41 9e ff a8 beq+ cr7,ffc0a320 <_Thread_Get+0x54> ffc0a37c: 4b ff ff 98 b ffc0a314 <_Thread_Get+0x48> <== ALWAYS TAKEN ffc0fca0 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc0fca0: 94 21 ff f0 stwu r1,-16(r1) <== ALWAYS TAKEN ffc0fca4: 7c 08 02 a6 mflr r0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc0fca8: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc0fcac: 90 01 00 14 stw r0,20(r1) ffc0fcb0: 93 e1 00 0c stw r31,12(r1) #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc0fcb4: 83 e9 27 6c lwz r31,10092(r9) * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc0fcb8: 93 c1 00 08 stw r30,8(r1) /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; ffc0fcbc: 81 3f 00 c0 lwz r9,192(r31) } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc0fcc0: 38 00 00 00 li r0,0 ffc0fcc4: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc0fcc8: 71 2b 00 01 andi. r11,r9,1 ffc0fccc: 40 82 00 10 bne- ffc0fcdc <_Thread_Handler+0x3c> static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc0fcd0: 7d 30 42 a6 mfsprg r9,0 msr |= ppc_interrupt_get_disable_mask(); ffc0fcd4: 7d 20 03 78 or r0,r9,r0 ffc0fcd8: 48 00 00 0c b ffc0fce4 <_Thread_Handler+0x44> <== ALWAYS TAKEN ffc0fcdc: 7d 30 42 a6 mfsprg r9,0 } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc0fce0: 7c 00 48 78 andc r0,r0,r9 } _CPU_MSR_SET(msr); ffc0fce4: 7c 00 01 24 mtmsr r0 _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; ffc0fce8: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN ffc0fcec: 8b c9 28 fc lbz r30,10492(r9) <== ALWAYS TAKEN doneConstructors = 1; ffc0fcf0: 38 00 00 01 li r0,1 /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); ffc0fcf4: 7f e3 fb 78 mr r3,r31 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; ffc0fcf8: 98 09 28 fc stb r0,10492(r9) /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); ffc0fcfc: 4b ff b7 35 bl ffc0b430 <_User_extensions_Thread_begin> <== ALWAYS TAKEN /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc0fd00: 4b ff a5 ad bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { ffc0fd04: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0fd08: 40 be 00 08 bne+ cr7,ffc0fd10 <_Thread_Handler+0x70> INIT_NAME (); ffc0fd0c: 48 00 be 71 bl ffc1bb7c <_init> <== ALWAYS TAKEN } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc0fd10: 80 1f 00 a8 lwz r0,168(r31) ffc0fd14: 2f 80 00 00 cmpwi cr7,r0,0 ffc0fd18: 40 be 00 18 bne+ cr7,ffc0fd30 <_Thread_Handler+0x90> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( ffc0fd1c: 80 1f 00 a4 lwz r0,164(r31) ffc0fd20: 80 7f 00 b0 lwz r3,176(r31) ffc0fd24: 7c 09 03 a6 mtctr r0 ffc0fd28: 4e 80 04 21 bctrl <== ALWAYS TAKEN INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = ffc0fd2c: 90 7f 00 28 stw r3,40(r31) * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); ffc0fd30: 7f e3 fb 78 mr r3,r31 ffc0fd34: 4b ff b7 6d bl ffc0b4a0 <_User_extensions_Thread_exitted> <== ALWAYS TAKEN _Internal_error_Occurred( ffc0fd38: 38 60 00 00 li r3,0 ffc0fd3c: 38 80 00 01 li r4,1 ffc0fd40: 38 a0 00 06 li r5,6 ffc0fd44: 4b ff 94 91 bl ffc091d4 <_Internal_error_Occurred> <== ALWAYS TAKEN ffc0a5b4 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { ffc0a5b4: 94 21 ff f0 stwu r1,-16(r1) <== ALWAYS TAKEN ffc0a5b8: 7c 08 02 a6 mflr r0 uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; ffc0a5bc: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { ffc0a5c0: 90 01 00 14 stw r0,20(r1) uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; ffc0a5c4: 39 29 20 a0 addi r9,r9,8352 <== ALWAYS TAKEN #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) ffc0a5c8: 81 69 00 20 lwz r11,32(r9) ffc0a5cc: 80 09 00 24 lwz r0,36(r9) <== ALWAYS TAKEN ffc0a5d0: 7d 6b 00 34 cntlzw r11,r11 * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { ffc0a5d4: 93 e1 00 0c stw r31,12(r1) #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) ffc0a5d8: 7c 00 00 34 cntlzw r0,r0 ffc0a5dc: 55 6b d9 7e rlwinm r11,r11,27,5,31 #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; maximum_extensions = Configuration.maximum_extensions; ffc0a5e0: 81 49 00 08 lwz r10,8(r9) #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) ffc0a5e4: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc0a5e8: 7c 00 5a 79 xor. r0,r0,r11 uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; ffc0a5ec: 81 69 00 10 lwz r11,16(r9) #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) ffc0a5f0: 41 a2 00 14 beq+ ffc0a604 <_Thread_Handler_initialization+0x50> == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( ffc0a5f4: 38 60 00 00 li r3,0 ffc0a5f8: 38 80 00 01 li r4,1 ffc0a5fc: 38 a0 00 0f li r5,15 ffc0a600: 4b ff eb d5 bl ffc091d4 <_Internal_error_Occurred> <== ALWAYS TAKEN INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; ffc0a604: 3d 20 00 00 lis r9,0 ffc0a608: 98 09 27 7c stb r0,10108(r9) _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( ffc0a60c: 3f e0 00 00 lis r31,0 _Thread_Heir = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; ffc0a610: 3d 20 00 00 lis r9,0 ffc0a614: 90 09 27 5c stw r0,10076(r9) _Thread_Maximum_extensions = maximum_extensions; ffc0a618: 3d 20 00 00 lis r9,0 _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( ffc0a61c: 88 7f 26 64 lbz r3,9828(r31) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; ffc0a620: 91 49 27 58 stw r10,10072(r9) _Thread_Ticks_per_timeslice = ticks_per_timeslice; ffc0a624: 3d 20 00 00 lis r9,0 _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( ffc0a628: 38 63 00 01 addi r3,r3,1 _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; ffc0a62c: 91 69 27 24 stw r11,10020(r9) true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; ffc0a630: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( ffc0a634: 1c 63 00 0c mulli r3,r3,12 true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; ffc0a638: 90 09 27 6c stw r0,10092(r9) _Thread_Heir = NULL; ffc0a63c: 3d 20 00 00 lis r9,0 ffc0a640: 90 09 27 48 stw r0,10056(r9) #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; ffc0a644: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN ffc0a648: 90 09 27 40 stw r0,10048(r9) _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( ffc0a64c: 48 00 14 3d bl ffc0ba88 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN ffc0a650: 3d 20 00 00 lis r9,0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) ffc0a654: 89 7f 26 64 lbz r11,9828(r31) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc0a658: 38 00 00 00 li r0,0 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( ffc0a65c: 90 69 27 20 stw r3,10016(r9) (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) ffc0a660: 39 20 00 00 li r9,0 ffc0a664: 39 29 00 01 addi r9,r9,1 ffc0a668: 90 03 00 04 stw r0,4(r3) ffc0a66c: 7f 89 58 40 cmplw cr7,r9,r11 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0a670: 39 43 00 04 addi r10,r3,4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0a674: 90 63 00 08 stw r3,8(r3) <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0a678: 91 43 00 00 stw r10,0(r3) ffc0a67c: 38 63 00 0c addi r3,r3,12 <== ALWAYS TAKEN ffc0a680: 40 9d ff e4 ble+ cr7,ffc0a664 <_Thread_Handler_initialization+0xb0> /* * Initialize this class of objects. */ _Objects_Initialize_information( ffc0a684: 3c 60 00 00 lis r3,0 ffc0a688: 38 63 2d 40 addi r3,r3,11584 ffc0a68c: 38 80 00 01 li r4,1 ffc0a690: 38 a0 00 01 li r5,1 ffc0a694: 38 c0 00 01 li r6,1 ffc0a698: 38 e0 01 54 li r7,340 <== ALWAYS TAKEN ffc0a69c: 39 00 00 00 li r8,0 ffc0a6a0: 39 20 00 08 li r9,8 ffc0a6a4: 4b ff f1 cd bl ffc09870 <_Objects_Initialize_information> <== ALWAYS TAKEN false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc0a6a8: 80 01 00 14 lwz r0,20(r1) ffc0a6ac: 83 e1 00 0c lwz r31,12(r1) ffc0a6b0: 38 21 00 10 addi r1,r1,16 ffc0a6b4: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0a6b8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a380 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0a380: 94 21 ff d0 stwu r1,-48(r1) ffc0a384: 7c 08 02 a6 mflr r0 ffc0a388: 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; ffc0a38c: 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 ) { ffc0a390: 93 41 00 18 stw r26,24(r1) ffc0a394: 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; ffc0a398: 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; ffc0a39c: 90 04 01 40 stw r0,320(r4) ffc0a3a0: 90 04 01 44 stw r0,324(r4) ffc0a3a4: 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 ) { ffc0a3a8: 81 21 00 40 lwz r9,64(r1) <== ALWAYS TAKEN ffc0a3ac: 93 a1 00 24 stw r29,36(r1) ffc0a3b0: 7c 7d 1b 78 mr r29,r3 <== ALWAYS TAKEN /* * 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 ); ffc0a3b4: 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 ) { ffc0a3b8: 93 e1 00 2c stw r31,44(r1) ffc0a3bc: 7c 9f 23 78 mr r31,r4 <== ALWAYS TAKEN /* * 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 ); ffc0a3c0: 7c c4 33 78 mr r4,r6 <== ALWAYS TAKEN Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0a3c4: 92 e1 00 0c stw r23,12(r1) ffc0a3c8: 7d 57 53 78 mr r23,r10 ffc0a3cc: 93 01 00 10 stw r24,16(r1) ffc0a3d0: 93 61 00 1c stw r27,28(r1) ffc0a3d4: 7d 1b 43 78 mr r27,r8 ffc0a3d8: 93 81 00 20 stw r28,32(r1) ffc0a3dc: 7c fc 3b 78 mr r28,r7 <== ALWAYS TAKEN ffc0a3e0: 93 c1 00 28 stw r30,40(r1) ffc0a3e4: 7c de 33 78 mr r30,r6 <== ALWAYS TAKEN ffc0a3e8: 93 21 00 14 stw r25,20(r1) <== ALWAYS TAKEN ffc0a3ec: 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 ); ffc0a3f0: 48 00 0a cd bl ffc0aebc <_Thread_Stack_Allocate> <== ALWAYS TAKEN if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0a3f4: 2c 03 00 00 cmpwi r3,0 ffc0a3f8: 41 82 01 84 beq- ffc0a57c <_Thread_Initialize+0x1fc> ffc0a3fc: 7f 83 f0 40 cmplw cr7,r3,r30 ffc0a400: 41 9c 01 7c blt- cr7,ffc0a57c <_Thread_Initialize+0x1fc> <== NEVER TAKEN /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0a404: 2f 9c 00 00 cmpwi cr7,r28,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0a408: 80 1f 00 d4 lwz r0,212(r31) the_stack->size = size; ffc0a40c: 90 7f 00 c8 stw r3,200(r31) ffc0a410: 3b 80 00 00 li r28,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0a414: 90 1f 00 cc stw r0,204(r31) ffc0a418: 41 be 00 1c beq+ cr7,ffc0a434 <_Thread_Initialize+0xb4> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); ffc0a41c: 38 60 01 08 li r3,264 ffc0a420: 48 00 16 b1 bl ffc0bad0 <_Workspace_Allocate> <== ALWAYS TAKEN if ( !fp_area ) ffc0a424: 7c 7c 1b 79 mr. r28,r3 ffc0a428: 40 a2 00 0c bne+ ffc0a434 <_Thread_Initialize+0xb4> ffc0a42c: 3b c0 00 00 li r30,0 ffc0a430: 48 00 00 f0 b ffc0a520 <_Thread_Initialize+0x1a0> <== ALWAYS TAKEN #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0a434: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN 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; ffc0a438: 93 9f 01 38 stw r28,312(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0a43c: 38 00 00 00 li r0,0 <== ALWAYS TAKEN #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0a440: 80 69 27 58 lwz r3,10072(r9) ffc0a444: 3b c0 00 00 li r30,0 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc0a448: 90 1f 00 6c stw r0,108(r31) <== ALWAYS TAKEN ffc0a44c: 2f 83 00 00 cmpwi cr7,r3,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; ffc0a450: 93 9f 00 d0 stw r28,208(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0a454: 90 1f 00 50 stw r0,80(r31) the_watchdog->routine = routine; ffc0a458: 90 1f 00 64 stw r0,100(r31) the_watchdog->id = id; ffc0a45c: 90 1f 00 68 stw r0,104(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0a460: 41 be 00 18 beq+ cr7,ffc0a478 <_Thread_Initialize+0xf8> extensions_area = _Workspace_Allocate( ffc0a464: 38 63 00 01 addi r3,r3,1 ffc0a468: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0a46c: 48 00 16 65 bl ffc0bad0 <_Workspace_Allocate> <== ALWAYS TAKEN (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) ffc0a470: 7c 7e 1b 79 mr. r30,r3 ffc0a474: 41 82 00 ac beq- ffc0a520 <_Thread_Initialize+0x1a0> * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { ffc0a478: 2f 9e 00 00 cmpwi cr7,r30,0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0a47c: 93 df 01 4c stw r30,332(r31) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { ffc0a480: 41 9e 00 30 beq- cr7,ffc0a4b0 <_Thread_Initialize+0x130> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0a484: 3d 20 00 00 lis r9,0 ffc0a488: 81 69 27 58 lwz r11,10072(r9) the_thread->extensions[i] = NULL; ffc0a48c: 38 00 00 00 li r0,0 * 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++ ) ffc0a490: 39 20 00 00 li r9,0 ffc0a494: 48 00 00 0c b ffc0a4a0 <_Thread_Initialize+0x120> <== ALWAYS TAKEN the_thread->extensions[i] = NULL; ffc0a498: 81 1f 01 4c lwz r8,332(r31) ffc0a49c: 7c 08 51 2e stwx r0,r8,r10 * 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++ ) ffc0a4a0: 7f 89 58 40 cmplw cr7,r9,r11 the_thread->extensions[i] = NULL; ffc0a4a4: 55 2a 10 3a rlwinm r10,r9,2,0,29 * 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++ ) ffc0a4a8: 39 29 00 01 addi r9,r9,1 ffc0a4ac: 40 9d ff ec ble+ cr7,ffc0a498 <_Thread_Initialize+0x118> * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0a4b0: 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; ffc0a4b4: 3b 20 00 00 li r25,0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; ffc0a4b8: 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 ); ffc0a4bc: 7f 64 db 78 mr r4,r27 <== ALWAYS TAKEN ffc0a4c0: 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; ffc0a4c4: 90 1f 00 bc stw r0,188(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0a4c8: 80 01 00 3c lwz r0,60(r1) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; ffc0a4cc: 92 ff 00 b8 stw r23,184(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0a4d0: 90 1f 00 c0 stw r0,192(r31) the_thread->current_state = STATES_DORMANT; ffc0a4d4: 38 00 00 01 li r0,1 ffc0a4d8: 90 1f 00 10 stw r0,16(r31) the_thread->Wait.queue = NULL; ffc0a4dc: 93 3f 00 44 stw r25,68(r31) <== ALWAYS TAKEN the_thread->resource_count = 0; ffc0a4e0: 93 3f 00 1c stw r25,28(r31) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; ffc0a4e4: 93 7f 00 18 stw r27,24(r31) the_thread->Start.initial_priority = priority; ffc0a4e8: 93 7f 00 c4 stw r27,196(r31) _Thread_Set_priority( the_thread, priority ); ffc0a4ec: 48 00 07 c9 bl ffc0acb4 <_Thread_Set_priority> <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0a4f0: a0 1f 00 0a lhz r0,10(r31) ffc0a4f4: 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 ); ffc0a4f8: 7f e3 fb 78 mr r3,r31 ffc0a4fc: 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 ); ffc0a500: 93 3f 00 88 stw r25,136(r31) ffc0a504: 7f e9 01 2e stwx r31,r9,r0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0a508: 93 1f 00 0c stw r24,12(r31) ffc0a50c: 93 3f 00 84 stw r25,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 ); ffc0a510: 48 00 10 91 bl ffc0b5a0 <_User_extensions_Thread_create> <== ALWAYS TAKEN if ( extension_status ) ffc0a514: 2f 83 00 00 cmpwi cr7,r3,0 <== ALWAYS TAKEN ffc0a518: 38 60 00 01 li r3,1 ffc0a51c: 40 9e 00 64 bne- cr7,ffc0a580 <_Thread_Initialize+0x200> return true; failed: if ( the_thread->libc_reent ) ffc0a520: 80 7f 01 3c lwz r3,316(r31) ffc0a524: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a528: 41 9e 00 08 beq- cr7,ffc0a530 <_Thread_Initialize+0x1b0> _Workspace_Free( the_thread->libc_reent ); ffc0a52c: 48 00 15 d9 bl ffc0bb04 <_Workspace_Free> <== ALWAYS TAKEN ffc0a530: 3b a0 00 00 li r29,0 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) ffc0a534: 7d 3f ea 14 add r9,r31,r29 ffc0a538: 80 69 01 40 lwz r3,320(r9) ffc0a53c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a540: 41 9e 00 08 beq- cr7,ffc0a548 <_Thread_Initialize+0x1c8> _Workspace_Free( the_thread->API_Extensions[i] ); ffc0a544: 48 00 15 c1 bl ffc0bb04 <_Workspace_Free> <== ALWAYS TAKEN failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) ffc0a548: 2f 9d 00 08 cmpwi cr7,r29,8 ffc0a54c: 3b bd 00 04 addi r29,r29,4 ffc0a550: 40 9e ff e4 bne+ cr7,ffc0a534 <_Thread_Initialize+0x1b4> if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); if ( extensions_area ) ffc0a554: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0a558: 41 9e 00 0c beq- cr7,ffc0a564 <_Thread_Initialize+0x1e4> (void) _Workspace_Free( extensions_area ); ffc0a55c: 7f c3 f3 78 mr r3,r30 ffc0a560: 48 00 15 a5 bl ffc0bb04 <_Workspace_Free> <== ALWAYS TAKEN #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) ffc0a564: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0a568: 41 9e 00 0c beq- cr7,ffc0a574 <_Thread_Initialize+0x1f4> (void) _Workspace_Free( fp_area ); ffc0a56c: 7f 83 e3 78 mr r3,r28 ffc0a570: 48 00 15 95 bl ffc0bb04 <_Workspace_Free> <== ALWAYS TAKEN #endif _Thread_Stack_Free( the_thread ); ffc0a574: 7f e3 fb 78 mr r3,r31 ffc0a578: 48 00 09 d1 bl ffc0af48 <_Thread_Stack_Free> <== ALWAYS TAKEN return false; ffc0a57c: 38 60 00 00 li r3,0 } ffc0a580: 80 01 00 34 lwz r0,52(r1) ffc0a584: 82 e1 00 0c lwz r23,12(r1) <== ALWAYS TAKEN ffc0a588: 7c 08 03 a6 mtlr r0 ffc0a58c: 83 01 00 10 lwz r24,16(r1) ffc0a590: 83 21 00 14 lwz r25,20(r1) ffc0a594: 83 41 00 18 lwz r26,24(r1) ffc0a598: 83 61 00 1c lwz r27,28(r1) ffc0a59c: 83 81 00 20 lwz r28,32(r1) ffc0a5a0: 83 a1 00 24 lwz r29,36(r1) ffc0a5a4: 83 c1 00 28 lwz r30,40(r1) ffc0a5a8: 83 e1 00 2c lwz r31,44(r1) ffc0a5ac: 38 21 00 30 addi r1,r1,48 ffc0a5b0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e050 <_Thread_Load_environment>: */ void _Thread_Load_environment( Thread_Control *the_thread ) { ffc0e050: 94 21 ff f0 stwu r1,-16(r1) ffc0e054: 7c 08 02 a6 mflr r0 bool is_fp; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( the_thread->Start.fp_context ) { ffc0e058: 39 00 00 00 li r8,0 */ void _Thread_Load_environment( Thread_Control *the_thread ) { ffc0e05c: 90 01 00 14 stw r0,20(r1) ffc0e060: 93 e1 00 0c stw r31,12(r1) ffc0e064: 7c 7f 1b 78 mr r31,r3 <== ALWAYS TAKEN bool is_fp; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( the_thread->Start.fp_context ) { ffc0e068: 80 63 00 d0 lwz r3,208(r3) ffc0e06c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e070: 41 9e 00 18 beq- cr7,ffc0e088 <_Thread_Load_environment+0x38> the_thread->fp_context = the_thread->Start.fp_context; ffc0e074: 90 7f 01 38 stw r3,312(r31) _Context_Initialize_fp( &the_thread->fp_context ); ffc0e078: 38 80 00 00 li r4,0 ffc0e07c: 38 a0 01 08 li r5,264 ffc0e080: 48 00 30 2d bl ffc110ac <== ALWAYS TAKEN ffc0e084: 39 00 00 01 li r8,1 the_thread->do_post_task_switch_extension = false; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; ffc0e088: 80 1f 00 bc lwz r0,188(r31) } else #endif is_fp = false; the_thread->do_post_task_switch_extension = false; ffc0e08c: 39 40 00 00 li r10,0 <== ALWAYS TAKEN the_thread->is_preemptible = the_thread->Start.is_preemptible; ffc0e090: 89 7f 00 b4 lbz r11,180(r31) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; _Context_Initialize( ffc0e094: 3c e0 ff c1 lis r7,-63 <== ALWAYS TAKEN is_fp = false; the_thread->do_post_task_switch_extension = false; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; ffc0e098: 81 3f 00 b8 lwz r9,184(r31) the_thread->budget_callout = the_thread->Start.budget_callout; _Context_Initialize( ffc0e09c: 38 7f 00 d8 addi r3,r31,216 the_thread->do_post_task_switch_extension = false; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; ffc0e0a0: 90 1f 00 80 stw r0,128(r31) _Context_Initialize( ffc0e0a4: 38 e7 fc a0 addi r7,r7,-864 } else #endif is_fp = false; the_thread->do_post_task_switch_extension = false; ffc0e0a8: 99 5f 00 74 stb r10,116(r31) the_thread->is_preemptible = the_thread->Start.is_preemptible; ffc0e0ac: 99 7f 00 75 stb r11,117(r31) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; ffc0e0b0: 91 3f 00 7c stw r9,124(r31) the_thread->budget_callout = the_thread->Start.budget_callout; _Context_Initialize( ffc0e0b4: 80 df 00 c0 lwz r6,192(r31) ffc0e0b8: 80 9f 00 cc lwz r4,204(r31) ffc0e0bc: 80 bf 00 c8 lwz r5,200(r31) ffc0e0c0: 48 00 c9 c5 bl ffc1aa84 <_CPU_Context_Initialize> <== ALWAYS TAKEN the_thread->Start.isr_level, _Thread_Handler, is_fp ); } ffc0e0c4: 80 01 00 14 lwz r0,20(r1) ffc0e0c8: 83 e1 00 0c lwz r31,12(r1) ffc0e0cc: 38 21 00 10 addi r1,r1,16 ffc0e0d0: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0e0d4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e378 <_Thread_Ready>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0e378: 7d 40 00 a6 mfmsr r10 ffc0e37c: 7c 10 42 a6 mfsprg r0,0 ffc0e380: 7d 40 00 78 andc r0,r10,r0 ffc0e384: 7c 00 01 24 mtmsr r0 ISR_Level level; Thread_Control *heir; _ISR_Disable( level ); the_thread->current_state = STATES_READY; ffc0e388: 38 00 00 00 li r0,0 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0e38c: 81 03 00 90 lwz r8,144(r3) ffc0e390: 90 03 00 10 stw r0,16(r3) _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0e394: 3d 20 00 00 lis r9,0 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0e398: 80 e8 00 00 lwz r7,0(r8) <== ALWAYS TAKEN ffc0e39c: 80 03 00 98 lwz r0,152(r3) _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); ffc0e3a0: 81 63 00 8c lwz r11,140(r3) <== ALWAYS TAKEN ffc0e3a4: 7c e0 03 78 or r0,r7,r0 ffc0e3a8: 90 08 00 00 stw r0,0(r8) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0e3ac: 38 eb 00 04 addi r7,r11,4 <== ALWAYS TAKEN _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0e3b0: 81 09 27 60 lwz r8,10080(r9) ffc0e3b4: 80 03 00 94 lwz r0,148(r3) ffc0e3b8: 90 e3 00 00 stw r7,0(r3) ffc0e3bc: 7d 00 03 78 or r0,r8,r0 <== ALWAYS TAKEN old_last_node = the_chain->last; ffc0e3c0: 81 0b 00 08 lwz r8,8(r11) ffc0e3c4: 90 09 27 60 stw r0,10080(r9) the_chain->last = the_node; ffc0e3c8: 90 6b 00 08 stw r3,8(r11) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0e3cc: 91 03 00 04 stw r8,4(r3) 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; ffc0e3d0: 90 68 00 00 stw r3,0(r8) <== ALWAYS TAKEN static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0e3d4: 7c 00 00 a6 mfmsr r0 <== ALWAYS TAKEN ffc0e3d8: 7d 40 01 24 mtmsr r10 ffc0e3dc: 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; ffc0e3e0: 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 ); ffc0e3e4: 81 69 27 60 lwz r11,10080(r9) ffc0e3e8: 80 a8 27 20 lwz r5,10016(r8) ffc0e3ec: 7d 66 00 34 cntlzw r6,r11 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0e3f0: 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 ); ffc0e3f4: 91 69 27 60 stw r11,10080(r9) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0e3f8: 38 e7 2d 00 addi r7,r7,11520 ffc0e3fc: 54 c8 10 3a rlwinm r8,r6,2,0,29 ffc0e400: 7c 07 40 2e lwzx r0,r7,r8 ffc0e404: 7c 09 00 34 cntlzw r9,r0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0e408: 54 c6 20 36 rlwinm r6,r6,4,0,27 ffc0e40c: 7c 07 41 2e stwx r0,r7,r8 ffc0e410: 7c c6 4a 14 add r6,r6,r9 ffc0e414: 1c c6 00 0c mulli r6,r6,12 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0e418: 3d 20 00 00 lis r9,0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0e41c: 7c 05 30 2e lwzx r0,r5,r6 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0e420: 81 29 27 6c lwz r9,10092(r9) * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0e424: 3d 60 00 00 lis r11,0 ffc0e428: 90 0b 27 48 stw r0,10056(r11) _Thread_Calculate_heir(); heir = _Thread_Heir; if ( !_Thread_Is_executing( heir ) && _Thread_Executing->is_preemptible ) ffc0e42c: 7f 80 48 00 cmpw cr7,r0,r9 ffc0e430: 41 9e 00 1c beq- cr7,ffc0e44c <_Thread_Ready+0xd4> ffc0e434: 88 09 00 75 lbz r0,117(r9) <== ALWAYS TAKEN ffc0e438: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e43c: 41 9e 00 10 beq- cr7,ffc0e44c <_Thread_Ready+0xd4> _Context_Switch_necessary = true; ffc0e440: 38 00 00 01 li r0,1 <== ALWAYS TAKEN ffc0e444: 3d 20 00 00 lis r9,0 ffc0e448: 98 09 27 7c stb r0,10108(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0e44c: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); } ffc0e450: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f658 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0f658: 94 21 ff f0 stwu r1,-16(r1) ffc0f65c: 7c 08 02 a6 mflr r0 the_thread->resource_count = 0; ffc0f660: 39 40 00 00 li r10,0 void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0f664: 90 01 00 14 stw r0,20(r1) the_thread->resource_count = 0; #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; ffc0f668: 89 63 00 b4 lbz r11,180(r3) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; ffc0f66c: 81 23 00 b8 lwz r9,184(r3) the_thread->budget_callout = the_thread->Start.budget_callout; ffc0f670: 80 03 00 bc lwz r0,188(r3) Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; ffc0f674: 91 43 00 1c stw r10,28(r3) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; ffc0f678: 99 63 00 75 stb r11,117(r3) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; ffc0f67c: 91 23 00 7c stw r9,124(r3) the_thread->budget_callout = the_thread->Start.budget_callout; ffc0f680: 90 03 00 80 stw r0,128(r3) the_thread->Start.pointer_argument = pointer_argument; ffc0f684: 90 83 00 ac stw r4,172(r3) the_thread->Start.numeric_argument = numeric_argument; ffc0f688: 90 a3 00 b0 stw r5,176(r3) void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0f68c: 93 e1 00 0c stw r31,12(r1) ffc0f690: 7c 7f 1b 78 mr r31,r3 the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { ffc0f694: 4b ff c4 75 bl ffc0bb08 <_Thread_queue_Extract_with_proxy> <== ALWAYS TAKEN ffc0f698: 2f 83 00 00 cmpwi cr7,r3,0 ffc0f69c: 40 9e 00 18 bne- cr7,ffc0f6b4 <_Thread_Reset+0x5c> if ( _Watchdog_Is_active( &the_thread->Timer ) ) ffc0f6a0: 80 1f 00 50 lwz r0,80(r31) ffc0f6a4: 2f 80 00 02 cmpwi cr7,r0,2 ffc0f6a8: 40 be 00 0c bne+ cr7,ffc0f6b4 <_Thread_Reset+0x5c> (void) _Watchdog_Remove( &the_thread->Timer ); ffc0f6ac: 38 7f 00 48 addi r3,r31,72 ffc0f6b0: 4b ff d3 95 bl ffc0ca44 <_Watchdog_Remove> <== ALWAYS TAKEN } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { ffc0f6b4: 80 9f 00 c4 lwz r4,196(r31) ffc0f6b8: 80 1f 00 14 lwz r0,20(r31) ffc0f6bc: 7f 80 20 00 cmpw cr7,r0,r4 ffc0f6c0: 41 9e 00 10 beq- cr7,ffc0f6d0 <_Thread_Reset+0x78> the_thread->real_priority = the_thread->Start.initial_priority; ffc0f6c4: 90 9f 00 18 stw r4,24(r31) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); ffc0f6c8: 7f e3 fb 78 mr r3,r31 ffc0f6cc: 4b ff c6 a1 bl ffc0bd6c <_Thread_Set_priority> <== ALWAYS TAKEN } } ffc0f6d0: 80 01 00 14 lwz r0,20(r1) ffc0f6d4: 83 e1 00 0c lwz r31,12(r1) ffc0f6d8: 38 21 00 10 addi r1,r1,16 ffc0f6dc: 7c 08 03 a6 mtlr r0 ffc0f6e0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e454 <_Thread_Reset_timeslice>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ffc0e454: 3d 20 00 00 lis r9,0 ffc0e458: 81 29 27 6c lwz r9,10092(r9) ready = executing->ready; ffc0e45c: 81 69 00 8c lwz r11,140(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0e460: 7c 00 00 a6 mfmsr r0 ffc0e464: 7d 50 42 a6 mfsprg r10,0 ffc0e468: 7c 0a 50 78 andc r10,r0,r10 ffc0e46c: 7d 40 01 24 mtmsr r10 _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { ffc0e470: 81 0b 00 00 lwz r8,0(r11) ffc0e474: 81 4b 00 08 lwz r10,8(r11) ffc0e478: 7f 88 50 00 cmpw cr7,r8,r10 ffc0e47c: 40 be 00 08 bne+ cr7,ffc0e484 <_Thread_Reset_timeslice+0x30> _ISR_Enable( level ); ffc0e480: 48 00 00 5c b ffc0e4dc <_Thread_Reset_timeslice+0x88> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0e484: 81 49 00 00 lwz r10,0(r9) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0e488: 38 eb 00 04 addi r7,r11,4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0e48c: 81 09 00 04 lwz r8,4(r9) next->previous = previous; previous->next = next; ffc0e490: 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; ffc0e494: 91 0a 00 04 stw r8,4(r10) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0e498: 90 e9 00 00 stw r7,0(r9) old_last_node = the_chain->last; ffc0e49c: 81 4b 00 08 lwz r10,8(r11) the_chain->last = the_node; ffc0e4a0: 91 2b 00 08 stw r9,8(r11) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0e4a4: 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; ffc0e4a8: 91 2a 00 00 stw r9,0(r10) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0e4ac: 7d 40 00 a6 mfmsr r10 ffc0e4b0: 7c 00 01 24 mtmsr r0 ffc0e4b4: 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 ) ) ffc0e4b8: 3d 40 00 00 lis r10,0 ffc0e4bc: 81 0a 27 48 lwz r8,10056(r10) ffc0e4c0: 7f 89 40 00 cmpw cr7,r9,r8 ffc0e4c4: 40 be 00 0c bne+ cr7,ffc0e4d0 <_Thread_Reset_timeslice+0x7c> <== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; ffc0e4c8: 81 2b 00 00 lwz r9,0(r11) ffc0e4cc: 91 2a 27 48 stw r9,10056(r10) _Context_Switch_necessary = true; ffc0e4d0: 39 60 00 01 li r11,1 ffc0e4d4: 3d 20 00 00 lis r9,0 ffc0e4d8: 99 69 27 7c stb r11,10108(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0e4dc: 7c 00 01 24 mtmsr r0 ffc0e4e0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0bcc0 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0bcc0: 94 21 ff e8 stwu r1,-24(r1) ffc0bcc4: 7c 08 02 a6 mflr r0 ffc0bcc8: 90 01 00 1c stw r0,28(r1) if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0bccc: 80 03 00 10 lwz r0,16(r3) bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0bcd0: 93 e1 00 14 stw r31,20(r1) ffc0bcd4: 7c 7f 1b 78 mr r31,r3 if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0bcd8: 70 09 00 01 andi. r9,r0,1 ffc0bcdc: 38 00 00 00 li r0,0 ffc0bce0: 40 a2 00 74 bne+ ffc0bd54 <_Thread_Restart+0x94> _Thread_Set_transient( the_thread ); ffc0bce4: 90 81 00 08 stw r4,8(r1) ffc0bce8: 90 a1 00 0c stw r5,12(r1) ffc0bcec: 48 00 01 f5 bl ffc0bee0 <_Thread_Set_transient> <== ALWAYS TAKEN _Thread_Reset( the_thread, pointer_argument, numeric_argument ); ffc0bcf0: 7f e3 fb 78 mr r3,r31 ffc0bcf4: 80 81 00 08 lwz r4,8(r1) <== ALWAYS TAKEN ffc0bcf8: 80 a1 00 0c lwz r5,12(r1) ffc0bcfc: 48 00 39 5d bl ffc0f658 <_Thread_Reset> <== ALWAYS TAKEN _Thread_Load_environment( the_thread ); ffc0bd00: 7f e3 fb 78 mr r3,r31 ffc0bd04: 48 00 35 51 bl ffc0f254 <_Thread_Load_environment> <== ALWAYS TAKEN _Thread_Ready( the_thread ); ffc0bd08: 7f e3 fb 78 mr r3,r31 ffc0bd0c: 48 00 38 71 bl ffc0f57c <_Thread_Ready> <== ALWAYS TAKEN _User_extensions_Thread_restart( the_thread ); ffc0bd10: 7f e3 fb 78 mr r3,r31 ffc0bd14: 48 00 0a 59 bl ffc0c76c <_User_extensions_Thread_restart> <== ALWAYS TAKEN if ( _Thread_Is_executing ( the_thread ) ) ffc0bd18: 3d 20 00 00 lis r9,0 ffc0bd1c: 81 29 27 98 lwz r9,10136(r9) ffc0bd20: 38 00 00 01 li r0,1 ffc0bd24: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0bd28: 40 be 00 2c bne+ cr7,ffc0bd54 <_Thread_Restart+0x94> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) ffc0bd2c: 80 1f 01 38 lwz r0,312(r31) ffc0bd30: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bd34: 41 9e 00 0c beq- cr7,ffc0bd40 <_Thread_Restart+0x80> <== NEVER TAKEN _Context_Restore_fp( &_Thread_Executing->fp_context ); ffc0bd38: 38 7f 01 38 addi r3,r31,312 ffc0bd3c: 48 01 2d 45 bl ffc1ea80 <_CPU_Context_restore_fp> <== ALWAYS TAKEN #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); ffc0bd40: 3d 20 00 00 lis r9,0 ffc0bd44: 80 69 27 98 lwz r3,10136(r9) ffc0bd48: 38 63 00 d8 addi r3,r3,216 ffc0bd4c: 48 01 2e f5 bl ffc1ec40 <_CPU_Context_restore> <== ALWAYS TAKEN ffc0bd50: 38 00 00 01 li r0,1 <== NOT EXECUTED return true; } return false; } ffc0bd54: 7c 03 03 78 mr r3,r0 ffc0bd58: 80 01 00 1c lwz r0,28(r1) ffc0bd5c: 83 e1 00 14 lwz r31,20(r1) ffc0bd60: 38 21 00 18 addi r1,r1,24 ffc0bd64: 7c 08 03 a6 mtlr r0 ffc0bd68: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f2c0 <_Thread_Resume>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0f2c0: 7c 00 00 a6 mfmsr r0 ffc0f2c4: 7d 30 42 a6 mfsprg r9,0 ffc0f2c8: 7c 09 48 78 andc r9,r0,r9 ffc0f2cc: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; ffc0f2d0: 81 23 00 10 lwz r9,16(r3) if ( current_state & STATES_SUSPENDED ) { ffc0f2d4: 71 2b 00 02 andi. r11,r9,2 ffc0f2d8: 41 82 00 a8 beq- ffc0f380 <_Thread_Resume+0xc0> <== NEVER TAKEN ffc0f2dc: 55 29 07 fa rlwinm r9,r9,0,31,29 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { ffc0f2e0: 2f 89 00 00 cmpwi cr7,r9,0 } #endif current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = ffc0f2e4: 91 23 00 10 stw r9,16(r3) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { ffc0f2e8: 40 9e 00 98 bne- cr7,ffc0f380 <_Thread_Resume+0xc0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0f2ec: 81 63 00 90 lwz r11,144(r3) <== ALWAYS TAKEN ffc0f2f0: 81 43 00 98 lwz r10,152(r3) ffc0f2f4: 81 0b 00 00 lwz r8,0(r11) _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); ffc0f2f8: 81 23 00 8c lwz r9,140(r3) ffc0f2fc: 7d 0a 53 78 or r10,r8,r10 ffc0f300: 91 4b 00 00 stw r10,0(r11) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0f304: 39 69 00 04 addi r11,r9,4 _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0f308: 3d 40 00 00 lis r10,0 ffc0f30c: 91 63 00 00 stw r11,0(r3) ffc0f310: 80 ea 27 80 lwz r7,10112(r10) ffc0f314: 81 03 00 94 lwz r8,148(r3) old_last_node = the_chain->last; ffc0f318: 81 69 00 08 lwz r11,8(r9) ffc0f31c: 7c e8 43 78 or r8,r7,r8 the_chain->last = the_node; ffc0f320: 90 69 00 08 stw r3,8(r9) ffc0f324: 91 0a 27 80 stw r8,10112(r10) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0f328: 91 63 00 04 stw r11,4(r3) 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; ffc0f32c: 90 6b 00 00 stw r3,0(r11) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0f330: 7d 20 00 a6 mfmsr r9 ffc0f334: 7c 00 01 24 mtmsr r0 ffc0f338: 7d 20 01 24 mtmsr r9 _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { ffc0f33c: 3d 60 00 00 lis r11,0 ffc0f340: 81 23 00 14 lwz r9,20(r3) ffc0f344: 81 4b 27 68 lwz r10,10088(r11) ffc0f348: 81 4a 00 14 lwz r10,20(r10) ffc0f34c: 7f 89 50 40 cmplw cr7,r9,r10 ffc0f350: 40 9c 00 30 bge- cr7,ffc0f380 <_Thread_Resume+0xc0> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0f354: 3d 40 00 00 lis r10,0 _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; ffc0f358: 90 6b 27 68 stw r3,10088(r11) if ( _Thread_Executing->is_preemptible || ffc0f35c: 81 4a 27 8c lwz r10,10124(r10) ffc0f360: 89 6a 00 75 lbz r11,117(r10) ffc0f364: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0f368: 40 9e 00 0c bne- cr7,ffc0f374 <_Thread_Resume+0xb4> ffc0f36c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f370: 40 9e 00 10 bne- cr7,ffc0f380 <_Thread_Resume+0xc0> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; ffc0f374: 39 60 00 01 li r11,1 ffc0f378: 3d 20 00 00 lis r9,0 ffc0f37c: 99 69 27 9c stb r11,10140(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0f380: 7c 00 01 24 mtmsr r0 } } } _ISR_Enable( level ); } ffc0f384: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0acb4 <_Thread_Set_priority>: Thread_Control *the_thread, Priority_Control new_priority ) { the_thread->current_priority = new_priority; the_thread->ready = &_Thread_Ready_chain[ new_priority ]; ffc0acb4: 3d 20 00 00 lis r9,0 void _Thread_Set_priority( Thread_Control *the_thread, Priority_Control new_priority ) { the_thread->current_priority = new_priority; ffc0acb8: 90 83 00 14 stw r4,20(r3) the_thread->ready = &_Thread_Ready_chain[ new_priority ]; ffc0acbc: 1d 44 00 0c mulli r10,r4,12 ffc0acc0: 81 09 27 20 lwz r8,10016(r9) RTEMS_INLINE_ROUTINE Priority_Bit_map_control _Priority_Major ( Priority_Control the_priority ) { return (Priority_Bit_map_control)( the_priority / 16 ); ffc0acc4: 54 8b e1 3e rlwinm r11,r4,28,4,31 minor = _Priority_Minor( new_priority ); the_priority_map->minor = &_Priority_Bit_map[ _Priority_Bits_index(major) ]; mask = _Priority_Mask( major ); ffc0acc8: 3d 20 80 00 lis r9,-32768 ffc0accc: 7d 48 52 14 add r10,r8,r10 the_priority_map->ready_major = mask; /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */ the_priority_map->block_major = (Priority_Bit_map_control)(~((uint32_t)mask)); mask = _Priority_Mask( minor ); ffc0acd0: 54 80 07 3e clrlwi r0,r4,28 ffc0acd4: 91 43 00 8c stw r10,140(r3) Priority_Bit_map_control mask; major = _Priority_Major( new_priority ); minor = _Priority_Minor( new_priority ); the_priority_map->minor = ffc0acd8: 3d 00 00 00 lis r8,0 mask = _Priority_Mask( major ); the_priority_map->ready_major = mask; /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */ the_priority_map->block_major = (Priority_Bit_map_control)(~((uint32_t)mask)); mask = _Priority_Mask( minor ); ffc0acdc: 7d 20 04 30 srw r0,r9,r0 Priority_Bit_map_control mask; major = _Priority_Major( new_priority ); minor = _Priority_Minor( new_priority ); the_priority_map->minor = ffc0ace0: 39 08 2d 00 addi r8,r8,11520 the_priority_map->ready_major = mask; /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */ the_priority_map->block_major = (Priority_Bit_map_control)(~((uint32_t)mask)); mask = _Priority_Mask( minor ); the_priority_map->ready_minor = mask; ffc0ace4: 90 03 00 98 stw r0,152(r3) <== ALWAYS TAKEN minor = _Priority_Minor( new_priority ); the_priority_map->minor = &_Priority_Bit_map[ _Priority_Bits_index(major) ]; mask = _Priority_Mask( major ); ffc0ace8: 7d 29 5c 30 srw r9,r9,r11 <== ALWAYS TAKEN Priority_Bit_map_control mask; major = _Priority_Major( new_priority ); minor = _Priority_Minor( new_priority ); the_priority_map->minor = ffc0acec: 55 6b 10 3a rlwinm r11,r11,2,0,29 &_Priority_Bit_map[ _Priority_Bits_index(major) ]; mask = _Priority_Mask( major ); the_priority_map->ready_major = mask; ffc0acf0: 91 23 00 94 stw r9,148(r3) <== ALWAYS TAKEN Priority_Bit_map_control mask; major = _Priority_Major( new_priority ); minor = _Priority_Minor( new_priority ); the_priority_map->minor = ffc0acf4: 7d 68 5a 14 add r11,r8,r11 the_priority_map->block_major = (Priority_Bit_map_control)(~((uint32_t)mask)); mask = _Priority_Mask( minor ); the_priority_map->ready_minor = mask; /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */ the_priority_map->block_minor = (Priority_Bit_map_control)(~((uint32_t)mask)); ffc0acf8: 7c 07 00 f8 not r7,r0 Priority_Bit_map_control mask; major = _Priority_Major( new_priority ); minor = _Priority_Minor( new_priority ); the_priority_map->minor = ffc0acfc: 91 63 00 90 stw r11,144(r3) &_Priority_Bit_map[ _Priority_Bits_index(major) ]; mask = _Priority_Mask( major ); the_priority_map->ready_major = mask; /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */ the_priority_map->block_major = (Priority_Bit_map_control)(~((uint32_t)mask)); ffc0ad00: 7d 28 48 f8 not r8,r9 mask = _Priority_Mask( minor ); the_priority_map->ready_minor = mask; /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */ the_priority_map->block_minor = (Priority_Bit_map_control)(~((uint32_t)mask)); ffc0ad04: 90 e3 00 a0 stw r7,160(r3) &_Priority_Bit_map[ _Priority_Bits_index(major) ]; mask = _Priority_Mask( major ); the_priority_map->ready_major = mask; /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */ the_priority_map->block_major = (Priority_Bit_map_control)(~((uint32_t)mask)); ffc0ad08: 91 03 00 9c stw r8,156(r3) _Priority_Initialize_information( &the_thread->Priority_map, new_priority ); } ffc0ad0c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ad10 <_Thread_Set_state>: ) { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; ffc0ad10: 81 23 00 8c lwz r9,140(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ad14: 7d 60 00 a6 mfmsr r11 ffc0ad18: 7c 10 42 a6 mfsprg r0,0 ffc0ad1c: 7d 60 00 78 andc r0,r11,r0 ffc0ad20: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { ffc0ad24: 80 03 00 10 lwz r0,16(r3) ffc0ad28: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ad2c: 41 be 00 10 beq+ cr7,ffc0ad3c <_Thread_Set_state+0x2c> the_thread->current_state = ffc0ad30: 7c 80 03 78 or r0,r4,r0 ffc0ad34: 90 03 00 10 stw r0,16(r3) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); ffc0ad38: 48 00 00 e8 b ffc0ae20 <_Thread_Set_state+0x110> <== ALWAYS TAKEN return; } the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { ffc0ad3c: 81 09 00 00 lwz r8,0(r9) ffc0ad40: 81 49 00 08 lwz r10,8(r9) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; ffc0ad44: 90 83 00 10 stw r4,16(r3) if ( _Chain_Has_only_one_node( ready ) ) { ffc0ad48: 7f 88 50 00 cmpw cr7,r8,r10 ffc0ad4c: 40 be 00 48 bne+ cr7,ffc0ad94 <_Thread_Set_state+0x84> RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0ad50: 81 43 00 90 lwz r10,144(r3) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0ad54: 38 e9 00 04 addi r7,r9,4 ffc0ad58: 81 03 00 a0 lwz r8,160(r3) <== ALWAYS TAKEN ffc0ad5c: 80 ca 00 00 lwz r6,0(r10) ffc0ad60: 90 e9 00 00 stw r7,0(r9) ffc0ad64: 7c c8 40 38 and r8,r6,r8 _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); ffc0ad68: 2f 88 00 00 cmpwi cr7,r8,0 the_chain->permanent_null = NULL; ffc0ad6c: 90 09 00 04 stw r0,4(r9) the_chain->last = _Chain_Head(the_chain); ffc0ad70: 91 29 00 08 stw r9,8(r9) ffc0ad74: 91 0a 00 00 stw r8,0(r10) ffc0ad78: 40 9e 00 2c bne- cr7,ffc0ada4 <_Thread_Set_state+0x94> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; ffc0ad7c: 3d 20 00 00 lis r9,0 ffc0ad80: 80 03 00 9c lwz r0,156(r3) ffc0ad84: 81 49 27 60 lwz r10,10080(r9) <== ALWAYS TAKEN ffc0ad88: 7d 40 00 38 and r0,r10,r0 <== ALWAYS TAKEN ffc0ad8c: 90 09 27 60 stw r0,10080(r9) ffc0ad90: 48 00 00 14 b ffc0ada4 <_Thread_Set_state+0x94> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0ad94: 81 23 00 00 lwz r9,0(r3) previous = the_node->previous; ffc0ad98: 81 43 00 04 lwz r10,4(r3) next->previous = previous; previous->next = next; ffc0ad9c: 91 2a 00 00 stw r9,0(r10) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0ada0: 91 49 00 04 stw r10,4(r9) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0ada4: 7c 00 00 a6 mfmsr r0 ffc0ada8: 7d 60 01 24 mtmsr r11 ffc0adac: 7c 00 01 24 mtmsr r0 } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( the_thread ) ) ffc0adb0: 3d 40 00 00 lis r10,0 <== ALWAYS TAKEN ffc0adb4: 80 0a 27 48 lwz r0,10056(r10) <== ALWAYS TAKEN ffc0adb8: 7f 83 00 00 cmpw cr7,r3,r0 ffc0adbc: 40 be 00 48 bne+ cr7,ffc0ae04 <_Thread_Set_state+0xf4> 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 ); ffc0adc0: 3c a0 00 00 lis r5,0 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; ffc0adc4: 3d 00 00 00 lis r8,0 ffc0adc8: 81 25 27 60 lwz r9,10080(r5) ffc0adcc: 80 88 27 20 lwz r4,10016(r8) ffc0add0: 7d 26 00 34 cntlzw r6,r9 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0add4: 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 ); ffc0add8: 91 25 27 60 stw r9,10080(r5) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0addc: 38 e7 2d 00 addi r7,r7,11520 ffc0ade0: 54 c8 10 3a rlwinm r8,r6,2,0,29 ffc0ade4: 7c 07 40 2e lwzx r0,r7,r8 ffc0ade8: 7c 09 00 34 cntlzw r9,r0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0adec: 54 c6 20 36 rlwinm r6,r6,4,0,27 ffc0adf0: 7c 07 41 2e stwx r0,r7,r8 ffc0adf4: 7c c6 4a 14 add r6,r6,r9 ffc0adf8: 1c c6 00 0c mulli r6,r6,12 ffc0adfc: 7c 04 30 2e lwzx r0,r4,r6 <== ALWAYS TAKEN ffc0ae00: 90 0a 27 48 stw r0,10056(r10) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) ffc0ae04: 3d 20 00 00 lis r9,0 ffc0ae08: 80 09 27 6c lwz r0,10092(r9) ffc0ae0c: 7f 83 00 00 cmpw cr7,r3,r0 <== ALWAYS TAKEN ffc0ae10: 40 be 00 10 bne+ cr7,ffc0ae20 <_Thread_Set_state+0x110> _Context_Switch_necessary = true; ffc0ae14: 38 00 00 01 li r0,1 ffc0ae18: 3d 20 00 00 lis r9,0 ffc0ae1c: 98 09 27 7c stb r0,10108(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ae20: 7d 60 01 24 mtmsr r11 ffc0ae24: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ae28 <_Thread_Set_transient>: { ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; ffc0ae28: 81 23 00 8c lwz r9,140(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ae2c: 7d 00 00 a6 mfmsr r8 ffc0ae30: 7c 10 42 a6 mfsprg r0,0 ffc0ae34: 7d 00 00 78 andc r0,r8,r0 ffc0ae38: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); old_state = the_thread->current_state; ffc0ae3c: 80 03 00 10 lwz r0,16(r3) <== ALWAYS TAKEN the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); if ( _States_Is_ready( old_state ) ) { ffc0ae40: 2f 80 00 00 cmpwi cr7,r0,0 ready = the_thread->ready; _ISR_Disable( level ); old_state = the_thread->current_state; the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); ffc0ae44: 60 0b 00 04 ori r11,r0,4 ffc0ae48: 91 63 00 10 stw r11,16(r3) <== ALWAYS TAKEN if ( _States_Is_ready( old_state ) ) { ffc0ae4c: 40 9e 00 68 bne- cr7,ffc0aeb4 <_Thread_Set_transient+0x8c> if ( _Chain_Has_only_one_node( ready ) ) { ffc0ae50: 81 49 00 00 lwz r10,0(r9) ffc0ae54: 81 69 00 08 lwz r11,8(r9) ffc0ae58: 7f 8a 58 00 cmpw cr7,r10,r11 ffc0ae5c: 40 be 00 48 bne+ cr7,ffc0aea4 <_Thread_Set_transient+0x7c> RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0ae60: 81 63 00 90 lwz r11,144(r3) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0ae64: 38 e9 00 04 addi r7,r9,4 ffc0ae68: 81 43 00 a0 lwz r10,160(r3) ffc0ae6c: 80 cb 00 00 lwz r6,0(r11) ffc0ae70: 90 e9 00 00 stw r7,0(r9) ffc0ae74: 7c ca 50 38 and r10,r6,r10 _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); ffc0ae78: 2f 8a 00 00 cmpwi cr7,r10,0 the_chain->permanent_null = NULL; ffc0ae7c: 90 09 00 04 stw r0,4(r9) the_chain->last = _Chain_Head(the_chain); ffc0ae80: 91 29 00 08 stw r9,8(r9) ffc0ae84: 91 4b 00 00 stw r10,0(r11) ffc0ae88: 40 9e 00 2c bne- cr7,ffc0aeb4 <_Thread_Set_transient+0x8c> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; ffc0ae8c: 3d 20 00 00 lis r9,0 ffc0ae90: 80 03 00 9c lwz r0,156(r3) ffc0ae94: 81 69 27 60 lwz r11,10080(r9) ffc0ae98: 7d 60 00 38 and r0,r11,r0 ffc0ae9c: 90 09 27 60 stw r0,10080(r9) ffc0aea0: 48 00 00 14 b ffc0aeb4 <_Thread_Set_transient+0x8c> <== ALWAYS TAKEN { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0aea4: 81 63 00 04 lwz r11,4(r3) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0aea8: 81 23 00 00 lwz r9,0(r3) previous = the_node->previous; next->previous = previous; previous->next = next; ffc0aeac: 91 2b 00 00 stw r9,0(r11) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0aeb0: 91 69 00 04 stw r11,4(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0aeb4: 7d 00 01 24 mtmsr r8 _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); } ffc0aeb8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0aebc <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { ffc0aebc: 94 21 ff f0 stwu r1,-16(r1) ffc0aec0: 7c 08 02 a6 mflr r0 ffc0aec4: 3d 20 00 00 lis r9,0 ffc0aec8: 90 01 00 14 stw r0,20(r1) ffc0aecc: 80 09 26 60 lwz r0,9824(r9) ffc0aed0: 93 c1 00 08 stw r30,8(r1) ffc0aed4: 7c 7e 1b 78 mr r30,r3 ffc0aed8: 7f 84 00 40 cmplw cr7,r4,r0 ffc0aedc: 93 e1 00 0c stw r31,12(r1) ffc0aee0: 7c 9f 23 78 mr r31,r4 ffc0aee4: 40 9c 00 08 bge- cr7,ffc0aeec <_Thread_Stack_Allocate+0x30> ffc0aee8: 7c 1f 03 78 mr r31,r0 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( Configuration.stack_allocate_hook ) { ffc0aeec: 3d 20 00 00 lis r9,0 ffc0aef0: 80 09 20 c0 lwz r0,8384(r9) ffc0aef4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0aef8: 41 9e 00 14 beq- cr7,ffc0af0c <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); ffc0aefc: 7f e3 fb 78 mr r3,r31 ffc0af00: 7c 09 03 a6 mtctr r0 ffc0af04: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0af08: 48 00 00 10 b ffc0af18 <_Thread_Stack_Allocate+0x5c> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; ffc0af0c: 3b ff 00 10 addi r31,r31,16 * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); ffc0af10: 7f e3 fb 78 mr r3,r31 ffc0af14: 48 00 0b bd bl ffc0bad0 <_Workspace_Allocate> <== ALWAYS TAKEN } if ( !stack_addr ) ffc0af18: 7c 69 fe 70 srawi r9,r3,31 the_stack_size = 0; the_thread->Start.stack = stack_addr; ffc0af1c: 90 7e 00 d4 stw r3,212(r30) the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) ffc0af20: 7d 20 1a 78 xor r0,r9,r3 ffc0af24: 7c 00 48 50 subf r0,r0,r9 <== ALWAYS TAKEN the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } ffc0af28: 83 c1 00 08 lwz r30,8(r1) the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) ffc0af2c: 7c 00 fe 70 srawi r0,r0,31 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } ffc0af30: 7f e3 00 38 and r3,r31,r0 ffc0af34: 80 01 00 14 lwz r0,20(r1) ffc0af38: 83 e1 00 0c lwz r31,12(r1) ffc0af3c: 38 21 00 10 addi r1,r1,16 ffc0af40: 7c 08 03 a6 mtlr r0 ffc0af44: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0af48 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { ffc0af48: 7c 08 02 a6 mflr r0 ffc0af4c: 94 21 ff f8 stwu r1,-8(r1) * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) ffc0af50: 3d 20 00 00 lis r9,0 */ void _Thread_Stack_Free( Thread_Control *the_thread ) { ffc0af54: 90 01 00 0c stw r0,12(r1) * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) ffc0af58: 80 09 20 c4 lwz r0,8388(r9) ffc0af5c: 80 63 00 cc lwz r3,204(r3) ffc0af60: 2f 80 00 00 cmpwi cr7,r0,0 ffc0af64: 41 9e 00 10 beq- cr7,ffc0af74 <_Thread_Stack_Free+0x2c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); ffc0af68: 7c 09 03 a6 mtctr r0 ffc0af6c: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0af70: 48 00 00 08 b ffc0af78 <_Thread_Stack_Free+0x30> <== ALWAYS TAKEN else _Workspace_Free( the_thread->Start.Initial_stack.area ); ffc0af74: 48 00 0b 91 bl ffc0bb04 <_Workspace_Free> <== ALWAYS TAKEN } ffc0af78: 80 01 00 0c lwz r0,12(r1) ffc0af7c: 38 21 00 08 addi r1,r1,8 ffc0af80: 7c 08 03 a6 mtlr r0 ffc0af84: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0aff8 <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0aff8: 94 21 ff f0 stwu r1,-16(r1) ffc0affc: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN ffc0b000: 90 01 00 14 stw r0,20(r1) if ( _States_Is_dormant( the_thread->current_state ) ) { ffc0b004: 80 03 00 10 lwz r0,16(r3) Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0b008: 93 e1 00 0c stw r31,12(r1) ffc0b00c: 7c 7f 1b 78 mr r31,r3 if ( _States_Is_dormant( the_thread->current_state ) ) { ffc0b010: 70 09 00 01 andi. r9,r0,1 ffc0b014: 38 00 00 00 li r0,0 ffc0b018: 41 a2 00 2c beq+ ffc0b044 <_Thread_Start+0x4c> the_thread->Start.entry_point = (Thread_Entry) entry_point; ffc0b01c: 90 a3 00 a4 stw r5,164(r3) the_thread->Start.prototype = the_prototype; ffc0b020: 90 83 00 a8 stw r4,168(r3) <== ALWAYS TAKEN the_thread->Start.pointer_argument = pointer_argument; ffc0b024: 90 c3 00 ac stw r6,172(r3) the_thread->Start.numeric_argument = numeric_argument; ffc0b028: 90 e3 00 b0 stw r7,176(r3) <== ALWAYS TAKEN _Thread_Load_environment( the_thread ); ffc0b02c: 48 00 30 25 bl ffc0e050 <_Thread_Load_environment> <== ALWAYS TAKEN _Thread_Ready( the_thread ); ffc0b030: 7f e3 fb 78 mr r3,r31 ffc0b034: 48 00 33 45 bl ffc0e378 <_Thread_Ready> <== ALWAYS TAKEN _User_extensions_Thread_start( the_thread ); ffc0b038: 7f e3 fb 78 mr r3,r31 ffc0b03c: 48 00 06 79 bl ffc0b6b4 <_User_extensions_Thread_start> <== ALWAYS TAKEN ffc0b040: 38 00 00 01 li r0,1 return true; } return false; } ffc0b044: 7c 03 03 78 mr r3,r0 <== ALWAYS TAKEN ffc0b048: 80 01 00 14 lwz r0,20(r1) ffc0b04c: 83 e1 00 0c lwz r31,12(r1) <== ALWAYS TAKEN ffc0b050: 38 21 00 10 addi r1,r1,16 ffc0b054: 7c 08 03 a6 mtlr r0 ffc0b058: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0af88 <_Thread_Start_multitasking>: * ready chain * select heir */ void _Thread_Start_multitasking( void ) { ffc0af88: 7c 08 02 a6 mflr r0 ffc0af8c: 94 21 ff f8 stwu r1,-8(r1) _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; _Thread_Executing = _Thread_Heir; ffc0af90: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN ffc0af94: 80 69 27 48 lwz r3,10056(r9) ffc0af98: 3d 20 00 00 lis r9,0 * ready chain * select heir */ void _Thread_Start_multitasking( void ) { ffc0af9c: 90 01 00 0c stw r0,12(r1) #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) /* * don't need to worry about saving BSP's floating point state */ if ( _Thread_Heir->fp_context != NULL ) ffc0afa0: 80 03 01 38 lwz r0,312(r3) ffc0afa4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0afa8: 38 00 00 03 li r0,3 <== ALWAYS TAKEN ffc0afac: 90 09 27 90 stw r0,10128(r9) * the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; ffc0afb0: 3d 20 00 00 lis r9,0 ffc0afb4: 38 00 00 00 li r0,0 ffc0afb8: 98 09 27 7c stb r0,10108(r9) _Thread_Executing = _Thread_Heir; ffc0afbc: 3d 20 00 00 lis r9,0 ffc0afc0: 90 69 27 6c stw r3,10092(r9) #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) /* * don't need to worry about saving BSP's floating point state */ if ( _Thread_Heir->fp_context != NULL ) ffc0afc4: 41 9e 00 0c beq- cr7,ffc0afd0 <_Thread_Start_multitasking+0x48> _Context_Restore_fp( &_Thread_Heir->fp_context ); ffc0afc8: 38 63 01 38 addi r3,r3,312 ffc0afcc: 48 00 fc 15 bl ffc1abe0 <_CPU_Context_restore_fp> <== ALWAYS TAKEN #endif _Context_Switch( &_Thread_BSP_context, &_Thread_Heir->Registers ); ffc0afd0: 3d 20 00 00 lis r9,0 ffc0afd4: 80 89 27 48 lwz r4,10056(r9) ffc0afd8: 3c 60 00 00 lis r3,0 ffc0afdc: 38 63 2b 94 addi r3,r3,11156 ffc0afe0: 38 84 00 d8 addi r4,r4,216 ffc0afe4: 48 00 fc bd bl ffc1aca0 <_CPU_Context_switch> <== ALWAYS TAKEN } ffc0afe8: 80 01 00 0c lwz r0,12(r1) <== ALWAYS TAKEN ffc0afec: 38 21 00 08 addi r1,r1,8 ffc0aff0: 7c 08 03 a6 mtlr r0 ffc0aff4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b05c <_Thread_Suspend>: ) { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; ffc0b05c: 81 23 00 8c lwz r9,140(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b060: 7d 60 00 a6 mfmsr r11 ffc0b064: 7c 10 42 a6 mfsprg r0,0 ffc0b068: 7d 60 00 78 andc r0,r11,r0 ffc0b06c: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { ffc0b070: 80 03 00 10 lwz r0,16(r3) ffc0b074: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b078: 41 be 00 10 beq+ cr7,ffc0b088 <_Thread_Suspend+0x2c> the_thread->current_state = ffc0b07c: 60 00 00 02 ori r0,r0,2 ffc0b080: 90 03 00 10 stw r0,16(r3) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); ffc0b084: 48 00 00 ec b ffc0b170 <_Thread_Suspend+0x114> <== ALWAYS TAKEN return; } the_thread->current_state = STATES_SUSPENDED; if ( _Chain_Has_only_one_node( ready ) ) { ffc0b088: 81 49 00 08 lwz r10,8(r9) ffc0b08c: 81 09 00 00 lwz r8,0(r9) ffc0b090: 7f 88 50 00 cmpw cr7,r8,r10 _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; ffc0b094: 39 40 00 02 li r10,2 ffc0b098: 91 43 00 10 stw r10,16(r3) if ( _Chain_Has_only_one_node( ready ) ) { ffc0b09c: 40 be 00 48 bne+ cr7,ffc0b0e4 <_Thread_Suspend+0x88> RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0b0a0: 81 43 00 90 lwz r10,144(r3) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b0a4: 38 e9 00 04 addi r7,r9,4 ffc0b0a8: 81 03 00 a0 lwz r8,160(r3) ffc0b0ac: 80 ca 00 00 lwz r6,0(r10) ffc0b0b0: 90 e9 00 00 stw r7,0(r9) ffc0b0b4: 7c c8 40 38 and r8,r6,r8 _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); ffc0b0b8: 2f 88 00 00 cmpwi cr7,r8,0 the_chain->permanent_null = NULL; ffc0b0bc: 90 09 00 04 stw r0,4(r9) the_chain->last = _Chain_Head(the_chain); ffc0b0c0: 91 29 00 08 stw r9,8(r9) ffc0b0c4: 91 0a 00 00 stw r8,0(r10) ffc0b0c8: 40 9e 00 2c bne- cr7,ffc0b0f4 <_Thread_Suspend+0x98> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; ffc0b0cc: 3d 20 00 00 lis r9,0 ffc0b0d0: 80 03 00 9c lwz r0,156(r3) ffc0b0d4: 81 49 27 60 lwz r10,10080(r9) ffc0b0d8: 7d 40 00 38 and r0,r10,r0 ffc0b0dc: 90 09 27 60 stw r0,10080(r9) ffc0b0e0: 48 00 00 14 b ffc0b0f4 <_Thread_Suspend+0x98> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0b0e4: 81 23 00 00 lwz r9,0(r3) previous = the_node->previous; ffc0b0e8: 81 43 00 04 lwz r10,4(r3) next->previous = previous; previous->next = next; ffc0b0ec: 91 2a 00 00 stw r9,0(r10) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0b0f0: 91 49 00 04 stw r10,4(r9) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0b0f4: 7c 00 00 a6 mfmsr r0 ffc0b0f8: 7d 60 01 24 mtmsr r11 ffc0b0fc: 7c 00 01 24 mtmsr r0 } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( the_thread ) ) ffc0b100: 3d 40 00 00 lis r10,0 ffc0b104: 80 0a 27 48 lwz r0,10056(r10) ffc0b108: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b10c: 40 be 00 48 bne+ cr7,ffc0b154 <_Thread_Suspend+0xf8> 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 ); ffc0b110: 3c a0 00 00 lis r5,0 _Thread_Ready_chain[ _Priority_Get_highest() ].first; ffc0b114: 3d 00 00 00 lis r8,0 ffc0b118: 81 25 27 60 lwz r9,10080(r5) ffc0b11c: 80 88 27 20 lwz r4,10016(r8) ffc0b120: 7d 26 00 34 cntlzw r6,r9 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0b124: 3c e0 00 00 lis r7,0 <== ALWAYS TAKEN 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 ); ffc0b128: 91 25 27 60 stw r9,10080(r5) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0b12c: 38 e7 2d 00 addi r7,r7,11520 ffc0b130: 54 c8 10 3a rlwinm r8,r6,2,0,29 ffc0b134: 7c 07 40 2e lwzx r0,r7,r8 ffc0b138: 7c 09 00 34 cntlzw r9,r0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0b13c: 54 c6 20 36 rlwinm r6,r6,4,0,27 ffc0b140: 7c 07 41 2e stwx r0,r7,r8 ffc0b144: 7c c6 4a 14 add r6,r6,r9 ffc0b148: 1c c6 00 0c mulli r6,r6,12 ffc0b14c: 7c 04 30 2e lwzx r0,r4,r6 ffc0b150: 90 0a 27 48 stw r0,10056(r10) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) ffc0b154: 3d 20 00 00 lis r9,0 ffc0b158: 80 09 27 6c lwz r0,10092(r9) ffc0b15c: 7f 83 00 00 cmpw cr7,r3,r0 ffc0b160: 40 be 00 10 bne+ cr7,ffc0b170 <_Thread_Suspend+0x114> _Context_Switch_necessary = true; ffc0b164: 38 00 00 01 li r0,1 ffc0b168: 3d 20 00 00 lis r9,0 ffc0b16c: 98 09 27 7c stb r0,10108(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b170: 7d 60 01 24 mtmsr r11 ffc0b174: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b178 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { ffc0b178: 94 21 ff f0 stwu r1,-16(r1) ffc0b17c: 7c 08 02 a6 mflr r0 Thread_Control *executing; executing = _Thread_Executing; ffc0b180: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { ffc0b184: 90 01 00 14 stw r0,20(r1) ffc0b188: 93 e1 00 0c stw r31,12(r1) Thread_Control *executing; executing = _Thread_Executing; ffc0b18c: 83 e9 27 6c lwz r31,10092(r9) /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) ffc0b190: 88 1f 00 75 lbz r0,117(r31) <== ALWAYS TAKEN ffc0b194: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b198: 41 9e 00 40 beq- cr7,ffc0b1d8 <_Thread_Tickle_timeslice+0x60> return; if ( !_States_Is_ready( executing->current_state ) ) ffc0b19c: 80 1f 00 10 lwz r0,16(r31) ffc0b1a0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b1a4: 40 9e 00 34 bne- cr7,ffc0b1d8 <_Thread_Tickle_timeslice+0x60> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { ffc0b1a8: 80 1f 00 7c lwz r0,124(r31) ffc0b1ac: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b1b0: 40 be 00 28 bne+ cr7,ffc0b1d8 <_Thread_Tickle_timeslice+0x60> case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { ffc0b1b4: 81 3f 00 78 lwz r9,120(r31) ffc0b1b8: 38 09 ff ff addi r0,r9,-1 ffc0b1bc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b1c0: 90 1f 00 78 stw r0,120(r31) ffc0b1c4: 41 bd 00 14 bgt+ cr7,ffc0b1d8 <_Thread_Tickle_timeslice+0x60> _Thread_Reset_timeslice(); ffc0b1c8: 48 00 32 8d bl ffc0e454 <_Thread_Reset_timeslice> <== ALWAYS TAKEN executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0b1cc: 3d 20 00 00 lis r9,0 ffc0b1d0: 80 09 27 24 lwz r0,10020(r9) ffc0b1d4: 90 1f 00 78 stw r0,120(r31) if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } ffc0b1d8: 80 01 00 14 lwz r0,20(r1) <== ALWAYS TAKEN ffc0b1dc: 83 e1 00 0c lwz r31,12(r1) ffc0b1e0: 38 21 00 10 addi r1,r1,16 ffc0b1e4: 7c 08 03 a6 mtlr r0 ffc0b1e8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b1ec <_Thread_Yield_processor>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ffc0b1ec: 3d 20 00 00 lis r9,0 ffc0b1f0: 81 29 27 6c lwz r9,10092(r9) ready = executing->ready; ffc0b1f4: 81 69 00 8c lwz r11,140(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b1f8: 7c 00 00 a6 mfmsr r0 ffc0b1fc: 7d 50 42 a6 mfsprg r10,0 ffc0b200: 7c 0a 50 78 andc r10,r0,r10 ffc0b204: 7d 40 01 24 mtmsr r10 _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { ffc0b208: 80 eb 00 00 lwz r7,0(r11) ffc0b20c: 3d 40 00 00 lis r10,0 ffc0b210: 81 0b 00 08 lwz r8,8(r11) ffc0b214: 7f 87 40 00 cmpw cr7,r7,r8 ffc0b218: 41 9e 00 50 beq- cr7,ffc0b268 <_Thread_Yield_processor+0x7c> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0b21c: 81 09 00 00 lwz r8,0(r9) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0b220: 38 cb 00 04 addi r6,r11,4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0b224: 80 e9 00 04 lwz r7,4(r9) next->previous = previous; previous->next = next; ffc0b228: 91 07 00 00 stw r8,0(r7) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0b22c: 90 e8 00 04 stw r7,4(r8) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0b230: 90 c9 00 00 stw r6,0(r9) old_last_node = the_chain->last; ffc0b234: 81 0b 00 08 lwz r8,8(r11) the_chain->last = the_node; ffc0b238: 91 2b 00 08 stw r9,8(r11) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0b23c: 91 09 00 04 stw r8,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; ffc0b240: 91 28 00 00 stw r9,0(r8) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0b244: 7d 00 00 a6 mfmsr r8 ffc0b248: 7c 00 01 24 mtmsr r0 ffc0b24c: 7d 00 01 24 mtmsr r8 _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) ffc0b250: 81 0a 27 48 lwz r8,10056(r10) ffc0b254: 7f 89 40 00 cmpw cr7,r9,r8 ffc0b258: 40 be 00 1c bne+ cr7,ffc0b274 <_Thread_Yield_processor+0x88> <== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; ffc0b25c: 81 2b 00 00 lwz r9,0(r11) ffc0b260: 91 2a 27 48 stw r9,10056(r10) ffc0b264: 48 00 00 10 b ffc0b274 <_Thread_Yield_processor+0x88> <== ALWAYS TAKEN _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) ffc0b268: 81 6a 27 48 lwz r11,10056(r10) ffc0b26c: 7f 89 58 00 cmpw cr7,r9,r11 ffc0b270: 41 9e 00 10 beq- cr7,ffc0b280 <_Thread_Yield_processor+0x94> <== ALWAYS TAKEN _Context_Switch_necessary = true; ffc0b274: 39 60 00 01 li r11,1 ffc0b278: 3d 20 00 00 lis r9,0 ffc0b27c: 99 69 27 7c stb r11,10108(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b280: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); } ffc0b284: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09bbc <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { ffc09bbc: 94 21 ff f0 stwu r1,-16(r1) ffc09bc0: 7c 08 02 a6 mflr r0 ffc09bc4: 90 01 00 14 stw r0,20(r1) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { ffc09bc8: 80 04 00 50 lwz r0,80(r4) Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { ffc09bcc: 93 e1 00 0c stw r31,12(r1) ffc09bd0: 7c 9f 23 78 mr r31,r4 /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { ffc09bd4: 2f 80 00 02 cmpwi cr7,r0,2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; ffc09bd8: 38 00 00 00 li r0,0 ffc09bdc: 90 04 00 44 stw r0,68(r4) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { ffc09be0: 40 be 00 1c bne+ cr7,ffc09bfc <_Thread_blocking_operation_Cancel+0x40> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc09be4: 38 00 00 03 li r0,3 ffc09be8: 90 04 00 50 stw r0,80(r4) ffc09bec: 7c a0 01 24 mtmsr r5 _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc09bf0: 38 64 00 48 addi r3,r4,72 ffc09bf4: 48 00 1d 15 bl ffc0b908 <_Watchdog_Remove> <== ALWAYS TAKEN ffc09bf8: 48 00 00 08 b ffc09c00 <_Thread_blocking_operation_Cancel+0x44> <== ALWAYS TAKEN ffc09bfc: 7c a0 01 24 mtmsr r5 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc09c00: 3c 80 10 03 lis r4,4099 ffc09c04: 7f e3 fb 78 mr r3,r31 ffc09c08: 60 84 ff f8 ori r4,r4,65528 ffc09c0c: 48 00 01 bd bl ffc09dc8 <_Thread_Clear_state> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } ffc09c10: 80 01 00 14 lwz r0,20(r1) ffc09c14: 83 e1 00 0c lwz r31,12(r1) ffc09c18: 38 21 00 10 addi r1,r1,16 ffc09c1c: 7c 08 03 a6 mtlr r0 ffc09c20: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a6bc <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { ffc0a6bc: 94 21 ff f0 stwu r1,-16(r1) ffc0a6c0: 7c 08 02 a6 mflr r0 ffc0a6c4: 90 01 00 14 stw r0,20(r1) Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) ffc0a6c8: 80 03 00 34 lwz r0,52(r3) */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { ffc0a6cc: 93 e1 00 0c stw r31,12(r1) ffc0a6d0: 7c 7f 1b 78 mr r31,r3 <== ALWAYS TAKEN Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) ffc0a6d4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0a6d8: 41 9e 00 10 beq- cr7,ffc0a6e8 <_Thread_queue_Dequeue+0x2c> ffc0a6dc: 3d 20 ff c1 lis r9,-63 ffc0a6e0: 38 09 e0 d8 addi r0,r9,-7976 ffc0a6e4: 48 00 00 0c b ffc0a6f0 <_Thread_queue_Dequeue+0x34> <== ALWAYS TAKEN ffc0a6e8: 3d 20 ff c1 lis r9,-63 ffc0a6ec: 38 09 a7 4c addi r0,r9,-22708 dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); ffc0a6f0: 7f e3 fb 78 mr r3,r31 ffc0a6f4: 7c 09 03 a6 mtctr r0 ffc0a6f8: 4e 80 04 21 bctrl <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a6fc: 7c 00 00 a6 mfmsr r0 ffc0a700: 7d 30 42 a6 mfsprg r9,0 ffc0a704: 7c 09 48 78 andc r9,r0,r9 ffc0a708: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); if ( !the_thread ) { ffc0a70c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a710: 40 be 00 24 bne+ cr7,ffc0a734 <_Thread_queue_Dequeue+0x78> sync_state = the_thread_queue->sync_state; ffc0a714: 81 3f 00 30 lwz r9,48(r31) ffc0a718: 39 29 ff ff addi r9,r9,-1 ffc0a71c: 2b 89 00 01 cmplwi cr7,r9,1 ffc0a720: 41 bd 00 14 bgt+ cr7,ffc0a734 <_Thread_queue_Dequeue+0x78> if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc0a724: 39 20 00 03 li r9,3 ffc0a728: 91 3f 00 30 stw r9,48(r31) the_thread = _Thread_Executing; ffc0a72c: 3d 20 00 00 lis r9,0 ffc0a730: 80 69 27 6c lwz r3,10092(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a734: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); return the_thread; } ffc0a738: 80 01 00 14 lwz r0,20(r1) ffc0a73c: 83 e1 00 0c lwz r31,12(r1) ffc0a740: 38 21 00 10 addi r1,r1,16 ffc0a744: 7c 08 03 a6 mtlr r0 ffc0a748: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e0d8 <_Thread_queue_Dequeue_fifo>: */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { ffc0e0d8: 94 21 ff f0 stwu r1,-16(r1) ffc0e0dc: 7c 08 02 a6 mflr r0 ffc0e0e0: 93 c1 00 08 stw r30,8(r1) ffc0e0e4: 90 01 00 14 stw r0,20(r1) <== ALWAYS TAKEN ffc0e0e8: 93 e1 00 0c stw r31,12(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0e0ec: 7c 00 00 a6 mfmsr r0 ffc0e0f0: 7d 30 42 a6 mfsprg r9,0 ffc0e0f4: 7c 09 48 78 andc r9,r0,r9 ffc0e0f8: 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)); ffc0e0fc: 83 c3 00 00 lwz r30,0(r3) <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0e100: 39 23 00 04 addi r9,r3,4 ffc0e104: 7f 9e 48 00 cmpw cr7,r30,r9 ffc0e108: 41 9e 00 58 beq- cr7,ffc0e160 <_Thread_queue_Dequeue_fifo+0x88> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; ffc0e10c: 81 3e 00 00 lwz r9,0(r30) Thread_Control *the_thread; _ISR_Disable( level ); if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) ffc0e110: 7f df f3 78 mr r31,r30 the_chain->first = new_first; ffc0e114: 91 23 00 00 stw r9,0(r3) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc0e118: 81 7e 00 50 lwz r11,80(r30) new_first->previous = _Chain_Head(the_chain); ffc0e11c: 90 69 00 04 stw r3,4(r9) if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; ffc0e120: 39 20 00 00 li r9,0 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc0e124: 2f 8b 00 02 cmpwi cr7,r11,2 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; ffc0e128: 91 3e 00 44 stw r9,68(r30) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc0e12c: 41 9e 00 0c beq- cr7,ffc0e138 <_Thread_queue_Dequeue_fifo+0x60> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0e130: 7c 00 01 24 mtmsr r0 ffc0e134: 48 00 00 18 b ffc0e14c <_Thread_queue_Dequeue_fifo+0x74> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc0e138: 39 20 00 03 li r9,3 ffc0e13c: 91 3e 00 50 stw r9,80(r30) ffc0e140: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc0e144: 38 7e 00 48 addi r3,r30,72 ffc0e148: 4b ff d7 c1 bl ffc0b908 <_Watchdog_Remove> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc0e14c: 3c 80 10 03 lis r4,4099 ffc0e150: 7f c3 f3 78 mr r3,r30 ffc0e154: 60 84 ff f8 ori r4,r4,65528 ffc0e158: 4b ff bc 71 bl ffc09dc8 <_Thread_Clear_state> <== ALWAYS TAKEN ffc0e15c: 48 00 00 0c b ffc0e168 <_Thread_queue_Dequeue_fifo+0x90> <== ALWAYS TAKEN ffc0e160: 7c 00 01 24 mtmsr r0 ffc0e164: 3b e0 00 00 li r31,0 return the_thread; } _ISR_Enable( level ); return NULL; } ffc0e168: 80 01 00 14 lwz r0,20(r1) <== ALWAYS TAKEN ffc0e16c: 7f e3 fb 78 mr r3,r31 <== ALWAYS TAKEN ffc0e170: 83 c1 00 08 lwz r30,8(r1) ffc0e174: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0e178: 83 e1 00 0c lwz r31,12(r1) ffc0e17c: 38 21 00 10 addi r1,r1,16 ffc0e180: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a74c <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { ffc0a74c: 94 21 ff f0 stwu r1,-16(r1) ffc0a750: 7c 08 02 a6 mflr r0 ffc0a754: 93 e1 00 0c stw r31,12(r1) ffc0a758: 90 01 00 14 stw r0,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a75c: 7c 00 00 a6 mfmsr r0 ffc0a760: 7d 30 42 a6 mfsprg r9,0 ffc0a764: 7c 09 48 78 andc r9,r0,r9 ffc0a768: 7d 20 01 24 mtmsr r9 Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); ffc0a76c: 39 40 00 04 li r10,4 ffc0a770: 7d 49 03 a6 mtctr r10 ffc0a774: 39 60 00 00 li r11,0 ffc0a778: 7c 69 1b 78 mr r9,r3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0a77c: 81 09 00 00 lwz r8,0(r9) ffc0a780: 39 49 00 04 addi r10,r9,4 for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { ffc0a784: 39 29 00 0c addi r9,r9,12 ffc0a788: 7f 88 50 00 cmpw cr7,r8,r10 <== ALWAYS TAKEN ffc0a78c: 41 be 00 30 beq+ cr7,ffc0a7bc <_Thread_queue_Dequeue_priority+0x70> if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) ffc0a790: 1d 6b 00 0c mulli r11,r11,12 ffc0a794: 7f e3 58 2e lwzx r31,r3,r11 _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; new_first_node = the_thread->Wait.Block2n.first; ffc0a798: 81 3f 00 38 lwz r9,56(r31) ffc0a79c: 39 7f 00 3c addi r11,r31,60 new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; ffc0a7a0: 81 5f 00 00 lwz r10,0(r31) ffc0a7a4: 7f 89 58 00 cmpw cr7,r9,r11 */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; ffc0a7a8: 39 60 00 00 li r11,0 ffc0a7ac: 91 7f 00 44 stw r11,68(r31) new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; ffc0a7b0: 81 7f 00 04 lwz r11,4(r31) ffc0a7b4: 40 be 00 1c bne+ cr7,ffc0a7d0 <_Thread_queue_Dequeue_priority+0x84> ffc0a7b8: 48 00 00 5c b ffc0a814 <_Thread_queue_Dequeue_priority+0xc8> <== ALWAYS TAKEN Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { ffc0a7bc: 39 6b 00 01 addi r11,r11,1 Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; ffc0a7c0: 42 00 ff bc bdnz+ ffc0a77c <_Thread_queue_Dequeue_priority+0x30> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a7c4: 7c 00 01 24 mtmsr r0 ffc0a7c8: 3b e0 00 00 li r31,0 /* * We did not find a thread to unblock. */ _ISR_Enable( level ); return NULL; ffc0a7cc: 48 00 00 94 b ffc0a860 <_Thread_queue_Dequeue_priority+0x114> <== ALWAYS TAKEN new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; ffc0a7d0: 81 1f 00 40 lwz r8,64(r31) new_second_node = new_first_node->next; ffc0a7d4: 80 e9 00 00 lwz r7,0(r9) previous_node->next = new_first_node; next_node->previous = new_first_node; ffc0a7d8: 91 2a 00 04 stw r9,4(r10) if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; ffc0a7dc: 91 2b 00 00 stw r9,0(r11) next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; ffc0a7e0: 91 69 00 04 stw r11,4(r9) <== ALWAYS TAKEN last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; ffc0a7e4: 91 49 00 00 stw r10,0(r9) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { ffc0a7e8: 81 5f 00 38 lwz r10,56(r31) ffc0a7ec: 81 7f 00 40 lwz r11,64(r31) ffc0a7f0: 7f 8a 58 00 cmpw cr7,r10,r11 ffc0a7f4: 41 9e 00 28 beq- cr7,ffc0a81c <_Thread_queue_Dequeue_priority+0xd0> _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); ffc0a7f8: 39 69 00 3c addi r11,r9,60 new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ new_second_node->previous = ffc0a7fc: 39 49 00 38 addi r10,r9,56 ffc0a800: 91 47 00 04 stw r10,4(r7) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; ffc0a804: 90 e9 00 38 stw r7,56(r9) new_first_thread->Wait.Block2n.last = last_node; ffc0a808: 91 09 00 40 stw r8,64(r9) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); ffc0a80c: 91 68 00 00 stw r11,0(r8) ffc0a810: 48 00 00 0c b ffc0a81c <_Thread_queue_Dequeue_priority+0xd0> <== ALWAYS TAKEN } } else { previous_node->next = next_node; next_node->previous = previous_node; ffc0a814: 91 6a 00 04 stw r11,4(r10) new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; ffc0a818: 91 4b 00 00 stw r10,0(r11) <== ALWAYS TAKEN next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc0a81c: 81 3f 00 50 lwz r9,80(r31) ffc0a820: 2f 89 00 02 cmpwi cr7,r9,2 ffc0a824: 41 9e 00 18 beq- cr7,ffc0a83c <_Thread_queue_Dequeue_priority+0xf0> ffc0a828: 7c 00 01 24 mtmsr r0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc0a82c: 3c 80 10 03 lis r4,4099 ffc0a830: 60 84 ff f8 ori r4,r4,65528 ffc0a834: 7f e3 fb 78 mr r3,r31 ffc0a838: 48 00 00 24 b ffc0a85c <_Thread_queue_Dequeue_priority+0x110> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc0a83c: 39 20 00 03 li r9,3 ffc0a840: 91 3f 00 50 stw r9,80(r31) ffc0a844: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc0a848: 38 7f 00 48 addi r3,r31,72 ffc0a84c: 48 00 10 bd bl ffc0b908 <_Watchdog_Remove> <== ALWAYS TAKEN ffc0a850: 3c 80 10 03 lis r4,4099 ffc0a854: 7f e3 fb 78 mr r3,r31 ffc0a858: 60 84 ff f8 ori r4,r4,65528 ffc0a85c: 4b ff f5 6d bl ffc09dc8 <_Thread_Clear_state> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } ffc0a860: 80 01 00 14 lwz r0,20(r1) ffc0a864: 7f e3 fb 78 mr r3,r31 ffc0a868: 83 e1 00 0c lwz r31,12(r1) ffc0a86c: 38 21 00 10 addi r1,r1,16 ffc0a870: 7c 08 03 a6 mtlr r0 ffc0a874: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e184 <_Thread_queue_Enqueue_fifo>: Thread_blocking_operation_States _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { ffc0e184: 7c 69 1b 78 mr r9,r3 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0e188: 7c 00 00 a6 mfmsr r0 ffc0e18c: 7d 70 42 a6 mfsprg r11,0 ffc0e190: 7c 0b 58 78 andc r11,r0,r11 ffc0e194: 7d 60 01 24 mtmsr r11 Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); sync_state = the_thread_queue->sync_state; ffc0e198: 80 63 00 30 lwz r3,48(r3) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0e19c: 39 40 00 00 li r10,0 ffc0e1a0: 91 49 00 30 stw r10,48(r9) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { ffc0e1a4: 2f 83 00 01 cmpwi cr7,r3,1 ffc0e1a8: 40 be 00 28 bne+ cr7,ffc0e1d0 <_Thread_queue_Enqueue_fifo+0x4c> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0e1ac: 39 69 00 04 addi r11,r9,4 ffc0e1b0: 91 64 00 00 stw r11,0(r4) old_last_node = the_chain->last; ffc0e1b4: 81 69 00 08 lwz r11,8(r9) the_chain->last = the_node; ffc0e1b8: 90 89 00 08 stw r4,8(r9) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0e1bc: 91 64 00 04 stw r11,4(r4) _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; ffc0e1c0: 91 24 00 44 stw r9,68(r4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc0e1c4: 90 8b 00 00 stw r4,0(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0e1c8: 7c 00 01 24 mtmsr r0 the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc0e1cc: 4e 80 00 20 blr <== ALWAYS TAKEN * 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; ffc0e1d0: 90 05 00 00 stw r0,0(r5) return sync_state; } ffc0e1d4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a950 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; ffc0a950: 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); ffc0a954: 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 ) { ffc0a958: 94 21 ff f0 stwu r1,-16(r1) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0a95c: 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 ) ) ffc0a960: 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 ]; ffc0a964: 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); ffc0a968: 91 04 00 38 stw r8,56(r4) ffc0a96c: 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 ) { ffc0a970: 93 e1 00 0c stw r31,12(r1) the_chain->permanent_null = NULL; ffc0a974: 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; ffc0a978: 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 ]; ffc0a97c: 7d 43 52 14 add r10,r3,r10 ffc0a980: 91 04 00 3c stw r8,60(r4) the_chain->last = _Chain_Head(the_chain); ffc0a984: 91 64 00 40 stw r11,64(r4) block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) ffc0a988: 40 82 00 98 bne- ffc0aa20 <_Thread_queue_Enqueue_priority+0xd0> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0a98c: 38 ca 00 04 addi r6,r10,4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a990: 7d 00 00 a6 mfmsr r8 ffc0a994: 7d 70 42 a6 mfsprg r11,0 ffc0a998: 7d 0b 58 78 andc r11,r8,r11 ffc0a99c: 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; ffc0a9a0: 38 e0 ff ff li r7,-1 ffc0a9a4: 81 6a 00 00 lwz r11,0(r10) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { ffc0a9a8: 48 00 00 34 b ffc0a9dc <_Thread_queue_Enqueue_priority+0x8c> <== ALWAYS TAKEN search_priority = search_thread->current_priority; ffc0a9ac: 80 eb 00 14 lwz r7,20(r11) if ( priority <= search_priority ) ffc0a9b0: 7f 80 38 40 cmplw cr7,r0,r7 ffc0a9b4: 40 9d 00 30 ble- cr7,ffc0a9e4 <_Thread_queue_Enqueue_priority+0x94> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0a9b8: 7d 80 00 a6 mfmsr r12 ffc0a9bc: 7d 00 01 24 mtmsr r8 ffc0a9c0: 7d 80 01 24 mtmsr r12 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) ) { ffc0a9c4: 81 8b 00 10 lwz r12,16(r11) ffc0a9c8: 7d 3f 60 39 and. r31,r9,r12 ffc0a9cc: 40 a2 00 0c bne+ ffc0a9d8 <_Thread_queue_Enqueue_priority+0x88> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a9d0: 7d 00 01 24 mtmsr r8 <== NOT EXECUTED ffc0a9d4: 4b ff ff bc b ffc0a990 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; ffc0a9d8: 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 ) ) { ffc0a9dc: 7f 8b 30 00 cmpw cr7,r11,r6 ffc0a9e0: 40 9e ff cc bne+ cr7,ffc0a9ac <_Thread_queue_Enqueue_priority+0x5c> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != ffc0a9e4: 81 43 00 30 lwz r10,48(r3) 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 ) ) { ffc0a9e8: 7d 09 43 78 mr r9,r8 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != ffc0a9ec: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0a9f0: 40 be 00 f8 bne+ cr7,ffc0aae8 <_Thread_queue_Enqueue_priority+0x198> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) ffc0a9f4: 7f 80 38 00 cmpw cr7,r0,r7 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0a9f8: 38 00 00 00 li r0,0 ffc0a9fc: 90 03 00 30 stw r0,48(r3) if ( priority == search_priority ) ffc0aa00: 41 9e 00 c4 beq- cr7,ffc0aac4 <_Thread_queue_Enqueue_priority+0x174> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; ffc0aa04: 81 2b 00 04 lwz r9,4(r11) the_node = (Chain_Node *) the_thread; the_node->next = search_node; ffc0aa08: 91 64 00 00 stw r11,0(r4) the_node->previous = previous_node; ffc0aa0c: 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; ffc0aa10: 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; ffc0aa14: 90 89 00 00 stw r4,0(r9) search_node->previous = the_node; ffc0aa18: 90 8b 00 04 stw r4,4(r11) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); ffc0aa1c: 48 00 00 9c b ffc0aab8 <_Thread_queue_Enqueue_priority+0x168> <== ALWAYS TAKEN return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; ffc0aa20: 3c c0 00 00 lis r6,0 ffc0aa24: 38 c6 26 64 addi r6,r6,9828 ffc0aa28: 88 e6 00 00 lbz r7,0(r6) ffc0aa2c: 38 e7 00 01 addi r7,r7,1 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0aa30: 7d 00 00 a6 mfmsr r8 ffc0aa34: 7d 70 42 a6 mfsprg r11,0 ffc0aa38: 7d 0b 58 78 andc r11,r8,r11 ffc0aa3c: 7d 60 01 24 mtmsr r11 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; ffc0aa40: 81 6a 00 08 lwz r11,8(r10) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { ffc0aa44: 48 00 00 34 b ffc0aa78 <_Thread_queue_Enqueue_priority+0x128> <== ALWAYS TAKEN search_priority = search_thread->current_priority; ffc0aa48: 80 eb 00 14 lwz r7,20(r11) if ( priority >= search_priority ) ffc0aa4c: 7f 80 38 40 cmplw cr7,r0,r7 ffc0aa50: 40 9c 00 30 bge- cr7,ffc0aa80 <_Thread_queue_Enqueue_priority+0x130> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0aa54: 7d 80 00 a6 mfmsr r12 ffc0aa58: 7d 00 01 24 mtmsr r8 ffc0aa5c: 7d 80 01 24 mtmsr r12 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) ) { ffc0aa60: 81 8b 00 10 lwz r12,16(r11) ffc0aa64: 7d 3f 60 39 and. r31,r9,r12 ffc0aa68: 40 a2 00 0c bne+ ffc0aa74 <_Thread_queue_Enqueue_priority+0x124> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0aa6c: 7d 00 01 24 mtmsr r8 ffc0aa70: 4b ff ff b8 b ffc0aa28 <_Thread_queue_Enqueue_priority+0xd8> <== ALWAYS TAKEN _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) ffc0aa74: 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 ) ) { ffc0aa78: 7f 8b 50 00 cmpw cr7,r11,r10 ffc0aa7c: 40 9e ff cc bne+ cr7,ffc0aa48 <_Thread_queue_Enqueue_priority+0xf8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != ffc0aa80: 81 43 00 30 lwz r10,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 ) ) { ffc0aa84: 7d 09 43 78 mr r9,r8 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != ffc0aa88: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0aa8c: 40 be 00 5c bne+ cr7,ffc0aae8 <_Thread_queue_Enqueue_priority+0x198> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) ffc0aa90: 7f 80 38 00 cmpw cr7,r0,r7 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0aa94: 38 00 00 00 li r0,0 ffc0aa98: 90 03 00 30 stw r0,48(r3) if ( priority == search_priority ) ffc0aa9c: 41 9e 00 28 beq- cr7,ffc0aac4 <_Thread_queue_Enqueue_priority+0x174> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; ffc0aaa0: 81 2b 00 00 lwz r9,0(r11) the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; ffc0aaa4: 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; ffc0aaa8: 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; ffc0aaac: 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; ffc0aab0: 90 8b 00 00 stw r4,0(r11) next_node->previous = the_node; ffc0aab4: 90 89 00 04 stw r4,4(r9) ffc0aab8: 7d 00 01 24 mtmsr r8 ffc0aabc: 38 60 00 01 li r3,1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc0aac0: 48 00 00 30 b ffc0aaf0 <_Thread_queue_Enqueue_priority+0x1a0> <== ALWAYS TAKEN ffc0aac4: 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; ffc0aac8: 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; ffc0aacc: 81 4b 00 04 lwz r10,4(r11) the_node = (Chain_Node *) the_thread; the_node->next = search_node; ffc0aad0: 91 64 00 00 stw r11,0(r4) the_node->previous = previous_node; ffc0aad4: 91 44 00 04 stw r10,4(r4) previous_node->next = the_node; ffc0aad8: 90 8a 00 00 stw r4,0(r10) search_node->previous = the_node; ffc0aadc: 90 8b 00 04 stw r4,4(r11) ffc0aae0: 7d 20 01 24 mtmsr r9 ffc0aae4: 4b ff ff d8 b ffc0aabc <_Thread_queue_Enqueue_priority+0x16c> <== ALWAYS TAKEN * 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; ffc0aae8: 91 25 00 00 stw r9,0(r5) return the_thread_queue->sync_state; ffc0aaec: 80 63 00 30 lwz r3,48(r3) } ffc0aaf0: 83 e1 00 0c lwz r31,12(r1) ffc0aaf4: 38 21 00 10 addi r1,r1,16 ffc0aaf8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a878 <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { ffc0a878: 94 21 ff d8 stwu r1,-40(r1) ffc0a87c: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; ffc0a880: 3d 20 00 00 lis r9,0 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { ffc0a884: 90 01 00 2c stw r0,44(r1) ffc0a888: 93 e1 00 24 stw r31,36(r1) Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; ffc0a88c: 83 e9 27 6c lwz r31,10092(r9) void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { ffc0a890: 93 a1 00 1c stw r29,28(r1) ffc0a894: 7c 9d 23 78 mr r29,r4 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); ffc0a898: 80 83 00 38 lwz r4,56(r3) void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { ffc0a89c: 93 c1 00 20 stw r30,32(r1) ffc0a8a0: 7c 7e 1b 78 mr r30,r3 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); ffc0a8a4: 7f e3 fb 78 mr r3,r31 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { ffc0a8a8: 93 81 00 18 stw r28,24(r1) ffc0a8ac: 7c bc 2b 78 mr r28,r5 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); ffc0a8b0: 48 00 04 61 bl ffc0ad10 <_Thread_Set_state> <== ALWAYS TAKEN /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { ffc0a8b4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a8b8: 41 be 00 30 beq+ cr7,ffc0a8e8 <_Thread_queue_Enqueue_with_handler+0x70> _Watchdog_Initialize( ffc0a8bc: 81 3f 00 08 lwz r9,8(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0a8c0: 38 00 00 00 li r0,0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a8c4: 3c 60 00 00 lis r3,0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc0a8c8: 93 9f 00 64 stw r28,100(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a8cc: 38 63 2c a8 addi r3,r3,11432 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc0a8d0: 91 3f 00 68 stw r9,104(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a8d4: 38 9f 00 48 addi r4,r31,72 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc0a8d8: 90 1f 00 6c stw r0,108(r31) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a8dc: 93 bf 00 54 stw r29,84(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0a8e0: 90 1f 00 50 stw r0,80(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a8e4: 48 00 0e cd bl ffc0b7b0 <_Watchdog_Insert> <== ALWAYS TAKEN } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) ffc0a8e8: 80 1e 00 34 lwz r0,52(r30) ffc0a8ec: 2f 80 00 01 cmpwi cr7,r0,1 ffc0a8f0: 41 9e 00 10 beq- cr7,ffc0a900 <_Thread_queue_Enqueue_with_handler+0x88> ffc0a8f4: 3d 20 ff c1 lis r9,-63 ffc0a8f8: 38 09 e1 84 addi r0,r9,-7804 ffc0a8fc: 48 00 00 0c b ffc0a908 <_Thread_queue_Enqueue_with_handler+0x90> <== ALWAYS TAKEN ffc0a900: 3d 20 ff c1 lis r9,-63 ffc0a904: 38 09 a9 50 addi r0,r9,-22192 enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); ffc0a908: 7f c3 f3 78 mr r3,r30 ffc0a90c: 7c 09 03 a6 mtctr r0 ffc0a910: 7f e4 fb 78 mr r4,r31 <== ALWAYS TAKEN ffc0a914: 38 a1 00 08 addi r5,r1,8 ffc0a918: 4e 80 04 21 bctrl <== ALWAYS TAKEN if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) ffc0a91c: 2f 83 00 01 cmpwi cr7,r3,1 ffc0a920: 41 9e 00 10 beq- cr7,ffc0a930 <_Thread_queue_Enqueue_with_handler+0xb8> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); ffc0a924: 80 a1 00 08 lwz r5,8(r1) ffc0a928: 7f e4 fb 78 mr r4,r31 ffc0a92c: 4b ff f2 91 bl ffc09bbc <_Thread_blocking_operation_Cancel> <== ALWAYS TAKEN } ffc0a930: 80 01 00 2c lwz r0,44(r1) ffc0a934: 83 81 00 18 lwz r28,24(r1) ffc0a938: 7c 08 03 a6 mtlr r0 ffc0a93c: 83 a1 00 1c lwz r29,28(r1) ffc0a940: 83 c1 00 20 lwz r30,32(r1) ffc0a944: 83 e1 00 24 lwz r31,36(r1) ffc0a948: 38 21 00 28 addi r1,r1,40 ffc0a94c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e1d8 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0e1d8: 7c 08 02 a6 mflr r0 ffc0e1dc: 94 21 ff f8 stwu r1,-8(r1) ffc0e1e0: 90 01 00 0c stw r0,12(r1) /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) ffc0e1e4: 80 03 00 34 lwz r0,52(r3) ffc0e1e8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0e1ec: 40 be 00 10 bne+ cr7,ffc0e1fc <_Thread_queue_Extract+0x24> _Thread_queue_Extract_priority( the_thread_queue, the_thread ); ffc0e1f0: 38 a0 00 00 li r5,0 ffc0e1f4: 48 00 00 1d bl ffc0e210 <_Thread_queue_Extract_priority_helper> <== ALWAYS TAKEN ffc0e1f8: 48 00 00 08 b ffc0e200 <_Thread_queue_Extract+0x28> <== ALWAYS TAKEN else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); ffc0e1fc: 48 00 1b 4d bl ffc0fd48 <_Thread_queue_Extract_fifo> <== ALWAYS TAKEN } ffc0e200: 80 01 00 0c lwz r0,12(r1) ffc0e204: 38 21 00 08 addi r1,r1,8 ffc0e208: 7c 08 03 a6 mtlr r0 ffc0e20c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0fd48 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { ffc0fd48: 94 21 ff f0 stwu r1,-16(r1) ffc0fd4c: 7c 08 02 a6 mflr r0 ffc0fd50: 90 01 00 14 stw r0,20(r1) ffc0fd54: 93 e1 00 0c stw r31,12(r1) ffc0fd58: 7c 9f 23 78 mr r31,r4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0fd5c: 7c 00 00 a6 mfmsr r0 ffc0fd60: 7d 30 42 a6 mfsprg r9,0 ffc0fd64: 7c 09 48 78 andc r9,r0,r9 ffc0fd68: 7d 20 01 24 mtmsr r9 ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { ffc0fd6c: 3d 60 00 03 lis r11,3 ffc0fd70: 81 24 00 10 lwz r9,16(r4) ffc0fd74: 61 6b be e0 ori r11,r11,48864 ffc0fd78: 7d 6a 48 39 and. r10,r11,r9 ffc0fd7c: 40 a2 00 0c bne+ ffc0fd88 <_Thread_queue_Extract_fifo+0x40> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0fd80: 7c 00 01 24 mtmsr r0 ffc0fd84: 48 00 00 54 b ffc0fdd8 <_Thread_queue_Extract_fifo+0x90> <== ALWAYS TAKEN _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc0fd88: 81 64 00 50 lwz r11,80(r4) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; ffc0fd8c: 39 40 00 00 li r10,0 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0fd90: 81 24 00 00 lwz r9,0(r4) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc0fd94: 2f 8b 00 02 cmpwi cr7,r11,2 previous = the_node->previous; ffc0fd98: 81 64 00 04 lwz r11,4(r4) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; ffc0fd9c: 91 44 00 44 stw r10,68(r4) next->previous = previous; previous->next = next; ffc0fda0: 91 2b 00 00 stw r9,0(r11) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0fda4: 91 69 00 04 stw r11,4(r9) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc0fda8: 41 9e 00 0c beq- cr7,ffc0fdb4 <_Thread_queue_Extract_fifo+0x6c> ffc0fdac: 7c 00 01 24 mtmsr r0 ffc0fdb0: 48 00 00 18 b ffc0fdc8 <_Thread_queue_Extract_fifo+0x80> <== ALWAYS TAKEN ffc0fdb4: 39 20 00 03 li r9,3 ffc0fdb8: 91 24 00 50 stw r9,80(r4) ffc0fdbc: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc0fdc0: 38 64 00 48 addi r3,r4,72 ffc0fdc4: 4b ff bb 45 bl ffc0b908 <_Watchdog_Remove> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc0fdc8: 3c 80 10 03 lis r4,4099 ffc0fdcc: 7f e3 fb 78 mr r3,r31 ffc0fdd0: 60 84 ff f8 ori r4,r4,65528 ffc0fdd4: 4b ff 9f f5 bl ffc09dc8 <_Thread_Clear_state> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } ffc0fdd8: 80 01 00 14 lwz r0,20(r1) ffc0fddc: 83 e1 00 0c lwz r31,12(r1) ffc0fde0: 38 21 00 10 addi r1,r1,16 ffc0fde4: 7c 08 03 a6 mtlr r0 ffc0fde8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e210 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { ffc0e210: 94 21 ff f0 stwu r1,-16(r1) ffc0e214: 7c 08 02 a6 mflr r0 ffc0e218: 90 01 00 14 stw r0,20(r1) ffc0e21c: 93 e1 00 0c stw r31,12(r1) ffc0e220: 7c 9f 23 78 mr r31,r4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0e224: 7c 00 00 a6 mfmsr r0 ffc0e228: 7d 30 42 a6 mfsprg r9,0 ffc0e22c: 7c 09 48 78 andc r9,r0,r9 ffc0e230: 7d 20 01 24 mtmsr r9 Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { ffc0e234: 3d 60 00 03 lis r11,3 ffc0e238: 81 24 00 10 lwz r9,16(r4) <== ALWAYS TAKEN ffc0e23c: 61 6b be e0 ori r11,r11,48864 ffc0e240: 7d 6a 48 39 and. r10,r11,r9 ffc0e244: 40 a2 00 08 bne+ ffc0e24c <_Thread_queue_Extract_priority_helper+0x3c> _ISR_Enable( level ); ffc0e248: 48 00 00 70 b ffc0e2b8 <_Thread_queue_Extract_priority_helper+0xa8> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc0e24c: 81 24 00 38 lwz r9,56(r4) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0e250: 39 64 00 3c addi r11,r4,60 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; ffc0e254: 81 44 00 00 lwz r10,0(r4) ffc0e258: 7f 89 58 00 cmpw cr7,r9,r11 previous_node = the_node->previous; ffc0e25c: 81 64 00 04 lwz r11,4(r4) ffc0e260: 41 9e 00 48 beq- cr7,ffc0e2a8 <_Thread_queue_Extract_priority_helper+0x98> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; ffc0e264: 81 04 00 40 lwz r8,64(r4) new_second_node = new_first_node->next; ffc0e268: 80 e9 00 00 lwz r7,0(r9) previous_node->next = new_first_node; next_node->previous = new_first_node; ffc0e26c: 91 2a 00 04 stw r9,4(r10) new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; ffc0e270: 91 2b 00 00 stw r9,0(r11) next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; ffc0e274: 91 69 00 04 stw r11,4(r9) last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; ffc0e278: 91 49 00 00 stw r10,0(r9) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { ffc0e27c: 81 44 00 38 lwz r10,56(r4) ffc0e280: 81 64 00 40 lwz r11,64(r4) ffc0e284: 7f 8a 58 00 cmpw cr7,r10,r11 ffc0e288: 41 9e 00 28 beq- cr7,ffc0e2b0 <_Thread_queue_Extract_priority_helper+0xa0> new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); ffc0e28c: 39 69 00 3c addi r11,r9,60 new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ new_second_node->previous = ffc0e290: 39 49 00 38 addi r10,r9,56 ffc0e294: 91 47 00 04 stw r10,4(r7) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; ffc0e298: 90 e9 00 38 stw r7,56(r9) new_first_thread->Wait.Block2n.last = last_node; ffc0e29c: 91 09 00 40 stw r8,64(r9) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); ffc0e2a0: 91 68 00 00 stw r11,0(r8) ffc0e2a4: 48 00 00 0c b ffc0e2b0 <_Thread_queue_Extract_priority_helper+0xa0> <== ALWAYS TAKEN } } else { previous_node->next = next_node; next_node->previous = previous_node; ffc0e2a8: 91 6a 00 04 stw r11,4(r10) new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; ffc0e2ac: 91 4b 00 00 stw r10,0(r11) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { ffc0e2b0: 2f 85 00 00 cmpwi cr7,r5,0 ffc0e2b4: 41 be 00 0c beq+ cr7,ffc0e2c0 <_Thread_queue_Extract_priority_helper+0xb0> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0e2b8: 7c 00 01 24 mtmsr r0 ffc0e2bc: 48 00 00 3c b ffc0e2f8 <_Thread_queue_Extract_priority_helper+0xe8> <== ALWAYS TAKEN _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc0e2c0: 81 3f 00 50 lwz r9,80(r31) ffc0e2c4: 2f 89 00 02 cmpwi cr7,r9,2 ffc0e2c8: 41 9e 00 0c beq- cr7,ffc0e2d4 <_Thread_queue_Extract_priority_helper+0xc4> ffc0e2cc: 7c 00 01 24 mtmsr r0 ffc0e2d0: 48 00 00 18 b ffc0e2e8 <_Thread_queue_Extract_priority_helper+0xd8> <== ALWAYS TAKEN ffc0e2d4: 39 20 00 03 li r9,3 ffc0e2d8: 91 3f 00 50 stw r9,80(r31) ffc0e2dc: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc0e2e0: 38 7f 00 48 addi r3,r31,72 ffc0e2e4: 4b ff d6 25 bl ffc0b908 <_Watchdog_Remove> <== ALWAYS TAKEN ffc0e2e8: 3c 80 10 03 lis r4,4099 ffc0e2ec: 7f e3 fb 78 mr r3,r31 ffc0e2f0: 60 84 ff f8 ori r4,r4,65528 ffc0e2f4: 4b ff ba d5 bl ffc09dc8 <_Thread_Clear_state> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } ffc0e2f8: 80 01 00 14 lwz r0,20(r1) ffc0e2fc: 83 e1 00 0c lwz r31,12(r1) ffc0e300: 38 21 00 10 addi r1,r1,16 ffc0e304: 7c 08 03 a6 mtlr r0 ffc0e308: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0aafc <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { ffc0aafc: 7c 08 02 a6 mflr r0 ffc0ab00: 94 21 ff f8 stwu r1,-8(r1) States_Control state; state = the_thread->current_state; ffc0ab04: 3d 20 00 03 lis r9,3 */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { ffc0ab08: 90 01 00 0c stw r0,12(r1) States_Control state; state = the_thread->current_state; ffc0ab0c: 61 29 be e0 ori r9,r9,48864 */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { ffc0ab10: 7c 64 1b 78 mr r4,r3 States_Control state; state = the_thread->current_state; ffc0ab14: 80 03 00 10 lwz r0,16(r3) ffc0ab18: 38 60 00 00 li r3,0 ffc0ab1c: 7d 2b 00 39 and. r11,r9,r0 ffc0ab20: 41 a2 00 10 beq+ ffc0ab30 <_Thread_queue_Extract_with_proxy+0x34> if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); ffc0ab24: 80 64 00 44 lwz r3,68(r4) ffc0ab28: 48 00 36 b1 bl ffc0e1d8 <_Thread_queue_Extract> <== ALWAYS TAKEN ffc0ab2c: 38 60 00 01 li r3,1 return true; } return false; } ffc0ab30: 80 01 00 0c lwz r0,12(r1) ffc0ab34: 38 21 00 08 addi r1,r1,8 ffc0ab38: 7c 08 03 a6 mtlr r0 ffc0ab3c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc20cb8 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { ffc20cb8: 7c 08 02 a6 mflr r0 ffc20cbc: 94 21 ff f8 stwu r1,-8(r1) ffc20cc0: 90 01 00 0c stw r0,12(r1) Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) ffc20cc4: 80 03 00 34 lwz r0,52(r3) ffc20cc8: 2f 80 00 01 cmpwi cr7,r0,1 ffc20ccc: 41 9e 00 10 beq- cr7,ffc20cdc <_Thread_queue_First+0x24> ffc20cd0: 3d 20 ff c2 lis r9,-62 ffc20cd4: 38 09 24 fc addi r0,r9,9468 ffc20cd8: 48 00 00 0c b ffc20ce4 <_Thread_queue_First+0x2c> <== ALWAYS TAKEN ffc20cdc: 3d 20 ff c2 lis r9,-62 ffc20ce0: 38 09 0c fc addi r0,r9,3324 first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); ffc20ce4: 7c 09 03 a6 mtctr r0 ffc20ce8: 4e 80 04 21 bctrl <== ALWAYS TAKEN } ffc20cec: 80 01 00 0c lwz r0,12(r1) ffc20cf0: 38 21 00 08 addi r1,r1,8 ffc20cf4: 7c 08 03 a6 mtlr r0 ffc20cf8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc224fc <_Thread_queue_First_fifo>: */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc224fc: 80 03 00 00 lwz r0,0(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc22500: 38 63 00 04 addi r3,r3,4 ffc22504: 7c 09 1a 78 xor r9,r0,r3 ffc22508: 7d 2b fe 70 srawi r11,r9,31 ffc2250c: 7d 63 4a 78 xor r3,r11,r9 ffc22510: 7c 63 58 50 subf r3,r3,r11 ffc22514: 7c 63 fe 70 srawi r3,r3,31 <== ALWAYS TAKEN { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } ffc22518: 7c 03 18 38 and r3,r0,r3 ffc2251c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc20cfc <_Thread_queue_First_priority>: */ Thread_Control *_Thread_queue_First_priority ( Thread_queue_Control *the_thread_queue ) { ffc20cfc: 38 00 00 04 li r0,4 ffc20d00: 7c 09 03 a6 mtctr r0 ffc20d04: 7c 69 1b 78 mr r9,r3 ffc20d08: 39 60 00 00 li r11,0 ffc20d0c: 81 49 00 00 lwz r10,0(r9) ffc20d10: 38 09 00 04 addi r0,r9,4 uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { ffc20d14: 39 29 00 0c addi r9,r9,12 ffc20d18: 7f 8a 00 00 cmpw cr7,r10,r0 ffc20d1c: 41 be 00 10 beq+ cr7,ffc20d2c <_Thread_queue_First_priority+0x30> if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) ffc20d20: 1d 6b 00 0c mulli r11,r11,12 ffc20d24: 7c 63 58 2e lwzx r3,r3,r11 ffc20d28: 4e 80 00 20 blr <== ALWAYS TAKEN { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { ffc20d2c: 39 6b 00 01 addi r11,r11,1 Thread_queue_Control *the_thread_queue ) { uint32_t index; for( index=0 ; ffc20d30: 42 00 ff dc bdnz+ ffc20d0c <_Thread_queue_First_priority+0x10> ffc20d34: 38 60 00 00 li r3,0 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) the_thread_queue->Queues.Priority[ index ].first; } return NULL; } ffc20d38: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ab40 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { ffc0ab40: 94 21 ff f0 stwu r1,-16(r1) ffc0ab44: 7c 08 02 a6 mflr r0 ffc0ab48: 93 c1 00 08 stw r30,8(r1) <== ALWAYS TAKEN ffc0ab4c: 7c be 2b 78 mr r30,r5 ffc0ab50: 93 e1 00 0c stw r31,12(r1) ffc0ab54: 7c 7f 1b 78 mr r31,r3 ffc0ab58: 90 01 00 14 stw r0,20(r1) Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { ffc0ab5c: 48 00 00 08 b ffc0ab64 <_Thread_queue_Flush+0x24> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; ffc0ab60: 93 c3 00 34 stw r30,52(r3) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { ffc0ab64: 7f e3 fb 78 mr r3,r31 ffc0ab68: 4b ff fb 55 bl ffc0a6bc <_Thread_queue_Dequeue> <== ALWAYS TAKEN ffc0ab6c: 2c 03 00 00 cmpwi r3,0 ffc0ab70: 40 82 ff f0 bne+ ffc0ab60 <_Thread_queue_Flush+0x20> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } ffc0ab74: 80 01 00 14 lwz r0,20(r1) ffc0ab78: 83 c1 00 08 lwz r30,8(r1) <== ALWAYS TAKEN ffc0ab7c: 7c 08 03 a6 mtlr r0 ffc0ab80: 83 e1 00 0c lwz r31,12(r1) ffc0ab84: 38 21 00 10 addi r1,r1,16 ffc0ab88: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ab8c <_Thread_queue_Initialize>: the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { ffc0ab8c: 2f 84 00 01 cmpwi cr7,r4,1 Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { the_thread_queue->state = state; ffc0ab90: 90 a3 00 38 stw r5,56(r3) the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0ab94: 38 00 00 00 li r0,0 <== ALWAYS TAKEN uint32_t timeout_status ) { the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; ffc0ab98: 90 c3 00 3c stw r6,60(r3) States_Control state, uint32_t timeout_status ) { the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; ffc0ab9c: 90 83 00 34 stw r4,52(r3) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0aba0: 90 03 00 30 stw r0,48(r3) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { ffc0aba4: 40 be 00 28 bne+ cr7,ffc0abcc <_Thread_queue_Initialize+0x40> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc0aba8: 39 20 00 04 li r9,4 ffc0abac: 7d 29 03 a6 mtctr r9 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0abb0: 39 23 00 04 addi r9,r3,4 the_chain->permanent_null = NULL; ffc0abb4: 90 03 00 04 stw r0,4(r3) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0abb8: 91 23 00 00 stw r9,0(r3) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0abbc: 90 63 00 08 stw r3,8(r3) <== ALWAYS TAKEN ffc0abc0: 38 63 00 0c addi r3,r3,12 uint32_t index; for( index=0 ; ffc0abc4: 42 00 ff ec bdnz+ ffc0abb0 <_Thread_queue_Initialize+0x24> ffc0abc8: 4e 80 00 20 blr <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0abcc: 39 23 00 04 addi r9,r3,4 the_chain->permanent_null = NULL; ffc0abd0: 90 03 00 04 stw r0,4(r3) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0abd4: 91 23 00 00 stw r9,0(r3) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0abd8: 90 63 00 08 stw r3,8(r3) ffc0abdc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e30c <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { ffc0e30c: 7c 08 02 a6 mflr r0 ffc0e310: 94 21 ff f8 stwu r1,-8(r1) ffc0e314: 7c 64 1b 78 mr r4,r3 ffc0e318: 90 01 00 0c stw r0,12(r1) Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; ffc0e31c: 81 23 00 44 lwz r9,68(r3) * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && ffc0e320: 80 09 00 30 lwz r0,48(r9) ffc0e324: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e328: 41 9e 00 30 beq- cr7,ffc0e358 <_Thread_queue_Process_timeout+0x4c> ffc0e32c: 3d 60 00 00 lis r11,0 ffc0e330: 81 6b 27 6c lwz r11,10092(r11) ffc0e334: 7f 83 58 00 cmpw cr7,r3,r11 ffc0e338: 40 be 00 20 bne+ cr7,ffc0e358 <_Thread_queue_Process_timeout+0x4c> _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { ffc0e33c: 2f 80 00 03 cmpwi cr7,r0,3 ffc0e340: 41 9e 00 28 beq- cr7,ffc0e368 <_Thread_queue_Process_timeout+0x5c> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ffc0e344: 80 09 00 3c lwz r0,60(r9) ffc0e348: 90 03 00 34 stw r0,52(r3) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc0e34c: 38 00 00 02 li r0,2 ffc0e350: 90 09 00 30 stw r0,48(r9) ffc0e354: 48 00 00 14 b ffc0e368 <_Thread_queue_Process_timeout+0x5c> <== ALWAYS TAKEN } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ffc0e358: 80 09 00 3c lwz r0,60(r9) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); ffc0e35c: 80 64 00 44 lwz r3,68(r4) if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ffc0e360: 90 04 00 34 stw r0,52(r4) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); ffc0e364: 4b ff fe 75 bl ffc0e1d8 <_Thread_queue_Extract> <== ALWAYS TAKEN } } ffc0e368: 80 01 00 0c lwz r0,12(r1) ffc0e36c: 38 21 00 08 addi r1,r1,8 ffc0e370: 7c 08 03 a6 mtlr r0 ffc0e374: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0abe0 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0abe0: 94 21 ff d8 stwu r1,-40(r1) ffc0abe4: 7c 08 02 a6 mflr r0 ffc0abe8: 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 ) ffc0abec: 7c 7f 1b 79 mr. r31,r3 void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0abf0: 93 c1 00 20 stw r30,32(r1) ffc0abf4: 7c 9e 23 78 mr r30,r4 ffc0abf8: 90 01 00 2c stw r0,44(r1) ffc0abfc: 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 ) ffc0ac00: 41 82 00 54 beq- ffc0ac54 <_Thread_queue_Requeue+0x74> <== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { ffc0ac04: 80 1f 00 34 lwz r0,52(r31) ffc0ac08: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ac0c: 40 be 00 48 bne+ cr7,ffc0ac54 <_Thread_queue_Requeue+0x74> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ac10: 7f a0 00 a6 mfmsr r29 ffc0ac14: 7d 30 42 a6 mfsprg r9,0 ffc0ac18: 7f a9 48 78 andc r9,r29,r9 ffc0ac1c: 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 ) ) { ffc0ac20: 3d 60 00 03 lis r11,3 ffc0ac24: 81 24 00 10 lwz r9,16(r4) ffc0ac28: 61 6b be e0 ori r11,r11,48864 ffc0ac2c: 7d 6a 48 39 and. r10,r11,r9 ffc0ac30: 41 a2 00 20 beq+ ffc0ac50 <_Thread_queue_Requeue+0x70> <== NEVER TAKEN ffc0ac34: 90 1f 00 30 stw r0,48(r31) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); ffc0ac38: 38 a0 00 01 li r5,1 ffc0ac3c: 48 00 35 d5 bl ffc0e210 <_Thread_queue_Extract_priority_helper> <== ALWAYS TAKEN (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); ffc0ac40: 7f e3 fb 78 mr r3,r31 ffc0ac44: 7f c4 f3 78 mr r4,r30 ffc0ac48: 38 a1 00 08 addi r5,r1,8 ffc0ac4c: 4b ff fd 05 bl ffc0a950 <_Thread_queue_Enqueue_priority> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ac50: 7f a0 01 24 mtmsr r29 } _ISR_Enable( level ); } } ffc0ac54: 80 01 00 2c lwz r0,44(r1) ffc0ac58: 83 a1 00 1c lwz r29,28(r1) ffc0ac5c: 7c 08 03 a6 mtlr r0 ffc0ac60: 83 c1 00 20 lwz r30,32(r1) ffc0ac64: 83 e1 00 24 lwz r31,36(r1) ffc0ac68: 38 21 00 28 addi r1,r1,40 ffc0ac6c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ac70 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0ac70: 94 21 ff e8 stwu r1,-24(r1) ffc0ac74: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0ac78: 38 81 00 08 addi r4,r1,8 void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0ac7c: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0ac80: 4b ff f6 4d bl ffc0a2cc <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc0ac84: 80 01 00 08 lwz r0,8(r1) ffc0ac88: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ac8c: 40 9e 00 18 bne- cr7,ffc0aca4 <_Thread_queue_Timeout+0x34> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); ffc0ac90: 48 00 36 7d bl ffc0e30c <_Thread_queue_Process_timeout> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0ac94: 3d 20 00 00 lis r9,0 ffc0ac98: 81 69 27 2c lwz r11,10028(r9) ffc0ac9c: 38 0b ff ff addi r0,r11,-1 ffc0aca0: 90 09 27 2c stw r0,10028(r9) _Thread_Unnest_dispatch(); break; } } ffc0aca4: 80 01 00 1c lwz r0,28(r1) ffc0aca8: 38 21 00 18 addi r1,r1,24 ffc0acac: 7c 08 03 a6 mtlr r0 ffc0acb0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d518 <_Timer_Manager_initialization>: * Output parameters: NONE */ void _Timer_Manager_initialization(void) { _Objects_Initialize_information( ffc0d518: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Timer_Manager_initialization(void) { ffc0d51c: 94 21 ff f8 stwu r1,-8(r1) ffc0d520: 7c 08 02 a6 mflr r0 _Objects_Initialize_information( ffc0d524: 3c 60 00 00 lis r3,0 ffc0d528: 80 c9 20 78 lwz r6,8312(r9) ffc0d52c: 38 63 2f 84 addi r3,r3,12164 ffc0d530: 39 20 00 04 li r9,4 <== ALWAYS TAKEN * * Output parameters: NONE */ void _Timer_Manager_initialization(void) { ffc0d534: 90 01 00 0c stw r0,12(r1) _Objects_Initialize_information( ffc0d538: 38 80 00 02 li r4,2 ffc0d53c: 38 a0 00 02 li r5,2 ffc0d540: 38 e0 00 3c li r7,60 ffc0d544: 39 00 00 00 li r8,0 ffc0d548: 4b ff c3 29 bl ffc09870 <_Objects_Initialize_information> <== ALWAYS TAKEN /* * Initialize the pointer to the default timer server control block to NULL * indicating that task-based timer support is not initialized. */ _Timer_server = NULL; ffc0d54c: 38 00 00 00 li r0,0 ffc0d550: 3d 20 00 00 lis r9,0 ffc0d554: 90 09 27 ac stw r0,10156(r9) } ffc0d558: 80 01 00 0c lwz r0,12(r1) <== ALWAYS TAKEN ffc0d55c: 38 21 00 08 addi r1,r1,8 ffc0d560: 7c 08 03 a6 mtlr r0 ffc0d564: 4e 80 00 20 blr <== ALWAYS TAKEN ffc19640 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc19640: 94 21 ff 98 stwu r1,-104(r1) ffc19644: 7c 08 02 a6 mflr r0 ffc19648: 92 01 00 28 stw r16,40(r1) Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc1964c: 3a 01 00 08 addi r16,r1,8 ffc19650: 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; ffc19654: 38 00 00 00 li r0,0 ffc19658: 93 01 00 48 stw r24,72(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc1965c: 3b 01 00 0c addi r24,r1,12 ffc19660: 93 61 00 54 stw r27,84(r1) ffc19664: 3b 61 00 18 addi r27,r1,24 ffc19668: 93 c1 00 60 stw r30,96(r1) ffc1966c: 3b c1 00 14 addi r30,r1,20 ffc19670: 92 21 00 2c stw r17,44(r1) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc19674: 3e 20 00 00 lis r17,0 ffc19678: 3a 31 28 7c addi r17,r17,10364 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1967c: 92 41 00 30 stw r18,48(r1) static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc19680: 3e 40 00 00 lis r18,0 ffc19684: 3a 52 28 44 addi r18,r18,10308 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc19688: 93 21 00 4c stw r25,76(r1) ffc1968c: 3f 20 00 00 lis r25,0 ffc19690: 3b 39 28 24 addi r25,r25,10276 ffc19694: 93 a1 00 5c stw r29,92(r1) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc19698: 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); ffc1969c: 93 01 00 08 stw r24,8(r1) the_chain->permanent_null = NULL; ffc196a0: 90 01 00 0c stw r0,12(r1) the_chain->last = _Chain_Head(the_chain); ffc196a4: 92 01 00 10 stw r16,16(r1) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc196a8: 93 61 00 14 stw r27,20(r1) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc196ac: 93 c1 00 1c stw r30,28(r1) ffc196b0: 92 61 00 34 stw r19,52(r1) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc196b4: 3a 63 00 08 addi r19,r3,8 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc196b8: 92 81 00 38 stw r20,56(r1) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc196bc: 3a 83 00 40 addi r20,r3,64 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc196c0: 92 a1 00 3c stw r21,60(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) ffc196c4: 3a a0 00 00 li r21,0 ffc196c8: 92 c1 00 40 stw r22,64(r1) * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; ffc196cc: 3a c0 00 00 li r22,0 <== ALWAYS TAKEN * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc196d0: 92 e1 00 44 stw r23,68(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; ffc196d4: 3a e0 00 01 li r23,1 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc196d8: 93 41 00 50 stw r26,80(r1) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc196dc: 3b 43 00 30 addi r26,r3,48 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc196e0: 93 81 00 58 stw r28,88(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 ); ffc196e4: 3b 83 00 68 addi r28,r3,104 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc196e8: 93 e1 00 64 stw r31,100(r1) ffc196ec: 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; ffc196f0: 92 1f 00 78 stw r16,120(r31) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc196f4: 80 11 00 00 lwz r0,0(r17) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc196f8: 7f c5 f3 78 mr r5,r30 Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc196fc: 80 9f 00 3c lwz r4,60(r31) watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc19700: 7f 43 d3 78 mr r3,r26 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; ffc19704: 90 1f 00 3c stw r0,60(r31) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc19708: 7c 84 00 50 subf r4,r4,r0 ffc1970c: 48 00 4d 5d bl ffc1e468 <_Watchdog_Adjust_to_chain> <== ALWAYS TAKEN static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc19710: 83 b2 00 00 lwz r29,0(r18) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc19714: 80 bf 00 74 lwz r5,116(r31) /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { ffc19718: 7f 9d 28 40 cmplw cr7,r29,r5 ffc1971c: 40 bd 00 18 ble+ cr7,ffc19734 <_Timer_server_Body+0xf4> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc19720: 7c 85 e8 50 subf r4,r5,r29 ffc19724: 7f 83 e3 78 mr r3,r28 ffc19728: 7f c5 f3 78 mr r5,r30 ffc1972c: 48 00 4d 3d bl ffc1e468 <_Watchdog_Adjust_to_chain> <== ALWAYS TAKEN ffc19730: 48 00 00 18 b ffc19748 <_Timer_server_Body+0x108> <== ALWAYS TAKEN } else if ( snapshot < last_snapshot ) { ffc19734: 40 bc 00 14 bge+ cr7,ffc19748 <_Timer_server_Body+0x108> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); ffc19738: 7c bd 28 50 subf r5,r29,r5 ffc1973c: 7f 83 e3 78 mr r3,r28 ffc19740: 38 80 00 01 li r4,1 ffc19744: 48 00 4c 41 bl ffc1e384 <_Watchdog_Adjust> <== ALWAYS TAKEN } watchdogs->last_snapshot = snapshot; ffc19748: 93 bf 00 74 stw r29,116(r31) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc1974c: 80 7f 00 78 lwz r3,120(r31) ffc19750: 48 00 0b 1d bl ffc1a26c <_Chain_Get> <== ALWAYS TAKEN if ( timer == NULL ) { ffc19754: 7c 64 1b 79 mr. r4,r3 ffc19758: 41 82 00 34 beq- ffc1978c <_Timer_server_Body+0x14c> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1975c: 80 04 00 38 lwz r0,56(r4) ffc19760: 2f 00 00 01 cmpwi cr6,r0,1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc19764: 2f 80 00 03 cmpwi cr7,r0,3 static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc19768: 40 ba 00 10 bne+ cr6,ffc19778 <_Timer_server_Body+0x138> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1976c: 38 84 00 10 addi r4,r4,16 ffc19770: 7f 43 d3 78 mr r3,r26 ffc19774: 48 00 00 10 b ffc19784 <_Timer_server_Body+0x144> <== ALWAYS TAKEN } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc19778: 40 9e ff d4 bne+ cr7,ffc1974c <_Timer_server_Body+0x10c> <== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1977c: 38 84 00 10 addi r4,r4,16 ffc19780: 7f 83 e3 78 mr r3,r28 ffc19784: 48 00 4d 9d bl ffc1e520 <_Watchdog_Insert> <== ALWAYS TAKEN ffc19788: 4b ff ff c4 b ffc1974c <_Timer_server_Body+0x10c> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1978c: 7c 00 00 a6 mfmsr r0 ffc19790: 7d 30 42 a6 mfsprg r9,0 ffc19794: 7c 09 48 78 andc r9,r0,r9 ffc19798: 7d 20 01 24 mtmsr r9 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ffc1979c: 81 21 00 08 lwz r9,8(r1) ffc197a0: 7f 89 c0 00 cmpw cr7,r9,r24 ffc197a4: 40 be 00 1c bne+ cr7,ffc197c0 <_Timer_server_Body+0x180> <== NEVER TAKEN ts->insert_chain = NULL; ffc197a8: 90 9f 00 78 stw r4,120(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc197ac: 7c 00 01 24 mtmsr r0 _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 ) ) { ffc197b0: 80 01 00 14 lwz r0,20(r1) ffc197b4: 7f 80 d8 00 cmpw cr7,r0,r27 ffc197b8: 40 be 00 10 bne+ cr7,ffc197c8 <_Timer_server_Body+0x188> ffc197bc: 48 00 00 64 b ffc19820 <_Timer_server_Body+0x1e0> <== ALWAYS TAKEN ffc197c0: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED ffc197c4: 4b ff ff 30 b ffc196f4 <_Timer_server_Body+0xb4> <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc197c8: 7c 00 00 a6 mfmsr r0 ffc197cc: 7d 30 42 a6 mfsprg r9,0 ffc197d0: 7c 09 48 78 andc r9,r0,r9 ffc197d4: 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)); ffc197d8: 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)) ffc197dc: 7f 09 d8 00 cmpw cr6,r9,r27 * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { ffc197e0: 2f 89 00 00 cmpwi cr7,r9,0 ffc197e4: 41 9a 00 34 beq- cr6,ffc19818 <_Timer_server_Body+0x1d8> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; ffc197e8: 81 69 00 00 lwz r11,0(r9) the_chain->first = new_first; ffc197ec: 91 61 00 14 stw r11,20(r1) new_first->previous = _Chain_Head(the_chain); ffc197f0: 93 cb 00 04 stw r30,4(r11) ffc197f4: 41 9e 00 24 beq- cr7,ffc19818 <_Timer_server_Body+0x1d8> <== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; ffc197f8: 92 a9 00 08 stw r21,8(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc197fc: 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 ); ffc19800: 80 09 00 1c lwz r0,28(r9) ffc19804: 80 89 00 24 lwz r4,36(r9) ffc19808: 80 69 00 20 lwz r3,32(r9) ffc1980c: 7c 09 03 a6 mtctr r0 ffc19810: 4e 80 04 21 bctrl <== ALWAYS TAKEN } ffc19814: 4b ff ff b4 b ffc197c8 <_Timer_server_Body+0x188> <== ALWAYS TAKEN ffc19818: 7c 00 01 24 mtmsr r0 ffc1981c: 4b ff fe d4 b ffc196f0 <_Timer_server_Body+0xb0> <== ALWAYS TAKEN } else { ts->active = false; ffc19820: 9a df 00 7c stb r22,124(r31) ffc19824: 81 39 00 00 lwz r9,0(r25) ffc19828: 38 09 00 01 addi r0,r9,1 ffc1982c: 90 19 00 00 stw r0,0(r25) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); ffc19830: 80 7f 00 00 lwz r3,0(r31) ffc19834: 38 80 00 08 li r4,8 ffc19838: 48 00 3f b1 bl ffc1d7e8 <_Thread_Set_state> <== ALWAYS TAKEN _Timer_server_Reset_interval_system_watchdog( ts ); ffc1983c: 7f e3 fb 78 mr r3,r31 ffc19840: 4b ff fd 01 bl ffc19540 <_Timer_server_Reset_interval_system_watchdog> <== ALWAYS TAKEN _Timer_server_Reset_tod_system_watchdog( ts ); ffc19844: 7f e3 fb 78 mr r3,r31 ffc19848: 4b ff fd 79 bl ffc195c0 <_Timer_server_Reset_tod_system_watchdog> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc1984c: 48 00 33 79 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ts->active = true; ffc19850: 9a ff 00 7c stb r23,124(r31) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc19854: 7e 63 9b 78 mr r3,r19 ffc19858: 48 00 4e 21 bl ffc1e678 <_Watchdog_Remove> <== ALWAYS TAKEN static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc1985c: 7e 83 a3 78 mr r3,r20 ffc19860: 48 00 4e 19 bl ffc1e678 <_Watchdog_Remove> <== ALWAYS TAKEN ffc19864: 4b ff fe 8c b ffc196f0 <_Timer_server_Body+0xb0> <== ALWAYS TAKEN ffc19540 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { ffc19540: 94 21 ff f0 stwu r1,-16(r1) ffc19544: 7c 08 02 a6 mflr r0 ffc19548: 93 c1 00 08 stw r30,8(r1) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc1954c: 3b c3 00 08 addi r30,r3,8 } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { ffc19550: 93 e1 00 0c stw r31,12(r1) ffc19554: 7c 7f 1b 78 mr r31,r3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc19558: 7f c3 f3 78 mr r3,r30 } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { ffc1955c: 90 01 00 14 stw r0,20(r1) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc19560: 48 00 51 19 bl ffc1e678 <_Watchdog_Remove> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc19564: 7c 00 00 a6 mfmsr r0 ffc19568: 7d 30 42 a6 mfsprg r9,0 ffc1956c: 7c 09 48 78 andc r9,r0,r9 ffc19570: 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)); ffc19574: 81 3f 00 30 lwz r9,48(r31) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc19578: 39 7f 00 34 addi r11,r31,52 ffc1957c: 7f 89 58 00 cmpw cr7,r9,r11 ffc19580: 41 9e 00 24 beq- cr7,ffc195a4 <_Timer_server_Reset_interval_system_watchdog+0x64> _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; ffc19584: 81 29 00 10 lwz r9,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc19588: 7c 00 01 24 mtmsr r0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc1958c: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc19590: 91 3f 00 14 stw r9,20(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc19594: 38 63 70 e8 addi r3,r3,28904 ffc19598: 7f c4 f3 78 mr r4,r30 ffc1959c: 48 00 4f 85 bl ffc1e520 <_Watchdog_Insert> <== ALWAYS TAKEN ffc195a0: 48 00 00 08 b ffc195a8 <_Timer_server_Reset_interval_system_watchdog+0x68> <== ALWAYS TAKEN ffc195a4: 7c 00 01 24 mtmsr r0 delta_interval ); } else { _ISR_Enable( level ); } } ffc195a8: 80 01 00 14 lwz r0,20(r1) ffc195ac: 83 c1 00 08 lwz r30,8(r1) ffc195b0: 7c 08 03 a6 mtlr r0 ffc195b4: 83 e1 00 0c lwz r31,12(r1) ffc195b8: 38 21 00 10 addi r1,r1,16 ffc195bc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc195c0 <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { ffc195c0: 94 21 ff f0 stwu r1,-16(r1) ffc195c4: 7c 08 02 a6 mflr r0 ffc195c8: 93 c1 00 08 stw r30,8(r1) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc195cc: 3b c3 00 40 addi r30,r3,64 } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { ffc195d0: 93 e1 00 0c stw r31,12(r1) ffc195d4: 7c 7f 1b 78 mr r31,r3 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc195d8: 7f c3 f3 78 mr r3,r30 } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { ffc195dc: 90 01 00 14 stw r0,20(r1) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc195e0: 48 00 50 99 bl ffc1e678 <_Watchdog_Remove> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc195e4: 7c 00 00 a6 mfmsr r0 ffc195e8: 7d 30 42 a6 mfsprg r9,0 ffc195ec: 7c 09 48 78 andc r9,r0,r9 ffc195f0: 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)); ffc195f4: 81 3f 00 68 lwz r9,104(r31) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc195f8: 39 7f 00 6c addi r11,r31,108 ffc195fc: 7f 89 58 00 cmpw cr7,r9,r11 ffc19600: 41 9e 00 24 beq- cr7,ffc19624 <_Timer_server_Reset_tod_system_watchdog+0x64> _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; ffc19604: 81 29 00 10 lwz r9,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc19608: 7c 00 01 24 mtmsr r0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); ffc1960c: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc19610: 91 3f 00 4c stw r9,76(r31) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); ffc19614: 38 63 70 dc addi r3,r3,28892 ffc19618: 7f c4 f3 78 mr r4,r30 ffc1961c: 48 00 4f 05 bl ffc1e520 <_Watchdog_Insert> <== ALWAYS TAKEN ffc19620: 48 00 00 08 b ffc19628 <_Timer_server_Reset_tod_system_watchdog+0x68> <== ALWAYS TAKEN ffc19624: 7c 00 01 24 mtmsr r0 delta_interval ); } else { _ISR_Enable( level ); } } ffc19628: 80 01 00 14 lwz r0,20(r1) ffc1962c: 83 c1 00 08 lwz r30,8(r1) ffc19630: 7c 08 03 a6 mtlr r0 ffc19634: 83 e1 00 0c lwz r31,12(r1) ffc19638: 38 21 00 10 addi r1,r1,16 ffc1963c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc19868 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc19868: 94 21 ff f0 stwu r1,-16(r1) ffc1986c: 7c 08 02 a6 mflr r0 ffc19870: 7c 89 23 78 mr r9,r4 ffc19874: 90 01 00 14 stw r0,20(r1) if ( ts->insert_chain == NULL ) { ffc19878: 80 03 00 78 lwz r0,120(r3) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1987c: 93 e1 00 0c stw r31,12(r1) ffc19880: 7c 7f 1b 78 mr r31,r3 if ( ts->insert_chain == NULL ) { ffc19884: 2f 80 00 00 cmpwi cr7,r0,0 ffc19888: 40 be 01 24 bne+ cr7,ffc199ac <_Timer_server_Schedule_operation_method+0x144> ffc1988c: 3d 60 00 00 lis r11,0 ffc19890: 81 4b 28 24 lwz r10,10276(r11) ffc19894: 38 0a 00 01 addi r0,r10,1 ffc19898: 90 0b 28 24 stw r0,10276(r11) * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1989c: 80 04 00 38 lwz r0,56(r4) ffc198a0: 2f 80 00 01 cmpwi cr7,r0,1 ffc198a4: 40 be 00 78 bne+ cr7,ffc1991c <_Timer_server_Schedule_operation_method+0xb4> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc198a8: 7c e0 00 a6 mfmsr r7 ffc198ac: 7c 10 42 a6 mfsprg r0,0 ffc198b0: 7c e0 00 78 andc r0,r7,r0 ffc198b4: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc198b8: 81 63 00 30 lwz r11,48(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc198bc: 38 03 00 34 addi r0,r3,52 /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; ffc198c0: 3d 40 00 00 lis r10,0 ffc198c4: 7f 8b 00 00 cmpw cr7,r11,r0 ffc198c8: 81 4a 28 7c lwz r10,10364(r10) last_snapshot = ts->Interval_watchdogs.last_snapshot; ffc198cc: 80 03 00 3c lwz r0,60(r3) ffc198d0: 41 9e 00 20 beq- cr7,ffc198f0 <_Timer_server_Schedule_operation_method+0x88> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; ffc198d4: 81 0b 00 10 lwz r8,16(r11) first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; ffc198d8: 7c 00 50 50 subf r0,r0,r10 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { ffc198dc: 7c c8 00 10 subfc r6,r8,r0 ffc198e0: 7c c6 31 10 subfe r6,r6,r6 delta_interval -= delta; ffc198e4: 7c 00 40 50 subf r0,r0,r8 * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { ffc198e8: 7c 00 30 38 and r0,r0,r6 delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; ffc198ec: 90 0b 00 10 stw r0,16(r11) } ts->Interval_watchdogs.last_snapshot = snapshot; ffc198f0: 91 5f 00 3c stw r10,60(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc198f4: 7c e0 01 24 mtmsr r7 _ISR_Enable( level ); _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc198f8: 38 89 00 10 addi r4,r9,16 ffc198fc: 38 7f 00 30 addi r3,r31,48 ffc19900: 48 00 4c 21 bl ffc1e520 <_Watchdog_Insert> <== ALWAYS TAKEN if ( !ts->active ) { ffc19904: 88 1f 00 7c lbz r0,124(r31) ffc19908: 2f 80 00 00 cmpwi cr7,r0,0 ffc1990c: 40 be 00 98 bne+ cr7,ffc199a4 <_Timer_server_Schedule_operation_method+0x13c> _Timer_server_Reset_interval_system_watchdog( ts ); ffc19910: 7f e3 fb 78 mr r3,r31 ffc19914: 4b ff fc 2d bl ffc19540 <_Timer_server_Reset_interval_system_watchdog> <== ALWAYS TAKEN ffc19918: 48 00 00 8c b ffc199a4 <_Timer_server_Schedule_operation_method+0x13c> <== ALWAYS TAKEN } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1991c: 2f 80 00 03 cmpwi cr7,r0,3 ffc19920: 40 be 00 84 bne+ cr7,ffc199a4 <_Timer_server_Schedule_operation_method+0x13c> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc19924: 7c c0 00 a6 mfmsr r6 ffc19928: 7c 10 42 a6 mfsprg r0,0 ffc1992c: 7c c0 00 78 andc r0,r6,r0 ffc19930: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc19934: 81 43 00 68 lwz r10,104(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc19938: 38 03 00 6c addi r0,r3,108 /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc1993c: 3d 60 00 00 lis r11,0 last_snapshot = ts->TOD_watchdogs.last_snapshot; ffc19940: 80 e3 00 74 lwz r7,116(r3) ffc19944: 7f 8a 00 00 cmpw cr7,r10,r0 /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc19948: 80 0b 28 44 lwz r0,10308(r11) ffc1994c: 41 9e 00 30 beq- cr7,ffc1997c <_Timer_server_Schedule_operation_method+0x114> last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { ffc19950: 7f 80 38 40 cmplw cr7,r0,r7 _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; ffc19954: 81 0a 00 10 lwz r8,16(r10) } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; ffc19958: 7d 68 3a 14 add r11,r8,r7 delta_interval += delta; ffc1995c: 7d 60 58 50 subf r11,r0,r11 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { ffc19960: 40 9d 00 18 ble- cr7,ffc19978 <_Timer_server_Schedule_operation_method+0x110> /* * We advanced in time. */ delta = snapshot - last_snapshot; ffc19964: 7d 67 00 50 subf r11,r7,r0 if (delta_interval > delta) { ffc19968: 7c e8 58 10 subfc r7,r8,r11 ffc1996c: 7c e7 39 10 subfe r7,r7,r7 delta_interval -= delta; ffc19970: 7d 6b 40 50 subf r11,r11,r8 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { ffc19974: 7d 6b 38 38 and r11,r11,r7 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; ffc19978: 91 6a 00 10 stw r11,16(r10) } ts->TOD_watchdogs.last_snapshot = snapshot; ffc1997c: 90 1f 00 74 stw r0,116(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc19980: 7c c0 01 24 mtmsr r6 _ISR_Enable( level ); _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc19984: 38 89 00 10 addi r4,r9,16 ffc19988: 38 7f 00 68 addi r3,r31,104 ffc1998c: 48 00 4b 95 bl ffc1e520 <_Watchdog_Insert> <== ALWAYS TAKEN if ( !ts->active ) { ffc19990: 88 1f 00 7c lbz r0,124(r31) ffc19994: 2f 80 00 00 cmpwi cr7,r0,0 ffc19998: 40 be 00 0c bne+ cr7,ffc199a4 <_Timer_server_Schedule_operation_method+0x13c> _Timer_server_Reset_tod_system_watchdog( ts ); ffc1999c: 7f e3 fb 78 mr r3,r31 ffc199a0: 4b ff fc 21 bl ffc195c0 <_Timer_server_Reset_tod_system_watchdog> <== ALWAYS TAKEN } } _Thread_Enable_dispatch(); ffc199a4: 48 00 32 21 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc199a8: 48 00 00 0c b ffc199b4 <_Timer_server_Schedule_operation_method+0x14c> <== ALWAYS TAKEN * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); ffc199ac: 80 63 00 78 lwz r3,120(r3) ffc199b0: 48 00 08 8d bl ffc1a23c <_Chain_Append> <== ALWAYS TAKEN } } ffc199b4: 80 01 00 14 lwz r0,20(r1) ffc199b8: 83 e1 00 0c lwz r31,12(r1) ffc199bc: 38 21 00 10 addi r1,r1,16 ffc199c0: 7c 08 03 a6 mtlr r0 ffc199c4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b288 <_Timespec_Add_to>: { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0b288: 81 64 00 04 lwz r11,4(r4) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0b28c: 3d 40 3b 9a lis r10,15258 { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0b290: 80 03 00 04 lwz r0,4(r3) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0b294: 61 4a ca 00 ori r10,r10,51712 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { ffc0b298: 7c 69 1b 78 mr r9,r3 uint32_t seconds = add->tv_sec; ffc0b29c: 80 64 00 00 lwz r3,0(r4) <== ALWAYS TAKEN /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0b2a0: 7c 0b 02 14 add r0,r11,r0 <== ALWAYS TAKEN ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0b2a4: 81 09 00 00 lwz r8,0(r9) time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0b2a8: 7d 40 53 96 divwu r10,r0,r10 { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0b2ac: 90 09 00 04 stw r0,4(r9) ffc0b2b0: 7c 0b 03 78 mr r11,r0 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0b2b4: 39 4a 00 01 addi r10,r10,1 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0b2b8: 7c 08 1a 14 add r0,r8,r3 time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0b2bc: 7d 49 03 a6 mtctr r10 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0b2c0: 90 09 00 00 stw r0,0(r9) time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0b2c4: 48 00 00 18 b ffc0b2dc <_Timespec_Add_to+0x54> <== ALWAYS TAKEN time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; ffc0b2c8: 81 69 00 00 lwz r11,0(r9) seconds++; ffc0b2cc: 38 63 00 01 addi r3,r3,1 time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; ffc0b2d0: 38 0b 00 01 addi r0,r11,1 ffc0b2d4: 90 09 00 00 stw r0,0(r9) seconds++; ffc0b2d8: 39 6a 36 00 addi r11,r10,13824 ffc0b2dc: 3d 4b c4 65 addis r10,r11,-15259 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0b2e0: 42 00 ff e8 bdnz+ ffc0b2c8 <_Timespec_Add_to+0x40> ffc0b2e4: 91 69 00 04 stw r11,4(r9) time->tv_sec++; seconds++; } return seconds; } ffc0b2e8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d5c0 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { ffc0d5c0: 94 21 ff e8 stwu r1,-24(r1) ffc0d5c4: 7c 08 02 a6 mflr r0 ffc0d5c8: 90 01 00 1c stw r0,28(r1) * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; ffc0d5cc: 3c 00 3b 9a lis r0,15258 ffc0d5d0: 60 00 ca 00 ori r0,r0,51712 ffc0d5d4: 81 04 00 00 lwz r8,0(r4) right += rhs->tv_nsec; ffc0d5d8: 81 44 00 04 lwz r10,4(r4) * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; ffc0d5dc: 7d 60 40 96 mulhw r11,r0,r8 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { ffc0d5e0: 93 c1 00 10 stw r30,16(r1) * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; ffc0d5e4: 7d 80 41 d6 mullw r12,r0,r8 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { ffc0d5e8: 93 e1 00 14 stw r31,20(r1) * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; ffc0d5ec: 7d 49 fe 70 srawi r9,r10,31 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { ffc0d5f0: 93 81 00 08 stw r28,8(r1) * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; ffc0d5f4: 7d 0c 50 14 addc r8,r12,r10 ffc0d5f8: 7c eb 49 14 adde r7,r11,r9 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { ffc0d5fc: 93 a1 00 0c stw r29,12(r1) left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { ffc0d600: 7c eb 43 79 or. r11,r7,r8 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; ffc0d604: 81 23 00 04 lwz r9,4(r3) const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { ffc0d608: 7c be 2b 78 mr r30,r5 ffc0d60c: 7c df 33 78 mr r31,r6 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; ffc0d610: 81 43 00 00 lwz r10,0(r3) left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { ffc0d614: 40 a2 00 10 bne+ ffc0d624 <_Timespec_Divide+0x64> *ival_percentage = 0; ffc0d618: 91 65 00 00 stw r11,0(r5) *fval_percentage = 0; ffc0d61c: 91 66 00 00 stw r11,0(r6) return; ffc0d620: 48 00 00 70 b ffc0d690 <_Timespec_Divide+0xd0> <== ALWAYS TAKEN /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; ffc0d624: 7c aa 00 96 mulhw r5,r10,r0 ffc0d628: 7c ca 01 d6 mullw r6,r10,r0 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; ffc0d62c: 7d 2c 4b 78 mr r12,r9 ffc0d630: 7d 2b fe 70 srawi r11,r9,31 ffc0d634: 3c 00 00 01 lis r0,1 ffc0d638: 7d 46 60 14 addc r10,r6,r12 ffc0d63c: 7d 25 59 14 adde r9,r5,r11 ffc0d640: 60 00 86 a0 ori r0,r0,34464 ffc0d644: 7c 60 50 16 mulhwu r3,r0,r10 ffc0d648: 7c 80 51 d6 mullw r4,r0,r10 ffc0d64c: 7c 00 49 d6 mullw r0,r0,r9 ffc0d650: 7c e5 3b 78 mr r5,r7 ffc0d654: 7d 06 43 78 mr r6,r8 ffc0d658: 7c 60 1a 14 add r3,r0,r3 ffc0d65c: 48 01 23 69 bl ffc1f9c4 <__udivdi3> <== ALWAYS TAKEN *ival_percentage = answer / 1000; ffc0d660: 38 a0 00 00 li r5,0 ffc0d664: 38 c0 03 e8 li r6,1000 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; ffc0d668: 7c 7c 1b 78 mr r28,r3 ffc0d66c: 7c 9d 23 78 mr r29,r4 *ival_percentage = answer / 1000; ffc0d670: 48 01 23 55 bl ffc1f9c4 <__udivdi3> <== ALWAYS TAKEN ffc0d674: 90 9e 00 00 stw r4,0(r30) *fval_percentage = answer % 1000; ffc0d678: 7f 83 e3 78 mr r3,r28 ffc0d67c: 7f a4 eb 78 mr r4,r29 ffc0d680: 38 a0 00 00 li r5,0 ffc0d684: 38 c0 03 e8 li r6,1000 ffc0d688: 48 01 27 19 bl ffc1fda0 <__umoddi3> <== ALWAYS TAKEN ffc0d68c: 90 9f 00 00 stw r4,0(r31) } ffc0d690: 80 01 00 1c lwz r0,28(r1) ffc0d694: 83 81 00 08 lwz r28,8(r1) ffc0d698: 7c 08 03 a6 mtlr r0 ffc0d69c: 83 a1 00 0c lwz r29,12(r1) ffc0d6a0: 83 c1 00 10 lwz r30,16(r1) ffc0d6a4: 83 e1 00 14 lwz r31,20(r1) ffc0d6a8: 38 21 00 18 addi r1,r1,24 ffc0d6ac: 4e 80 00 20 blr <== ALWAYS TAKEN ffc2f240 <_Timespec_Divide_by_integer>: void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { ffc2f240: 94 21 ff e8 stwu r1,-24(r1) ffc2f244: 7c 08 02 a6 mflr r0 ffc2f248: 7c 86 23 78 mr r6,r4 ffc2f24c: 90 01 00 1c stw r0,28(r1) /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; t *= TOD_NANOSECONDS_PER_SECOND; ffc2f250: 3c 00 3b 9a lis r0,15258 ffc2f254: 60 00 ca 00 ori r0,r0,51712 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; ffc2f258: 81 23 00 00 lwz r9,0(r3) void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { ffc2f25c: 93 e1 00 14 stw r31,20(r1) ffc2f260: 7c bf 2b 78 mr r31,r5 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; ffc2f264: 7d 2a fe 70 srawi r10,r9,31 t *= TOD_NANOSECONDS_PER_SECOND; ffc2f268: 7d 80 49 d6 mullw r12,r0,r9 void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { ffc2f26c: 93 a1 00 0c stw r29,12(r1) /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; t *= TOD_NANOSECONDS_PER_SECOND; ffc2f270: 7d 60 48 16 mulhwu r11,r0,r9 void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { ffc2f274: 93 c1 00 10 stw r30,16(r1) /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; t *= TOD_NANOSECONDS_PER_SECOND; ffc2f278: 7c 00 51 d6 mullw r0,r0,r10 t += time->tv_nsec; ffc2f27c: 81 43 00 04 lwz r10,4(r3) ffc2f280: 7d 49 fe 70 srawi r9,r10,31 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; t *= TOD_NANOSECONDS_PER_SECOND; ffc2f284: 7d 60 5a 14 add r11,r0,r11 /* * Divide to get nanoseconds per iteration */ t /= iterations; ffc2f288: 7c 8c 50 14 addc r4,r12,r10 ffc2f28c: 7c 6b 49 14 adde r3,r11,r9 ffc2f290: 38 a0 00 00 li r5,0 ffc2f294: 48 03 0c 31 bl ffc5fec4 <__udivdi3> <== ALWAYS TAKEN /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; ffc2f298: 3c c0 3b 9a lis r6,15258 ffc2f29c: 38 a0 00 00 li r5,0 ffc2f2a0: 60 c6 ca 00 ori r6,r6,51712 /* * Divide to get nanoseconds per iteration */ t /= iterations; ffc2f2a4: 7c 7d 1b 78 mr r29,r3 ffc2f2a8: 7c 9e 23 78 mr r30,r4 /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; ffc2f2ac: 48 03 0c 19 bl ffc5fec4 <__udivdi3> <== ALWAYS TAKEN ffc2f2b0: 90 9f 00 00 stw r4,0(r31) result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; ffc2f2b4: 3c c0 3b 9a lis r6,15258 ffc2f2b8: 7f a3 eb 78 mr r3,r29 ffc2f2bc: 7f c4 f3 78 mr r4,r30 ffc2f2c0: 38 a0 00 00 li r5,0 ffc2f2c4: 60 c6 ca 00 ori r6,r6,51712 ffc2f2c8: 48 03 0f d9 bl ffc602a0 <__umoddi3> <== ALWAYS TAKEN } ffc2f2cc: 80 01 00 1c lwz r0,28(r1) /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; ffc2f2d0: 90 9f 00 04 stw r4,4(r31) } ffc2f2d4: 7c 08 03 a6 mtlr r0 ffc2f2d8: 83 a1 00 0c lwz r29,12(r1) ffc2f2dc: 83 c1 00 10 lwz r30,16(r1) ffc2f2e0: 83 e1 00 14 lwz r31,20(r1) ffc2f2e4: 38 21 00 18 addi r1,r1,24 ffc2f2e8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc29bc4 <_Timespec_From_ticks>: struct timespec *time ) { uint32_t usecs; usecs = ticks * rtems_configuration_get_microseconds_per_tick(); ffc29bc4: 3d 20 00 00 lis r9,0 ffc29bc8: 80 09 20 ac lwz r0,8364(r9) ffc29bcc: 7c 63 01 d6 mullw r3,r3,r0 time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; ffc29bd0: 3c 00 00 0f lis r0,15 ffc29bd4: 60 00 42 40 ori r0,r0,16960 ffc29bd8: 7d 23 03 96 divwu r9,r3,r0 time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * ffc29bdc: 7c 09 01 d6 mullw r0,r9,r0 { uint32_t usecs; usecs = ticks * rtems_configuration_get_microseconds_per_tick(); time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; ffc29be0: 91 24 00 00 stw r9,0(r4) time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * ffc29be4: 7c 00 18 50 subf r0,r0,r3 ffc29be8: 1c 00 03 e8 mulli r0,r0,1000 ffc29bec: 90 04 00 04 stw r0,4(r4) TOD_NANOSECONDS_PER_MICROSECOND; } ffc29bf0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc40cf0 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) ffc40cf0: 81 63 00 00 lwz r11,0(r3) bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { ffc40cf4: 7c 69 1b 78 mr r9,r3 if ( lhs->tv_sec > rhs->tv_sec ) ffc40cf8: 80 04 00 00 lwz r0,0(r4) ffc40cfc: 38 60 00 01 li r3,1 ffc40d00: 7f 8b 00 00 cmpw cr7,r11,r0 ffc40d04: 4d 9d 00 20 bgtlr cr7 return true; if ( lhs->tv_sec < rhs->tv_sec ) ffc40d08: 40 bc 00 0c bge+ cr7,ffc40d14 <_Timespec_Greater_than+0x24> ffc40d0c: 38 60 00 00 li r3,0 ffc40d10: 4e 80 00 20 blr <== ALWAYS TAKEN #include #include #include bool _Timespec_Greater_than( ffc40d14: 81 29 00 04 lwz r9,4(r9) ffc40d18: 80 04 00 04 lwz r0,4(r4) ffc40d1c: 7f 89 00 00 cmpw cr7,r9,r0 ffc40d20: 7c 60 00 26 mfcr r3 ffc40d24: 54 63 f7 fe rlwinm r3,r3,30,31,31 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } ffc40d28: 4e 80 00 20 blr <== ALWAYS TAKEN ffc29bf4 <_Timespec_Is_valid>: bool _Timespec_Is_valid( const struct timespec *time ) { if ( !time ) ffc29bf4: 2c 03 00 00 cmpwi r3,0 ffc29bf8: 41 82 00 30 beq- ffc29c28 <_Timespec_Is_valid+0x34> return false; if ( time->tv_sec < 0 ) ffc29bfc: 80 03 00 00 lwz r0,0(r3) ffc29c00: 2f 80 00 00 cmpwi cr7,r0,0 ffc29c04: 41 9c 00 24 blt- cr7,ffc29c28 <_Timespec_Is_valid+0x34> return false; if ( time->tv_nsec < 0 ) ffc29c08: 80 03 00 04 lwz r0,4(r3) #include #include #include bool _Timespec_Is_valid( ffc29c0c: 3c 60 3b 9a lis r3,15258 ffc29c10: 60 63 c9 ff ori r3,r3,51711 return false; if ( time->tv_sec < 0 ) return false; if ( time->tv_nsec < 0 ) ffc29c14: 2f 80 00 00 cmpwi cr7,r0,0 #include #include #include bool _Timespec_Is_valid( ffc29c18: 7c 60 18 10 subfc r3,r0,r3 ffc29c1c: 38 60 00 00 li r3,0 ffc29c20: 7c 63 19 14 adde r3,r3,r3 return false; if ( time->tv_sec < 0 ) return false; if ( time->tv_nsec < 0 ) ffc29c24: 4c bc 00 20 bgelr+ cr7 #include #include #include bool _Timespec_Is_valid( ffc29c28: 38 60 00 00 li r3,0 if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } ffc29c2c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc40d2c <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) ffc40d2c: 81 63 00 00 lwz r11,0(r3) bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { ffc40d30: 7c 69 1b 78 mr r9,r3 if ( lhs->tv_sec < rhs->tv_sec ) ffc40d34: 80 04 00 00 lwz r0,0(r4) ffc40d38: 38 60 00 01 li r3,1 ffc40d3c: 7f 8b 00 00 cmpw cr7,r11,r0 ffc40d40: 4d 9c 00 20 bltlr cr7 return true; if ( lhs->tv_sec > rhs->tv_sec ) ffc40d44: 40 bd 00 0c ble+ cr7,ffc40d50 <_Timespec_Less_than+0x24> <== ALWAYS TAKEN ffc40d48: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc40d4c: 4e 80 00 20 blr <== NOT EXECUTED #include #include #include bool _Timespec_Less_than( ffc40d50: 81 29 00 04 lwz r9,4(r9) ffc40d54: 80 04 00 04 lwz r0,4(r4) ffc40d58: 7f 89 00 00 cmpw cr7,r9,r0 ffc40d5c: 7c 60 00 26 mfcr r3 ffc40d60: 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; } ffc40d64: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b2ec <_Timespec_Subtract>: const struct timespec *end, struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { ffc0b2ec: 81 24 00 04 lwz r9,4(r4) ffc0b2f0: 80 03 00 04 lwz r0,4(r3) <== ALWAYS TAKEN ffc0b2f4: 81 44 00 00 lwz r10,0(r4) ffc0b2f8: 7f 89 00 00 cmpw cr7,r9,r0 ffc0b2fc: 81 63 00 00 lwz r11,0(r3) ffc0b300: 40 bc 00 10 bge+ cr7,ffc0b310 <_Timespec_Subtract+0x24> result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = ffc0b304: 3d 29 3b 9b addis r9,r9,15259 struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; ffc0b308: 39 4a ff ff addi r10,r10,-1 result->tv_nsec = ffc0b30c: 39 29 ca 00 addi r9,r9,-13824 (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; ffc0b310: 7d 6b 50 50 subf r11,r11,r10 result->tv_nsec = end->tv_nsec - start->tv_nsec; ffc0b314: 7c 00 48 50 subf r0,r0,r9 if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; ffc0b318: 91 65 00 00 stw r11,0(r5) result->tv_nsec = end->tv_nsec - start->tv_nsec; ffc0b31c: 90 05 00 04 stw r0,4(r5) ffc0b320: 4e 80 00 20 blr <== ALWAYS TAKEN ffc29c30 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { ffc29c30: 94 21 ff f0 stwu r1,-16(r1) ffc29c34: 7c 08 02 a6 mflr r0 ffc29c38: 90 01 00 14 stw r0,20(r1) ffc29c3c: 93 c1 00 08 stw r30,8(r1) uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) ffc29c40: 83 c3 00 00 lwz r30,0(r3) */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { ffc29c44: 93 e1 00 0c stw r31,12(r1) ffc29c48: 7c 7f 1b 78 mr r31,r3 uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) ffc29c4c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc29c50: 40 9e 00 14 bne- cr7,ffc29c64 <_Timespec_To_ticks+0x34> ffc29c54: 80 03 00 04 lwz r0,4(r3) ffc29c58: 38 60 00 00 li r3,0 ffc29c5c: 2f 80 00 00 cmpwi cr7,r0,0 ffc29c60: 41 9e 00 2c beq- cr7,ffc29c8c <_Timespec_To_ticks+0x5c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; ffc29c64: 48 00 01 1d bl ffc29d80 <== ALWAYS TAKEN ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); ffc29c68: 3d 20 00 00 lis r9,0 ffc29c6c: 80 09 20 ac lwz r0,8364(r9) uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; ffc29c70: 7c 63 f1 d6 mullw r3,r3,r30 ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); ffc29c74: 81 3f 00 04 lwz r9,4(r31) ffc29c78: 1c 00 03 e8 mulli r0,r0,1000 ffc29c7c: 7c 09 03 96 divwu r0,r9,r0 if (ticks) ffc29c80: 7c 63 02 15 add. r3,r3,r0 ffc29c84: 40 a2 00 08 bne+ ffc29c8c <_Timespec_To_ticks+0x5c> ffc29c88: 38 60 00 01 li r3,1 return ticks; return 1; } ffc29c8c: 80 01 00 14 lwz r0,20(r1) ffc29c90: 83 c1 00 08 lwz r30,8(r1) ffc29c94: 7c 08 03 a6 mtlr r0 ffc29c98: 83 e1 00 0c lwz r31,12(r1) ffc29c9c: 38 21 00 10 addi r1,r1,16 ffc29ca0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0e4e4 <_User_extensions_Add_set>: #include void _User_extensions_Add_set( User_extensions_Control *the_extension ) { ffc0e4e4: 94 21 ff f0 stwu r1,-16(r1) ffc0e4e8: 7c 08 02 a6 mflr r0 ffc0e4ec: 93 e1 00 0c stw r31,12(r1) <== ALWAYS TAKEN ffc0e4f0: 7c 7f 1b 78 mr r31,r3 _Chain_Append( &_User_extensions_List, &the_extension->Node ); ffc0e4f4: 3c 60 00 00 lis r3,0 ffc0e4f8: 38 63 2d 80 addi r3,r3,11648 #include void _User_extensions_Add_set( User_extensions_Control *the_extension ) { ffc0e4fc: 90 01 00 14 stw r0,20(r1) _Chain_Append( &_User_extensions_List, &the_extension->Node ); ffc0e500: 7f e4 fb 78 mr r4,r31 ffc0e504: 4b ff a3 29 bl ffc0882c <_Chain_Append> <== ALWAYS TAKEN /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { ffc0e508: 80 1f 00 24 lwz r0,36(r31) ffc0e50c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e510: 41 9e 00 18 beq- cr7,ffc0e528 <_User_extensions_Add_set+0x44> the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; _Chain_Append( ffc0e514: 3c 60 00 00 lis r3,0 /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { the_extension->Switch.thread_switch = ffc0e518: 90 1f 00 10 stw r0,16(r31) the_extension->Callouts.thread_switch; _Chain_Append( ffc0e51c: 38 63 2b f4 addi r3,r3,11252 ffc0e520: 38 9f 00 08 addi r4,r31,8 ffc0e524: 4b ff a3 09 bl ffc0882c <_Chain_Append> <== ALWAYS TAKEN &_User_extensions_Switches_list, &the_extension->Switch.Node ); } } ffc0e528: 80 01 00 14 lwz r0,20(r1) ffc0e52c: 83 e1 00 0c lwz r31,12(r1) ffc0e530: 38 21 00 10 addi r1,r1,16 <== ALWAYS TAKEN ffc0e534: 7c 08 03 a6 mtlr r0 ffc0e538: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b510 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0b510: 94 21 ff e0 stwu r1,-32(r1) ffc0b514: 7c 08 02 a6 mflr r0 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0b518: 3d 20 00 00 lis r9,0 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0b51c: 90 01 00 24 stw r0,36(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0b520: 39 29 2d 80 addi r9,r9,11648 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0b524: 93 61 00 0c stw r27,12(r1) ffc0b528: 7c 7b 1b 78 mr r27,r3 ffc0b52c: 93 81 00 10 stw r28,16(r1) ffc0b530: 7c 9c 23 78 mr r28,r4 ffc0b534: 93 a1 00 14 stw r29,20(r1) ffc0b538: 7c bd 2b 78 mr r29,r5 ffc0b53c: 93 c1 00 18 stw r30,24(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; ffc0b540: 7d 3e 4b 78 mr r30,r9 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0b544: 93 e1 00 1c stw r31,28(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0b548: 83 e9 00 08 lwz r31,8(r9) ffc0b54c: 48 00 00 1c b ffc0b568 <_User_extensions_Fatal+0x58> <== ALWAYS TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) ffc0b550: 80 1f 00 30 lwz r0,48(r31) ffc0b554: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b558: 41 9e 00 0c beq- cr7,ffc0b564 <_User_extensions_Fatal+0x54> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0b55c: 7c 09 03 a6 mtctr r0 ffc0b560: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0b564: 83 ff 00 04 lwz r31,4(r31) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; ffc0b568: 7f 9f f0 00 cmpw cr7,r31,r30 the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0b56c: 7f 63 db 78 mr r3,r27 ffc0b570: 7f 84 e3 78 mr r4,r28 ffc0b574: 7f a5 eb 78 mr r5,r29 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; ffc0b578: 40 9e ff d8 bne+ cr7,ffc0b550 <_User_extensions_Fatal+0x40> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0b57c: 80 01 00 24 lwz r0,36(r1) ffc0b580: 83 61 00 0c lwz r27,12(r1) ffc0b584: 7c 08 03 a6 mtlr r0 ffc0b588: 83 81 00 10 lwz r28,16(r1) ffc0b58c: 83 a1 00 14 lwz r29,20(r1) ffc0b590: 83 c1 00 18 lwz r30,24(r1) ffc0b594: 83 e1 00 1c lwz r31,28(r1) ffc0b598: 38 21 00 20 addi r1,r1,32 ffc0b59c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b324 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { ffc0b324: 94 21 ff e8 stwu r1,-24(r1) ffc0b328: 7c 08 02 a6 mflr r0 User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; ffc0b32c: 3d 40 00 00 lis r10,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0b330: 90 01 00 1c stw r0,28(r1) User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; ffc0b334: 39 4a 20 a0 addi r10,r10,8352 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b338: 3c e0 00 00 lis r7,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0b33c: 93 a1 00 0c stw r29,12(r1) ffc0b340: 3d 00 00 00 lis r8,0 ffc0b344: 39 27 2d 80 addi r9,r7,11648 uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; initial_extensions = Configuration.User_extension_table; ffc0b348: 83 aa 00 3c lwz r29,60(r10) ffc0b34c: 39 68 2b f4 addi r11,r8,11252 the_chain->permanent_null = NULL; ffc0b350: 38 00 00 00 li r0,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0b354: 93 c1 00 10 stw r30,16(r1) initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { ffc0b358: 2f 9d 00 00 cmpwi cr7,r29,0 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b35c: 38 a9 00 04 addi r5,r9,4 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0b360: 93 81 00 08 stw r28,8(r1) <== ALWAYS TAKEN ffc0b364: 38 cb 00 04 addi r6,r11,4 ffc0b368: 93 e1 00 14 stw r31,20(r1) ffc0b36c: 90 a7 2d 80 stw r5,11648(r7) ffc0b370: 90 c8 2b f4 stw r6,11252(r8) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0b374: 91 29 00 08 stw r9,8(r9) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc0b378: 90 0b 00 04 stw r0,4(r11) the_chain->last = _Chain_Head(the_chain); ffc0b37c: 91 6b 00 08 stw r11,8(r11) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc0b380: 90 09 00 04 stw r0,4(r9) User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; ffc0b384: 83 ca 00 38 lwz r30,56(r10) initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { ffc0b388: 41 9e 00 88 beq- cr7,ffc0b410 <_User_extensions_Handler_initialization+0xec> extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ffc0b38c: 1f 9e 00 34 mulli r28,r30,52 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) ffc0b390: 7f 83 e3 78 mr r3,r28 ffc0b394: 48 00 06 f5 bl ffc0ba88 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0b398: 7f 85 e3 78 mr r5,r28 ffc0b39c: 38 80 00 00 li r4,0 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) ffc0b3a0: 7c 7f 1b 78 mr r31,r3 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0b3a4: 48 00 5d 09 bl ffc110ac <== ALWAYS TAKEN ffc0b3a8: 3b 80 00 00 li r28,0 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0b3ac: 48 00 00 4c b ffc0b3f8 <_User_extensions_Handler_initialization+0xd4> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0b3b0: 7d 09 00 6e lwzux r8,r9,r0 ffc0b3b4: 81 49 00 04 lwz r10,4(r9) ffc0b3b8: 81 69 00 08 lwz r11,8(r9) ffc0b3bc: 80 09 00 0c lwz r0,12(r9) ffc0b3c0: 91 1f 00 14 stw r8,20(r31) <== ALWAYS TAKEN ffc0b3c4: 91 5f 00 18 stw r10,24(r31) <== ALWAYS TAKEN ffc0b3c8: 91 7f 00 1c stw r11,28(r31) ffc0b3cc: 90 1f 00 20 stw r0,32(r31) ffc0b3d0: 80 09 00 1c lwz r0,28(r9) ffc0b3d4: 81 49 00 10 lwz r10,16(r9) ffc0b3d8: 81 69 00 14 lwz r11,20(r9) ffc0b3dc: 81 29 00 18 lwz r9,24(r9) ffc0b3e0: 91 5f 00 24 stw r10,36(r31) ffc0b3e4: 91 7f 00 28 stw r11,40(r31) <== ALWAYS TAKEN ffc0b3e8: 91 3f 00 2c stw r9,44(r31) ffc0b3ec: 90 1f 00 30 stw r0,48(r31) _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; ffc0b3f0: 3b ff 00 34 addi r31,r31,52 <== ALWAYS TAKEN _User_extensions_Add_set( extension ); ffc0b3f4: 48 00 30 f1 bl ffc0e4e4 <_User_extensions_Add_set> <== ALWAYS TAKEN extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0b3f8: 7f 9c f0 40 cmplw cr7,r28,r30 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0b3fc: 57 80 28 34 rlwinm r0,r28,5,0,26 ffc0b400: 7f a9 eb 78 mr r9,r29 _User_extensions_Add_set( extension ); ffc0b404: 7f e3 fb 78 mr r3,r31 ffc0b408: 3b 9c 00 01 addi r28,r28,1 ffc0b40c: 41 9c ff a4 blt+ cr7,ffc0b3b0 <_User_extensions_Handler_initialization+0x8c> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } ffc0b410: 80 01 00 1c lwz r0,28(r1) ffc0b414: 83 81 00 08 lwz r28,8(r1) ffc0b418: 7c 08 03 a6 mtlr r0 ffc0b41c: 83 a1 00 0c lwz r29,12(r1) <== ALWAYS TAKEN ffc0b420: 83 c1 00 10 lwz r30,16(r1) ffc0b424: 83 e1 00 14 lwz r31,20(r1) <== ALWAYS TAKEN ffc0b428: 38 21 00 18 addi r1,r1,24 ffc0b42c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc10404 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { ffc10404: 94 21 ff f0 stwu r1,-16(r1) ffc10408: 7c 08 02 a6 mflr r0 ffc1040c: 93 e1 00 0c stw r31,12(r1) ffc10410: 7c 7f 1b 78 mr r31,r3 ffc10414: 90 01 00 14 stw r0,20(r1) _Chain_Extract( &the_extension->Node ); ffc10418: 48 00 5a 7d bl ffc15e94 <_Chain_Extract> <== ALWAYS TAKEN /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) ffc1041c: 80 1f 00 24 lwz r0,36(r31) ffc10420: 2f 80 00 00 cmpwi cr7,r0,0 ffc10424: 41 9e 00 0c beq- cr7,ffc10430 <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); ffc10428: 38 7f 00 08 addi r3,r31,8 ffc1042c: 48 00 5a 69 bl ffc15e94 <_Chain_Extract> <== ALWAYS TAKEN } ffc10430: 80 01 00 14 lwz r0,20(r1) ffc10434: 83 e1 00 0c lwz r31,12(r1) ffc10438: 38 21 00 10 addi r1,r1,16 ffc1043c: 7c 08 03 a6 mtlr r0 ffc10440: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b430 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0b430: 94 21 ff e8 stwu r1,-24(r1) <== ALWAYS TAKEN ffc0b434: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0b438: 3d 20 00 00 lis r9,0 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0b43c: 93 c1 00 10 stw r30,16(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0b440: 3f c0 00 00 lis r30,0 ffc0b444: 3b de 2d 84 addi r30,r30,11652 ffc0b448: 93 a1 00 0c stw r29,12(r1) <== ALWAYS TAKEN ffc0b44c: 7c 7d 1b 78 mr r29,r3 ffc0b450: 93 e1 00 14 stw r31,20(r1) ffc0b454: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0b458: 83 e9 2d 80 lwz r31,11648(r9) <== ALWAYS TAKEN ffc0b45c: 48 00 00 1c b ffc0b478 <_User_extensions_Thread_begin+0x48> <== ALWAYS TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) ffc0b460: 80 1f 00 28 lwz r0,40(r31) ffc0b464: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b468: 41 9e 00 0c beq- cr7,ffc0b474 <_User_extensions_Thread_begin+0x44> (*the_extension->Callouts.thread_begin)( executing ); ffc0b46c: 7c 09 03 a6 mtctr r0 ffc0b470: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0b474: 83 ff 00 00 lwz r31,0(r31) ffc0b478: 7f 9f f0 00 cmpw cr7,r31,r30 the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); ffc0b47c: 7f a3 eb 78 mr r3,r29 ffc0b480: 40 9e ff e0 bne+ cr7,ffc0b460 <_User_extensions_Thread_begin+0x30> } } ffc0b484: 80 01 00 1c lwz r0,28(r1) <== ALWAYS TAKEN ffc0b488: 83 a1 00 0c lwz r29,12(r1) ffc0b48c: 7c 08 03 a6 mtlr r0 ffc0b490: 83 c1 00 10 lwz r30,16(r1) ffc0b494: 83 e1 00 14 lwz r31,20(r1) ffc0b498: 38 21 00 18 addi r1,r1,24 ffc0b49c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b5a0 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0b5a0: 94 21 ff e8 stwu r1,-24(r1) ffc0b5a4: 7c 08 02 a6 mflr r0 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; ffc0b5a8: 3d 20 00 00 lis r9,0 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0b5ac: 93 a1 00 0c stw r29,12(r1) ffc0b5b0: 3f a0 00 00 lis r29,0 ffc0b5b4: 3b bd 2d 84 addi r29,r29,11652 <== ALWAYS TAKEN ffc0b5b8: 93 c1 00 10 stw r30,16(r1) the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( ffc0b5bc: 3f c0 00 00 lis r30,0 ffc0b5c0: 3b de 27 6c addi r30,r30,10092 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0b5c4: 93 81 00 08 stw r28,8(r1) ffc0b5c8: 7c 7c 1b 78 mr r28,r3 ffc0b5cc: 93 e1 00 14 stw r31,20(r1) <== ALWAYS TAKEN ffc0b5d0: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; ffc0b5d4: 83 e9 2d 80 lwz r31,11648(r9) ffc0b5d8: 48 00 00 28 b ffc0b600 <_User_extensions_Thread_create+0x60> <== ALWAYS TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { ffc0b5dc: 80 1f 00 14 lwz r0,20(r31) ffc0b5e0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b5e4: 41 9e 00 18 beq- cr7,ffc0b5fc <_User_extensions_Thread_create+0x5c> status = (*the_extension->Callouts.thread_create)( ffc0b5e8: 80 7e 00 00 lwz r3,0(r30) ffc0b5ec: 7c 09 03 a6 mtctr r0 ffc0b5f0: 4e 80 04 21 bctrl <== ALWAYS TAKEN _Thread_Executing, the_thread ); if ( !status ) ffc0b5f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b5f8: 41 9e 00 18 beq- cr7,ffc0b610 <_User_extensions_Thread_create+0x70> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0b5fc: 83 ff 00 00 lwz r31,0(r31) ffc0b600: 7f 9f e8 00 cmpw cr7,r31,r29 <== ALWAYS TAKEN the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( ffc0b604: 7f 84 e3 78 mr r4,r28 ffc0b608: 40 9e ff d4 bne+ cr7,ffc0b5dc <_User_extensions_Thread_create+0x3c> ffc0b60c: 38 60 00 01 li r3,1 return false; } } return true; } ffc0b610: 80 01 00 1c lwz r0,28(r1) ffc0b614: 83 81 00 08 lwz r28,8(r1) ffc0b618: 7c 08 03 a6 mtlr r0 ffc0b61c: 83 a1 00 0c lwz r29,12(r1) ffc0b620: 83 c1 00 10 lwz r30,16(r1) ffc0b624: 83 e1 00 14 lwz r31,20(r1) ffc0b628: 38 21 00 18 addi r1,r1,24 ffc0b62c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b630 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0b630: 94 21 ff e8 stwu r1,-24(r1) ffc0b634: 7c 08 02 a6 mflr r0 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0b638: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0b63c: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0b640: 39 29 2d 80 addi r9,r9,11648 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0b644: 93 c1 00 10 stw r30,16(r1) the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) (*the_extension->Callouts.thread_delete)( ffc0b648: 3f c0 00 00 lis r30,0 ffc0b64c: 3b de 27 6c addi r30,r30,10092 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0b650: 93 81 00 08 stw r28,8(r1) ffc0b654: 7c 7c 1b 78 mr r28,r3 ffc0b658: 93 a1 00 0c stw r29,12(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; ffc0b65c: 7d 3d 4b 78 mr r29,r9 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0b660: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0b664: 83 e9 00 08 lwz r31,8(r9) ffc0b668: 48 00 00 20 b ffc0b688 <_User_extensions_Thread_delete+0x58> <== ALWAYS TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) ffc0b66c: 80 1f 00 20 lwz r0,32(r31) ffc0b670: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b674: 41 9e 00 10 beq- cr7,ffc0b684 <_User_extensions_Thread_delete+0x54> (*the_extension->Callouts.thread_delete)( ffc0b678: 80 7e 00 00 lwz r3,0(r30) ffc0b67c: 7c 09 03 a6 mtctr r0 <== ALWAYS TAKEN ffc0b680: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0b684: 83 ff 00 04 lwz r31,4(r31) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; ffc0b688: 7f 9f e8 00 cmpw cr7,r31,r29 the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) (*the_extension->Callouts.thread_delete)( ffc0b68c: 7f 84 e3 78 mr r4,r28 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; ffc0b690: 40 9e ff dc bne+ cr7,ffc0b66c <_User_extensions_Thread_delete+0x3c> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } ffc0b694: 80 01 00 1c lwz r0,28(r1) ffc0b698: 83 81 00 08 lwz r28,8(r1) ffc0b69c: 7c 08 03 a6 mtlr r0 ffc0b6a0: 83 a1 00 0c lwz r29,12(r1) ffc0b6a4: 83 c1 00 10 lwz r30,16(r1) <== ALWAYS TAKEN ffc0b6a8: 83 e1 00 14 lwz r31,20(r1) ffc0b6ac: 38 21 00 18 addi r1,r1,24 ffc0b6b0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b4a0 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0b4a0: 94 21 ff e8 stwu r1,-24(r1) ffc0b4a4: 7c 08 02 a6 mflr r0 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0b4a8: 3d 20 00 00 lis r9,0 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0b4ac: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0b4b0: 39 29 2d 80 addi r9,r9,11648 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0b4b4: 93 a1 00 0c stw r29,12(r1) ffc0b4b8: 7c 7d 1b 78 mr r29,r3 ffc0b4bc: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; ffc0b4c0: 7d 3e 4b 78 mr r30,r9 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0b4c4: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0b4c8: 83 e9 00 08 lwz r31,8(r9) ffc0b4cc: 48 00 00 1c b ffc0b4e8 <_User_extensions_Thread_exitted+0x48> <== ALWAYS TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) ffc0b4d0: 80 1f 00 2c lwz r0,44(r31) ffc0b4d4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b4d8: 41 9e 00 0c beq- cr7,ffc0b4e4 <_User_extensions_Thread_exitted+0x44> (*the_extension->Callouts.thread_exitted)( executing ); ffc0b4dc: 7c 09 03 a6 mtctr r0 ffc0b4e0: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0b4e4: 83 ff 00 04 lwz r31,4(r31) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; ffc0b4e8: 7f 9f f0 00 cmpw cr7,r31,r30 the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); ffc0b4ec: 7f a3 eb 78 mr r3,r29 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; ffc0b4f0: 40 9e ff e0 bne+ cr7,ffc0b4d0 <_User_extensions_Thread_exitted+0x30> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } ffc0b4f4: 80 01 00 1c lwz r0,28(r1) ffc0b4f8: 83 a1 00 0c lwz r29,12(r1) ffc0b4fc: 7c 08 03 a6 mtlr r0 ffc0b500: 83 c1 00 10 lwz r30,16(r1) ffc0b504: 83 e1 00 14 lwz r31,20(r1) ffc0b508: 38 21 00 18 addi r1,r1,24 ffc0b50c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0c76c <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0c76c: 94 21 ff e8 stwu r1,-24(r1) ffc0c770: 7c 08 02 a6 mflr r0 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c774: 3d 20 00 00 lis r9,0 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0c778: 93 a1 00 0c stw r29,12(r1) ffc0c77c: 3f a0 00 00 lis r29,0 ffc0c780: 3b bd 2d e4 addi r29,r29,11748 ffc0c784: 93 c1 00 10 stw r30,16(r1) the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) (*the_extension->Callouts.thread_restart)( ffc0c788: 3f c0 00 00 lis r30,0 ffc0c78c: 3b de 27 98 addi r30,r30,10136 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0c790: 93 81 00 08 stw r28,8(r1) ffc0c794: 7c 7c 1b 78 mr r28,r3 ffc0c798: 93 e1 00 14 stw r31,20(r1) ffc0c79c: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c7a0: 83 e9 2d e0 lwz r31,11744(r9) ffc0c7a4: 48 00 00 20 b ffc0c7c4 <_User_extensions_Thread_restart+0x58> <== ALWAYS TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) ffc0c7a8: 80 1f 00 1c lwz r0,28(r31) ffc0c7ac: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c7b0: 41 9e 00 10 beq- cr7,ffc0c7c0 <_User_extensions_Thread_restart+0x54> (*the_extension->Callouts.thread_restart)( ffc0c7b4: 80 7e 00 00 lwz r3,0(r30) ffc0c7b8: 7c 09 03 a6 mtctr r0 ffc0c7bc: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0c7c0: 83 ff 00 00 lwz r31,0(r31) ffc0c7c4: 7f 9f e8 00 cmpw cr7,r31,r29 the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) (*the_extension->Callouts.thread_restart)( ffc0c7c8: 7f 84 e3 78 mr r4,r28 ffc0c7cc: 40 9e ff dc bne+ cr7,ffc0c7a8 <_User_extensions_Thread_restart+0x3c> _Thread_Executing, the_thread ); } } ffc0c7d0: 80 01 00 1c lwz r0,28(r1) ffc0c7d4: 83 81 00 08 lwz r28,8(r1) ffc0c7d8: 7c 08 03 a6 mtlr r0 ffc0c7dc: 83 a1 00 0c lwz r29,12(r1) ffc0c7e0: 83 c1 00 10 lwz r30,16(r1) ffc0c7e4: 83 e1 00 14 lwz r31,20(r1) ffc0c7e8: 38 21 00 18 addi r1,r1,24 ffc0c7ec: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b6b4 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0b6b4: 94 21 ff e8 stwu r1,-24(r1) <== ALWAYS TAKEN ffc0b6b8: 7c 08 02 a6 mflr r0 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0b6bc: 3d 20 00 00 lis r9,0 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0b6c0: 93 a1 00 0c stw r29,12(r1) ffc0b6c4: 3f a0 00 00 lis r29,0 <== ALWAYS TAKEN ffc0b6c8: 3b bd 2d 84 addi r29,r29,11652 ffc0b6cc: 93 c1 00 10 stw r30,16(r1) the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) (*the_extension->Callouts.thread_start)( ffc0b6d0: 3f c0 00 00 lis r30,0 ffc0b6d4: 3b de 27 6c addi r30,r30,10092 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0b6d8: 93 81 00 08 stw r28,8(r1) ffc0b6dc: 7c 7c 1b 78 mr r28,r3 <== ALWAYS TAKEN ffc0b6e0: 93 e1 00 14 stw r31,20(r1) ffc0b6e4: 90 01 00 1c stw r0,28(r1) <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0b6e8: 83 e9 2d 80 lwz r31,11648(r9) ffc0b6ec: 48 00 00 20 b ffc0b70c <_User_extensions_Thread_start+0x58> <== ALWAYS TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) ffc0b6f0: 80 1f 00 18 lwz r0,24(r31) ffc0b6f4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b6f8: 41 9e 00 10 beq- cr7,ffc0b708 <_User_extensions_Thread_start+0x54> (*the_extension->Callouts.thread_start)( ffc0b6fc: 80 7e 00 00 lwz r3,0(r30) ffc0b700: 7c 09 03 a6 mtctr r0 ffc0b704: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0b708: 83 ff 00 00 lwz r31,0(r31) ffc0b70c: 7f 9f e8 00 cmpw cr7,r31,r29 the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) (*the_extension->Callouts.thread_start)( ffc0b710: 7f 84 e3 78 mr r4,r28 ffc0b714: 40 9e ff dc bne+ cr7,ffc0b6f0 <_User_extensions_Thread_start+0x3c> _Thread_Executing, the_thread ); } } ffc0b718: 80 01 00 1c lwz r0,28(r1) ffc0b71c: 83 81 00 08 lwz r28,8(r1) ffc0b720: 7c 08 03 a6 mtlr r0 ffc0b724: 83 a1 00 0c lwz r29,12(r1) ffc0b728: 83 c1 00 10 lwz r30,16(r1) ffc0b72c: 83 e1 00 14 lwz r31,20(r1) ffc0b730: 38 21 00 18 addi r1,r1,24 ffc0b734: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b738 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0b738: 94 21 ff e8 stwu r1,-24(r1) ffc0b73c: 7c 08 02 a6 mflr r0 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; ffc0b740: 3d 20 00 00 lis r9,0 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0b744: 93 c1 00 10 stw r30,16(r1) ffc0b748: 3f c0 00 00 lis r30,0 ffc0b74c: 3b de 2b f8 addi r30,r30,11256 ffc0b750: 93 81 00 08 stw r28,8(r1) ffc0b754: 7c 7c 1b 78 mr r28,r3 ffc0b758: 93 a1 00 0c stw r29,12(r1) ffc0b75c: 7c 9d 23 78 mr r29,r4 ffc0b760: 93 e1 00 14 stw r31,20(r1) ffc0b764: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; ffc0b768: 83 e9 2b f4 lwz r31,11252(r9) <== ALWAYS TAKEN ffc0b76c: 48 00 00 14 b ffc0b780 <_User_extensions_Thread_switch+0x48> <== ALWAYS TAKEN !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); ffc0b770: 80 1f 00 08 lwz r0,8(r31) ffc0b774: 7c 09 03 a6 mtctr r0 ffc0b778: 4e 80 04 21 bctrl <== ALWAYS TAKEN Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { ffc0b77c: 83 ff 00 00 lwz r31,0(r31) ffc0b780: 7f 9f f0 00 cmpw cr7,r31,r30 the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); ffc0b784: 7f 83 e3 78 mr r3,r28 <== ALWAYS TAKEN ffc0b788: 7f a4 eb 78 mr r4,r29 <== ALWAYS TAKEN ffc0b78c: 40 9e ff e4 bne+ cr7,ffc0b770 <_User_extensions_Thread_switch+0x38> } } ffc0b790: 80 01 00 1c lwz r0,28(r1) ffc0b794: 83 81 00 08 lwz r28,8(r1) ffc0b798: 7c 08 03 a6 mtlr r0 ffc0b79c: 83 a1 00 0c lwz r29,12(r1) ffc0b7a0: 83 c1 00 10 lwz r30,16(r1) ffc0b7a4: 83 e1 00 14 lwz r31,20(r1) ffc0b7a8: 38 21 00 18 addi r1,r1,24 ffc0b7ac: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0dbcc <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { ffc0dbcc: 94 21 ff e0 stwu r1,-32(r1) ffc0dbd0: 7c 08 02 a6 mflr r0 ffc0dbd4: 90 01 00 24 stw r0,36(r1) ffc0dbd8: 93 c1 00 18 stw r30,24(r1) ffc0dbdc: 7c be 2b 78 mr r30,r5 ffc0dbe0: 93 e1 00 1c stw r31,28(r1) ffc0dbe4: 7c 7f 1b 78 mr r31,r3 ffc0dbe8: 93 61 00 0c stw r27,12(r1) ffc0dbec: 93 81 00 10 stw r28,16(r1) ffc0dbf0: 93 a1 00 14 stw r29,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0dbf4: 7c 00 00 a6 mfmsr r0 ffc0dbf8: 7d 30 42 a6 mfsprg r9,0 ffc0dbfc: 7c 09 48 78 andc r9,r0,r9 ffc0dc00: 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)); ffc0dc04: 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; ffc0dc08: 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 ) ) { ffc0dc0c: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0dc10: 41 9e 00 78 beq- cr7,ffc0dc88 <_Watchdog_Adjust+0xbc> switch ( direction ) { ffc0dc14: 2f 84 00 00 cmpwi cr7,r4,0 if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0dc18: 3b 60 00 01 li r27,1 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ffc0dc1c: 41 9e 00 64 beq- cr7,ffc0dc80 <_Watchdog_Adjust+0xb4> ffc0dc20: 2f 84 00 01 cmpwi cr7,r4,1 ffc0dc24: 40 be 00 64 bne+ cr7,ffc0dc88 <_Watchdog_Adjust+0xbc> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; ffc0dc28: 81 69 00 10 lwz r11,16(r9) ffc0dc2c: 7f cb 2a 14 add r30,r11,r5 ffc0dc30: 48 00 00 18 b ffc0dc48 <_Watchdog_Adjust+0x7c> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); ffc0dc34: 81 3f 00 00 lwz r9,0(r31) break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { ffc0dc38: 83 a9 00 10 lwz r29,16(r9) ffc0dc3c: 7f 9e e8 40 cmplw cr7,r30,r29 ffc0dc40: 40 bc 00 10 bge+ cr7,ffc0dc50 <_Watchdog_Adjust+0x84> _Watchdog_First( header )->delta_interval -= units; ffc0dc44: 7f de e8 50 subf r30,r30,r29 ffc0dc48: 93 c9 00 10 stw r30,16(r9) break; ffc0dc4c: 48 00 00 3c b ffc0dc88 <_Watchdog_Adjust+0xbc> <== ALWAYS TAKEN } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0dc50: 93 69 00 10 stw r27,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0dc54: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Watchdog_Tickle( header ); ffc0dc58: 7f e3 fb 78 mr r3,r31 ffc0dc5c: 48 00 02 59 bl ffc0deb4 <_Watchdog_Tickle> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0dc60: 7c 00 00 a6 mfmsr r0 ffc0dc64: 7d 30 42 a6 mfsprg r9,0 ffc0dc68: 7c 09 48 78 andc r9,r0,r9 ffc0dc6c: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0dc70: 81 3f 00 00 lwz r9,0(r31) while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; ffc0dc74: 7f dd f0 50 subf r30,r29,r30 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0dc78: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0dc7c: 41 9e 00 0c beq- cr7,ffc0dc88 <_Watchdog_Adjust+0xbc> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0dc80: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0dc84: 40 9e ff b0 bne+ cr7,ffc0dc34 <_Watchdog_Adjust+0x68> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0dc88: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0dc8c: 80 01 00 24 lwz r0,36(r1) <== ALWAYS TAKEN ffc0dc90: 83 61 00 0c lwz r27,12(r1) ffc0dc94: 7c 08 03 a6 mtlr r0 ffc0dc98: 83 81 00 10 lwz r28,16(r1) ffc0dc9c: 83 a1 00 14 lwz r29,20(r1) ffc0dca0: 83 c1 00 18 lwz r30,24(r1) ffc0dca4: 83 e1 00 1c lwz r31,28(r1) ffc0dca8: 38 21 00 20 addi r1,r1,32 ffc0dcac: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1e468 <_Watchdog_Adjust_to_chain>: { Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { ffc1e468: 2c 04 00 00 cmpwi r4,0 ffc1e46c: 4d 82 00 20 beqlr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1e470: 7d 40 00 a6 mfmsr r10 ffc1e474: 7c 10 42 a6 mfsprg r0,0 ffc1e478: 7d 40 00 78 andc r0,r10,r0 ffc1e47c: 7c 00 01 24 mtmsr r0 /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; first->delta_interval = 0; ffc1e480: 38 c0 00 00 li r6,0 ffc1e484: 39 03 00 04 addi r8,r3,4 ffc1e488: 39 85 00 04 addi r12,r5,4 ffc1e48c: 48 00 00 0c b ffc1e498 <_Watchdog_Adjust_to_chain+0x30> <== ALWAYS TAKEN } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { ffc1e490: 2f 84 00 00 cmpwi cr7,r4,0 ffc1e494: 41 9e 00 84 beq- cr7,ffc1e518 <_Watchdog_Adjust_to_chain+0xb0> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc1e498: 81 63 00 00 lwz r11,0(r3) break; } if ( _Chain_Is_empty( header ) ) { ffc1e49c: 7f 8b 40 00 cmpw cr7,r11,r8 ffc1e4a0: 41 9e 00 78 beq- cr7,ffc1e518 <_Watchdog_Adjust_to_chain+0xb0> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { ffc1e4a4: 80 0b 00 10 lwz r0,16(r11) ffc1e4a8: 7d 69 5b 78 mr r9,r11 ffc1e4ac: 7f 84 00 40 cmplw cr7,r4,r0 ffc1e4b0: 40 bc 00 10 bge+ cr7,ffc1e4c0 <_Watchdog_Adjust_to_chain+0x58> first->delta_interval -= units; ffc1e4b4: 7c 84 00 50 subf r4,r4,r0 ffc1e4b8: 90 8b 00 10 stw r4,16(r11) break; ffc1e4bc: 48 00 00 5c b ffc1e518 <_Watchdog_Adjust_to_chain+0xb0> <== ALWAYS TAKEN /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; first->delta_interval = 0; ffc1e4c0: 90 cb 00 10 stw r6,16(r11) <== ALWAYS TAKEN /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; ffc1e4c4: 7c 80 20 50 subf r4,r0,r4 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc1e4c8: 81 69 00 00 lwz r11,0(r9) previous = the_node->previous; ffc1e4cc: 80 e9 00 04 lwz r7,4(r9) next->previous = previous; previous->next = next; ffc1e4d0: 91 67 00 00 stw r11,0(r7) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc1e4d4: 90 eb 00 04 stw r7,4(r11) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc1e4d8: 91 89 00 00 stw r12,0(r9) old_last_node = the_chain->last; ffc1e4dc: 81 65 00 08 lwz r11,8(r5) the_chain->last = the_node; ffc1e4e0: 91 25 00 08 stw r9,8(r5) old_last_node->next = the_node; the_node->previous = old_last_node; ffc1e4e4: 91 69 00 04 stw r11,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; ffc1e4e8: 91 2b 00 00 stw r9,0(r11) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc1e4ec: 7c 00 00 a6 mfmsr r0 ffc1e4f0: 7d 40 01 24 mtmsr r10 ffc1e4f4: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc1e4f8: 80 03 00 00 lwz r0,0(r3) _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); if ( _Chain_Is_empty( header ) ) ffc1e4fc: 7f 80 40 00 cmpw cr7,r0,r8 ffc1e500: 7c 09 03 78 mr r9,r0 ffc1e504: 41 be ff 8c beq- cr7,ffc1e490 <_Watchdog_Adjust_to_chain+0x28> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) ffc1e508: 80 09 00 10 lwz r0,16(r9) ffc1e50c: 2f 80 00 00 cmpwi cr7,r0,0 ffc1e510: 41 9e ff b8 beq+ cr7,ffc1e4c8 <_Watchdog_Adjust_to_chain+0x60> ffc1e514: 4b ff ff 7c b ffc1e490 <_Watchdog_Adjust_to_chain+0x28> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1e518: 7d 40 01 24 mtmsr r10 ffc1e51c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b8b8 <_Watchdog_Handler_initialization>: */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b8b8: 3d 40 00 00 lis r10,0 ffc0b8bc: 39 6a 2c 9c addi r11,r10,11420 ffc0b8c0: 38 eb 00 04 addi r7,r11,4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0b8c4: 91 6b 00 08 stw r11,8(r11) * Output parameters: NONE */ void _Watchdog_Handler_initialization( void ) { _Watchdog_Sync_count = 0; ffc0b8c8: 38 00 00 00 li r0,0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b8cc: 3d 00 00 00 lis r8,0 <== ALWAYS TAKEN ffc0b8d0: 90 ea 2c 9c stw r7,11420(r10) <== ALWAYS TAKEN ffc0b8d4: 3d 40 00 00 lis r10,0 ffc0b8d8: 39 28 2c a8 addi r9,r8,11432 ffc0b8dc: 90 0a 27 80 stw r0,10112(r10) _Watchdog_Sync_level = 0; ffc0b8e0: 3d 40 00 00 lis r10,0 ffc0b8e4: 90 0a 27 68 stw r0,10088(r10) ffc0b8e8: 38 c9 00 04 addi r6,r9,4 _Watchdog_Ticks_since_boot = 0; ffc0b8ec: 3d 40 00 00 lis r10,0 ffc0b8f0: 90 c8 2c a8 stw r6,11432(r8) <== ALWAYS TAKEN the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0b8f4: 91 29 00 08 stw r9,8(r9) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc0b8f8: 90 0b 00 04 stw r0,4(r11) ffc0b8fc: 90 0a 27 84 stw r0,10116(r10) ffc0b900: 90 09 00 04 stw r0,4(r9) _Chain_Initialize_empty( &_Watchdog_Ticks_chain ); _Chain_Initialize_empty( &_Watchdog_Seconds_chain ); } ffc0b904: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b7b0 <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; ffc0b7b0: 3d 20 00 00 lis r9,0 ffc0b7b4: 80 09 27 54 lwz r0,10068(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b7b8: 7d 40 00 a6 mfmsr r10 ffc0b7bc: 7d 30 42 a6 mfsprg r9,0 ffc0b7c0: 7d 49 48 78 andc r9,r10,r9 ffc0b7c4: 7d 20 01 24 mtmsr r9 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { ffc0b7c8: 81 24 00 08 lwz r9,8(r4) ffc0b7cc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b7d0: 41 be 00 08 beq+ cr7,ffc0b7d8 <_Watchdog_Insert+0x28> _ISR_Enable( level ); ffc0b7d4: 48 00 00 dc b ffc0b8b0 <_Watchdog_Insert+0x100> <== ALWAYS TAKEN return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; ffc0b7d8: 3d 20 00 00 lis r9,0 ffc0b7dc: 81 69 27 80 lwz r11,10112(r9) if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0b7e0: 3c e0 00 00 lis r7,0 <== ALWAYS TAKEN ffc0b7e4: 38 e7 27 68 addi r7,r7,10088 _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; ffc0b7e8: 39 6b 00 01 addi r11,r11,1 ffc0b7ec: 91 69 27 80 stw r11,10112(r9) if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; ffc0b7f0: 39 20 00 01 li r9,1 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0b7f4: 7c e6 3b 78 mr r6,r7 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; ffc0b7f8: 91 24 00 08 stw r9,8(r4) _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; ffc0b7fc: 81 24 00 0c lwz r9,12(r4) * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ffc0b800: 81 63 00 00 lwz r11,0(r3) ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0b804: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b808: 41 9e 00 60 beq- cr7,ffc0b868 <_Watchdog_Insert+0xb8> ffc0b80c: 81 0b 00 00 lwz r8,0(r11) ffc0b810: 2f 88 00 00 cmpwi cr7,r8,0 ffc0b814: 41 9e 00 54 beq- cr7,ffc0b868 <_Watchdog_Insert+0xb8> break; if ( delta_interval < after->delta_interval ) { ffc0b818: 81 0b 00 10 lwz r8,16(r11) ffc0b81c: 7f 89 40 40 cmplw cr7,r9,r8 ffc0b820: 40 bc 00 10 bge+ cr7,ffc0b830 <_Watchdog_Insert+0x80> after->delta_interval -= delta_interval; ffc0b824: 7d 09 40 50 subf r8,r9,r8 ffc0b828: 91 0b 00 10 stw r8,16(r11) break; ffc0b82c: 48 00 00 3c b ffc0b868 <_Watchdog_Insert+0xb8> <== ALWAYS TAKEN static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0b830: 7c a0 00 a6 mfmsr r5 ffc0b834: 7d 40 01 24 mtmsr r10 ffc0b838: 7c a0 01 24 mtmsr r5 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0b83c: 80 a4 00 08 lwz r5,8(r4) if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0b840: 7d 28 48 50 subf r9,r8,r9 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0b844: 2f 85 00 01 cmpwi cr7,r5,1 ffc0b848: 40 9e 00 50 bne- cr7,ffc0b898 <_Watchdog_Insert+0xe8> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0b84c: 81 07 00 00 lwz r8,0(r7) ffc0b850: 7f 88 00 40 cmplw cr7,r8,r0 ffc0b854: 40 bd 00 0c ble+ cr7,ffc0b860 <_Watchdog_Insert+0xb0> _Watchdog_Sync_level = insert_isr_nest_level; ffc0b858: 90 06 00 00 stw r0,0(r6) goto restart; ffc0b85c: 4b ff ff a0 b ffc0b7fc <_Watchdog_Insert+0x4c> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); ffc0b860: 81 6b 00 00 lwz r11,0(r11) } } ffc0b864: 4b ff ff a0 b ffc0b804 <_Watchdog_Insert+0x54> <== ALWAYS TAKEN _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0b868: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0b86c: 3d 00 00 00 lis r8,0 ffc0b870: 80 e8 27 84 lwz r7,10116(r8) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0b874: 81 0b 00 00 lwz r8,0(r11) ffc0b878: 90 e4 00 14 stw r7,20(r4) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; ffc0b87c: 38 e0 00 02 li r7,2 after_node->next = the_node; ffc0b880: 90 8b 00 00 stw r4,0(r11) <== ALWAYS TAKEN Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0b884: 91 64 00 04 stw r11,4(r4) ffc0b888: 90 e4 00 08 stw r7,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0b88c: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; ffc0b890: 90 88 00 04 stw r4,4(r8) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0b894: 91 04 00 00 stw r8,0(r4) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; ffc0b898: 3d 20 00 00 lis r9,0 ffc0b89c: 90 09 27 68 stw r0,10088(r9) _Watchdog_Sync_count--; ffc0b8a0: 3d 20 00 00 lis r9,0 ffc0b8a4: 81 69 27 80 lwz r11,10112(r9) ffc0b8a8: 38 0b ff ff addi r0,r11,-1 ffc0b8ac: 90 09 27 80 stw r0,10112(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b8b0: 7d 40 01 24 mtmsr r10 ffc0b8b4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b908 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { ffc0b908: 7c 69 1b 78 mr r9,r3 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b90c: 7c 00 00 a6 mfmsr r0 ffc0b910: 7d 70 42 a6 mfsprg r11,0 ffc0b914: 7c 0b 58 78 andc r11,r0,r11 ffc0b918: 7d 60 01 24 mtmsr r11 ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; ffc0b91c: 80 63 00 08 lwz r3,8(r3) <== ALWAYS TAKEN switch ( previous_state ) { ffc0b920: 2f 83 00 01 cmpwi cr7,r3,1 ffc0b924: 41 9e 00 18 beq- cr7,ffc0b93c <_Watchdog_Remove+0x34> ffc0b928: 2b 83 00 01 cmplwi cr7,r3,1 ffc0b92c: 41 9c 00 74 blt- cr7,ffc0b9a0 <_Watchdog_Remove+0x98> ffc0b930: 2b 83 00 03 cmplwi cr7,r3,3 ffc0b934: 41 9d 00 6c bgt- cr7,ffc0b9a0 <_Watchdog_Remove+0x98> <== NEVER TAKEN ffc0b938: 48 00 00 10 b ffc0b948 <_Watchdog_Remove+0x40> <== ALWAYS TAKEN /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; ffc0b93c: 39 60 00 00 li r11,0 ffc0b940: 91 69 00 08 stw r11,8(r9) break; ffc0b944: 48 00 00 5c b ffc0b9a0 <_Watchdog_Remove+0x98> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); ffc0b948: 81 69 00 00 lwz r11,0(r9) case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; ffc0b94c: 39 00 00 00 li r8,0 ffc0b950: 91 09 00 08 stw r8,8(r9) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) ffc0b954: 81 4b 00 00 lwz r10,0(r11) ffc0b958: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0b95c: 41 9e 00 14 beq- cr7,ffc0b970 <_Watchdog_Remove+0x68> next_watchdog->delta_interval += the_watchdog->delta_interval; ffc0b960: 81 0b 00 10 lwz r8,16(r11) ffc0b964: 81 49 00 10 lwz r10,16(r9) ffc0b968: 7d 48 52 14 add r10,r8,r10 ffc0b96c: 91 4b 00 10 stw r10,16(r11) if ( _Watchdog_Sync_count ) ffc0b970: 3d 60 00 00 lis r11,0 ffc0b974: 81 6b 27 80 lwz r11,10112(r11) ffc0b978: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b97c: 41 9e 00 14 beq- cr7,ffc0b990 <_Watchdog_Remove+0x88> _Watchdog_Sync_level = _ISR_Nest_level; ffc0b980: 3d 60 00 00 lis r11,0 ffc0b984: 81 4b 27 54 lwz r10,10068(r11) ffc0b988: 3d 60 00 00 lis r11,0 ffc0b98c: 91 4b 27 68 stw r10,10088(r11) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0b990: 81 69 00 00 lwz r11,0(r9) previous = the_node->previous; ffc0b994: 81 49 00 04 lwz r10,4(r9) next->previous = previous; previous->next = next; ffc0b998: 91 6a 00 00 stw r11,0(r10) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0b99c: 91 4b 00 04 stw r10,4(r11) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0b9a0: 3d 60 00 00 lis r11,0 ffc0b9a4: 81 6b 27 84 lwz r11,10116(r11) ffc0b9a8: 91 69 00 18 stw r11,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b9ac: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); return( previous_state ); } ffc0b9b0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d3d0 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( ffc0d3d0: 7c 6b 1b 79 mr. r11,r3 void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { ffc0d3d4: 94 21 ff f0 stwu r1,-16(r1) ffc0d3d8: 7c 08 02 a6 mflr r0 ffc0d3dc: 7c 88 23 78 mr r8,r4 ffc0d3e0: 90 01 00 14 stw r0,20(r1) printk( ffc0d3e4: 41 82 00 10 beq- ffc0d3f4 <_Watchdog_Report+0x24> ffc0d3e8: 3c a0 ff c2 lis r5,-62 ffc0d3ec: 38 a5 12 d3 addi r5,r5,4819 ffc0d3f0: 48 00 00 10 b ffc0d400 <_Watchdog_Report+0x30> <== ALWAYS TAKEN ffc0d3f4: 3d 60 ff c2 lis r11,-62 ffc0d3f8: 39 6b 1c 03 addi r11,r11,7171 ffc0d3fc: 7d 65 5b 78 mr r5,r11 ffc0d400: 80 08 00 24 lwz r0,36(r8) ffc0d404: 3c 60 ff c2 lis r3,-62 ffc0d408: 80 c8 00 10 lwz r6,16(r8) ffc0d40c: 38 63 1d 8a addi r3,r3,7562 ffc0d410: 80 e8 00 0c lwz r7,12(r8) ffc0d414: 7d 64 5b 78 mr r4,r11 ffc0d418: 81 28 00 1c lwz r9,28(r8) ffc0d41c: 81 48 00 20 lwz r10,32(r8) ffc0d420: 90 01 00 08 stw r0,8(r1) ffc0d424: 4c c6 31 82 crclr 4*cr1+eq ffc0d428: 4b ff 8b fd bl ffc06024 <== ALWAYS TAKEN watch, watch->routine, watch->id, watch->user_data ); } ffc0d42c: 80 01 00 14 lwz r0,20(r1) ffc0d430: 38 21 00 10 addi r1,r1,16 ffc0d434: 7c 08 03 a6 mtlr r0 ffc0d438: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d310 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { ffc0d310: 94 21 ff e8 stwu r1,-24(r1) ffc0d314: 7c 08 02 a6 mflr r0 ffc0d318: 93 c1 00 10 stw r30,16(r1) ffc0d31c: 7c 7e 1b 78 mr r30,r3 ffc0d320: 93 e1 00 14 stw r31,20(r1) ffc0d324: 7c 9f 23 78 mr r31,r4 ffc0d328: 90 01 00 1c stw r0,28(r1) ffc0d32c: 93 81 00 08 stw r28,8(r1) ffc0d330: 93 a1 00 0c stw r29,12(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0d334: 7f a0 00 a6 mfmsr r29 ffc0d338: 7c 10 42 a6 mfsprg r0,0 ffc0d33c: 7f a0 00 78 andc r0,r29,r0 ffc0d340: 7c 00 01 24 mtmsr r0 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); ffc0d344: 3c 60 ff c2 lis r3,-62 ffc0d348: 7f e5 fb 78 mr r5,r31 ffc0d34c: 38 63 1d 54 addi r3,r3,7508 ffc0d350: 7f c4 f3 78 mr r4,r30 ffc0d354: 4c c6 31 82 crclr 4*cr1+eq ffc0d358: 4b ff 8c cd bl ffc06024 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc0d35c: 83 9f 00 00 lwz r28,0(r31) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0d360: 3b ff 00 04 addi r31,r31,4 if ( !_Chain_Is_empty( header ) ) { ffc0d364: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0d368: 41 9e 00 34 beq- cr7,ffc0d39c <_Watchdog_Report_chain+0x8c> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); ffc0d36c: 7f 84 e3 78 mr r4,r28 ffc0d370: 38 60 00 00 li r3,0 ffc0d374: 48 00 00 5d bl ffc0d3d0 <_Watchdog_Report> <== ALWAYS TAKEN _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) ffc0d378: 83 9c 00 00 lwz r28,0(r28) Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; ffc0d37c: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0d380: 40 9e ff ec bne+ cr7,ffc0d36c <_Watchdog_Report_chain+0x5c> <== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); ffc0d384: 3c 60 ff c2 lis r3,-62 ffc0d388: 38 63 1d 6b addi r3,r3,7531 ffc0d38c: 7f c4 f3 78 mr r4,r30 ffc0d390: 4c c6 31 82 crclr 4*cr1+eq ffc0d394: 4b ff 8c 91 bl ffc06024 <== ALWAYS TAKEN ffc0d398: 48 00 00 14 b ffc0d3ac <_Watchdog_Report_chain+0x9c> <== ALWAYS TAKEN } else { printk( "Chain is empty\n" ); ffc0d39c: 3c 60 ff c2 lis r3,-62 ffc0d3a0: 38 63 1d 7a addi r3,r3,7546 ffc0d3a4: 4c c6 31 82 crclr 4*cr1+eq ffc0d3a8: 4b ff 8c 7d bl ffc06024 <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0d3ac: 7f a0 01 24 mtmsr r29 } _ISR_Enable( level ); } ffc0d3b0: 80 01 00 1c lwz r0,28(r1) ffc0d3b4: 83 81 00 08 lwz r28,8(r1) ffc0d3b8: 7c 08 03 a6 mtlr r0 ffc0d3bc: 83 a1 00 0c lwz r29,12(r1) ffc0d3c0: 83 c1 00 10 lwz r30,16(r1) ffc0d3c4: 83 e1 00 14 lwz r31,20(r1) ffc0d3c8: 38 21 00 18 addi r1,r1,24 ffc0d3cc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b9b4 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { ffc0b9b4: 94 21 ff e8 stwu r1,-24(r1) <== ALWAYS TAKEN ffc0b9b8: 7c 08 02 a6 mflr r0 ffc0b9bc: 90 01 00 1c stw r0,28(r1) ffc0b9c0: 93 c1 00 10 stw r30,16(r1) ffc0b9c4: 7c 7e 1b 78 mr r30,r3 <== ALWAYS TAKEN ffc0b9c8: 93 81 00 08 stw r28,8(r1) ffc0b9cc: 93 a1 00 0c stw r29,12(r1) ffc0b9d0: 93 e1 00 14 stw r31,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b9d4: 7f 80 00 a6 mfmsr r28 ffc0b9d8: 7c 10 42 a6 mfsprg r0,0 ffc0b9dc: 7f 80 00 78 andc r0,r28,r0 ffc0b9e0: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc0b9e4: 83 e3 00 00 lwz r31,0(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0b9e8: 3b a3 00 04 addi r29,r3,4 * volatile data - till, 2003/7 */ _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0b9ec: 7f 9f e8 00 cmpw cr7,r31,r29 ffc0b9f0: 41 9e 00 74 beq- cr7,ffc0ba64 <_Watchdog_Tickle+0xb0> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { ffc0b9f4: 81 3f 00 10 lwz r9,16(r31) ffc0b9f8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b9fc: 41 9e 00 14 beq- cr7,ffc0ba10 <_Watchdog_Tickle+0x5c> the_watchdog->delta_interval--; ffc0ba00: 38 09 ff ff addi r0,r9,-1 if ( the_watchdog->delta_interval != 0 ) ffc0ba04: 2f 80 00 00 cmpwi cr7,r0,0 * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { the_watchdog->delta_interval--; ffc0ba08: 90 1f 00 10 stw r0,16(r31) if ( the_watchdog->delta_interval != 0 ) ffc0ba0c: 40 9e 00 58 bne- cr7,ffc0ba64 <_Watchdog_Tickle+0xb0> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); ffc0ba10: 7f e3 fb 78 mr r3,r31 ffc0ba14: 4b ff fe f5 bl ffc0b908 <_Watchdog_Remove> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ba18: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); switch( watchdog_state ) { ffc0ba1c: 2f 83 00 02 cmpwi cr7,r3,2 ffc0ba20: 40 be 00 18 bne+ cr7,ffc0ba38 <_Watchdog_Tickle+0x84> case WATCHDOG_ACTIVE: (*the_watchdog->routine)( ffc0ba24: 80 1f 00 1c lwz r0,28(r31) ffc0ba28: 80 9f 00 24 lwz r4,36(r31) ffc0ba2c: 80 7f 00 20 lwz r3,32(r31) ffc0ba30: 7c 09 03 a6 mtctr r0 ffc0ba34: 4e 80 04 21 bctrl <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ba38: 7f 80 00 a6 mfmsr r28 ffc0ba3c: 7c 10 42 a6 mfsprg r0,0 ffc0ba40: 7f 80 00 78 andc r0,r28,r0 ffc0ba44: 7c 00 01 24 mtmsr r0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); ffc0ba48: 80 1e 00 00 lwz r0,0(r30) _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); ffc0ba4c: 7f 80 e8 00 cmpw cr7,r0,r29 ffc0ba50: 7c 1f 03 78 mr r31,r0 ffc0ba54: 41 9e 00 10 beq- cr7,ffc0ba64 <_Watchdog_Tickle+0xb0> ffc0ba58: 80 1f 00 10 lwz r0,16(r31) ffc0ba5c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ba60: 4b ff ff ac b ffc0ba0c <_Watchdog_Tickle+0x58> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ba64: 7f 80 01 24 mtmsr r28 leave: _ISR_Enable(level); } ffc0ba68: 80 01 00 1c lwz r0,28(r1) ffc0ba6c: 83 81 00 08 lwz r28,8(r1) ffc0ba70: 7c 08 03 a6 mtlr r0 ffc0ba74: 83 a1 00 0c lwz r29,12(r1) ffc0ba78: 83 c1 00 10 lwz r30,16(r1) ffc0ba7c: 83 e1 00 14 lwz r31,20(r1) ffc0ba80: 38 21 00 18 addi r1,r1,24 ffc0ba84: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0bad0 <_Workspace_Allocate>: * _Workspace_Allocate */ void *_Workspace_Allocate( size_t size ) { ffc0bad0: 94 21 ff f8 stwu r1,-8(r1) ffc0bad4: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN ffc0bad8: 7c 64 1b 78 mr r4,r3 ffc0badc: 3c 60 00 00 lis r3,0 ffc0bae0: 90 01 00 0c stw r0,12(r1) ffc0bae4: 38 63 2c 0c addi r3,r3,11276 ffc0bae8: 38 a0 00 00 li r5,0 <== ALWAYS TAKEN ffc0baec: 38 c0 00 00 li r6,0 ffc0baf0: 48 00 21 95 bl ffc0dc84 <_Heap_Allocate_aligned_with_boundary> <== ALWAYS TAKEN __builtin_return_address( 1 ), memory ); #endif return memory; } ffc0baf4: 80 01 00 0c lwz r0,12(r1) ffc0baf8: 38 21 00 08 addi r1,r1,8 ffc0bafc: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0bb00: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ba88 <_Workspace_Allocate_or_fatal_error>: * _Workspace_Allocate_or_fatal_error */ void *_Workspace_Allocate_or_fatal_error( size_t size ) { ffc0ba88: 94 21 ff f8 stwu r1,-8(r1) ffc0ba8c: 7c 08 02 a6 mflr r0 ffc0ba90: 7c 64 1b 78 mr r4,r3 * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); ffc0ba94: 3c 60 00 00 lis r3,0 ffc0ba98: 90 01 00 0c stw r0,12(r1) ffc0ba9c: 38 63 2c 0c addi r3,r3,11276 ffc0baa0: 38 a0 00 00 li r5,0 ffc0baa4: 38 c0 00 00 li r6,0 ffc0baa8: 48 00 21 dd bl ffc0dc84 <_Heap_Allocate_aligned_with_boundary> <== ALWAYS TAKEN __builtin_return_address( 1 ), memory ); #endif if ( memory == NULL ) ffc0baac: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bab0: 40 be 00 10 bne+ cr7,ffc0bac0 <_Workspace_Allocate_or_fatal_error+0x38> _Internal_error_Occurred( ffc0bab4: 38 80 00 01 li r4,1 ffc0bab8: 38 a0 00 04 li r5,4 ffc0babc: 4b ff d7 19 bl ffc091d4 <_Internal_error_Occurred> <== ALWAYS TAKEN true, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; } ffc0bac0: 80 01 00 0c lwz r0,12(r1) ffc0bac4: 38 21 00 08 addi r1,r1,8 ffc0bac8: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0bacc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0bb04 <_Workspace_Free>: * _Workspace_Free */ bool _Workspace_Free( void *block ) { ffc0bb04: 94 21 ff f8 stwu r1,-8(r1) ffc0bb08: 7c 08 02 a6 mflr r0 ffc0bb0c: 7c 64 1b 78 mr r4,r3 block, __builtin_return_address( 0 ), __builtin_return_address( 1 ) ); #endif return _Heap_Free( &_Workspace_Area, block ); ffc0bb10: 3c 60 00 00 lis r3,0 * _Workspace_Free */ bool _Workspace_Free( void *block ) { ffc0bb14: 90 01 00 0c stw r0,12(r1) block, __builtin_return_address( 0 ), __builtin_return_address( 1 ) ); #endif return _Heap_Free( &_Workspace_Area, block ); ffc0bb18: 38 63 2c 0c addi r3,r3,11276 ffc0bb1c: 48 00 23 29 bl ffc0de44 <_Heap_Free> <== ALWAYS TAKEN } ffc0bb20: 80 01 00 0c lwz r0,12(r1) ffc0bb24: 38 21 00 08 addi r1,r1,8 ffc0bb28: 7c 08 03 a6 mtlr r0 ffc0bb2c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0bb30 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { ffc0bb30: 94 21 ff f0 stwu r1,-16(r1) ffc0bb34: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; ffc0bb38: 3d 60 00 00 lis r11,0 /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { ffc0bb3c: 90 01 00 14 stw r0,20(r1) uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; ffc0bb40: 39 2b 20 a0 addi r9,r11,8352 uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) ffc0bb44: 88 09 00 28 lbz r0,40(r9) <== ALWAYS TAKEN /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { ffc0bb48: 93 c1 00 08 stw r30,8(r1) <== ALWAYS TAKEN uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) ffc0bb4c: 2f 80 00 00 cmpwi cr7,r0,0 <== ALWAYS TAKEN /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { ffc0bb50: 93 e1 00 0c stw r31,12(r1) uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; ffc0bb54: 83 cb 20 a0 lwz r30,8352(r11) uintptr_t size = Configuration.work_space_size; ffc0bb58: 83 e9 00 04 lwz r31,4(r9) if ( Configuration.do_zero_of_workspace ) ffc0bb5c: 41 be 00 14 beq+ cr7,ffc0bb70 <_Workspace_Handler_initialization+0x40> memset( starting_address, 0, size ); ffc0bb60: 7f c3 f3 78 mr r3,r30 ffc0bb64: 38 80 00 00 li r4,0 ffc0bb68: 7f e5 fb 78 mr r5,r31 ffc0bb6c: 48 00 55 41 bl ffc110ac <== ALWAYS TAKEN memory_available = _Heap_Initialize( ffc0bb70: 3c 60 00 00 lis r3,0 ffc0bb74: 38 63 2c 0c addi r3,r3,11276 ffc0bb78: 7f c4 f3 78 mr r4,r30 ffc0bb7c: 7f e5 fb 78 mr r5,r31 ffc0bb80: 38 c0 00 08 li r6,8 ffc0bb84: 4b ff d2 89 bl ffc08e0c <_Heap_Initialize> <== ALWAYS TAKEN starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) ffc0bb88: 2f 83 00 00 cmpwi cr7,r3,0 <== ALWAYS TAKEN ffc0bb8c: 40 be 00 10 bne+ cr7,ffc0bb9c <_Workspace_Handler_initialization+0x6c> _Internal_error_Occurred( ffc0bb90: 38 80 00 01 li r4,1 ffc0bb94: 38 a0 00 03 li r5,3 ffc0bb98: 4b ff d6 3d bl ffc091d4 <_Internal_error_Occurred> <== ALWAYS TAKEN INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } ffc0bb9c: 80 01 00 14 lwz r0,20(r1) ffc0bba0: 83 c1 00 08 lwz r30,8(r1) ffc0bba4: 7c 08 03 a6 mtlr r0 ffc0bba8: 83 e1 00 0c lwz r31,12(r1) <== ALWAYS TAKEN ffc0bbac: 38 21 00 10 addi r1,r1,16 ffc0bbb0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f534 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { ffc0f534: 94 21 ff d0 stwu r1,-48(r1) ffc0f538: 7c 08 02 a6 mflr r0 ffc0f53c: 93 e1 00 2c stw r31,44(r1) Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) ffc0f540: 7c 7f 1b 79 mr. r31,r3 ffc0f544: 38 60 00 03 li r3,3 rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { ffc0f548: 93 81 00 20 stw r28,32(r1) ffc0f54c: 7c dc 33 78 mr r28,r6 ffc0f550: 93 c1 00 28 stw r30,40(r1) ffc0f554: 7c 9e 23 78 mr r30,r4 ffc0f558: 90 01 00 34 stw r0,52(r1) ffc0f55c: 93 61 00 1c stw r27,28(r1) ffc0f560: 93 a1 00 24 stw r29,36(r1) Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) ffc0f564: 41 82 00 9c beq- ffc0f600 return RTEMS_INVALID_NAME; if ( !id ) ffc0f568: 2f 86 00 00 cmpwi cr7,r6,0 ffc0f56c: 38 60 00 09 li r3,9 ffc0f570: 41 9e 00 90 beq- cr7,ffc0f600 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { ffc0f574: 70 80 00 10 andi. r0,r4,16 ffc0f578: 41 82 00 18 beq- ffc0f590 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) ffc0f57c: 2f 85 00 00 cmpwi cr7,r5,0 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; ffc0f580: 38 00 00 00 li r0,0 if ( maximum_waiters == 0 ) ffc0f584: 38 60 00 0a li r3,10 ffc0f588: 40 be 00 0c bne+ cr7,ffc0f594 ffc0f58c: 48 00 00 74 b ffc0f600 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; ffc0f590: 38 00 00 01 li r0,1 ffc0f594: 3d 20 00 00 lis r9,0 ffc0f598: 90 01 00 08 stw r0,8(r1) ffc0f59c: 81 69 27 2c lwz r11,10028(r9) the_attributes.maximum_count = maximum_waiters; ffc0f5a0: 90 a1 00 0c stw r5,12(r1) ffc0f5a4: 38 0b 00 01 addi r0,r11,1 ffc0f5a8: 90 09 27 2c stw r0,10028(r9) * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); ffc0f5ac: 3f 60 00 00 lis r27,0 ffc0f5b0: 3b 7b 2e 04 addi r27,r27,11780 ffc0f5b4: 7f 63 db 78 mr r3,r27 ffc0f5b8: 4b ff 9c 7d bl ffc09234 <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { ffc0f5bc: 7c 7d 1b 79 mr. r29,r3 ffc0f5c0: 40 a2 00 10 bne+ ffc0f5d0 _Thread_Enable_dispatch(); ffc0f5c4: 4b ff ac e9 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0f5c8: 38 60 00 05 li r3,5 return RTEMS_TOO_MANY; ffc0f5cc: 48 00 00 34 b ffc0f600 <== ALWAYS TAKEN } the_barrier->attribute_set = attribute_set; ffc0f5d0: 93 dd 00 10 stw r30,16(r29) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); ffc0f5d4: 38 7d 00 14 addi r3,r29,20 ffc0f5d8: 38 81 00 08 addi r4,r1,8 ffc0f5dc: 48 00 05 45 bl ffc0fb20 <_CORE_barrier_Initialize> <== ALWAYS TAKEN ffc0f5e0: 80 1d 00 08 lwz r0,8(r29) ffc0f5e4: 81 7b 00 1c lwz r11,28(r27) ffc0f5e8: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0f5ec: 93 fd 00 0c stw r31,12(r29) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0f5f0: 7f ab 49 2e stwx r29,r11,r9 &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; ffc0f5f4: 90 1c 00 00 stw r0,0(r28) _Thread_Enable_dispatch(); ffc0f5f8: 4b ff ac b5 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0f5fc: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; } ffc0f600: 80 01 00 34 lwz r0,52(r1) ffc0f604: 83 61 00 1c lwz r27,28(r1) ffc0f608: 7c 08 03 a6 mtlr r0 ffc0f60c: 83 81 00 20 lwz r28,32(r1) ffc0f610: 83 a1 00 24 lwz r29,36(r1) ffc0f614: 83 c1 00 28 lwz r30,40(r1) ffc0f618: 83 e1 00 2c lwz r31,44(r1) ffc0f61c: 38 21 00 30 addi r1,r1,48 ffc0f620: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f624 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { ffc0f624: 94 21 ff e0 stwu r1,-32(r1) ffc0f628: 7c 08 02 a6 mflr r0 ffc0f62c: 7c 64 1b 78 mr r4,r3 ffc0f630: 93 c1 00 18 stw r30,24(r1) RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) ffc0f634: 3f c0 00 00 lis r30,0 ffc0f638: 3b de 2e 04 addi r30,r30,11780 ffc0f63c: 7f c3 f3 78 mr r3,r30 ffc0f640: 90 01 00 24 stw r0,36(r1) ffc0f644: 38 a1 00 08 addi r5,r1,8 ffc0f648: 93 e1 00 1c stw r31,28(r1) ffc0f64c: 4b ff a1 95 bl ffc097e0 <_Objects_Get> <== ALWAYS TAKEN ffc0f650: 7c 7f 1b 78 mr r31,r3 Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { ffc0f654: 80 01 00 08 lwz r0,8(r1) ffc0f658: 38 60 00 04 li r3,4 ffc0f65c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f660: 40 9e 00 34 bne- cr7,ffc0f694 case OBJECTS_LOCAL: _CORE_barrier_Flush( ffc0f664: 38 a0 00 02 li r5,2 ffc0f668: 38 7f 00 14 addi r3,r31,20 ffc0f66c: 38 80 00 00 li r4,0 ffc0f670: 4b ff b4 d1 bl ffc0ab40 <_Thread_queue_Flush> <== ALWAYS TAKEN &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); ffc0f674: 7f c3 f3 78 mr r3,r30 ffc0f678: 7f e4 fb 78 mr r4,r31 ffc0f67c: 4b ff 9c 65 bl ffc092e0 <_Objects_Close> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); ffc0f680: 7f c3 f3 78 mr r3,r30 ffc0f684: 7f e4 fb 78 mr r4,r31 ffc0f688: 4b ff 9f 99 bl ffc09620 <_Objects_Free> <== ALWAYS TAKEN _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); ffc0f68c: 4b ff ac 21 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0f690: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0f694: 80 01 00 24 lwz r0,36(r1) ffc0f698: 83 c1 00 18 lwz r30,24(r1) ffc0f69c: 7c 08 03 a6 mtlr r0 ffc0f6a0: 83 e1 00 1c lwz r31,28(r1) ffc0f6a4: 38 21 00 20 addi r1,r1,32 ffc0f6a8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08c60 : rtems_status_code rtems_barrier_ident( rtems_name name, rtems_id *id ) { ffc08c60: 94 21 ff f8 stwu r1,-8(r1) ffc08c64: 7c 08 02 a6 mflr r0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc08c68: 3c a0 7f ff lis r5,32767 rtems_status_code rtems_barrier_ident( rtems_name name, rtems_id *id ) { ffc08c6c: 90 01 00 0c stw r0,12(r1) ffc08c70: 7c 60 1b 78 mr r0,r3 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc08c74: 3c 60 00 00 lis r3,0 rtems_status_code rtems_barrier_ident( rtems_name name, rtems_id *id ) { ffc08c78: 7c 86 23 78 mr r6,r4 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc08c7c: 38 63 2b 2c addi r3,r3,11052 ffc08c80: 7c 04 03 78 mr r4,r0 ffc08c84: 60 a5 ff ff ori r5,r5,65535 ffc08c88: 48 00 27 a9 bl ffc0b430 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc08c8c: 80 01 00 0c lwz r0,12(r1) ffc08c90: 3d 20 ff c2 lis r9,-62 ffc08c94: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc08c98: 54 63 10 3a rlwinm r3,r3,2,0,29 OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc08c9c: 39 29 12 d0 addi r9,r9,4816 ffc08ca0: 7c 69 18 2e lwzx r3,r9,r3 ffc08ca4: 38 21 00 08 addi r1,r1,8 ffc08ca8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f6ac : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { ffc0f6ac: 94 21 ff e0 stwu r1,-32(r1) ffc0f6b0: 7c 08 02 a6 mflr r0 ffc0f6b4: 93 c1 00 18 stw r30,24(r1) Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) ffc0f6b8: 7c 9e 23 79 mr. r30,r4 rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { ffc0f6bc: 90 01 00 24 stw r0,36(r1) Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) ffc0f6c0: 38 00 00 09 li r0,9 rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { ffc0f6c4: 93 e1 00 1c stw r31,28(r1) ffc0f6c8: 7c 7f 1b 78 mr r31,r3 Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) ffc0f6cc: 41 82 00 44 beq- ffc0f710 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) ffc0f6d0: 3c 60 00 00 lis r3,0 ffc0f6d4: 38 63 2e 04 addi r3,r3,11780 ffc0f6d8: 7f e4 fb 78 mr r4,r31 ffc0f6dc: 38 a1 00 08 addi r5,r1,8 ffc0f6e0: 4b ff a1 01 bl ffc097e0 <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { ffc0f6e4: 81 21 00 08 lwz r9,8(r1) ffc0f6e8: 38 00 00 04 li r0,4 ffc0f6ec: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f6f0: 40 9e 00 20 bne- cr7,ffc0f710 case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); ffc0f6f4: 7f e4 fb 78 mr r4,r31 ffc0f6f8: 38 a0 00 00 li r5,0 ffc0f6fc: 38 63 00 14 addi r3,r3,20 ffc0f700: 48 00 04 65 bl ffc0fb64 <_CORE_barrier_Release> <== ALWAYS TAKEN ffc0f704: 90 7e 00 00 stw r3,0(r30) _Thread_Enable_dispatch(); ffc0f708: 4b ff ab a5 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0f70c: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0f710: 7c 03 03 78 mr r3,r0 ffc0f714: 80 01 00 24 lwz r0,36(r1) ffc0f718: 83 c1 00 18 lwz r30,24(r1) ffc0f71c: 7c 08 03 a6 mtlr r0 ffc0f720: 83 e1 00 1c lwz r31,28(r1) ffc0f724: 38 21 00 20 addi r1,r1,32 ffc0f728: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f72c : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { ffc0f72c: 94 21 ff e0 stwu r1,-32(r1) ffc0f730: 7c 08 02 a6 mflr r0 ffc0f734: 93 e1 00 1c stw r31,28(r1) ffc0f738: 7c 7f 1b 78 mr r31,r3 ffc0f73c: 3c 60 00 00 lis r3,0 ffc0f740: 93 c1 00 18 stw r30,24(r1) ffc0f744: 38 63 2e 04 addi r3,r3,11780 ffc0f748: 7c 9e 23 78 mr r30,r4 ffc0f74c: 38 a1 00 08 addi r5,r1,8 ffc0f750: 90 01 00 24 stw r0,36(r1) ffc0f754: 7f e4 fb 78 mr r4,r31 ffc0f758: 4b ff a0 89 bl ffc097e0 <_Objects_Get> <== ALWAYS TAKEN Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { ffc0f75c: 80 01 00 08 lwz r0,8(r1) ffc0f760: 7c 69 1b 78 mr r9,r3 ffc0f764: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f768: 38 60 00 04 li r3,4 ffc0f76c: 40 9e 00 30 bne- cr7,ffc0f79c case OBJECTS_LOCAL: _CORE_barrier_Wait( ffc0f770: 38 69 00 14 addi r3,r9,20 ffc0f774: 7f e4 fb 78 mr r4,r31 ffc0f778: 7f c6 f3 78 mr r6,r30 ffc0f77c: 38 a0 00 01 li r5,1 ffc0f780: 38 e0 00 00 li r7,0 ffc0f784: 48 00 04 35 bl ffc0fbb8 <_CORE_barrier_Wait> <== ALWAYS TAKEN id, true, timeout, NULL ); _Thread_Enable_dispatch(); ffc0f788: 4b ff ab 25 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN return _Barrier_Translate_core_barrier_return_code( ffc0f78c: 3d 20 00 00 lis r9,0 ffc0f790: 81 29 27 6c lwz r9,10092(r9) ffc0f794: 80 69 00 34 lwz r3,52(r9) ffc0f798: 48 00 0b 95 bl ffc1032c <_Barrier_Translate_core_barrier_return_code> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0f79c: 80 01 00 24 lwz r0,36(r1) ffc0f7a0: 83 c1 00 18 lwz r30,24(r1) ffc0f7a4: 7c 08 03 a6 mtlr r0 ffc0f7a8: 83 e1 00 1c lwz r31,28(r1) ffc0f7ac: 38 21 00 20 addi r1,r1,32 ffc0f7b0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09a34 : uint32_t api, uint32_t class, uint32_t node, uint32_t index ) { ffc09a34: 54 84 d8 08 rlwinm r4,r4,27,0,4 ffc09a38: 54 63 c0 0e rlwinm r3,r3,24,0,7 ffc09a3c: 7c 83 1b 78 or r3,r4,r3 ffc09a40: 7c 63 33 78 or r3,r3,r6 ffc09a44: 54 a5 80 1e rlwinm r5,r5,16,0,15 return _Objects_Build_id( api, class, node, index ); } ffc09a48: 7c 63 2b 78 or r3,r3,r5 ffc09a4c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09a50 : char C1, char C2, char C3, char C4 ) { ffc09a50: 54 84 80 1e rlwinm r4,r4,16,0,15 ffc09a54: 54 63 c0 0e rlwinm r3,r3,24,0,7 ffc09a58: 7c 83 1b 78 or r3,r4,r3 ffc09a5c: 54 a5 40 2e rlwinm r5,r5,8,0,23 ffc09a60: 7c 63 2b 78 or r3,r3,r5 return _Objects_Build_name( C1, C2, C3, C4 ); } ffc09a64: 7c 63 33 78 or r3,r3,r6 ffc09a68: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ca30 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { ffc0ca30: 94 21 ff f0 stwu r1,-16(r1) ffc0ca34: 7c 08 02 a6 mflr r0 ffc0ca38: 93 e1 00 0c stw r31,12(r1) if ( !time_buffer ) ffc0ca3c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { ffc0ca40: 90 01 00 14 stw r0,20(r1) ffc0ca44: 7c 60 1b 78 mr r0,r3 if ( !time_buffer ) ffc0ca48: 38 60 00 09 li r3,9 ffc0ca4c: 41 82 00 68 beq- ffc0cab4 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) ffc0ca50: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ca54: 40 be 00 10 bne+ cr7,ffc0ca64 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); ffc0ca58: 7f e3 fb 78 mr r3,r31 ffc0ca5c: 48 00 00 c5 bl ffc0cb20 <== ALWAYS TAKEN ffc0ca60: 48 00 00 54 b ffc0cab4 <== ALWAYS TAKEN if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) ffc0ca64: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ca68: 40 be 00 10 bne+ cr7,ffc0ca78 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); ffc0ca6c: 7f e3 fb 78 mr r3,r31 ffc0ca70: 48 00 00 59 bl ffc0cac8 <== ALWAYS TAKEN ffc0ca74: 48 00 00 40 b ffc0cab4 <== ALWAYS TAKEN if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { ffc0ca78: 2f 80 00 02 cmpwi cr7,r0,2 ffc0ca7c: 40 be 00 0c bne+ cr7,ffc0ca88 rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); ffc0ca80: 48 00 00 95 bl ffc0cb14 <== ALWAYS TAKEN ffc0ca84: 48 00 00 10 b ffc0ca94 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { ffc0ca88: 2f 80 00 03 cmpwi cr7,r0,3 ffc0ca8c: 40 be 00 14 bne+ cr7,ffc0caa0 rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); ffc0ca90: 48 00 00 6d bl ffc0cafc <== ALWAYS TAKEN ffc0ca94: 90 7f 00 00 stw r3,0(r31) ffc0ca98: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc0ca9c: 48 00 00 18 b ffc0cab4 <== ALWAYS TAKEN } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) ffc0caa0: 2f 80 00 04 cmpwi cr7,r0,4 ffc0caa4: 38 60 00 0a li r3,10 ffc0caa8: 40 be 00 0c bne+ cr7,ffc0cab4 return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); ffc0caac: 7f e3 fb 78 mr r3,r31 ffc0cab0: 48 00 01 4d bl ffc0cbfc <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; } ffc0cab4: 80 01 00 14 lwz r0,20(r1) ffc0cab8: 83 e1 00 0c lwz r31,12(r1) ffc0cabc: 38 21 00 10 addi r1,r1,16 ffc0cac0: 7c 08 03 a6 mtlr r0 ffc0cac4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08c68 : rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) ffc08c68: 7c 69 1b 79 mr. r9,r3 ffc08c6c: 38 60 00 09 li r3,9 ffc08c70: 4d 82 00 20 beqlr return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) ffc08c74: 3d 60 00 00 lis r11,0 ffc08c78: 88 0b 27 e0 lbz r0,10208(r11) ffc08c7c: 38 60 00 0b li r3,11 ffc08c80: 2f 80 00 00 cmpwi cr7,r0,0 ffc08c84: 4d 9e 00 20 beqlr cr7 return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); ffc08c88: 3d 60 00 00 lis r11,0 ffc08c8c: 80 0b 27 f8 lwz r0,10232(r11) ffc08c90: 38 60 00 00 li r3,0 ffc08c94: 90 09 00 00 stw r0,0(r9) return RTEMS_SUCCESSFUL; } ffc08c98: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07464 : #include #include #include rtems_interval rtems_clock_get_ticks_per_second(void) { ffc07464: 3d 20 00 00 lis r9,0 ffc07468: 80 09 20 ac lwz r0,8364(r9) ffc0746c: 3c 60 00 0f lis r3,15 ffc07470: 60 63 42 40 ori r3,r3,16960 return TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); } ffc07474: 7c 63 03 96 divwu r3,r3,r0 ffc07478: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0747c : #include #include rtems_interval rtems_clock_get_ticks_since_boot(void) { return _Watchdog_Ticks_since_boot; ffc0747c: 3d 20 00 00 lis r9,0 ffc07480: 80 69 27 84 lwz r3,10116(r9) } ffc07484: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08cc0 : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { ffc08cc0: 94 21 ff b0 stwu r1,-80(r1) ffc08cc4: 7c 08 02 a6 mflr r0 ffc08cc8: 93 e1 00 4c stw r31,76(r1) rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) ffc08ccc: 7c 7f 1b 79 mr. r31,r3 ffc08cd0: 38 60 00 09 li r3,9 #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { ffc08cd4: 90 01 00 54 stw r0,84(r1) ffc08cd8: 93 c1 00 48 stw r30,72(r1) rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) ffc08cdc: 41 82 00 a8 beq- ffc08d84 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) ffc08ce0: 3d 20 00 00 lis r9,0 ffc08ce4: 88 09 27 e0 lbz r0,10208(r9) ffc08ce8: 38 60 00 0b li r3,11 ffc08cec: 2f 80 00 00 cmpwi cr7,r0,0 ffc08cf0: 41 be 00 94 beq+ cr7,ffc08d84 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08cf4: 7f c0 00 a6 mfmsr r30 ffc08cf8: 7c 10 42 a6 mfsprg r0,0 ffc08cfc: 7f c0 00 78 andc r0,r30,r0 ffc08d00: 7c 00 01 24 mtmsr r0 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); ffc08d04: 38 61 00 10 addi r3,r1,16 ffc08d08: 48 00 1e 51 bl ffc0ab58 <_TOD_Get> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08d0c: 7f c0 01 24 mtmsr r30 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; ffc08d10: 81 21 00 14 lwz r9,20(r1) ffc08d14: 38 00 03 e8 li r0,1000 /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); ffc08d18: 38 61 00 08 addi r3,r1,8 ffc08d1c: 7c 09 03 d6 divw r0,r9,r0 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; ffc08d20: 81 21 00 10 lwz r9,16(r1) ffc08d24: 91 21 00 08 stw r9,8(r1) ffc08d28: 38 81 00 18 addi r4,r1,24 time->tv_usec = useconds; ffc08d2c: 90 01 00 0c stw r0,12(r1) ffc08d30: 48 00 a4 dd bl ffc1320c <== ALWAYS TAKEN tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / ffc08d34: 38 60 00 00 li r3,0 /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; ffc08d38: 81 61 00 28 lwz r11,40(r1) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; ffc08d3c: 81 21 00 2c lwz r9,44(r1) tmbuf->month = time.tm_mon + 1; ffc08d40: 38 0b 00 01 addi r0,r11,1 ffc08d44: 90 1f 00 04 stw r0,4(r31) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; ffc08d48: 39 29 07 6c addi r9,r9,1900 tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; ffc08d4c: 80 01 00 24 lwz r0,36(r1) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; ffc08d50: 91 3f 00 00 stw r9,0(r31) tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / ffc08d54: 3d 20 00 00 lis r9,0 gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; ffc08d58: 90 1f 00 08 stw r0,8(r31) tmbuf->hour = time.tm_hour; ffc08d5c: 80 01 00 20 lwz r0,32(r1) ffc08d60: 90 1f 00 0c stw r0,12(r31) tmbuf->minute = time.tm_min; ffc08d64: 80 01 00 1c lwz r0,28(r1) ffc08d68: 90 1f 00 10 stw r0,16(r31) tmbuf->second = time.tm_sec; ffc08d6c: 80 01 00 18 lwz r0,24(r1) ffc08d70: 90 1f 00 14 stw r0,20(r31) tmbuf->ticks = now.tv_usec / ffc08d74: 80 09 20 cc lwz r0,8396(r9) ffc08d78: 81 21 00 0c lwz r9,12(r1) ffc08d7c: 7c 09 03 96 divwu r0,r9,r0 ffc08d80: 90 1f 00 18 stw r0,24(r31) rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; } ffc08d84: 80 01 00 54 lwz r0,84(r1) ffc08d88: 83 c1 00 48 lwz r30,72(r1) ffc08d8c: 7c 08 03 a6 mtlr r0 ffc08d90: 83 e1 00 4c lwz r31,76(r1) ffc08d94: 38 21 00 50 addi r1,r1,80 ffc08d98: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0cbfc : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { ffc0cbfc: 94 21 ff e0 stwu r1,-32(r1) ffc0cc00: 7c 08 02 a6 mflr r0 ffc0cc04: 93 e1 00 1c stw r31,28(r1) if ( !time ) ffc0cc08: 7c 7f 1b 79 mr. r31,r3 ffc0cc0c: 38 60 00 09 li r3,9 #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { ffc0cc10: 90 01 00 24 stw r0,36(r1) ffc0cc14: 93 c1 00 18 stw r30,24(r1) if ( !time ) ffc0cc18: 41 82 00 50 beq- ffc0cc68 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) ffc0cc1c: 3d 20 00 00 lis r9,0 ffc0cc20: 88 09 35 dc lbz r0,13788(r9) ffc0cc24: 38 60 00 0b li r3,11 ffc0cc28: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cc2c: 41 be 00 3c beq+ cr7,ffc0cc68 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0cc30: 7f c0 00 a6 mfmsr r30 ffc0cc34: 7c 10 42 a6 mfsprg r0,0 ffc0cc38: 7f c0 00 78 andc r0,r30,r0 ffc0cc3c: 7c 00 01 24 mtmsr r0 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); ffc0cc40: 38 61 00 08 addi r3,r1,8 ffc0cc44: 48 00 19 35 bl ffc0e578 <_TOD_Get> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0cc48: 7f c0 01 24 mtmsr r30 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; ffc0cc4c: 81 21 00 0c lwz r9,12(r1) ffc0cc50: 38 00 03 e8 li r0,1000 ffc0cc54: 38 60 00 00 li r3,0 ffc0cc58: 7c 09 03 d6 divw r0,r9,r0 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; ffc0cc5c: 81 21 00 08 lwz r9,8(r1) ffc0cc60: 91 3f 00 00 stw r9,0(r31) time->tv_usec = useconds; ffc0cc64: 90 1f 00 04 stw r0,4(r31) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } ffc0cc68: 80 01 00 24 lwz r0,36(r1) ffc0cc6c: 83 c1 00 18 lwz r30,24(r1) ffc0cc70: 7c 08 03 a6 mtlr r0 ffc0cc74: 83 e1 00 1c lwz r31,28(r1) ffc0cc78: 38 21 00 20 addi r1,r1,32 ffc0cc7c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc2d2d4 : */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) ffc2d2d4: 2f 83 00 00 cmpwi cr7,r3,0 * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { ffc2d2d8: 7c 08 02 a6 mflr r0 ffc2d2dc: 94 21 ff f8 stwu r1,-8(r1) ffc2d2e0: 90 01 00 0c stw r0,12(r1) if ( !uptime ) ffc2d2e4: 38 00 00 09 li r0,9 ffc2d2e8: 41 9e 00 0c beq- cr7,ffc2d2f4 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); ffc2d2ec: 48 00 13 29 bl ffc2e614 <_TOD_Get_uptime_as_timespec> <== ALWAYS TAKEN ffc2d2f0: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; } ffc2d2f4: 7c 03 03 78 mr r3,r0 ffc2d2f8: 80 01 00 0c lwz r0,12(r1) ffc2d2fc: 38 21 00 08 addi r1,r1,8 ffc2d300: 7c 08 03 a6 mtlr r0 ffc2d304: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08db8 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { ffc08db8: 94 21 ff e0 stwu r1,-32(r1) ffc08dbc: 7c 08 02 a6 mflr r0 ffc08dc0: 93 e1 00 1c stw r31,28(r1) struct timespec newtime; if ( !time_buffer ) ffc08dc4: 7c 7f 1b 79 mr. r31,r3 */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { ffc08dc8: 90 01 00 24 stw r0,36(r1) struct timespec newtime; if ( !time_buffer ) ffc08dcc: 38 00 00 09 li r0,9 ffc08dd0: 41 82 00 58 beq- ffc08e28 return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { ffc08dd4: 48 00 01 51 bl ffc08f24 <_TOD_Validate> <== ALWAYS TAKEN ffc08dd8: 38 00 00 14 li r0,20 ffc08ddc: 2f 83 00 00 cmpwi cr7,r3,0 ffc08de0: 41 be 00 48 beq+ cr7,ffc08e28 newtime.tv_sec = _TOD_To_seconds( time_buffer ); ffc08de4: 7f e3 fb 78 mr r3,r31 ffc08de8: 48 00 00 b1 bl ffc08e98 <_TOD_To_seconds> <== ALWAYS TAKEN newtime.tv_nsec = time_buffer->ticks * ffc08dec: 3d 20 00 00 lis r9,0 if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); ffc08df0: 90 61 00 08 stw r3,8(r1) newtime.tv_nsec = time_buffer->ticks * ffc08df4: 80 09 20 cc lwz r0,8396(r9) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc08df8: 3d 20 00 00 lis r9,0 ffc08dfc: 81 7f 00 18 lwz r11,24(r31) ffc08e00: 7c 0b 01 d6 mullw r0,r11,r0 ffc08e04: 81 69 27 d8 lwz r11,10200(r9) ffc08e08: 39 6b 00 01 addi r11,r11,1 ffc08e0c: 1c 00 03 e8 mulli r0,r0,1000 ffc08e10: 91 69 27 d8 stw r11,10200(r9) ffc08e14: 90 01 00 0c stw r0,12(r1) rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); ffc08e18: 38 61 00 08 addi r3,r1,8 ffc08e1c: 48 00 1e bd bl ffc0acd8 <_TOD_Set> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc08e20: 48 00 36 4d bl ffc0c46c <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc08e24: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } ffc08e28: 7c 03 03 78 mr r3,r0 ffc08e2c: 80 01 00 24 lwz r0,36(r1) ffc08e30: 83 e1 00 1c lwz r31,28(r1) ffc08e34: 38 21 00 20 addi r1,r1,32 ffc08e38: 7c 08 03 a6 mtlr r0 ffc08e3c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07488 : */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) ffc07488: 7c 60 1b 79 mr. r0,r3 ffc0748c: 38 60 00 09 li r3,9 ffc07490: 4d 82 00 20 beqlr return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; ffc07494: 3d 20 00 00 lis r9,0 ffc07498: 90 09 27 94 stw r0,10132(r9) ffc0749c: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; } ffc074a0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc074a4 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { ffc074a4: 7c 08 02 a6 mflr r0 ffc074a8: 94 21 ff f8 stwu r1,-8(r1) ffc074ac: 90 01 00 0c stw r0,12(r1) _TOD_Tickle_ticks(); ffc074b0: 48 00 18 c1 bl ffc08d70 <_TOD_Tickle_ticks> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); ffc074b4: 3c 60 00 00 lis r3,0 ffc074b8: 38 63 2c a8 addi r3,r3,11432 ffc074bc: 48 00 44 f9 bl ffc0b9b4 <_Watchdog_Tickle> <== ALWAYS TAKEN _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); ffc074c0: 48 00 3c b9 bl ffc0b178 <_Thread_Tickle_timeslice> <== ALWAYS TAKEN * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); ffc074c4: 3d 20 00 00 lis r9,0 ffc074c8: 88 09 27 7c lbz r0,10108(r9) if ( _Thread_Is_context_switch_necessary() && ffc074cc: 2f 80 00 00 cmpwi cr7,r0,0 ffc074d0: 41 9e 00 18 beq- cr7,ffc074e8 * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); ffc074d4: 3d 20 00 00 lis r9,0 ffc074d8: 80 09 27 2c lwz r0,10028(r9) ffc074dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc074e0: 40 be 00 08 bne+ cr7,ffc074e8 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); ffc074e4: 48 00 2b d9 bl ffc0a0bc <_Thread_Dispatch> <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } ffc074e8: 80 01 00 0c lwz r0,12(r1) ffc074ec: 38 60 00 00 li r3,0 ffc074f0: 38 21 00 08 addi r1,r1,8 ffc074f4: 7c 08 03 a6 mtlr r0 ffc074f8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d90c : */ void rtems_debug_disable ( rtems_debug_control to_be_disabled ) { _Debug_Level &= ~to_be_disabled; ffc0d90c: 3d 20 00 00 lis r9,0 ffc0d910: 80 09 27 70 lwz r0,10096(r9) ffc0d914: 7c 00 18 78 andc r0,r0,r3 ffc0d918: 90 09 27 70 stw r0,10096(r9) } ffc0d91c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d8f8 : */ void rtems_debug_enable ( rtems_debug_control to_be_enabled ) { _Debug_Level |= to_be_enabled; ffc0d8f8: 3d 20 00 00 lis r9,0 ffc0d8fc: 80 09 27 70 lwz r0,10096(r9) ffc0d900: 7c 60 03 78 or r0,r3,r0 ffc0d904: 90 09 27 70 stw r0,10096(r9) } ffc0d908: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d920 : * rtems_debug_is_enabled */ bool rtems_debug_is_enabled( rtems_debug_control level ) { ffc0d920: 3d 20 00 00 lis r9,0 ffc0d924: 80 09 27 70 lwz r0,10096(r9) ffc0d928: 7c 63 00 38 and r3,r3,r0 return (_Debug_Level & level) ? true : false; } ffc0d92c: 31 23 ff ff addic r9,r3,-1 ffc0d930: 7c 09 19 10 subfe r0,r9,r3 ffc0d934: 7c 03 03 78 mr r3,r0 ffc0d938: 4e 80 00 20 blr <== ALWAYS TAKEN ffc074fc : rtems_event_set *event_out ) { RTEMS_API_Control *api; if ( !event_out ) ffc074fc: 7c c9 33 79 mr. r9,r6 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc07500: 94 21 ff f0 stwu r1,-16(r1) ffc07504: 7c 08 02 a6 mflr r0 ffc07508: 93 e1 00 0c stw r31,12(r1) ffc0750c: 90 01 00 14 stw r0,20(r1) RTEMS_API_Control *api; if ( !event_out ) ffc07510: 38 00 00 09 li r0,9 ffc07514: 41 82 00 48 beq- ffc0755c return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; if ( _Event_sets_Is_empty( event_in ) ) { ffc07518: 2f 83 00 00 cmpwi cr7,r3,0 RTEMS_API_Control *api; if ( !event_out ) return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; ffc0751c: 3f e0 00 00 lis r31,0 ffc07520: 81 7f 27 6c lwz r11,10092(r31) ffc07524: 81 6b 01 40 lwz r11,320(r11) if ( _Event_sets_Is_empty( event_in ) ) { ffc07528: 40 9e 00 14 bne- cr7,ffc0753c *event_out = api->pending_events; ffc0752c: 81 6b 00 00 lwz r11,0(r11) ffc07530: 38 00 00 00 li r0,0 ffc07534: 91 69 00 00 stw r11,0(r9) return RTEMS_SUCCESSFUL; ffc07538: 48 00 00 24 b ffc0755c <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0753c: 3d 20 00 00 lis r9,0 ffc07540: 81 69 27 2c lwz r11,10028(r9) ffc07544: 38 0b 00 01 addi r0,r11,1 ffc07548: 90 09 27 2c stw r0,10028(r9) } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); ffc0754c: 48 00 00 29 bl ffc07574 <_Event_Seize> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc07550: 48 00 2d 5d bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN return( _Thread_Executing->Wait.return_code ); ffc07554: 81 3f 27 6c lwz r9,10092(r31) ffc07558: 80 09 00 34 lwz r0,52(r9) } ffc0755c: 7c 03 03 78 mr r3,r0 ffc07560: 80 01 00 14 lwz r0,20(r1) ffc07564: 83 e1 00 0c lwz r31,12(r1) ffc07568: 38 21 00 10 addi r1,r1,16 ffc0756c: 7c 08 03 a6 mtlr r0 ffc07570: 4e 80 00 20 blr <== ALWAYS TAKEN ffc076a0 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { ffc076a0: 94 21 ff e0 stwu r1,-32(r1) ffc076a4: 7c 08 02 a6 mflr r0 ffc076a8: 93 e1 00 1c stw r31,28(r1) ffc076ac: 7c 9f 23 78 mr r31,r4 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); ffc076b0: 38 81 00 08 addi r4,r1,8 rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { ffc076b4: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); ffc076b8: 48 00 2c 15 bl ffc0a2cc <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc076bc: 38 00 00 04 li r0,4 ffc076c0: 81 21 00 08 lwz r9,8(r1) ffc076c4: 2f 89 00 00 cmpwi cr7,r9,0 ffc076c8: 40 9e 00 34 bne- cr7,ffc076fc case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; ffc076cc: 81 23 01 40 lwz r9,320(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc076d0: 7c 00 00 a6 mfmsr r0 ffc076d4: 7d 70 42 a6 mfsprg r11,0 ffc076d8: 7c 0b 58 78 andc r11,r0,r11 ffc076dc: 7d 60 01 24 mtmsr r11 ) { ISR_Level level; _ISR_Disable( level ); *the_event_set |= the_new_events; ffc076e0: 81 69 00 00 lwz r11,0(r9) ffc076e4: 7d 7f fb 78 or r31,r11,r31 ffc076e8: 93 e9 00 00 stw r31,0(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc076ec: 7c 00 01 24 mtmsr r0 _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); ffc076f0: 48 00 00 25 bl ffc07714 <_Event_Surrender> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc076f4: 48 00 2b b9 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc076f8: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc076fc: 7c 03 03 78 mr r3,r0 ffc07700: 80 01 00 24 lwz r0,36(r1) ffc07704: 83 e1 00 1c lwz r31,28(r1) ffc07708: 38 21 00 20 addi r1,r1,32 ffc0770c: 7c 08 03 a6 mtlr r0 ffc07710: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d0a8 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { ffc0d0a8: 94 21 ff e0 stwu r1,-32(r1) ffc0d0ac: 7c 08 02 a6 mflr r0 ffc0d0b0: 93 c1 00 18 stw r30,24(r1) Extension_Control *the_extension; if ( !id ) ffc0d0b4: 7c be 2b 79 mr. r30,r5 rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { ffc0d0b8: 93 81 00 10 stw r28,16(r1) ffc0d0bc: 7c 9c 23 78 mr r28,r4 ffc0d0c0: 93 e1 00 1c stw r31,28(r1) ffc0d0c4: 7c 7f 1b 78 mr r31,r3 Extension_Control *the_extension; if ( !id ) ffc0d0c8: 38 60 00 09 li r3,9 rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { ffc0d0cc: 90 01 00 24 stw r0,36(r1) ffc0d0d0: 93 61 00 0c stw r27,12(r1) ffc0d0d4: 93 a1 00 14 stw r29,20(r1) Extension_Control *the_extension; if ( !id ) ffc0d0d8: 41 82 00 ac beq- ffc0d184 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) ffc0d0dc: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0d0e0: 38 60 00 03 li r3,3 ffc0d0e4: 41 be 00 a0 beq+ cr7,ffc0d184 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0d0e8: 3d 20 00 00 lis r9,0 ffc0d0ec: 81 69 29 30 lwz r11,10544(r9) ffc0d0f0: 38 0b 00 01 addi r0,r11,1 ffc0d0f4: 90 09 29 30 stw r0,10544(r9) #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); ffc0d0f8: 3f 60 00 00 lis r27,0 ffc0d0fc: 3b 7b 36 d8 addi r27,r27,14040 ffc0d100: 7f 63 db 78 mr r3,r27 ffc0d104: 48 00 0f b5 bl ffc0e0b8 <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { ffc0d108: 7c 7d 1b 79 mr. r29,r3 ffc0d10c: 40 a2 00 10 bne+ ffc0d11c _Thread_Enable_dispatch(); ffc0d110: 48 00 20 cd bl ffc0f1dc <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0d114: 38 60 00 05 li r3,5 return RTEMS_TOO_MANY; ffc0d118: 48 00 00 6c b ffc0d184 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0d11c: 81 5c 00 00 lwz r10,0(r28) _User_extensions_Add_set( extension ); ffc0d120: 38 7d 00 10 addi r3,r29,16 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0d124: 81 7c 00 04 lwz r11,4(r28) ffc0d128: 81 3c 00 08 lwz r9,8(r28) ffc0d12c: 80 1c 00 0c lwz r0,12(r28) ffc0d130: 91 5d 00 24 stw r10,36(r29) ffc0d134: 91 7d 00 28 stw r11,40(r29) ffc0d138: 91 3d 00 2c stw r9,44(r29) ffc0d13c: 90 1d 00 30 stw r0,48(r29) ffc0d140: 80 1c 00 1c lwz r0,28(r28) ffc0d144: 81 5c 00 10 lwz r10,16(r28) ffc0d148: 81 7c 00 14 lwz r11,20(r28) ffc0d14c: 81 3c 00 18 lwz r9,24(r28) ffc0d150: 91 5d 00 34 stw r10,52(r29) ffc0d154: 91 7d 00 38 stw r11,56(r29) ffc0d158: 91 3d 00 3c stw r9,60(r29) ffc0d15c: 90 1d 00 40 stw r0,64(r29) _User_extensions_Add_set( extension ); ffc0d160: 48 00 31 41 bl ffc102a0 <_User_extensions_Add_set> <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0d164: 80 1d 00 08 lwz r0,8(r29) ffc0d168: 81 7b 00 1c lwz r11,28(r27) ffc0d16c: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0d170: 93 fd 00 0c stw r31,12(r29) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0d174: 7f ab 49 2e stwx r29,r11,r9 &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; ffc0d178: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc0d17c: 48 00 20 61 bl ffc0f1dc <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0d180: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; } ffc0d184: 80 01 00 24 lwz r0,36(r1) ffc0d188: 83 61 00 0c lwz r27,12(r1) ffc0d18c: 7c 08 03 a6 mtlr r0 ffc0d190: 83 81 00 10 lwz r28,16(r1) ffc0d194: 83 a1 00 14 lwz r29,20(r1) ffc0d198: 83 c1 00 18 lwz r30,24(r1) ffc0d19c: 83 e1 00 1c lwz r31,28(r1) ffc0d1a0: 38 21 00 20 addi r1,r1,32 ffc0d1a4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d1a8 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { ffc0d1a8: 94 21 ff e0 stwu r1,-32(r1) ffc0d1ac: 7c 08 02 a6 mflr r0 ffc0d1b0: 7c 64 1b 78 mr r4,r3 ffc0d1b4: 93 e1 00 1c stw r31,28(r1) RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) ffc0d1b8: 3f e0 00 00 lis r31,0 ffc0d1bc: 3b ff 36 d8 addi r31,r31,14040 ffc0d1c0: 7f e3 fb 78 mr r3,r31 ffc0d1c4: 90 01 00 24 stw r0,36(r1) ffc0d1c8: 38 a1 00 08 addi r5,r1,8 ffc0d1cc: 93 c1 00 18 stw r30,24(r1) ffc0d1d0: 48 00 14 95 bl ffc0e664 <_Objects_Get> <== ALWAYS TAKEN ffc0d1d4: 7c 7e 1b 78 mr r30,r3 Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { ffc0d1d8: 80 01 00 08 lwz r0,8(r1) ffc0d1dc: 38 60 00 04 li r3,4 ffc0d1e0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d1e4: 40 9e 00 2c bne- cr7,ffc0d210 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); ffc0d1e8: 38 7e 00 10 addi r3,r30,16 ffc0d1ec: 48 00 32 19 bl ffc10404 <_User_extensions_Remove_set> <== ALWAYS TAKEN _Objects_Close( &_Extension_Information, &the_extension->Object ); ffc0d1f0: 7f e3 fb 78 mr r3,r31 ffc0d1f4: 7f c4 f3 78 mr r4,r30 ffc0d1f8: 48 00 0f 6d bl ffc0e164 <_Objects_Close> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); ffc0d1fc: 7f e3 fb 78 mr r3,r31 ffc0d200: 7f c4 f3 78 mr r4,r30 ffc0d204: 48 00 12 a1 bl ffc0e4a4 <_Objects_Free> <== ALWAYS TAKEN _Extension_Free( the_extension ); _Thread_Enable_dispatch(); ffc0d208: 48 00 1f d5 bl ffc0f1dc <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0d20c: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0d210: 80 01 00 24 lwz r0,36(r1) ffc0d214: 83 c1 00 18 lwz r30,24(r1) ffc0d218: 7c 08 03 a6 mtlr r0 ffc0d21c: 83 e1 00 1c lwz r31,28(r1) ffc0d220: 38 21 00 20 addi r1,r1,32 ffc0d224: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0ab6c : rtems_status_code rtems_extension_ident( rtems_name name, rtems_id *id ) { ffc0ab6c: 94 21 ff f8 stwu r1,-8(r1) ffc0ab70: 7c 08 02 a6 mflr r0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc0ab74: 3c a0 7f ff lis r5,32767 rtems_status_code rtems_extension_ident( rtems_name name, rtems_id *id ) { ffc0ab78: 90 01 00 0c stw r0,12(r1) ffc0ab7c: 7c 60 1b 78 mr r0,r3 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc0ab80: 3c 60 00 00 lis r3,0 rtems_status_code rtems_extension_ident( rtems_name name, rtems_id *id ) { ffc0ab84: 7c 86 23 78 mr r6,r4 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc0ab88: 38 63 30 38 addi r3,r3,12344 ffc0ab8c: 7c 04 03 78 mr r4,r0 ffc0ab90: 60 a5 ff ff ori r5,r5,65535 ffc0ab94: 48 00 15 ed bl ffc0c180 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc0ab98: 80 01 00 0c lwz r0,12(r1) ffc0ab9c: 3d 20 ff c2 lis r9,-62 ffc0aba0: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc0aba4: 54 63 10 3a rlwinm r3,r3,2,0,29 OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc0aba8: 39 29 2c 2c addi r9,r9,11308 ffc0abac: 7c 69 18 2e lwzx r3,r9,r3 ffc0abb0: 38 21 00 08 addi r1,r1,8 ffc0abb4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc083e8 : */ void rtems_fatal_error_occurred( uint32_t the_error ) { ffc083e8: 94 21 ff f8 stwu r1,-8(r1) ffc083ec: 7c 08 02 a6 mflr r0 ffc083f0: 7c 65 1b 78 mr r5,r3 _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, FALSE, the_error ); ffc083f4: 38 80 00 00 li r4,0 */ void rtems_fatal_error_occurred( uint32_t the_error ) { ffc083f8: 90 01 00 0c stw r0,12(r1) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, FALSE, the_error ); ffc083fc: 38 60 00 01 li r3,1 ffc08400: 48 00 0d d5 bl ffc091d4 <_Internal_error_Occurred> <== ALWAYS TAKEN ffc0a94c : #endif #include const char *rtems_get_version_string(void) { ffc0a94c: 3c 60 ff c2 lis r3,-62 return _RTEMS_version; } ffc0a950: 38 63 26 4c addi r3,r3,9804 ffc0a954: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08288 : /* * Run the API and BSPs predriver hook. */ _API_extensions_Run_predriver(); #endif } ffc08288: 4e 80 00 20 blr <== ALWAYS TAKEN ffc082dc : #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) { ffc082dc: 94 21 ff f0 stwu r1,-16(r1) ffc082e0: 7c 08 02 a6 mflr r0 ffc082e4: 3d 20 00 00 lis r9,0 ffc082e8: 93 e1 00 0c stw r31,12(r1) ffc082ec: 3b e0 00 00 li r31,0 <== ALWAYS TAKEN ffc082f0: 90 01 00 14 stw r0,20(r1) ffc082f4: 93 e9 27 90 stw r31,10128(r9) <== ALWAYS TAKEN #endif /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize(); ffc082f8: 48 01 27 89 bl ffc1aa80 <_CPU_Initialize> <== ALWAYS TAKEN /* * Do this as early as possible to ensure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); ffc082fc: 48 00 55 ed bl ffc0d8e8 <_Debug_Manager_initialization> <== ALWAYS TAKEN _API_extensions_Initialization(); ffc08300: 48 00 02 bd bl ffc085bc <_API_extensions_Initialization> <== ALWAYS TAKEN * This routine initializes the thread dispatching subsystem. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1; ffc08304: 38 00 00 01 li r0,1 <== ALWAYS TAKEN ffc08308: 3d 20 00 00 lis r9,0 ffc0830c: 90 09 27 2c stw r0,10028(r9) /* * Before this is called, we are not allowed to allocate memory * from the Workspace because it is not initialized. */ _Workspace_Handler_initialization(); ffc08310: 48 00 38 21 bl ffc0bb30 <_Workspace_Handler_initialization> <== ALWAYS TAKEN _User_extensions_Handler_initialization(); ffc08314: 48 00 30 11 bl ffc0b324 <_User_extensions_Handler_initialization> <== ALWAYS TAKEN _ISR_Handler_initialization(); ffc08318: 48 00 0f 01 bl ffc09218 <_ISR_Handler_initialization> <== ALWAYS TAKEN /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; ffc0831c: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN ffc08320: 38 09 2c 00 addi r0,r9,11264 _API_Mutex_Initialization( 1 ); ffc08324: 38 60 00 01 li r3,1 _ISR_Handler_initialization(); /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; ffc08328: 3d 20 00 00 lis r9,0 ffc0832c: 90 09 2b 84 stw r0,11140(r9) <== ALWAYS TAKEN _API_Mutex_Initialization( 1 ); ffc08330: 48 00 04 7d bl ffc087ac <_API_Mutex_Initialization> <== ALWAYS TAKEN _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); ffc08334: 3c 60 00 00 lis r3,0 ffc08338: 38 63 27 64 addi r3,r3,10084 <== ALWAYS TAKEN ffc0833c: 48 00 03 91 bl ffc086cc <_API_Mutex_Allocate> <== ALWAYS TAKEN { int index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; ffc08340: 39 60 00 10 li r11,16 <== ALWAYS TAKEN ffc08344: 7d 69 03 a6 mtctr r11 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; ffc08348: 3d 20 00 00 lis r9,0 ffc0834c: 93 e9 27 60 stw r31,10080(r9) ffc08350: 3d 20 00 00 lis r9,0 ffc08354: 39 29 2d 00 addi r9,r9,11520 for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; ffc08358: 38 00 00 00 li r0,0 ffc0835c: 90 09 00 00 stw r0,0(r9) ffc08360: 39 29 00 04 addi r9,r9,4 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) ffc08364: 42 00 ff f8 bdnz+ ffc0835c _Priority_Handler_initialization(); _Watchdog_Handler_initialization(); ffc08368: 48 00 35 51 bl ffc0b8b8 <_Watchdog_Handler_initialization> <== ALWAYS TAKEN _TOD_Handler_initialization(); ffc0836c: 48 00 09 cd bl ffc08d38 <_TOD_Handler_initialization> <== ALWAYS TAKEN _Thread_Handler_initialization(); ffc08370: 48 00 22 45 bl ffc0a5b4 <_Thread_Handler_initialization> <== ALWAYS TAKEN _MPCI_Handler_initialization( RTEMS_TIMEOUT ); #endif /* MANAGERS */ _RTEMS_API_Initialize(); ffc08374: 48 00 01 f1 bl ffc08564 <_RTEMS_API_Initialize> <== ALWAYS TAKEN _Extension_Manager_initialization(); ffc08378: 48 00 00 2d bl ffc083a4 <_Extension_Manager_initialization> <== ALWAYS TAKEN _IO_Manager_initialization(); ffc0837c: 48 00 00 e5 bl ffc08460 <_IO_Manager_initialization> <== ALWAYS TAKEN ffc08380: 38 00 00 01 li r0,1 <== ALWAYS TAKEN ffc08384: 3d 20 00 00 lis r9,0 ffc08388: 90 09 27 90 stw r0,10128(r9) * _Thread_Executing and _Thread_Heir are not set. * * At this point all API extensions are in place. After the call to * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set. */ _Thread_Create_idle(); ffc0838c: 48 00 1b f5 bl ffc09f80 <_Thread_Create_idle> <== ALWAYS TAKEN /* * Scheduling can properly occur now as long as we avoid dispatching. */ } ffc08390: 80 01 00 14 lwz r0,20(r1) ffc08394: 83 e1 00 0c lwz r31,12(r1) ffc08398: 38 21 00 10 addi r1,r1,16 ffc0839c: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc083a0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc082b8 : _API_extensions_Run_predriver(); #endif } void rtems_initialize_device_drivers(void) { ffc082b8: 94 21 ff f8 stwu r1,-8(r1) ffc082bc: 7c 08 02 a6 mflr r0 ffc082c0: 90 01 00 0c stw r0,12(r1) * Initialize all the device drivers and initialize the MPCI layer. * * NOTE: The MPCI may be build upon a device driver. */ _IO_Initialize_all_drivers(); ffc082c4: 48 00 01 41 bl ffc08404 <_IO_Initialize_all_drivers> <== ALWAYS TAKEN /* * Run the APIs and BSPs postdriver hooks. * * The API extensions are supposed to create user initialization tasks. */ _API_extensions_Run_postdriver(); ffc082c8: 48 00 03 15 bl ffc085dc <_API_extensions_Run_postdriver> <== ALWAYS TAKEN } ffc082cc: 80 01 00 0c lwz r0,12(r1) ffc082d0: 38 21 00 08 addi r1,r1,8 ffc082d4: 7c 08 03 a6 mtlr r0 ffc082d8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0828c : */ _API_extensions_Run_postdriver(); } void rtems_initialize_start_multitasking(void) { ffc0828c: 94 21 ff f8 stwu r1,-8(r1) ffc08290: 7c 08 02 a6 mflr r0 RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc08294: 3d 20 00 00 lis r9,0 ffc08298: 90 01 00 0c stw r0,12(r1) ffc0829c: 38 00 00 02 li r0,2 ffc082a0: 90 09 27 90 stw r0,10128(r9) _System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING ); _Thread_Start_multitasking(); ffc082a4: 48 00 2c e5 bl ffc0af88 <_Thread_Start_multitasking> <== ALWAYS TAKEN ****** APPLICATION RUNS HERE ****** ****** RETURNS WHEN SYSTEM IS SHUT DOWN ****** ******************************************************************* ******************************************************************* *******************************************************************/ } ffc082a8: 80 01 00 0c lwz r0,12(r1) ffc082ac: 38 21 00 08 addi r1,r1,8 ffc082b0: 7c 08 03 a6 mtlr r0 ffc082b4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08c28 : static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08c28: 7c 60 00 a6 mfmsr r3 ffc08c2c: 7c 10 42 a6 mfsprg r0,0 ffc08c30: 7c 60 00 78 andc r0,r3,r0 ffc08c34: 7c 00 01 24 mtmsr r0 rtems_interrupt_level previous_level; _ISR_Disable( previous_level ); return previous_level; } ffc08c38: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08c3c : return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08c3c: 7c 60 01 24 mtmsr r3 void rtems_interrupt_enable( rtems_interrupt_level previous_level ) { _ISR_Enable( previous_level ); } ffc08c40: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08c44 : static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc08c44: 7c 00 00 a6 mfmsr r0 ffc08c48: 7c 60 01 24 mtmsr r3 ffc08c4c: 7c 00 01 24 mtmsr r0 void rtems_interrupt_flash( rtems_interrupt_level previous_level ) { _ISR_Flash( previous_level ); } ffc08c50: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08c54 : #undef rtems_interrupt_is_in_progress bool rtems_interrupt_is_in_progress( void ) { return _ISR_Is_in_progress(); ffc08c54: 3d 20 00 00 lis r9,0 ffc08c58: 80 69 27 88 lwz r3,10120(r9) } ffc08c5c: 31 23 ff ff addic r9,r3,-1 ffc08c60: 7c 09 19 10 subfe r0,r9,r3 ffc08c64: 7c 03 03 78 mr r3,r0 ffc08c68: 4e 80 00 20 blr <== ALWAYS TAKEN ffc085d4 : rtems_attribute rtems_interrupt_level_attribute( uint32_t level ) { return RTEMS_INTERRUPT_LEVEL(level); } ffc085d4: 54 63 07 fe clrlwi r3,r3,31 ffc085d8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f940 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc0f940: 7c 08 02 a6 mflr r0 ffc0f944: 94 21 ff f8 stwu r1,-8(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc0f948: 3d 20 00 00 lis r9,0 <== ALWAYS TAKEN rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc0f94c: 90 01 00 0c stw r0,12(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc0f950: 80 09 27 a4 lwz r0,10148(r9) ffc0f954: 7f 83 00 40 cmplw cr7,r3,r0 ffc0f958: 38 00 00 0a li r0,10 ffc0f95c: 40 9c 00 30 bge- cr7,ffc0f98c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; ffc0f960: 3d 60 00 00 lis r11,0 <== ALWAYS TAKEN ffc0f964: 80 0b 27 a8 lwz r0,10152(r11) ffc0f968: 1d 23 00 18 mulli r9,r3,24 ffc0f96c: 7d 20 4a 14 add r9,r0,r9 ffc0f970: 81 29 00 08 lwz r9,8(r9) return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; ffc0f974: 38 00 00 00 li r0,0 ffc0f978: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f97c: 41 9e 00 10 beq- cr7,ffc0f98c ffc0f980: 7d 29 03 a6 mtctr r9 <== ALWAYS TAKEN ffc0f984: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0f988: 7c 60 1b 78 mr r0,r3 } ffc0f98c: 7c 03 03 78 mr r3,r0 ffc0f990: 80 01 00 0c lwz r0,12(r1) ffc0f994: 38 21 00 08 addi r1,r1,8 <== ALWAYS TAKEN ffc0f998: 7c 08 03 a6 mtlr r0 ffc0f99c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f9a0 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc0f9a0: 7c 08 02 a6 mflr r0 ffc0f9a4: 94 21 ff f8 stwu r1,-8(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc0f9a8: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc0f9ac: 90 01 00 0c stw r0,12(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc0f9b0: 80 09 27 a4 lwz r0,10148(r9) ffc0f9b4: 7f 83 00 40 cmplw cr7,r3,r0 ffc0f9b8: 38 00 00 0a li r0,10 ffc0f9bc: 40 9c 00 30 bge- cr7,ffc0f9ec return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; ffc0f9c0: 3d 60 00 00 lis r11,0 ffc0f9c4: 80 0b 27 a8 lwz r0,10152(r11) ffc0f9c8: 1d 23 00 18 mulli r9,r3,24 ffc0f9cc: 7d 20 4a 14 add r9,r0,r9 ffc0f9d0: 81 29 00 14 lwz r9,20(r9) return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; ffc0f9d4: 38 00 00 00 li r0,0 ffc0f9d8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f9dc: 41 9e 00 10 beq- cr7,ffc0f9ec ffc0f9e0: 7d 29 03 a6 mtctr r9 ffc0f9e4: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0f9e8: 7c 60 1b 78 mr r0,r3 } ffc0f9ec: 7c 03 03 78 mr r3,r0 ffc0f9f0: 80 01 00 0c lwz r0,12(r1) ffc0f9f4: 38 21 00 08 addi r1,r1,8 ffc0f9f8: 7c 08 03 a6 mtlr r0 ffc0f9fc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0d93c : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc0d93c: 7c 08 02 a6 mflr r0 ffc0d940: 94 21 ff f8 stwu r1,-8(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc0d944: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc0d948: 90 01 00 0c stw r0,12(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc0d94c: 80 09 27 a4 lwz r0,10148(r9) ffc0d950: 7f 83 00 40 cmplw cr7,r3,r0 <== ALWAYS TAKEN ffc0d954: 38 00 00 0a li r0,10 ffc0d958: 40 9c 00 2c bge- cr7,ffc0d984 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; ffc0d95c: 3d 60 00 00 lis r11,0 ffc0d960: 81 6b 27 a8 lwz r11,10152(r11) ffc0d964: 1d 23 00 18 mulli r9,r3,24 ffc0d968: 7d 2b 48 2e lwzx r9,r11,r9 return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; ffc0d96c: 38 00 00 00 li r0,0 ffc0d970: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d974: 41 9e 00 10 beq- cr7,ffc0d984 ffc0d978: 7d 29 03 a6 mtctr r9 ffc0d97c: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0d980: 7c 60 1b 78 mr r0,r3 } ffc0d984: 7c 03 03 78 mr r3,r0 ffc0d988: 80 01 00 0c lwz r0,12(r1) ffc0d98c: 38 21 00 08 addi r1,r1,8 ffc0d990: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0d994: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0fa00 : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc0fa00: 7c 08 02 a6 mflr r0 ffc0fa04: 94 21 ff f8 stwu r1,-8(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc0fa08: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc0fa0c: 90 01 00 0c stw r0,12(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc0fa10: 80 09 27 a4 lwz r0,10148(r9) ffc0fa14: 7f 83 00 40 cmplw cr7,r3,r0 <== ALWAYS TAKEN ffc0fa18: 38 00 00 0a li r0,10 <== ALWAYS TAKEN ffc0fa1c: 40 9c 00 30 bge- cr7,ffc0fa4c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; ffc0fa20: 3d 60 00 00 lis r11,0 ffc0fa24: 80 0b 27 a8 lwz r0,10152(r11) ffc0fa28: 1d 23 00 18 mulli r9,r3,24 ffc0fa2c: 7d 20 4a 14 add r9,r0,r9 ffc0fa30: 81 29 00 04 lwz r9,4(r9) <== ALWAYS TAKEN return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; ffc0fa34: 38 00 00 00 li r0,0 ffc0fa38: 2f 89 00 00 cmpwi cr7,r9,0 ffc0fa3c: 41 9e 00 10 beq- cr7,ffc0fa4c ffc0fa40: 7d 29 03 a6 mtctr r9 ffc0fa44: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0fa48: 7c 60 1b 78 mr r0,r3 } ffc0fa4c: 7c 03 03 78 mr r3,r0 ffc0fa50: 80 01 00 0c lwz r0,12(r1) ffc0fa54: 38 21 00 08 addi r1,r1,8 ffc0fa58: 7c 08 03 a6 mtlr r0 ffc0fa5c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0fa60 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc0fa60: 7c 08 02 a6 mflr r0 ffc0fa64: 94 21 ff f8 stwu r1,-8(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc0fa68: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc0fa6c: 90 01 00 0c stw r0,12(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc0fa70: 80 09 27 a4 lwz r0,10148(r9) ffc0fa74: 7f 83 00 40 cmplw cr7,r3,r0 ffc0fa78: 38 00 00 0a li r0,10 ffc0fa7c: 40 9c 00 30 bge- cr7,ffc0faac return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; ffc0fa80: 3d 60 00 00 lis r11,0 ffc0fa84: 80 0b 27 a8 lwz r0,10152(r11) ffc0fa88: 1d 23 00 18 mulli r9,r3,24 ffc0fa8c: 7d 20 4a 14 add r9,r0,r9 ffc0fa90: 81 29 00 0c lwz r9,12(r9) return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; ffc0fa94: 38 00 00 00 li r0,0 ffc0fa98: 2f 89 00 00 cmpwi cr7,r9,0 ffc0fa9c: 41 9e 00 10 beq- cr7,ffc0faac ffc0faa0: 7d 29 03 a6 mtctr r9 ffc0faa4: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0faa8: 7c 60 1b 78 mr r0,r3 } ffc0faac: 7c 03 03 78 mr r3,r0 ffc0fab0: 80 01 00 0c lwz r0,12(r1) ffc0fab4: 38 21 00 08 addi r1,r1,8 ffc0fab8: 7c 08 03 a6 mtlr r0 ffc0fabc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a180 : 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 ) { ffc0a180: 94 21 ff f0 stwu r1,-16(r1) ffc0a184: 7c 08 02 a6 mflr r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0a188: 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 ) { ffc0a18c: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0a190: 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; ffc0a194: 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 ) { ffc0a198: 93 e1 00 0c stw r31,12(r1) ffc0a19c: 7c 7f 1b 78 mr r31,r3 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0a1a0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a1a4: 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; ffc0a1a8: 80 09 27 c0 lwz r0,10176(r9) if ( rtems_interrupt_is_in_progress() ) ffc0a1ac: 40 9e 01 40 bne- cr7,ffc0a2ec return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) ffc0a1b0: 2f 85 00 00 cmpwi cr7,r5,0 ffc0a1b4: 41 9e 01 34 beq- cr7,ffc0a2e8 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) ffc0a1b8: 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; ffc0a1bc: 90 05 00 00 stw r0,0(r5) if ( driver_table == NULL ) ffc0a1c0: 41 9e 01 28 beq- cr7,ffc0a2e8 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0a1c4: 81 24 00 00 lwz r9,0(r4) ffc0a1c8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a1cc: 40 be 01 34 bne+ cr7,ffc0a300 ffc0a1d0: 81 24 00 04 lwz r9,4(r4) ffc0a1d4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a1d8: 40 be 01 28 bne+ cr7,ffc0a300 ffc0a1dc: 48 00 01 0c b ffc0a2e8 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0a1e0: 3d 20 00 00 lis r9,0 ffc0a1e4: 81 69 27 4c lwz r11,10060(r9) ffc0a1e8: 38 0b 00 01 addi r0,r11,1 ffc0a1ec: 90 09 27 4c stw r0,10060(r9) if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { ffc0a1f0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0a1f4: 3d 20 00 00 lis r9,0 ffc0a1f8: 40 9e 00 58 bne- cr7,ffc0a250 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; ffc0a1fc: 3d 60 00 00 lis r11,0 ffc0a200: 81 29 27 c4 lwz r9,10180(r9) ffc0a204: 81 6b 27 c0 lwz r11,10176(r11) ffc0a208: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0a20c: 38 0b 00 01 addi r0,r11,1 ffc0a210: 40 be 00 28 bne+ cr7,ffc0a238 <== ALWAYS TAKEN ffc0a214: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0a218: 48 00 00 20 b ffc0a238 <== NOT EXECUTED static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0a21c: 81 49 00 00 lwz r10,0(r9) ffc0a220: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0a224: 40 be 00 ec bne+ cr7,ffc0a310 ffc0a228: 81 49 00 04 lwz r10,4(r9) ffc0a22c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0a230: 40 be 00 e0 bne+ cr7,ffc0a310 ffc0a234: 48 00 00 0c b ffc0a240 <== ALWAYS TAKEN rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { ffc0a238: 34 00 ff ff addic. r0,r0,-1 ffc0a23c: 40 82 ff e0 bne+ ffc0a21c } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) ffc0a240: 7f 9f 58 00 cmpw cr7,r31,r11 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0a244: 93 e5 00 00 stw r31,0(r5) if ( m != n ) ffc0a248: 40 be 00 48 bne+ cr7,ffc0a290 ffc0a24c: 48 00 00 d0 b ffc0a31c <== ALWAYS TAKEN _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0a250: 1c 1f 00 18 mulli r0,r31,24 ffc0a254: 81 29 27 c4 lwz r9,10180(r9) static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0a258: 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; ffc0a25c: 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; ffc0a260: 38 00 00 00 li r0,0 ffc0a264: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0a268: 40 be 00 10 bne+ cr7,ffc0a278 ffc0a26c: 80 09 00 04 lwz r0,4(r9) ffc0a270: 7c 00 00 34 cntlzw r0,r0 ffc0a274: 54 00 d9 7e rlwinm r0,r0,27,5,31 } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { ffc0a278: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a27c: 40 9e 00 10 bne- cr7,ffc0a28c _Thread_Enable_dispatch(); ffc0a280: 48 00 1f 71 bl ffc0c1f0 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0a284: 38 60 00 0c li r3,12 return RTEMS_RESOURCE_IN_USE; ffc0a288: 48 00 00 64 b ffc0a2ec <== ALWAYS TAKEN } *registered_major = major; ffc0a28c: 93 e5 00 00 stw r31,0(r5) } _IO_Driver_address_table [major] = *driver_table; ffc0a290: 3d 20 00 00 lis r9,0 ffc0a294: 80 c4 00 00 lwz r6,0(r4) ffc0a298: 81 69 27 c4 lwz r11,10180(r9) ffc0a29c: 1c 1f 00 18 mulli r0,r31,24 ffc0a2a0: 80 e4 00 04 lwz r7,4(r4) ffc0a2a4: 81 04 00 08 lwz r8,8(r4) ffc0a2a8: 7d 2b 02 14 add r9,r11,r0 ffc0a2ac: 81 44 00 0c lwz r10,12(r4) ffc0a2b0: 7c cb 01 2e stwx r6,r11,r0 ffc0a2b4: 90 e9 00 04 stw r7,4(r9) ffc0a2b8: 91 09 00 08 stw r8,8(r9) ffc0a2bc: 91 49 00 0c stw r10,12(r9) ffc0a2c0: 81 64 00 14 lwz r11,20(r4) ffc0a2c4: 80 04 00 10 lwz r0,16(r4) ffc0a2c8: 91 69 00 14 stw r11,20(r9) ffc0a2cc: 90 09 00 10 stw r0,16(r9) _Thread_Enable_dispatch(); ffc0a2d0: 48 00 1f 21 bl ffc0c1f0 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return rtems_io_initialize( major, 0, NULL ); ffc0a2d4: 7f e3 fb 78 mr r3,r31 ffc0a2d8: 38 80 00 00 li r4,0 ffc0a2dc: 38 a0 00 00 li r5,0 ffc0a2e0: 48 00 97 41 bl ffc13a20 <== ALWAYS TAKEN ffc0a2e4: 48 00 00 08 b ffc0a2ec <== ALWAYS TAKEN ffc0a2e8: 38 60 00 09 li r3,9 } ffc0a2ec: 80 01 00 14 lwz r0,20(r1) ffc0a2f0: 83 e1 00 0c lwz r31,12(r1) ffc0a2f4: 38 21 00 10 addi r1,r1,16 ffc0a2f8: 7c 08 03 a6 mtlr r0 ffc0a2fc: 4e 80 00 20 blr <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc0a300: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0a304: 38 60 00 0a li r3,10 ffc0a308: 41 9c fe d8 blt+ cr7,ffc0a1e0 ffc0a30c: 4b ff ff e0 b ffc0a2ec <== ALWAYS TAKEN rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { ffc0a310: 3b ff 00 01 addi r31,r31,1 ffc0a314: 39 29 00 18 addi r9,r9,24 ffc0a318: 4b ff ff 20 b ffc0a238 <== ALWAYS TAKEN if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); ffc0a31c: 48 00 1e d5 bl ffc0c1f0 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0a320: 38 60 00 05 li r3,5 return sc; ffc0a324: 4b ff ff c8 b ffc0a2ec <== ALWAYS TAKEN ffc0a328 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { ffc0a328: 7c 08 02 a6 mflr r0 ffc0a32c: 94 21 ff f8 stwu r1,-8(r1) if ( rtems_interrupt_is_in_progress() ) ffc0a330: 3d 20 00 00 lis r9,0 */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { ffc0a334: 90 01 00 0c stw r0,12(r1) if ( rtems_interrupt_is_in_progress() ) ffc0a338: 80 09 27 74 lwz r0,10100(r9) ffc0a33c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a340: 38 00 00 12 li r0,18 ffc0a344: 40 9e 00 4c bne- cr7,ffc0a390 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { ffc0a348: 3d 20 00 00 lis r9,0 ffc0a34c: 81 29 27 c0 lwz r9,10176(r9) ffc0a350: 38 00 00 0d li r0,13 ffc0a354: 7f 83 48 40 cmplw cr7,r3,r9 ffc0a358: 40 bc 00 38 bge+ cr7,ffc0a390 ffc0a35c: 3d 20 00 00 lis r9,0 ffc0a360: 81 69 27 4c lwz r11,10060(r9) ffc0a364: 38 0b 00 01 addi r0,r11,1 ffc0a368: 90 09 27 4c stw r0,10060(r9) _Thread_Disable_dispatch(); memset( ffc0a36c: 3d 20 00 00 lis r9,0 ffc0a370: 80 09 27 c4 lwz r0,10180(r9) ffc0a374: 1c 63 00 18 mulli r3,r3,24 ffc0a378: 38 80 00 00 li r4,0 ffc0a37c: 7c 60 1a 14 add r3,r0,r3 ffc0a380: 38 a0 00 18 li r5,24 ffc0a384: 48 00 d1 25 bl ffc174a8 <== ALWAYS TAKEN &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); ffc0a388: 48 00 1e 69 bl ffc0c1f0 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0a38c: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } ffc0a390: 7c 03 03 78 mr r3,r0 ffc0a394: 80 01 00 0c lwz r0,12(r1) ffc0a398: 38 21 00 08 addi r1,r1,8 ffc0a39c: 7c 08 03 a6 mtlr r0 ffc0a3a0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0fac0 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc0fac0: 7c 08 02 a6 mflr r0 ffc0fac4: 94 21 ff f8 stwu r1,-8(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc0fac8: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { ffc0facc: 90 01 00 0c stw r0,12(r1) rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) ffc0fad0: 80 09 27 a4 lwz r0,10148(r9) ffc0fad4: 7f 83 00 40 cmplw cr7,r3,r0 <== ALWAYS TAKEN ffc0fad8: 38 00 00 0a li r0,10 ffc0fadc: 40 9c 00 30 bge- cr7,ffc0fb0c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; ffc0fae0: 3d 60 00 00 lis r11,0 ffc0fae4: 80 0b 27 a8 lwz r0,10152(r11) ffc0fae8: 1d 23 00 18 mulli r9,r3,24 ffc0faec: 7d 20 4a 14 add r9,r0,r9 ffc0faf0: 81 29 00 10 lwz r9,16(r9) return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; ffc0faf4: 38 00 00 00 li r0,0 ffc0faf8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0fafc: 41 9e 00 10 beq- cr7,ffc0fb0c ffc0fb00: 7d 29 03 a6 mtctr r9 <== ALWAYS TAKEN ffc0fb04: 4e 80 04 21 bctrl <== ALWAYS TAKEN ffc0fb08: 7c 60 1b 78 mr r0,r3 <== ALWAYS TAKEN } ffc0fb0c: 7c 03 03 78 mr r3,r0 ffc0fb10: 80 01 00 0c lwz r0,12(r1) ffc0fb14: 38 21 00 08 addi r1,r1,8 ffc0fb18: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc0fb1c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0b230 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0b230: 94 21 ff e0 stwu r1,-32(r1) ffc0b234: 7c 08 02 a6 mflr r0 ffc0b238: 93 61 00 0c stw r27,12(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0b23c: 7c 7b 1b 79 mr. r27,r3 #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0b240: 90 01 00 24 stw r0,36(r1) ffc0b244: 93 81 00 10 stw r28,16(r1) ffc0b248: 93 a1 00 14 stw r29,20(r1) ffc0b24c: 93 c1 00 18 stw r30,24(r1) ffc0b250: 93 e1 00 1c stw r31,28(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0b254: 41 82 00 68 beq- ffc0b2bc <== NEVER TAKEN ffc0b258: 3f e0 00 01 lis r31,1 ffc0b25c: 3b ff a9 84 addi r31,r31,-22140 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) ffc0b260: 3b 9f 00 10 addi r28,r31,16 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) ffc0b264: 81 3f 00 00 lwz r9,0(r31) ffc0b268: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b26c: 41 9e 00 44 beq- cr7,ffc0b2b0 continue; information = _Objects_Information_table[ api_index ][ 1 ]; ffc0b270: 83 a9 00 04 lwz r29,4(r9) if ( !information ) ffc0b274: 3b c0 00 01 li r30,1 ffc0b278: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0b27c: 40 be 00 20 bne+ cr7,ffc0b29c ffc0b280: 48 00 00 30 b ffc0b2b0 <== ALWAYS TAKEN continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; ffc0b284: 81 7d 00 1c lwz r11,28(r29) ffc0b288: 7c 6b 48 2e lwzx r3,r11,r9 if ( !the_thread ) ffc0b28c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b290: 41 9e 00 0c beq- cr7,ffc0b29c <== NEVER TAKEN continue; (*routine)(the_thread); ffc0b294: 7f 69 03 a6 mtctr r27 ffc0b298: 4e 80 04 21 bctrl <== ALWAYS TAKEN information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0b29c: a0 1d 00 10 lhz r0,16(r29) the_thread = (Thread_Control *)information->local_table[ i ]; ffc0b2a0: 57 c9 10 3a rlwinm r9,r30,2,0,29 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0b2a4: 7f 9e 00 40 cmplw cr7,r30,r0 ffc0b2a8: 3b de 00 01 addi r30,r30,1 ffc0b2ac: 40 9d ff d8 ble+ cr7,ffc0b284 ffc0b2b0: 3b ff 00 04 addi r31,r31,4 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { ffc0b2b4: 7f 9f e0 00 cmpw cr7,r31,r28 ffc0b2b8: 40 9e ff ac bne+ cr7,ffc0b264 (*routine)(the_thread); } } } ffc0b2bc: 80 01 00 24 lwz r0,36(r1) ffc0b2c0: 83 61 00 0c lwz r27,12(r1) ffc0b2c4: 7c 08 03 a6 mtlr r0 ffc0b2c8: 83 81 00 10 lwz r28,16(r1) ffc0b2cc: 83 a1 00 14 lwz r29,20(r1) ffc0b2d0: 83 c1 00 18 lwz r30,24(r1) ffc0b2d4: 83 e1 00 1c lwz r31,28(r1) ffc0b2d8: 38 21 00 20 addi r1,r1,32 ffc0b2dc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc15fa8 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { ffc15fa8: 94 21 ff d0 stwu r1,-48(r1) ffc15fac: 7c 08 02 a6 mflr r0 ffc15fb0: 93 81 00 20 stw r28,32(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) ffc15fb4: 7c 9c 23 79 mr. r28,r4 rtems_id id, const void *buffer, size_t size, uint32_t *count ) { ffc15fb8: 93 a1 00 24 stw r29,36(r1) ffc15fbc: 7c bd 2b 78 mr r29,r5 ffc15fc0: 93 c1 00 28 stw r30,40(r1) ffc15fc4: 7c 7e 1b 78 mr r30,r3 ffc15fc8: 93 e1 00 2c stw r31,44(r1) ffc15fcc: 7c df 33 78 mr r31,r6 ffc15fd0: 90 01 00 34 stw r0,52(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) ffc15fd4: 41 82 00 64 beq- ffc16038 return RTEMS_INVALID_ADDRESS; if ( !count ) ffc15fd8: 2f 86 00 00 cmpwi cr7,r6,0 ffc15fdc: 41 9e 00 5c beq- cr7,ffc16038 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) ffc15fe0: 3c 60 00 00 lis r3,0 ffc15fe4: 38 63 72 04 addi r3,r3,29188 ffc15fe8: 7f c4 f3 78 mr r4,r30 ffc15fec: 38 a1 00 08 addi r5,r1,8 ffc15ff0: 48 00 60 5d bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { ffc15ff4: 80 01 00 08 lwz r0,8(r1) ffc15ff8: 7c 69 1b 78 mr r9,r3 ffc15ffc: 2f 80 00 00 cmpwi cr7,r0,0 <== ALWAYS TAKEN ffc16000: 38 60 00 04 li r3,4 ffc16004: 40 9e 00 38 bne- cr7,ffc1603c case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( ffc16008: 7f 84 e3 78 mr r4,r28 ffc1600c: 7f a5 eb 78 mr r5,r29 ffc16010: 7f c6 f3 78 mr r6,r30 ffc16014: 7f e8 fb 78 mr r8,r31 ffc16018: 38 69 00 14 addi r3,r9,20 ffc1601c: 38 e0 00 00 li r7,0 ffc16020: 48 00 42 c9 bl ffc1a2e8 <_CORE_message_queue_Broadcast> <== ALWAYS TAKEN NULL, #endif count ); _Thread_Enable_dispatch(); ffc16024: 90 61 00 18 stw r3,24(r1) ffc16028: 48 00 6b 9d bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return _Message_queue_Translate_core_message_queue_return_code( core_status ); ffc1602c: 80 61 00 18 lwz r3,24(r1) ffc16030: 48 00 04 59 bl ffc16488 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN #endif count ); _Thread_Enable_dispatch(); return ffc16034: 48 00 00 08 b ffc1603c <== ALWAYS TAKEN ffc16038: 38 60 00 09 li r3,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1603c: 80 01 00 34 lwz r0,52(r1) ffc16040: 83 81 00 20 lwz r28,32(r1) ffc16044: 7c 08 03 a6 mtlr r0 ffc16048: 83 a1 00 24 lwz r29,36(r1) ffc1604c: 83 c1 00 28 lwz r30,40(r1) ffc16050: 83 e1 00 2c lwz r31,44(r1) ffc16054: 38 21 00 30 addi r1,r1,48 ffc16058: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1156c : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { ffc1156c: 94 21 ff d0 stwu r1,-48(r1) ffc11570: 7c 08 02 a6 mflr r0 ffc11574: 93 e1 00 2c stw r31,44(r1) <== ALWAYS TAKEN CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) ffc11578: 7c 7f 1b 79 mr. r31,r3 ffc1157c: 38 60 00 03 li r3,3 uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { ffc11580: 93 41 00 18 stw r26,24(r1) ffc11584: 7c da 33 78 mr r26,r6 ffc11588: 93 61 00 1c stw r27,28(r1) ffc1158c: 7c 9b 23 78 mr r27,r4 ffc11590: 93 81 00 20 stw r28,32(r1) ffc11594: 7c bc 2b 78 mr r28,r5 ffc11598: 93 a1 00 24 stw r29,36(r1) ffc1159c: 7c fd 3b 78 mr r29,r7 ffc115a0: 90 01 00 34 stw r0,52(r1) ffc115a4: 93 c1 00 28 stw r30,40(r1) CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) ffc115a8: 41 82 00 bc beq- ffc11664 return RTEMS_INVALID_NAME; if ( !id ) ffc115ac: 2f 87 00 00 cmpwi cr7,r7,0 ffc115b0: 38 60 00 09 li r3,9 ffc115b4: 41 9e 00 b0 beq- cr7,ffc11664 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) ffc115b8: 2f 84 00 00 cmpwi cr7,r4,0 ffc115bc: 38 60 00 0a li r3,10 ffc115c0: 41 9e 00 a4 beq- cr7,ffc11664 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) ffc115c4: 2f 85 00 00 cmpwi cr7,r5,0 ffc115c8: 38 60 00 08 li r3,8 ffc115cc: 41 be 00 98 beq+ cr7,ffc11664 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc115d0: 3d 20 00 00 lis r9,0 ffc115d4: 81 69 27 cc lwz r11,10188(r9) ffc115d8: 38 0b 00 01 addi r0,r11,1 ffc115dc: 90 09 27 cc stw r0,10188(r9) #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); ffc115e0: 48 00 66 11 bl ffc17bf0 <_Message_queue_Allocate> <== ALWAYS TAKEN if ( !the_message_queue ) { ffc115e4: 7c 7e 1b 79 mr. r30,r3 ffc115e8: 40 a2 00 10 bne+ ffc115f8 _Thread_Enable_dispatch(); ffc115ec: 48 00 34 91 bl ffc14a7c <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc115f0: 38 60 00 05 li r3,5 return RTEMS_TOO_MANY; ffc115f4: 48 00 00 70 b ffc11664 <== ALWAYS TAKEN } #endif the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) ffc115f8: 73 40 00 04 andi. r0,r26,4 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; ffc115fc: 93 5e 00 10 stw r26,16(r30) if (_Attributes_Is_priority( attribute_set ) ) ffc11600: 41 82 00 08 beq- ffc11608 the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; ffc11604: 38 00 00 01 li r0,1 else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( ffc11608: 7f 65 db 78 mr r5,r27 the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; ffc1160c: 90 01 00 08 stw r0,8(r1) if ( ! _CORE_message_queue_Initialize( ffc11610: 7f 86 e3 78 mr r6,r28 ffc11614: 38 7e 00 14 addi r3,r30,20 ffc11618: 38 81 00 08 addi r4,r1,8 ffc1161c: 48 00 16 a5 bl ffc12cc0 <_CORE_message_queue_Initialize> <== ALWAYS TAKEN ffc11620: 2f 83 00 00 cmpwi cr7,r3,0 ffc11624: 3c 60 00 00 lis r3,0 ffc11628: 38 63 2f 64 addi r3,r3,12132 ffc1162c: 40 9e 00 18 bne- cr7,ffc11644 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); ffc11630: 7f c4 f3 78 mr r4,r30 ffc11634: 48 00 26 e9 bl ffc13d1c <_Objects_Free> <== ALWAYS TAKEN _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); ffc11638: 48 00 34 45 bl ffc14a7c <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1163c: 38 60 00 0d li r3,13 return RTEMS_UNSATISFIED; ffc11640: 48 00 00 24 b ffc11664 <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc11644: 80 1e 00 08 lwz r0,8(r30) ffc11648: 81 63 00 1c lwz r11,28(r3) ffc1164c: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc11650: 93 fe 00 0c stw r31,12(r30) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc11654: 7f cb 49 2e stwx r30,r11,r9 &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; ffc11658: 90 1d 00 00 stw r0,0(r29) name, 0 ); #endif _Thread_Enable_dispatch(); ffc1165c: 48 00 34 21 bl ffc14a7c <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc11660: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; } ffc11664: 80 01 00 34 lwz r0,52(r1) ffc11668: 83 41 00 18 lwz r26,24(r1) ffc1166c: 7c 08 03 a6 mtlr r0 ffc11670: 83 61 00 1c lwz r27,28(r1) ffc11674: 83 81 00 20 lwz r28,32(r1) ffc11678: 83 a1 00 24 lwz r29,36(r1) ffc1167c: 83 c1 00 28 lwz r30,40(r1) ffc11680: 83 e1 00 2c lwz r31,44(r1) ffc11684: 38 21 00 30 addi r1,r1,48 ffc11688: 4e 80 00 20 blr <== ALWAYS TAKEN ffc156dc : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { ffc156dc: 94 21 ff e0 stwu r1,-32(r1) ffc156e0: 7c 08 02 a6 mflr r0 ffc156e4: 7c 64 1b 78 mr r4,r3 ffc156e8: 93 c1 00 18 stw r30,24(r1) RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) ffc156ec: 3f c0 00 00 lis r30,0 ffc156f0: 3b de 37 44 addi r30,r30,14148 ffc156f4: 7f c3 f3 78 mr r3,r30 ffc156f8: 90 01 00 24 stw r0,36(r1) ffc156fc: 38 a1 00 08 addi r5,r1,8 ffc15700: 93 e1 00 1c stw r31,28(r1) ffc15704: 4b ff 8f 61 bl ffc0e664 <_Objects_Get> <== ALWAYS TAKEN ffc15708: 7c 7f 1b 78 mr r31,r3 register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { ffc1570c: 80 01 00 08 lwz r0,8(r1) ffc15710: 38 60 00 04 li r3,4 ffc15714: 2f 80 00 00 cmpwi cr7,r0,0 ffc15718: 40 9e 00 34 bne- cr7,ffc1574c case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, ffc1571c: 7f c3 f3 78 mr r3,r30 ffc15720: 7f e4 fb 78 mr r4,r31 ffc15724: 4b ff 8a 41 bl ffc0e164 <_Objects_Close> <== ALWAYS TAKEN &the_message_queue->Object ); _CORE_message_queue_Close( ffc15728: 38 a0 00 05 li r5,5 ffc1572c: 38 7f 00 14 addi r3,r31,20 ffc15730: 38 80 00 00 li r4,0 ffc15734: 48 00 07 c5 bl ffc15ef8 <_CORE_message_queue_Close> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); ffc15738: 7f c3 f3 78 mr r3,r30 ffc1573c: 7f e4 fb 78 mr r4,r31 ffc15740: 4b ff 8d 65 bl ffc0e4a4 <_Objects_Free> <== ALWAYS TAKEN 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); ffc15744: 4b ff 9a 99 bl ffc0f1dc <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc15748: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1574c: 80 01 00 24 lwz r0,36(r1) ffc15750: 83 c1 00 18 lwz r30,24(r1) ffc15754: 7c 08 03 a6 mtlr r0 ffc15758: 83 e1 00 1c lwz r31,28(r1) ffc1575c: 38 21 00 20 addi r1,r1,32 ffc15760: 4e 80 00 20 blr <== ALWAYS TAKEN ffc16204 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { ffc16204: 94 21 ff e0 stwu r1,-32(r1) ffc16208: 7c 08 02 a6 mflr r0 ffc1620c: 93 e1 00 1c stw r31,28(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) ffc16210: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { ffc16214: 7c 64 1b 78 mr r4,r3 ffc16218: 90 01 00 24 stw r0,36(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) ffc1621c: 38 00 00 09 li r0,9 ffc16220: 41 82 00 38 beq- ffc16258 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) ffc16224: 3c 60 00 00 lis r3,0 ffc16228: 38 63 72 04 addi r3,r3,29188 ffc1622c: 38 a1 00 08 addi r5,r1,8 ffc16230: 48 00 5e 1d bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { ffc16234: 81 21 00 08 lwz r9,8(r1) ffc16238: 38 00 00 04 li r0,4 ffc1623c: 2f 89 00 00 cmpwi cr7,r9,0 ffc16240: 40 9e 00 18 bne- cr7,ffc16258 case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); ffc16244: 38 63 00 14 addi r3,r3,20 ffc16248: 48 00 41 a5 bl ffc1a3ec <_CORE_message_queue_Flush> <== ALWAYS TAKEN ffc1624c: 90 7f 00 00 stw r3,0(r31) _Thread_Enable_dispatch(); ffc16250: 48 00 69 75 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc16254: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc16258: 7c 03 03 78 mr r3,r0 ffc1625c: 80 01 00 24 lwz r0,36(r1) ffc16260: 83 e1 00 1c lwz r31,28(r1) ffc16264: 38 21 00 20 addi r1,r1,32 ffc16268: 7c 08 03 a6 mtlr r0 ffc1626c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc16270 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { ffc16270: 94 21 ff e0 stwu r1,-32(r1) ffc16274: 7c 08 02 a6 mflr r0 ffc16278: 93 e1 00 1c stw r31,28(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) ffc1627c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { ffc16280: 7c 64 1b 78 mr r4,r3 ffc16284: 90 01 00 24 stw r0,36(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) ffc16288: 38 00 00 09 li r0,9 ffc1628c: 41 82 00 34 beq- ffc162c0 ffc16290: 3c 60 00 00 lis r3,0 ffc16294: 38 63 72 04 addi r3,r3,29188 ffc16298: 38 a1 00 08 addi r5,r1,8 ffc1629c: 48 00 5d b1 bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { ffc162a0: 81 21 00 08 lwz r9,8(r1) ffc162a4: 38 00 00 04 li r0,4 ffc162a8: 2f 89 00 00 cmpwi cr7,r9,0 ffc162ac: 40 9e 00 14 bne- cr7,ffc162c0 case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; ffc162b0: 80 03 00 5c lwz r0,92(r3) ffc162b4: 90 1f 00 00 stw r0,0(r31) _Thread_Enable_dispatch(); ffc162b8: 48 00 69 0d bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc162bc: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc162c0: 7c 03 03 78 mr r3,r0 ffc162c4: 80 01 00 24 lwz r0,36(r1) ffc162c8: 83 e1 00 1c lwz r31,28(r1) ffc162cc: 38 21 00 20 addi r1,r1,32 ffc162d0: 7c 08 03 a6 mtlr r0 ffc162d4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1168c : rtems_status_code rtems_message_queue_ident( rtems_name name, uint32_t node, rtems_id *id ) { ffc1168c: 94 21 ff f8 stwu r1,-8(r1) ffc11690: 7c 08 02 a6 mflr r0 ffc11694: 7c 69 1b 78 mr r9,r3 ffc11698: 90 01 00 0c stw r0,12(r1) Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc1169c: 3c 60 00 00 lis r3,0 rtems_status_code rtems_message_queue_ident( rtems_name name, uint32_t node, rtems_id *id ) { ffc116a0: 7c 80 23 78 mr r0,r4 ffc116a4: 7c a6 2b 78 mr r6,r5 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc116a8: 7d 24 4b 78 mr r4,r9 ffc116ac: 7c 05 03 78 mr r5,r0 ffc116b0: 38 63 2f 64 addi r3,r3,12132 ffc116b4: 48 00 29 b5 bl ffc14068 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN node, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc116b8: 80 01 00 0c lwz r0,12(r1) ffc116bc: 3d 20 ff c3 lis r9,-61 ffc116c0: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc116c4: 54 63 10 3a rlwinm r3,r3,2,0,29 node, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc116c8: 39 29 a2 78 addi r9,r9,-23944 ffc116cc: 7c 69 18 2e lwzx r3,r9,r3 ffc116d0: 38 21 00 08 addi r1,r1,8 ffc116d4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc116d8 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { ffc116d8: 94 21 ff d8 stwu r1,-40(r1) ffc116dc: 7c 08 02 a6 mflr r0 ffc116e0: 93 a1 00 1c stw r29,28(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) ffc116e4: 7c 9d 23 79 mr. r29,r4 void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { ffc116e8: 7c 64 1b 78 mr r4,r3 ffc116ec: 93 81 00 18 stw r28,24(r1) ffc116f0: 7c dc 33 78 mr r28,r6 ffc116f4: 93 c1 00 20 stw r30,32(r1) ffc116f8: 7c fe 3b 78 mr r30,r7 ffc116fc: 93 e1 00 24 stw r31,36(r1) ffc11700: 7c bf 2b 78 mr r31,r5 ffc11704: 90 01 00 2c stw r0,44(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) ffc11708: 41 82 00 68 beq- ffc11770 return RTEMS_INVALID_ADDRESS; if ( !size ) ffc1170c: 2f 85 00 00 cmpwi cr7,r5,0 ffc11710: 41 9e 00 60 beq- cr7,ffc11770 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) ffc11714: 3c 60 00 00 lis r3,0 ffc11718: 38 63 2f 64 addi r3,r3,12132 ffc1171c: 38 a1 00 08 addi r5,r1,8 ffc11720: 48 00 27 bd bl ffc13edc <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { ffc11724: 80 01 00 08 lwz r0,8(r1) ffc11728: 7c 69 1b 78 mr r9,r3 ffc1172c: 2f 80 00 00 cmpwi cr7,r0,0 ffc11730: 38 60 00 04 li r3,4 ffc11734: 40 9e 00 40 bne- cr7,ffc11774 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( ffc11738: 80 89 00 08 lwz r4,8(r9) ffc1173c: 6b 87 00 01 xori r7,r28,1 ffc11740: 38 69 00 14 addi r3,r9,20 ffc11744: 7f a5 eb 78 mr r5,r29 ffc11748: 7f e6 fb 78 mr r6,r31 ffc1174c: 54 e7 07 fe clrlwi r7,r7,31 ffc11750: 7f c8 f3 78 mr r8,r30 ffc11754: 48 00 16 51 bl ffc12da4 <_CORE_message_queue_Seize> <== ALWAYS TAKEN buffer, size, wait, timeout ); _Thread_Enable_dispatch(); ffc11758: 48 00 33 25 bl ffc14a7c <_Thread_Enable_dispatch> <== ALWAYS TAKEN return _Message_queue_Translate_core_message_queue_return_code( ffc1175c: 3d 20 00 00 lis r9,0 ffc11760: 81 29 28 0c lwz r9,10252(r9) ffc11764: 80 69 00 34 lwz r3,52(r9) ffc11768: 48 00 00 d5 bl ffc1183c <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN ffc1176c: 48 00 00 08 b ffc11774 <== ALWAYS TAKEN ffc11770: 38 60 00 09 li r3,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc11774: 80 01 00 2c lwz r0,44(r1) ffc11778: 83 81 00 18 lwz r28,24(r1) ffc1177c: 7c 08 03 a6 mtlr r0 ffc11780: 83 a1 00 1c lwz r29,28(r1) ffc11784: 83 c1 00 20 lwz r30,32(r1) ffc11788: 83 e1 00 24 lwz r31,36(r1) ffc1178c: 38 21 00 28 addi r1,r1,40 ffc11790: 4e 80 00 20 blr <== ALWAYS TAKEN ffc11794 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { ffc11794: 94 21 ff d0 stwu r1,-48(r1) ffc11798: 7c 08 02 a6 mflr r0 ffc1179c: 93 a1 00 24 stw r29,36(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) ffc117a0: 7c 9d 23 79 mr. r29,r4 rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { ffc117a4: 93 c1 00 28 stw r30,40(r1) ffc117a8: 7c be 2b 78 mr r30,r5 ffc117ac: 93 e1 00 2c stw r31,44(r1) ffc117b0: 7c 7f 1b 78 mr r31,r3 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) ffc117b4: 38 60 00 09 li r3,9 rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { ffc117b8: 90 01 00 34 stw r0,52(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) ffc117bc: 41 82 00 64 beq- ffc11820 ffc117c0: 3c 60 00 00 lis r3,0 ffc117c4: 38 63 2f 64 addi r3,r3,12132 ffc117c8: 7f e4 fb 78 mr r4,r31 ffc117cc: 38 a1 00 08 addi r5,r1,8 ffc117d0: 48 00 27 0d bl ffc13edc <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { ffc117d4: 80 01 00 08 lwz r0,8(r1) ffc117d8: 7c 69 1b 78 mr r9,r3 ffc117dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc117e0: 38 60 00 04 li r3,4 ffc117e4: 40 9e 00 3c bne- cr7,ffc11820 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( ffc117e8: 3d 00 7f ff lis r8,32767 ffc117ec: 7f a4 eb 78 mr r4,r29 ffc117f0: 7f c5 f3 78 mr r5,r30 ffc117f4: 7f e6 fb 78 mr r6,r31 ffc117f8: 61 08 ff ff ori r8,r8,65535 ffc117fc: 38 69 00 14 addi r3,r9,20 ffc11800: 38 e0 00 00 li r7,0 ffc11804: 39 20 00 00 li r9,0 ffc11808: 39 40 00 00 li r10,0 ffc1180c: 48 00 16 a1 bl ffc12eac <_CORE_message_queue_Submit> <== ALWAYS TAKEN MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); ffc11810: 90 61 00 18 stw r3,24(r1) ffc11814: 48 00 32 69 bl ffc14a7c <_Thread_Enable_dispatch> <== ALWAYS TAKEN /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); ffc11818: 80 61 00 18 lwz r3,24(r1) ffc1181c: 48 00 00 21 bl ffc1183c <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc11820: 80 01 00 34 lwz r0,52(r1) ffc11824: 83 a1 00 24 lwz r29,36(r1) ffc11828: 7c 08 03 a6 mtlr r0 ffc1182c: 83 c1 00 28 lwz r30,40(r1) ffc11830: 83 e1 00 2c lwz r31,44(r1) ffc11834: 38 21 00 30 addi r1,r1,48 ffc11838: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1649c : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { ffc1649c: 94 21 ff d0 stwu r1,-48(r1) ffc164a0: 7c 08 02 a6 mflr r0 ffc164a4: 93 a1 00 24 stw r29,36(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) ffc164a8: 7c 9d 23 79 mr. r29,r4 rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { ffc164ac: 93 c1 00 28 stw r30,40(r1) ffc164b0: 7c be 2b 78 mr r30,r5 ffc164b4: 93 e1 00 2c stw r31,44(r1) ffc164b8: 7c 7f 1b 78 mr r31,r3 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) ffc164bc: 38 60 00 09 li r3,9 rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { ffc164c0: 90 01 00 34 stw r0,52(r1) register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) ffc164c4: 41 82 00 60 beq- ffc16524 ffc164c8: 3c 60 00 00 lis r3,0 ffc164cc: 38 63 72 04 addi r3,r3,29188 ffc164d0: 7f e4 fb 78 mr r4,r31 ffc164d4: 38 a1 00 08 addi r5,r1,8 ffc164d8: 48 00 5b 75 bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { ffc164dc: 80 01 00 08 lwz r0,8(r1) ffc164e0: 7c 69 1b 78 mr r9,r3 ffc164e4: 2f 80 00 00 cmpwi cr7,r0,0 ffc164e8: 38 60 00 04 li r3,4 ffc164ec: 40 9e 00 38 bne- cr7,ffc16524 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( ffc164f0: 7f a4 eb 78 mr r4,r29 ffc164f4: 7f c5 f3 78 mr r5,r30 ffc164f8: 7f e6 fb 78 mr r6,r31 ffc164fc: 38 69 00 14 addi r3,r9,20 ffc16500: 38 e0 00 00 li r7,0 ffc16504: 3d 00 80 00 lis r8,-32768 ffc16508: 39 20 00 00 li r9,0 ffc1650c: 39 40 00 00 li r10,0 ffc16510: 48 00 41 5d bl ffc1a66c <_CORE_message_queue_Submit> <== ALWAYS TAKEN id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); ffc16514: 90 61 00 18 stw r3,24(r1) ffc16518: 48 00 66 ad bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); ffc1651c: 80 61 00 18 lwz r3,24(r1) ffc16520: 4b ff ff 69 bl ffc16488 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc16524: 80 01 00 34 lwz r0,52(r1) ffc16528: 83 a1 00 24 lwz r29,36(r1) ffc1652c: 7c 08 03 a6 mtlr r0 ffc16530: 83 c1 00 28 lwz r30,40(r1) ffc16534: 83 e1 00 2c lwz r31,44(r1) ffc16538: 38 21 00 30 addi r1,r1,48 ffc1653c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09a6c : #include int rtems_object_api_maximum_class( int api ) { ffc09a6c: 94 21 ff f8 stwu r1,-8(r1) ffc09a70: 7c 08 02 a6 mflr r0 ffc09a74: 90 01 00 0c stw r0,12(r1) return _Objects_API_maximum_class(api); ffc09a78: 48 00 1d bd bl ffc0b834 <_Objects_API_maximum_class> <== ALWAYS TAKEN } ffc09a7c: 80 01 00 0c lwz r0,12(r1) ffc09a80: 38 21 00 08 addi r1,r1,8 ffc09a84: 7c 08 03 a6 mtlr r0 ffc09a88: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09a8c : */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) ffc09a8c: 38 63 ff ff addi r3,r3,-1 ffc09a90: 20 63 00 03 subfic r3,r3,3 ffc09a94: 7c 63 19 10 subfe r3,r3,r3 ) { if ( _Objects_Is_api_valid( api ) ) return 1; return -1; } ffc09a98: 60 63 00 01 ori r3,r3,1 ffc09a9c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09aa0 : ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) ffc09aa0: 2f 83 00 01 cmpwi cr7,r3,1 const char *rtems_object_get_api_class_name( int the_api, int the_class ) { ffc09aa4: 94 21 ff f8 stwu r1,-8(r1) ffc09aa8: 7c 08 02 a6 mflr r0 ffc09aac: 90 01 00 0c stw r0,12(r1) const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) ffc09ab0: 40 be 00 10 bne+ cr7,ffc09ac0 ffc09ab4: 3c 60 00 00 lis r3,0 ffc09ab8: 38 63 21 78 addi r3,r3,8568 ffc09abc: 48 00 00 24 b ffc09ae0 <== ALWAYS TAKEN api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) ffc09ac0: 2f 83 00 02 cmpwi cr7,r3,2 ffc09ac4: 41 9e 00 10 beq- cr7,ffc09ad4 ffc09ac8: 3c 60 ff c2 lis r3,-62 ffc09acc: 38 63 2b 8d addi r3,r3,11149 ffc09ad0: 48 00 00 2c b ffc09afc <== ALWAYS TAKEN ffc09ad4: 3c 60 00 00 lis r3,0 ffc09ad8: 38 63 21 78 addi r3,r3,8568 ffc09adc: 38 63 00 18 addi r3,r3,24 else if ( the_api == OBJECTS_ITRON_API ) api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); ffc09ae0: 48 00 5a 85 bl ffc0f564 <== ALWAYS TAKEN if ( class_assoc ) ffc09ae4: 2c 03 00 00 cmpwi r3,0 ffc09ae8: 40 a2 00 10 bne+ ffc09af8 ffc09aec: 3c 60 ff c2 lis r3,-62 ffc09af0: 38 63 2b 95 addi r3,r3,11157 ffc09af4: 48 00 00 08 b ffc09afc <== ALWAYS TAKEN return class_assoc->name; ffc09af8: 80 63 00 00 lwz r3,0(r3) return "BAD CLASS"; } ffc09afc: 80 01 00 0c lwz r0,12(r1) ffc09b00: 38 21 00 08 addi r1,r1,8 ffc09b04: 7c 08 03 a6 mtlr r0 ffc09b08: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09b0c : }; const char *rtems_object_get_api_name( int api ) { ffc09b0c: 94 21 ff f8 stwu r1,-8(r1) ffc09b10: 7c 08 02 a6 mflr r0 ffc09b14: 7c 64 1b 78 mr r4,r3 const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); ffc09b18: 3c 60 00 00 lis r3,0 }; const char *rtems_object_get_api_name( int api ) { ffc09b1c: 90 01 00 0c stw r0,12(r1) const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); ffc09b20: 38 63 22 08 addi r3,r3,8712 ffc09b24: 48 00 5a 41 bl ffc0f564 <== ALWAYS TAKEN if ( api_assoc ) ffc09b28: 2c 03 00 00 cmpwi r3,0 ffc09b2c: 40 a2 00 10 bne+ ffc09b3c ffc09b30: 3c 60 ff c2 lis r3,-62 ffc09b34: 38 63 2b 95 addi r3,r3,11157 ffc09b38: 48 00 00 08 b ffc09b40 <== ALWAYS TAKEN return api_assoc->name; ffc09b3c: 80 63 00 00 lwz r3,0(r3) return "BAD CLASS"; } ffc09b40: 80 01 00 0c lwz r0,12(r1) ffc09b44: 38 21 00 08 addi r1,r1,8 ffc09b48: 7c 08 03 a6 mtlr r0 ffc09b4c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09ba4 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { ffc09ba4: 94 21 ff f0 stwu r1,-16(r1) ffc09ba8: 7c 08 02 a6 mflr r0 ffc09bac: 93 e1 00 0c stw r31,12(r1) int i; /* * Validate parameters and look up information structure. */ if ( !info ) ffc09bb0: 7c bf 2b 79 mr. r31,r5 rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { ffc09bb4: 90 01 00 14 stw r0,20(r1) int i; /* * Validate parameters and look up information structure. */ if ( !info ) ffc09bb8: 38 00 00 09 li r0,9 ffc09bbc: 41 82 00 6c beq- ffc09c28 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); ffc09bc0: 48 00 20 a5 bl ffc0bc64 <_Objects_Get_information> <== ALWAYS TAKEN if ( !obj_info ) ffc09bc4: 38 00 00 0a li r0,10 ffc09bc8: 2c 03 00 00 cmpwi r3,0 ffc09bcc: 41 82 00 5c beq- ffc09c28 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; ffc09bd0: 80 03 00 08 lwz r0,8(r3) info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; ffc09bd4: 39 20 00 01 li r9,1 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; ffc09bd8: 89 43 00 12 lbz r10,18(r3) return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; ffc09bdc: 90 1f 00 00 stw r0,0(r31) info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; ffc09be0: a1 63 00 10 lhz r11,16(r3) /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; ffc09be4: 80 03 00 0c lwz r0,12(r3) info->auto_extend = obj_info->auto_extend; ffc09be8: 99 5f 00 0c stb r10,12(r31) /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; ffc09bec: 90 1f 00 04 stw r0,4(r31) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; ffc09bf0: 38 00 00 00 li r0,0 ffc09bf4: 91 7f 00 08 stw r11,8(r31) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc09bf8: 48 00 00 18 b ffc09c10 <== ALWAYS TAKEN if ( !obj_info->local_table[i] ) ffc09bfc: 81 03 00 1c lwz r8,28(r3) ffc09c00: 7d 48 50 2e lwzx r10,r8,r10 unallocated++; ffc09c04: 21 0a 00 00 subfic r8,r10,0 ffc09c08: 7d 00 01 94 addze r8,r0 ffc09c0c: 7d 00 43 78 mr r0,r8 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc09c10: 7f 89 58 40 cmplw cr7,r9,r11 if ( !obj_info->local_table[i] ) ffc09c14: 55 2a 10 3a rlwinm r10,r9,2,0,29 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc09c18: 39 29 00 01 addi r9,r9,1 ffc09c1c: 40 9d ff e0 ble+ cr7,ffc09bfc if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; ffc09c20: 90 1f 00 10 stw r0,16(r31) ffc09c24: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; } ffc09c28: 7c 03 03 78 mr r3,r0 ffc09c2c: 80 01 00 14 lwz r0,20(r1) ffc09c30: 83 e1 00 0c lwz r31,12(r1) ffc09c34: 38 21 00 10 addi r1,r1,16 ffc09c38: 7c 08 03 a6 mtlr r0 ffc09c3c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0c320 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { ffc0c320: 94 21 ff e0 stwu r1,-32(r1) ffc0c324: 7c 08 02 a6 mflr r0 ffc0c328: 93 e1 00 1c stw r31,28(r1) Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) ffc0c32c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { ffc0c330: 90 01 00 24 stw r0,36(r1) Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) ffc0c334: 38 00 00 09 li r0,9 ffc0c338: 41 82 00 24 beq- ffc0c35c return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); ffc0c33c: 38 81 00 08 addi r4,r1,8 ffc0c340: 48 00 23 b5 bl ffc0e6f4 <_Objects_Id_to_name> <== ALWAYS TAKEN *name = name_u.name_u32; ffc0c344: 80 01 00 08 lwz r0,8(r1) return _Status_Object_name_errors_to_status[ status ]; ffc0c348: 3d 20 ff c3 lis r9,-61 ffc0c34c: 54 63 10 3a rlwinm r3,r3,2,0,29 if ( !name ) return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; ffc0c350: 90 1f 00 00 stw r0,0(r31) return _Status_Object_name_errors_to_status[ status ]; ffc0c354: 39 29 bc 38 addi r9,r9,-17352 ffc0c358: 7c 09 18 2e lwzx r0,r9,r3 } ffc0c35c: 7c 03 03 78 mr r3,r0 ffc0c360: 80 01 00 24 lwz r0,36(r1) ffc0c364: 83 e1 00 1c lwz r31,28(r1) ffc0c368: 38 21 00 20 addi r1,r1,32 ffc0c36c: 7c 08 03 a6 mtlr r0 ffc0c370: 4e 80 00 20 blr <== ALWAYS TAKEN ffc159f4 : char *rtems_object_get_name( Objects_Id id, size_t length, char *name ) { ffc159f4: 94 21 ff f8 stwu r1,-8(r1) ffc159f8: 7c 08 02 a6 mflr r0 ffc159fc: 90 01 00 0c stw r0,12(r1) return _Objects_Get_name_as_string( id, length, name ); ffc15a00: 48 00 0d e5 bl ffc167e4 <_Objects_Get_name_as_string> <== ALWAYS TAKEN } ffc15a04: 80 01 00 0c lwz r0,12(r1) ffc15a08: 38 21 00 08 addi r1,r1,8 ffc15a0c: 7c 08 03 a6 mtlr r0 ffc15a10: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09c60 : #undef rtems_object_id_api_maximum int rtems_object_id_api_maximum(void) { return OBJECTS_ITRON_API; } ffc09c60: 38 60 00 04 li r3,4 ffc09c64: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09c68 : #undef rtems_object_id_api_minimum int rtems_object_id_api_minimum(void) { return OBJECTS_INTERNAL_API; } ffc09c68: 38 60 00 01 li r3,1 ffc09c6c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09c70 : int rtems_object_id_get_api( rtems_id id ) { return _Objects_Get_API( id ); } ffc09c70: 54 63 47 7e rlwinm r3,r3,8,29,31 ffc09c74: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09c78 : int rtems_object_id_get_class( rtems_id id ) { return _Objects_Get_class( id ); } ffc09c78: 54 63 2e fe rlwinm r3,r3,5,27,31 ffc09c7c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09c80 : int rtems_object_id_get_index( rtems_id id ) { return _Objects_Get_index( id ); } ffc09c80: 54 63 04 3e clrlwi r3,r3,16 ffc09c84: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09c88 : int rtems_object_id_get_node( rtems_id id ) { return _Objects_Get_node( id ); } ffc09c88: 54 63 86 3e rlwinm r3,r3,16,24,31 ffc09c8c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09c90 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { ffc09c90: 94 21 ff d8 stwu r1,-40(r1) ffc09c94: 7c 08 02 a6 mflr r0 ffc09c98: 93 c1 00 20 stw r30,32(r1) Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) ffc09c9c: 7c 9e 23 79 mr. r30,r4 */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { ffc09ca0: 90 01 00 2c stw r0,44(r1) Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) ffc09ca4: 38 00 00 09 li r0,9 */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { ffc09ca8: 93 a1 00 1c stw r29,28(r1) ffc09cac: 93 e1 00 24 stw r31,36(r1) Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) ffc09cb0: 41 82 00 64 beq- ffc09d14 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc09cb4: 2f 83 00 00 cmpwi cr7,r3,0 ffc09cb8: 7c 7d 1b 78 mr r29,r3 ffc09cbc: 40 9e 00 10 bne- cr7,ffc09ccc ffc09cc0: 3d 20 00 00 lis r9,0 ffc09cc4: 81 29 28 78 lwz r9,10360(r9) ffc09cc8: 83 a9 00 08 lwz r29,8(r9) information = _Objects_Get_information_id( tmpId ); ffc09ccc: 7f a3 eb 78 mr r3,r29 ffc09cd0: 48 00 1f 6d bl ffc0bc3c <_Objects_Get_information_id> <== ALWAYS TAKEN if ( !information ) ffc09cd4: 7c 7f 1b 79 mr. r31,r3 ffc09cd8: 41 82 00 38 beq- ffc09d10 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); ffc09cdc: 7f a4 eb 78 mr r4,r29 ffc09ce0: 38 a1 00 08 addi r5,r1,8 ffc09ce4: 48 00 21 89 bl ffc0be6c <_Objects_Get> <== ALWAYS TAKEN switch ( location ) { ffc09ce8: 80 01 00 08 lwz r0,8(r1) information = _Objects_Get_information_id( tmpId ); if ( !information ) return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); ffc09cec: 7c 64 1b 78 mr r4,r3 switch ( location ) { ffc09cf0: 2f 80 00 00 cmpwi cr7,r0,0 ffc09cf4: 40 9e 00 1c bne- cr7,ffc09d10 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); ffc09cf8: 7f c5 f3 78 mr r5,r30 ffc09cfc: 7f e3 fb 78 mr r3,r31 ffc09d00: 48 00 24 31 bl ffc0c130 <_Objects_Set_name> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc09d04: 48 00 2d 81 bl ffc0ca84 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc09d08: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; ffc09d0c: 48 00 00 08 b ffc09d14 <== ALWAYS TAKEN ffc09d10: 38 00 00 04 li r0,4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc09d14: 7c 03 03 78 mr r3,r0 ffc09d18: 80 01 00 2c lwz r0,44(r1) ffc09d1c: 83 a1 00 1c lwz r29,28(r1) ffc09d20: 7c 08 03 a6 mtlr r0 ffc09d24: 83 c1 00 20 lwz r30,32(r1) ffc09d28: 83 e1 00 24 lwz r31,36(r1) ffc09d2c: 38 21 00 28 addi r1,r1,40 ffc09d30: 4e 80 00 20 blr <== ALWAYS TAKEN ffc16540 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc16540: 94 21 ff d0 stwu r1,-48(r1) ffc16544: 7c 08 02 a6 mflr r0 ffc16548: 93 e1 00 2c stw r31,44(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc1654c: 7c 7f 1b 79 mr. r31,r3 ffc16550: 38 60 00 03 li r3,3 uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc16554: 93 41 00 18 stw r26,24(r1) ffc16558: 7c fa 3b 78 mr r26,r7 ffc1655c: 93 81 00 20 stw r28,32(r1) ffc16560: 7d 1c 43 78 mr r28,r8 ffc16564: 93 c1 00 28 stw r30,40(r1) ffc16568: 7c be 2b 78 mr r30,r5 ffc1656c: 90 01 00 34 stw r0,52(r1) ffc16570: 93 21 00 14 stw r25,20(r1) ffc16574: 93 61 00 1c stw r27,28(r1) ffc16578: 93 a1 00 24 stw r29,36(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc1657c: 41 82 00 d0 beq- ffc1664c return RTEMS_INVALID_NAME; if ( !starting_address ) ffc16580: 2f 84 00 00 cmpwi cr7,r4,0 ffc16584: 41 9e 00 bc beq- cr7,ffc16640 return RTEMS_INVALID_ADDRESS; if ( !id ) ffc16588: 2f 88 00 00 cmpwi cr7,r8,0 ffc1658c: 41 9e 00 b4 beq- cr7,ffc16640 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || ffc16590: 2f 85 00 00 cmpwi cr7,r5,0 ffc16594: 41 9e 00 b4 beq- cr7,ffc16648 ffc16598: 2f 86 00 00 cmpwi cr7,r6,0 ffc1659c: 41 9e 00 ac beq- cr7,ffc16648 ffc165a0: 7f 85 30 40 cmplw cr7,r5,r6 ffc165a4: 41 9c 00 a4 blt- cr7,ffc16648 ffc165a8: 70 c0 00 07 andi. r0,r6,7 ffc165ac: 40 82 00 9c bne- ffc16648 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) ffc165b0: 70 99 00 07 andi. r25,r4,7 ffc165b4: 40 a2 00 8c bne+ ffc16640 ffc165b8: 3d 20 00 00 lis r9,0 ffc165bc: 81 69 28 24 lwz r11,10276(r9) ffc165c0: 38 0b 00 01 addi r0,r11,1 ffc165c4: 90 09 28 24 stw r0,10276(r9) * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); ffc165c8: 3f 60 00 00 lis r27,0 ffc165cc: 90 81 00 08 stw r4,8(r1) ffc165d0: 3b 7b 6e 6c addi r27,r27,28268 ffc165d4: 7f 63 db 78 mr r3,r27 ffc165d8: 90 c1 00 0c stw r6,12(r1) ffc165dc: 48 00 54 7d bl ffc1ba58 <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { ffc165e0: 7c 7d 1b 79 mr. r29,r3 ffc165e4: 80 81 00 08 lwz r4,8(r1) ffc165e8: 80 c1 00 0c lwz r6,12(r1) ffc165ec: 40 a2 00 10 bne+ ffc165fc _Thread_Enable_dispatch(); ffc165f0: 48 00 65 d5 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc165f4: 38 60 00 05 li r3,5 return RTEMS_TOO_MANY; ffc165f8: 48 00 00 54 b ffc1664c <== ALWAYS TAKEN the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, ffc165fc: 7c be 33 96 divwu r5,r30,r6 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; ffc16600: 90 9d 00 10 stw r4,16(r29) the_partition->length = length; the_partition->buffer_size = buffer_size; ffc16604: 90 dd 00 18 stw r6,24(r29) the_partition->attribute_set = attribute_set; ffc16608: 93 5d 00 1c stw r26,28(r29) the_partition->number_of_used_blocks = 0; ffc1660c: 93 3d 00 20 stw r25,32(r29) return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; ffc16610: 93 dd 00 14 stw r30,20(r29) the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, ffc16614: 38 7d 00 24 addi r3,r29,36 ffc16618: 48 00 3c 95 bl ffc1a2ac <_Chain_Initialize> <== ALWAYS TAKEN ffc1661c: 80 1d 00 08 lwz r0,8(r29) ffc16620: 81 7b 00 1c lwz r11,28(r27) ffc16624: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc16628: 93 fd 00 0c stw r31,12(r29) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc1662c: 7f ab 49 2e stwx r29,r11,r9 &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; ffc16630: 90 1c 00 00 stw r0,0(r28) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); ffc16634: 48 00 65 91 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc16638: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc1663c: 48 00 00 10 b ffc1664c <== ALWAYS TAKEN ffc16640: 38 60 00 09 li r3,9 ffc16644: 48 00 00 08 b ffc1664c <== ALWAYS TAKEN ffc16648: 38 60 00 08 li r3,8 } ffc1664c: 80 01 00 34 lwz r0,52(r1) ffc16650: 83 21 00 14 lwz r25,20(r1) ffc16654: 7c 08 03 a6 mtlr r0 ffc16658: 83 41 00 18 lwz r26,24(r1) ffc1665c: 83 61 00 1c lwz r27,28(r1) ffc16660: 83 81 00 20 lwz r28,32(r1) ffc16664: 83 a1 00 24 lwz r29,36(r1) ffc16668: 83 c1 00 28 lwz r30,40(r1) ffc1666c: 83 e1 00 2c lwz r31,44(r1) ffc16670: 38 21 00 30 addi r1,r1,48 ffc16674: 4e 80 00 20 blr <== ALWAYS TAKEN ffc16678 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { ffc16678: 94 21 ff e0 stwu r1,-32(r1) ffc1667c: 7c 08 02 a6 mflr r0 ffc16680: 7c 64 1b 78 mr r4,r3 ffc16684: 93 e1 00 1c stw r31,28(r1) RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) ffc16688: 3f e0 00 00 lis r31,0 ffc1668c: 3b ff 6e 6c addi r31,r31,28268 ffc16690: 7f e3 fb 78 mr r3,r31 ffc16694: 90 01 00 24 stw r0,36(r1) ffc16698: 38 a1 00 08 addi r5,r1,8 ffc1669c: 93 c1 00 18 stw r30,24(r1) ffc166a0: 48 00 59 ad bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN ffc166a4: 7c 7e 1b 78 mr r30,r3 register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc166a8: 80 01 00 08 lwz r0,8(r1) ffc166ac: 38 60 00 04 li r3,4 ffc166b0: 2f 80 00 00 cmpwi cr7,r0,0 ffc166b4: 40 9e 00 3c bne- cr7,ffc166f0 case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { ffc166b8: 80 1e 00 20 lwz r0,32(r30) ffc166bc: 2f 80 00 00 cmpwi cr7,r0,0 ffc166c0: 40 be 00 28 bne+ cr7,ffc166e8 _Objects_Close( &_Partition_Information, &the_partition->Object ); ffc166c4: 7f e3 fb 78 mr r3,r31 ffc166c8: 7f c4 f3 78 mr r4,r30 ffc166cc: 48 00 54 39 bl ffc1bb04 <_Objects_Close> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); ffc166d0: 7f e3 fb 78 mr r3,r31 ffc166d4: 7f c4 f3 78 mr r4,r30 ffc166d8: 48 00 57 6d bl ffc1be44 <_Objects_Free> <== ALWAYS TAKEN 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); ffc166dc: 48 00 64 e9 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc166e0: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc166e4: 48 00 00 0c b ffc166f0 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); ffc166e8: 48 00 64 dd bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc166ec: 38 60 00 0c li r3,12 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc166f0: 80 01 00 24 lwz r0,36(r1) ffc166f4: 83 c1 00 18 lwz r30,24(r1) ffc166f8: 7c 08 03 a6 mtlr r0 ffc166fc: 83 e1 00 1c lwz r31,28(r1) ffc16700: 38 21 00 20 addi r1,r1,32 ffc16704: 4e 80 00 20 blr <== ALWAYS TAKEN ffc16708 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { ffc16708: 94 21 ff d8 stwu r1,-40(r1) ffc1670c: 7c 08 02 a6 mflr r0 ffc16710: 93 e1 00 24 stw r31,36(r1) register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) ffc16714: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { ffc16718: 7c 64 1b 78 mr r4,r3 ffc1671c: 90 01 00 2c stw r0,44(r1) register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) ffc16720: 38 60 00 09 li r3,9 rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { ffc16724: 93 a1 00 1c stw r29,28(r1) ffc16728: 93 c1 00 20 stw r30,32(r1) register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) ffc1672c: 41 82 00 5c beq- ffc16788 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) ffc16730: 3c 60 00 00 lis r3,0 ffc16734: 38 63 6e 6c addi r3,r3,28268 ffc16738: 38 a1 00 08 addi r5,r1,8 ffc1673c: 48 00 59 11 bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc16740: 80 01 00 08 lwz r0,8(r1) ffc16744: 7c 7e 1b 78 mr r30,r3 ffc16748: 2f 80 00 00 cmpwi cr7,r0,0 ffc1674c: 38 60 00 04 li r3,4 ffc16750: 40 9e 00 38 bne- cr7,ffc16788 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); ffc16754: 38 7e 00 24 addi r3,r30,36 ffc16758: 48 00 3b 15 bl ffc1a26c <_Chain_Get> <== ALWAYS TAKEN case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { ffc1675c: 7c 7d 1b 79 mr. r29,r3 ffc16760: 41 82 00 20 beq- ffc16780 the_partition->number_of_used_blocks += 1; ffc16764: 81 3e 00 20 lwz r9,32(r30) ffc16768: 38 09 00 01 addi r0,r9,1 ffc1676c: 90 1e 00 20 stw r0,32(r30) _Thread_Enable_dispatch(); ffc16770: 48 00 64 55 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN *buffer = the_buffer; ffc16774: 93 bf 00 00 stw r29,0(r31) ffc16778: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc1677c: 48 00 00 0c b ffc16788 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); ffc16780: 48 00 64 45 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc16784: 38 60 00 0d li r3,13 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc16788: 80 01 00 2c lwz r0,44(r1) ffc1678c: 83 a1 00 1c lwz r29,28(r1) ffc16790: 7c 08 03 a6 mtlr r0 ffc16794: 83 c1 00 20 lwz r30,32(r1) ffc16798: 83 e1 00 24 lwz r31,36(r1) ffc1679c: 38 21 00 28 addi r1,r1,40 ffc167a0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc167a4 : rtems_status_code rtems_partition_ident( rtems_name name, uint32_t node, rtems_id *id ) { ffc167a4: 94 21 ff f8 stwu r1,-8(r1) ffc167a8: 7c 08 02 a6 mflr r0 ffc167ac: 7c 69 1b 78 mr r9,r3 ffc167b0: 90 01 00 0c stw r0,12(r1) Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Partition_Information, name, node, id ); ffc167b4: 3c 60 00 00 lis r3,0 rtems_status_code rtems_partition_ident( rtems_name name, uint32_t node, rtems_id *id ) { ffc167b8: 7c 80 23 78 mr r0,r4 ffc167bc: 7c a6 2b 78 mr r6,r5 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Partition_Information, name, node, id ); ffc167c0: 7d 24 4b 78 mr r4,r9 ffc167c4: 7c 05 03 78 mr r5,r0 ffc167c8: 38 63 6e 6c addi r3,r3,28268 ffc167cc: 48 00 5a b9 bl ffc1c284 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN return _Status_Object_name_errors_to_status[ status ]; } ffc167d0: 80 01 00 0c lwz r0,12(r1) ffc167d4: 3d 20 ff c4 lis r9,-60 ffc167d8: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Partition_Information, name, node, id ); ffc167dc: 54 63 10 3a rlwinm r3,r3,2,0,29 return _Status_Object_name_errors_to_status[ status ]; } ffc167e0: 39 29 8f 78 addi r9,r9,-28808 ffc167e4: 7c 69 18 2e lwzx r3,r9,r3 ffc167e8: 38 21 00 08 addi r1,r1,8 ffc167ec: 4e 80 00 20 blr <== ALWAYS TAKEN ffc167f0 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { ffc167f0: 94 21 ff e0 stwu r1,-32(r1) ffc167f4: 7c 08 02 a6 mflr r0 ffc167f8: 90 01 00 24 stw r0,36(r1) ffc167fc: 7c 60 1b 78 mr r0,r3 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) ffc16800: 3c 60 00 00 lis r3,0 ffc16804: 93 e1 00 1c stw r31,28(r1) ffc16808: 38 63 6e 6c addi r3,r3,28268 ffc1680c: 7c 9f 23 78 mr r31,r4 ffc16810: 38 a1 00 08 addi r5,r1,8 ffc16814: 93 c1 00 18 stw r30,24(r1) ffc16818: 7c 04 03 78 mr r4,r0 ffc1681c: 48 00 58 31 bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc16820: 80 01 00 08 lwz r0,8(r1) ffc16824: 7c 7e 1b 78 mr r30,r3 ffc16828: 2f 80 00 00 cmpwi cr7,r0,0 ffc1682c: 38 60 00 04 li r3,4 ffc16830: 40 9e 00 58 bne- cr7,ffc16888 ) { void *starting; void *ending; starting = the_partition->starting_address; ffc16834: 80 1e 00 10 lwz r0,16(r30) ending = _Addresses_Add_offset( starting, the_partition->length ); ffc16838: 81 3e 00 14 lwz r9,20(r30) const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc1683c: 7f 9f 00 40 cmplw cr7,r31,r0 ffc16840: 41 9c 00 60 blt- cr7,ffc168a0 ffc16844: 7d 20 4a 14 add r9,r0,r9 ffc16848: 7f 9f 48 40 cmplw cr7,r31,r9 ffc1684c: 41 9d 00 54 bgt- cr7,ffc168a0 <== NEVER TAKEN return ( ffc16850: 81 3e 00 18 lwz r9,24(r30) ffc16854: 7c 00 f8 50 subf r0,r0,r31 ffc16858: 7d 60 4b 96 divwu r11,r0,r9 ffc1685c: 7d 2b 49 d6 mullw r9,r11,r9 ffc16860: 7f 80 48 00 cmpw cr7,r0,r9 ffc16864: 40 9e 00 3c bne- cr7,ffc168a0 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); ffc16868: 38 7e 00 24 addi r3,r30,36 ffc1686c: 7f e4 fb 78 mr r4,r31 ffc16870: 48 00 39 cd bl ffc1a23c <_Chain_Append> <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; ffc16874: 81 3e 00 20 lwz r9,32(r30) ffc16878: 38 09 ff ff addi r0,r9,-1 ffc1687c: 90 1e 00 20 stw r0,32(r30) _Thread_Enable_dispatch(); ffc16880: 48 00 63 45 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc16884: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc16888: 80 01 00 24 lwz r0,36(r1) ffc1688c: 83 c1 00 18 lwz r30,24(r1) ffc16890: 7c 08 03 a6 mtlr r0 ffc16894: 83 e1 00 1c lwz r31,28(r1) ffc16898: 38 21 00 20 addi r1,r1,32 ffc1689c: 4e 80 00 20 blr <== ALWAYS TAKEN _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc168a0: 48 00 63 25 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc168a4: 38 60 00 09 li r3,9 return RTEMS_INVALID_ADDRESS; ffc168a8: 4b ff ff e0 b ffc16888 <== ALWAYS TAKEN ffc158dc : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { ffc158dc: 94 21 ff e0 stwu r1,-32(r1) ffc158e0: 7c 08 02 a6 mflr r0 ffc158e4: 93 e1 00 1c stw r31,28(r1) register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) ffc158e8: 7c 7f 1b 79 mr. r31,r3 ffc158ec: 38 60 00 03 li r3,3 void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { ffc158f0: 93 61 00 0c stw r27,12(r1) ffc158f4: 7c fb 3b 78 mr r27,r7 ffc158f8: 93 81 00 10 stw r28,16(r1) ffc158fc: 7c dc 33 78 mr r28,r6 ffc15900: 93 a1 00 14 stw r29,20(r1) ffc15904: 7c bd 2b 78 mr r29,r5 ffc15908: 93 c1 00 18 stw r30,24(r1) ffc1590c: 7c 9e 23 78 mr r30,r4 ffc15910: 90 01 00 24 stw r0,36(r1) ffc15914: 93 41 00 08 stw r26,8(r1) register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) ffc15918: 41 82 00 84 beq- ffc1599c return RTEMS_INVALID_NAME; if ( !id ) ffc1591c: 2f 87 00 00 cmpwi cr7,r7,0 ffc15920: 41 9e 00 78 beq- cr7,ffc15998 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || ffc15924: 7c a0 23 78 or r0,r5,r4 ffc15928: 70 09 00 07 andi. r9,r0,7 ffc1592c: 40 a2 00 6c bne+ ffc15998 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc15930: 3d 20 00 00 lis r9,0 ffc15934: 81 69 28 24 lwz r11,10276(r9) ffc15938: 38 0b 00 01 addi r0,r11,1 ffc1593c: 90 09 28 24 stw r0,10276(r9) * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) ffc15940: 3f 40 00 00 lis r26,0 ffc15944: 3b 5a 6e 2c addi r26,r26,28204 ffc15948: 7f 43 d3 78 mr r3,r26 ffc1594c: 48 00 61 0d bl ffc1ba58 <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { ffc15950: 2c 03 00 00 cmpwi r3,0 ffc15954: 40 a2 00 10 bne+ ffc15964 _Thread_Enable_dispatch(); ffc15958: 48 00 72 6d bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1595c: 38 60 00 05 li r3,5 return RTEMS_TOO_MANY; ffc15960: 48 00 00 3c b ffc1599c <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc15964: 80 03 00 08 lwz r0,8(r3) } the_port->internal_base = internal_start; the_port->external_base = external_start; the_port->length = length - 1; ffc15968: 3b 9c ff ff addi r28,r28,-1 ffc1596c: 81 7a 00 1c lwz r11,28(r26) ffc15970: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc15974: 93 e3 00 0c stw r31,12(r3) ffc15978: 93 83 00 18 stw r28,24(r3) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc1597c: 7c 6b 49 2e stwx r3,r11,r9 if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; ffc15980: 93 c3 00 10 stw r30,16(r3) the_port->external_base = external_start; ffc15984: 93 a3 00 14 stw r29,20(r3) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; ffc15988: 90 1b 00 00 stw r0,0(r27) _Thread_Enable_dispatch(); ffc1598c: 48 00 72 39 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc15990: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc15994: 48 00 00 08 b ffc1599c <== ALWAYS TAKEN ffc15998: 38 60 00 09 li r3,9 } ffc1599c: 80 01 00 24 lwz r0,36(r1) ffc159a0: 83 41 00 08 lwz r26,8(r1) ffc159a4: 7c 08 03 a6 mtlr r0 ffc159a8: 83 61 00 0c lwz r27,12(r1) ffc159ac: 83 81 00 10 lwz r28,16(r1) ffc159b0: 83 a1 00 14 lwz r29,20(r1) ffc159b4: 83 c1 00 18 lwz r30,24(r1) ffc159b8: 83 e1 00 1c lwz r31,28(r1) ffc159bc: 38 21 00 20 addi r1,r1,32 ffc159c0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc159c4 : */ rtems_status_code rtems_port_delete( rtems_id id ) { ffc159c4: 94 21 ff e0 stwu r1,-32(r1) ffc159c8: 7c 08 02 a6 mflr r0 ffc159cc: 7c 64 1b 78 mr r4,r3 ffc159d0: 93 e1 00 1c stw r31,28(r1) RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) ffc159d4: 3f e0 00 00 lis r31,0 ffc159d8: 3b ff 6e 2c addi r31,r31,28204 ffc159dc: 7f e3 fb 78 mr r3,r31 ffc159e0: 90 01 00 24 stw r0,36(r1) ffc159e4: 38 a1 00 08 addi r5,r1,8 ffc159e8: 93 c1 00 18 stw r30,24(r1) <== ALWAYS TAKEN ffc159ec: 48 00 66 61 bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN ffc159f0: 7c 7e 1b 78 mr r30,r3 register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { ffc159f4: 80 01 00 08 lwz r0,8(r1) ffc159f8: 38 60 00 04 li r3,4 ffc159fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc15a00: 40 9e 00 24 bne- cr7,ffc15a24 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); ffc15a04: 7f e3 fb 78 mr r3,r31 ffc15a08: 7f c4 f3 78 mr r4,r30 ffc15a0c: 48 00 60 f9 bl ffc1bb04 <_Objects_Close> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); ffc15a10: 7f e3 fb 78 mr r3,r31 ffc15a14: 7f c4 f3 78 mr r4,r30 ffc15a18: 48 00 64 2d bl ffc1be44 <_Objects_Free> <== ALWAYS TAKEN _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); ffc15a1c: 48 00 71 a9 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc15a20: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc15a24: 80 01 00 24 lwz r0,36(r1) ffc15a28: 83 c1 00 18 lwz r30,24(r1) ffc15a2c: 7c 08 03 a6 mtlr r0 ffc15a30: 83 e1 00 1c lwz r31,28(r1) ffc15a34: 38 21 00 20 addi r1,r1,32 ffc15a38: 4e 80 00 20 blr <== ALWAYS TAKEN ffc15a3c : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { ffc15a3c: 94 21 ff e0 stwu r1,-32(r1) ffc15a40: 7c 08 02 a6 mflr r0 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) ffc15a44: 39 20 00 09 li r9,9 rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { ffc15a48: 93 e1 00 1c stw r31,28(r1) register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) ffc15a4c: 7c bf 2b 79 mr. r31,r5 rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { ffc15a50: 90 01 00 24 stw r0,36(r1) ffc15a54: 7c 60 1b 78 mr r0,r3 ffc15a58: 93 c1 00 18 stw r30,24(r1) ffc15a5c: 7c 9e 23 78 mr r30,r4 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) ffc15a60: 41 82 00 58 beq- ffc15ab8 RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) ffc15a64: 3c 60 00 00 lis r3,0 ffc15a68: 7c 04 03 78 mr r4,r0 ffc15a6c: 38 63 6e 2c addi r3,r3,28204 ffc15a70: 38 a1 00 08 addi r5,r1,8 ffc15a74: 48 00 65 d9 bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { ffc15a78: 80 01 00 08 lwz r0,8(r1) ffc15a7c: 39 20 00 04 li r9,4 ffc15a80: 2f 80 00 00 cmpwi cr7,r0,0 ffc15a84: 40 9e 00 34 bne- cr7,ffc15ab8 case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); ffc15a88: 80 03 00 14 lwz r0,20(r3) if ( ending > the_port->length ) ffc15a8c: 81 23 00 18 lwz r9,24(r3) return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); ffc15a90: 7c 00 f0 50 subf r0,r0,r30 if ( ending > the_port->length ) ffc15a94: 7f 80 48 40 cmplw cr7,r0,r9 ffc15a98: 40 9d 00 0c ble- cr7,ffc15aa4 *internal = external; ffc15a9c: 93 df 00 00 stw r30,0(r31) ffc15aa0: 48 00 00 10 b ffc15ab0 <== ALWAYS TAKEN else *internal = _Addresses_Add_offset( the_port->internal_base, ffc15aa4: 81 23 00 10 lwz r9,16(r3) ffc15aa8: 7c 09 02 14 add r0,r9,r0 ffc15aac: 90 1f 00 00 stw r0,0(r31) ending ); _Thread_Enable_dispatch(); ffc15ab0: 48 00 71 15 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc15ab4: 39 20 00 00 li r9,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc15ab8: 80 01 00 24 lwz r0,36(r1) ffc15abc: 7d 23 4b 78 mr r3,r9 ffc15ac0: 83 c1 00 18 lwz r30,24(r1) ffc15ac4: 7c 08 03 a6 mtlr r0 ffc15ac8: 83 e1 00 1c lwz r31,28(r1) ffc15acc: 38 21 00 20 addi r1,r1,32 ffc15ad0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc15ad4 : rtems_status_code rtems_port_ident( rtems_name name, rtems_id *id ) { ffc15ad4: 94 21 ff f8 stwu r1,-8(r1) ffc15ad8: 7c 08 02 a6 mflr r0 ffc15adc: 7c 86 23 78 mr r6,r4 ffc15ae0: 90 01 00 0c stw r0,12(r1) ffc15ae4: 7c 60 1b 78 mr r0,r3 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc15ae8: 3c 60 00 00 lis r3,0 ffc15aec: 7c 04 03 78 mr r4,r0 ffc15af0: 38 63 6e 2c addi r3,r3,28204 ffc15af4: 38 a0 00 00 li r5,0 ffc15af8: 48 00 67 8d bl ffc1c284 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN OBJECTS_SEARCH_ALL_NODES, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc15afc: 80 01 00 0c lwz r0,12(r1) ffc15b00: 3d 20 ff c4 lis r9,-60 ffc15b04: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc15b08: 54 63 10 3a rlwinm r3,r3,2,0,29 OBJECTS_SEARCH_ALL_NODES, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc15b0c: 39 29 8f 78 addi r9,r9,-28808 ffc15b10: 7c 69 18 2e lwzx r3,r9,r3 ffc15b14: 38 21 00 08 addi r1,r1,8 ffc15b18: 4e 80 00 20 blr <== ALWAYS TAKEN ffc15b1c : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { ffc15b1c: 94 21 ff e0 stwu r1,-32(r1) ffc15b20: 7c 08 02 a6 mflr r0 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) ffc15b24: 39 20 00 09 li r9,9 rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { ffc15b28: 93 e1 00 1c stw r31,28(r1) register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) ffc15b2c: 7c bf 2b 79 mr. r31,r5 rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { ffc15b30: 90 01 00 24 stw r0,36(r1) ffc15b34: 7c 60 1b 78 mr r0,r3 ffc15b38: 93 c1 00 18 stw r30,24(r1) ffc15b3c: 7c 9e 23 78 mr r30,r4 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) ffc15b40: 41 82 00 58 beq- ffc15b98 ffc15b44: 3c 60 00 00 lis r3,0 ffc15b48: 7c 04 03 78 mr r4,r0 ffc15b4c: 38 63 6e 2c addi r3,r3,28204 ffc15b50: 38 a1 00 08 addi r5,r1,8 ffc15b54: 48 00 64 f9 bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { ffc15b58: 80 01 00 08 lwz r0,8(r1) ffc15b5c: 39 20 00 04 li r9,4 ffc15b60: 2f 80 00 00 cmpwi cr7,r0,0 ffc15b64: 40 9e 00 34 bne- cr7,ffc15b98 case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); ffc15b68: 80 03 00 10 lwz r0,16(r3) if ( ending > the_port->length ) ffc15b6c: 81 23 00 18 lwz r9,24(r3) the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); ffc15b70: 7c 00 f0 50 subf r0,r0,r30 if ( ending > the_port->length ) ffc15b74: 7f 80 48 40 cmplw cr7,r0,r9 ffc15b78: 40 9d 00 0c ble- cr7,ffc15b84 *external = internal; ffc15b7c: 93 df 00 00 stw r30,0(r31) ffc15b80: 48 00 00 10 b ffc15b90 <== ALWAYS TAKEN else *external = _Addresses_Add_offset( the_port->external_base, ffc15b84: 81 23 00 14 lwz r9,20(r3) ffc15b88: 7c 09 02 14 add r0,r9,r0 ffc15b8c: 90 1f 00 00 stw r0,0(r31) ending ); _Thread_Enable_dispatch(); ffc15b90: 48 00 70 35 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc15b94: 39 20 00 00 li r9,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc15b98: 80 01 00 24 lwz r0,36(r1) ffc15b9c: 7d 23 4b 78 mr r3,r9 ffc15ba0: 83 c1 00 18 lwz r30,24(r1) ffc15ba4: 7c 08 03 a6 mtlr r0 ffc15ba8: 83 e1 00 1c lwz r31,28(r1) ffc15bac: 38 21 00 20 addi r1,r1,32 ffc15bb0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc168ac : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { ffc168ac: 94 21 ff e0 stwu r1,-32(r1) ffc168b0: 7c 08 02 a6 mflr r0 ffc168b4: 7c 64 1b 78 mr r4,r3 RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) ffc168b8: 3c 60 00 00 lis r3,0 ffc168bc: 93 c1 00 18 stw r30,24(r1) ffc168c0: 38 63 6e ac addi r3,r3,28332 ffc168c4: 38 a1 00 08 addi r5,r1,8 ffc168c8: 93 e1 00 1c stw r31,28(r1) ffc168cc: 90 01 00 24 stw r0,36(r1) ffc168d0: 48 00 57 7d bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN ffc168d4: 7c 7f 1b 78 mr r31,r3 Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc168d8: 83 c1 00 08 lwz r30,8(r1) ffc168dc: 38 60 00 04 li r3,4 ffc168e0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc168e4: 40 9e 00 38 bne- cr7,ffc1691c case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { ffc168e8: 3d 20 00 00 lis r9,0 ffc168ec: 80 09 28 64 lwz r0,10340(r9) ffc168f0: 81 3f 00 40 lwz r9,64(r31) ffc168f4: 7f 89 00 00 cmpw cr7,r9,r0 ffc168f8: 41 9e 00 10 beq- cr7,ffc16908 _Thread_Enable_dispatch(); ffc168fc: 48 00 62 c9 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc16900: 38 60 00 17 li r3,23 return RTEMS_NOT_OWNER_OF_RESOURCE; ffc16904: 48 00 00 18 b ffc1691c <== ALWAYS TAKEN } (void) _Watchdog_Remove( &the_period->Timer ); ffc16908: 38 7f 00 10 addi r3,r31,16 ffc1690c: 48 00 7d 6d bl ffc1e678 <_Watchdog_Remove> <== ALWAYS TAKEN the_period->state = RATE_MONOTONIC_INACTIVE; ffc16910: 93 df 00 38 stw r30,56(r31) _Thread_Enable_dispatch(); ffc16914: 48 00 62 b1 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc16918: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1691c: 80 01 00 24 lwz r0,36(r1) ffc16920: 83 c1 00 18 lwz r30,24(r1) ffc16924: 7c 08 03 a6 mtlr r0 ffc16928: 83 e1 00 1c lwz r31,28(r1) ffc1692c: 38 21 00 20 addi r1,r1,32 ffc16930: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08cd4 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { ffc08cd4: 94 21 ff e8 stwu r1,-24(r1) ffc08cd8: 7c 08 02 a6 mflr r0 ffc08cdc: 93 81 00 08 stw r28,8(r1) Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) ffc08ce0: 7c 7c 1b 79 mr. r28,r3 ffc08ce4: 38 60 00 03 li r3,3 rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { ffc08ce8: 93 c1 00 10 stw r30,16(r1) ffc08cec: 7c 9e 23 78 mr r30,r4 ffc08cf0: 90 01 00 1c stw r0,28(r1) ffc08cf4: 93 a1 00 0c stw r29,12(r1) ffc08cf8: 93 e1 00 14 stw r31,20(r1) Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) ffc08cfc: 41 82 00 b0 beq- ffc08dac return RTEMS_INVALID_NAME; if ( !id ) ffc08d00: 2f 84 00 00 cmpwi cr7,r4,0 ffc08d04: 38 60 00 09 li r3,9 ffc08d08: 41 9e 00 a4 beq- cr7,ffc08dac rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc08d0c: 3d 20 00 00 lis r9,0 ffc08d10: 81 69 27 b0 lwz r11,10160(r9) ffc08d14: 38 0b 00 01 addi r0,r11,1 ffc08d18: 90 09 27 b0 stw r0,10160(r9) <== ALWAYS TAKEN * This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) ffc08d1c: 3f a0 00 00 lis r29,0 ffc08d20: 3b bd 2b ec addi r29,r29,11244 ffc08d24: 7f a3 eb 78 mr r3,r29 ffc08d28: 48 00 25 9d bl ffc0b2c4 <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { ffc08d2c: 7c 7f 1b 79 mr. r31,r3 ffc08d30: 40 a2 00 10 bne+ ffc08d40 _Thread_Enable_dispatch(); ffc08d34: 48 00 37 1d bl ffc0c450 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc08d38: 38 60 00 05 li r3,5 return RTEMS_TOO_MANY; ffc08d3c: 48 00 00 70 b ffc08dac <== ALWAYS TAKEN } the_period->owner = _Thread_Executing; ffc08d40: 3d 20 00 00 lis r9,0 ffc08d44: 81 29 27 f0 lwz r9,10224(r9) the_period->state = RATE_MONOTONIC_INACTIVE; ffc08d48: 38 00 00 00 li r0,0 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc08d4c: 90 1f 00 34 stw r0,52(r31) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); ffc08d50: 38 80 00 00 li r4,0 ffc08d54: 38 a0 00 38 li r5,56 if ( !the_period ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; ffc08d58: 91 3f 00 40 stw r9,64(r31) the_period->state = RATE_MONOTONIC_INACTIVE; _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); ffc08d5c: 38 7f 00 54 addi r3,r31,84 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; the_period->state = RATE_MONOTONIC_INACTIVE; ffc08d60: 90 1f 00 38 stw r0,56(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc08d64: 90 1f 00 18 stw r0,24(r31) the_watchdog->routine = routine; ffc08d68: 90 1f 00 2c stw r0,44(r31) the_watchdog->id = id; ffc08d6c: 90 1f 00 30 stw r0,48(r31) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); ffc08d70: 48 00 a7 79 bl ffc134e8 <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc08d74: 81 3f 00 08 lwz r9,8(r31) ffc08d78: 81 5d 00 1c lwz r10,28(r29) ffc08d7c: 3c 00 7f ff lis r0,32767 ffc08d80: 60 00 ff ff ori r0,r0,65535 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc08d84: 93 9f 00 0c stw r28,12(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc08d88: 55 2b 13 ba rlwinm r11,r9,2,14,29 ffc08d8c: 90 1f 00 78 stw r0,120(r31) ffc08d90: 90 1f 00 5c stw r0,92(r31) ffc08d94: 90 1f 00 60 stw r0,96(r31) ffc08d98: 90 1f 00 74 stw r0,116(r31) ffc08d9c: 7f ea 59 2e stwx r31,r10,r11 &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; ffc08da0: 91 3e 00 00 stw r9,0(r30) _Thread_Enable_dispatch(); ffc08da4: 48 00 36 ad bl ffc0c450 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc08da8: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; } ffc08dac: 80 01 00 1c lwz r0,28(r1) ffc08db0: 83 81 00 08 lwz r28,8(r1) ffc08db4: 7c 08 03 a6 mtlr r0 ffc08db8: 83 a1 00 0c lwz r29,12(r1) ffc08dbc: 83 c1 00 10 lwz r30,16(r1) ffc08dc0: 83 e1 00 14 lwz r31,20(r1) ffc08dc4: 38 21 00 18 addi r1,r1,24 ffc08dc8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc16a2c : */ rtems_status_code rtems_rate_monotonic_delete( rtems_id id ) { ffc16a2c: 94 21 ff d8 stwu r1,-40(r1) ffc16a30: 7c 08 02 a6 mflr r0 ffc16a34: 7c 64 1b 78 mr r4,r3 ffc16a38: 93 e1 00 24 stw r31,36(r1) RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) ffc16a3c: 3f e0 00 00 lis r31,0 ffc16a40: 3b ff 6e ac addi r31,r31,28332 ffc16a44: 7f e3 fb 78 mr r3,r31 ffc16a48: 93 a1 00 1c stw r29,28(r1) ffc16a4c: 38 a1 00 08 addi r5,r1,8 ffc16a50: 93 c1 00 20 stw r30,32(r1) ffc16a54: 90 01 00 2c stw r0,44(r1) ffc16a58: 48 00 55 f5 bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN ffc16a5c: 7c 7e 1b 78 mr r30,r3 Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc16a60: 83 a1 00 08 lwz r29,8(r1) ffc16a64: 38 60 00 04 li r3,4 ffc16a68: 2f 9d 00 00 cmpwi cr7,r29,0 ffc16a6c: 40 9e 00 30 bne- cr7,ffc16a9c case OBJECTS_LOCAL: _Objects_Close( &_Rate_monotonic_Information, &the_period->Object ); ffc16a70: 7f c4 f3 78 mr r4,r30 ffc16a74: 7f e3 fb 78 mr r3,r31 ffc16a78: 48 00 50 8d bl ffc1bb04 <_Objects_Close> <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_period->Timer ); ffc16a7c: 38 7e 00 10 addi r3,r30,16 ffc16a80: 48 00 7b f9 bl ffc1e678 <_Watchdog_Remove> <== ALWAYS TAKEN the_period->state = RATE_MONOTONIC_INACTIVE; ffc16a84: 93 be 00 38 stw r29,56(r30) */ RTEMS_INLINE_ROUTINE void _Rate_monotonic_Free ( Rate_monotonic_Control *the_period ) { _Objects_Free( &_Rate_monotonic_Information, &the_period->Object ); ffc16a88: 7f e3 fb 78 mr r3,r31 ffc16a8c: 7f c4 f3 78 mr r4,r30 ffc16a90: 48 00 53 b5 bl ffc1be44 <_Objects_Free> <== ALWAYS TAKEN _Rate_monotonic_Free( the_period ); _Thread_Enable_dispatch(); ffc16a94: 48 00 61 31 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc16a98: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc16a9c: 80 01 00 2c lwz r0,44(r1) ffc16aa0: 83 a1 00 1c lwz r29,28(r1) ffc16aa4: 7c 08 03 a6 mtlr r0 ffc16aa8: 83 c1 00 20 lwz r30,32(r1) ffc16aac: 83 e1 00 24 lwz r31,36(r1) ffc16ab0: 38 21 00 28 addi r1,r1,40 ffc16ab4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc3ffa0 : rtems_status_code rtems_rate_monotonic_get_statistics( rtems_id id, rtems_rate_monotonic_period_statistics *statistics ) { ffc3ffa0: 94 21 ff e0 stwu r1,-32(r1) ffc3ffa4: 7c 08 02 a6 mflr r0 ffc3ffa8: 93 e1 00 1c stw r31,28(r1) Objects_Locations location; Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics ) ffc3ffac: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_rate_monotonic_get_statistics( rtems_id id, rtems_rate_monotonic_period_statistics *statistics ) { ffc3ffb0: 7c 64 1b 78 mr r4,r3 ffc3ffb4: 90 01 00 24 stw r0,36(r1) Objects_Locations location; Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics ) ffc3ffb8: 38 60 00 09 li r3,9 ffc3ffbc: 41 82 00 a0 beq- ffc4005c ffc3ffc0: 3c 60 00 00 lis r3,0 ffc3ffc4: 38 63 68 c4 addi r3,r3,26820 ffc3ffc8: 38 a1 00 08 addi r5,r1,8 ffc3ffcc: 4b fc f2 bd bl ffc0f288 <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc3ffd0: 80 01 00 08 lwz r0,8(r1) ffc3ffd4: 7c 69 1b 78 mr r9,r3 ffc3ffd8: 2f 80 00 00 cmpwi cr7,r0,0 ffc3ffdc: 38 60 00 04 li r3,4 ffc3ffe0: 40 9e 00 7c bne- cr7,ffc4005c case OBJECTS_LOCAL: dst = statistics; src = &the_period->Statistics; dst->count = src->count; ffc3ffe4: 80 09 00 54 lwz r0,84(r9) ffc3ffe8: 90 1f 00 00 stw r0,0(r31) dst->missed_count = src->missed_count; ffc3ffec: 80 09 00 58 lwz r0,88(r9) ffc3fff0: 90 1f 00 04 stw r0,4(r31) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time ); ffc3fff4: 81 69 00 5c lwz r11,92(r9) ffc3fff8: 81 89 00 60 lwz r12,96(r9) ffc3fffc: 91 7f 00 08 stw r11,8(r31) ffc40000: 91 9f 00 0c stw r12,12(r31) _Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time ); ffc40004: 81 69 00 64 lwz r11,100(r9) ffc40008: 81 89 00 68 lwz r12,104(r9) ffc4000c: 91 7f 00 10 stw r11,16(r31) ffc40010: 91 9f 00 14 stw r12,20(r31) _Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time ); ffc40014: 81 69 00 6c lwz r11,108(r9) ffc40018: 81 89 00 70 lwz r12,112(r9) ffc4001c: 91 7f 00 18 stw r11,24(r31) ffc40020: 91 9f 00 1c stw r12,28(r31) _Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time ); ffc40024: 81 69 00 74 lwz r11,116(r9) ffc40028: 81 89 00 78 lwz r12,120(r9) ffc4002c: 91 7f 00 20 stw r11,32(r31) ffc40030: 91 9f 00 24 stw r12,36(r31) _Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time ); ffc40034: 81 69 00 7c lwz r11,124(r9) ffc40038: 81 89 00 80 lwz r12,128(r9) ffc4003c: 91 7f 00 28 stw r11,40(r31) ffc40040: 91 9f 00 2c stw r12,44(r31) _Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time ); ffc40044: 81 49 00 88 lwz r10,136(r9) ffc40048: 81 29 00 84 lwz r9,132(r9) ffc4004c: 91 5f 00 34 stw r10,52(r31) ffc40050: 91 3f 00 30 stw r9,48(r31) dst->min_wall_time = src->min_wall_time; dst->max_wall_time = src->max_wall_time; dst->total_wall_time = src->total_wall_time; #endif _Thread_Enable_dispatch(); ffc40054: 4b fc fe 2d bl ffc0fe80 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc40058: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc4005c: 80 01 00 24 lwz r0,36(r1) ffc40060: 83 e1 00 1c lwz r31,28(r1) ffc40064: 38 21 00 20 addi r1,r1,32 ffc40068: 7c 08 03 a6 mtlr r0 ffc4006c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc40070 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { ffc40070: 94 21 ff d0 stwu r1,-48(r1) ffc40074: 7c 08 02 a6 mflr r0 ffc40078: 93 e1 00 2c stw r31,44(r1) Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) ffc4007c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { ffc40080: 7c 64 1b 78 mr r4,r3 ffc40084: 90 01 00 34 stw r0,52(r1) Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) ffc40088: 38 00 00 09 li r0,9 ffc4008c: 41 82 00 9c beq- ffc40128 ffc40090: 3c 60 00 00 lis r3,0 ffc40094: 38 63 68 c4 addi r3,r3,26820 ffc40098: 38 a1 00 08 addi r5,r1,8 ffc4009c: 4b fc f1 ed bl ffc0f288 <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc400a0: 81 61 00 08 lwz r11,8(r1) ffc400a4: 38 00 00 04 li r0,4 ffc400a8: 2f 8b 00 00 cmpwi cr7,r11,0 ffc400ac: 40 9e 00 7c bne- cr7,ffc40128 case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; status->state = the_period->state; ffc400b0: 80 03 00 38 lwz r0,56(r3) the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; ffc400b4: 81 23 00 40 lwz r9,64(r3) status->state = the_period->state; /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { ffc400b8: 2f 80 00 00 cmpwi cr7,r0,0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; status->state = the_period->state; ffc400bc: 90 1f 00 04 stw r0,4(r31) the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; ffc400c0: 81 29 00 08 lwz r9,8(r9) ffc400c4: 91 3f 00 00 stw r9,0(r31) status->state = the_period->state; /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { ffc400c8: 40 9e 00 18 bne- cr7,ffc400e0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); _Timespec_Set_to_zero( &status->executed_since_last_period ); ffc400cc: 90 1f 00 14 stw r0,20(r31) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); ffc400d0: 90 1f 00 08 stw r0,8(r31) ffc400d4: 90 1f 00 0c stw r0,12(r31) _Timespec_Set_to_zero( &status->executed_since_last_period ); ffc400d8: 90 1f 00 10 stw r0,16(r31) ffc400dc: 48 00 00 44 b ffc40120 <== ALWAYS TAKEN /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( ffc400e0: 38 81 00 14 addi r4,r1,20 ffc400e4: 38 a1 00 0c addi r5,r1,12 ffc400e8: 48 00 00 f5 bl ffc401dc <_Rate_monotonic_Get_status> <== ALWAYS TAKEN the_period, &since_last_period, &executed ); if (!valid_status) { ffc400ec: 2f 83 00 00 cmpwi cr7,r3,0 ffc400f0: 40 9e 00 10 bne- cr7,ffc40100 _Thread_Enable_dispatch(); ffc400f4: 4b fc fd 8d bl ffc0fe80 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc400f8: 38 00 00 0b li r0,11 return RTEMS_NOT_DEFINED; ffc400fc: 48 00 00 2c b ffc40128 <== ALWAYS TAKEN } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( ffc40100: 81 21 00 14 lwz r9,20(r1) ffc40104: 81 41 00 18 lwz r10,24(r1) ffc40108: 91 3f 00 08 stw r9,8(r31) ffc4010c: 91 5f 00 0c stw r10,12(r31) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( ffc40110: 81 21 00 0c lwz r9,12(r1) ffc40114: 81 41 00 10 lwz r10,16(r1) ffc40118: 91 3f 00 10 stw r9,16(r31) ffc4011c: 91 5f 00 14 stw r10,20(r31) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); ffc40120: 4b fc fd 61 bl ffc0fe80 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc40124: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc40128: 7c 03 03 78 mr r3,r0 ffc4012c: 80 01 00 34 lwz r0,52(r1) ffc40130: 83 e1 00 2c lwz r31,44(r1) ffc40134: 38 21 00 30 addi r1,r1,48 ffc40138: 7c 08 03 a6 mtlr r0 ffc4013c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08dcc : rtems_status_code rtems_rate_monotonic_ident( rtems_name name, rtems_id *id ) { ffc08dcc: 94 21 ff f8 stwu r1,-8(r1) ffc08dd0: 7c 08 02 a6 mflr r0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc08dd4: 3c a0 7f ff lis r5,32767 rtems_status_code rtems_rate_monotonic_ident( rtems_name name, rtems_id *id ) { ffc08dd8: 90 01 00 0c stw r0,12(r1) ffc08ddc: 7c 60 1b 78 mr r0,r3 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc08de0: 3c 60 00 00 lis r3,0 rtems_status_code rtems_rate_monotonic_ident( rtems_name name, rtems_id *id ) { ffc08de4: 7c 86 23 78 mr r6,r4 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc08de8: 38 63 2b ec addi r3,r3,11244 ffc08dec: 7c 04 03 78 mr r4,r0 ffc08df0: 60 a5 ff ff ori r5,r5,65535 ffc08df4: 48 00 2d 1d bl ffc0bb10 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc08df8: 80 01 00 0c lwz r0,12(r1) ffc08dfc: 3d 20 ff c2 lis r9,-62 ffc08e00: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc08e04: 54 63 10 3a rlwinm r3,r3,2,0,29 OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc08e08: 39 29 1c f8 addi r9,r9,7416 ffc08e0c: 7c 69 18 2e lwzx r3,r9,r3 ffc08e10: 38 21 00 08 addi r1,r1,8 ffc08e14: 4e 80 00 20 blr <== ALWAYS TAKEN ffc403e4 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { ffc403e4: 94 21 ff d8 stwu r1,-40(r1) ffc403e8: 7c 08 02 a6 mflr r0 ffc403ec: 93 c1 00 20 stw r30,32(r1) ffc403f0: 7c 7e 1b 78 mr r30,r3 ffc403f4: 3c 60 00 00 lis r3,0 ffc403f8: 93 e1 00 24 stw r31,36(r1) ffc403fc: 38 63 68 c4 addi r3,r3,26820 ffc40400: 7c 9f 23 78 mr r31,r4 ffc40404: 38 a1 00 08 addi r5,r1,8 ffc40408: 90 01 00 2c stw r0,44(r1) ffc4040c: 7f c4 f3 78 mr r4,r30 ffc40410: 93 a1 00 1c stw r29,28(r1) ffc40414: 93 81 00 18 stw r28,24(r1) ffc40418: 4b fc ee 71 bl ffc0f288 <_Objects_Get> <== ALWAYS TAKEN ffc4041c: 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 ) { ffc40420: 80 01 00 08 lwz r0,8(r1) ffc40424: 2f 80 00 00 cmpwi cr7,r0,0 ffc40428: 40 9e 01 70 bne- cr7,ffc40598 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { ffc4042c: 3d 20 00 00 lis r9,0 ffc40430: 80 09 36 14 lwz r0,13844(r9) ffc40434: 81 23 00 40 lwz r9,64(r3) ffc40438: 7f 89 00 00 cmpw cr7,r9,r0 ffc4043c: 41 9e 00 10 beq- cr7,ffc4044c _Thread_Enable_dispatch(); ffc40440: 4b fc fa 41 bl ffc0fe80 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc40444: 3b c0 00 17 li r30,23 return RTEMS_NOT_OWNER_OF_RESOURCE; ffc40448: 48 00 01 54 b ffc4059c <== ALWAYS TAKEN } if ( length == RTEMS_PERIOD_STATUS ) { ffc4044c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc40450: 40 be 00 28 bne+ cr7,ffc40478 switch ( the_period->state ) { ffc40454: 80 03 00 38 lwz r0,56(r3) ffc40458: 3b c0 00 00 li r30,0 ffc4045c: 2b 80 00 04 cmplwi cr7,r0,4 ffc40460: 41 9d 01 30 bgt- cr7,ffc40590 <== NEVER TAKEN ffc40464: 3d 20 ff c7 lis r9,-57 ffc40468: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc4046c: 39 29 a1 48 addi r9,r9,-24248 ffc40470: 7f c9 00 2e lwzx r30,r9,r0 ffc40474: 48 00 01 1c b ffc40590 <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc40478: 7f 80 00 a6 mfmsr r28 ffc4047c: 7c 10 42 a6 mfsprg r0,0 ffc40480: 7f 80 00 78 andc r0,r28,r0 ffc40484: 7c 00 01 24 mtmsr r0 _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); switch ( the_period->state ) { ffc40488: 80 03 00 38 lwz r0,56(r3) ffc4048c: 2f 80 00 02 cmpwi cr7,r0,2 ffc40490: 41 9e 00 60 beq- cr7,ffc404f0 ffc40494: 2f 80 00 04 cmpwi cr7,r0,4 ffc40498: 41 9e 00 cc beq- cr7,ffc40564 ffc4049c: 2f 80 00 00 cmpwi cr7,r0,0 ffc404a0: 40 9e 00 f8 bne- cr7,ffc40598 <== NEVER TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc404a4: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); ffc404a8: 4b ff fc 99 bl ffc40140 <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN the_period->state = RATE_MONOTONIC_ACTIVE; ffc404ac: 39 20 00 02 li r9,2 ffc404b0: 91 3d 00 38 stw r9,56(r29) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc404b4: 3d 20 ff c4 lis r9,-60 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc404b8: 38 00 00 00 li r0,0 the_watchdog->routine = routine; ffc404bc: 39 29 05 c0 addi r9,r9,1472 the_watchdog->id = id; ffc404c0: 93 dd 00 30 stw r30,48(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc404c4: 3c 60 00 00 lis r3,0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc404c8: 91 3d 00 2c stw r9,44(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc404cc: 38 63 65 68 addi r3,r3,25960 ffc404d0: 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; ffc404d4: 90 1d 00 34 stw r0,52(r29) ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc404d8: 3b c0 00 00 li r30,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc404dc: 93 fd 00 1c stw r31,28(r29) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc404e0: 90 1d 00 18 stw r0,24(r29) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; ffc404e4: 93 fd 00 3c stw r31,60(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc404e8: 4b fd 0e 9d bl ffc11384 <_Watchdog_Insert> <== ALWAYS TAKEN ffc404ec: 48 00 00 a4 b ffc40590 <== ALWAYS TAKEN case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); ffc404f0: 4b ff fd d9 bl ffc402c8 <_Rate_monotonic_Update_statistics> <== ALWAYS TAKEN /* * 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; ffc404f4: 38 00 00 01 li r0,1 the_period->next_length = length; ffc404f8: 93 fd 00 3c stw r31,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; ffc404fc: 90 1d 00 38 stw r0,56(r29) ffc40500: 7f 80 01 24 mtmsr r28 the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc40504: 3d 20 00 00 lis r9,0 ffc40508: 80 1d 00 08 lwz r0,8(r29) ffc4050c: 81 29 36 14 lwz r9,13844(r9) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc40510: 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; ffc40514: 90 09 00 20 stw r0,32(r9) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc40518: 7d 23 4b 78 mr r3,r9 ffc4051c: 4b fd 03 c9 bl ffc108e4 <_Thread_Set_state> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc40520: 7d 20 00 a6 mfmsr r9 ffc40524: 7c 10 42 a6 mfsprg r0,0 ffc40528: 7d 20 00 78 andc r0,r9,r0 ffc4052c: 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; ffc40530: 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; ffc40534: 80 1d 00 38 lwz r0,56(r29) the_period->state = RATE_MONOTONIC_ACTIVE; ffc40538: 91 7d 00 38 stw r11,56(r29) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc4053c: 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 ) ffc40540: 2f 80 00 03 cmpwi cr7,r0,3 ffc40544: 40 be 00 14 bne+ cr7,ffc40558 <== ALWAYS TAKEN _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc40548: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc4054c: 80 69 36 14 lwz r3,13844(r9) <== NOT EXECUTED ffc40550: 38 80 40 00 li r4,16384 <== NOT EXECUTED ffc40554: 4b fc f4 49 bl ffc0f99c <_Thread_Clear_state> <== NOT EXECUTED _Thread_Enable_dispatch(); ffc40558: 4b fc f9 29 bl ffc0fe80 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc4055c: 3b c0 00 00 li r30,0 return RTEMS_SUCCESSFUL; ffc40560: 48 00 00 3c b ffc4059c <== ALWAYS TAKEN case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); ffc40564: 4b ff fd 65 bl ffc402c8 <_Rate_monotonic_Update_statistics> <== ALWAYS TAKEN ffc40568: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc4056c: 38 00 00 02 li r0,2 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc40570: 93 fd 00 1c stw r31,28(r29) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc40574: 3c 60 00 00 lis r3,0 ffc40578: 90 1d 00 38 stw r0,56(r29) ffc4057c: 38 63 65 68 addi r3,r3,25960 ffc40580: 38 9d 00 10 addi r4,r29,16 the_period->next_length = length; ffc40584: 93 fd 00 3c stw r31,60(r29) _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc40588: 3b c0 00 06 li r30,6 ffc4058c: 4b fd 0d f9 bl ffc11384 <_Watchdog_Insert> <== ALWAYS TAKEN ffc40590: 4b fc f8 f1 bl ffc0fe80 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return RTEMS_TIMEOUT; ffc40594: 48 00 00 08 b ffc4059c <== ALWAYS TAKEN ffc40598: 3b c0 00 04 li r30,4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc4059c: 80 01 00 2c lwz r0,44(r1) ffc405a0: 7f c3 f3 78 mr r3,r30 ffc405a4: 83 81 00 18 lwz r28,24(r1) ffc405a8: 7c 08 03 a6 mtlr r0 ffc405ac: 83 a1 00 1c lwz r29,28(r1) ffc405b0: 83 c1 00 20 lwz r30,32(r1) ffc405b4: 83 e1 00 24 lwz r31,36(r1) ffc405b8: 38 21 00 28 addi r1,r1,40 ffc405bc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc2d880 : void rtems_rate_monotonic_report_statistics( void ) { rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); ffc2d880: 3c 80 ff c1 lis r4,-63 ffc2d884: 38 84 99 ac addi r4,r4,-26196 ffc2d888: 38 60 00 00 li r3,0 ffc2d88c: 4b ff fd 5c b ffc2d5e8 <== ALWAYS TAKEN ffc2d5e8 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc2d5e8: 94 21 ff 58 stwu r1,-168(r1) ffc2d5ec: 7c 08 02 a6 mflr r0 ffc2d5f0: 90 01 00 ac stw r0,172(r1) rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) ffc2d5f4: 7c 80 23 79 mr. r0,r4 */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc2d5f8: 93 e1 00 a4 stw r31,164(r1) ffc2d5fc: 7c 7f 1b 78 mr r31,r3 ffc2d600: 92 41 00 70 stw r18,112(r1) ffc2d604: 92 61 00 74 stw r19,116(r1) ffc2d608: 92 81 00 78 stw r20,120(r1) ffc2d60c: 92 a1 00 7c stw r21,124(r1) ffc2d610: 92 c1 00 80 stw r22,128(r1) ffc2d614: 92 e1 00 84 stw r23,132(r1) ffc2d618: 93 01 00 88 stw r24,136(r1) ffc2d61c: 93 21 00 8c stw r25,140(r1) ffc2d620: 93 41 00 90 stw r26,144(r1) ffc2d624: 93 61 00 94 stw r27,148(r1) ffc2d628: 93 81 00 98 stw r28,152(r1) ffc2d62c: 93 a1 00 9c stw r29,156(r1) ffc2d630: 93 c1 00 a0 stw r30,160(r1) rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) ffc2d634: 90 01 00 68 stw r0,104(r1) ffc2d638: 41 82 02 00 beq- ffc2d838 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); ffc2d63c: 3c 80 ff c6 lis r4,-58 ffc2d640: 7c 09 03 a6 mtctr r0 ffc2d644: 38 84 6c 04 addi r4,r4,27652 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc2d648: 3f 00 ff c6 lis r24,-58 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, ffc2d64c: 3f 20 ff c6 lis r25,-58 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, ffc2d650: 3f 40 ff c6 lis r26,-58 char name[5]; if ( !print ) return; (*print)( context, "Period information by period\n" ); ffc2d654: 4c c6 31 82 crclr 4*cr1+eq ffc2d658: 4e 80 04 21 bctrl <== ALWAYS TAKEN #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); ffc2d65c: 80 01 00 68 lwz r0,104(r1) ffc2d660: 3c 80 ff c6 lis r4,-58 ffc2d664: 7c 09 03 a6 mtctr r0 ffc2d668: 38 84 6c 22 addi r4,r4,27682 ffc2d66c: 7f e3 fb 78 mr r3,r31 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc2d670: 3e 40 ff c7 lis r18,-57 * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); ffc2d674: 3a 61 00 30 addi r19,r1,48 if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); ffc2d678: 3a 81 00 18 addi r20,r1,24 if ( !print ) return; (*print)( context, "Period information by period\n" ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); ffc2d67c: 4c c6 31 82 crclr 4*cr1+eq ffc2d680: 4e 80 04 21 bctrl <== ALWAYS TAKEN (*print)( context, "--- Wall times are in seconds ---\n" ); ffc2d684: 80 01 00 68 lwz r0,104(r1) ffc2d688: 3c 80 ff c6 lis r4,-58 ffc2d68c: 7c 09 03 a6 mtctr r0 ffc2d690: 38 84 6c 44 addi r4,r4,27716 ffc2d694: 7f e3 fb 78 mr r3,r31 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc2d698: 3b 61 00 08 addi r27,r1,8 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc2d69c: 3a a1 00 48 addi r21,r1,72 ffc2d6a0: 3b 81 00 10 addi r28,r1,16 return; (*print)( context, "Period information by period\n" ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); (*print)( context, "--- Wall times are in seconds ---\n" ); ffc2d6a4: 4c c6 31 82 crclr 4*cr1+eq ffc2d6a8: 4e 80 04 21 bctrl <== ALWAYS TAKEN Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " ffc2d6ac: 80 01 00 68 lwz r0,104(r1) ffc2d6b0: 3c 80 ff c6 lis r4,-58 ffc2d6b4: 7c 09 03 a6 mtctr r0 ffc2d6b8: 38 84 6c 67 addi r4,r4,27751 ffc2d6bc: 7f e3 fb 78 mr r3,r31 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, ffc2d6c0: 3b a0 03 e8 li r29,1000 struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); ffc2d6c4: 3a c1 00 60 addi r22,r1,96 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc2d6c8: 3b 18 6c fe addi r24,r24,27902 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " ffc2d6cc: 4c c6 31 82 crclr 4*cr1+eq ffc2d6d0: 4e 80 04 21 bctrl <== ALWAYS TAKEN #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " ffc2d6d4: 80 01 00 68 lwz r0,104(r1) ffc2d6d8: 3c 80 ff c6 lis r4,-58 ffc2d6dc: 38 84 6c b2 addi r4,r4,27826 ffc2d6e0: 7c 09 03 a6 mtctr r0 ffc2d6e4: 7f e3 fb 78 mr r3,r31 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, ffc2d6e8: 3b 39 6d 15 addi r25,r25,27925 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, ffc2d6ec: 3b 5a 6d 34 addi r26,r26,27956 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc2d6f0: 3a 52 88 ba addi r18,r18,-30534 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " ffc2d6f4: 4c c6 31 82 crclr 4*cr1+eq ffc2d6f8: 4e 80 04 21 bctrl <== ALWAYS TAKEN /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc2d6fc: 3d 20 00 00 lis r9,0 ffc2d700: 39 29 68 c4 addi r9,r9,26820 ffc2d704: 7d 37 4b 78 mr r23,r9 ffc2d708: 83 c9 00 08 lwz r30,8(r9) ffc2d70c: 48 00 01 18 b ffc2d824 <== ALWAYS TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); ffc2d710: 48 01 28 91 bl ffc3ffa0 <== ALWAYS TAKEN if ( status != RTEMS_SUCCESSFUL ) ffc2d714: 2f 83 00 00 cmpwi cr7,r3,0 ffc2d718: 40 be 01 08 bne+ cr7,ffc2d820 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); ffc2d71c: 7e 84 a3 78 mr r4,r20 ffc2d720: 7f c3 f3 78 mr r3,r30 ffc2d724: 48 01 29 4d bl ffc40070 <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc2d728: 80 61 00 18 lwz r3,24(r1) ffc2d72c: 7f 65 db 78 mr r5,r27 ffc2d730: 38 80 00 05 li r4,5 ffc2d734: 4b fd f9 b5 bl ffc0d0e8 <== ALWAYS TAKEN /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc2d738: 80 01 00 68 lwz r0,104(r1) ffc2d73c: 7f 04 c3 78 mr r4,r24 ffc2d740: 80 e1 00 30 lwz r7,48(r1) ffc2d744: 7f c5 f3 78 mr r5,r30 ffc2d748: 7c 09 03 a6 mtctr r0 ffc2d74c: 7f e3 fb 78 mr r3,r31 ffc2d750: 81 01 00 34 lwz r8,52(r1) ffc2d754: 7f 66 db 78 mr r6,r27 ffc2d758: 4c c6 31 82 crclr 4*cr1+eq ffc2d75c: 4e 80 04 21 bctrl <== ALWAYS TAKEN ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc2d760: 80 01 00 30 lwz r0,48(r1) struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc2d764: 7e a3 ab 78 mr r3,r21 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc2d768: 2f 80 00 00 cmpwi cr7,r0,0 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc2d76c: 7f 85 e3 78 mr r5,r28 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc2d770: 7e 44 93 78 mr r4,r18 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc2d774: 40 9e 00 1c bne- cr7,ffc2d790 (*print)( context, "\n" ); ffc2d778: 80 01 00 68 lwz r0,104(r1) ffc2d77c: 7f e3 fb 78 mr r3,r31 ffc2d780: 7c 09 03 a6 mtctr r0 ffc2d784: 4c c6 31 82 crclr 4*cr1+eq ffc2d788: 4e 80 04 21 bctrl <== ALWAYS TAKEN continue; ffc2d78c: 48 00 00 94 b ffc2d820 <== ALWAYS TAKEN struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc2d790: 7c 04 03 78 mr r4,r0 ffc2d794: 48 00 1a ad bl ffc2f240 <_Timespec_Divide_by_integer> <== ALWAYS TAKEN (*print)( context, ffc2d798: 80 01 00 68 lwz r0,104(r1) ffc2d79c: 80 c1 00 3c lwz r6,60(r1) ffc2d7a0: 7f 24 cb 78 mr r4,r25 ffc2d7a4: 81 01 00 44 lwz r8,68(r1) ffc2d7a8: 7c 09 03 a6 mtctr r0 ffc2d7ac: 81 41 00 14 lwz r10,20(r1) ffc2d7b0: 7c c6 eb d6 divw r6,r6,r29 ffc2d7b4: 80 e1 00 40 lwz r7,64(r1) ffc2d7b8: 81 21 00 10 lwz r9,16(r1) ffc2d7bc: 80 a1 00 38 lwz r5,56(r1) ffc2d7c0: 7d 08 eb d6 divw r8,r8,r29 ffc2d7c4: 7d 4a eb d6 divw r10,r10,r29 ffc2d7c8: 7f e3 fb 78 mr r3,r31 ffc2d7cc: 4c c6 31 82 crclr 4*cr1+eq ffc2d7d0: 4e 80 04 21 bctrl <== ALWAYS TAKEN struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); ffc2d7d4: 80 81 00 30 lwz r4,48(r1) ffc2d7d8: 7e c3 b3 78 mr r3,r22 ffc2d7dc: 7f 85 e3 78 mr r5,r28 ffc2d7e0: 48 00 1a 61 bl ffc2f240 <_Timespec_Divide_by_integer> <== ALWAYS TAKEN (*print)( context, ffc2d7e4: 80 c1 00 54 lwz r6,84(r1) ffc2d7e8: 81 01 00 5c lwz r8,92(r1) ffc2d7ec: 7f e3 fb 78 mr r3,r31 ffc2d7f0: 81 41 00 14 lwz r10,20(r1) ffc2d7f4: 7c c6 eb d6 divw r6,r6,r29 ffc2d7f8: 80 01 00 68 lwz r0,104(r1) ffc2d7fc: 80 a1 00 50 lwz r5,80(r1) ffc2d800: 80 e1 00 58 lwz r7,88(r1) ffc2d804: 7c 09 03 a6 mtctr r0 ffc2d808: 81 21 00 10 lwz r9,16(r1) ffc2d80c: 7d 08 eb d6 divw r8,r8,r29 ffc2d810: 7d 4a eb d6 divw r10,r10,r29 ffc2d814: 7f 44 d3 78 mr r4,r26 ffc2d818: 4c c6 31 82 crclr 4*cr1+eq ffc2d81c: 4e 80 04 21 bctrl <== ALWAYS TAKEN * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc2d820: 3b de 00 01 addi r30,r30,1 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc2d824: 80 17 00 0c lwz r0,12(r23) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); ffc2d828: 7f c3 f3 78 mr r3,r30 ffc2d82c: 7e 64 9b 78 mr r4,r19 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc2d830: 7f 9e 00 40 cmplw cr7,r30,r0 ffc2d834: 40 9d fe dc ble+ cr7,ffc2d710 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } ffc2d838: 80 01 00 ac lwz r0,172(r1) ffc2d83c: 82 41 00 70 lwz r18,112(r1) ffc2d840: 7c 08 03 a6 mtlr r0 ffc2d844: 82 61 00 74 lwz r19,116(r1) ffc2d848: 82 81 00 78 lwz r20,120(r1) ffc2d84c: 82 a1 00 7c lwz r21,124(r1) ffc2d850: 82 c1 00 80 lwz r22,128(r1) ffc2d854: 82 e1 00 84 lwz r23,132(r1) ffc2d858: 83 01 00 88 lwz r24,136(r1) ffc2d85c: 83 21 00 8c lwz r25,140(r1) ffc2d860: 83 41 00 90 lwz r26,144(r1) ffc2d864: 83 61 00 94 lwz r27,148(r1) ffc2d868: 83 81 00 98 lwz r28,152(r1) ffc2d86c: 83 a1 00 9c lwz r29,156(r1) ffc2d870: 83 c1 00 a0 lwz r30,160(r1) ffc2d874: 83 e1 00 a4 lwz r31,164(r1) ffc2d878: 38 21 00 a8 addi r1,r1,168 ffc2d87c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc2d890 : ffc2d890: 3d 20 00 00 lis r9,0 /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { ffc2d894: 94 21 ff f0 stwu r1,-16(r1) ffc2d898: 7c 08 02 a6 mflr r0 ffc2d89c: 81 69 35 d4 lwz r11,13780(r9) ffc2d8a0: 90 01 00 14 stw r0,20(r1) ffc2d8a4: 38 0b 00 01 addi r0,r11,1 ffc2d8a8: 93 c1 00 08 stw r30,8(r1) ffc2d8ac: 93 e1 00 0c stw r31,12(r1) ffc2d8b0: 90 09 35 d4 stw r0,13780(r9) /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc2d8b4: 3d 20 00 00 lis r9,0 ffc2d8b8: 39 29 68 c4 addi r9,r9,26820 ffc2d8bc: 7d 3e 4b 78 mr r30,r9 ffc2d8c0: 83 e9 00 08 lwz r31,8(r9) ffc2d8c4: 48 00 00 08 b ffc2d8cc <== ALWAYS TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); ffc2d8c8: 48 00 00 35 bl ffc2d8fc <== ALWAYS TAKEN /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc2d8cc: 80 1e 00 0c lwz r0,12(r30) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); ffc2d8d0: 7f e3 fb 78 mr r3,r31 /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc2d8d4: 7f 9f 00 40 cmplw cr7,r31,r0 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc2d8d8: 3b ff 00 01 addi r31,r31,1 /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc2d8dc: 40 9d ff ec ble+ cr7,ffc2d8c8 } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); ffc2d8e0: 4b fe 25 a1 bl ffc0fe80 <_Thread_Enable_dispatch> <== ALWAYS TAKEN } ffc2d8e4: 80 01 00 14 lwz r0,20(r1) ffc2d8e8: 83 c1 00 08 lwz r30,8(r1) ffc2d8ec: 7c 08 03 a6 mtlr r0 ffc2d8f0: 83 e1 00 0c lwz r31,12(r1) ffc2d8f4: 38 21 00 10 addi r1,r1,16 ffc2d8f8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc2d8fc : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { ffc2d8fc: 94 21 ff e0 stwu r1,-32(r1) ffc2d900: 7c 08 02 a6 mflr r0 ffc2d904: 7c 64 1b 78 mr r4,r3 RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) ffc2d908: 3c 60 00 00 lis r3,0 ffc2d90c: 90 01 00 24 stw r0,36(r1) ffc2d910: 38 63 68 c4 addi r3,r3,26820 ffc2d914: 38 a1 00 08 addi r5,r1,8 ffc2d918: 93 e1 00 1c stw r31,28(r1) ffc2d91c: 4b fe 19 6d bl ffc0f288 <_Objects_Get> <== ALWAYS TAKEN Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc2d920: 80 01 00 08 lwz r0,8(r1) ffc2d924: 7c 7f 1b 78 mr r31,r3 ffc2d928: 38 60 00 04 li r3,4 ffc2d92c: 2f 80 00 00 cmpwi cr7,r0,0 ffc2d930: 40 9e 00 34 bne- cr7,ffc2d964 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); ffc2d934: 38 80 00 00 li r4,0 ffc2d938: 38 a0 00 38 li r5,56 ffc2d93c: 38 7f 00 54 addi r3,r31,84 ffc2d940: 48 01 c1 7d bl ffc49abc <== ALWAYS TAKEN ffc2d944: 3c 00 7f ff lis r0,32767 ffc2d948: 60 00 ff ff ori r0,r0,65535 ffc2d94c: 90 1f 00 78 stw r0,120(r31) ffc2d950: 90 1f 00 5c stw r0,92(r31) ffc2d954: 90 1f 00 60 stw r0,96(r31) ffc2d958: 90 1f 00 74 stw r0,116(r31) _Thread_Enable_dispatch(); ffc2d95c: 4b fe 25 25 bl ffc0fe80 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc2d960: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc2d964: 80 01 00 24 lwz r0,36(r1) ffc2d968: 83 e1 00 1c lwz r31,28(r1) ffc2d96c: 38 21 00 20 addi r1,r1,32 ffc2d970: 7c 08 03 a6 mtlr r0 ffc2d974: 4e 80 00 20 blr <== ALWAYS TAKEN ffc171ec : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { ffc171ec: 94 21 ff d0 stwu r1,-48(r1) ffc171f0: 7c 08 02 a6 mflr r0 ffc171f4: 93 81 00 20 stw r28,32(r1) rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) ffc171f8: 7c 7c 1b 79 mr. r28,r3 uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { ffc171fc: 92 e1 00 0c stw r23,12(r1) ffc17200: 7d 17 43 78 mr r23,r8 ffc17204: 93 21 00 14 stw r25,20(r1) rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) ffc17208: 3b 20 00 03 li r25,3 uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { ffc1720c: 93 61 00 1c stw r27,28(r1) ffc17210: 7c fb 3b 78 mr r27,r7 ffc17214: 93 a1 00 24 stw r29,36(r1) ffc17218: 7c bd 2b 78 mr r29,r5 ffc1721c: 93 c1 00 28 stw r30,40(r1) ffc17220: 7c de 33 78 mr r30,r6 ffc17224: 93 e1 00 2c stw r31,44(r1) ffc17228: 7c 9f 23 78 mr r31,r4 ffc1722c: 90 01 00 34 stw r0,52(r1) ffc17230: 92 c1 00 08 stw r22,8(r1) ffc17234: 93 01 00 10 stw r24,16(r1) ffc17238: 93 41 00 18 stw r26,24(r1) rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) ffc1723c: 41 82 00 d0 beq- ffc1730c return RTEMS_INVALID_NAME; if ( !starting_address ) ffc17240: 2f 84 00 00 cmpwi cr7,r4,0 ffc17244: 41 9e 00 c4 beq- cr7,ffc17308 return RTEMS_INVALID_ADDRESS; if ( !id ) ffc17248: 2f 88 00 00 cmpwi cr7,r8,0 ffc1724c: 41 9e 00 bc beq- cr7,ffc17308 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) ffc17250: 70 96 00 07 andi. r22,r4,7 ffc17254: 40 a2 00 b4 bne+ ffc17308 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ ffc17258: 3d 20 00 00 lis r9,0 ffc1725c: 80 69 28 5c lwz r3,10332(r9) * This function allocates a region control block from * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); ffc17260: 3f 00 00 00 lis r24,0 ffc17264: 3b 18 6e ec addi r24,r24,28396 ffc17268: 48 00 2f 15 bl ffc1a17c <_API_Mutex_Lock> <== ALWAYS TAKEN ffc1726c: 7f 03 c3 78 mr r3,r24 ffc17270: 48 00 47 e9 bl ffc1ba58 <_Objects_Allocate> <== ALWAYS TAKEN the_region = _Region_Allocate(); if ( !the_region ) ffc17274: 3b 20 00 05 li r25,5 ffc17278: 7c 7a 1b 79 mr. r26,r3 ffc1727c: 41 82 00 7c beq- ffc172f8 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( ffc17280: 38 7a 00 68 addi r3,r26,104 ffc17284: 7f e4 fb 78 mr r4,r31 ffc17288: 7f a5 eb 78 mr r5,r29 ffc1728c: 7f c6 f3 78 mr r6,r30 ffc17290: 48 00 41 b9 bl ffc1b448 <_Heap_Initialize> <== ALWAYS TAKEN &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { ffc17294: 2f 83 00 00 cmpwi cr7,r3,0 if ( !the_region ) return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( ffc17298: 90 7a 00 5c stw r3,92(r26) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { ffc1729c: 40 9e 00 18 bne- cr7,ffc172b4 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); ffc172a0: 7f 03 c3 78 mr r3,r24 ffc172a4: 7f 44 d3 78 mr r4,r26 ffc172a8: 48 00 4b 9d bl ffc1be44 <_Objects_Free> <== ALWAYS TAKEN ffc172ac: 3b 20 00 08 li r25,8 ffc172b0: 48 00 00 48 b ffc172f8 <== ALWAYS TAKEN return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; ffc172b4: 93 fa 00 50 stw r31,80(r26) the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( ffc172b8: 57 64 f7 fe rlwinm r4,r27,30,31,31 ffc172bc: 38 7a 00 10 addi r3,r26,16 } else { the_region->starting_address = starting_address; the_region->length = length; ffc172c0: 93 ba 00 54 stw r29,84(r26) the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( ffc172c4: 38 a0 00 40 li r5,64 ffc172c8: 38 c0 00 06 li r6,6 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; ffc172cc: 93 da 00 58 stw r30,88(r26) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; ffc172d0: 3b 20 00 00 li r25,0 the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; ffc172d4: 92 da 00 64 stw r22,100(r26) else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; ffc172d8: 93 7a 00 60 stw r27,96(r26) the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( ffc172dc: 48 00 62 15 bl ffc1d4f0 <_Thread_queue_Initialize> <== ALWAYS TAKEN ffc172e0: 80 1a 00 08 lwz r0,8(r26) ffc172e4: 81 78 00 1c lwz r11,28(r24) ffc172e8: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc172ec: 93 9a 00 0c stw r28,12(r26) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc172f0: 7f 4b 49 2e stwx r26,r11,r9 &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; ffc172f4: 90 17 00 00 stw r0,0(r23) return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); ffc172f8: 3d 20 00 00 lis r9,0 ffc172fc: 80 69 28 5c lwz r3,10332(r9) ffc17300: 48 00 2e fd bl ffc1a1fc <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; ffc17304: 48 00 00 08 b ffc1730c <== ALWAYS TAKEN ffc17308: 3b 20 00 09 li r25,9 } ffc1730c: 80 01 00 34 lwz r0,52(r1) ffc17310: 7f 23 cb 78 mr r3,r25 ffc17314: 82 c1 00 08 lwz r22,8(r1) ffc17318: 7c 08 03 a6 mtlr r0 ffc1731c: 82 e1 00 0c lwz r23,12(r1) ffc17320: 83 01 00 10 lwz r24,16(r1) ffc17324: 83 21 00 14 lwz r25,20(r1) ffc17328: 83 41 00 18 lwz r26,24(r1) ffc1732c: 83 61 00 1c lwz r27,28(r1) ffc17330: 83 81 00 20 lwz r28,32(r1) ffc17334: 83 a1 00 24 lwz r29,36(r1) ffc17338: 83 c1 00 28 lwz r30,40(r1) ffc1733c: 83 e1 00 2c lwz r31,44(r1) ffc17340: 38 21 00 30 addi r1,r1,48 ffc17344: 4e 80 00 20 blr <== ALWAYS TAKEN ffc17348 : */ rtems_status_code rtems_region_delete( rtems_id id ) { ffc17348: 94 21 ff d8 stwu r1,-40(r1) Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); ffc1734c: 3d 20 00 00 lis r9,0 */ rtems_status_code rtems_region_delete( rtems_id id ) { ffc17350: 7c 08 02 a6 mflr r0 ffc17354: 93 a1 00 1c stw r29,28(r1) ffc17358: 7c 7d 1b 78 mr r29,r3 ffc1735c: 93 c1 00 20 stw r30,32(r1) RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) ffc17360: 3f c0 00 00 lis r30,0 ffc17364: 3b de 6e ec addi r30,r30,28396 Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); ffc17368: 80 69 28 5c lwz r3,10332(r9) */ rtems_status_code rtems_region_delete( rtems_id id ) { ffc1736c: 90 01 00 2c stw r0,44(r1) ffc17370: 93 e1 00 24 stw r31,36(r1) Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); ffc17374: 48 00 2e 09 bl ffc1a17c <_API_Mutex_Lock> <== ALWAYS TAKEN ffc17378: 7f a4 eb 78 mr r4,r29 ffc1737c: 7f c3 f3 78 mr r3,r30 ffc17380: 38 a1 00 08 addi r5,r1,8 ffc17384: 48 00 4c 81 bl ffc1c004 <_Objects_Get_no_protection> <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { ffc17388: 80 01 00 08 lwz r0,8(r1) ffc1738c: 3b e0 00 04 li r31,4 ffc17390: 2f 80 00 00 cmpwi cr7,r0,0 ffc17394: 7c 7d 1b 78 mr r29,r3 ffc17398: 40 9e 00 30 bne- cr7,ffc173c8 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) ffc1739c: 80 03 00 64 lwz r0,100(r3) ffc173a0: 3b e0 00 0c li r31,12 ffc173a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc173a8: 40 be 00 20 bne+ cr7,ffc173c8 return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); ffc173ac: 7f c3 f3 78 mr r3,r30 ffc173b0: 7f a4 eb 78 mr r4,r29 ffc173b4: 48 00 47 51 bl ffc1bb04 <_Objects_Close> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); ffc173b8: 7f c3 f3 78 mr r3,r30 ffc173bc: 7f a4 eb 78 mr r4,r29 ffc173c0: 48 00 4a 85 bl ffc1be44 <_Objects_Free> <== ALWAYS TAKEN ffc173c4: 3b e0 00 00 li r31,0 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc173c8: 3d 20 00 00 lis r9,0 ffc173cc: 80 69 28 5c lwz r3,10332(r9) ffc173d0: 48 00 2e 2d bl ffc1a1fc <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } ffc173d4: 80 01 00 2c lwz r0,44(r1) ffc173d8: 7f e3 fb 78 mr r3,r31 ffc173dc: 83 a1 00 1c lwz r29,28(r1) ffc173e0: 7c 08 03 a6 mtlr r0 ffc173e4: 83 c1 00 20 lwz r30,32(r1) ffc173e8: 83 e1 00 24 lwz r31,36(r1) ffc173ec: 38 21 00 28 addi r1,r1,40 ffc173f0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc173f4 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { ffc173f4: 94 21 ff d8 stwu r1,-40(r1) ffc173f8: 7c 08 02 a6 mflr r0 ffc173fc: 93 81 00 18 stw r28,24(r1) Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) ffc17400: 7c 9c 23 79 mr. r28,r4 rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { ffc17404: 93 a1 00 1c stw r29,28(r1) ffc17408: 7c bd 2b 78 mr r29,r5 ffc1740c: 93 c1 00 20 stw r30,32(r1) Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) ffc17410: 3b c0 00 09 li r30,9 rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { ffc17414: 93 e1 00 24 stw r31,36(r1) ffc17418: 7c 7f 1b 78 mr r31,r3 ffc1741c: 90 01 00 2c stw r0,44(r1) Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) ffc17420: 41 82 00 98 beq- ffc174b8 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ ffc17424: 3d 20 00 00 lis r9,0 ffc17428: 80 69 28 5c lwz r3,10332(r9) the_region = _Region_Get( id, &location ); switch ( location ) { ffc1742c: 3b c0 00 04 li r30,4 Region_Control *the_region; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ ffc17430: 48 00 2d 4d bl ffc1a17c <_API_Mutex_Lock> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) ffc17434: 3c 60 00 00 lis r3,0 ffc17438: 7f e4 fb 78 mr r4,r31 ffc1743c: 38 63 6e ec addi r3,r3,28396 ffc17440: 38 a1 00 0c addi r5,r1,12 ffc17444: 48 00 4b c1 bl ffc1c004 <_Objects_Get_no_protection> <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { ffc17448: 80 01 00 0c lwz r0,12(r1) ffc1744c: 7c 7f 1b 78 mr r31,r3 ffc17450: 2f 80 00 00 cmpwi cr7,r0,0 ffc17454: 40 9e 00 58 bne- cr7,ffc174ac case OBJECTS_LOCAL: heap_status = _Heap_Extend( ffc17458: 7f 84 e3 78 mr r4,r28 ffc1745c: 7f a5 eb 78 mr r5,r29 ffc17460: 38 63 00 68 addi r3,r3,104 ffc17464: 38 c1 00 08 addi r6,r1,8 ffc17468: 48 00 3c 3d bl ffc1b0a4 <_Heap_Extend> <== ALWAYS TAKEN starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { ffc1746c: 7c 7e 1b 79 mr. r30,r3 ffc17470: 40 82 00 28 bne- ffc17498 the_region->length += amount_extended; ffc17474: 80 01 00 08 lwz r0,8(r1) the_region->maximum_segment_size += amount_extended; ffc17478: 3b c0 00 00 li r30,0 length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; ffc1747c: 81 3f 00 54 lwz r9,84(r31) the_region->maximum_segment_size += amount_extended; ffc17480: 81 7f 00 5c lwz r11,92(r31) length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; ffc17484: 7d 29 02 14 add r9,r9,r0 the_region->maximum_segment_size += amount_extended; ffc17488: 7c 0b 02 14 add r0,r11,r0 length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; ffc1748c: 91 3f 00 54 stw r9,84(r31) the_region->maximum_segment_size += amount_extended; ffc17490: 90 1f 00 5c stw r0,92(r31) ffc17494: 48 00 00 18 b ffc174ac <== ALWAYS TAKEN return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { ffc17498: 6b de 00 01 xori r30,r30,1 ffc1749c: 33 de ff ff addic r30,r30,-1 ffc174a0: 7f de f1 10 subfe r30,r30,r30 ffc174a4: 57 de 07 f6 rlwinm r30,r30,0,31,27 ffc174a8: 3b de 00 18 addi r30,r30,24 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc174ac: 3d 20 00 00 lis r9,0 ffc174b0: 80 69 28 5c lwz r3,10332(r9) ffc174b4: 48 00 2d 49 bl ffc1a1fc <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } ffc174b8: 80 01 00 2c lwz r0,44(r1) ffc174bc: 7f c3 f3 78 mr r3,r30 ffc174c0: 83 81 00 18 lwz r28,24(r1) ffc174c4: 7c 08 03 a6 mtlr r0 ffc174c8: 83 a1 00 1c lwz r29,28(r1) ffc174cc: 83 c1 00 20 lwz r30,32(r1) ffc174d0: 83 e1 00 24 lwz r31,36(r1) ffc174d4: 38 21 00 28 addi r1,r1,40 ffc174d8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc174dc : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { ffc174dc: 94 21 ff d8 stwu r1,-40(r1) ffc174e0: 7c 08 02 a6 mflr r0 ffc174e4: 93 e1 00 24 stw r31,36(r1) Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) ffc174e8: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { ffc174ec: 93 a1 00 1c stw r29,28(r1) ffc174f0: 7c 7d 1b 78 mr r29,r3 ffc174f4: 93 c1 00 20 stw r30,32(r1) Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) ffc174f8: 3b c0 00 09 li r30,9 rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { ffc174fc: 90 01 00 2c stw r0,44(r1) Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) ffc17500: 41 82 00 5c beq- ffc1755c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); ffc17504: 3d 20 00 00 lis r9,0 ffc17508: 80 69 28 5c lwz r3,10332(r9) the_region = _Region_Get( id, &location ); switch ( location ) { ffc1750c: 3b c0 00 04 li r30,4 register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); ffc17510: 48 00 2c 6d bl ffc1a17c <_API_Mutex_Lock> <== ALWAYS TAKEN ffc17514: 3c 60 00 00 lis r3,0 ffc17518: 38 63 6e ec addi r3,r3,28396 ffc1751c: 7f a4 eb 78 mr r4,r29 ffc17520: 38 a1 00 08 addi r5,r1,8 ffc17524: 48 00 4a e1 bl ffc1c004 <_Objects_Get_no_protection> <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { ffc17528: 80 01 00 08 lwz r0,8(r1) ffc1752c: 2f 80 00 00 cmpwi cr7,r0,0 ffc17530: 40 9e 00 20 bne- cr7,ffc17550 case OBJECTS_LOCAL: the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; ffc17534: 90 1f 00 10 stw r0,16(r31) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); ffc17538: 38 63 00 68 addi r3,r3,104 ffc1753c: 7f e4 fb 78 mr r4,r31 the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; ffc17540: 90 1f 00 0c stw r0,12(r31) the_info->Used.total = 0; the_info->Used.largest = 0; _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); ffc17544: 3b c0 00 00 li r30,0 switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; the_info->Used.total = 0; ffc17548: 90 1f 00 14 stw r0,20(r31) the_info->Used.largest = 0; _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); ffc1754c: 48 00 3e 19 bl ffc1b364 <_Heap_Get_free_information> <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc17550: 3d 20 00 00 lis r9,0 ffc17554: 80 69 28 5c lwz r3,10332(r9) ffc17558: 48 00 2c a5 bl ffc1a1fc <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } ffc1755c: 80 01 00 2c lwz r0,44(r1) ffc17560: 7f c3 f3 78 mr r3,r30 ffc17564: 83 a1 00 1c lwz r29,28(r1) ffc17568: 7c 08 03 a6 mtlr r0 ffc1756c: 83 c1 00 20 lwz r30,32(r1) ffc17570: 83 e1 00 24 lwz r31,36(r1) ffc17574: 38 21 00 28 addi r1,r1,40 ffc17578: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1757c : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { ffc1757c: 94 21 ff d8 stwu r1,-40(r1) ffc17580: 7c 08 02 a6 mflr r0 ffc17584: 93 c1 00 20 stw r30,32(r1) Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) ffc17588: 7c 9e 23 79 mr. r30,r4 rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { ffc1758c: 93 a1 00 1c stw r29,28(r1) ffc17590: 7c 7d 1b 78 mr r29,r3 ffc17594: 93 e1 00 24 stw r31,36(r1) Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) ffc17598: 3b e0 00 09 li r31,9 rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { ffc1759c: 90 01 00 2c stw r0,44(r1) Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) ffc175a0: 41 82 00 50 beq- ffc175f0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); ffc175a4: 3d 20 00 00 lis r9,0 ffc175a8: 80 69 28 5c lwz r3,10332(r9) the_region = _Region_Get( id, &location ); switch ( location ) { ffc175ac: 3b e0 00 04 li r31,4 register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); ffc175b0: 48 00 2b cd bl ffc1a17c <_API_Mutex_Lock> <== ALWAYS TAKEN ffc175b4: 3c 60 00 00 lis r3,0 ffc175b8: 38 63 6e ec addi r3,r3,28396 ffc175bc: 7f a4 eb 78 mr r4,r29 ffc175c0: 38 a1 00 08 addi r5,r1,8 ffc175c4: 48 00 4a 41 bl ffc1c004 <_Objects_Get_no_protection> <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { ffc175c8: 80 01 00 08 lwz r0,8(r1) ffc175cc: 2f 80 00 00 cmpwi cr7,r0,0 ffc175d0: 40 9e 00 14 bne- cr7,ffc175e4 case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); ffc175d4: 38 63 00 68 addi r3,r3,104 ffc175d8: 7f c4 f3 78 mr r4,r30 ffc175dc: 48 00 3d e1 bl ffc1b3bc <_Heap_Get_information> <== ALWAYS TAKEN ffc175e0: 3b e0 00 00 li r31,0 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc175e4: 3d 20 00 00 lis r9,0 ffc175e8: 80 69 28 5c lwz r3,10332(r9) ffc175ec: 48 00 2c 11 bl ffc1a1fc <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } ffc175f0: 80 01 00 2c lwz r0,44(r1) ffc175f4: 7f e3 fb 78 mr r3,r31 ffc175f8: 83 a1 00 1c lwz r29,28(r1) ffc175fc: 7c 08 03 a6 mtlr r0 ffc17600: 83 c1 00 20 lwz r30,32(r1) ffc17604: 83 e1 00 24 lwz r31,36(r1) ffc17608: 38 21 00 28 addi r1,r1,40 ffc1760c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc17610 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { ffc17610: 94 21 ff c0 stwu r1,-64(r1) ffc17614: 7c 08 02 a6 mflr r0 ffc17618: 93 81 00 30 stw r28,48(r1) Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) ffc1761c: 7c fc 3b 79 mr. r28,r7 uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { ffc17620: 92 e1 00 1c stw r23,28(r1) Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) ffc17624: 3a e0 00 09 li r23,9 uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { ffc17628: 93 01 00 20 stw r24,32(r1) ffc1762c: 7c b8 2b 78 mr r24,r5 ffc17630: 93 21 00 24 stw r25,36(r1) ffc17634: 7c d9 33 78 mr r25,r6 ffc17638: 93 61 00 2c stw r27,44(r1) ffc1763c: 7c 7b 1b 78 mr r27,r3 ffc17640: 93 a1 00 34 stw r29,52(r1) ffc17644: 7c 9d 23 78 mr r29,r4 ffc17648: 90 01 00 44 stw r0,68(r1) ffc1764c: 93 41 00 28 stw r26,40(r1) ffc17650: 93 c1 00 38 stw r30,56(r1) ffc17654: 93 e1 00 3c stw r31,60(r1) Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) ffc17658: 41 82 01 04 beq- ffc1775c return RTEMS_INVALID_ADDRESS; *segment = NULL; if ( size == 0 ) ffc1765c: 2f 84 00 00 cmpwi cr7,r4,0 void *the_segment; if ( !segment ) return RTEMS_INVALID_ADDRESS; *segment = NULL; ffc17660: 38 00 00 00 li r0,0 ffc17664: 90 1c 00 00 stw r0,0(r28) if ( size == 0 ) ffc17668: 3a e0 00 08 li r23,8 ffc1766c: 41 be 00 f0 beq+ cr7,ffc1775c return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); ffc17670: 3f 40 00 00 lis r26,0 ffc17674: 80 7a 28 5c lwz r3,10332(r26) _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; ffc17678: 3a e0 00 04 li r23,4 *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); ffc1767c: 48 00 2b 01 bl ffc1a17c <_API_Mutex_Lock> <== ALWAYS TAKEN ffc17680: 3c 60 00 00 lis r3,0 executing = _Thread_Executing; ffc17684: 3d 20 00 00 lis r9,0 ffc17688: 38 63 6e ec addi r3,r3,28396 ffc1768c: 83 c9 28 64 lwz r30,10340(r9) ffc17690: 7f 64 db 78 mr r4,r27 ffc17694: 38 a1 00 08 addi r5,r1,8 ffc17698: 48 00 49 6d bl ffc1c004 <_Objects_Get_no_protection> <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { ffc1769c: 80 01 00 08 lwz r0,8(r1) ffc176a0: 7c 7f 1b 78 mr r31,r3 ffc176a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc176a8: 40 9e 00 a8 bne- cr7,ffc17750 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) ffc176ac: 80 03 00 5c lwz r0,92(r3) ffc176b0: 3a e0 00 08 li r23,8 ffc176b4: 7f 9d 00 40 cmplw cr7,r29,r0 ffc176b8: 41 bd 00 98 bgt+ cr7,ffc17750 * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); ffc176bc: 38 63 00 68 addi r3,r3,104 ffc176c0: 7f a4 eb 78 mr r4,r29 ffc176c4: 38 a0 00 00 li r5,0 ffc176c8: 38 c0 00 00 li r6,0 ffc176cc: 48 00 38 19 bl ffc1aee4 <_Heap_Allocate_aligned_with_boundary> <== ALWAYS TAKEN the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { ffc176d0: 2c 03 00 00 cmpwi r3,0 ffc176d4: 41 82 00 1c beq- ffc176f0 the_region->number_of_used_blocks += 1; ffc176d8: 81 3f 00 64 lwz r9,100(r31) *segment = the_segment; ffc176dc: 3a e0 00 00 li r23,0 ffc176e0: 90 7c 00 00 stw r3,0(r28) the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { the_region->number_of_used_blocks += 1; ffc176e4: 38 09 00 01 addi r0,r9,1 ffc176e8: 90 1f 00 64 stw r0,100(r31) ffc176ec: 48 00 00 64 b ffc17750 <== ALWAYS TAKEN *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { ffc176f0: 73 00 00 01 andi. r0,r24,1 ffc176f4: 3a e0 00 0d li r23,13 ffc176f8: 40 a2 00 58 bne+ ffc17750 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc176fc: 3d 20 00 00 lis r9,0 ffc17700: 81 69 28 24 lwz r11,10276(r9) ffc17704: 38 0b 00 01 addi r0,r11,1 ffc17708: 90 09 28 24 stw r0,10276(r9) * Switch from using the memory allocation mutex to using a * dispatching disabled critical section. We have to do this * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); ffc1770c: 80 7a 28 5c lwz r3,10332(r26) ffc17710: 48 00 2a ed bl ffc1a1fc <_API_Mutex_Unlock> <== ALWAYS TAKEN executing->Wait.queue = &the_region->Wait_queue; ffc17714: 38 1f 00 10 addi r0,r31,16 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc17718: 39 20 00 01 li r9,1 ffc1771c: 90 1e 00 44 stw r0,68(r30) executing->Wait.count = size; executing->Wait.return_argument = segment; _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); ffc17720: 3c a0 ff c2 lis r5,-62 ffc17724: 91 3f 00 40 stw r9,64(r31) ffc17728: 7c 03 03 78 mr r3,r0 ffc1772c: 7f 24 cb 78 mr r4,r25 */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); executing->Wait.queue = &the_region->Wait_queue; executing->Wait.id = id; ffc17730: 93 7e 00 20 stw r27,32(r30) executing->Wait.count = size; executing->Wait.return_argument = segment; _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); ffc17734: 38 a5 d5 d4 addi r5,r5,-10796 _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); executing->Wait.queue = &the_region->Wait_queue; executing->Wait.id = id; executing->Wait.count = size; ffc17738: 93 be 00 24 stw r29,36(r30) executing->Wait.return_argument = segment; ffc1773c: 93 9e 00 28 stw r28,40(r30) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); ffc17740: 48 00 5a 9d bl ffc1d1dc <_Thread_queue_Enqueue_with_handler> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc17744: 48 00 54 81 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return (rtems_status_code) executing->Wait.return_code; ffc17748: 82 fe 00 34 lwz r23,52(r30) ffc1774c: 48 00 00 10 b ffc1775c <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc17750: 3d 20 00 00 lis r9,0 ffc17754: 80 69 28 5c lwz r3,10332(r9) ffc17758: 48 00 2a a5 bl ffc1a1fc <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } ffc1775c: 80 01 00 44 lwz r0,68(r1) ffc17760: 7e e3 bb 78 mr r3,r23 ffc17764: 83 01 00 20 lwz r24,32(r1) ffc17768: 7c 08 03 a6 mtlr r0 ffc1776c: 82 e1 00 1c lwz r23,28(r1) ffc17770: 83 21 00 24 lwz r25,36(r1) ffc17774: 83 41 00 28 lwz r26,40(r1) ffc17778: 83 61 00 2c lwz r27,44(r1) ffc1777c: 83 81 00 30 lwz r28,48(r1) ffc17780: 83 a1 00 34 lwz r29,52(r1) ffc17784: 83 c1 00 38 lwz r30,56(r1) ffc17788: 83 e1 00 3c lwz r31,60(r1) ffc1778c: 38 21 00 40 addi r1,r1,64 ffc17790: 4e 80 00 20 blr <== ALWAYS TAKEN ffc17794 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { ffc17794: 94 21 ff d8 stwu r1,-40(r1) ffc17798: 7c 08 02 a6 mflr r0 ffc1779c: 93 c1 00 20 stw r30,32(r1) Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) ffc177a0: 7c 9e 23 79 mr. r30,r4 rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { ffc177a4: 93 a1 00 1c stw r29,28(r1) ffc177a8: 7c 7d 1b 78 mr r29,r3 ffc177ac: 93 e1 00 24 stw r31,36(r1) ffc177b0: 7c bf 2b 78 mr r31,r5 ffc177b4: 90 01 00 2c stw r0,44(r1) Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) ffc177b8: 41 82 00 74 beq- ffc1782c return RTEMS_INVALID_ADDRESS; if ( !size ) ffc177bc: 2f 85 00 00 cmpwi cr7,r5,0 ffc177c0: 41 9e 00 6c beq- cr7,ffc1782c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); ffc177c4: 3d 20 00 00 lis r9,0 ffc177c8: 80 69 28 5c lwz r3,10332(r9) ffc177cc: 48 00 29 b1 bl ffc1a17c <_API_Mutex_Lock> <== ALWAYS TAKEN ffc177d0: 3c 60 00 00 lis r3,0 ffc177d4: 38 63 6e ec addi r3,r3,28396 ffc177d8: 7f a4 eb 78 mr r4,r29 ffc177dc: 38 a1 00 08 addi r5,r1,8 ffc177e0: 48 00 48 25 bl ffc1c004 <_Objects_Get_no_protection> <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { ffc177e4: 80 01 00 08 lwz r0,8(r1) ffc177e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc177ec: 41 9e 00 10 beq- cr7,ffc177fc ffc177f0: 2f 80 00 01 cmpwi cr7,r0,1 ffc177f4: 3b e0 00 04 li r31,4 ffc177f8: 48 00 00 1c b ffc17814 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) ffc177fc: 7f e5 fb 78 mr r5,r31 ffc17800: 38 63 00 68 addi r3,r3,104 ffc17804: 7f c4 f3 78 mr r4,r30 ffc17808: 48 00 41 61 bl ffc1b968 <_Heap_Size_of_alloc_area> <== ALWAYS TAKEN ffc1780c: 3b e0 00 09 li r31,9 ffc17810: 2f 83 00 00 cmpwi cr7,r3,0 ffc17814: 41 9e 00 08 beq- cr7,ffc1781c ffc17818: 3b e0 00 00 li r31,0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc1781c: 3d 20 00 00 lis r9,0 ffc17820: 80 69 28 5c lwz r3,10332(r9) ffc17824: 48 00 29 d9 bl ffc1a1fc <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; ffc17828: 48 00 00 08 b ffc17830 <== ALWAYS TAKEN ffc1782c: 3b e0 00 09 li r31,9 } ffc17830: 80 01 00 2c lwz r0,44(r1) ffc17834: 7f e3 fb 78 mr r3,r31 ffc17838: 83 a1 00 1c lwz r29,28(r1) ffc1783c: 7c 08 03 a6 mtlr r0 ffc17840: 83 c1 00 20 lwz r30,32(r1) ffc17844: 83 e1 00 24 lwz r31,36(r1) ffc17848: 38 21 00 28 addi r1,r1,40 ffc1784c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc17850 : rtems_status_code rtems_region_ident( rtems_name name, rtems_id *id ) { ffc17850: 94 21 ff f8 stwu r1,-8(r1) ffc17854: 7c 08 02 a6 mflr r0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc17858: 3c a0 7f ff lis r5,32767 rtems_status_code rtems_region_ident( rtems_name name, rtems_id *id ) { ffc1785c: 90 01 00 0c stw r0,12(r1) ffc17860: 7c 60 1b 78 mr r0,r3 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc17864: 3c 60 00 00 lis r3,0 rtems_status_code rtems_region_ident( rtems_name name, rtems_id *id ) { ffc17868: 7c 86 23 78 mr r6,r4 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc1786c: 38 63 6e ec addi r3,r3,28396 ffc17870: 7c 04 03 78 mr r4,r0 ffc17874: 60 a5 ff ff ori r5,r5,65535 ffc17878: 48 00 4a 0d bl ffc1c284 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc1787c: 80 01 00 0c lwz r0,12(r1) ffc17880: 3d 20 ff c4 lis r9,-60 ffc17884: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc17888: 54 63 10 3a rlwinm r3,r3,2,0,29 OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc1788c: 39 29 8f 78 addi r9,r9,-28808 ffc17890: 7c 69 18 2e lwzx r3,r9,r3 ffc17894: 38 21 00 08 addi r1,r1,8 ffc17898: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1789c : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { ffc1789c: 94 21 ff d0 stwu r1,-48(r1) ffc178a0: 7c 08 02 a6 mflr r0 ffc178a4: 93 a1 00 24 stw r29,36(r1) uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) ffc178a8: 7c dd 33 79 mr. r29,r6 rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { ffc178ac: 93 61 00 1c stw r27,28(r1) ffc178b0: 7c 9b 23 78 mr r27,r4 ffc178b4: 93 81 00 20 stw r28,32(r1) ffc178b8: 7c bc 2b 78 mr r28,r5 ffc178bc: 93 c1 00 28 stw r30,40(r1) ffc178c0: 7c 7e 1b 78 mr r30,r3 ffc178c4: 90 01 00 34 stw r0,52(r1) ffc178c8: 93 e1 00 2c stw r31,44(r1) uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) ffc178cc: 41 82 00 94 beq- ffc17960 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); ffc178d0: 3f e0 00 00 lis r31,0 ffc178d4: 80 7f 28 5c lwz r3,10332(r31) ffc178d8: 48 00 28 a5 bl ffc1a17c <_API_Mutex_Lock> <== ALWAYS TAKEN ffc178dc: 3c 60 00 00 lis r3,0 ffc178e0: 7f c4 f3 78 mr r4,r30 ffc178e4: 38 63 6e ec addi r3,r3,28396 ffc178e8: 38 a1 00 0c addi r5,r1,12 ffc178ec: 48 00 47 19 bl ffc1c004 <_Objects_Get_no_protection> <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { ffc178f0: 80 01 00 0c lwz r0,12(r1) ffc178f4: 7c 7e 1b 78 mr r30,r3 ffc178f8: 2f 80 00 00 cmpwi cr7,r0,0 ffc178fc: 40 9e 00 54 bne- cr7,ffc17950 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( ffc17900: 7f 85 e3 78 mr r5,r28 ffc17904: 7f 64 db 78 mr r4,r27 ffc17908: 38 63 00 68 addi r3,r3,104 ffc1790c: 38 c1 00 10 addi r6,r1,16 ffc17910: 38 e1 00 08 addi r7,r1,8 ffc17914: 48 00 3e fd bl ffc1b810 <_Heap_Resize_block> <== ALWAYS TAKEN segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; ffc17918: 80 01 00 10 lwz r0,16(r1) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) ffc1791c: 7c 7c 1b 79 mr. r28,r3 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; ffc17920: 90 1d 00 00 stw r0,0(r29) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) ffc17924: 40 82 00 14 bne- ffc17938 _Region_Process_queue( the_region ); /* unlocks allocator */ ffc17928: 7f c3 f3 78 mr r3,r30 ffc1792c: 48 00 8a 4d bl ffc20378 <_Region_Process_queue> <== ALWAYS TAKEN ffc17930: 38 60 00 00 li r3,0 ffc17934: 48 00 00 30 b ffc17964 <== ALWAYS TAKEN else _RTEMS_Unlock_allocator(); ffc17938: 80 7f 28 5c lwz r3,10332(r31) ffc1793c: 48 00 28 c1 bl ffc1a1fc <_API_Mutex_Unlock> <== ALWAYS TAKEN if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) ffc17940: 2f 9c 00 01 cmpwi cr7,r28,1 ffc17944: 38 60 00 0d li r3,13 ffc17948: 40 be 00 18 bne+ cr7,ffc17960 ffc1794c: 48 00 00 18 b ffc17964 <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc17950: 80 7f 28 5c lwz r3,10332(r31) ffc17954: 48 00 28 a9 bl ffc1a1fc <_API_Mutex_Unlock> <== ALWAYS TAKEN ffc17958: 38 60 00 04 li r3,4 return return_status; ffc1795c: 48 00 00 08 b ffc17964 <== ALWAYS TAKEN ffc17960: 38 60 00 09 li r3,9 } ffc17964: 80 01 00 34 lwz r0,52(r1) ffc17968: 83 61 00 1c lwz r27,28(r1) ffc1796c: 7c 08 03 a6 mtlr r0 ffc17970: 83 81 00 20 lwz r28,32(r1) ffc17974: 83 a1 00 24 lwz r29,36(r1) ffc17978: 83 c1 00 28 lwz r30,40(r1) ffc1797c: 83 e1 00 2c lwz r31,44(r1) ffc17980: 38 21 00 30 addi r1,r1,48 ffc17984: 4e 80 00 20 blr <== ALWAYS TAKEN ffc17988 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { ffc17988: 94 21 ff d8 stwu r1,-40(r1) uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); ffc1798c: 3d 20 00 00 lis r9,0 rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { ffc17990: 7c 08 02 a6 mflr r0 ffc17994: 93 c1 00 20 stw r30,32(r1) ffc17998: 7c 7e 1b 78 mr r30,r3 uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); ffc1799c: 80 69 28 5c lwz r3,10332(r9) rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { ffc179a0: 90 01 00 2c stw r0,44(r1) ffc179a4: 93 a1 00 1c stw r29,28(r1) register Region_Control *the_region; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { ffc179a8: 3b a0 00 04 li r29,4 rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { ffc179ac: 93 e1 00 24 stw r31,36(r1) ffc179b0: 7c 9f 23 78 mr r31,r4 uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); ffc179b4: 48 00 27 c9 bl ffc1a17c <_API_Mutex_Lock> <== ALWAYS TAKEN ffc179b8: 3c 60 00 00 lis r3,0 ffc179bc: 7f c4 f3 78 mr r4,r30 ffc179c0: 38 63 6e ec addi r3,r3,28396 ffc179c4: 38 a1 00 08 addi r5,r1,8 ffc179c8: 48 00 46 3d bl ffc1c004 <_Objects_Get_no_protection> <== ALWAYS TAKEN the_region = _Region_Get( id, &location ); switch ( location ) { ffc179cc: 80 01 00 08 lwz r0,8(r1) ffc179d0: 7c 7e 1b 78 mr r30,r3 ffc179d4: 2f 80 00 00 cmpwi cr7,r0,0 ffc179d8: 40 9e 00 38 bne- cr7,ffc17a10 RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); ffc179dc: 7f e4 fb 78 mr r4,r31 ffc179e0: 38 63 00 68 addi r3,r3,104 ffc179e4: 48 00 37 99 bl ffc1b17c <_Heap_Free> <== ALWAYS TAKEN else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; ffc179e8: 3b a0 00 09 li r29,9 #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) ffc179ec: 2f 83 00 00 cmpwi cr7,r3,0 ffc179f0: 41 be 00 20 beq+ cr7,ffc17a10 return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; ffc179f4: 81 3e 00 64 lwz r9,100(r30) _Region_Process_queue(the_region); /* unlocks allocator */ ffc179f8: 7f c3 f3 78 mr r3,r30 ffc179fc: 3b a0 00 00 li r29,0 _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; ffc17a00: 38 09 ff ff addi r0,r9,-1 ffc17a04: 90 1e 00 64 stw r0,100(r30) _Region_Process_queue(the_region); /* unlocks allocator */ ffc17a08: 48 00 89 71 bl ffc20378 <_Region_Process_queue> <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; ffc17a0c: 48 00 00 10 b ffc17a1c <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc17a10: 3d 20 00 00 lis r9,0 ffc17a14: 80 69 28 5c lwz r3,10332(r9) ffc17a18: 48 00 27 e5 bl ffc1a1fc <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } ffc17a1c: 80 01 00 2c lwz r0,44(r1) ffc17a20: 7f a3 eb 78 mr r3,r29 ffc17a24: 83 c1 00 20 lwz r30,32(r1) ffc17a28: 7c 08 03 a6 mtlr r0 ffc17a2c: 83 a1 00 1c lwz r29,28(r1) ffc17a30: 83 e1 00 24 lwz r31,36(r1) ffc17a34: 38 21 00 28 addi r1,r1,40 ffc17a38: 4e 80 00 20 blr <== ALWAYS TAKEN ffc078f0 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { ffc078f0: 94 21 ff b8 stwu r1,-72(r1) ffc078f4: 7c 08 02 a6 mflr r0 ffc078f8: 93 e1 00 44 stw r31,68(r1) register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) ffc078fc: 7c 7f 1b 79 mr. r31,r3 ffc07900: 38 60 00 03 li r3,3 uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { ffc07904: 93 41 00 30 stw r26,48(r1) ffc07908: 7c da 33 78 mr r26,r6 ffc0790c: 93 61 00 34 stw r27,52(r1) ffc07910: 7c fb 3b 78 mr r27,r7 ffc07914: 93 a1 00 3c stw r29,60(r1) ffc07918: 7c bd 2b 78 mr r29,r5 ffc0791c: 93 c1 00 40 stw r30,64(r1) <== ALWAYS TAKEN ffc07920: 7c 9e 23 78 mr r30,r4 ffc07924: 90 01 00 4c stw r0,76(r1) ffc07928: 93 21 00 2c stw r25,44(r1) ffc0792c: 93 81 00 38 stw r28,56(r1) register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) ffc07930: 41 82 01 98 beq- ffc07ac8 return RTEMS_INVALID_NAME; if ( !id ) ffc07934: 2f 87 00 00 cmpwi cr7,r7,0 <== ALWAYS TAKEN ffc07938: 38 60 00 09 li r3,9 ffc0793c: 41 9e 01 8c beq- cr7,ffc07ac8 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || ffc07940: 70 a0 00 c0 andi. r0,r5,192 ffc07944: 41 82 00 20 beq- ffc07964 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && ffc07948: 54 a9 06 b6 rlwinm r9,r5,0,26,27 <== ALWAYS TAKEN ffc0794c: 2f 89 00 10 cmpwi cr7,r9,16 ffc07950: 40 be 01 74 bne+ cr7,ffc07ac4 ffc07954: 70 a9 00 04 andi. r9,r5,4 ffc07958: 41 82 01 6c beq- ffc07ac4 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && ffc0795c: 2f 80 00 c0 cmpwi cr7,r0,192 ffc07960: 41 9e 01 64 beq- cr7,ffc07ac4 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) ffc07964: 73 b9 00 30 andi. r25,r29,48 <== ALWAYS TAKEN ffc07968: 41 82 00 10 beq- ffc07978 ffc0796c: 2b 9e 00 01 cmplwi cr7,r30,1 ffc07970: 38 60 00 0a li r3,10 ffc07974: 41 bd 01 54 bgt+ cr7,ffc07ac8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc07978: 3d 20 00 00 lis r9,0 ffc0797c: 81 69 27 2c lwz r11,10028(r9) ffc07980: 38 0b 00 01 addi r0,r11,1 <== ALWAYS TAKEN ffc07984: 90 09 27 2c stw r0,10028(r9) <== ALWAYS TAKEN * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); ffc07988: 3c 60 00 00 lis r3,0 ffc0798c: 38 63 2a ec addi r3,r3,10988 <== ALWAYS TAKEN ffc07990: 48 00 18 a5 bl ffc09234 <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { ffc07994: 7c 7c 1b 79 mr. r28,r3 ffc07998: 40 a2 00 10 bne+ ffc079a8 _Thread_Enable_dispatch(); ffc0799c: 48 00 29 11 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc079a0: 38 60 00 05 li r3,5 return RTEMS_TOO_MANY; ffc079a4: 48 00 01 24 b ffc07ac8 <== ALWAYS TAKEN the_semaphore->attribute_set = attribute_set; /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { ffc079a8: 2f 99 00 00 cmpwi cr7,r25,0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; ffc079ac: 93 bc 00 10 stw r29,16(r28) <== ALWAYS TAKEN ffc079b0: 57 a0 07 7a rlwinm r0,r29,0,29,29 /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { ffc079b4: 40 9e 00 44 bne- cr7,ffc079f8 /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; if ( _Attributes_Is_priority( attribute_set ) ) ffc079b8: 2f 80 00 00 cmpwi cr7,r0,0 */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; ffc079bc: 38 00 ff ff li r0,-1 ffc079c0: 90 01 00 08 stw r0,8(r1) if ( _Attributes_Is_priority( attribute_set ) ) ffc079c4: 41 9e 00 10 beq- cr7,ffc079d4 the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; ffc079c8: 38 00 00 01 li r0,1 ffc079cc: 90 01 00 0c stw r0,12(r1) ffc079d0: 48 00 00 08 b ffc079d8 <== ALWAYS TAKEN else the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; ffc079d4: 93 21 00 0c stw r25,12(r1) /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; ffc079d8: 38 00 00 00 li r0,0 the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( ffc079dc: 7f c5 f3 78 mr r5,r30 /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; ffc079e0: 90 01 00 1c stw r0,28(r1) _CORE_semaphore_Initialize( ffc079e4: 38 7c 00 14 addi r3,r28,20 <== ALWAYS TAKEN ffc079e8: 38 81 00 08 addi r4,r1,8 the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; ffc079ec: 90 01 00 10 stw r0,16(r1) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( ffc079f0: 48 00 12 91 bl ffc08c80 <_CORE_semaphore_Initialize> <== ALWAYS TAKEN ffc079f4: 48 00 00 a8 b ffc07a9c <== ALWAYS TAKEN } else { /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) ffc079f8: 2f 80 00 00 cmpwi cr7,r0,0 ffc079fc: 41 9e 00 08 beq- cr7,ffc07a04 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; ffc07a00: 38 00 00 01 li r0,1 else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { ffc07a04: 2f 99 00 10 cmpwi cr7,r25,16 * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; ffc07a08: 90 01 00 18 stw r0,24(r1) if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { ffc07a0c: 40 be 00 44 bne+ cr7,ffc07a50 the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { ffc07a10: 80 01 00 18 lwz r0,24(r1) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; ffc07a14: 39 20 00 00 li r9,0 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; ffc07a18: 93 41 00 1c stw r26,28(r1) <== ALWAYS TAKEN the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { ffc07a1c: 2f 80 00 01 cmpwi cr7,r0,1 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; ffc07a20: 99 21 00 14 stb r9,20(r1) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; ffc07a24: 91 21 00 10 stw r9,16(r1) the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { ffc07a28: 40 be 00 38 bne+ cr7,ffc07a60 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { ffc07a2c: 73 a9 00 40 andi. r9,r29,64 ffc07a30: 41 82 00 0c beq- ffc07a3c the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; ffc07a34: 39 20 00 02 li r9,2 ffc07a38: 48 00 00 10 b ffc07a48 <== ALWAYS TAKEN the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { ffc07a3c: 73 a9 00 80 andi. r9,r29,128 ffc07a40: 41 82 00 20 beq- ffc07a60 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; ffc07a44: 39 20 00 03 li r9,3 ffc07a48: 91 21 00 18 stw r9,24(r1) ffc07a4c: 48 00 00 10 b ffc07a5c <== ALWAYS TAKEN the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; ffc07a50: 38 00 00 02 li r0,2 ffc07a54: 90 01 00 10 stw r0,16(r1) the_mutex_attr.only_owner_release = false; ffc07a58: 38 00 00 00 li r0,0 ffc07a5c: 98 01 00 14 stb r0,20(r1) <== ALWAYS TAKEN } mutex_status = _CORE_mutex_Initialize( ffc07a60: 6b c5 00 01 xori r5,r30,1 ffc07a64: 7c a5 00 34 cntlzw r5,r5 ffc07a68: 54 a5 d9 7e rlwinm r5,r5,27,5,31 ffc07a6c: 38 7c 00 14 addi r3,r28,20 <== ALWAYS TAKEN ffc07a70: 38 81 00 10 addi r4,r1,16 ffc07a74: 48 00 0e 49 bl ffc088bc <_CORE_mutex_Initialize> <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { ffc07a78: 2f 83 00 06 cmpwi cr7,r3,6 <== ALWAYS TAKEN ffc07a7c: 40 be 00 20 bne+ cr7,ffc07a9c */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); ffc07a80: 3c 60 00 00 lis r3,0 ffc07a84: 38 63 2a ec addi r3,r3,10988 ffc07a88: 7f 84 e3 78 mr r4,r28 ffc07a8c: 48 00 1b 95 bl ffc09620 <_Objects_Free> <== ALWAYS TAKEN _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); ffc07a90: 48 00 28 1d bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc07a94: 38 60 00 13 li r3,19 return RTEMS_INVALID_PRIORITY; ffc07a98: 48 00 00 30 b ffc07ac8 <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc07a9c: 80 1c 00 08 lwz r0,8(r28) ffc07aa0: 3d 20 00 00 lis r9,0 ffc07aa4: 81 69 2b 08 lwz r11,11016(r9) ffc07aa8: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc07aac: 93 fc 00 0c stw r31,12(r28) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc07ab0: 7f 8b 49 2e stwx r28,r11,r9 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; ffc07ab4: 90 1b 00 00 stw r0,0(r27) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); ffc07ab8: 48 00 27 f5 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc07abc: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc07ac0: 48 00 00 08 b ffc07ac8 <== ALWAYS TAKEN ffc07ac4: 38 60 00 0b li r3,11 } ffc07ac8: 80 01 00 4c lwz r0,76(r1) ffc07acc: 83 21 00 2c lwz r25,44(r1) ffc07ad0: 7c 08 03 a6 mtlr r0 ffc07ad4: 83 41 00 30 lwz r26,48(r1) ffc07ad8: 83 61 00 34 lwz r27,52(r1) ffc07adc: 83 81 00 38 lwz r28,56(r1) ffc07ae0: 83 a1 00 3c lwz r29,60(r1) <== ALWAYS TAKEN ffc07ae4: 83 c1 00 40 lwz r30,64(r1) ffc07ae8: 83 e1 00 44 lwz r31,68(r1) ffc07aec: 38 21 00 48 addi r1,r1,72 ffc07af0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07af4 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { ffc07af4: 94 21 ff e0 stwu r1,-32(r1) ffc07af8: 7c 08 02 a6 mflr r0 ffc07afc: 7c 64 1b 78 mr r4,r3 RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) ffc07b00: 3c 60 00 00 lis r3,0 ffc07b04: 90 01 00 24 stw r0,36(r1) ffc07b08: 38 63 2a ec addi r3,r3,10988 ffc07b0c: 38 a1 00 08 addi r5,r1,8 ffc07b10: 93 e1 00 1c stw r31,28(r1) ffc07b14: 93 c1 00 18 stw r30,24(r1) ffc07b18: 48 00 1c c9 bl ffc097e0 <_Objects_Get> <== ALWAYS TAKEN ffc07b1c: 7c 7f 1b 78 mr r31,r3 <== ALWAYS TAKEN register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { ffc07b20: 80 01 00 08 lwz r0,8(r1) ffc07b24: 38 60 00 04 li r3,4 ffc07b28: 2f 80 00 00 cmpwi cr7,r0,0 ffc07b2c: 40 9e 00 7c bne- cr7,ffc07ba8 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); ffc07b30: 80 1f 00 10 lwz r0,16(r31) case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { ffc07b34: 70 00 00 30 andi. r0,r0,48 ffc07b38: 41 82 00 38 beq- ffc07b70 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && ffc07b3c: 81 3f 00 64 lwz r9,100(r31) ffc07b40: 2f 89 00 00 cmpwi cr7,r9,0 ffc07b44: 40 9e 00 18 bne- cr7,ffc07b5c ffc07b48: 2f 80 00 20 cmpwi cr7,r0,32 ffc07b4c: 41 9e 00 10 beq- cr7,ffc07b5c !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); ffc07b50: 48 00 27 5d bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc07b54: 38 60 00 0c li r3,12 return RTEMS_RESOURCE_IN_USE; ffc07b58: 48 00 00 50 b ffc07ba8 <== ALWAYS TAKEN } _CORE_mutex_Flush( ffc07b5c: 38 7f 00 14 addi r3,r31,20 ffc07b60: 38 80 00 00 li r4,0 ffc07b64: 38 a0 00 04 li r5,4 ffc07b68: 48 00 0d 35 bl ffc0889c <_CORE_mutex_Flush> <== ALWAYS TAKEN ffc07b6c: 48 00 00 14 b ffc07b80 <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( ffc07b70: 38 7f 00 14 addi r3,r31,20 ffc07b74: 38 80 00 00 li r4,0 ffc07b78: 38 a0 00 02 li r5,2 ffc07b7c: 48 00 10 e5 bl ffc08c60 <_CORE_semaphore_Flush> <== ALWAYS TAKEN SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); ffc07b80: 3f c0 00 00 lis r30,0 ffc07b84: 3b de 2a ec addi r30,r30,10988 ffc07b88: 7f c3 f3 78 mr r3,r30 ffc07b8c: 7f e4 fb 78 mr r4,r31 ffc07b90: 48 00 17 51 bl ffc092e0 <_Objects_Close> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); ffc07b94: 7f c3 f3 78 mr r3,r30 ffc07b98: 7f e4 fb 78 mr r4,r31 ffc07b9c: 48 00 1a 85 bl ffc09620 <_Objects_Free> <== ALWAYS TAKEN 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); ffc07ba0: 48 00 27 0d bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc07ba4: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc07ba8: 80 01 00 24 lwz r0,36(r1) <== ALWAYS TAKEN ffc07bac: 83 c1 00 18 lwz r30,24(r1) ffc07bb0: 7c 08 03 a6 mtlr r0 ffc07bb4: 83 e1 00 1c lwz r31,28(r1) ffc07bb8: 38 21 00 20 addi r1,r1,32 <== ALWAYS TAKEN ffc07bbc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc13438 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { ffc13438: 94 21 ff e8 stwu r1,-24(r1) ffc1343c: 7c 08 02 a6 mflr r0 ffc13440: 7c 64 1b 78 mr r4,r3 ffc13444: 3c 60 00 00 lis r3,0 ffc13448: 90 01 00 1c stw r0,28(r1) ffc1344c: 38 63 2b ac addi r3,r3,11180 ffc13450: 38 a1 00 08 addi r5,r1,8 ffc13454: 4b ff 81 fd bl ffc0b650 <_Objects_Get> <== ALWAYS TAKEN register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { ffc13458: 81 21 00 08 lwz r9,8(r1) ffc1345c: 38 00 00 04 li r0,4 ffc13460: 2f 89 00 00 cmpwi cr7,r9,0 ffc13464: 40 9e 00 38 bne- cr7,ffc1349c case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { ffc13468: 80 03 00 10 lwz r0,16(r3) ffc1346c: 38 63 00 14 addi r3,r3,20 ffc13470: 70 09 00 30 andi. r9,r0,48 ffc13474: 41 82 00 14 beq- ffc13488 _CORE_mutex_Flush( ffc13478: 38 80 00 00 li r4,0 ffc1347c: 38 a0 00 01 li r5,1 ffc13480: 4b ff 72 85 bl ffc0a704 <_CORE_mutex_Flush> <== ALWAYS TAKEN ffc13484: 48 00 00 10 b ffc13494 <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( ffc13488: 38 80 00 00 li r4,0 ffc1348c: 38 a0 00 01 li r5,1 ffc13490: 4b ff 76 39 bl ffc0aac8 <_CORE_semaphore_Flush> <== ALWAYS TAKEN &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); ffc13494: 4b ff 8d 5d bl ffc0c1f0 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc13498: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1349c: 7c 03 03 78 mr r3,r0 ffc134a0: 80 01 00 1c lwz r0,28(r1) ffc134a4: 38 21 00 18 addi r1,r1,24 ffc134a8: 7c 08 03 a6 mtlr r0 ffc134ac: 4e 80 00 20 blr <== ALWAYS TAKEN ffc17dd8 : rtems_status_code rtems_semaphore_ident( rtems_name name, uint32_t node, rtems_id *id ) { ffc17dd8: 94 21 ff f8 stwu r1,-8(r1) ffc17ddc: 7c 08 02 a6 mflr r0 ffc17de0: 7c 69 1b 78 mr r9,r3 ffc17de4: 90 01 00 0c stw r0,12(r1) Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Semaphore_Information, name, node, id ); ffc17de8: 3c 60 00 00 lis r3,0 rtems_status_code rtems_semaphore_ident( rtems_name name, uint32_t node, rtems_id *id ) { ffc17dec: 7c 80 23 78 mr r0,r4 ffc17df0: 7c a6 2b 78 mr r6,r5 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Semaphore_Information, name, node, id ); ffc17df4: 7d 24 4b 78 mr r4,r9 ffc17df8: 7c 05 03 78 mr r5,r0 ffc17dfc: 38 63 6f 2c addi r3,r3,28460 ffc17e00: 48 00 44 85 bl ffc1c284 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN return _Status_Object_name_errors_to_status[ status ]; } ffc17e04: 80 01 00 0c lwz r0,12(r1) ffc17e08: 3d 20 ff c4 lis r9,-60 ffc17e0c: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Semaphore_Information, name, node, id ); ffc17e10: 54 63 10 3a rlwinm r3,r3,2,0,29 return _Status_Object_name_errors_to_status[ status ]; } ffc17e14: 39 29 8f 78 addi r9,r9,-28808 ffc17e18: 7c 69 18 2e lwzx r3,r9,r3 ffc17e1c: 38 21 00 08 addi r1,r1,8 ffc17e20: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07bc0 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { ffc07bc0: 94 21 ff d8 stwu r1,-40(r1) ffc07bc4: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN ffc07bc8: 93 e1 00 24 stw r31,36(r1) ffc07bcc: 7c 7f 1b 78 mr r31,r3 Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) ffc07bd0: 3c 60 00 00 lis r3,0 ffc07bd4: 93 81 00 18 stw r28,24(r1) ffc07bd8: 38 63 2a ec addi r3,r3,10988 ffc07bdc: 7c 9c 23 78 mr r28,r4 ffc07be0: 93 c1 00 20 stw r30,32(r1) ffc07be4: 7f e4 fb 78 mr r4,r31 ffc07be8: 7c be 2b 78 mr r30,r5 ffc07bec: 38 c1 00 0c addi r6,r1,12 ffc07bf0: 90 01 00 2c stw r0,44(r1) ffc07bf4: 38 a1 00 08 addi r5,r1,8 ffc07bf8: 93 a1 00 1c stw r29,28(r1) ffc07bfc: 48 00 1b 75 bl ffc09770 <_Objects_Get_isr_disable> <== ALWAYS TAKEN ffc07c00: 7c 69 1b 78 mr r9,r3 register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { ffc07c04: 80 01 00 08 lwz r0,8(r1) ffc07c08: 38 60 00 04 li r3,4 ffc07c0c: 2f 80 00 00 cmpwi cr7,r0,0 <== ALWAYS TAKEN ffc07c10: 40 9e 00 d4 bne- cr7,ffc07ce4 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { ffc07c14: 80 09 00 10 lwz r0,16(r9) ffc07c18: 3f a0 00 00 lis r29,0 ffc07c1c: 70 00 00 30 andi. r0,r0,48 ffc07c20: 41 82 00 30 beq- ffc07c50 _CORE_mutex_Seize( ffc07c24: 6b 85 00 01 xori r5,r28,1 ffc07c28: 80 e1 00 0c lwz r7,12(r1) ffc07c2c: 38 69 00 14 addi r3,r9,20 ffc07c30: 7f e4 fb 78 mr r4,r31 ffc07c34: 54 a5 07 fe clrlwi r5,r5,31 ffc07c38: 7f c6 f3 78 mr r6,r30 ffc07c3c: 48 00 0d d9 bl ffc08a14 <_CORE_mutex_Seize> <== ALWAYS TAKEN id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( ffc07c40: 81 3d 27 6c lwz r9,10092(r29) ffc07c44: 80 69 00 34 lwz r3,52(r9) ffc07c48: 48 00 01 59 bl ffc07da0 <_Semaphore_Translate_core_mutex_return_code> <== ALWAYS TAKEN ffc07c4c: 48 00 00 98 b ffc07ce4 <== ALWAYS TAKEN { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; ffc07c50: 81 7d 27 6c lwz r11,10092(r29) executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc07c54: 90 0b 00 34 stw r0,52(r11) if ( the_semaphore->count != 0 ) { ffc07c58: 81 49 00 5c lwz r10,92(r9) ffc07c5c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc07c60: 41 9e 00 18 beq- cr7,ffc07c78 the_semaphore->count -= 1; ffc07c64: 39 4a ff ff addi r10,r10,-1 ffc07c68: 91 49 00 5c stw r10,92(r9) ffc07c6c: 80 01 00 0c lwz r0,12(r1) ffc07c70: 7c 00 01 24 mtmsr r0 ffc07c74: 48 00 00 60 b ffc07cd4 <== ALWAYS TAKEN _ISR_Enable( *level_p ); return; } if ( !wait ) { ffc07c78: 73 80 00 01 andi. r0,r28,1 ffc07c7c: 41 82 00 18 beq- ffc07c94 ffc07c80: 80 01 00 0c lwz r0,12(r1) ffc07c84: 7c 00 01 24 mtmsr r0 _ISR_Enable( *level_p ); executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; ffc07c88: 38 00 00 01 li r0,1 ffc07c8c: 90 0b 00 34 stw r0,52(r11) ffc07c90: 48 00 00 44 b ffc07cd4 <== ALWAYS TAKEN ffc07c94: 3d 40 00 00 lis r10,0 ffc07c98: 81 0a 27 2c lwz r8,10028(r10) ffc07c9c: 38 08 00 01 addi r0,r8,1 ffc07ca0: 90 0a 27 2c stw r0,10028(r10) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc07ca4: 38 00 00 01 li r0,1 ffc07ca8: 90 09 00 44 stw r0,68(r9) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; ffc07cac: 38 69 00 14 addi r3,r9,20 executing->Wait.id = id; ffc07cb0: 93 eb 00 20 stw r31,32(r11) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; ffc07cb4: 90 6b 00 44 stw r3,68(r11) ffc07cb8: 80 01 00 0c lwz r0,12(r1) ffc07cbc: 7c 00 01 24 mtmsr r0 executing->Wait.id = id; _ISR_Enable( *level_p ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); ffc07cc0: 3c a0 ff c1 lis r5,-63 ffc07cc4: 7f c4 f3 78 mr r4,r30 ffc07cc8: 38 a5 ac 70 addi r5,r5,-21392 ffc07ccc: 48 00 2b ad bl ffc0a878 <_Thread_queue_Enqueue_with_handler> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc07cd0: 48 00 25 dd bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( ffc07cd4: 3d 20 00 00 lis r9,0 ffc07cd8: 81 29 27 6c lwz r9,10092(r9) ffc07cdc: 80 69 00 34 lwz r3,52(r9) ffc07ce0: 48 00 00 d5 bl ffc07db4 <_Semaphore_Translate_core_semaphore_return_code> <== ALWAYS TAKEN break; } return RTEMS_INVALID_ID; } ffc07ce4: 80 01 00 2c lwz r0,44(r1) ffc07ce8: 83 81 00 18 lwz r28,24(r1) ffc07cec: 7c 08 03 a6 mtlr r0 ffc07cf0: 83 a1 00 1c lwz r29,28(r1) ffc07cf4: 83 c1 00 20 lwz r30,32(r1) ffc07cf8: 83 e1 00 24 lwz r31,36(r1) ffc07cfc: 38 21 00 28 addi r1,r1,40 ffc07d00: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07d04 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { ffc07d04: 94 21 ff d8 stwu r1,-40(r1) ffc07d08: 7c 08 02 a6 mflr r0 ffc07d0c: 93 e1 00 24 stw r31,36(r1) <== ALWAYS TAKEN ffc07d10: 7c 7f 1b 78 mr r31,r3 RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) ffc07d14: 3c 60 00 00 lis r3,0 ffc07d18: 38 63 2a ec addi r3,r3,10988 ffc07d1c: 90 01 00 2c stw r0,44(r1) ffc07d20: 7f e4 fb 78 mr r4,r31 <== ALWAYS TAKEN ffc07d24: 38 a1 00 08 addi r5,r1,8 ffc07d28: 48 00 1a b9 bl ffc097e0 <_Objects_Get> <== ALWAYS TAKEN Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { ffc07d2c: 80 01 00 08 lwz r0,8(r1) ffc07d30: 7c 69 1b 78 mr r9,r3 ffc07d34: 2f 80 00 00 cmpwi cr7,r0,0 ffc07d38: 38 60 00 04 li r3,4 <== ALWAYS TAKEN ffc07d3c: 40 9e 00 50 bne- cr7,ffc07d8c case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { ffc07d40: 80 09 00 10 lwz r0,16(r9) <== ALWAYS TAKEN ffc07d44: 38 69 00 14 addi r3,r9,20 <== ALWAYS TAKEN ffc07d48: 70 09 00 30 andi. r9,r0,48 ffc07d4c: 41 a2 00 24 beq+ ffc07d70 mutex_status = _CORE_mutex_Surrender( ffc07d50: 7f e4 fb 78 mr r4,r31 ffc07d54: 38 a0 00 00 li r5,0 ffc07d58: 48 00 0d b5 bl ffc08b0c <_CORE_mutex_Surrender> <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); ffc07d5c: 90 61 00 18 stw r3,24(r1) ffc07d60: 48 00 25 4d bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN return _Semaphore_Translate_core_mutex_return_code( mutex_status ); ffc07d64: 80 61 00 18 lwz r3,24(r1) ffc07d68: 48 00 00 39 bl ffc07da0 <_Semaphore_Translate_core_mutex_return_code> <== ALWAYS TAKEN ffc07d6c: 48 00 00 20 b ffc07d8c <== ALWAYS TAKEN } else { semaphore_status = _CORE_semaphore_Surrender( ffc07d70: 7f e4 fb 78 mr r4,r31 ffc07d74: 38 a0 00 00 li r5,0 ffc07d78: 48 00 0f 55 bl ffc08ccc <_CORE_semaphore_Surrender> <== ALWAYS TAKEN &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); ffc07d7c: 90 61 00 18 stw r3,24(r1) ffc07d80: 48 00 25 2d bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); ffc07d84: 80 61 00 18 lwz r3,24(r1) ffc07d88: 48 00 00 2d bl ffc07db4 <_Semaphore_Translate_core_semaphore_return_code> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc07d8c: 80 01 00 2c lwz r0,44(r1) ffc07d90: 83 e1 00 24 lwz r31,36(r1) ffc07d94: 38 21 00 28 addi r1,r1,40 ffc07d98: 7c 08 03 a6 mtlr r0 <== ALWAYS TAKEN ffc07d9c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1b2a4 : */ void rtems_shutdown_executive( uint32_t result ) { ffc1b2a4: 7c 08 02 a6 mflr r0 ffc1b2a8: 94 21 ff f8 stwu r1,-8(r1) if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { ffc1b2ac: 3d 20 00 00 lis r9,0 */ void rtems_shutdown_executive( uint32_t result ) { ffc1b2b0: 90 01 00 0c stw r0,12(r1) if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { ffc1b2b4: 80 09 27 90 lwz r0,10128(r9) ffc1b2b8: 2f 80 00 04 cmpwi cr7,r0,4 ffc1b2bc: 41 9e 00 18 beq- cr7,ffc1b2d4 * if we were running within the same context, it would work. * * And we will not return to this thread, so there is no point of * saving the context. */ _Context_Restart_self( &_Thread_BSP_context ); ffc1b2c0: 3c 60 00 00 lis r3,0 ffc1b2c4: 38 00 00 04 li r0,4 ffc1b2c8: 38 63 2b 94 addi r3,r3,11156 ffc1b2cc: 90 09 27 90 stw r0,10128(r9) ffc1b2d0: 4b ff fa d1 bl ffc1ada0 <_CPU_Context_restore> <== ALWAYS TAKEN _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } ffc1b2d4: 80 01 00 0c lwz r0,12(r1) ffc1b2d8: 38 21 00 08 addi r1,r1,8 ffc1b2dc: 7c 08 03 a6 mtlr r0 ffc1b2e0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09224 : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { ffc09224: 7c 08 02 a6 mflr r0 ffc09228: 3d 20 00 00 lis r9,0 ffc0922c: 94 21 ff f8 stwu r1,-8(r1) RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; ffc09230: 3d 60 00 00 lis r11,0 ffc09234: 81 49 27 60 lwz r10,10080(r9) rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { ffc09238: 90 01 00 0c stw r0,12(r1) ffc0923c: 38 0a 00 01 addi r0,r10,1 RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; ffc09240: 81 6b 27 a0 lwz r11,10144(r11) ffc09244: 90 09 27 60 stw r0,10080(r9) ffc09248: 81 2b 01 40 lwz r9,320(r11) asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { ffc0924c: 2f 83 00 00 cmpwi cr7,r3,0 ffc09250: 41 9e 00 10 beq- cr7,ffc09260 asr->mode_set = mode_set; asr->handler = asr_handler; ffc09254: 90 69 00 0c stw r3,12(r9) _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { asr->mode_set = mode_set; ffc09258: 90 89 00 10 stw r4,16(r9) ffc0925c: 48 00 00 1c b ffc09278 <== ALWAYS TAKEN information->is_enabled = false; information->handler = NULL; information->mode_set = RTEMS_DEFAULT_MODES; information->signals_posted = 0; information->signals_pending = 0; information->nest_level = 0; ffc09260: 90 69 00 1c stw r3,28(r9) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; ffc09264: 98 69 00 08 stb r3,8(r9) information->handler = NULL; ffc09268: 90 69 00 0c stw r3,12(r9) information->mode_set = RTEMS_DEFAULT_MODES; ffc0926c: 90 69 00 10 stw r3,16(r9) information->signals_posted = 0; ffc09270: 90 69 00 14 stw r3,20(r9) information->signals_pending = 0; ffc09274: 90 69 00 18 stw r3,24(r9) asr->handler = asr_handler; } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); ffc09278: 48 00 29 71 bl ffc0bbe8 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } ffc0927c: 80 01 00 0c lwz r0,12(r1) ffc09280: 38 60 00 00 li r3,0 ffc09284: 7c 08 03 a6 mtlr r0 ffc09288: 38 21 00 08 addi r1,r1,8 ffc0928c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc18030 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc18030: 94 21 ff e0 stwu r1,-32(r1) ffc18034: 7c 08 02 a6 mflr r0 ffc18038: 93 e1 00 1c stw r31,28(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) ffc1803c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc18040: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) ffc18044: 38 00 00 0a li r0,10 ffc18048: 41 82 00 c0 beq- ffc18108 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); ffc1804c: 38 81 00 08 addi r4,r1,8 ffc18050: 48 00 4b e1 bl ffc1cc30 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc18054: 81 21 00 08 lwz r9,8(r1) ffc18058: 38 00 00 04 li r0,4 ffc1805c: 2f 89 00 00 cmpwi cr7,r9,0 ffc18060: 40 9e 00 a8 bne- cr7,ffc18108 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; ffc18064: 81 23 01 40 lwz r9,320(r3) asr = &api->Signal; ffc18068: 80 09 00 0c lwz r0,12(r9) ffc1806c: 2f 80 00 00 cmpwi cr7,r0,0 ffc18070: 41 9e 00 90 beq- cr7,ffc18100 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { ffc18074: 88 09 00 08 lbz r0,8(r9) ffc18078: 2f 80 00 00 cmpwi cr7,r0,0 ffc1807c: 41 9e 00 58 beq- cr7,ffc180d4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc18080: 7c 00 00 a6 mfmsr r0 ffc18084: 7d 70 42 a6 mfsprg r11,0 ffc18088: 7c 0b 58 78 andc r11,r0,r11 ffc1808c: 7d 60 01 24 mtmsr r11 ) { ISR_Level _level; _ISR_Disable( _level ); *signal_set |= signals; ffc18090: 81 69 00 14 lwz r11,20(r9) ffc18094: 7d 7f fb 78 or r31,r11,r31 ffc18098: 93 e9 00 14 stw r31,20(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1809c: 7c 00 01 24 mtmsr r0 _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc180a0: 3d 20 00 00 lis r9,0 ffc180a4: 81 29 28 4c lwz r9,10316(r9) if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; ffc180a8: 38 00 00 01 li r0,1 ffc180ac: 98 03 00 74 stb r0,116(r3) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc180b0: 2f 89 00 00 cmpwi cr7,r9,0 ffc180b4: 41 9e 00 40 beq- cr7,ffc180f4 ffc180b8: 3d 20 00 00 lis r9,0 ffc180bc: 81 29 28 64 lwz r9,10340(r9) ffc180c0: 7f 83 48 00 cmpw cr7,r3,r9 ffc180c4: 40 be 00 30 bne+ cr7,ffc180f4 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; ffc180c8: 3d 20 00 00 lis r9,0 ffc180cc: 98 09 28 80 stb r0,10368(r9) ffc180d0: 48 00 00 24 b ffc180f4 <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc180d4: 7c 00 00 a6 mfmsr r0 ffc180d8: 7d 70 42 a6 mfsprg r11,0 ffc180dc: 7c 0b 58 78 andc r11,r0,r11 ffc180e0: 7d 60 01 24 mtmsr r11 ffc180e4: 81 69 00 18 lwz r11,24(r9) ffc180e8: 7d 7f fb 78 or r31,r11,r31 ffc180ec: 93 e9 00 18 stw r31,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc180f0: 7c 00 01 24 mtmsr r0 } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); ffc180f4: 48 00 4a d1 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc180f8: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; ffc180fc: 48 00 00 0c b ffc18108 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); ffc18100: 48 00 4a c5 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc18104: 38 00 00 0b li r0,11 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc18108: 7c 03 03 78 mr r3,r0 ffc1810c: 80 01 00 24 lwz r0,36(r1) ffc18110: 83 e1 00 1c lwz r31,28(r1) ffc18114: 38 21 00 20 addi r1,r1,32 ffc18118: 7c 08 03 a6 mtlr r0 ffc1811c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07dcc : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { ffc07dcc: 94 21 ff c0 stwu r1,-64(r1) ffc07dd0: 7c 08 02 a6 mflr r0 ffc07dd4: 93 81 00 30 stw r28,48(r1) Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) ffc07dd8: 7d 1c 43 79 mr. r28,r8 <== ALWAYS TAKEN size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { ffc07ddc: 93 21 00 24 stw r25,36(r1) ffc07de0: 7c b9 2b 78 mr r25,r5 ffc07de4: 93 41 00 28 stw r26,40(r1) ffc07de8: 7c 9a 23 78 mr r26,r4 ffc07dec: 93 61 00 2c stw r27,44(r1) ffc07df0: 7c 7b 1b 78 mr r27,r3 <== ALWAYS TAKEN Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) ffc07df4: 38 60 00 09 li r3,9 size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { ffc07df8: 93 c1 00 38 stw r30,56(r1) ffc07dfc: 7c de 33 78 mr r30,r6 <== ALWAYS TAKEN ffc07e00: 90 01 00 44 stw r0,68(r1) ffc07e04: 93 01 00 20 stw r24,32(r1) ffc07e08: 93 a1 00 34 stw r29,52(r1) ffc07e0c: 93 e1 00 3c stw r31,60(r1) Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) ffc07e10: 41 82 01 04 beq- ffc07f14 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) ffc07e14: 2f 9b 00 00 cmpwi cr7,r27,0 ffc07e18: 38 60 00 03 li r3,3 ffc07e1c: 41 9e 00 f8 beq- cr7,ffc07f14 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { ffc07e20: 70 e0 80 00 andi. r0,r7,32768 ffc07e24: 40 82 00 30 bne- ffc07e54 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ffc07e28: 2f 84 00 00 cmpwi cr7,r4,0 ffc07e2c: 38 00 00 00 li r0,0 ffc07e30: 41 9e 00 18 beq- cr7,ffc07e48 ffc07e34: 3d 20 00 00 lis r9,0 ffc07e38: 88 09 26 64 lbz r0,9828(r9) <== ALWAYS TAKEN ffc07e3c: 7c 04 00 10 subfc r0,r4,r0 <== ALWAYS TAKEN ffc07e40: 38 00 00 00 li r0,0 ffc07e44: 7c 00 01 14 adde r0,r0,r0 if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) ) ffc07e48: 2f 80 00 00 cmpwi cr7,r0,0 ffc07e4c: 38 60 00 13 li r3,19 ffc07e50: 41 9e 00 c4 beq- cr7,ffc07f14 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); ffc07e54: 3f e0 00 00 lis r31,0 ffc07e58: 80 7f 27 64 lwz r3,10084(r31) * This function allocates a task control block from * the inactive chain of free task control blocks. */ RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ); ffc07e5c: 3f 00 00 00 lis r24,0 <== ALWAYS TAKEN ffc07e60: 3b 18 2b 2c addi r24,r24,11052 ffc07e64: 48 00 09 09 bl ffc0876c <_API_Mutex_Lock> <== ALWAYS TAKEN ffc07e68: 7f 03 c3 78 mr r3,r24 <== ALWAYS TAKEN ffc07e6c: 48 00 13 c9 bl ffc09234 <_Objects_Allocate> <== ALWAYS TAKEN * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { ffc07e70: 7c 7d 1b 79 mr. r29,r3 <== ALWAYS TAKEN ffc07e74: 40 a2 00 14 bne+ ffc07e88 _RTEMS_Unlock_allocator(); ffc07e78: 80 7f 27 64 lwz r3,10084(r31) ffc07e7c: 48 00 09 71 bl ffc087ec <_API_Mutex_Unlock> <== ALWAYS TAKEN ffc07e80: 38 60 00 05 li r3,5 return RTEMS_TOO_MANY; ffc07e84: 48 00 00 90 b ffc07f14 <== ALWAYS TAKEN /* * Initialize the core thread for this task. */ status = _Thread_Initialize( ffc07e88: 7c 2b 0b 78 mr r11,r1 <== ALWAYS TAKEN ffc07e8c: 97 6b 00 18 stwu r27,24(r11) <== ALWAYS TAKEN ffc07e90: 6b c9 01 00 xori r9,r30,256 ffc07e94: 57 c0 07 fe clrlwi r0,r30,31 ffc07e98: 39 80 00 00 li r12,0 <== ALWAYS TAKEN ffc07e9c: 90 01 00 0c stw r0,12(r1) ffc07ea0: 7f 03 c3 78 mr r3,r24 ffc07ea4: 7f 26 cb 78 mr r6,r25 ffc07ea8: 91 81 00 08 stw r12,8(r1) ffc07eac: 7f 48 d3 78 mr r8,r26 <== ALWAYS TAKEN ffc07eb0: 55 29 c7 fe rlwinm r9,r9,24,31,31 ffc07eb4: 91 61 00 10 stw r11,16(r1) ffc07eb8: 7f a4 eb 78 mr r4,r29 ffc07ebc: 38 a0 00 00 li r5,0 ffc07ec0: 38 e0 00 01 li r7,1 ffc07ec4: 57 ca bf fe rlwinm r10,r30,23,31,31 ffc07ec8: 48 00 24 b9 bl ffc0a380 <_Thread_Initialize> <== ALWAYS TAKEN NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { ffc07ecc: 2f 83 00 00 cmpwi cr7,r3,0 <== ALWAYS TAKEN ffc07ed0: 80 7d 00 08 lwz r3,8(r29) ffc07ed4: 40 9e 00 20 bne- cr7,ffc07ef4 */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( ffc07ed8: 48 00 17 ed bl ffc096c4 <_Objects_Get_information_id> <== ALWAYS TAKEN ffc07edc: 7f a4 eb 78 mr r4,r29 ffc07ee0: 48 00 17 41 bl ffc09620 <_Objects_Free> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( is_global ) _Objects_MP_Free_global_object( the_global_object ); #endif _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); ffc07ee4: 80 7f 27 64 lwz r3,10084(r31) ffc07ee8: 48 00 09 05 bl ffc087ec <_API_Mutex_Unlock> <== ALWAYS TAKEN ffc07eec: 38 60 00 0d li r3,13 return RTEMS_UNSATISFIED; ffc07ef0: 48 00 00 24 b ffc07f14 <== ALWAYS TAKEN } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; ffc07ef4: 81 3d 01 40 lwz r9,320(r29) ffc07ef8: 6b de 04 00 xori r30,r30,1024 <== ALWAYS TAKEN ffc07efc: 57 de b7 fe rlwinm r30,r30,22,31,31 *id = the_thread->Object.id; ffc07f00: 90 7c 00 00 stw r3,0(r28) } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; ffc07f04: 9b c9 00 08 stb r30,8(r9) ); } #endif _RTEMS_Unlock_allocator(); ffc07f08: 80 7f 27 64 lwz r3,10084(r31) ffc07f0c: 48 00 08 e1 bl ffc087ec <_API_Mutex_Unlock> <== ALWAYS TAKEN ffc07f10: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; } ffc07f14: 80 01 00 44 lwz r0,68(r1) ffc07f18: 83 01 00 20 lwz r24,32(r1) <== ALWAYS TAKEN ffc07f1c: 7c 08 03 a6 mtlr r0 ffc07f20: 83 21 00 24 lwz r25,36(r1) ffc07f24: 83 41 00 28 lwz r26,40(r1) ffc07f28: 83 61 00 2c lwz r27,44(r1) ffc07f2c: 83 81 00 30 lwz r28,48(r1) ffc07f30: 83 a1 00 34 lwz r29,52(r1) <== ALWAYS TAKEN ffc07f34: 83 c1 00 38 lwz r30,56(r1) ffc07f38: 83 e1 00 3c lwz r31,60(r1) ffc07f3c: 38 21 00 40 addi r1,r1,64 ffc07f40: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07f44 : */ rtems_status_code rtems_task_delete( rtems_id id ) { ffc07f44: 94 21 ff e0 stwu r1,-32(r1) ffc07f48: 7c 08 02 a6 mflr r0 ffc07f4c: 93 c1 00 18 stw r30,24(r1) register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); ffc07f50: 3f c0 00 00 lis r30,0 */ rtems_status_code rtems_task_delete( rtems_id id ) { ffc07f54: 93 e1 00 1c stw r31,28(r1) ffc07f58: 7c 7f 1b 78 mr r31,r3 register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); ffc07f5c: 80 7e 27 64 lwz r3,10084(r30) <== ALWAYS TAKEN */ rtems_status_code rtems_task_delete( rtems_id id ) { ffc07f60: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); ffc07f64: 48 00 08 09 bl ffc0876c <_API_Mutex_Lock> <== ALWAYS TAKEN the_thread = _Thread_Get( id, &location ); ffc07f68: 7f e3 fb 78 mr r3,r31 ffc07f6c: 38 81 00 08 addi r4,r1,8 ffc07f70: 48 00 23 5d bl ffc0a2cc <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc07f74: 80 01 00 08 lwz r0,8(r1) Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); the_thread = _Thread_Get( id, &location ); ffc07f78: 7c 7f 1b 78 mr r31,r3 switch ( location ) { ffc07f7c: 2f 80 00 00 cmpwi cr7,r0,0 ffc07f80: 40 9e 00 38 bne- cr7,ffc07fb8 case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); ffc07f84: 80 63 00 08 lwz r3,8(r3) ffc07f88: 48 00 17 3d bl ffc096c4 <_Objects_Get_information_id> <== ALWAYS TAKEN 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); ffc07f8c: 7f e4 fb 78 mr r4,r31 ffc07f90: 48 00 1f 01 bl ffc09e90 <_Thread_Close> <== ALWAYS TAKEN ffc07f94: 80 7f 00 08 lwz r3,8(r31) ffc07f98: 48 00 17 2d bl ffc096c4 <_Objects_Get_information_id> <== ALWAYS TAKEN ffc07f9c: 7f e4 fb 78 mr r4,r31 ffc07fa0: 48 00 16 81 bl ffc09620 <_Objects_Free> <== ALWAYS TAKEN _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); ffc07fa4: 80 7e 27 64 lwz r3,10084(r30) ffc07fa8: 48 00 08 45 bl ffc087ec <_API_Mutex_Unlock> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc07fac: 48 00 23 01 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc07fb0: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc07fb4: 48 00 00 10 b ffc07fc4 <== ALWAYS TAKEN case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); ffc07fb8: 80 7e 27 64 lwz r3,10084(r30) ffc07fbc: 48 00 08 31 bl ffc087ec <_API_Mutex_Unlock> <== ALWAYS TAKEN ffc07fc0: 38 60 00 04 li r3,4 return RTEMS_INVALID_ID; } ffc07fc4: 80 01 00 24 lwz r0,36(r1) ffc07fc8: 83 c1 00 18 lwz r30,24(r1) ffc07fcc: 7c 08 03 a6 mtlr r0 ffc07fd0: 83 e1 00 1c lwz r31,28(r1) ffc07fd4: 38 21 00 20 addi r1,r1,32 ffc07fd8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a31c : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { ffc0a31c: 94 21 ff e0 stwu r1,-32(r1) ffc0a320: 7c 08 02 a6 mflr r0 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) ffc0a324: 3d 20 00 00 lis r9,0 rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { ffc0a328: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) ffc0a32c: 88 09 20 94 lbz r0,8340(r9) rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { ffc0a330: 93 c1 00 18 stw r30,24(r1) ffc0a334: 7c be 2b 78 mr r30,r5 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) ffc0a338: 2f 80 00 00 cmpwi cr7,r0,0 rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { ffc0a33c: 93 e1 00 1c stw r31,28(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) ffc0a340: 38 00 00 16 li r0,22 rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { ffc0a344: 7c 9f 23 78 mr r31,r4 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) ffc0a348: 41 9e 00 90 beq- cr7,ffc0a3d8 return RTEMS_NOT_CONFIGURED; if ( !note ) ffc0a34c: 2f 85 00 00 cmpwi cr7,r5,0 ffc0a350: 38 00 00 09 li r0,9 ffc0a354: 41 9e 00 84 beq- cr7,ffc0a3d8 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) ffc0a358: 2b 84 00 0f cmplwi cr7,r4,15 ffc0a35c: 38 00 00 0a li r0,10 ffc0a360: 41 9d 00 78 bgt- cr7,ffc0a3d8 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || ffc0a364: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a368: 41 9e 00 18 beq- cr7,ffc0a380 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { ffc0a36c: 3d 60 00 00 lis r11,0 ffc0a370: 81 6b 27 b0 lwz r11,10160(r11) ffc0a374: 80 0b 00 08 lwz r0,8(r11) ffc0a378: 7f 83 00 00 cmpw cr7,r3,r0 ffc0a37c: 40 be 00 28 bne+ cr7,ffc0a3a4 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; ffc0a380: 3d 20 00 00 lis r9,0 ffc0a384: 81 29 27 b0 lwz r9,10160(r9) ffc0a388: 3b ff 00 08 addi r31,r31,8 ffc0a38c: 57 ff 10 3a rlwinm r31,r31,2,0,29 ffc0a390: 81 29 01 40 lwz r9,320(r9) ffc0a394: 38 00 00 00 li r0,0 ffc0a398: 7d 29 f8 2e lwzx r9,r9,r31 ffc0a39c: 91 3e 00 00 stw r9,0(r30) return RTEMS_SUCCESSFUL; ffc0a3a0: 48 00 00 38 b ffc0a3d8 <== ALWAYS TAKEN } the_thread = _Thread_Get( id, &location ); ffc0a3a4: 38 81 00 08 addi r4,r1,8 ffc0a3a8: 48 00 27 39 bl ffc0cae0 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc0a3ac: 81 21 00 08 lwz r9,8(r1) ffc0a3b0: 38 00 00 04 li r0,4 ffc0a3b4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a3b8: 40 9e 00 20 bne- cr7,ffc0a3d8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; ffc0a3bc: 81 23 01 40 lwz r9,320(r3) ffc0a3c0: 3b ff 00 08 addi r31,r31,8 ffc0a3c4: 57 ff 10 3a rlwinm r31,r31,2,0,29 ffc0a3c8: 7c 09 f8 2e lwzx r0,r9,r31 ffc0a3cc: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc0a3d0: 48 00 26 f1 bl ffc0cac0 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0a3d4: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a3d8: 7c 03 03 78 mr r3,r0 ffc0a3dc: 80 01 00 24 lwz r0,36(r1) ffc0a3e0: 83 c1 00 18 lwz r30,24(r1) ffc0a3e4: 7c 08 03 a6 mtlr r0 ffc0a3e8: 83 e1 00 1c lwz r31,28(r1) ffc0a3ec: 38 21 00 20 addi r1,r1,32 ffc0a3f0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc07fdc : rtems_id *id ) { Objects_Name_or_id_lookup_errors status; if ( !id ) ffc07fdc: 7c a6 2b 79 mr. r6,r5 rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { ffc07fe0: 7c 08 02 a6 mflr r0 ffc07fe4: 94 21 ff f8 stwu r1,-8(r1) ffc07fe8: 7c 85 23 78 mr r5,r4 ffc07fec: 90 01 00 0c stw r0,12(r1) ffc07ff0: 7c 60 1b 78 mr r0,r3 Objects_Name_or_id_lookup_errors status; if ( !id ) ffc07ff4: 38 60 00 09 li r3,9 ffc07ff8: 41 82 00 44 beq- ffc0803c return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { ffc07ffc: 2f 80 00 00 cmpwi cr7,r0,0 <== ALWAYS TAKEN ffc08000: 40 9e 00 1c bne- cr7,ffc0801c *id = _Thread_Executing->Object.id; ffc08004: 3d 20 00 00 lis r9,0 ffc08008: 81 29 27 6c lwz r9,10092(r9) ffc0800c: 38 60 00 00 li r3,0 ffc08010: 80 09 00 08 lwz r0,8(r9) ffc08014: 90 06 00 00 stw r0,0(r6) return RTEMS_SUCCESSFUL; ffc08018: 48 00 00 24 b ffc0803c <== ALWAYS TAKEN } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); ffc0801c: 3c 60 00 00 lis r3,0 ffc08020: 38 63 2b 2c addi r3,r3,11052 ffc08024: 7c 04 03 78 mr r4,r0 ffc08028: 48 00 19 45 bl ffc0996c <_Objects_Name_to_id_u32> <== ALWAYS TAKEN return _Status_Object_name_errors_to_status[ status ]; ffc0802c: 3d 20 ff c2 lis r9,-62 ffc08030: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc08034: 39 29 c6 fc addi r9,r9,-14596 ffc08038: 7c 69 18 2e lwzx r3,r9,r3 } ffc0803c: 80 01 00 0c lwz r0,12(r1) ffc08040: 38 21 00 08 addi r1,r1,8 ffc08044: 7c 08 03 a6 mtlr r0 ffc08048: 4e 80 00 20 blr <== ALWAYS TAKEN ffc18530 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { ffc18530: 94 21 ff e8 stwu r1,-24(r1) ffc18534: 7c 08 02 a6 mflr r0 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc18538: 38 81 00 08 addi r4,r1,8 */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { ffc1853c: 90 01 00 1c stw r0,28(r1) register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc18540: 48 00 46 f1 bl ffc1cc30 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc18544: 38 00 00 04 li r0,4 ffc18548: 81 21 00 08 lwz r9,8(r1) ffc1854c: 2f 89 00 00 cmpwi cr7,r9,0 ffc18550: 40 9e 00 24 bne- cr7,ffc18574 case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { ffc18554: 80 03 00 10 lwz r0,16(r3) ffc18558: 70 09 00 02 andi. r9,r0,2 ffc1855c: 40 a2 00 10 bne+ ffc1856c _Thread_Enable_dispatch(); ffc18560: 48 00 46 65 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc18564: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; ffc18568: 48 00 00 0c b ffc18574 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); ffc1856c: 48 00 46 59 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc18570: 38 00 00 0f li r0,15 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc18574: 7c 03 03 78 mr r3,r0 ffc18578: 80 01 00 1c lwz r0,28(r1) ffc1857c: 38 21 00 18 addi r1,r1,24 ffc18580: 7c 08 03 a6 mtlr r0 ffc18584: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0f7b4 : ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc0f7b4: 2c 05 00 00 cmpwi r5,0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { ffc0f7b8: 94 21 ff f0 stwu r1,-16(r1) ffc0f7bc: 7c 08 02 a6 mflr r0 ffc0f7c0: 93 e1 00 0c stw r31,12(r1) ffc0f7c4: 90 01 00 14 stw r0,20(r1) ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc0f7c8: 38 00 00 09 li r0,9 ffc0f7cc: 41 82 01 5c beq- ffc0f928 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; ffc0f7d0: 3d 20 00 00 lis r9,0 ffc0f7d4: 81 29 27 6c lwz r9,10092(r9) api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc0f7d8: 80 09 00 7c lwz r0,124(r9) executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc0f7dc: 89 49 00 75 lbz r10,117(r9) if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc0f7e0: 2f 80 00 00 cmpwi cr7,r0,0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc0f7e4: 81 69 01 40 lwz r11,320(r9) asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc0f7e8: 7d 4a 00 34 cntlzw r10,r10 ffc0f7ec: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc0f7f0: 55 4a 40 2e rlwinm r10,r10,8,0,23 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc0f7f4: 41 9e 00 08 beq- cr7,ffc0f7fc old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; ffc0f7f8: 61 4a 02 00 ori r10,r10,512 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc0f7fc: 89 0b 00 08 lbz r8,8(r11) #ifndef ASM static inline uint32_t _CPU_ISR_Get_level( void ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc0f800: 38 00 00 00 li r0,0 ffc0f804: 7d 08 00 34 cntlzw r8,r8 ffc0f808: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc0f80c: 55 08 50 2a rlwinm r8,r8,10,0,21 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc0f810: 7d 0a 53 78 or r10,r8,r10 <== ALWAYS TAKEN ffc0f814: 7c 00 00 a6 mfmsr r0 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc0f818: 70 88 01 00 andi. r8,r4,256 old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; ffc0f81c: 68 00 80 00 xori r0,r0,32768 ffc0f820: 54 00 8f fe rlwinm r0,r0,17,31,31 ffc0f824: 7d 4a 03 78 or r10,r10,r0 ffc0f828: 91 45 00 00 stw r10,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc0f82c: 41 82 00 10 beq- ffc0f83c executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; ffc0f830: 68 60 01 00 xori r0,r3,256 ffc0f834: 54 00 c7 fe rlwinm r0,r0,24,31,31 ffc0f838: 98 09 00 75 stb r0,117(r9) if ( mask & RTEMS_TIMESLICE_MASK ) { ffc0f83c: 70 8a 02 00 andi. r10,r4,512 ffc0f840: 41 82 00 28 beq- ffc0f868 if ( _Modes_Is_timeslice(mode_set) ) { ffc0f844: 70 60 02 00 andi. r0,r3,512 ffc0f848: 41 82 00 1c beq- ffc0f864 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0f84c: 3d 40 00 00 lis r10,0 ffc0f850: 80 0a 27 24 lwz r0,10020(r10) if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; ffc0f854: 39 40 00 01 li r10,1 ffc0f858: 91 49 00 7c stw r10,124(r9) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0f85c: 90 09 00 78 stw r0,120(r9) ffc0f860: 48 00 00 08 b ffc0f868 <== ALWAYS TAKEN } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; ffc0f864: 90 09 00 7c stw r0,124(r9) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc0f868: 70 80 00 01 andi. r0,r4,1 ffc0f86c: 41 82 00 2c beq- ffc0f898 } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc0f870: 38 00 00 00 li r0,0 ffc0f874: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc0f878: 70 68 00 01 andi. r8,r3,1 ffc0f87c: 40 82 00 10 bne- ffc0f88c static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc0f880: 7d 50 42 a6 mfsprg r10,0 msr |= ppc_interrupt_get_disable_mask(); ffc0f884: 7d 40 03 78 or r0,r10,r0 ffc0f888: 48 00 00 0c b ffc0f894 <== ALWAYS TAKEN ffc0f88c: 7d 50 42 a6 mfsprg r10,0 } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc0f890: 7c 00 50 78 andc r0,r0,r10 } _CPU_MSR_SET(msr); ffc0f894: 7c 00 01 24 mtmsr r0 */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { ffc0f898: 70 8a 04 00 andi. r10,r4,1024 ffc0f89c: 41 82 00 5c beq- ffc0f8f8 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc0f8a0: 68 63 04 00 xori r3,r3,1024 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc0f8a4: 88 0b 00 08 lbz r0,8(r11) * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc0f8a8: 54 63 b7 fe rlwinm r3,r3,22,31,31 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc0f8ac: 7f 80 18 00 cmpw cr7,r0,r3 ffc0f8b0: 41 9e 00 48 beq- cr7,ffc0f8f8 needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; ffc0f8b4: 98 6b 00 08 stb r3,8(r11) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0f8b8: 7c 00 00 a6 mfmsr r0 ffc0f8bc: 7d 50 42 a6 mfsprg r10,0 ffc0f8c0: 7c 0a 50 78 andc r10,r0,r10 ffc0f8c4: 7d 40 01 24 mtmsr r10 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; ffc0f8c8: 81 0b 00 18 lwz r8,24(r11) information->signals_pending = information->signals_posted; ffc0f8cc: 81 4b 00 14 lwz r10,20(r11) information->signals_posted = _signals; ffc0f8d0: 91 0b 00 14 stw r8,20(r11) rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; ffc0f8d4: 91 4b 00 18 stw r10,24(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0f8d8: 7c 00 01 24 mtmsr r0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc0f8dc: 80 0b 00 14 lwz r0,20(r11) ffc0f8e0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f8e4: 41 9e 00 14 beq- cr7,ffc0f8f8 if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; ffc0f8e8: 38 00 00 01 li r0,1 ffc0f8ec: 98 09 00 74 stb r0,116(r9) ffc0f8f0: 3b e0 00 01 li r31,1 ffc0f8f4: 48 00 00 08 b ffc0f8fc <== ALWAYS TAKEN ffc0f8f8: 3b e0 00 00 li r31,0 } } } if ( _System_state_Is_up( _System_state_Get() ) ) ffc0f8fc: 3d 20 00 00 lis r9,0 ffc0f900: 80 09 27 90 lwz r0,10128(r9) ffc0f904: 2f 80 00 03 cmpwi cr7,r0,3 ffc0f908: 40 be 00 1c bne+ cr7,ffc0f924 <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) ffc0f90c: 48 00 03 49 bl ffc0fc54 <_Thread_Evaluate_mode> <== ALWAYS TAKEN ffc0f910: 2f 83 00 00 cmpwi cr7,r3,0 ffc0f914: 40 9e 00 0c bne- cr7,ffc0f920 ffc0f918: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0f91c: 41 9e 00 08 beq- cr7,ffc0f924 _Thread_Dispatch(); ffc0f920: 4b ff a7 9d bl ffc0a0bc <_Thread_Dispatch> <== ALWAYS TAKEN ffc0f924: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; } ffc0f928: 7c 03 03 78 mr r3,r0 ffc0f92c: 80 01 00 14 lwz r0,20(r1) ffc0f930: 83 e1 00 0c lwz r31,12(r1) ffc0f934: 38 21 00 10 addi r1,r1,16 ffc0f938: 7c 08 03 a6 mtlr r0 ffc0f93c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08fb0 : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { ffc08fb0: 94 21 ff e0 stwu r1,-32(r1) ffc08fb4: 7c 08 02 a6 mflr r0 ffc08fb8: 93 e1 00 1c stw r31,28(r1) ffc08fbc: 7c 9f 23 78 mr r31,r4 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc08fc0: 38 81 00 08 addi r4,r1,8 rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { ffc08fc4: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc08fc8: 48 00 23 11 bl ffc0b2d8 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc08fcc: 38 00 00 04 li r0,4 ffc08fd0: 81 21 00 08 lwz r9,8(r1) ffc08fd4: 2f 89 00 00 cmpwi cr7,r9,0 ffc08fd8: 40 9e 00 2c bne- cr7,ffc09004 case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { ffc08fdc: 7f e5 fb 78 mr r5,r31 ffc08fe0: 38 80 00 00 li r4,0 ffc08fe4: 48 00 2c dd bl ffc0bcc0 <_Thread_Restart> <== ALWAYS TAKEN ffc08fe8: 2f 83 00 00 cmpwi cr7,r3,0 ffc08fec: 41 be 00 10 beq+ cr7,ffc08ffc _Thread_Enable_dispatch(); ffc08ff0: 48 00 22 c9 bl ffc0b2b8 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc08ff4: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; ffc08ff8: 48 00 00 0c b ffc09004 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); ffc08ffc: 48 00 22 bd bl ffc0b2b8 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc09000: 38 00 00 0e li r0,14 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc09004: 7c 03 03 78 mr r3,r0 ffc09008: 80 01 00 24 lwz r0,36(r1) ffc0900c: 83 e1 00 1c lwz r31,28(r1) ffc09010: 38 21 00 20 addi r1,r1,32 ffc09014: 7c 08 03 a6 mtlr r0 ffc09018: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0c524 : */ rtems_status_code rtems_task_resume( rtems_id id ) { ffc0c524: 94 21 ff e8 stwu r1,-24(r1) ffc0c528: 7c 08 02 a6 mflr r0 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c52c: 38 81 00 08 addi r4,r1,8 */ rtems_status_code rtems_task_resume( rtems_id id ) { ffc0c530: 90 01 00 1c stw r0,28(r1) register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c534: 48 00 23 a5 bl ffc0e8d8 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc0c538: 38 00 00 04 li r0,4 ffc0c53c: 81 61 00 08 lwz r11,8(r1) ffc0c540: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0c544: 40 9e 00 2c bne- cr7,ffc0c570 case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { ffc0c548: 80 03 00 10 lwz r0,16(r3) ffc0c54c: 70 09 00 02 andi. r9,r0,2 ffc0c550: 41 a2 00 18 beq+ ffc0c568 _Thread_Resume( the_thread, true ); ffc0c554: 38 80 00 01 li r4,1 ffc0c558: 48 00 2d 69 bl ffc0f2c0 <_Thread_Resume> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc0c55c: 48 00 23 11 bl ffc0e86c <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0c560: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; ffc0c564: 48 00 00 0c b ffc0c570 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); ffc0c568: 48 00 23 05 bl ffc0e86c <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0c56c: 38 00 00 0e li r0,14 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0c570: 7c 03 03 78 mr r3,r0 ffc0c574: 80 01 00 1c lwz r0,28(r1) ffc0c578: 38 21 00 18 addi r1,r1,24 ffc0c57c: 7c 08 03 a6 mtlr r0 ffc0c580: 4e 80 00 20 blr <== ALWAYS TAKEN ffc13684 : #include #include rtems_id rtems_task_self(void) { ffc13684: 3d 20 00 00 lis r9,0 ffc13688: 81 29 27 8c lwz r9,10124(r9) return _Thread_Executing->Object.id; } ffc1368c: 80 69 00 08 lwz r3,8(r9) ffc13690: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0a598 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { ffc0a598: 94 21 ff e0 stwu r1,-32(r1) ffc0a59c: 7c 08 02 a6 mflr r0 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) ffc0a5a0: 3d 20 00 00 lis r9,0 rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { ffc0a5a4: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) ffc0a5a8: 88 09 20 94 lbz r0,8340(r9) rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { ffc0a5ac: 93 c1 00 18 stw r30,24(r1) ffc0a5b0: 7c be 2b 78 mr r30,r5 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) ffc0a5b4: 2f 80 00 00 cmpwi cr7,r0,0 rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { ffc0a5b8: 93 e1 00 1c stw r31,28(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) ffc0a5bc: 38 00 00 16 li r0,22 rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { ffc0a5c0: 7c 9f 23 78 mr r31,r4 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) ffc0a5c4: 41 9e 00 78 beq- cr7,ffc0a63c /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) ffc0a5c8: 2b 84 00 0f cmplwi cr7,r4,15 ffc0a5cc: 38 00 00 0a li r0,10 ffc0a5d0: 41 9d 00 6c bgt- cr7,ffc0a63c /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || ffc0a5d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a5d8: 41 9e 00 18 beq- cr7,ffc0a5f0 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { ffc0a5dc: 3d 60 00 00 lis r11,0 ffc0a5e0: 81 6b 27 b0 lwz r11,10160(r11) ffc0a5e4: 80 0b 00 08 lwz r0,8(r11) ffc0a5e8: 7f 83 00 00 cmpw cr7,r3,r0 ffc0a5ec: 40 be 00 20 bne+ cr7,ffc0a60c api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; ffc0a5f0: 3d 20 00 00 lis r9,0 ffc0a5f4: 81 29 27 b0 lwz r9,10160(r9) ffc0a5f8: 3b ff 00 08 addi r31,r31,8 ffc0a5fc: 57 ff 10 3a rlwinm r31,r31,2,0,29 ffc0a600: 81 29 01 40 lwz r9,320(r9) ffc0a604: 7f c9 f9 2e stwx r30,r9,r31 ffc0a608: 48 00 00 30 b ffc0a638 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); ffc0a60c: 38 81 00 08 addi r4,r1,8 ffc0a610: 48 00 24 d1 bl ffc0cae0 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc0a614: 81 21 00 08 lwz r9,8(r1) ffc0a618: 38 00 00 04 li r0,4 ffc0a61c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a620: 40 9e 00 1c bne- cr7,ffc0a63c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; ffc0a624: 81 23 01 40 lwz r9,320(r3) ffc0a628: 3b ff 00 08 addi r31,r31,8 ffc0a62c: 57 ff 10 3a rlwinm r31,r31,2,0,29 ffc0a630: 7f c9 f9 2e stwx r30,r9,r31 _Thread_Enable_dispatch(); ffc0a634: 48 00 24 8d bl ffc0cac0 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0a638: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a63c: 7c 03 03 78 mr r3,r0 ffc0a640: 80 01 00 24 lwz r0,36(r1) ffc0a644: 83 c1 00 18 lwz r30,24(r1) ffc0a648: 7c 08 03 a6 mtlr r0 ffc0a64c: 83 e1 00 1c lwz r31,28(r1) ffc0a650: 38 21 00 20 addi r1,r1,32 ffc0a654: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0da44 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0da44: 94 21 ff e0 stwu r1,-32(r1) ffc0da48: 7c 08 02 a6 mflr r0 ffc0da4c: 93 e1 00 1c stw r31,28(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0da50: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0da54: 93 c1 00 18 stw r30,24(r1) ffc0da58: 7c be 2b 78 mr r30,r5 ffc0da5c: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0da60: 41 82 00 18 beq- ffc0da78 ffc0da64: 3d 20 00 00 lis r9,0 ffc0da68: 89 29 26 a4 lbz r9,9892(r9) ffc0da6c: 38 00 00 13 li r0,19 ffc0da70: 7f 9f 48 40 cmplw cr7,r31,r9 ffc0da74: 41 9d 00 68 bgt- cr7,ffc0dadc !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) ffc0da78: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0da7c: 38 00 00 09 li r0,9 ffc0da80: 41 9e 00 5c beq- cr7,ffc0dadc return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); ffc0da84: 38 81 00 08 addi r4,r1,8 ffc0da88: 48 00 25 f9 bl ffc10080 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc0da8c: 81 21 00 08 lwz r9,8(r1) ffc0da90: 38 00 00 04 li r0,4 ffc0da94: 2f 89 00 00 cmpwi cr7,r9,0 ffc0da98: 40 9e 00 44 bne- cr7,ffc0dadc case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; if ( new_priority != RTEMS_CURRENT_PRIORITY ) { ffc0da9c: 2f 9f 00 00 cmpwi cr7,r31,0 the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; ffc0daa0: 80 03 00 14 lwz r0,20(r3) ffc0daa4: 90 1e 00 00 stw r0,0(r30) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { ffc0daa8: 41 9e 00 2c beq- cr7,ffc0dad4 the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || ffc0daac: 80 03 00 1c lwz r0,28(r3) case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; if ( new_priority != RTEMS_CURRENT_PRIORITY ) { the_thread->real_priority = new_priority; ffc0dab0: 93 e3 00 18 stw r31,24(r3) if ( the_thread->resource_count == 0 || ffc0dab4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0dab8: 41 9e 00 10 beq- cr7,ffc0dac8 the_thread->current_priority > new_priority ) ffc0dabc: 80 03 00 14 lwz r0,20(r3) ffc0dac0: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0dac4: 40 9d 00 10 ble- cr7,ffc0dad4 <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); ffc0dac8: 7f e4 fb 78 mr r4,r31 ffc0dacc: 38 a0 00 00 li r5,0 ffc0dad0: 48 00 1e bd bl ffc0f98c <_Thread_Change_priority> <== ALWAYS TAKEN } _Thread_Enable_dispatch(); ffc0dad4: 48 00 25 41 bl ffc10014 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0dad8: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0dadc: 7c 03 03 78 mr r3,r0 ffc0dae0: 80 01 00 24 lwz r0,36(r1) ffc0dae4: 83 c1 00 18 lwz r30,24(r1) ffc0dae8: 7c 08 03 a6 mtlr r0 ffc0daec: 83 e1 00 1c lwz r31,28(r1) ffc0daf0: 38 21 00 20 addi r1,r1,32 ffc0daf4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08104 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { ffc08104: 94 21 ff e0 stwu r1,-32(r1) ffc08108: 7c 08 02 a6 mflr r0 ffc0810c: 93 c1 00 18 stw r30,24(r1) register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) ffc08110: 7c 9e 23 79 mr. r30,r4 rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { ffc08114: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) ffc08118: 38 00 00 09 li r0,9 rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { ffc0811c: 93 e1 00 1c stw r31,28(r1) ffc08120: 7c bf 2b 78 mr r31,r5 register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) ffc08124: 41 82 00 4c beq- ffc08170 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); ffc08128: 38 81 00 08 addi r4,r1,8 ffc0812c: 48 00 21 a1 bl ffc0a2cc <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc08130: 81 21 00 08 lwz r9,8(r1) ffc08134: 38 00 00 04 li r0,4 <== ALWAYS TAKEN ffc08138: 2f 89 00 00 cmpwi cr7,r9,0 ffc0813c: 40 9e 00 34 bne- cr7,ffc08170 case OBJECTS_LOCAL: if ( _Thread_Start( ffc08140: 7f c5 f3 78 mr r5,r30 ffc08144: 7f e7 fb 78 mr r7,r31 <== ALWAYS TAKEN ffc08148: 38 80 00 00 li r4,0 ffc0814c: 38 c0 00 00 li r6,0 ffc08150: 48 00 2e a9 bl ffc0aff8 <_Thread_Start> <== ALWAYS TAKEN ffc08154: 2f 83 00 00 cmpwi cr7,r3,0 ffc08158: 41 be 00 10 beq+ cr7,ffc08168 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); ffc0815c: 48 00 21 51 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc08160: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; ffc08164: 48 00 00 0c b ffc08170 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); ffc08168: 48 00 21 45 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc0816c: 38 00 00 0e li r0,14 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc08170: 7c 03 03 78 mr r3,r0 ffc08174: 80 01 00 24 lwz r0,36(r1) ffc08178: 83 c1 00 18 lwz r30,24(r1) ffc0817c: 7c 08 03 a6 mtlr r0 ffc08180: 83 e1 00 1c lwz r31,28(r1) <== ALWAYS TAKEN ffc08184: 38 21 00 20 addi r1,r1,32 ffc08188: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0818c : */ rtems_status_code rtems_task_suspend( rtems_id id ) { ffc0818c: 94 21 ff e8 stwu r1,-24(r1) ffc08190: 7c 08 02 a6 mflr r0 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc08194: 38 81 00 08 addi r4,r1,8 */ rtems_status_code rtems_task_suspend( rtems_id id ) { ffc08198: 90 01 00 1c stw r0,28(r1) register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0819c: 48 00 21 31 bl ffc0a2cc <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { ffc081a0: 38 00 00 04 li r0,4 ffc081a4: 81 61 00 08 lwz r11,8(r1) ffc081a8: 2f 8b 00 00 cmpwi cr7,r11,0 ffc081ac: 40 9e 00 28 bne- cr7,ffc081d4 case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { ffc081b0: 80 03 00 10 lwz r0,16(r3) ffc081b4: 70 09 00 02 andi. r9,r0,2 ffc081b8: 40 a2 00 14 bne+ ffc081cc _Thread_Suspend( the_thread ); ffc081bc: 48 00 2e a1 bl ffc0b05c <_Thread_Suspend> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc081c0: 48 00 20 ed bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc081c4: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; ffc081c8: 48 00 00 0c b ffc081d4 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); ffc081cc: 48 00 20 e1 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc081d0: 38 00 00 0f li r0,15 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc081d4: 7c 03 03 78 mr r3,r0 ffc081d8: 80 01 00 1c lwz r0,28(r1) ffc081dc: 38 21 00 18 addi r1,r1,24 ffc081e0: 7c 08 03 a6 mtlr r0 ffc081e4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc2df34 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { ffc2df34: 94 21 ff d8 stwu r1,-40(r1) ffc2df38: 7c 08 02 a6 mflr r0 ffc2df3c: 93 e1 00 24 stw r31,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) ffc2df40: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { ffc2df44: 90 01 00 2c stw r0,44(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) ffc2df48: 38 00 00 09 li r0,9 rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { ffc2df4c: 93 c1 00 20 stw r30,32(r1) ffc2df50: 7c be 2b 78 mr r30,r5 ffc2df54: 93 a1 00 1c stw r29,28(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) ffc2df58: 41 82 00 88 beq- ffc2dfe0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); ffc2df5c: 38 81 00 08 addi r4,r1,8 ffc2df60: 4b fe 1f 41 bl ffc0fea0 <_Thread_Get> <== ALWAYS TAKEN switch (location) { ffc2df64: 81 21 00 08 lwz r9,8(r1) rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); ffc2df68: 7c 7d 1b 78 mr r29,r3 switch (location) { ffc2df6c: 2f 89 00 00 cmpwi cr7,r9,0 ffc2df70: 38 00 00 04 li r0,4 ffc2df74: 40 9e 00 6c bne- cr7,ffc2dfe0 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; ffc2df78: 81 23 01 50 lwz r9,336(r3) while (tvp) { ffc2df7c: 48 00 00 1c b ffc2df98 <== ALWAYS TAKEN if (tvp->ptr == ptr) { ffc2df80: 80 09 00 04 lwz r0,4(r9) ffc2df84: 7f 80 f8 00 cmpw cr7,r0,r31 ffc2df88: 40 be 00 0c bne+ cr7,ffc2df94 tvp->dtor = dtor; ffc2df8c: 93 c9 00 10 stw r30,16(r9) ffc2df90: 48 00 00 48 b ffc2dfd8 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; ffc2df94: 81 29 00 00 lwz r9,0(r9) case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { ffc2df98: 2f 89 00 00 cmpwi cr7,r9,0 ffc2df9c: 40 9e ff e4 bne+ cr7,ffc2df80 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) ffc2dfa0: 38 60 00 14 li r3,20 ffc2dfa4: 4b fe 37 01 bl ffc116a4 <_Workspace_Allocate> <== ALWAYS TAKEN _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { ffc2dfa8: 2c 03 00 00 cmpwi r3,0 ffc2dfac: 40 a2 00 10 bne+ ffc2dfbc _Thread_Enable_dispatch(); ffc2dfb0: 4b fe 1e d1 bl ffc0fe80 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc2dfb4: 38 00 00 1a li r0,26 return RTEMS_NO_MEMORY; ffc2dfb8: 48 00 00 28 b ffc2dfe0 <== ALWAYS TAKEN } new->gval = *ptr; new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; ffc2dfbc: 80 1d 01 50 lwz r0,336(r29) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; ffc2dfc0: 81 3f 00 00 lwz r9,0(r31) new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; ffc2dfc4: 90 7d 01 50 stw r3,336(r29) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; ffc2dfc8: 91 23 00 08 stw r9,8(r3) new->ptr = ptr; ffc2dfcc: 93 e3 00 04 stw r31,4(r3) new->dtor = dtor; ffc2dfd0: 93 c3 00 10 stw r30,16(r3) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; ffc2dfd4: 90 03 00 00 stw r0,0(r3) the_thread->task_variables = new; _Thread_Enable_dispatch(); ffc2dfd8: 4b fe 1e a9 bl ffc0fe80 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc2dfdc: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc2dfe0: 7c 03 03 78 mr r3,r0 ffc2dfe4: 80 01 00 2c lwz r0,44(r1) ffc2dfe8: 83 a1 00 1c lwz r29,28(r1) ffc2dfec: 7c 08 03 a6 mtlr r0 ffc2dff0: 83 c1 00 20 lwz r30,32(r1) ffc2dff4: 83 e1 00 24 lwz r31,36(r1) ffc2dff8: 38 21 00 28 addi r1,r1,40 ffc2dffc: 4e 80 00 20 blr <== ALWAYS TAKEN ffc2e000 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { ffc2e000: 94 21 ff e0 stwu r1,-32(r1) ffc2e004: 7c 08 02 a6 mflr r0 ffc2e008: 93 e1 00 1c stw r31,28(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) ffc2e00c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { ffc2e010: 90 01 00 24 stw r0,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) ffc2e014: 38 00 00 09 li r0,9 ffc2e018: 41 82 00 70 beq- ffc2e088 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); ffc2e01c: 38 81 00 08 addi r4,r1,8 ffc2e020: 4b fe 1e 81 bl ffc0fea0 <_Thread_Get> <== ALWAYS TAKEN switch (location) { ffc2e024: 81 21 00 08 lwz r9,8(r1) ffc2e028: 38 00 00 04 li r0,4 ffc2e02c: 2f 89 00 00 cmpwi cr7,r9,0 ffc2e030: 40 9e 00 58 bne- cr7,ffc2e088 case OBJECTS_LOCAL: tvp = the_thread->task_variables; ffc2e034: 80 83 01 50 lwz r4,336(r3) while (tvp) { ffc2e038: 48 00 00 40 b ffc2e078 <== ALWAYS TAKEN if (tvp->ptr == ptr) { ffc2e03c: 80 04 00 04 lwz r0,4(r4) ffc2e040: 7f 80 f8 00 cmpw cr7,r0,r31 ffc2e044: 40 be 00 2c bne+ cr7,ffc2e070 if (prev) ffc2e048: 2f 89 00 00 cmpwi cr7,r9,0 ffc2e04c: 80 04 00 00 lwz r0,0(r4) ffc2e050: 41 9e 00 0c beq- cr7,ffc2e05c prev->next = tvp->next; ffc2e054: 90 09 00 00 stw r0,0(r9) ffc2e058: 48 00 00 08 b ffc2e060 <== ALWAYS TAKEN else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; ffc2e05c: 90 03 01 50 stw r0,336(r3) _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); ffc2e060: 48 00 00 d9 bl ffc2e138 <_RTEMS_Tasks_Invoke_task_variable_dtor> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc2e064: 4b fe 1e 1d bl ffc0fe80 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc2e068: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; ffc2e06c: 48 00 00 1c b ffc2e088 <== ALWAYS TAKEN } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; ffc2e070: 7c 89 23 78 mr r9,r4 ffc2e074: 80 84 00 00 lwz r4,0(r4) the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { ffc2e078: 2f 84 00 00 cmpwi cr7,r4,0 ffc2e07c: 40 9e ff c0 bne+ cr7,ffc2e03c return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc2e080: 4b fe 1e 01 bl ffc0fe80 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc2e084: 38 00 00 09 li r0,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc2e088: 7c 03 03 78 mr r3,r0 ffc2e08c: 80 01 00 24 lwz r0,36(r1) ffc2e090: 83 e1 00 1c lwz r31,28(r1) ffc2e094: 38 21 00 20 addi r1,r1,32 ffc2e098: 7c 08 03 a6 mtlr r0 ffc2e09c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc2e0a0 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc2e0a0: 94 21 ff e0 stwu r1,-32(r1) ffc2e0a4: 7c 08 02 a6 mflr r0 ffc2e0a8: 93 e1 00 1c stw r31,28(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) ffc2e0ac: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc2e0b0: 93 c1 00 18 stw r30,24(r1) ffc2e0b4: 7c be 2b 78 mr r30,r5 ffc2e0b8: 90 01 00 24 stw r0,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) ffc2e0bc: 41 82 00 5c beq- ffc2e118 return RTEMS_INVALID_ADDRESS; if ( !result ) ffc2e0c0: 2f 85 00 00 cmpwi cr7,r5,0 ffc2e0c4: 41 9e 00 54 beq- cr7,ffc2e118 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); ffc2e0c8: 38 81 00 08 addi r4,r1,8 ffc2e0cc: 4b fe 1d d5 bl ffc0fea0 <_Thread_Get> <== ALWAYS TAKEN switch (location) { ffc2e0d0: 81 21 00 08 lwz r9,8(r1) ffc2e0d4: 38 00 00 04 li r0,4 ffc2e0d8: 2f 89 00 00 cmpwi cr7,r9,0 ffc2e0dc: 40 9e 00 40 bne- cr7,ffc2e11c case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; ffc2e0e0: 81 23 01 50 lwz r9,336(r3) while (tvp) { ffc2e0e4: 48 00 00 28 b ffc2e10c <== ALWAYS TAKEN if (tvp->ptr == ptr) { ffc2e0e8: 80 09 00 04 lwz r0,4(r9) ffc2e0ec: 7f 80 f8 00 cmpw cr7,r0,r31 ffc2e0f0: 40 be 00 18 bne+ cr7,ffc2e108 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; ffc2e0f4: 80 09 00 0c lwz r0,12(r9) ffc2e0f8: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc2e0fc: 4b fe 1d 85 bl ffc0fe80 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc2e100: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; ffc2e104: 48 00 00 18 b ffc2e11c <== ALWAYS TAKEN } tvp = (rtems_task_variable_t *)tvp->next; ffc2e108: 81 29 00 00 lwz r9,0(r9) case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { ffc2e10c: 2f 89 00 00 cmpwi cr7,r9,0 ffc2e110: 40 9e ff d8 bne+ cr7,ffc2e0e8 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc2e114: 4b fe 1d 6d bl ffc0fe80 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; ffc2e118: 38 00 00 09 li r0,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc2e11c: 7c 03 03 78 mr r3,r0 ffc2e120: 80 01 00 24 lwz r0,36(r1) ffc2e124: 83 c1 00 18 lwz r30,24(r1) ffc2e128: 7c 08 03 a6 mtlr r0 ffc2e12c: 83 e1 00 1c lwz r31,28(r1) ffc2e130: 38 21 00 20 addi r1,r1,32 ffc2e134: 4e 80 00 20 blr <== ALWAYS TAKEN ffc081e8 : ffc081e8: 3d 20 00 00 lis r9,0 */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { ffc081ec: 94 21 ff f0 stwu r1,-16(r1) ffc081f0: 7c 08 02 a6 mflr r0 ffc081f4: 81 69 27 2c lwz r11,10028(r9) ffc081f8: 93 e1 00 0c stw r31,12(r1) ffc081fc: 7c 7f 1b 78 mr r31,r3 <== ALWAYS TAKEN ffc08200: 39 6b 00 01 addi r11,r11,1 ffc08204: 90 01 00 14 stw r0,20(r1) ffc08208: 93 c1 00 08 stw r30,8(r1) ffc0820c: 91 69 27 2c stw r11,10028(r9) _Thread_Disable_dispatch(); if ( ticks == 0 ) { ffc08210: 2f 83 00 00 cmpwi cr7,r3,0 ffc08214: 40 be 00 0c bne+ cr7,ffc08220 _Thread_Yield_processor(); ffc08218: 48 00 2f d5 bl ffc0b1ec <_Thread_Yield_processor> <== ALWAYS TAKEN ffc0821c: 48 00 00 4c b ffc08268 <== ALWAYS TAKEN } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); ffc08220: 3f c0 00 00 lis r30,0 ffc08224: 80 7e 27 6c lwz r3,10092(r30) ffc08228: 38 80 00 08 li r4,8 ffc0822c: 48 00 2a e5 bl ffc0ad10 <_Thread_Set_state> <== ALWAYS TAKEN _Watchdog_Initialize( &_Thread_Executing->Timer, ffc08230: 81 3e 27 6c lwz r9,10092(r30) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc08234: 3d 40 ff c1 lis r10,-63 _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( ffc08238: 81 69 00 08 lwz r11,8(r9) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0823c: 38 00 00 00 li r0,0 the_watchdog->routine = routine; ffc08240: 39 4a a0 70 addi r10,r10,-24464 the_watchdog->id = id; the_watchdog->user_data = user_data; ffc08244: 90 09 00 6c stw r0,108(r9) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08248: 3c 60 00 00 lis r3,0 <== ALWAYS TAKEN Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc0824c: 91 49 00 64 stw r10,100(r9) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08250: 38 63 2c a8 addi r3,r3,11432 ffc08254: 38 89 00 48 addi r4,r9,72 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc08258: 91 69 00 68 stw r11,104(r9) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0825c: 93 e9 00 54 stw r31,84(r9) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc08260: 90 09 00 50 stw r0,80(r9) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08264: 48 00 35 4d bl ffc0b7b0 <_Watchdog_Insert> <== ALWAYS TAKEN _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); ffc08268: 48 00 20 45 bl ffc0a2ac <_Thread_Enable_dispatch> <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } ffc0826c: 80 01 00 14 lwz r0,20(r1) ffc08270: 38 60 00 00 li r3,0 ffc08274: 83 c1 00 08 lwz r30,8(r1) <== ALWAYS TAKEN ffc08278: 7c 08 03 a6 mtlr r0 ffc0827c: 83 e1 00 0c lwz r31,12(r1) ffc08280: 38 21 00 10 addi r1,r1,16 ffc08284: 4e 80 00 20 blr <== ALWAYS TAKEN ffc09564 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { ffc09564: 94 21 ff e8 stwu r1,-24(r1) ffc09568: 7c 08 02 a6 mflr r0 Watchdog_Interval seconds; if ( !_TOD_Is_set ) ffc0956c: 3d 20 00 00 lis r9,0 */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { ffc09570: 90 01 00 1c stw r0,28(r1) Watchdog_Interval seconds; if ( !_TOD_Is_set ) ffc09574: 88 09 27 b8 lbz r0,10168(r9) */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { ffc09578: 93 c1 00 10 stw r30,16(r1) ffc0957c: 7c 7e 1b 78 mr r30,r3 Watchdog_Interval seconds; if ( !_TOD_Is_set ) ffc09580: 2f 80 00 00 cmpwi cr7,r0,0 */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { ffc09584: 93 81 00 08 stw r28,8(r1) Watchdog_Interval seconds; if ( !_TOD_Is_set ) ffc09588: 38 00 00 0b li r0,11 */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { ffc0958c: 93 a1 00 0c stw r29,12(r1) ffc09590: 93 e1 00 14 stw r31,20(r1) Watchdog_Interval seconds; if ( !_TOD_Is_set ) ffc09594: 41 9e 00 ac beq- cr7,ffc09640 return RTEMS_NOT_DEFINED; if ( !time_buffer ) ffc09598: 2f 83 00 00 cmpwi cr7,r3,0 ffc0959c: 38 00 00 09 li r0,9 ffc095a0: 41 9e 00 a0 beq- cr7,ffc09640 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; ffc095a4: 3b e0 00 00 li r31,0 ffc095a8: 93 e3 00 18 stw r31,24(r3) if ( !_TOD_Validate( time_buffer ) ) ffc095ac: 4b ff f1 81 bl ffc0872c <_TOD_Validate> <== ALWAYS TAKEN ffc095b0: 2f 83 00 00 cmpwi cr7,r3,0 ffc095b4: 41 9e 00 88 beq- cr7,ffc0963c return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); ffc095b8: 7f c3 f3 78 mr r3,r30 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc095bc: 3f a0 00 00 lis r29,0 time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); ffc095c0: 4b ff f0 e1 bl ffc086a0 <_TOD_To_seconds> <== ALWAYS TAKEN if ( seconds <= _TOD_Seconds_since_epoch() ) ffc095c4: 80 1d 27 d0 lwz r0,10192(r29) time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); ffc095c8: 7c 7e 1b 78 mr r30,r3 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc095cc: 7f 83 00 40 cmplw cr7,r3,r0 ffc095d0: 40 bd 00 6c ble+ cr7,ffc0963c ffc095d4: 3d 20 00 00 lis r9,0 ffc095d8: 81 69 27 b0 lwz r11,10160(r9) ffc095dc: 38 0b 00 01 addi r0,r11,1 ffc095e0: 90 09 27 b0 stw r0,10160(r9) return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); ffc095e4: 3f 80 00 00 lis r28,0 ffc095e8: 80 7c 27 f0 lwz r3,10224(r28) ffc095ec: 38 80 00 10 li r4,16 ffc095f0: 48 00 2c 75 bl ffc0c264 <_Thread_Set_state> <== ALWAYS TAKEN _Watchdog_Initialize( &_Thread_Executing->Timer, ffc095f4: 81 3c 27 f0 lwz r9,10224(r28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc095f8: 3d 60 ff c1 lis r11,-63 if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); _Watchdog_Initialize( ffc095fc: 80 09 00 08 lwz r0,8(r9) ffc09600: 39 6b b5 c4 addi r11,r11,-19004 ffc09604: 91 69 00 64 stw r11,100(r9) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); ffc09608: 3c 60 00 00 lis r3,0 ffc0960c: 38 63 2d 5c addi r3,r3,11612 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc09610: 90 09 00 68 stw r0,104(r9) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); ffc09614: 38 89 00 48 addi r4,r9,72 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc09618: 80 1d 27 d0 lwz r0,10192(r29) ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc0961c: 93 e9 00 6c stw r31,108(r9) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc09620: 7f c0 f0 50 subf r30,r0,r30 ffc09624: 93 c9 00 54 stw r30,84(r9) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc09628: 93 e9 00 50 stw r31,80(r9) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); ffc0962c: 48 00 37 bd bl ffc0cde8 <_Watchdog_Insert> <== ALWAYS TAKEN ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); ffc09630: 48 00 21 d1 bl ffc0b800 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc09634: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; ffc09638: 48 00 00 08 b ffc09640 <== ALWAYS TAKEN ffc0963c: 38 00 00 14 li r0,20 } ffc09640: 7c 03 03 78 mr r3,r0 ffc09644: 80 01 00 1c lwz r0,28(r1) ffc09648: 83 81 00 08 lwz r28,8(r1) ffc0964c: 7c 08 03 a6 mtlr r0 ffc09650: 83 a1 00 0c lwz r29,12(r1) ffc09654: 83 c1 00 10 lwz r30,16(r1) ffc09658: 83 e1 00 14 lwz r31,20(r1) ffc0965c: 38 21 00 18 addi r1,r1,24 ffc09660: 4e 80 00 20 blr <== ALWAYS TAKEN ffc18bd8 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { ffc18bd8: 94 21 ff e8 stwu r1,-24(r1) ffc18bdc: 7c 08 02 a6 mflr r0 ffc18be0: 7c 64 1b 78 mr r4,r3 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) ffc18be4: 3c 60 00 00 lis r3,0 ffc18be8: 90 01 00 1c stw r0,28(r1) ffc18bec: 38 63 72 44 addi r3,r3,29252 ffc18bf0: 38 a1 00 08 addi r5,r1,8 ffc18bf4: 48 00 34 59 bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc18bf8: 81 21 00 08 lwz r9,8(r1) ffc18bfc: 38 00 00 04 li r0,4 ffc18c00: 2f 89 00 00 cmpwi cr7,r9,0 ffc18c04: 40 9e 00 20 bne- cr7,ffc18c24 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) ffc18c08: 80 03 00 38 lwz r0,56(r3) ffc18c0c: 2f 80 00 04 cmpwi cr7,r0,4 ffc18c10: 41 9e 00 0c beq- cr7,ffc18c1c <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); ffc18c14: 38 63 00 10 addi r3,r3,16 ffc18c18: 48 00 5a 61 bl ffc1e678 <_Watchdog_Remove> <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc18c1c: 48 00 3f a9 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc18c20: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc18c24: 7c 03 03 78 mr r3,r0 ffc18c28: 80 01 00 1c lwz r0,28(r1) ffc18c2c: 38 21 00 18 addi r1,r1,24 ffc18c30: 7c 08 03 a6 mtlr r0 ffc18c34: 4e 80 00 20 blr <== ALWAYS TAKEN ffc18c38 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { ffc18c38: 94 21 ff e8 stwu r1,-24(r1) ffc18c3c: 7c 08 02 a6 mflr r0 ffc18c40: 93 e1 00 14 stw r31,20(r1) Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) ffc18c44: 7c 7f 1b 79 mr. r31,r3 ffc18c48: 38 60 00 03 li r3,3 rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { ffc18c4c: 93 c1 00 10 stw r30,16(r1) ffc18c50: 7c 9e 23 78 mr r30,r4 ffc18c54: 90 01 00 1c stw r0,28(r1) ffc18c58: 93 a1 00 0c stw r29,12(r1) Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) ffc18c5c: 41 82 00 80 beq- ffc18cdc return RTEMS_INVALID_NAME; if ( !id ) ffc18c60: 2f 84 00 00 cmpwi cr7,r4,0 ffc18c64: 38 60 00 09 li r3,9 ffc18c68: 41 9e 00 74 beq- cr7,ffc18cdc ffc18c6c: 3d 20 00 00 lis r9,0 ffc18c70: 81 69 28 24 lwz r11,10276(r9) ffc18c74: 38 0b 00 01 addi r0,r11,1 ffc18c78: 90 09 28 24 stw r0,10276(r9) * This function allocates a timer control block from * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) { return (Timer_Control *) _Objects_Allocate( &_Timer_Information ); ffc18c7c: 3f a0 00 00 lis r29,0 ffc18c80: 3b bd 72 44 addi r29,r29,29252 ffc18c84: 7f a3 eb 78 mr r3,r29 ffc18c88: 48 00 2d d1 bl ffc1ba58 <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { ffc18c8c: 2c 03 00 00 cmpwi r3,0 ffc18c90: 40 a2 00 10 bne+ ffc18ca0 _Thread_Enable_dispatch(); ffc18c94: 48 00 3f 31 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc18c98: 38 60 00 05 li r3,5 return RTEMS_TOO_MANY; ffc18c9c: 48 00 00 40 b ffc18cdc <== ALWAYS TAKEN ffc18ca0: 81 23 00 08 lwz r9,8(r3) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc18ca4: 38 00 00 00 li r0,0 ffc18ca8: 81 5d 00 1c lwz r10,28(r29) ffc18cac: 55 2b 13 ba rlwinm r11,r9,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc18cb0: 93 e3 00 0c stw r31,12(r3) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc18cb4: 7c 6a 59 2e stwx r3,r10,r11 } the_timer->the_class = TIMER_DORMANT; ffc18cb8: 39 60 00 04 li r11,4 the_watchdog->routine = routine; the_watchdog->id = id; ffc18cbc: 90 03 00 30 stw r0,48(r3) ffc18cc0: 91 63 00 38 stw r11,56(r3) the_watchdog->user_data = user_data; ffc18cc4: 90 03 00 34 stw r0,52(r3) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc18cc8: 90 03 00 18 stw r0,24(r3) the_watchdog->routine = routine; ffc18ccc: 90 03 00 2c stw r0,44(r3) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; ffc18cd0: 91 3e 00 00 stw r9,0(r30) _Thread_Enable_dispatch(); ffc18cd4: 48 00 3e f1 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc18cd8: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; } ffc18cdc: 80 01 00 1c lwz r0,28(r1) ffc18ce0: 83 a1 00 0c lwz r29,12(r1) ffc18ce4: 7c 08 03 a6 mtlr r0 ffc18ce8: 83 c1 00 10 lwz r30,16(r1) ffc18cec: 83 e1 00 14 lwz r31,20(r1) ffc18cf0: 38 21 00 18 addi r1,r1,24 ffc18cf4: 4e 80 00 20 blr <== ALWAYS TAKEN ffc18cf8 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { ffc18cf8: 94 21 ff e0 stwu r1,-32(r1) ffc18cfc: 7c 08 02 a6 mflr r0 ffc18d00: 7c 64 1b 78 mr r4,r3 ffc18d04: 93 e1 00 1c stw r31,28(r1) RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) ffc18d08: 3f e0 00 00 lis r31,0 ffc18d0c: 3b ff 72 44 addi r31,r31,29252 ffc18d10: 7f e3 fb 78 mr r3,r31 ffc18d14: 90 01 00 24 stw r0,36(r1) ffc18d18: 38 a1 00 08 addi r5,r1,8 ffc18d1c: 93 c1 00 18 stw r30,24(r1) ffc18d20: 48 00 33 2d bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN ffc18d24: 7c 7e 1b 78 mr r30,r3 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc18d28: 80 01 00 08 lwz r0,8(r1) ffc18d2c: 38 60 00 04 li r3,4 ffc18d30: 2f 80 00 00 cmpwi cr7,r0,0 ffc18d34: 40 9e 00 2c bne- cr7,ffc18d60 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); ffc18d38: 7f c4 f3 78 mr r4,r30 ffc18d3c: 7f e3 fb 78 mr r3,r31 ffc18d40: 48 00 2d c5 bl ffc1bb04 <_Objects_Close> <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); ffc18d44: 38 7e 00 10 addi r3,r30,16 ffc18d48: 48 00 59 31 bl ffc1e678 <_Watchdog_Remove> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); ffc18d4c: 7f e3 fb 78 mr r3,r31 ffc18d50: 7f c4 f3 78 mr r4,r30 ffc18d54: 48 00 30 f1 bl ffc1be44 <_Objects_Free> <== ALWAYS TAKEN _Timer_Free( the_timer ); _Thread_Enable_dispatch(); ffc18d58: 48 00 3e 6d bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc18d5c: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc18d60: 80 01 00 24 lwz r0,36(r1) ffc18d64: 83 c1 00 18 lwz r30,24(r1) ffc18d68: 7c 08 03 a6 mtlr r0 ffc18d6c: 83 e1 00 1c lwz r31,28(r1) ffc18d70: 38 21 00 20 addi r1,r1,32 ffc18d74: 4e 80 00 20 blr <== ALWAYS TAKEN ffc18d78 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { ffc18d78: 94 21 ff d0 stwu r1,-48(r1) ffc18d7c: 7c 08 02 a6 mflr r0 ffc18d80: 93 a1 00 24 stw r29,36(r1) Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) ffc18d84: 7c 9d 23 79 mr. r29,r4 rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { ffc18d88: 93 81 00 20 stw r28,32(r1) ffc18d8c: 7c dc 33 78 mr r28,r6 ffc18d90: 93 c1 00 28 stw r30,40(r1) ffc18d94: 7c be 2b 78 mr r30,r5 ffc18d98: 93 e1 00 2c stw r31,44(r1) ffc18d9c: 7c 7f 1b 78 mr r31,r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) ffc18da0: 38 60 00 0a li r3,10 rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { ffc18da4: 90 01 00 34 stw r0,52(r1) ffc18da8: 93 41 00 18 stw r26,24(r1) ffc18dac: 93 61 00 1c stw r27,28(r1) Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) ffc18db0: 41 82 00 9c beq- ffc18e4c return RTEMS_INVALID_NUMBER; if ( !routine ) ffc18db4: 2f 85 00 00 cmpwi cr7,r5,0 ffc18db8: 38 60 00 09 li r3,9 ffc18dbc: 41 9e 00 90 beq- cr7,ffc18e4c RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) ffc18dc0: 3c 60 00 00 lis r3,0 ffc18dc4: 38 63 72 44 addi r3,r3,29252 ffc18dc8: 7f e4 fb 78 mr r4,r31 ffc18dcc: 38 a1 00 08 addi r5,r1,8 ffc18dd0: 48 00 32 7d bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc18dd4: 80 01 00 08 lwz r0,8(r1) ffc18dd8: 7c 7b 1b 78 mr r27,r3 ffc18ddc: 2f 80 00 00 cmpwi cr7,r0,0 ffc18de0: 38 60 00 04 li r3,4 ffc18de4: 40 9e 00 68 bne- cr7,ffc18e4c case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc18de8: 3b 5b 00 10 addi r26,r27,16 ffc18dec: 7f 43 d3 78 mr r3,r26 ffc18df0: 48 00 58 89 bl ffc1e678 <_Watchdog_Remove> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc18df4: 7d 20 00 a6 mfmsr r9 ffc18df8: 7c 10 42 a6 mfsprg r0,0 ffc18dfc: 7d 20 00 78 andc r0,r9,r0 ffc18e00: 7c 00 01 24 mtmsr r0 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { ffc18e04: 80 1b 00 18 lwz r0,24(r27) ffc18e08: 2f 80 00 00 cmpwi cr7,r0,0 ffc18e0c: 41 be 00 0c beq+ cr7,ffc18e18 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc18e10: 7d 20 01 24 mtmsr r9 ffc18e14: 48 00 00 30 b ffc18e44 <== ALWAYS TAKEN Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc18e18: 90 1b 00 18 stw r0,24(r27) the_watchdog->routine = routine; ffc18e1c: 93 db 00 2c stw r30,44(r27) the_watchdog->id = id; ffc18e20: 93 fb 00 30 stw r31,48(r27) the_watchdog->user_data = user_data; ffc18e24: 93 9b 00 34 stw r28,52(r27) /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; ffc18e28: 90 1b 00 38 stw r0,56(r27) ffc18e2c: 7d 20 01 24 mtmsr r9 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc18e30: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc18e34: 93 bb 00 1c stw r29,28(r27) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc18e38: 38 63 70 e8 addi r3,r3,28904 ffc18e3c: 7f 44 d3 78 mr r4,r26 ffc18e40: 48 00 56 e1 bl ffc1e520 <_Watchdog_Insert> <== ALWAYS TAKEN _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); ffc18e44: 48 00 3d 81 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc18e48: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc18e4c: 80 01 00 34 lwz r0,52(r1) ffc18e50: 83 41 00 18 lwz r26,24(r1) ffc18e54: 7c 08 03 a6 mtlr r0 ffc18e58: 83 61 00 1c lwz r27,28(r1) ffc18e5c: 83 81 00 20 lwz r28,32(r1) ffc18e60: 83 a1 00 24 lwz r29,36(r1) ffc18e64: 83 c1 00 28 lwz r30,40(r1) ffc18e68: 83 e1 00 2c lwz r31,44(r1) <== ALWAYS TAKEN ffc18e6c: 38 21 00 30 addi r1,r1,48 ffc18e70: 4e 80 00 20 blr <== ALWAYS TAKEN ffc18e74 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc18e74: 94 21 ff c8 stwu r1,-56(r1) ffc18e78: 7c 08 02 a6 mflr r0 <== ALWAYS TAKEN Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) ffc18e7c: 3d 20 00 00 lis r9,0 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc18e80: 90 01 00 3c stw r0,60(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) ffc18e84: 88 09 28 2c lbz r0,10284(r9) rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc18e88: 93 61 00 24 stw r27,36(r1) ffc18e8c: 7c db 33 78 mr r27,r6 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) ffc18e90: 2f 80 00 00 cmpwi cr7,r0,0 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc18e94: 93 a1 00 2c stw r29,44(r1) ffc18e98: 7c 9d 23 78 mr r29,r4 ffc18e9c: 93 c1 00 30 stw r30,48(r1) ffc18ea0: 7c 7e 1b 78 mr r30,r3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) ffc18ea4: 38 60 00 0b li r3,11 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc18ea8: 93 e1 00 34 stw r31,52(r1) ffc18eac: 7c bf 2b 78 mr r31,r5 ffc18eb0: 93 01 00 18 stw r24,24(r1) ffc18eb4: 93 21 00 1c stw r25,28(r1) ffc18eb8: 93 41 00 20 stw r26,32(r1) ffc18ebc: 93 81 00 28 stw r28,40(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) ffc18ec0: 41 9e 00 b4 beq- cr7,ffc18f74 return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) ffc18ec4: 7c 83 23 78 mr r3,r4 ffc18ec8: 4b ff c9 69 bl ffc15830 <_TOD_Validate> <== ALWAYS TAKEN ffc18ecc: 2f 83 00 00 cmpwi cr7,r3,0 ffc18ed0: 41 9e 00 a0 beq- cr7,ffc18f70 return RTEMS_INVALID_CLOCK; if ( !routine ) ffc18ed4: 2f 9f 00 00 cmpwi cr7,r31,0 ffc18ed8: 38 60 00 09 li r3,9 ffc18edc: 41 9e 00 98 beq- cr7,ffc18f74 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); ffc18ee0: 7f a3 eb 78 mr r3,r29 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc18ee4: 3f 80 00 00 lis r28,0 return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); ffc18ee8: 4b ff c8 bd bl ffc157a4 <_TOD_To_seconds> <== ALWAYS TAKEN if ( seconds <= _TOD_Seconds_since_epoch() ) ffc18eec: 80 1c 28 44 lwz r0,10308(r28) return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); ffc18ef0: 7c 7d 1b 78 mr r29,r3 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc18ef4: 7f 83 00 40 cmplw cr7,r3,r0 ffc18ef8: 40 9d 00 78 ble- cr7,ffc18f70 ffc18efc: 3c 60 00 00 lis r3,0 ffc18f00: 38 63 72 44 addi r3,r3,29252 ffc18f04: 7f c4 f3 78 mr r4,r30 ffc18f08: 38 a1 00 08 addi r5,r1,8 ffc18f0c: 48 00 31 41 bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc18f10: 83 01 00 08 lwz r24,8(r1) ffc18f14: 7c 7a 1b 78 mr r26,r3 ffc18f18: 2f 98 00 00 cmpwi cr7,r24,0 ffc18f1c: 38 60 00 04 li r3,4 ffc18f20: 40 9e 00 54 bne- cr7,ffc18f74 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc18f24: 3b 3a 00 10 addi r25,r26,16 ffc18f28: 7f 23 cb 78 mr r3,r25 ffc18f2c: 48 00 57 4d bl ffc1e678 <_Watchdog_Remove> <== ALWAYS TAKEN void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc18f30: 93 da 00 30 stw r30,48(r26) the_timer->the_class = TIMER_TIME_OF_DAY; ffc18f34: 39 20 00 02 li r9,2 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc18f38: 80 1c 28 44 lwz r0,10308(r28) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); ffc18f3c: 3c 60 00 00 lis r3,0 ffc18f40: 91 3a 00 38 stw r9,56(r26) ffc18f44: 38 63 70 dc addi r3,r3,28892 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc18f48: 7f a0 e8 50 subf r29,r0,r29 ffc18f4c: 93 ba 00 1c stw r29,28(r26) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); ffc18f50: 7f 24 cb 78 mr r4,r25 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc18f54: 93 1a 00 18 stw r24,24(r26) the_watchdog->routine = routine; ffc18f58: 93 fa 00 2c stw r31,44(r26) the_watchdog->id = id; the_watchdog->user_data = user_data; ffc18f5c: 93 7a 00 34 stw r27,52(r26) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); ffc18f60: 48 00 55 c1 bl ffc1e520 <_Watchdog_Insert> <== ALWAYS TAKEN _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); ffc18f64: 48 00 3c 61 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc18f68: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc18f6c: 48 00 00 08 b ffc18f74 <== ALWAYS TAKEN ffc18f70: 38 60 00 14 li r3,20 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc18f74: 80 01 00 3c lwz r0,60(r1) ffc18f78: 83 01 00 18 lwz r24,24(r1) ffc18f7c: 7c 08 03 a6 mtlr r0 ffc18f80: 83 21 00 1c lwz r25,28(r1) ffc18f84: 83 41 00 20 lwz r26,32(r1) ffc18f88: 83 61 00 24 lwz r27,36(r1) ffc18f8c: 83 81 00 28 lwz r28,40(r1) ffc18f90: 83 a1 00 2c lwz r29,44(r1) ffc18f94: 83 c1 00 30 lwz r30,48(r1) ffc18f98: 83 e1 00 34 lwz r31,52(r1) ffc18f9c: 38 21 00 38 addi r1,r1,56 ffc18fa0: 4e 80 00 20 blr <== ALWAYS TAKEN ffc18fa4 : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { ffc18fa4: 94 21 ff e0 stwu r1,-32(r1) ffc18fa8: 7c 08 02 a6 mflr r0 ffc18fac: 93 e1 00 1c stw r31,28(r1) Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) ffc18fb0: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { ffc18fb4: 7c 64 1b 78 mr r4,r3 ffc18fb8: 90 01 00 24 stw r0,36(r1) Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) ffc18fbc: 38 60 00 09 li r3,9 ffc18fc0: 41 82 00 50 beq- ffc19010 ffc18fc4: 3c 60 00 00 lis r3,0 ffc18fc8: 38 63 72 44 addi r3,r3,29252 ffc18fcc: 38 a1 00 08 addi r5,r1,8 ffc18fd0: 48 00 30 7d bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc18fd4: 80 01 00 08 lwz r0,8(r1) ffc18fd8: 7c 69 1b 78 mr r9,r3 ffc18fdc: 2f 80 00 00 cmpwi cr7,r0,0 ffc18fe0: 38 60 00 04 li r3,4 ffc18fe4: 40 9e 00 2c bne- cr7,ffc19010 case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; the_info->initial = the_timer->Ticker.initial; ffc18fe8: 80 09 00 1c lwz r0,28(r9) the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; ffc18fec: 81 69 00 38 lwz r11,56(r9) the_info->initial = the_timer->Ticker.initial; ffc18ff0: 90 1f 00 04 stw r0,4(r31) the_info->start_time = the_timer->Ticker.start_time; ffc18ff4: 80 09 00 24 lwz r0,36(r9) the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; ffc18ff8: 91 7f 00 00 stw r11,0(r31) the_info->initial = the_timer->Ticker.initial; the_info->start_time = the_timer->Ticker.start_time; ffc18ffc: 90 1f 00 08 stw r0,8(r31) the_info->stop_time = the_timer->Ticker.stop_time; ffc19000: 80 09 00 28 lwz r0,40(r9) ffc19004: 90 1f 00 0c stw r0,12(r31) _Thread_Enable_dispatch(); ffc19008: 48 00 3b bd bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1900c: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc19010: 80 01 00 24 lwz r0,36(r1) ffc19014: 83 e1 00 1c lwz r31,28(r1) ffc19018: 38 21 00 20 addi r1,r1,32 ffc1901c: 7c 08 03 a6 mtlr r0 ffc19020: 4e 80 00 20 blr <== ALWAYS TAKEN ffc19024 : rtems_status_code rtems_timer_ident( rtems_name name, rtems_id *id ) { ffc19024: 94 21 ff f8 stwu r1,-8(r1) ffc19028: 7c 08 02 a6 mflr r0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc1902c: 3c a0 7f ff lis r5,32767 rtems_status_code rtems_timer_ident( rtems_name name, rtems_id *id ) { ffc19030: 90 01 00 0c stw r0,12(r1) ffc19034: 7c 60 1b 78 mr r0,r3 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc19038: 3c 60 00 00 lis r3,0 rtems_status_code rtems_timer_ident( rtems_name name, rtems_id *id ) { ffc1903c: 7c 86 23 78 mr r6,r4 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc19040: 38 63 72 44 addi r3,r3,29252 ffc19044: 7c 04 03 78 mr r4,r0 ffc19048: 60 a5 ff ff ori r5,r5,65535 ffc1904c: 48 00 32 39 bl ffc1c284 <_Objects_Name_to_id_u32> <== ALWAYS TAKEN OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc19050: 80 01 00 0c lwz r0,12(r1) ffc19054: 3d 20 ff c4 lis r9,-60 ffc19058: 7c 08 03 a6 mtlr r0 rtems_id *id ) { Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( ffc1905c: 54 63 10 3a rlwinm r3,r3,2,0,29 OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; } ffc19060: 39 29 8f 78 addi r9,r9,-28808 ffc19064: 7c 69 18 2e lwzx r3,r9,r3 ffc19068: 38 21 00 08 addi r1,r1,8 ffc1906c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc1938c : */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ffc1938c: 2c 03 00 00 cmpwi r3,0 rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { ffc19390: 94 21 ff d0 stwu r1,-48(r1) ffc19394: 7c 08 02 a6 mflr r0 ffc19398: 93 61 00 1c stw r27,28(r1) ffc1939c: 7c 9b 23 78 mr r27,r4 ffc193a0: 93 81 00 20 stw r28,32(r1) ffc193a4: 7c bc 2b 78 mr r28,r5 ffc193a8: 90 01 00 34 stw r0,52(r1) ffc193ac: 93 41 00 18 stw r26,24(r1) ffc193b0: 93 a1 00 24 stw r29,36(r1) ffc193b4: 93 c1 00 28 stw r30,40(r1) ffc193b8: 93 e1 00 2c stw r31,44(r1) ffc193bc: 40 82 00 0c bne- ffc193c8 ffc193c0: 38 00 00 00 li r0,0 ffc193c4: 48 00 00 18 b ffc193dc <== ALWAYS TAKEN ffc193c8: 3d 20 00 00 lis r9,0 ffc193cc: 88 09 26 e4 lbz r0,9956(r9) ffc193d0: 7c 03 00 10 subfc r0,r3,r0 ffc193d4: 38 00 00 00 li r0,0 ffc193d8: 7c 00 01 14 adde r0,r0,r0 * Make sure the requested priority is valid. The if is * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { ffc193dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc193e0: 7c 7a 1b 78 mr r26,r3 ffc193e4: 40 9e 00 14 bne- cr7,ffc193f8 if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) ffc193e8: 2f 83 ff ff cmpwi cr7,r3,-1 ffc193ec: 38 00 00 13 li r0,19 ffc193f0: 40 be 01 24 bne+ cr7,ffc19514 ffc193f4: 3b 40 00 00 li r26,0 ffc193f8: 3d 20 00 00 lis r9,0 ffc193fc: 81 69 28 24 lwz r11,10276(r9) ffc19400: 38 0b 00 01 addi r0,r11,1 ffc19404: 90 09 28 24 stw r0,10276(r9) /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; ffc19408: 3f c0 00 00 lis r30,0 ffc1940c: 8b be 29 f0 lbz r29,10736(r30) initialized = true; ffc19410: 38 00 00 01 li r0,1 ffc19414: 98 1e 29 f0 stb r0,10736(r30) _Thread_Enable_dispatch(); ffc19418: 48 00 37 ad bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN if ( tmpInitialized ) ffc1941c: 2f 9d 00 00 cmpwi cr7,r29,0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; ffc19420: 3b fe 29 f0 addi r31,r30,10736 initialized = true; _Thread_Enable_dispatch(); if ( tmpInitialized ) ffc19424: 38 00 00 0e li r0,14 ffc19428: 40 be 00 ec bne+ cr7,ffc19514 * other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( ffc1942c: 3c 60 54 49 lis r3,21577 ffc19430: 60 63 4d 45 ori r3,r3,19781 ffc19434: 7f 44 d3 78 mr r4,r26 ffc19438: 7f 65 db 78 mr r5,r27 ffc1943c: 63 87 80 00 ori r7,r28,32768 ffc19440: 38 c0 01 00 li r6,256 ffc19444: 39 01 00 08 addi r8,r1,8 ffc19448: 4b ff ec d9 bl ffc18120 <== ALWAYS TAKEN /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { ffc1944c: 7c 60 1b 79 mr. r0,r3 ffc19450: 41 82 00 0c beq- ffc1945c initialized = false; ffc19454: 9b be 29 f0 stb r29,10736(r30) return status; ffc19458: 48 00 00 bc b ffc19514 <== ALWAYS TAKEN /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( ffc1945c: 81 61 00 08 lwz r11,8(r1) ffc19460: 3d 20 00 00 lis r9,0 ffc19464: 81 49 6f 88 lwz r10,28552(r9) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc19468: 38 ff 00 70 addi r7,r31,112 ffc1946c: 55 69 13 ba rlwinm r9,r11,2,14,29 the_chain->permanent_null = NULL; ffc19470: 90 1f 00 38 stw r0,56(r31) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc19474: 3b bf 00 38 addi r29,r31,56 ffc19478: 7d 4a 48 2e lwzx r10,r10,r9 ffc1947c: 7f e9 fb 78 mr r9,r31 the_chain->permanent_null = NULL; ffc19480: 90 1f 00 70 stw r0,112(r31) _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( ffc19484: 3c 80 ff c2 lis r4,-62 ffc19488: 7d 63 5b 78 mr r3,r11 /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( ffc1948c: 95 49 00 04 stwu r10,4(r9) * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ffc19490: 3d 40 00 00 lis r10,0 _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( ffc19494: 38 84 96 40 addi r4,r4,-27072 * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ffc19498: 81 8a 28 7c lwz r12,10364(r10) the_chain->last = _Chain_Head(the_chain); ffc1949c: 39 09 00 68 addi r8,r9,104 ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc194a0: 3d 40 00 00 lis r10,0 ffc194a4: 91 1f 00 74 stw r8,116(r31) /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ffc194a8: 3d 00 ff c2 lis r8,-62 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc194ac: 83 ca 28 44 lwz r30,10308(r10) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc194b0: 3d 40 ff c2 lis r10,-62 ffc194b4: 39 4a c9 88 addi r10,r10,-13944 * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ffc194b8: 91 9f 00 40 stw r12,64(r31) ffc194bc: 38 c9 00 30 addi r6,r9,48 /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ffc194c0: 39 08 98 68 addi r8,r8,-26520 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc194c4: 93 df 00 78 stw r30,120(r31) <== ALWAYS TAKEN _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( ffc194c8: 7d 25 4b 78 mr r5,r9 ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ts->insert_chain = NULL; ffc194cc: 90 1f 00 7c stw r0,124(r31) /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ffc194d0: 91 1f 00 08 stw r8,8(r31) ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; ffc194d4: 3d 00 00 00 lis r8,0 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ts->insert_chain = NULL; ts->active = false; ffc194d8: 98 1f 00 80 stb r0,128(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc194dc: 90 1f 00 14 stw r0,20(r31) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc194e0: 90 1f 00 30 stw r0,48(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc194e4: 90 1f 00 4c stw r0,76(r31) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc194e8: 90 1f 00 68 stw r0,104(r31) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc194ec: 93 bf 00 34 stw r29,52(r31) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc194f0: 90 df 00 3c stw r6,60(r31) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc194f4: 90 ff 00 6c stw r7,108(r31) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc194f8: 91 5f 00 60 stw r10,96(r31) ffc194fc: 91 5f 00 28 stw r10,40(r31) the_watchdog->id = id; ffc19500: 91 7f 00 2c stw r11,44(r31) ffc19504: 91 7f 00 64 stw r11,100(r31) /* * The default timer server is now available. */ _Timer_server = ts; ffc19508: 91 28 28 a4 stw r9,10404(r8) /* * Start the timer server */ status = rtems_task_start( ffc1950c: 4b ff f4 49 bl ffc18954 <== ALWAYS TAKEN ffc19510: 7c 60 1b 78 mr r0,r3 initialized = false; } #endif return status; } ffc19514: 7c 03 03 78 mr r3,r0 ffc19518: 80 01 00 34 lwz r0,52(r1) ffc1951c: 83 41 00 18 lwz r26,24(r1) ffc19520: 7c 08 03 a6 mtlr r0 ffc19524: 83 61 00 1c lwz r27,28(r1) ffc19528: 83 81 00 20 lwz r28,32(r1) ffc1952c: 83 a1 00 24 lwz r29,36(r1) ffc19530: 83 c1 00 28 lwz r30,40(r1) ffc19534: 83 e1 00 2c lwz r31,44(r1) <== ALWAYS TAKEN ffc19538: 38 21 00 30 addi r1,r1,48 ffc1953c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc19070 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { ffc19070: 94 21 ff e0 stwu r1,-32(r1) ffc19074: 7c 08 02 a6 mflr r0 ffc19078: 7c 64 1b 78 mr r4,r3 ffc1907c: 3c 60 00 00 lis r3,0 ffc19080: 90 01 00 24 stw r0,36(r1) ffc19084: 38 63 72 44 addi r3,r3,29252 ffc19088: 38 a1 00 08 addi r5,r1,8 ffc1908c: 93 c1 00 18 stw r30,24(r1) ffc19090: 93 e1 00 1c stw r31,28(r1) ffc19094: 48 00 2f b9 bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN ffc19098: 7c 7e 1b 78 mr r30,r3 Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1909c: 80 01 00 08 lwz r0,8(r1) ffc190a0: 3b e0 00 04 li r31,4 ffc190a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc190a8: 40 9e 00 6c bne- cr7,ffc19114 case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { ffc190ac: 80 03 00 38 lwz r0,56(r3) ffc190b0: 2f 80 00 00 cmpwi cr7,r0,0 ffc190b4: 40 be 00 28 bne+ cr7,ffc190dc _Watchdog_Remove( &the_timer->Ticker ); ffc190b8: 3b c3 00 10 addi r30,r3,16 ffc190bc: 7f c3 f3 78 mr r3,r30 ffc190c0: 48 00 55 b9 bl ffc1e678 <_Watchdog_Remove> <== ALWAYS TAKEN _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); ffc190c4: 3c 60 00 00 lis r3,0 ffc190c8: 38 63 70 e8 addi r3,r3,28904 ffc190cc: 7f c4 f3 78 mr r4,r30 ffc190d0: 48 00 54 51 bl ffc1e520 <_Watchdog_Insert> <== ALWAYS TAKEN ffc190d4: 3b e0 00 00 li r31,0 ffc190d8: 48 00 00 38 b ffc19110 <== ALWAYS TAKEN } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc190dc: 2f 80 00 01 cmpwi cr7,r0,1 ffc190e0: 3b e0 00 0b li r31,11 ffc190e4: 40 be 00 2c bne+ cr7,ffc19110 Timer_server_Control *timer_server = _Timer_server; ffc190e8: 3d 20 00 00 lis r9,0 ffc190ec: 83 e9 28 a4 lwz r31,10404(r9) if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); ffc190f0: 38 63 00 10 addi r3,r3,16 ffc190f4: 48 00 55 85 bl ffc1e678 <_Watchdog_Remove> <== ALWAYS TAKEN (*timer_server->schedule_operation)( timer_server, the_timer ); ffc190f8: 7f c4 f3 78 mr r4,r30 ffc190fc: 80 1f 00 04 lwz r0,4(r31) ffc19100: 7f e3 fb 78 mr r3,r31 ffc19104: 3b e0 00 00 li r31,0 ffc19108: 7c 09 03 a6 mtctr r0 ffc1910c: 4e 80 04 21 bctrl <== ALWAYS TAKEN * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); ffc19110: 48 00 3a b5 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc19114: 80 01 00 24 lwz r0,36(r1) ffc19118: 7f e3 fb 78 mr r3,r31 ffc1911c: 83 c1 00 18 lwz r30,24(r1) ffc19120: 7c 08 03 a6 mtlr r0 ffc19124: 83 e1 00 1c lwz r31,28(r1) ffc19128: 38 21 00 20 addi r1,r1,32 ffc1912c: 4e 80 00 20 blr <== ALWAYS TAKEN ffc19130 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { ffc19130: 94 21 ff d0 stwu r1,-48(r1) Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; ffc19134: 3d 20 00 00 lis r9,0 rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { ffc19138: 7c 08 02 a6 mflr r0 ffc1913c: 93 e1 00 2c stw r31,44(r1) Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; ffc19140: 83 e9 28 a4 lwz r31,10404(r9) rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { ffc19144: 93 61 00 1c stw r27,28(r1) ffc19148: 7c db 33 78 mr r27,r6 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1914c: 2f 9f 00 00 cmpwi cr7,r31,0 rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { ffc19150: 93 81 00 20 stw r28,32(r1) ffc19154: 7c bc 2b 78 mr r28,r5 ffc19158: 93 a1 00 24 stw r29,36(r1) ffc1915c: 7c 7d 1b 78 mr r29,r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc19160: 38 60 00 0e li r3,14 rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { ffc19164: 93 c1 00 28 stw r30,40(r1) ffc19168: 7c 9e 23 78 mr r30,r4 ffc1916c: 90 01 00 34 stw r0,52(r1) ffc19170: 93 41 00 18 stw r26,24(r1) Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc19174: 41 9e 00 ac beq- cr7,ffc19220 return RTEMS_INCORRECT_STATE; if ( !routine ) ffc19178: 2f 85 00 00 cmpwi cr7,r5,0 ffc1917c: 38 60 00 09 li r3,9 ffc19180: 41 9e 00 a0 beq- cr7,ffc19220 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) ffc19184: 2f 84 00 00 cmpwi cr7,r4,0 ffc19188: 38 60 00 0a li r3,10 ffc1918c: 41 9e 00 94 beq- cr7,ffc19220 ffc19190: 3c 60 00 00 lis r3,0 ffc19194: 38 63 72 44 addi r3,r3,29252 ffc19198: 7f a4 eb 78 mr r4,r29 ffc1919c: 38 a1 00 08 addi r5,r1,8 ffc191a0: 48 00 2e ad bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc191a4: 80 01 00 08 lwz r0,8(r1) ffc191a8: 7c 7a 1b 78 mr r26,r3 ffc191ac: 2f 80 00 00 cmpwi cr7,r0,0 ffc191b0: 38 60 00 04 li r3,4 ffc191b4: 40 9e 00 6c bne- cr7,ffc19220 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc191b8: 38 7a 00 10 addi r3,r26,16 ffc191bc: 48 00 54 bd bl ffc1e678 <_Watchdog_Remove> <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc191c0: 7c 00 00 a6 mfmsr r0 ffc191c4: 7d 30 42 a6 mfsprg r9,0 ffc191c8: 7c 09 48 78 andc r9,r0,r9 ffc191cc: 7d 20 01 24 mtmsr r9 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { ffc191d0: 81 3a 00 18 lwz r9,24(r26) ffc191d4: 2f 89 00 00 cmpwi cr7,r9,0 ffc191d8: 41 be 00 0c beq+ cr7,ffc191e4 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc191dc: 7c 00 01 24 mtmsr r0 ffc191e0: 48 00 00 38 b ffc19218 <== ALWAYS TAKEN /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; ffc191e4: 39 60 00 01 li r11,1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc191e8: 91 3a 00 18 stw r9,24(r26) ffc191ec: 91 7a 00 38 stw r11,56(r26) the_watchdog->routine = routine; ffc191f0: 93 9a 00 2c stw r28,44(r26) the_watchdog->id = id; ffc191f4: 93 ba 00 30 stw r29,48(r26) the_watchdog->user_data = user_data; ffc191f8: 93 7a 00 34 stw r27,52(r26) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; ffc191fc: 93 da 00 1c stw r30,28(r26) ffc19200: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); (*timer_server->schedule_operation)( timer_server, the_timer ); ffc19204: 80 1f 00 04 lwz r0,4(r31) ffc19208: 7f e3 fb 78 mr r3,r31 ffc1920c: 7f 44 d3 78 mr r4,r26 ffc19210: 7c 09 03 a6 mtctr r0 ffc19214: 4e 80 04 21 bctrl <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc19218: 48 00 39 ad bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc1921c: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc19220: 80 01 00 34 lwz r0,52(r1) ffc19224: 83 41 00 18 lwz r26,24(r1) ffc19228: 7c 08 03 a6 mtlr r0 ffc1922c: 83 61 00 1c lwz r27,28(r1) ffc19230: 83 81 00 20 lwz r28,32(r1) ffc19234: 83 a1 00 24 lwz r29,36(r1) ffc19238: 83 c1 00 28 lwz r30,40(r1) ffc1923c: 83 e1 00 2c lwz r31,44(r1) ffc19240: 38 21 00 30 addi r1,r1,48 ffc19244: 4e 80 00 20 blr <== ALWAYS TAKEN ffc19248 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc19248: 94 21 ff c8 stwu r1,-56(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; ffc1924c: 3d 20 00 00 lis r9,0 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc19250: 7c 08 02 a6 mflr r0 ffc19254: 93 e1 00 34 stw r31,52(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; ffc19258: 83 e9 28 a4 lwz r31,10404(r9) rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1925c: 93 41 00 20 stw r26,32(r1) ffc19260: 7c da 33 78 mr r26,r6 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc19264: 2f 9f 00 00 cmpwi cr7,r31,0 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc19268: 93 81 00 28 stw r28,40(r1) ffc1926c: 7c 9c 23 78 mr r28,r4 <== ALWAYS TAKEN ffc19270: 93 a1 00 2c stw r29,44(r1) ffc19274: 7c 7d 1b 78 mr r29,r3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc19278: 38 60 00 0e li r3,14 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1927c: 93 c1 00 30 stw r30,48(r1) ffc19280: 7c be 2b 78 mr r30,r5 ffc19284: 90 01 00 3c stw r0,60(r1) ffc19288: 93 01 00 18 stw r24,24(r1) ffc1928c: 93 21 00 1c stw r25,28(r1) ffc19290: 93 61 00 24 stw r27,36(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc19294: 41 9e 00 c8 beq- cr7,ffc1935c return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) ffc19298: 3d 20 00 00 lis r9,0 ffc1929c: 88 09 28 2c lbz r0,10284(r9) ffc192a0: 38 60 00 0b li r3,11 ffc192a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc192a8: 41 9e 00 b4 beq- cr7,ffc1935c <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) ffc192ac: 2f 85 00 00 cmpwi cr7,r5,0 ffc192b0: 38 60 00 09 li r3,9 ffc192b4: 41 9e 00 a8 beq- cr7,ffc1935c return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc192b8: 7c 83 23 78 mr r3,r4 ffc192bc: 4b ff c5 75 bl ffc15830 <_TOD_Validate> <== ALWAYS TAKEN ffc192c0: 2f 83 00 00 cmpwi cr7,r3,0 ffc192c4: 41 9e 00 94 beq- cr7,ffc19358 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc192c8: 7f 83 e3 78 mr r3,r28 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc192cc: 3f 60 00 00 lis r27,0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc192d0: 4b ff c4 d5 bl ffc157a4 <_TOD_To_seconds> <== ALWAYS TAKEN if ( seconds <= _TOD_Seconds_since_epoch() ) ffc192d4: 80 1b 28 44 lwz r0,10308(r27) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc192d8: 7c 7c 1b 78 mr r28,r3 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc192dc: 7f 83 00 40 cmplw cr7,r3,r0 ffc192e0: 40 9d 00 78 ble- cr7,ffc19358 ffc192e4: 3c 60 00 00 lis r3,0 ffc192e8: 38 63 72 44 addi r3,r3,29252 ffc192ec: 7f a4 eb 78 mr r4,r29 ffc192f0: 38 a1 00 08 addi r5,r1,8 ffc192f4: 48 00 2d 59 bl ffc1c04c <_Objects_Get> <== ALWAYS TAKEN return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc192f8: 83 01 00 08 lwz r24,8(r1) ffc192fc: 7c 79 1b 78 mr r25,r3 ffc19300: 2f 98 00 00 cmpwi cr7,r24,0 ffc19304: 38 60 00 04 li r3,4 ffc19308: 40 9e 00 54 bne- cr7,ffc1935c case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1930c: 38 79 00 10 addi r3,r25,16 ffc19310: 48 00 53 69 bl ffc1e678 <_Watchdog_Remove> <== ALWAYS TAKEN void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc19314: 93 b9 00 30 stw r29,48(r25) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; ffc19318: 39 20 00 03 li r9,3 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); ffc1931c: 80 1b 28 44 lwz r0,10308(r27) (*timer_server->schedule_operation)( timer_server, the_timer ); ffc19320: 7f e3 fb 78 mr r3,r31 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; ffc19324: 91 39 00 38 stw r9,56(r25) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); ffc19328: 7f 24 cb 78 mr r4,r25 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); ffc1932c: 7f 80 e0 50 subf r28,r0,r28 (*timer_server->schedule_operation)( timer_server, the_timer ); ffc19330: 80 1f 00 04 lwz r0,4(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc19334: 93 19 00 18 stw r24,24(r25) ffc19338: 7c 09 03 a6 mtctr r0 the_watchdog->routine = routine; ffc1933c: 93 d9 00 2c stw r30,44(r25) the_watchdog->id = id; the_watchdog->user_data = user_data; ffc19340: 93 59 00 34 stw r26,52(r25) case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); ffc19344: 93 99 00 1c stw r28,28(r25) (*timer_server->schedule_operation)( timer_server, the_timer ); ffc19348: 4e 80 04 21 bctrl <== ALWAYS TAKEN _Thread_Enable_dispatch(); ffc1934c: 48 00 38 79 bl ffc1cbc4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN ffc19350: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc19354: 48 00 00 08 b ffc1935c <== ALWAYS TAKEN ffc19358: 38 60 00 14 li r3,20 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1935c: 80 01 00 3c lwz r0,60(r1) ffc19360: 83 01 00 18 lwz r24,24(r1) ffc19364: 7c 08 03 a6 mtlr r0 ffc19368: 83 21 00 1c lwz r25,28(r1) ffc1936c: 83 41 00 20 lwz r26,32(r1) ffc19370: 83 61 00 24 lwz r27,36(r1) ffc19374: 83 81 00 28 lwz r28,40(r1) ffc19378: 83 a1 00 2c lwz r29,44(r1) ffc1937c: 83 c1 00 30 lwz r30,48(r1) ffc19380: 83 e1 00 34 lwz r31,52(r1) ffc19384: 38 21 00 38 addi r1,r1,56 ffc19388: 4e 80 00 20 blr <== ALWAYS TAKEN ffc08648 : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { ffc08648: 94 21 ff f0 stwu r1,-16(r1) ffc0864c: 7c 08 02 a6 mflr r0 ffc08650: 93 e1 00 0c stw r31,12(r1) void *ptr; /* * check the arguments */ if ( !pointer ) ffc08654: 7c 9f 23 79 mr. r31,r4 */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { ffc08658: 7c 64 1b 78 mr r4,r3 ffc0865c: 90 01 00 14 stw r0,20(r1) void *ptr; /* * check the arguments */ if ( !pointer ) ffc08660: 41 82 00 34 beq- ffc08694 return false; if ( !bytes ) ffc08664: 2f 83 00 00 cmpwi cr7,r3,0 ffc08668: 41 be 00 2c beq+ cr7,ffc08694 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); ffc0866c: 3c 60 00 00 lis r3,0 ffc08670: 38 63 2c 0c addi r3,r3,11276 ffc08674: 38 a0 00 00 li r5,0 ffc08678: 38 c0 00 00 li r6,0 ffc0867c: 48 00 18 6d bl ffc09ee8 <_Protected_heap_Allocate_aligned_with_boundary> <== ALWAYS TAKEN /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) ffc08680: 2c 03 00 00 cmpwi r3,0 ffc08684: 41 82 00 10 beq- ffc08694 return false; *pointer = ptr; ffc08688: 90 7f 00 00 stw r3,0(r31) ffc0868c: 38 60 00 01 li r3,1 return true; ffc08690: 48 00 00 08 b ffc08698 <== ALWAYS TAKEN ffc08694: 38 60 00 00 li r3,0 } ffc08698: 80 01 00 14 lwz r0,20(r1) ffc0869c: 83 e1 00 0c lwz r31,12(r1) ffc086a0: 38 21 00 10 addi r1,r1,16 ffc086a4: 7c 08 03 a6 mtlr r0 ffc086a8: 4e 80 00 20 blr <== ALWAYS TAKEN ffc0861c : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { ffc0861c: 94 21 ff f8 stwu r1,-8(r1) ffc08620: 7c 08 02 a6 mflr r0 ffc08624: 7c 64 1b 78 mr r4,r3 return _Protected_heap_Free( &_Workspace_Area, pointer ); ffc08628: 3c 60 00 00 lis r3,0 * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { ffc0862c: 90 01 00 0c stw r0,12(r1) return _Protected_heap_Free( &_Workspace_Area, pointer ); ffc08630: 38 63 2c 0c addi r3,r3,11276 ffc08634: 48 00 19 21 bl ffc09f54 <_Protected_heap_Free> <== ALWAYS TAKEN } ffc08638: 80 01 00 0c lwz r0,12(r1) ffc0863c: 38 21 00 08 addi r1,r1,8 ffc08640: 7c 08 03 a6 mtlr r0 ffc08644: 4e 80 00 20 blr <== ALWAYS TAKEN ffc086ac : bool rtems_workspace_get_information( Heap_Information_block *the_info ) { if ( !the_info ) ffc086ac: 7c 64 1b 79 mr. r4,r3 #include /* for memset */ bool rtems_workspace_get_information( Heap_Information_block *the_info ) { ffc086b0: 94 21 ff f8 stwu r1,-8(r1) ffc086b4: 7c 08 02 a6 mflr r0 if ( !the_info ) ffc086b8: 38 60 00 00 li r3,0 #include /* for memset */ bool rtems_workspace_get_information( Heap_Information_block *the_info ) { ffc086bc: 90 01 00 0c stw r0,12(r1) if ( !the_info ) ffc086c0: 41 82 00 10 beq- ffc086d0 return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); ffc086c4: 3c 60 00 00 lis r3,0 ffc086c8: 38 63 2c 0c addi r3,r3,11276 ffc086cc: 48 00 18 e5 bl ffc09fb0 <_Protected_heap_Get_information> <== ALWAYS TAKEN } ffc086d0: 80 01 00 0c lwz r0,12(r1) ffc086d4: 38 21 00 08 addi r1,r1,8 ffc086d8: 7c 08 03 a6 mtlr r0 ffc086dc: 4e 80 00 20 blr <== ALWAYS TAKEN