From 58c2efc8e2cd5db065d0f4ab8678555e656e4a16 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Fri, 15 Sep 2023 21:33:13 +0200 Subject: [PATCH] soc/amd/common/data_fabric_helper: use data_fabric_get_mmio_base_size Use data_fabric_get_mmio_base_size in data_fabric_print_mmio_conf instead of open coding the functionality. This will fix the printing of the MMIO config in the SOC_AMD_COMMON_BLOCK_DATA_FABRIC_EXTENDED_MMIO case which wasn't handled properly before. TEST=Console output from this function doesn't change on Mandolin: === Data Fabric MMIO configuration registers === idx base limit control R W NP F-ID 0 fc000000 febfffff 93 x x 9 1 10000000000 ffffffffffff 93 x x 9 2 d0000000 f7ffffff 93 x x 9 3 0 ffff 90 9 4 fed00000 fed0ffff 93 x x 9 5 0 ffff 90 9 6 0 ffff 90 9 7 0 ffff 90 9 === Data Fabric MMIO configuration registers === idx base limit control R W NP F-ID 0 fc000000 febfffff 93 x x 9 1 10000000000 ffffffffffff 93 x x 9 2 d0000000 f7ffffff 93 x x 9 3 fed00000 fedfffff 1093 x x x 9 4 0 ffff 90 9 5 0 ffff 90 9 6 0 ffff 90 9 7 0 ffff 90 9 Signed-off-by: Felix Held Change-Id: If602922648deca0caef23a9999c82acdd128b182 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77984 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber Reviewed-by: Matt DeVillier --- .../amd/common/block/data_fabric/data_fabric_helper.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/soc/amd/common/block/data_fabric/data_fabric_helper.c b/src/soc/amd/common/block/data_fabric/data_fabric_helper.c index e884c1b340..037977aeb0 100644 --- a/src/soc/amd/common/block/data_fabric/data_fabric_helper.c +++ b/src/soc/amd/common/block/data_fabric/data_fabric_helper.c @@ -54,14 +54,7 @@ void data_fabric_print_mmio_conf(void) "idx base limit control R W NP F-ID\n"); for (unsigned int i = 0; i < DF_MMIO_REG_SET_COUNT; i++) { control.raw = data_fabric_broadcast_read32(DF_MMIO_CONTROL(i)); - /* Base and limit address registers don't contain the lower address bits, but - are shifted by D18F0_MMIO_SHIFT bits */ - base = (uint64_t)data_fabric_broadcast_read32(DF_MMIO_BASE(i)) - << DF_MMIO_SHIFT; - limit = (uint64_t)data_fabric_broadcast_read32(DF_MMIO_LIMIT(i)) - << DF_MMIO_SHIFT; - /* Lower D18F0_MMIO_SHIFT address limit bits are all 1 */ - limit += (1 << DF_MMIO_SHIFT) - 1; + data_fabric_get_mmio_base_size(i, &base, &limit); printk(BIOS_SPEW, " %2u %16llx %16llx %8x %s %s %s %4x\n", i, base, limit, control.raw, control.re ? "x" : " ",