diff options
-rw-r--r-- | sys/arch/amd64/pci/iommu.c | 6 | ||||
-rw-r--r-- | sys/arch/amd64/pci/pci_machdep.c | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/sys/arch/amd64/pci/iommu.c b/sys/arch/amd64/pci/iommu.c index d4f659a5bdc..a543963bdd5 100644 --- a/sys/arch/amd64/pci/iommu.c +++ b/sys/arch/amd64/pci/iommu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iommu.c,v 1.4 2005/05/27 06:40:45 jason Exp $ */ +/* $OpenBSD: iommu.c,v 1.5 2005/05/27 07:46:38 jason Exp $ */ /* * Copyright (c) 2005 Jason L. Wright (jason@thought.net) @@ -110,6 +110,7 @@ extern paddr_t avail_end; extern struct extent *iomem_ex; int amdgarts; +int amdgart_enable = 0; struct amdgart_softc { pci_chipset_tag_t g_pc; @@ -273,6 +274,9 @@ amdgart_probe(struct pcibus_attach_args *pba) struct extent *ex = NULL; u_int32_t *pte; + if (amdgart_enable == 0) + return; + TAILQ_INIT(&plist); for (count = 0, dev = 24; dev < 32; dev++) { diff --git a/sys/arch/amd64/pci/pci_machdep.c b/sys/arch/amd64/pci/pci_machdep.c index 6d36f66aea4..727d4715295 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.4 2005/05/14 00:13:15 brad Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.5 2005/05/27 07:46:38 jason Exp $ */ /* $NetBSD: pci_machdep.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */ /*- @@ -179,14 +179,17 @@ struct x86_bus_dma_tag pci_bus_dma_tag = { _bus_dmamem_mmap, }; +extern void amdgart_probe(struct pcibus_attach_args *); + void pci_attach_hook(parent, self, pba) struct device *parent, *self; struct pcibus_attach_args *pba; { - - if (pba->pba_bus == 0) + if (pba->pba_bus == 0) { printf(": configuration mode %d", pci_mode); + amdgart_probe(pba); + } } int |