|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] tools: hvmloader: select BIOS through xen
# 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 <=
|
|
|
|
|