5
Last change
on this file since 208cd6b was
208cd6b,
checked in by Jan Sommer <jan.sommer@…>, on 05/31/20 at 14:22:57
|
bsps/pc386: Separate smp API functions. Makes smpfatal08 link
|
-
Property mode set to
100644
|
File size:
757 bytes
|
Rev | Line | |
---|
[208cd6b] | 1 | |
---|
| 2 | #include <rtems/score/smpimpl.h> |
---|
| 3 | |
---|
| 4 | #include <bsp/apic.h> |
---|
| 5 | #include <bsp/smp-imps.h> |
---|
| 6 | #include <bsp.h> |
---|
| 7 | #include <rtems.h> |
---|
| 8 | |
---|
| 9 | void _CPU_SMP_Prepare_start_multitasking( void ) |
---|
| 10 | { |
---|
| 11 | /* Do nothing */ |
---|
| 12 | } |
---|
| 13 | |
---|
| 14 | bool _CPU_SMP_Start_processor( uint32_t cpu_index ) |
---|
| 15 | { |
---|
| 16 | (void) cpu_index; |
---|
| 17 | |
---|
| 18 | return true; |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | uint32_t _CPU_SMP_Get_current_processor( void ) |
---|
| 23 | { |
---|
| 24 | return imps_apic_cpu_map[APIC_ID(IMPS_LAPIC_READ(LAPIC_ID))]; |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | uint32_t _CPU_SMP_Initialize( void ) |
---|
| 28 | { |
---|
| 29 | /* XXX need to deal with finding too many cores */ |
---|
| 30 | |
---|
| 31 | return (uint32_t) imps_probe(); |
---|
| 32 | } |
---|
| 33 | |
---|
| 34 | void _CPU_SMP_Finalize_initialization( uint32_t cpu_count ) |
---|
| 35 | { |
---|
| 36 | if ( cpu_count > 1 ) |
---|
| 37 | ipi_install_irq(); |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | void _CPU_SMP_Send_interrupt( uint32_t target_processor_index ) |
---|
| 41 | { |
---|
| 42 | send_ipi( target_processor_index, 0x30 ); |
---|
| 43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.