summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block/include/amdblocks
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2024-07-12 14:06:49 +0200
committerFelix Held <felix-coreboot@felixheld.de>2024-07-25 22:55:15 +0000
commite9e71132a308acbe5c6d5371fbe5f7d6ffe30cf4 (patch)
treeeb872c338ef1a006600815e874c2d8b01b062e7c /src/soc/amd/common/block/include/amdblocks
parent9af1d3f85727342a0105eecdc2bbee4fca71b0b2 (diff)
soc/amd/*/root_complex: introduce and use domain_iohc_info struct
Instead of implementing the functions get_iohc_misc_smn_base and get_iohc_fabric_id in the SoC code, move those functions to the common AMD code, and implement get_iohc_info in the SoC code that returns a pointer to and the size of a SoC-specific array of domain_iohc_info structs that contains the info needed by the common code instead. This allows to iterate over the domain_iohc_info structs which will be used in a later patch to find the PSP MMIO base address in both ramstage and smm. TEST=Mandolin still boots and all non-PCI MIO resources are still reported to the resource allocator Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ifce3d2b540d14ba3cba36f7cbf248fb7c63483fe Reviewed-on: https://review.coreboot.org/c/coreboot/+/83443 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Diffstat (limited to 'src/soc/amd/common/block/include/amdblocks')
-rw-r--r--src/soc/amd/common/block/include/amdblocks/root_complex.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/include/amdblocks/root_complex.h b/src/soc/amd/common/block/include/amdblocks/root_complex.h
index 9ef5d05925..bfabf973a7 100644
--- a/src/soc/amd/common/block/include/amdblocks/root_complex.h
+++ b/src/soc/amd/common/block/include/amdblocks/root_complex.h
@@ -15,6 +15,11 @@
#define NON_PCI_RES_IDX_AUTO 0
+struct domain_iohc_info {
+ uint16_t fabric_id;
+ uint32_t misc_smn_base;
+};
+
struct non_pci_mmio_reg {
uint32_t iohc_misc_offset;
uint64_t mask;
@@ -27,6 +32,7 @@ void read_non_pci_resources(struct device *domain, unsigned long *idx);
void read_soc_memmap_resources(struct device *domain, unsigned long *idx);
uint32_t get_iohc_misc_smn_base(struct device *domain);
+const struct domain_iohc_info *get_iohc_info(size_t *count);
const struct non_pci_mmio_reg *get_iohc_non_pci_mmio_regs(size_t *count);
signed int get_iohc_fabric_id(struct device *domain);