WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] hvmloader: Replace bios_relocate hook wit

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hvmloader: Replace bios_relocate hook with bios_load hook
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Wed, 03 Aug 2011 21:44:11 +0100
Delivery-date: Wed, 03 Aug 2011 13:46:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1311598669 -3600
# Node ID 360b31a5263cf60081cd6dd41c1c7858fcaccbc6
# Parent  50ddc200a60cad3929a79a992f09145fd39af49d
hvmloader: Replace bios_relocate hook with bios_load hook

Used by OVMF BIOS handler.

Signed-off-by: Bei Guan <gbtju85@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 50ddc200a60c -r 360b31a5263c tools/firmware/hvmloader/config.h
--- a/tools/firmware/hvmloader/config.h Mon Jul 25 13:48:08 2011 +0100
+++ b/tools/firmware/hvmloader/config.h Mon Jul 25 13:57:49 2011 +0100
@@ -20,11 +20,11 @@
     int load_roms;
     unsigned int optionrom_start, optionrom_end;
 
+    void (*bios_load)(const struct bios_config *config);
+
     void (*bios_info_setup)(void);
     void (*bios_info_finish)(void);
 
-    void (*bios_relocate)(void);
-
     void (*vm86_setup)(void);
     void (*e820_setup)(void);
 
diff -r 50ddc200a60c -r 360b31a5263c tools/firmware/hvmloader/hvmloader.c
--- a/tools/firmware/hvmloader/hvmloader.c      Mon Jul 25 13:48:08 2011 +0100
+++ b/tools/firmware/hvmloader/hvmloader.c      Mon Jul 25 13:57:49 2011 +0100
@@ -416,12 +416,13 @@
         bios->create_smbios_tables();
     }
 
-    printf("Loading %s ...\n", bios->name);
-    memcpy((void *)bios->bios_address, bios->image,
-           bios->image_size);
-
-    if (bios->bios_relocate)
-        bios->bios_relocate();
+    if (bios->bios_load) {
+        bios->bios_load(bios);
+    } else {
+        printf("Loading %s ...\n", bios->name);
+        memcpy((void *)bios->bios_address, bios->image,
+               bios->image_size);
+    }
 
     if ( (hvm_info->nr_vcpus > 1) || hvm_info->apic_mode ) {
         if ( bios->create_mp_tables )
diff -r 50ddc200a60c -r 360b31a5263c tools/firmware/hvmloader/rombios.c
--- a/tools/firmware/hvmloader/rombios.c        Mon Jul 25 13:48:08 2011 +0100
+++ b/tools/firmware/hvmloader/rombios.c        Mon Jul 25 13:57:49 2011 +0100
@@ -81,11 +81,15 @@
     memset(info, 0, sizeof(*info));
 }
 
-static void rombios_relocate(void)
+static void rombios_load(const struct bios_config *config)
 {
     uint32_t bioshigh;
     struct rombios_info *info;
 
+    printf("Loading %s ...\n", config->name);
+    memcpy((void *)config->bios_address, config->image,
+           config->image_size);
+
     bioshigh = rombios_highbios_setup();
 
     info = (struct rombios_info *)BIOS_INFO_PHYSICAL_ADDRESS;
@@ -169,11 +173,11 @@
     .optionrom_start = OPTIONROM_PHYSICAL_ADDRESS,
     .optionrom_end = OPTIONROM_PHYSICAL_END,
 
+    .bios_load = rombios_load,
+
     .bios_info_setup = rombios_setup_bios_info,
     .bios_info_finish = NULL,
 
-    .bios_relocate = rombios_relocate,
-
     .vm86_setup = rombios_init_vm86_tss,
     .e820_setup = rombios_setup_e820,
 
diff -r 50ddc200a60c -r 360b31a5263c tools/firmware/hvmloader/seabios.c
--- a/tools/firmware/hvmloader/seabios.c        Mon Jul 25 13:48:08 2011 +0100
+++ b/tools/firmware/hvmloader/seabios.c        Mon Jul 25 13:57:49 2011 +0100
@@ -138,11 +138,11 @@
     .optionrom_start = 0,
     .optionrom_end = 0,
 
+    .bios_load = NULL,
+
     .bios_info_setup = seabios_setup_bios_info,
     .bios_info_finish = seabios_finish_bios_info,
 
-    .bios_relocate = NULL,
-
     .vm86_setup = NULL,
     .e820_setup = seabios_setup_e820,
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] hvmloader: Replace bios_relocate hook with bios_load hook, Xen patchbot-unstable <=