soc/amd/common/data_fabric/domain: skip reserved resources for ACPI

The non-PCI resources added to the domain device are resource consumers,
so they mustn't be reported as resource producers. To make sure that
this is the case, skip all resources that have the IORESOURCE_RESERVE
flag set in amd_pci_domain_fill_ssdt.

Commit 7a5dd781d1 ("soc/amd/common/data_fabric/domain: provide
amd_pci_domain_fill_ssdt") that introduced amd_pci_domain_fill_ssdt
already contained the bug, but since no MMIO range consumers were added
back then, the bug only became visible when commit 32169720bb
("soc/amd/common/data_fabric/domain: report non-PCI MMIO resources")
added the reserved non-PCI MMIO resources to the domain device's
resources resulting in MMIO producer objects being generated for MMIO
consumers. Those producers that should have been consumers then
overlapped with the actual MMIO resource producers which caused Windows
to BSOD with an ACPI_BIOS_ERROR.

TEST=The non-PCI MMIO resources are no longer added as resource
producers and Windows boots again on google/frostflow.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: Matt DeVillier <matt.devillier@gmail.com>
Change-Id: Ib099675bc5bea93bf7c2a80f741bef067fd37a58
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76818
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
This commit is contained in:
Felix Held 2023-07-29 01:49:15 +02:00
parent a239cf488a
commit 0df754bdb0
1 changed files with 4 additions and 0 deletions

View File

@ -225,6 +225,10 @@ void amd_pci_domain_fill_ssdt(const struct device *domain)
for (res = domain->resource_list; res != NULL; res = res->next) { for (res = domain->resource_list; res != NULL; res = res->next) {
if (!(res->flags & IORESOURCE_ASSIGNED)) if (!(res->flags & IORESOURCE_ASSIGNED))
continue; continue;
/* Don't add MMIO producer ranges for reserved MMIO regions from non-PCI
devices */
if ((res->flags & IORESOURCE_RESERVE))
continue;
switch (res->flags & IORESOURCE_TYPE_MASK) { switch (res->flags & IORESOURCE_TYPE_MASK) {
case IORESOURCE_IO: case IORESOURCE_IO:
write_ssdt_domain_io_producer_range(acpi_device_name(domain), write_ssdt_domain_io_producer_range(acpi_device_name(domain),