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>
This commit is contained in:
Jonathan Zhang 2022-12-19 15:49:33 -08:00 committed by Felix Held
parent b911c4896d
commit da538cb38f
1 changed files with 4 additions and 2 deletions

View File

@ -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()); res = ram_from_to(dev, index++, top_of_ram, (uintptr_t)cbmem_top());
LOG_RESOURCE("cbmem_ram", dev, res); LOG_RESOURCE("cbmem_ram", dev, res);
/* Reserve and set up DPR */ /* Reserve DPR region */
configure_dpr(dev);
union dpr_register dpr = { .raw = pci_read_config32(dev, VTD_LTDPR) }; union dpr_register dpr = { .raw = pci_read_config32(dev, VTD_LTDPR) };
if (dpr.size) { if (dpr.size) {
/* /*
@ -262,6 +261,9 @@ static void mmapvtd_read_resources(struct device *dev)
/* Read standard PCI resources. */ /* Read standard PCI resources. */
pci_dev_read_resources(dev); pci_dev_read_resources(dev);
/* set up DPR */
configure_dpr(dev);
/* Calculate and add DRAM resources. */ /* Calculate and add DRAM resources. */
mc_add_dram_resources(dev, &index); mc_add_dram_resources(dev, &index);
} }