diff options
author | 2014-03-21 22:00:59 +0000 | |
---|---|---|
committer | 2014-03-21 22:00:59 +0000 | |
commit | 55c9ee9e90304c3ecdd92f25d72cd71e2dd5e19f (patch) | |
tree | dc63c26ac3c9102c5b30b52b49a4ed0360295504 | |
parent | Fix missing brackets: longitude/latitude status set to critical every time (diff) | |
download | wireguard-openbsd-55c9ee9e90304c3ecdd92f25d72cd71e2dd5e19f.tar.xz wireguard-openbsd-55c9ee9e90304c3ecdd92f25d72cd71e2dd5e19f.zip |
Keep the `clamp memory to what pmap can address' logic unconditional, and
use a <machine/pte.h> define to figure out what the pmap limit is.
-rw-r--r-- | sys/arch/sgi/sgi/autoconf.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/arch/sgi/sgi/autoconf.c b/sys/arch/sgi/sgi/autoconf.c index 6abc740d0c0..9ce02a6b456 100644 --- a/sys/arch/sgi/sgi/autoconf.c +++ b/sys/arch/sgi/sgi/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.37 2014/02/08 09:35:07 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.38 2014/03/21 22:00:59 miod Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. * @@ -195,16 +195,14 @@ memrange_register(uint64_t startpfn, uint64_t endpfn, uint64_t bmask) } #endif -#ifndef MIPS_PTE64 /* - * Prevent use of memory above 16GB physical, until pmap can support - * this. + * Prevent use of memory beyond what pmap can support. + * PG_FRAME is the highest supported page number. */ - if (startpfn >= atop(16UL * 1024 * 1024 * 1024)) + if (startpfn > atop(pfn_to_pad(PG_FRAME))) return 0; - if (endpfn >= atop(16UL * 1024 * 1024 * 1024)) - endpfn = atop(16UL * 1024 * 1024 * 1024); -#endif + if (endpfn > atop(pfn_to_pad(PG_FRAME))) + endpfn = 1 + atop(pfn_to_pad(PG_FRAME)); for (i = 0, cur = mem_layout; i < MAXMEMSEGS; i++, cur++) { if (cur->mem_last_page == 0) { |