git: 4a38527105d5 - main - pci: Ignore PCRx devices resources
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 09 May 2025 11:08:46 UTC
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=4a38527105d551d4ed3f8d8b51e055cc79be7c1b commit 4a38527105d551d4ed3f8d8b51e055cc79be7c1b Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2025-05-03 05:59:45 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2025-05-08 18:38:36 +0000 pci: Ignore PCRx devices resources Some systems provide two PCI root complex devices in the ACPI tables. Allow us to skip known pci-like devices even if they aren't detected as a PCI root complex. Reviewed by: cognet, jhb Co-authored-by: cognet Differential Revision: https://reviews.freebsd.org/D49709 --- sys/dev/acpica/acpi_resource.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c index 8c5a3ed57f32..8ced9b32cb22 100644 --- a/sys/dev/acpica/acpi_resource.c +++ b/sys/dev/acpica/acpi_resource.c @@ -67,6 +67,16 @@ struct lookup_irq_request { static char *pcilink_ids[] = { "PNP0C0F", NULL }; +/* + * Devices with invalid memory resources + */ +static char *bad_memresource_ids[] = { + /* PRCx on Radxa Orion O6 conflicts with the PCI resource range */ + "CIXH2020", + NULL +}; + + static ACPI_STATUS acpi_lookup_irq_handler(ACPI_RESOURCE *res, void *context) { @@ -620,6 +630,11 @@ acpi_res_ignore(device_t dev, int type, rman_res_t start, rman_res_t count) * access. */ if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { + if (type == SYS_RES_MEMORY && + ACPI_ID_PROBE(device_get_parent(dev), dev, bad_memresource_ids, + NULL) <= 0) + return (true); + if (ACPI_SUCCESS(AcpiGetObjectInfo(ad->ad_handle, &devinfo))) { if ((devinfo->Flags & ACPI_PCI_ROOT_BRIDGE) != 0) { #if defined(__i386__) || defined(__amd64__)