Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47297 )
Change subject: soc/intel/xeon_sp: Move out getting the pcie_seg ......................................................................
soc/intel/xeon_sp: Move out getting the pcie_seg
The purpose will be to avoid passing the HOB pointer as function argument.
Change-Id: Id1c30558e0305e9189757a04604bf15345e1c529 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/soc/intel/xeon_sp/nb_acpi.c 1 file changed, 9 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/97/47297/1
diff --git a/src/soc/intel/xeon_sp/nb_acpi.c b/src/soc/intel/xeon_sp/nb_acpi.c index de1edc8..6cb6828 100644 --- a/src/soc/intel/xeon_sp/nb_acpi.c +++ b/src/soc/intel/xeon_sp/nb_acpi.c @@ -180,6 +180,13 @@ return (atsr_size + pci_br_size); }
+static uint32_t get_pcie_seg(int socket) +{ + const IIO_UDS *hob = get_iio_uds(); + + return hob->PlatformData.CpuQpiInfo[socket].PcieSegment; +} + static unsigned long acpi_create_drhd(unsigned long current, int socket, int stack, const IIO_UDS *hob) { @@ -196,7 +203,7 @@ unsigned long tmp = current;
uint32_t bus = hob->PlatformData.IIO_resource[socket].StackRes[stack].BusBase; - uint32_t pcie_seg = hob->PlatformData.CpuQpiInfo[socket].PcieSegment; + uint32_t pcie_seg = get_pcie_seg(socket); uint32_t reg_base = hob->PlatformData.IIO_resource[socket].StackRes[stack].VtdBarAddress; printk(BIOS_SPEW, "%s socket: %d, stack: %d, bus: 0x%x, pcie_seg: 0x%x, reg_base: 0x%x\n", @@ -291,7 +298,7 @@ static unsigned long acpi_create_atsr(unsigned long current, const IIO_UDS *hob) { for (int socket = 0; socket < hob->PlatformData.numofIIO; ++socket) { - uint32_t pcie_seg = hob->PlatformData.CpuQpiInfo[socket].PcieSegment; + uint32_t pcie_seg = get_pcie_seg(socket); unsigned long tmp = current; bool first = true; IIO_RESOURCE_INSTANCE iio_resource =
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47297 )
Change subject: soc/intel/xeon_sp: Move out getting the pcie_seg ......................................................................
Patch Set 1: Code-Review-2
Hmm looks like forgot removing this one from my patch series
Arthur Heymans has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/47297 )
Change subject: soc/intel/xeon_sp: Move out getting the pcie_seg ......................................................................
Abandoned