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] tools: hvmloader: select BIOS through xen

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools: hvmloader: select BIOS through xenstore.
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Wed, 13 Apr 2011 01:05:19 +0100
Delivery-date: Tue, 12 Apr 2011 17:08:24 -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 Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1302613249 -3600
# Node ID dbb5ad1c51bd91a95d07bb896c416bcaab9e4455
# Parent  2869bb8995e2ae13b2aff5461f6b361c02df0643
tools: hvmloader: select BIOS through xenstore.

Allow the toolstack to select the BIOS to use via a xenstore key.

Defaults to "rombios" for compatibility with toolstacks which do not
write the key (e.g. xend).

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 2869bb8995e2 -r dbb5ad1c51bd tools/firmware/hvmloader/hvmloader.c
--- a/tools/firmware/hvmloader/hvmloader.c      Tue Apr 12 13:47:16 2011 +0100
+++ b/tools/firmware/hvmloader/hvmloader.c      Tue Apr 12 14:00:49 2011 +0100
@@ -337,10 +337,30 @@
     cmos_outb(0x35, (uint8_t)( alt_mem >> 8));
 }
 
+struct bios_info {
+    const char *key;
+    const struct bios_config *bios;
+} bios_configs[] = {
+    { "rombios", &rombios_config, },
+    { NULL, NULL }
+};
 
 static const struct bios_config *detect_bios(void)
 {
-    return &rombios_config;
+    const struct bios_info *b;
+    const char *bios;
+
+    bios = xenstore_read("hvmloader/bios");
+    if ( !bios )
+        bios = "rombios";
+
+    for ( b = &bios_configs[0]; b->key != NULL; b++ )
+        if ( !strcmp(bios, b->key) )
+            return b->bios;
+
+    printf("Unknown BIOS %s, no ROM image found\n", bios);
+    BUG();
+    return NULL;
 }
 
 int main(void)

_______________________________________________
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] tools: hvmloader: select BIOS through xenstore., Xen patchbot-unstable <=