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

[Xen-devel] [RFC PATCH v2 11/16] hvmloader: No BIOS ROM image allowed to be compiled in



Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 tools/firmware/hvmloader/config.h    |  7 -------
 tools/firmware/hvmloader/hvmloader.c | 16 ++++------------
 2 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/tools/firmware/hvmloader/config.h 
b/tools/firmware/hvmloader/config.h
index c4539cc..0ddd897 100644
--- a/tools/firmware/hvmloader/config.h
+++ b/tools/firmware/hvmloader/config.h
@@ -12,13 +12,6 @@ extern unsigned long igd_opregion_pgbase;
 struct bios_config {
     const char *name;
 
-    /* BIOS ROM image bits */
-    void *image;
-    unsigned int image_size;
-
-    /* Physical address to load at */
-    unsigned int bios_address;
-
     /* ROMS */
     void (*load_roms)(void);
 
diff --git a/tools/firmware/hvmloader/hvmloader.c 
b/tools/firmware/hvmloader/hvmloader.c
index 02d7f96..b131b1d 100644
--- a/tools/firmware/hvmloader/hvmloader.c
+++ b/tools/firmware/hvmloader/hvmloader.c
@@ -386,15 +386,7 @@ int main(void)
     BUG_ON(!bios_module);
 
     printf("Loading %s ...\n", bios->name);
-    if ( bios->bios_load )
-        bios->bios_load(bios, (void*)(bios_module->paddr), bios_module->size);
-    else
-    {
-        BUG_ON(bios->bios_address + bios->image_size >
-               HVMLOADER_PHYSICAL_ADDRESS);
-        memcpy((void *)bios->bios_address, bios->image,
-               bios->image_size);
-    }
+    bios->bios_load(bios, (void*)(bios_module->paddr), bios_module->size);
 
     if ( (hvm_info->nr_vcpus > 1) || hvm_info->apic_mode )
     {
@@ -432,9 +424,9 @@ int main(void)
     if ( SCRATCH_PHYSICAL_ADDRESS != scratch_start )
         printf(" %05x-%05lx: Scratch space\n",
                SCRATCH_PHYSICAL_ADDRESS, scratch_start);
-    printf(" %05x-%05x: Main BIOS\n",
-           bios->bios_address,
-           bios->bios_address + bios->image_size - 1);
+    /* printf(" %05x-%05x: Main BIOS\n", */
+           /* bios->bios_address, */
+           /* bios->bios_address + bios->image_size - 1); */
 
     if ( bios->e820_setup )
         bios->e820_setup();
-- 
Anthony PERARD


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


 


Rackspace

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