summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2005-04-09 00:41:28 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2005-04-09 00:41:28 +0000
commit3fbc599c83de718d052db401fe92a1e199db0397 (patch)
treec81bb10db476bdf5ec37d5b8ad0f88f9532520a9 /sys/arch/i386
parent07caa76b6b5d26153620f57df1967bf7a537831d (diff)
fix rbus on big memory i386 machines (used by cbb(4) pcmcia).
closes an slightly old PR kernel/3855. ok mickey@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/rbus_machdep.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/i386/i386/rbus_machdep.c b/sys/arch/i386/i386/rbus_machdep.c
index e4c5c08283e..f68988e06f6 100644
--- a/sys/arch/i386/i386/rbus_machdep.c
+++ b/sys/arch/i386/i386/rbus_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rbus_machdep.c,v 1.16 2004/05/04 17:06:33 grange Exp $ */
+/* $OpenBSD: rbus_machdep.c,v 1.17 2005/04/09 00:41:27 reyk Exp $ */
/* $NetBSD: rbus_machdep.c,v 1.2 1999/10/15 06:43:06 haya Exp $ */
/*
@@ -67,12 +67,12 @@ rbus_pccbb_parent_mem(self, pa)
struct device *self;
struct pci_attach_args *pa;
{
- bus_addr_t start;
+ bus_addr_t start, min_start;
bus_size_t size;
struct extent *ex;
size = RBUS_MEM_SIZE;
- start = RBUS_MEM_START;
+ start = min_start = max(RBUS_MEM_START, ctob(physmem));
#if NPCIBIOS > 0
if ((ex = pciaddr_search(PCIADDR_SEARCH_MEM, &start, size)) == NULL)
#endif
@@ -93,8 +93,8 @@ rbus_pccbb_parent_mem(self, pa)
* already reserved.
*/
- if (start < RBUS_MEM_START) {
- start = RBUS_MEM_START; /* 1GB */
+ if (start < min_start) {
+ start = min_start;
}
size = ex->ex_end - start;