diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2023-09-15 21:33:13 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-09-18 15:40:29 +0000 |
commit | 58c2efc8e2cd5db065d0f4ab8678555e656e4a16 (patch) | |
tree | 0fa31220ae419383f8b370dd292f1993b2ca878b /src/soc/amd | |
parent | a3ff9e7cdb80bf0ed3f3baf17177250a75cd8543 (diff) |
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 <felix-coreboot@felixheld.de>
Change-Id: If602922648deca0caef23a9999c82acdd128b182
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77984
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Diffstat (limited to 'src/soc/amd')
-rw-r--r-- | src/soc/amd/common/block/data_fabric/data_fabric_helper.c | 9 |
1 files changed, 1 insertions, 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" : " ", |