[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v7 08/15] hvmloader: Locate the BIOS blob



On Thu, Jul 28, 2016 at 02:44:24PM +0100, Andrew Cooper wrote:
> On 28/07/16 11:50, Anthony PERARD wrote:
> > @@ -293,8 +340,17 @@ int main(void)
> >      }
> >  
> >      printf("Loading %s ...\n", bios->name);
> > -    if ( bios->bios_load )
> > -        bios->bios_load(bios);
> > +    bios_module = get_module_entry(hvm_start_info, "firmware");
> > +    if ( bios_module && bios->bios_load )
> > +    {
> > +        uint32_t paddr = bios_module->paddr;
> > +
> > +        bios->bios_load(bios, (void*)paddr, bios_module->size);
> > +    }
> > +    else if ( bios->bios_load )
> > +    {
> > +        bios->bios_load(bios, NULL, 0);
> 
> This is an unnecessary change in behaviour.  Currently, 'bios' is never
> NULL, and would never pass bogus information to bios_load.
> 
> As this is the new way of providing firmware, it should be a hard error
> if get_module_entry(, "firmware") fails, at which point this logic can
> collapse down quite a lot.

At this point in the patch series, the module is not used yet, and the
seabios loader does not have a bios_load function. Also I've change the
logic again in "hvmloader: bios->bios_load() now needs to be defined".

Also, I've left ROMBIOS embedded in hvmloader, because it comes with
VGABIOS and Etherboot, so it would be a bit more complicated.

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.