summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/pci_pci.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2009-05-20 17:29:21 +0000
committerimp <imp@FreeBSD.org>2009-05-20 17:29:21 +0000
commit3ca3ea71908ddf43687ac7777906573c31fea480 (patch)
tree57c7e52b00a944272cad04dc847cef00b88197de /sys/dev/pci/pci_pci.c
parent033485e00c6bc9bfdac65bf91b70df092b730e27 (diff)
downloadFreeBSD-src-3ca3ea71908ddf43687ac7777906573c31fea480.zip
FreeBSD-src-3ca3ea71908ddf43687ac7777906573c31fea480.tar.gz
We no longer need to use d_thread_t, migrate to struct thread *.
Diffstat (limited to 'sys/dev/pci/pci_pci.c')
-rw-r--r--sys/dev/pci/pci_pci.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
index 15cad92..8bb2eff 100644
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -52,6 +52,13 @@ __FBSDID("$FreeBSD$");
#include "pcib_if.h"
+// #define KLUDGE_O_MATIC
+#ifdef KLUDGE_O_MATIC
+int hack_unit = 1;
+u_long mem_base = 0xc0400000ul;
+u_long mem_limit = 0x00100000ul;
+#endif
+
static int pcib_probe(device_t dev);
static device_method_t pcib_methods[] = {
@@ -324,6 +331,14 @@ pcib_attach(device_t dev)
struct pcib_softc *sc;
device_t child;
+#ifdef KLUDGE_O_MATIC
+ if (device_get_unit(dev) == hack_unit) {
+ pci_write_config(dev, PCIR_COMMAND,
+ PCIM_CMD_MEMEN | pci_read_config(dev, PCIR_COMMAND, 1), 1);
+ pci_write_config(dev, PCIR_MEMBASE_1, mem_base >> 16, 2);
+ pci_write_config(dev, PCIR_MEMLIMIT_1, mem_limit >> 16, 2);
+ }
+#endif
pcib_attach_common(dev);
sc = device_get_softc(dev);
if (sc->secbus != 0) {
OpenPOWER on IntegriCloud