summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrahnds <rahnds@openbsd.org>2000-03-23 04:04:21 +0000
committerrahnds <rahnds@openbsd.org>2000-03-23 04:04:21 +0000
commitfa7ae6e098d3d17d48d838c8a480ebd6ec4fecb8 (patch)
treea039ae408c0b0be1f3aff7ab90c42582262e3021
parentcomment out bounds check, ncr card on G4 is triggering it, replaced (diff)
downloadwireguard-openbsd-fa7ae6e098d3d17d48d838c8a480ebd6ec4fecb8.tar.xz
wireguard-openbsd-fa7ae6e098d3d17d48d838c8a480ebd6ec4fecb8.zip
Hack to make physmem something almost reasonable, if for some reason
the G4 decides to claim that no real memory exists in the machine, even though memory is available. Real memory size is aliased to available. Take this out if a real cause is determined.
-rw-r--r--sys/arch/powerpc/powerpc/ofw_machdep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/powerpc/powerpc/ofw_machdep.c b/sys/arch/powerpc/powerpc/ofw_machdep.c
index a5011a20e46..572ec2497fb 100644
--- a/sys/arch/powerpc/powerpc/ofw_machdep.c
+++ b/sys/arch/powerpc/powerpc/ofw_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofw_machdep.c,v 1.13 2000/03/20 07:05:53 rahnds Exp $ */
+/* $OpenBSD: ofw_machdep.c,v 1.14 2000/03/23 04:04:21 rahnds Exp $ */
/* $NetBSD: ofw_machdep.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */
/*
@@ -92,6 +92,10 @@ ofw_mem_regions(memp, availp)
<= 0)
panic("no memory?");
*memp = OFmem;
+ /* HACK */
+ if (OFmem[0].size == 0) {
+ *memp = OFavail;
+ }
*availp = OFavail;
}