52 lines
1.8 KiB
Diff
52 lines
1.8 KiB
Diff
|
From 258c5050f08bdf69394dd8790398b6dfe453886e Mon Sep 17 00:00:00 2001
|
||
|
From: Anthony PERARD <anthony.perard@citrix.com>
|
||
|
Date: Mon, 14 Mar 2016 17:55:47 +0000
|
||
|
Subject: [PATCH 12/15] hvmloader: Specific bios_load function required
|
||
|
|
||
|
All BIOS 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>
|
||
|
---
|
||
|
tools/firmware/hvmloader/hvmloader.c | 16 ++++++++++------
|
||
|
1 file changed, 10 insertions(+), 6 deletions(-)
|
||
|
|
||
|
Index: xen-4.7.0-testing/tools/firmware/hvmloader/hvmloader.c
|
||
|
===================================================================
|
||
|
--- xen-4.7.0-testing.orig/tools/firmware/hvmloader/hvmloader.c
|
||
|
+++ xen-4.7.0-testing/tools/firmware/hvmloader/hvmloader.c
|
||
|
@@ -323,21 +323,25 @@ int main(void)
|
||
|
|
||
|
printf("Loading %s ...\n", bios->name);
|
||
|
bios_module = get_module_entry(hvm_start_info, "bios");
|
||
|
- 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, 0, 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 )
|