summaryrefslogtreecommitdiff
path: root/src/soc/amd/common
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-02-13 20:38:08 +0100
committerFelix Held <felix-coreboot@felixheld.de>2021-02-14 21:46:23 +0000
commit906f9be383c9c8258d4c0b6abc6dfebf16aa65e5 (patch)
tree2d5dfb1577a1a8429cc2271ef68f5aab0c59e38e /src/soc/amd/common
parent05af850b281f203de4bcf87e7864eaef78d2bff4 (diff)
soc/amd/common/block/data_fabric: add data_fabric_print_mmio_conf
Output on Picasso at the beginning of data_fabric_set_mmio_np: === Data Fabric MMIO configuration registers === Addresses are shifted to the right by 16 bits. idx control base limit 0 93 fc00 febf 1 93 1000000 ffffffff 2 93 d000 f7ff 3 90 0 0 4 93 fed0 fed0 5 90 0 0 6 90 0 0 7 90 0 0 Output on Picasso at the end of data_fabric_set_mmio_np: === Data Fabric MMIO configuration registers === Addresses are shifted to the right by 16 bits. idx control base limit 0 93 fc00 febf 1 93 1000000 ffffffff 2 93 d000 f7ff 3 1093 fed0 fedf 4 90 0 0 5 90 0 0 6 90 0 0 7 90 0 0 Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I74617dfc6099489f3c81d0e385b502f1bbecea78 Reviewed-on: https://review.coreboot.org/c/coreboot/+/50640 Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r--src/soc/amd/common/block/data_fabric/data_fabric_helper.c16
-rw-r--r--src/soc/amd/common/block/include/amdblocks/data_fabric.h1
2 files changed, 17 insertions, 0 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 d65bc8dac6..7bbdc7f921 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
@@ -2,6 +2,7 @@
#include <amdblocks/data_fabric.h>
#include <amdblocks/pci_devs.h>
+#include <console/console.h>
#include <device/pci_ops.h>
#include <soc/data_fabric.h>
#include <soc/pci_devs.h>
@@ -42,6 +43,21 @@ void data_fabric_write32(uint8_t function, uint16_t reg, uint8_t instance_id, ui
pci_write_config32(SOC_DF_F4_DEV, DF_FICAD_LO, data);
}
+void data_fabric_print_mmio_conf(void)
+{
+ printk(BIOS_SPEW,
+ "=== Data Fabric MMIO configuration registers ===\n"
+ "Addresses are shifted to the right by 16 bits.\n"
+ "idx control base limit\n");
+ for (unsigned int i = 0; i < NUM_NB_MMIO_REGS; i++) {
+ printk(BIOS_SPEW, " %2u %8x %8x %8x\n",
+ i,
+ data_fabric_broadcast_read32(0, NB_MMIO_CONTROL(i)),
+ data_fabric_broadcast_read32(0, NB_MMIO_BASE(i)),
+ data_fabric_broadcast_read32(0, NB_MMIO_LIMIT(i)));
+ }
+}
+
void data_fabric_disable_mmio_reg(unsigned int reg)
{
data_fabric_broadcast_write32(0, NB_MMIO_CONTROL(reg),
diff --git a/src/soc/amd/common/block/include/amdblocks/data_fabric.h b/src/soc/amd/common/block/include/amdblocks/data_fabric.h
index 2c0396aeb3..6df778d54c 100644
--- a/src/soc/amd/common/block/include/amdblocks/data_fabric.h
+++ b/src/soc/amd/common/block/include/amdblocks/data_fabric.h
@@ -42,6 +42,7 @@ void data_fabric_broadcast_write32(uint8_t function, uint16_t reg, uint32_t data
pci_write_config32(_SOC_DEV(DF_DEV, function), reg, data);
}
+void data_fabric_print_mmio_conf(void);
void data_fabric_disable_mmio_reg(unsigned int reg);
int data_fabric_find_unused_mmio_reg(void);