diff options
| author | Justin Hibbits <jhibbits@FreeBSD.org> | 2019-11-10 04:24:36 +0000 |
|---|---|---|
| committer | Justin Hibbits <jhibbits@FreeBSD.org> | 2019-11-10 04:24:36 +0000 |
| commit | 0b4753405bfff1ee43266edc34bb959bb8772fc7 (patch) | |
| tree | 15dced35e72db51b5e0354b8ce62fff769ff20bf | |
| parent | 028d96899b0d23573a882da496970366e6ef50b1 (diff) | |
Notes
| -rw-r--r-- | sys/powerpc/powernv/opal.h | 5 | ||||
| -rw-r--r-- | sys/powerpc/powernv/opal_pci.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/sys/powerpc/powernv/opal.h b/sys/powerpc/powernv/opal.h index b1137ca1ce2e..8028805cef3c 100644 --- a/sys/powerpc/powernv/opal.h +++ b/sys/powerpc/powernv/opal.h @@ -129,6 +129,11 @@ int opal_call(uint64_t token, ...); #define OPAL_IGNORE_RID_FUNC_NUMBER 0 #define OPAL_COMPARE_RID_FUNC_NUMBER 1 +/* For OPAL_PCI_TCE_KILL */ +#define OPAL_PCI_TCE_KILL_PAGE 0 +#define OPAL_PCI_TCE_KILL_PE 1 +#define OPAL_PCI_TCE_KILL_ALL 2 + #define OPAL_SUCCESS 0 #define OPAL_PARAMETER -1 #define OPAL_BUSY -2 diff --git a/sys/powerpc/powernv/opal_pci.c b/sys/powerpc/powernv/opal_pci.c index 8131a4871579..39f52d1bff43 100644 --- a/sys/powerpc/powernv/opal_pci.c +++ b/sys/powerpc/powernv/opal_pci.c @@ -409,10 +409,12 @@ opalpci_attach(device_t dev) /* * Invalidate all previous TCE entries. - * - * TODO: add support for other PHBs than PHB3 */ - pci_phb3_tce_invalidate_entire(sc); + if (ofw_bus_is_compatible(dev, "power8-pciex")) + pci_phb3_tce_invalidate_entire(sc); + else + opal_call(OPAL_PCI_TCE_KILL, sc->phb_id, OPAL_PCI_TCE_KILL_ALL, + OPAL_PCI_DEFAULT_PE, 0, 0, 0); /* * Get MSI properties |
