From 5540f4970fd1fdb082f42515c0ceb112e95fc98b Mon Sep 17 00:00:00 2001 From: Philip Guenther Date: Fri, 26 Jun 2015 18:12:24 +0000 Subject: Completely skip entries for disabled LAPICs so they don't overwrite legit enabled ones problem reported by Pedro Caetano (pedrocaetano (at) binaryflows.com) ok kettenis@ --- sys/dev/acpi/acpimadt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/dev/acpi/acpimadt.c b/sys/dev/acpi/acpimadt.c index 5b65ec575f8..f2247286f4e 100644 --- a/sys/dev/acpi/acpimadt.c +++ b/sys/dev/acpi/acpimadt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpimadt.c,v 1.31 2015/02/09 08:15:19 kettenis Exp $ */ +/* $OpenBSD: acpimadt.c,v 1.32 2015/06/26 18:12:23 guenther Exp $ */ /* * Copyright (c) 2006 Mark Kettenis * @@ -239,14 +239,14 @@ acpimadt_attach(struct device *parent, struct device *self, void *aux) entry->madt_lapic.apic_id, entry->madt_lapic.flags); + if ((entry->madt_lapic.flags & ACPI_PROC_ENABLE) == 0) + break; + lapic_map[entry->madt_lapic.acpi_proc_id] = entry->madt_lapic.apic_id; acpi_lapic_flags[entry->madt_lapic.acpi_proc_id] = entry->madt_lapic.flags; - if ((entry->madt_lapic.flags & ACPI_PROC_ENABLE) == 0) - break; - memset(&caa, 0, sizeof(struct cpu_attach_args)); if (lapic_cpu_number() == entry->madt_lapic.apic_id) caa.cpu_role = CPU_ROLE_BP; -- cgit v1.2.3