Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/arch/x86/acpi Apply patch, requested by manu in ticke...



details:   https://anonhg.NetBSD.org/src/rev/bdffa2f6e52b
branches:  netbsd-8
changeset: 454634:bdffa2f6e52b
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Sep 23 14:36:17 2019 +0000

description:
Apply patch, requested by manu in ticket #1380: add EFI specific guids
here locally for XEN (solved differently in HEAD by including more efi
support code in XEN kernels for PVHVM).

diffstat:

 sys/arch/x86/acpi/acpi_machdep.c |  16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diffs (51 lines):

diff -r 4e34d83ff43c -r bdffa2f6e52b sys/arch/x86/acpi/acpi_machdep.c
--- a/sys/arch/x86/acpi/acpi_machdep.c  Mon Sep 23 13:51:12 2019 +0000
+++ b/sys/arch/x86/acpi/acpi_machdep.c  Mon Sep 23 14:36:17 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_machdep.c,v 1.18.6.1 2019/09/18 16:30:33 martin Exp $ */
+/* $NetBSD: acpi_machdep.c,v 1.18.6.2 2019/09/23 14:36:17 martin Exp $ */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.18.6.1 2019/09/18 16:30:33 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.18.6.2 2019/09/23 14:36:17 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -102,6 +102,14 @@
 
 #ifdef XEN
        /*
+        * This should use EFI_UUID_ACPI20 and EFI_UUID_ACPI10
+        * from src/sys/arch/x86/x86/efi.c but we want the
+        * ablility to build without this file included.
+        */
+       const struct uuid UUID_ACPI20 = EFI_TABLE_ACPI20;
+       const struct uuid UUID_ACPI10 = EFI_TABLE_ACPI10;
+
+       /*
         * Obtain the ACPI RSDP from the hypervisor. 
         * This is the only way to go if Xen booted from EFI: the 
         * Extended BIOS Data Area (EBDA) is not mapped, and Xen 
@@ -125,7 +133,7 @@
 
                for (i = 0; i < info->cfg.nent; i++) {
                        if (memcmp(&ct[i].ct_uuid,
-                           &EFI_UUID_ACPI20, sizeof(EFI_UUID_ACPI20)) == 0) {
+                           &UUID_ACPI20, sizeof(UUID_ACPI20)) == 0) {
                                PhysicalAddress = (ACPI_PHYSICAL_ADDRESS)
                                    (uintptr_t)ct[i].ct_data;
                                if (PhysicalAddress)
@@ -136,7 +144,7 @@
 
                for (i = 0; i < info->cfg.nent; i++) {
                        if (memcmp(&ct[i].ct_uuid,
-                           &EFI_UUID_ACPI10, sizeof(EFI_UUID_ACPI10)) == 0) {
+                           &UUID_ACPI10, sizeof(UUID_ACPI10)) == 0) {
                                PhysicalAddress = (ACPI_PHYSICAL_ADDRESS)
                                    (uintptr_t)ct[i].ct_data;
                                if (PhysicalAddress)



Home | Main Index | Thread Index | Old Index