diff options
author | Jordan Hargrave <jordan@cvs.openbsd.org> | 2020-10-27 02:39:08 +0000 |
---|---|---|
committer | Jordan Hargrave <jordan@cvs.openbsd.org> | 2020-10-27 02:39:08 +0000 |
commit | fd1fb1ba4ee5ae64430b9ab6eab67dcb2f35eed3 (patch) | |
tree | c9cc5c73db827893dd7d7ec4e6717e04df102553 /sys/arch/amd64/pci | |
parent | dd0622f85e4172134fbcbbaa3fac6fbe1d7b675c (diff) |
Adding IOMMU support for AMD Vi and Intel VTD (disabled)
This creates separate domains for each PCI device and can provide protection
against invalid memory access. Needed for Passthrough PCI from vmd.
ok deraadt@, kettenis@
: ----------------------------------------------------------------------
Diffstat (limited to 'sys/arch/amd64/pci')
-rw-r--r-- | sys/arch/amd64/pci/pci_machdep.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/arch/amd64/pci/pci_machdep.c b/sys/arch/amd64/pci/pci_machdep.c index cf4e835de33..5b8fd99c671 100644 --- a/sys/arch/amd64/pci/pci_machdep.c +++ b/sys/arch/amd64/pci/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.75 2020/06/17 06:14:52 dlg Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.76 2020/10/27 02:39:07 jordan Exp $ */ /* $NetBSD: pci_machdep.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */ /*- @@ -89,6 +89,13 @@ #include <machine/mpbiosvar.h> #endif +#include "acpi.h" + +#include "acpidmar.h" +#if NACPIDMAR > 0 +#include <dev/acpi/acpidmar.h> +#endif + /* * Memory Mapped Configuration space access. * @@ -797,7 +804,15 @@ pci_init_extents(void) } } -#include "acpi.h" +int +pci_probe_device_hook(pci_chipset_tag_t pc, struct pci_attach_args *pa) +{ +#if NACPIDMAR > 0 + acpidmar_pci_hook(pc, pa); +#endif + return 0; +} + #if NACPI > 0 void acpi_pci_match(struct device *, struct pci_attach_args *); pcireg_t acpi_pci_min_powerstate(pci_chipset_tag_t, pcitag_t); |