From 48e0419748d350d5519d688dd5480e19d99bc5c4 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 14 Feb 2009 18:51:04 +0000 Subject: Limit the amount of physical memory to 2GB. Using more causes memory corruption on PA-RISC 2.0 systems (and there are very few PA-RISC 1.1 systems that support more than 2GB). ok miod@ --- sys/arch/hppa/hppa/machdep.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c index 51c1d3c09ac..58188d3c89d 100644 --- a/sys/arch/hppa/hppa/machdep.c +++ b/sys/arch/hppa/hppa/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.170 2009/02/04 17:22:23 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.171 2009/02/14 18:51:03 kettenis Exp $ */ /* * Copyright (c) 1999-2003 Michael Shalayeff @@ -364,8 +364,18 @@ hppa_init(start) fdcacheall(); avail_end = trunc_page(PAGE0->imm_max_mem); + /* + * XXX For some reason, using any physical memory above the + * 2GB marker causes memory corruption on PA-RISC 2.0 + * machines. Cap physical memory at 2GB for now. + */ +#if 0 if (avail_end > SYSCALLGATE) avail_end = SYSCALLGATE; +#else + if (avail_end > 0x80000000) + avail_end = 0x80000000; +#endif physmem = atop(avail_end); resvmem = atop(((vaddr_t)&kernel_text)); -- cgit v1.2.3