> > - 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;
> > + }
> > +
> > > Hmmm, actually no. I know that some machines get panic with fatal trap
> > > 12 if we do 0x12 call. The worst case is getting panic, not losing
> > > 640K memory.
> >
> > Where does the panic occur? I checked that there is no problem here if
> > the result of INT 0x12 is ignored and basem
> 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
Hi,
> > > The patch makes no difference for booting directly from boot2 ... except
> > > memsize() in boot2 also fails to check for errors, so it returns garbage
> > > values.
> >
> > Yes I know that :-)
> > But booting kernel directly from boot2 is not working at all for
> > several years, so my
Hi,
> > Index: sys/i386/i386/machdep.c
> > ===
> > RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v
> > retrieving revision 1.532
> > diff -u -r1.532 machdep.c
> > --- sys/i386/i386/machdep.c 7 Sep 2002 19:12:42 - 1.532
>