summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorJonathan Zhang <jonzhang@meta.com>2022-12-19 15:49:33 -0800
committerFelix Held <felix-coreboot@felixheld.de>2023-01-11 14:56:50 +0000
commitda538cb38f559052cce2879ad8b96a6014390af6 (patch)
tree168c128f36e111295defc11796cfbc77c1e5d16c /src/soc/intel
parentb911c4896d8df3b550c12248476dfcfdda496dff (diff)
soc/intel/xeon_sp: Setup DPR for all VT-d devices
The Data Protected Range (DPR) needs to be set for all DPR devices, not only the root device. Separate the setup from the memory resource map reservation. Change-Id: I7e49db23960e3938e8e158082be3c5ecf3cf95f3 Signed-off-by: Marc Jones <marcjones@sysproconsulting.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71143 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/xeon_sp/uncore.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/soc/intel/xeon_sp/uncore.c b/src/soc/intel/xeon_sp/uncore.c
index d4cf4bcc29..380b7e7b9c 100644
--- a/src/soc/intel/xeon_sp/uncore.c
+++ b/src/soc/intel/xeon_sp/uncore.c
@@ -196,8 +196,7 @@ static void mc_add_dram_resources(struct device *dev, int *res_count)
res = ram_from_to(dev, index++, top_of_ram, (uintptr_t)cbmem_top());
LOG_RESOURCE("cbmem_ram", dev, res);
- /* Reserve and set up DPR */
- configure_dpr(dev);
+ /* Reserve DPR region */
union dpr_register dpr = { .raw = pci_read_config32(dev, VTD_LTDPR) };
if (dpr.size) {
/*
@@ -262,6 +261,9 @@ static void mmapvtd_read_resources(struct device *dev)
/* Read standard PCI resources. */
pci_dev_read_resources(dev);
+ /* set up DPR */
+ configure_dpr(dev);
+
/* Calculate and add DRAM resources. */
mc_add_dram_resources(dev, &index);
}