From owner-freebsd-hackers Sat Nov 16 22:28:17 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id WAA29433 for hackers-outgoing; Sat, 16 Nov 1996 22:28:17 -0800 (PST) Received: from uruk.org (root@ns.uruk.org [198.145.95.253]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id WAA29426 for ; Sat, 16 Nov 1996 22:28:14 -0800 (PST) Received: from uruk.org [127.0.0.1] (erich) by uruk.org with esmtp (Exim 0.53 #1) id E0vP0nA-0004qS-00; Sat, 16 Nov 1996 22:33:20 -0800 To: dg@root.com cc: hackers@freebsd.org Subject: Re: Memory probe(s) in FreeBSD In-reply-to: Your message of "Sat, 16 Nov 1996 17:44:50 PST." <199611170144.RAA17595@root.com> Date: Sat, 16 Nov 1996 22:33:19 -0800 From: Erich Boleyn Message-Id: Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk David Greenman writes: > >I would argue that the BIOS values should always be used, and the RTC > >values simply ignored unless something specific (like the SMP probe) needs > >them. > > I seem to recall that there was a problem with doing this on some systems, > but since my memory is so vague, I'm inclined to agree with you. :-) It's > probably that old FreeBSD bootblocks didn't pass in the BIOS information (via > the bootinfo struct)...but this was so long ago that I don't think it matters > anymore. Perhaps it should use the RTC numbers if the passed-in BIOS numbers > are zero? There is a "valid" flag set in the info passed by the bootloader. You'll see it if you look in "i386/i386/machdep.c". What I'd suggest is to use the values from the bootloader if they are "valid", or otherwise use the RTC values. Just take out the current parts where it complains if the RTC values are different from the BIOS values. It is confusing and on many modern machines they are usually different anyway, so you'll see it all the time for no good reason. As to there being a problem a while ago... the problem was that the FreeBSD bootblocks read the return value from the EAX register for the upper memory BIOS call, where it is only valid for the AX register. Some machines return garbage in the high bits of EAX. The proper thing to do is to zero the top 16 bits of EAX after the INT 0x15 AH=0x88 call in the bootloader, not in the kernel proper (again, because some bootloaders might pass valid information from other BIOS interfaces). -- Erich Stefan Boleyn \_ E-mail (preferred): Mad Genius wanna-be, CyberMuffin \__ (finger me for other stats) Web: http://www.uruk.org/~erich/ Motto: "I'll live forever or die trying"