summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-07-29 01:49:15 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-07-30 17:23:38 +0000
commit0df754bdb03982c64cdd78bbeec102bfe9a7a297 (patch)
tree7163a905719954251223583b5ac87cec47317d50
parenta239cf488a058c789839ff4e6760286d9f13c037 (diff)
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 7a5dd781d147 ("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 32169720bb67 ("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>
-rw-r--r--src/soc/amd/common/block/data_fabric/domain.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/data_fabric/domain.c b/src/soc/amd/common/block/data_fabric/domain.c
index fdc31b2f35..1b33f3181e 100644
--- a/src/soc/amd/common/block/data_fabric/domain.c
+++ b/src/soc/amd/common/block/data_fabric/domain.c
@@ -225,6 +225,10 @@ void amd_pci_domain_fill_ssdt(const struct device *domain)
for (res = domain->resource_list; res != NULL; res = res->next) {
if (!(res->flags & IORESOURCE_ASSIGNED))
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) {
case IORESOURCE_IO:
write_ssdt_domain_io_producer_range(acpi_device_name(domain),