[SeaBIOS] why need 32bit code in seabios?

Kevin O'Connor kevin at koconnor.net
Sat Jul 21 18:15:19 CEST 2012


On Fri, Jul 20, 2012 at 05:08:09AM +0000, wx wrote:
> Hi, I have a Childish question,why need 32bit code in seabios?. I
> found some files are compiled in 16bit and 32bit twice.  Thanks!

Various BIOS protocols require support for four modes: "real mode",
"big real mode", "16bit protected mode", and "32bit segmented mode".
SeaBIOS supports calls in all of these modes and it also runs much of
its own internal code in "32bit flat mode".

So, why run its internal code in 32bit flat mode?  This mode is the
only real sane way to use a 32bit Intel processor, and it's the mode
gcc natively works in.  It offers the least surprises to regular C
developers.

-Kevin



More information about the SeaBIOS mailing list