summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2011-04-21 18:09:01 +0000
committermiod <miod@openbsd.org>2011-04-21 18:09:01 +0000
commit6f6e7755fd3c6c266b2d5959546a72b75019d4a7 (patch)
tree694781571651de1b6434ab08ad235a8d693574d3
parentno need to escape `|'; (diff)
downloadwireguard-openbsd-6f6e7755fd3c6c266b2d5959546a72b75019d4a7.tar.xz
wireguard-openbsd-6f6e7755fd3c6c266b2d5959546a72b75019d4a7.zip
Use 64 bit integer types to compute IP35 memory ranges, to give machines
with memory beyond 4GB physical a chance to run. For some reason IP27 was already correct.
-rw-r--r--sys/arch/sgi/sgi/sginode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/sgi/sgi/sginode.c b/sys/arch/sgi/sgi/sginode.c
index 76cf0304e7b..e3216ef7cc3 100644
--- a/sys/arch/sgi/sgi/sginode.c
+++ b/sys/arch/sgi/sgi/sginode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sginode.c,v 1.23 2011/04/17 17:44:24 miod Exp $ */
+/* $OpenBSD: sginode.c,v 1.24 2011/04/21 18:09:01 miod Exp $ */
/*
* Copyright (c) 2008, 2009, 2011 Miodrag Vallat.
*
@@ -518,7 +518,7 @@ kl_add_memory_ip27(int16_t nasid, int16_t *sizes, unsigned int cnt)
basepa = (paddr_t)nasid << kl_n_shift;
- /* note we know kl_n_shift >> 31, so 2GB windows can not span nodes */
+ /* note we know kl_n_shift > 31, so 2GB windows can not span nodes */
twogseg = basepa >> 31;
twogcnt = 0;
@@ -585,13 +585,13 @@ void
kl_add_memory_ip35(int16_t nasid, int16_t *sizes, unsigned int cnt)
{
paddr_t basepa;
- uint32_t fp, lp, np;
+ uint64_t fp, lp, np;
paddr_t twogseg;
psize_t twogcnt;
basepa = (paddr_t)nasid << kl_n_shift;
- /* note we know kl_n_shift >> 31, so 2GB windows can not span nodes */
+ /* note we know kl_n_shift > 31, so 2GB windows can not span nodes */
twogseg = basepa >> 31;
twogcnt = 0;