Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/pci Disable MSI and MSI-X support if IAPC_BOOT_...



details:   https://anonhg.NetBSD.org/src/rev/07e95871a081
branches:  trunk
changeset: 989511:07e95871a081
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Fri Oct 15 18:51:38 2021 +0000

description:
Disable MSI and MSI-X support if IAPC_BOOT_ARCH reports that MSI is not
supported.

diffstat:

 sys/arch/x86/pci/pci_machdep.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r e50d1641a769 -r 07e95871a081 sys/arch/x86/pci/pci_machdep.c
--- a/sys/arch/x86/pci/pci_machdep.c    Fri Oct 15 18:44:53 2021 +0000
+++ b/sys/arch/x86/pci/pci_machdep.c    Fri Oct 15 18:51:38 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.88 2021/01/28 01:57:31 jmcneill Exp $        */
+/*     $NetBSD: pci_machdep.c,v 1.89 2021/10/15 18:51:38 jmcneill Exp $        */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.88 2021/01/28 01:57:31 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.89 2021/10/15 18:51:38 jmcneill Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -534,6 +534,16 @@
                aprint_verbose("\n");
                aprint_verbose_dev(self,
                    "This pci host does not support MSI-X.");
+#if NACPICA > 0
+       } else if (acpi_active &&
+                  AcpiGbl_FADT.Header.Revision >= 4 &&
+                  (AcpiGbl_FADT.BootFlags & ACPI_FADT_NO_MSI) != 0) {
+               pba->pba_flags &= ~PCI_FLAGS_MSI_OKAY;
+               pba->pba_flags &= ~PCI_FLAGS_MSIX_OKAY;
+               aprint_verbose("\n");
+               aprint_verbose_dev(self,
+                   "MSI support disabled via ACPI IAPC_BOOT_ARCH flag.\n");
+#endif
        } else {
                pba->pba_flags |= PCI_FLAGS_MSI_OKAY;
                pba->pba_flags |= PCI_FLAGS_MSIX_OKAY;



Home | Main Index | Thread Index | Old Index