2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2003 John Baldwin <jhb@FreeBSD.org>
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 #include <sys/param.h>
29 #include <sys/systm.h>
31 #include <sys/kernel.h>
32 #include <sys/limits.h>
33 #include <sys/malloc.h>
38 #include <x86/apicreg.h>
39 #include <machine/intr_machdep.h>
40 #include <x86/apicvar.h>
41 #include <machine/md_var.h>
42 #include <x86/vmware.h>
44 #include <contrib/dev/acpica/include/acpi.h>
45 #include <contrib/dev/acpica/include/aclocal.h>
46 #include <contrib/dev/acpica/include/actables.h>
48 #include <dev/acpica/acpivar.h>
49 #include <dev/pci/pcivar.h>
51 /* These two arrays are indexed by APIC IDs. */
57 static struct lapic_info {
62 int madt_found_sci_override;
63 static ACPI_TABLE_MADT *madt;
64 static vm_paddr_t madt_physaddr;
65 static vm_offset_t madt_length;
67 static MALLOC_DEFINE(M_MADT, "madt_table", "ACPI MADT Table Items");
69 static enum intr_polarity interrupt_polarity(UINT16 IntiFlags, UINT8 Source);
70 static enum intr_trigger interrupt_trigger(UINT16 IntiFlags, UINT8 Source);
71 static int madt_find_cpu(u_int acpi_id, u_int *apic_id);
72 static int madt_find_interrupt(int intr, void **apic, u_int *pin);
73 static void madt_parse_apics(ACPI_SUBTABLE_HEADER *entry, void *arg);
74 static void madt_parse_interrupt_override(
75 ACPI_MADT_INTERRUPT_OVERRIDE *intr);
76 static void madt_parse_ints(ACPI_SUBTABLE_HEADER *entry,
78 static void madt_parse_local_nmi(ACPI_MADT_LOCAL_APIC_NMI *nmi);
79 static void madt_parse_nmi(ACPI_MADT_NMI_SOURCE *nmi);
80 static int madt_probe(void);
81 static int madt_probe_cpus(void);
82 static void madt_probe_cpus_handler(ACPI_SUBTABLE_HEADER *entry,
84 static void madt_setup_cpus_handler(ACPI_SUBTABLE_HEADER *entry,
86 static void madt_register(void *dummy);
87 static int madt_setup_local(void);
88 static int madt_setup_io(void);
89 static void madt_walk_table(acpi_subtable_handler *handler, void *arg);
91 static struct apic_enumerator madt_enumerator = {
93 .apic_probe = madt_probe,
94 .apic_probe_cpus = madt_probe_cpus,
95 .apic_setup_local = madt_setup_local,
96 .apic_setup_io = madt_setup_io
100 * Look for an ACPI Multiple APIC Description Table ("APIC")
106 madt_physaddr = acpi_find_table(ACPI_SIG_MADT);
107 if (madt_physaddr == 0)
113 * Run through the MP table enumerating CPUs.
116 madt_probe_cpus(void)
119 madt = acpi_map_table(madt_physaddr, ACPI_SIG_MADT);
120 madt_length = madt->Header.Length;
121 KASSERT(madt != NULL, ("Unable to re-map MADT"));
122 madt_walk_table(madt_probe_cpus_handler, NULL);
123 acpi_unmap_table(madt);
128 static const char *x2apic_sandy_dis[] = {
130 "ASUSTeK Computer Inc.",
131 "SAMSUNG ELECTRONICS CO., LTD.",
135 * Automatically detect several configurations where x2APIC mode is
136 * known to cause troubles. User can override the setting with
137 * hw.x2apic_enable tunable.
140 madt_x2apic_disable_reason(void)
142 ACPI_TABLE_DMAR *dmartbl;
143 vm_paddr_t dmartbl_physaddr;
151 dmartbl_physaddr = acpi_find_table(ACPI_SIG_DMAR);
152 if (dmartbl_physaddr != 0) {
153 dmartbl = acpi_map_table(dmartbl_physaddr, ACPI_SIG_DMAR);
154 if ((dmartbl->Flags & ACPI_DMAR_X2APIC_OPT_OUT) != 0)
155 reason = "by DMAR table";
156 acpi_unmap_table(dmartbl);
161 if (vm_guest == VM_GUEST_VMWARE) {
162 vmware_hvcall(0, VMW_HVCMD_GETVCPU_INFO,
163 VMW_HVCMD_DEFAULT_PARAM, p);
164 if ((p[0] & VMW_VCPUINFO_VCPU_RESERVED) != 0 ||
165 (p[0] & VMW_VCPUINFO_LEGACY_X2APIC) == 0)
166 return ("inside VMWare without intr redirection");
169 if (vm_guest == VM_GUEST_NO &&
170 CPUID_TO_FAMILY(cpu_id) == 0x6 &&
171 CPUID_TO_MODEL(cpu_id) == 0x2a) {
172 hw_vendor = kern_getenv("smbios.planar.maker");
174 * It seems that some SandyBridge-based notebook
175 * BIOSes have a bug which prevents booting AP in
176 * x2APIC mode. Since the only way to detect mobile
177 * CPU is to check northbridge pci id, which cannot be
178 * done that early, disable x2APIC for all such
181 if (hw_vendor != NULL) {
182 for (i = 0; i < nitems(x2apic_sandy_dis); i++) {
183 if (strcmp(hw_vendor, x2apic_sandy_dis[i]) ==
186 "for a suspected SandyBridge BIOS bug";
200 * Initialize the local APIC on the BSP.
203 madt_setup_local(void)
209 if ((cpu_feature2 & CPUID2_X2APIC) != 0) {
210 reason = madt_x2apic_disable_reason();
211 bios_x2apic = lapic_is_x2apic();
212 if (reason != NULL && bios_x2apic) {
214 printf("x2APIC should be disabled %s but "
215 "already enabled by BIOS; enabling.\n",
221 else if (bootverbose)
222 printf("x2APIC available but disabled %s\n", reason);
223 user_x2apic = x2apic_mode;
224 TUNABLE_INT_FETCH("hw.apic.x2apic_mode", &user_x2apic);
225 if (user_x2apic != x2apic_mode) {
226 if (bios_x2apic && !user_x2apic)
227 printf("x2APIC disabled by tunable and "
228 "enabled by BIOS; ignoring tunable.");
230 x2apic_mode = user_x2apic;
235 * Truncate max_apic_id if not in x2APIC mode. Some structures
236 * will already be allocated with the previous max_apic_id, but
237 * at least we can prevent wasting more memory elsewhere.
240 max_apic_id = min(max_apic_id, xAPIC_MAX_APIC_ID);
242 madt = pmap_mapbios(madt_physaddr, madt_length);
243 lapics = malloc(sizeof(*lapics) * (max_apic_id + 1), M_MADT,
245 madt_walk_table(madt_setup_cpus_handler, NULL);
247 lapic_init(madt->Address);
248 printf("ACPI APIC Table: <%.*s %.*s>\n",
249 (int)sizeof(madt->Header.OemId), madt->Header.OemId,
250 (int)sizeof(madt->Header.OemTableId), madt->Header.OemTableId);
253 * We ignore 64-bit local APIC override entries. Should we
254 * perhaps emit a warning here if we find one?
260 * Enumerate I/O APICs and setup interrupt sources.
269 KASSERT(lapics != NULL, ("local APICs not initialized"));
271 /* Try to initialize ACPI so that we can access the FADT. */
273 if (ACPI_FAILURE(i)) {
274 printf("MADT: ACPI Startup failed with %s\n",
275 AcpiFormatException(i));
276 printf("Try disabling either ACPI or apic support.\n");
277 panic("Using MADT but ACPI doesn't work");
280 ioapics = malloc(sizeof(*ioapics) * (IOAPIC_MAX_ID + 1), M_MADT,
283 /* First, we run through adding I/O APIC's. */
284 madt_walk_table(madt_parse_apics, NULL);
286 /* Second, we run through the table tweaking interrupt sources. */
287 madt_walk_table(madt_parse_ints, NULL);
290 * If there was not an explicit override entry for the SCI,
291 * force it to use level trigger and active-low polarity.
293 if (!madt_found_sci_override) {
294 if (madt_find_interrupt(AcpiGbl_FADT.SciInterrupt, &ioapic,
296 printf("MADT: Could not find APIC for SCI IRQ %u\n",
297 AcpiGbl_FADT.SciInterrupt);
300 "MADT: Forcing active-low polarity and level trigger for SCI\n");
301 ioapic_set_polarity(ioapic, pin, INTR_POLARITY_LOW);
302 ioapic_set_triggermode(ioapic, pin, INTR_TRIGGER_LEVEL);
306 /* Third, we register all the I/O APIC's. */
307 for (i = 0; i <= IOAPIC_MAX_ID; i++)
308 if (ioapics[i].io_apic != NULL)
309 ioapic_register(ioapics[i].io_apic);
311 /* Finally, we throw the switch to enable the I/O APIC's. */
312 acpi_SetDefaultIntrModel(ACPI_INTR_APIC);
314 free(ioapics, M_MADT);
317 /* NB: this is the last use of the lapics array. */
318 free(lapics, M_MADT);
325 madt_register(void *dummy __unused)
328 apic_register_enumerator(&madt_enumerator);
330 SYSINIT(madt_register, SI_SUB_TUNABLES - 1, SI_ORDER_FIRST, madt_register, NULL);
333 * Call the handler routine for each entry in the MADT table.
336 madt_walk_table(acpi_subtable_handler *handler, void *arg)
339 acpi_walk_subtables(madt + 1, (char *)madt + madt->Header.Length,
344 madt_parse_cpu(unsigned int apic_id, unsigned int flags)
347 if (!(flags & ACPI_MADT_ENABLED) ||
349 mp_ncpus == MAXCPU ||
351 apic_id > MAX_APIC_ID)
356 mp_maxid = mp_ncpus - 1;
358 max_apic_id = max(apic_id, max_apic_id);
362 madt_add_cpu(u_int acpi_id, u_int apic_id, u_int flags)
364 struct lapic_info *la;
367 * The MADT does not include a BSP flag, so we have to let the
368 * MP code figure out which CPU is the BSP on its own.
371 printf("MADT: Found CPU APIC ID %u ACPI ID %u: %s\n",
372 apic_id, acpi_id, flags & ACPI_MADT_ENABLED ?
373 "enabled" : "disabled");
374 if (!(flags & ACPI_MADT_ENABLED))
376 if (apic_id > max_apic_id) {
377 printf("MADT: Ignoring local APIC ID %u (too high)\n",
382 la = &lapics[apic_id];
383 KASSERT(la->la_enabled == 0, ("Duplicate local APIC ID %u", apic_id));
385 la->la_acpi_id = acpi_id;
386 lapic_create(apic_id, 0);
390 madt_probe_cpus_handler(ACPI_SUBTABLE_HEADER *entry, void *arg)
392 ACPI_MADT_LOCAL_APIC *proc;
393 ACPI_MADT_LOCAL_X2APIC *x2apic;
395 switch (entry->Type) {
396 case ACPI_MADT_TYPE_LOCAL_APIC:
397 proc = (ACPI_MADT_LOCAL_APIC *)entry;
398 madt_parse_cpu(proc->Id, proc->LapicFlags);
400 case ACPI_MADT_TYPE_LOCAL_X2APIC:
401 x2apic = (ACPI_MADT_LOCAL_X2APIC *)entry;
402 madt_parse_cpu(x2apic->LocalApicId, x2apic->LapicFlags);
408 madt_setup_cpus_handler(ACPI_SUBTABLE_HEADER *entry, void *arg)
410 ACPI_MADT_LOCAL_APIC *proc;
411 ACPI_MADT_LOCAL_X2APIC *x2apic;
413 switch (entry->Type) {
414 case ACPI_MADT_TYPE_LOCAL_APIC:
415 proc = (ACPI_MADT_LOCAL_APIC *)entry;
416 madt_add_cpu(proc->ProcessorId, proc->Id, proc->LapicFlags);
418 case ACPI_MADT_TYPE_LOCAL_X2APIC:
419 x2apic = (ACPI_MADT_LOCAL_X2APIC *)entry;
420 madt_add_cpu(x2apic->Uid, x2apic->LocalApicId,
427 * Add an I/O APIC from an entry in the table.
430 madt_parse_apics(ACPI_SUBTABLE_HEADER *entry, void *arg __unused)
432 ACPI_MADT_IO_APIC *apic;
434 switch (entry->Type) {
435 case ACPI_MADT_TYPE_IO_APIC:
436 apic = (ACPI_MADT_IO_APIC *)entry;
439 "MADT: Found IO APIC ID %u, Interrupt %u at %p\n",
440 apic->Id, apic->GlobalIrqBase,
441 (void *)(uintptr_t)apic->Address);
442 if (apic->Id > IOAPIC_MAX_ID)
443 panic("%s: I/O APIC ID %u too high", __func__,
445 if (ioapics[apic->Id].io_apic != NULL)
446 panic("%s: Double APIC ID %u", __func__, apic->Id);
447 ioapics[apic->Id].io_apic = ioapic_create(apic->Address,
448 apic->Id, apic->GlobalIrqBase);
449 ioapics[apic->Id].io_vector = apic->GlobalIrqBase;
457 * Determine properties of an interrupt source. Note that for ACPI these
458 * functions are only used for ISA interrupts, so we assume ISA bus values
459 * (Active Hi, Edge Triggered) for conforming values except for the ACPI
460 * SCI for which we use Active Lo, Level Triggered.
462 static enum intr_polarity
463 interrupt_polarity(UINT16 IntiFlags, UINT8 Source)
466 switch (IntiFlags & ACPI_MADT_POLARITY_MASK) {
468 printf("WARNING: Bogus Interrupt Polarity. Assume CONFORMS\n");
470 case ACPI_MADT_POLARITY_CONFORMS:
471 if (Source == AcpiGbl_FADT.SciInterrupt)
472 return (INTR_POLARITY_LOW);
474 return (INTR_POLARITY_HIGH);
475 case ACPI_MADT_POLARITY_ACTIVE_HIGH:
476 return (INTR_POLARITY_HIGH);
477 case ACPI_MADT_POLARITY_ACTIVE_LOW:
478 return (INTR_POLARITY_LOW);
482 static enum intr_trigger
483 interrupt_trigger(UINT16 IntiFlags, UINT8 Source)
486 switch (IntiFlags & ACPI_MADT_TRIGGER_MASK) {
488 printf("WARNING: Bogus Interrupt Trigger Mode. Assume CONFORMS.\n");
490 case ACPI_MADT_TRIGGER_CONFORMS:
491 if (Source == AcpiGbl_FADT.SciInterrupt)
492 return (INTR_TRIGGER_LEVEL);
494 return (INTR_TRIGGER_EDGE);
495 case ACPI_MADT_TRIGGER_EDGE:
496 return (INTR_TRIGGER_EDGE);
497 case ACPI_MADT_TRIGGER_LEVEL:
498 return (INTR_TRIGGER_LEVEL);
503 * Find the local APIC ID associated with a given ACPI Processor ID.
506 madt_find_cpu(u_int acpi_id, u_int *apic_id)
510 for (i = 0; i <= max_apic_id; i++) {
511 if (!lapics[i].la_enabled)
513 if (lapics[i].la_acpi_id != acpi_id)
522 * Find the IO APIC and pin on that APIC associated with a given global
526 madt_find_interrupt(int intr, void **apic, u_int *pin)
531 for (i = 0; i <= IOAPIC_MAX_ID; i++) {
532 if (ioapics[i].io_apic == NULL ||
533 ioapics[i].io_vector > intr)
536 ioapics[best].io_vector < ioapics[i].io_vector)
541 *apic = ioapics[best].io_apic;
542 *pin = intr - ioapics[best].io_vector;
544 printf("WARNING: Found intpin of %u for vector %d\n", *pin,
550 madt_parse_interrupt_values(void *entry,
551 enum intr_trigger *trig, enum intr_polarity *pol)
553 ACPI_MADT_INTERRUPT_OVERRIDE *intr;
559 printf("MADT: Interrupt override: source %u, irq %u\n",
560 intr->SourceIrq, intr->GlobalIrq);
561 KASSERT(intr->Bus == 0, ("bus for interrupt overrides must be zero"));
564 * Lookup the appropriate trigger and polarity modes for this
567 *trig = interrupt_trigger(intr->IntiFlags, intr->SourceIrq);
568 *pol = interrupt_polarity(intr->IntiFlags, intr->SourceIrq);
571 * If the SCI is identity mapped but has edge trigger and
572 * active-hi polarity or the force_sci_lo tunable is set,
573 * force it to use level/lo.
575 if (intr->SourceIrq == AcpiGbl_FADT.SciInterrupt) {
576 madt_found_sci_override = 1;
577 if (getenv_string("hw.acpi.sci.trigger", buf, sizeof(buf))) {
578 if (tolower(buf[0]) == 'e')
579 *trig = INTR_TRIGGER_EDGE;
580 else if (tolower(buf[0]) == 'l')
581 *trig = INTR_TRIGGER_LEVEL;
584 "Invalid trigger %s: must be 'edge' or 'level'",
586 printf("MADT: Forcing SCI to %s trigger\n",
587 *trig == INTR_TRIGGER_EDGE ? "edge" : "level");
589 if (getenv_string("hw.acpi.sci.polarity", buf, sizeof(buf))) {
590 if (tolower(buf[0]) == 'h')
591 *pol = INTR_POLARITY_HIGH;
592 else if (tolower(buf[0]) == 'l')
593 *pol = INTR_POLARITY_LOW;
596 "Invalid polarity %s: must be 'high' or 'low'",
598 printf("MADT: Forcing SCI to active %s polarity\n",
599 *pol == INTR_POLARITY_HIGH ? "high" : "low");
605 * Parse an interrupt source override for an ISA interrupt.
608 madt_parse_interrupt_override(ACPI_MADT_INTERRUPT_OVERRIDE *intr)
610 void *new_ioapic, *old_ioapic;
611 u_int new_pin, old_pin;
612 enum intr_trigger trig;
613 enum intr_polarity pol;
615 if (acpi_quirks & ACPI_Q_MADT_IRQ0 && intr->SourceIrq == 0 &&
616 intr->GlobalIrq == 2) {
618 printf("MADT: Skipping timer override\n");
622 if (madt_find_interrupt(intr->GlobalIrq, &new_ioapic, &new_pin) != 0) {
623 printf("MADT: Could not find APIC for vector %u (IRQ %u)\n",
624 intr->GlobalIrq, intr->SourceIrq);
628 madt_parse_interrupt_values(intr, &trig, &pol);
630 /* Remap the IRQ if it is mapped to a different interrupt vector. */
631 if (intr->SourceIrq != intr->GlobalIrq) {
633 * If the SCI is remapped to a non-ISA global interrupt,
634 * then override the vector we use to setup and allocate
637 if (intr->GlobalIrq > 15 &&
638 intr->SourceIrq == AcpiGbl_FADT.SciInterrupt)
639 acpi_OverrideInterruptLevel(intr->GlobalIrq);
641 ioapic_remap_vector(new_ioapic, new_pin,
643 if (madt_find_interrupt(intr->SourceIrq, &old_ioapic,
645 printf("MADT: Could not find APIC for source IRQ %u\n",
647 else if (ioapic_get_vector(old_ioapic, old_pin) ==
649 ioapic_disable_pin(old_ioapic, old_pin);
652 /* Program the polarity and trigger mode. */
653 ioapic_set_triggermode(new_ioapic, new_pin, trig);
654 ioapic_set_polarity(new_ioapic, new_pin, pol);
658 * Parse an entry for an NMI routed to an IO APIC.
661 madt_parse_nmi(ACPI_MADT_NMI_SOURCE *nmi)
666 if (madt_find_interrupt(nmi->GlobalIrq, &ioapic, &pin) != 0) {
667 printf("MADT: Could not find APIC for vector %u\n",
672 ioapic_set_nmi(ioapic, pin);
673 if (!(nmi->IntiFlags & ACPI_MADT_TRIGGER_CONFORMS))
674 ioapic_set_triggermode(ioapic, pin,
675 interrupt_trigger(nmi->IntiFlags, 0));
676 if (!(nmi->IntiFlags & ACPI_MADT_POLARITY_CONFORMS))
677 ioapic_set_polarity(ioapic, pin,
678 interrupt_polarity(nmi->IntiFlags, 0));
682 * Parse an entry for an NMI routed to a local APIC LVT pin.
685 madt_handle_local_nmi(u_int acpi_id, UINT8 Lint, UINT16 IntiFlags)
689 if (acpi_id == 0xffffffff)
690 apic_id = APIC_ID_ALL;
691 else if (madt_find_cpu(acpi_id, &apic_id) != 0) {
693 printf("MADT: Ignoring local NMI routed to "
694 "ACPI CPU %u\n", acpi_id);
698 pin = APIC_LVT_LINT0;
700 pin = APIC_LVT_LINT1;
701 lapic_set_lvt_mode(apic_id, pin, APIC_LVT_DM_NMI);
702 if (!(IntiFlags & ACPI_MADT_TRIGGER_CONFORMS))
703 lapic_set_lvt_triggermode(apic_id, pin,
704 interrupt_trigger(IntiFlags, 0));
705 if (!(IntiFlags & ACPI_MADT_POLARITY_CONFORMS))
706 lapic_set_lvt_polarity(apic_id, pin,
707 interrupt_polarity(IntiFlags, 0));
711 madt_parse_local_nmi(ACPI_MADT_LOCAL_APIC_NMI *nmi)
714 madt_handle_local_nmi(nmi->ProcessorId == 0xff ? 0xffffffff :
715 nmi->ProcessorId, nmi->Lint, nmi->IntiFlags);
719 madt_parse_local_x2apic_nmi(ACPI_MADT_LOCAL_X2APIC_NMI *nmi)
722 madt_handle_local_nmi(nmi->Uid, nmi->Lint, nmi->IntiFlags);
726 * Parse interrupt entries.
729 madt_parse_ints(ACPI_SUBTABLE_HEADER *entry, void *arg __unused)
732 switch (entry->Type) {
733 case ACPI_MADT_TYPE_INTERRUPT_OVERRIDE:
734 madt_parse_interrupt_override(
735 (ACPI_MADT_INTERRUPT_OVERRIDE *)entry);
737 case ACPI_MADT_TYPE_NMI_SOURCE:
738 madt_parse_nmi((ACPI_MADT_NMI_SOURCE *)entry);
740 case ACPI_MADT_TYPE_LOCAL_APIC_NMI:
741 madt_parse_local_nmi((ACPI_MADT_LOCAL_APIC_NMI *)entry);
743 case ACPI_MADT_TYPE_LOCAL_X2APIC_NMI:
744 madt_parse_local_x2apic_nmi(
745 (ACPI_MADT_LOCAL_X2APIC_NMI *)entry);
751 * Setup per-CPU ACPI IDs.
754 madt_set_ids(void *dummy)
756 struct lapic_info *la;
763 KASSERT(lapics != NULL, ("local APICs not initialized"));
767 KASSERT(pc != NULL, ("no pcpu data for CPU %u", i));
768 la = &lapics[pc->pc_apic_id];
770 panic("APIC: CPU with APIC ID %u is not enabled",
772 pc->pc_acpi_id = la->la_acpi_id;
774 printf("APIC: CPU %u has ACPI ID %u\n", i,
778 SYSINIT(madt_set_ids, SI_SUB_CPU, SI_ORDER_MIDDLE, madt_set_ids, NULL);