From owner-freebsd-hackers Wed Nov 5 10:59:46 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA29014 for hackers-outgoing; Wed, 5 Nov 1997 10:59:46 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from usr02.primenet.com (tlambert@usr02.primenet.com [206.165.6.202]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA29009 for ; Wed, 5 Nov 1997 10:59:43 -0800 (PST) (envelope-from tlambert@usr02.primenet.com) Received: (from tlambert@localhost) by usr02.primenet.com (8.8.5/8.8.5) id LAA14121; Wed, 5 Nov 1997 11:58:50 -0700 (MST) From: Terry Lambert Message-Id: <199711051858.LAA14121@usr02.primenet.com> Subject: Re: >64MB To: tony@dell.com (Tony Overfield) Date: Wed, 5 Nov 1997 18:58:49 +0000 (GMT) Cc: tlambert@primenet.com, jamil@trojanhorse.ml.org, hackers@FreeBSD.ORG In-Reply-To: <3.0.3.32.19971105020626.006da974@bugs.us.dell.com> from "Tony Overfield" at Nov 5, 97 02:06:26 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > The bootloader already makes the "64 MB limited" BIOS call and sends > this value to the kernel, but for some strange reason, the kernel > tosses that value away in favor of the sometimes bogus CMOS value. > Using this BIOS call's result instead of tossing it would resolve > my complaint about the CMOS groping. The problem with this approach is "keyhole memory allocations" for soft IDE drive tables and APM BIOS data that can't be overwritten. This is a common practice among some PC manufacturers (who will remain nameless). At least the "base memory" in the CMOS must be examined to determine memory which can not be given over to the kernel for it to scribble on. > >The problem is that the BIOS call made in the boot code should not > >be in the boot code at all, > > I think you don't understand. It must be there. You cannot load > the kernel into memory without knowing whether you have any memory. The kernel loads at 1M, regardless of whether there is memory there or not. There is no graceful failure mode possible for a failure to load yourself. Given this, a kernel with VM86() capabilities loaded into however much memory it takes, starting at 1M, can make VM86() calls to determine how much memory is there. You yourself note that the CMOS examination for memory sizing is bogusly used at present ...and that it occurs *after* the kernel is loaded. > At *least* the "64 MB limited" BIOS call must be in the bootloader. At present, and only because the call historically can't be made by the kernel in protected mode. That's close to being fixed. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.