> I've recalled that FreeBSD used RTC to determine base memory size in
> old days.  I've tested this method on my machines and confirmed it's
> working well.

If this is done, then FreeBSD won't work on many laptops and other
desktops, which report 640K for memory, but the BIOS actually steals
some of the memory for things like APM, so when the VM86 call is done
the reported memory size is actually like (like 637K or something).

This change may break FreeBSD on these 'newer' hardware as well.



Nate

> I'll commit this coming weekend if no objections.
> 
> Thanks
> 
> Index: machdep.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v
> retrieving revision 1.541
> diff -u -r1.541 machdep.c
> --- machdep.c 5 Oct 2002 14:36:14 -0000       1.541
> +++ machdep.c 21 Oct 2002 15:27:02 -0000
> @@ -1284,8 +1284,14 @@
>       /*
>        * Perform "base memory" related probes & setup
>        */
> -     vm86_intcall(0x12, &vmf);
> -     basemem = vmf.vmf_ax;
> +     if ((basemem = rtcin(RTC_BASELO) + (rtcin(RTC_BASEHI)<<8)) > 640)
> +             basemem = 640;
> +
> +     if (basemem == 0) {
> +             vm86_intcall(0x12, &vmf);
> +             basemem = vmf.vmf_ax;
> +     }
> +
>       if (basemem > 640) {
>               printf("Preposterous BIOS basemem of %uK, truncating to 640K\n",
>                       basemem);
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to