Changeset 208cd6b in rtems for bsps/i386/pc386/start/smp-imps.c


Ignore:
Timestamp:
May 31, 2020, 2:22:57 PM (9 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 }
Note: See TracChangeset for help on using the changeset viewer.