[SeaBIOS] [WIP PATCH 3/3] Add initial CSM support
Kevin O'Connor
kevin at koconnor.net
Fri Jan 18 03:09:13 CET 2013
On Fri, Jan 18, 2013 at 01:20:05AM +0000, David Woodhouse wrote:
> On Thu, 2013-01-17 at 19:58 -0500, Kevin O'Connor wrote:
> > Does this table have to be in the f-segment, or can it be anywhere in
> > the binary? BTW, how does OVMF know where to place the seabios blob
> > in memory?
>
> It can be anywhere in memory. OVMF loads the blob so that it ends at
> 1MiB.
Okay, sounds like we could end up doing csm.c entirely in 32bit code
then. (Enhance the build with an "export" equivalent of
VAR32FLATVISIBLE and invoke call32 directly from entry_csm.)
> > > + /* FIXME: I don't know if we can allocate in the E000 segment at all. */
> > > + dprintf(3, "Legacy16GetTableAddress size %x align %x region %d\n",
> > > + size, align, region);
> > > + chunk = pmm_malloc(&ZoneFSeg, PMM_DEFAULT_HANDLE, size, align);
> >
> > This is the same as malloc_fseg().
>
> Apart from the alignment. Which is a power of two, yes. I'll fix it to
> use ZoneLow for the e-segment too; thanks. If no preference is expressed
> by the caller, should I try ZoneLow first? That'll be larger, right?
Yes, ZoneLow will be larger than ZoneFSeg, though both should be
pretty large. This is assuming CONFIG_RELOCATE_INIT is made to work -
without that ZoneLow will likely go below the e-segment and there wont
be much space in the f-segment. It should be possible to enable
CONFIG_RELOCATE_INIT once the PMM regions are filled.
-Kevin
More information about the SeaBIOS
mailing list