From owner-freebsd-current Fri Jun 18 10:24: 5 1999 Delivered-To: freebsd-current@freebsd.org Received: from par28.ma.ikos.com (par28.ma.ikos.com [137.103.105.228]) by hub.freebsd.org (Postfix) with ESMTP id 71F1814D67 for ; Fri, 18 Jun 1999 10:23:57 -0700 (PDT) (envelope-from tich@par28.ma.ikos.com) Received: (from tich@localhost) by par28.ma.ikos.com (8.8.7/8.8.7) id NAA15730; Fri, 18 Jun 1999 13:24:14 -0400 Date: Fri, 18 Jun 1999 13:24:14 -0400 From: Richard Cownie Message-Id: <199906181724.NAA15730@par28.ma.ikos.com> To: freebsd-current@freebsd.org, tich@par28.ma.ikos.com Subject: fix for 4GB dram Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I seem to have a fix for the 4GB dram problem. Here's the SMAP info returned from the BIOS on an SC450NX with 4GB DRAM: type=01 base= 00000000 00000000 len= 00000000 0009e400 type=02 base= 00000000 0009e400 len= 00000000 00001c00 type=02 base= 00000000 000f0400 len= 00000000 0000fc00 type=01 base= 00000000 00100000 len= 00000000 f9dfac00 type=03 base= 00000000 f9efac00 len= 00000000 00005000 type=04 base= 00000000 f9effc00 len= 00000000 00000400 type=02 base= 00000000 fe300000 len= 00000000 01d00000 type=01 base= 00000001 00000000 len= 00000000 06100000 Note that the chipset remaps some of the DRAM up above the 4GB boundary - this entry in the table causes confusion, because the base address gets truncated to 32bits (though the comparison to detect non-monotonic entries is still 64bits). I added this code in /usr/src/sys/i386/i386/machdep.c:getmemsize() if (smap->type != 0x01) goto next_run; if (smap->length == 0) goto next_run; + if (*(u_int32_t *)((char *)&smap->base + 4) != 0) { + if (boothowto & RB_VERBOSE) { + printf("Memory above 4GB ignored\n"); + } + goto next_run; + } for (i = 0; i <= physmap_idx; i += 2) { if (smap->base < physmap[i + 1]) { if (boothowto & RB_VERBOSE) printf( "Overlapping or non-monotonic memory region, ignoring second region\n"); goto next_run; } } Now it seems to work (with options MAXMEM="((4096-64)*1024)" - haven't tried it with speculative memory probing yet). Thanks to Jonathan Lemon for steering me in the right direction. Richard Cownie (tich@ma.ikos.com) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message