[SeaBIOS] [RFC PATCH v3 0/3] Add segment limit checks to emulator

Kevin O'Connor kevin at koconnor.net
Sun Jul 25 18:42:46 CEST 2010


On Sun, Jul 25, 2010 at 11:55:47AM +0300, Avi Kivity wrote:
>  On 07/24/2010 07:16 PM, Kevin O'Connor wrote:
> >On Sat, Jul 24, 2010 at 11:45:22AM -0400, Kevin O'Connor wrote:
> >>On Mon, Jul 12, 2010 at 04:13:06PM +0300, Avi Kivity wrote:
> >>>Does SeaBIOS use big real mode now?
> >>SeaBIOS calls option roms in big real mode.  This is required by the
> >>relevant specs.
> >>
> >>See the transition16big function in src/romlayout.S.  It briefly jumps
> >>to an address at 0xffxxx during the transition to real-mode.  At a
> >>quick glance, it looks like it could probably be changed to not use a
> >>code address>64K.
> >I put together a SeaBIOS patch so it does not use code addresses>64K
> >in big real mode - in case anyone wants to test it.  Note, this only
> >reduces the use of code addresses>64K - SeaBIOS will still try to use
> >data addresses>64K (eg, in option rom PMM code).
> >
> 
> What conditions are needed to trigger this path?  This can't occur
> under normal operation, since it will fail badly with kvm on Intel.

It's called on every boot.  I've personally only tested kvm on amd,
but I'd have to assume something must be allowing this to work on
intel.

On option rom execution (eg, video rom), there is a call to
optionrom.c:__callrom() which calls util.c:call16big() which calls
romlayout.S:__transition16big.  This has been in place since
SeaBIOS-0.4.0 - well before the integration with kvm.

Is the kvm restriction just on the code address, or is it also for
data accesses?

-Kevin



More information about the SeaBIOS mailing list