The magical missing 6 megabytes of mysterious RAM

Laszlo Vagner george at
Tue May 6 12:48:36 PDT 2003

typical BIOS chips are about 1 megabyte and there is an option in the
bios to copy the flash bios contents into physical ram for more performance
on some systems (some can be disabled too).

My idea is that everything before the bios and including the kernel is
copied to
ram. naturally you couldnt run the kernel out of the flash memory or off
the hard disk. Additional kernel drivers would take more ram also.

----- Original Message -----
From: "agent dero" <dero at>
To: <freebsd-performance at>
Sent: Tuesday, May 06, 2003 3:24 PM
Subject: The magical missing 6 megabytes of mysterious RAM

> I don't beleive it can be BIOS sharing the system RAM with other devices,
> because my box that is in question has a 1MB Graphic card, and sits in the
> corner. Absolutely no work is done on the box physically. And I think the
> 1MB graphic card is enough to display BIOS and show the kernel and OS
> booting. (even if no monitor is attached)
> I am almost confident that is the kernel loaded into memory. I haven't
> seen much of a difference in real and availible memory between a custom
> kernel, and GENERIC. But, before the messages in /var/log/ are createde
> the FreeBSD boot manager must boot, and then it starts loading the kernel.
> So I am 99% sure it is the kernel being loaded into the active RAM.
> I will be able to test this more if I get a box with less RAM, that needs
> a good compiled kernel.  But I think the issue should be put to rest with,
> the 6 "missing megabytes" being the kernel. (which must always be in the
> physical RAM)
> -thanks!
> --schnip--
> > Yes and no.  You can't reuse any memory used for page tables,
> > so that's "pure overhead".  You also can't reuse any memory
> > that has not been marked as swappable.  If you allocate memory
> > in the kernel, it will be permanently subtracted from the "avail"
> > (it just doesn't give you another message to the effect of any
> > chanes in "avail", because it would be printf'ing to the console
> > all the time, if it did), since kernel memory is allocated as
> > being type-stable.
> >
> --schnip to other message--
> > I think you missed my point - I wasn't saying that FreeBSD is hiding
> > anything, nor was I talking about the "missing 6mb problem" directly.
> > You pretty much repeated my point though - "Since the BIOS is where
> > FreeBSD obtains the "real memory" number" - which is what I said, that
> > the BIOS takes the physical RAM, subtracts what it needs for devices
> > like video cards (that "borrow" from physical main memory), then reports
> > that result to any OS/Apps/etc that ask for it.  That is why my system
> > doesn't show the 256Mb of memory it has in it, it shows something like
> > 224Mb (32Mb is set aside for the video card)..
> >
> > Unless I am totally missing your point this morning.. :)
> _______________________________________________
> freebsd-performance at mailing list
> To unsubscribe, send any mail to
"freebsd-performance-unsubscribe at"

More information about the freebsd-performance mailing list