aboutsummaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2024-02-25 16:14:15 -0600
committerMatt DeVillier <matt.devillier@gmail.com>2024-02-27 20:17:50 +0000
commitc3a34a482854592845e60f2bae3b56e1c5a6a139 (patch)
tree42a3428bd21950c537f3a727f80b1d16422fbf65 /src/soc
parent1aecff447dc98bf27abf734ebc96a5a88479f45c (diff)
soc/intel/common/lpc: Don't open a window for unassigned resources
Don't attempt to open a PMIO window for a resource which doesn't have the IORESOURCE_ASSIGNED flag set, since there is no point in doing so and there's a high likelihood that the base address is 0, which will throw an error. TEST=build/boot purism/librem_cnl (Mini v2), ensure no errors in cbmem log for attempting to open a PMIO window for unaassigned resources with base address 0. Change-Id: Ifba14a8f134ba12d5f5e9fdbac775d4f82b4c4de Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80750 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/common/block/lpc/lpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/intel/common/block/lpc/lpc.c b/src/soc/intel/common/block/lpc/lpc.c
index b27e09e96e..e8050354bc 100644
--- a/src/soc/intel/common/block/lpc/lpc.c
+++ b/src/soc/intel/common/block/lpc/lpc.c
@@ -91,7 +91,7 @@ static void pch_lpc_loop_resources(struct device *dev)
return;
for (res = dev->resource_list; res; res = res->next) {
- if (res->flags & IORESOURCE_IO)
+ if ((res->flags & IORESOURCE_IO) && (res->flags & IORESOURCE_ASSIGNED))
lpc_open_pmio_window(res->base, res->size);
}
pch_lpc_set_child_resources(dev);