soc/intel/xeon_sp/spr: Fix IOAT resources
Do not generate empty mem32 resources for CPMx or HQMx stacks.
Switch existing arguments to make sure that base is bigger than
limit to indicate that the resource is invalid.
Change-Id: I679563e97c33c7ee35d402674972e55f521eafa8
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80793
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/soc/intel/xeon_sp/spr/ioat.c b/src/soc/intel/xeon_sp/spr/ioat.c
index 5528efa..bde7eba 100644
--- a/src/soc/intel/xeon_sp/spr/ioat.c
+++ b/src/soc/intel/xeon_sp/spr/ioat.c
@@ -101,7 +101,7 @@
mem64_limit = mem64_base + CPM_MMIO_SIZE - 1;
bus_base = sr->BusBase + CPM_BUS_OFFSET;
bus_limit = bus_base + CPM_RESERVED_BUS;
- create_ioat_domain(path, bus, bus_base, bus_limit, 0, -1, mem64_base, mem64_limit,
+ create_ioat_domain(path, bus, bus_base, bus_limit, -1, 0, mem64_base, mem64_limit,
DOMAIN_TYPE_CPM0);
/* HQM0 */
@@ -109,7 +109,7 @@
mem64_limit = mem64_base + HQM_MMIO_SIZE - 1;
bus_base = sr->BusBase + HQM_BUS_OFFSET;
bus_limit = bus_base + HQM_RESERVED_BUS;
- create_ioat_domain(path, bus, bus_base, bus_limit, 0, -1, mem64_base, mem64_limit,
+ create_ioat_domain(path, bus, bus_base, bus_limit, -1, 0, mem64_base, mem64_limit,
DOMAIN_TYPE_HQM0);
/* CPM1 (optional) */
@@ -118,7 +118,7 @@
bus_base = sr->BusBase + CPM1_BUS_OFFSET;
bus_limit = bus_base + CPM_RESERVED_BUS;
if (bus_limit <= sr->BusLimit)
- create_ioat_domain(path, bus, bus_base, bus_limit, 0, -1, mem64_base, mem64_limit,
+ create_ioat_domain(path, bus, bus_base, bus_limit, -1, 0, mem64_base, mem64_limit,
DOMAIN_TYPE_CPM1);
/* HQM1 (optional) */
@@ -127,7 +127,7 @@
bus_base = sr->BusBase + HQM1_BUS_OFFSET;
bus_limit = bus_base + HQM_RESERVED_BUS;
if (bus_limit <= sr->BusLimit)
- create_ioat_domain(path, bus, bus_base, bus_limit, 0, -1, mem64_base, mem64_limit,
+ create_ioat_domain(path, bus, bus_base, bus_limit, -1, 0, mem64_base, mem64_limit,
DOMAIN_TYPE_HQM1);
/* DINO */