hvmloader: bios->bios_load() now needs to be defined

All BIOSes but ROMBIOS needs to be loaded via modules.

ROMBIOS is handled as a special case.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Anthony PERARD authored and Wei Liu committed 2016-08-18 17:24:39 +01:00
1 parent 8fdfa8f612
commit dc35626a2d
1 file changed
+10 -6
+10 -6
View File
@@ -352,22 +352,26 @@ int main(void)
printf("Loading %s ...\n", bios->name);
bios_module = get_module_entry(hvm_start_info, "firmware");
if ( bios_module && bios->bios_load )
if ( bios_module )
{
uint32_t paddr = bios_module->paddr;
bios->bios_load(bios, (void*)paddr, bios_module->size);
}
else if ( bios->bios_load )
#ifdef ENABLE_ROMBIOS
else if ( bios == &rombios_config )
{
bios->bios_load(bios, NULL, 0);
}
#endif
else
{
BUG_ON(bios->bios_address + bios->image_size >
HVMLOADER_PHYSICAL_ADDRESS);
memcpy((void *)bios->bios_address, bios->image,
bios->image_size);
/*
* If there is no BIOS module supplied and if there is no embeded BIOS
* image, then we failed. Only rombios might have an embedded bios blob.
*/
printf("no BIOS ROM image found\n");
BUG();
}
if ( (hvm_info->nr_vcpus > 1) || hvm_info->apic_mode )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.