DragonFly commits List (threaded) for 2009-06
DragonFly BSD
DragonFly commits List (threaded) for 2009-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

DragonFly-2.3.1.262.g223bf master sys/platform/pc32/i386 mp_machdep.c mp_madt.c sys/platform/pc32/include smp.h


From: Sepherosa Ziehau <sephe@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 14 Jun 2009 06:22:55 -0700 (PDT)

commit 223bf214b579c486a04c63795cdf9808b2e87b14
Author: Sepherosa Ziehau <sephe@dragonflybsd.org>
Date:   Sun Jun 14 19:39:44 2009 +0800

    MADT MP probe: Rework cpuid mapping, and cpuid to apicid mapping
    
    - Don't use the ACPI ProcessorID as our cpuid, some BIOSes count ProcessorID
      from 1, and ACPI standards actually allow that.  Instead, except for BSP,
      we set the processor's cpuid in the order that we found the MADT LAPIC
      entry.
    - Since MADT does not provide a way to identify the BSP, we will have to do
      it ourselves:
    
      Split the madt_parse() into three parts:
      o  madt_check(), preliminary length and revision check.
      o  madt_pass1(), locate the LAPIC address.
      o  madt_pass2(), set mp_naps and map cpuid to apicid.
    
      After madt_pass1(), the lapic is mapped, so we could get the current CPU's
      apic id.  Since the current CPU is BSP, we have the BSP's apic id.
      In madt_pass2(), we match the MADT LAPIC entry's apic_id field against the
      the value read from the current CPU's lapic id field.  Any matching means
      that entry contains information concerning BSP.
    
    Reported-by: tuxillo on EFnet #dragonflybsd

Summary of changes:
 sys/platform/pc32/i386/mp_machdep.c |   14 ++++-
 sys/platform/pc32/i386/mp_madt.c    |  115 +++++++++++++++++++++++++----------
 sys/platform/pc32/include/smp.h     |    4 +-
 3 files changed, 97 insertions(+), 36 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/223bf214b579c486a04c63795cdf9808b2e87b14


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]