Changeset 208cd6b in rtems
- Timestamp:
- May 31, 2020, 2:22:57 PM (8 months ago)
- Branches:
- 5, master
- Children:
- 6369daf
- Parents:
- c954003
- git-author:
- Jan Sommer <jan.sommer@…> (05/31/20 14:22:57)
- git-committer:
- Chris Johns <chrisj@…> (06/11/20 03:29:27)
- Files:
-
- 1 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
bsps/i386/include/bsp/smp-imps.h
rc954003 r208cd6b 234 234 extern char _binary_appstart_bin_size[]; 235 235 236 /** @brief base address of the local apic. Usually 0xFEE00000 */ 237 extern unsigned imps_lapic_addr; 238 236 239 /* 237 240 * Defines that use variables -
bsps/i386/pc386/include/bsp.h
rc954003 r208cd6b 253 253 void C_dispatch_isr(int vector); 254 254 255 #ifdef RTEMS_SMP 256 /* CPU specific functions used by the SMP API */ 257 int imps_probe(void); 258 void ipi_install_irq(void); 259 int send_ipi(unsigned int dst, unsigned int v); 260 #endif 261 255 262 #ifdef __cplusplus 256 263 } -
bsps/i386/pc386/start/smp-imps.c
rc954003 r208cd6b 85 85 extern void _pc386_delay(void); 86 86 extern uint32_t* gdtdesc; 87 88 static int lapic_dummy = 0; 89 unsigned imps_lapic_addr = ((unsigned)(&lapic_dummy)) - LAPIC_ID; 87 90 88 91 /* #define KERNEL_PRINT(_format) printk(_format) */ … … 221 224 * APIC ICR write and status check function. 222 225 */ 223 staticint226 int 224 227 send_ipi(unsigned int dst, unsigned int v) 225 228 { … … 699 702 * Function finished. 700 703 */ 701 staticint704 int 702 705 imps_probe(void) 703 706 { … … 769 772 } 770 773 771 static void ipi_install_irq(void) 774 void 775 ipi_install_irq(void) 772 776 { 773 777 rtems_status_code status; … … 803 807 _SMP_Start_multitasking_on_secondary_processor( _Per_CPU_Get() ); 804 808 } 805 806 uint32_t _CPU_SMP_Initialize( void )807 {808 /* XXX need to deal with finding too many cores */809 810 return (uint32_t) imps_probe();811 }812 813 void _CPU_SMP_Prepare_start_multitasking( void )814 {815 /* Do nothing */816 }817 818 bool _CPU_SMP_Start_processor( uint32_t cpu_index )819 {820 (void) cpu_index;821 822 return true;823 }824 825 void _CPU_SMP_Finalize_initialization( uint32_t cpu_count )826 {827 if ( cpu_count > 1 )828 ipi_install_irq();829 }830 831 void _CPU_SMP_Send_interrupt( uint32_t target_processor_index )832 {833 send_ipi( target_processor_index, 0x30 );834 } -
c/src/lib/libbsp/i386/pc386/Makefile.am
rc954003 r208cd6b 111 111 112 112 if HAS_SMP 113 librtemsbsp_a_SOURCES += ../../../../../../bsps/i386/pc386/start/getcpuid.c114 113 librtemsbsp_a_SOURCES += ../../../../../../bsps/i386/pc386/start/smp-imps.c 114 librtemsbsp_a_SOURCES += ../../../../../../bsps/i386/pc386/start/bspsmp.c 115 115 116 116 project_lib_DATA += appstart.$(OBJEXT)
Note: See TracChangeset
for help on using the changeset viewer.