Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen Don't override isadma defflag for Xen, now that...



details:   https://anonhg.NetBSD.org/src/rev/55da3fe9cf6f
branches:  trunk
changeset: 367706:55da3fe9cf6f
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Thu Jun 23 14:32:16 2022 +0000

description:
Don't override isadma defflag for Xen, now that isadma is built for Xen PV too.
While there, match amd64 mainbus and call isa_dmainit() before attaching acpi.

Fixes a panic at boot on some hardware with a floppy disk controller.

diffstat:

 sys/arch/xen/conf/files.compat |   3 +--
 sys/arch/xen/xen/hypervisor.c  |  13 +++++++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diffs (58 lines):

diff -r 09aca12df4f4 -r 55da3fe9cf6f sys/arch/xen/conf/files.compat
--- a/sys/arch/xen/conf/files.compat    Thu Jun 23 13:46:27 2022 +0000
+++ b/sys/arch/xen/conf/files.compat    Thu Jun 23 14:32:16 2022 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.compat,v 1.33 2020/04/25 15:26:17 bouyer Exp $
+#      $NetBSD: files.compat,v 1.34 2022/06/23 14:32:16 bouyer Exp $
 #      NetBSD: files.x86,v 1.10 2003/10/08 17:30:00 bouyer Exp 
 
 # options for MP configuration through the MP spec
@@ -9,7 +9,6 @@
 defflag        lapic.h                 XXXLAPIC
 defflag        apm.h                   XXXAPM
 defflag        eisa.h                  XXXEISA
-defflag        isadma.h                XXXISADMA
 defflag        mca.h                   XXXMCA
 defflag        ega.h                   XXXEGA
 defflag        pcdisplay.h             XXXPCDISPLAY
diff -r 09aca12df4f4 -r 55da3fe9cf6f sys/arch/xen/xen/hypervisor.c
--- a/sys/arch/xen/xen/hypervisor.c     Thu Jun 23 13:46:27 2022 +0000
+++ b/sys/arch/xen/xen/hypervisor.c     Thu Jun 23 14:32:16 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor.c,v 1.95 2022/05/25 15:52:25 bouyer Exp $ */
+/* $NetBSD: hypervisor.c,v 1.96 2022/06/23 14:32:16 bouyer Exp $ */
 
 /*
  * Copyright (c) 2005 Manuel Bouyer.
@@ -53,7 +53,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.95 2022/05/25 15:52:25 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.96 2022/06/23 14:32:16 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -63,6 +63,7 @@
 #include "xenbus.h"
 #include "xencons.h"
 #include "isa.h"
+#include "isadma.h"
 #include "pci.h"
 #include "acpica.h"
 #include "kernfs.h"
@@ -689,6 +690,14 @@
 
 #if defined(DOM0OPS)
 #if defined(XENPV)
+#if NISADMA > 0 && NACPICA > 0
+        /*
+        * ACPI needs ISA DMA initialized before they start probing.
+        */
+       isa_dmainit(&x86_isa_chipset, x86_bus_space_io, &isa_bus_dma_tag,
+           self);
+#endif
+
 #if NPCI > 0
 #if NACPICA > 0
        if (acpi_present) {



Home | Main Index | Thread Index | Old Index