Changeset 208cd6b in rtems


Ignore:
Timestamp:
May 31, 2020, 2:22:57 PM (8 months ago)
Author:
Jan Sommer <jan.sommer@…>
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)
Message:

bsps/pc386: Separate smp API functions. Makes smpfatal08 link

Files:
1 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • bsps/i386/include/bsp/smp-imps.h

    rc954003 r208cd6b  
    234234extern char _binary_appstart_bin_size[];
    235235
     236/** @brief base address of the local apic. Usually 0xFEE00000 */
     237extern unsigned imps_lapic_addr;
     238
    236239/*
    237240 *  Defines that use variables
  • bsps/i386/pc386/include/bsp.h

    rc954003 r208cd6b  
    253253void C_dispatch_isr(int vector);
    254254
     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
    255262#ifdef __cplusplus
    256263}
  • bsps/i386/pc386/start/smp-imps.c

    rc954003 r208cd6b  
    8585extern void _pc386_delay(void);
    8686extern uint32_t* gdtdesc;
     87
     88static int lapic_dummy = 0;
     89unsigned imps_lapic_addr = ((unsigned)(&lapic_dummy)) - LAPIC_ID;
    8790
    8891/* #define KERNEL_PRINT(_format)       printk(_format) */
     
    221224 *  APIC ICR write and status check function.
    222225 */
    223 static int
     226int
    224227send_ipi(unsigned int dst, unsigned int v)
    225228{
     
    699702 *  Function finished.
    700703 */
    701 static int
     704int
    702705imps_probe(void)
    703706{
     
    769772}
    770773
    771 static void ipi_install_irq(void)
     774void
     775ipi_install_irq(void)
    772776{
    773777  rtems_status_code status;
     
    803807  _SMP_Start_multitasking_on_secondary_processor( _Per_CPU_Get() );
    804808}
    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  
    111111
    112112if HAS_SMP
    113 librtemsbsp_a_SOURCES += ../../../../../../bsps/i386/pc386/start/getcpuid.c
    114113librtemsbsp_a_SOURCES += ../../../../../../bsps/i386/pc386/start/smp-imps.c
     114librtemsbsp_a_SOURCES += ../../../../../../bsps/i386/pc386/start/bspsmp.c
    115115
    116116project_lib_DATA += appstart.$(OBJEXT)
Note: See TracChangeset for help on using the changeset viewer.