diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2010-02-17 17:17:36 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2010-02-17 17:17:36 +0000 |
commit | e036f265ad06a25efd4f3232e6f18208fcab5713 (patch) | |
tree | afa9c40ac001ee8aa1e6e532538b572de6bcb08f | |
parent | 568a5a9b12c1674473c78bd4fe7b6b33f1533db6 (diff) |
- prevent "anti-memory" from showing up, this makes systems with 2GB of
RAM work.
help and ok miod@
-rw-r--r-- | sys/arch/loongson/loongson/loongson2_machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/loongson/loongson/machdep.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/loongson/loongson/loongson2_machdep.c b/sys/arch/loongson/loongson/loongson2_machdep.c index 0d902af670c..c248671a22f 100644 --- a/sys/arch/loongson/loongson/loongson2_machdep.c +++ b/sys/arch/loongson/loongson/loongson2_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: loongson2_machdep.c,v 1.5 2010/02/05 20:53:28 miod Exp $ */ +/* $OpenBSD: loongson2_machdep.c,v 1.6 2010/02/17 17:17:35 jasper Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. @@ -120,7 +120,7 @@ loongson2f_setup(u_long memlo, u_long memhi) memlo = atop(memlo << 20); memhi = atop(memhi << 20); - physmem = atop(physmem << 20); + physmem = atop((vsize_t)physmem << 20); /* * PMON configures the system with only the low 256MB of memory diff --git a/sys/arch/loongson/loongson/machdep.c b/sys/arch/loongson/loongson/machdep.c index b97dba05c9c..dc62898e656 100644 --- a/sys/arch/loongson/loongson/machdep.c +++ b/sys/arch/loongson/loongson/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.15 2010/02/14 22:39:33 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.16 2010/02/17 17:17:35 jasper Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. @@ -679,8 +679,8 @@ cpu_startup() * Good {morning,afternoon,evening,night}. */ printf(version); - printf("real mem = %u (%uMB)\n", ptoa(physmem), - ptoa(physmem)/1024/1024); + printf("real mem = %u (%uMB)\n", ptoa((psize_t)physmem), + ptoa((psize_t)physmem)/1024/1024); /* * Allocate a submap for exec arguments. This map effectively |