diff --git a/sys/dev/pci/siop_pci_common.c b/sys/dev/pci/siop_pci_common.c index e3581daa693b..99c02c79801c 100644 --- a/sys/dev/pci/siop_pci_common.c +++ b/sys/dev/pci/siop_pci_common.c @@ -1,4 +1,4 @@ -/* $NetBSD: siop_pci_common.c,v 1.3 2000/10/23 14:57:23 bouyer Exp $ */ +/* $NetBSD: siop_pci_common.c,v 1.4 2000/11/29 02:00:38 matt Exp $ */ /* * Copyright (c) 2000 Manuel Bouyer. @@ -242,8 +242,16 @@ siop_pci_attach_common(sc, pa) } if (sc->siop.features & SF_CHIP_RAM) { - if (pci_mapreg_map(pa, 0x18, - PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0, + int bar; + switch (memtype) { + case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT: + bar = 0x18; + break; + case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_64BIT: + bar = 0x1c; + break; + } + if (pci_mapreg_map(pa, bar, memtype, 0, &sc->siop.sc_ramt, &sc->siop.sc_ramh, &sc->siop.sc_scriptaddr, NULL) == 0) { printf("%s: using on-board RAM\n",