soc/intel/apollolake: use P2SB function to generate DMAR IOAPIC
Change-Id: If088d5bf701310e54b14965145229627f3a50417 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47535 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
This commit is contained in:
parent
a1f65bed10
commit
054026cdb8
|
@ -185,22 +185,14 @@ static unsigned long soc_fill_dmar(unsigned long current)
|
||||||
/* DEFVTBAR has to be set and enabled. */
|
/* DEFVTBAR has to be set and enabled. */
|
||||||
if (defvtbar && defvten) {
|
if (defvtbar && defvten) {
|
||||||
tmp = current;
|
tmp = current;
|
||||||
/*
|
union p2sb_bdf ibdf = p2sb_get_ioapic_bdf();
|
||||||
* P2SB may already be hidden. There's no clear rule, when.
|
|
||||||
* It is needed to get bus, device and function for IOAPIC and
|
|
||||||
* HPET device which is stored in P2SB device. So unhide it to
|
|
||||||
* get the info and hide it again when done.
|
|
||||||
*/
|
|
||||||
p2sb_unhide();
|
|
||||||
struct device *p2sb_dev = pcidev_path_on_root(PCH_DEVFN_P2SB);
|
|
||||||
uint16_t ibdf = pci_read_config16(p2sb_dev, PCH_P2SB_IBDF);
|
|
||||||
union p2sb_bdf hbdf = p2sb_get_hpet_bdf();
|
union p2sb_bdf hbdf = p2sb_get_hpet_bdf();
|
||||||
p2sb_hide();
|
p2sb_hide();
|
||||||
|
|
||||||
current += acpi_create_dmar_drhd(current,
|
current += acpi_create_dmar_drhd(current,
|
||||||
DRHD_INCLUDE_PCI_ALL, 0, defvtbar);
|
DRHD_INCLUDE_PCI_ALL, 0, defvtbar);
|
||||||
current += acpi_create_dmar_ds_ioapic(current,
|
current += acpi_create_dmar_ds_ioapic(current,
|
||||||
2, ibdf >> 8, PCI_SLOT(ibdf), PCI_FUNC(ibdf));
|
2, ibdf.bus, ibdf.dev, ibdf.fn);
|
||||||
current += acpi_create_dmar_ds_msi_hpet(current,
|
current += acpi_create_dmar_ds_msi_hpet(current,
|
||||||
0, hbdf.bus, hbdf.dev, hbdf.fn);
|
0, hbdf.bus, hbdf.dev, hbdf.fn);
|
||||||
acpi_dmar_drhd_fixup(tmp, current);
|
acpi_dmar_drhd_fixup(tmp, current);
|
||||||
|
|
Loading…
Reference in New Issue