Module Name: src
Committed By: jmcneill
Date: Sat Aug 13 16:44:11 UTC 2022
Modified Files:
src/sys/arch/arm/acpi: acpipchb.c
Log Message:
acpipchb: Add a kernel cmdline option to skip PCI resource assignment.
Passing "nopciconf" to the kernel will force acpipchb to skip PCI
resource assignment.
To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/acpi/acpipchb.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/acpi/acpipchb.c
diff -u src/sys/arch/arm/acpi/acpipchb.c:1.28 src/sys/arch/arm/acpi/acpipchb.c:1.29
--- src/sys/arch/arm/acpi/acpipchb.c:1.28 Tue Aug 10 15:31:38 2021
+++ src/sys/arch/arm/acpi/acpipchb.c Sat Aug 13 16:44:11 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: acpipchb.c,v 1.28 2021/08/10 15:31:38 jmcneill Exp $ */
+/* $NetBSD: acpipchb.c,v 1.29 2022/08/13 16:44:11 jmcneill Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpipchb.c,v 1.28 2021/08/10 15:31:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpipchb.c,v 1.29 2022/08/13 16:44:11 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -44,6 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: acpipchb.c,v
#include <sys/cpu.h>
#include <arm/cpufunc.h>
+#include <arm/bootconfig.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
@@ -190,11 +191,15 @@ acpipchb_configure_bus(struct acpipchb_s
struct acpi_pci_context *ap = md_pc->pc_conf_v;
struct pciconf_resources *pcires;
ACPI_STATUS rv;
- int error;
+ int error, val;
if (!acpi_pci_ignore_boot_config(sc->sc_handle)) {
return;
}
+ if (get_bootconf_option(boot_args, "nopciconf",
+ BOOTOPT_TYPE_BOOLEAN, &val) && val) {
+ return;
+ }
if ((ap->ap_flags & ACPI_PCI_FLAG_NO_MCFG) != 0) {
pcires = pciconf_resource_init();