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-devel

[Xen-devel] [PATCH 1/2] Kconfig: Add option to enable support for runnin

To: xen-devel@xxxxxxxxxxxxxxxxxxx, seabios@xxxxxxxxxxx
Subject: [Xen-devel] [PATCH 1/2] Kconfig: Add option to enable support for running as a Xen HVM guests BIOS
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Fri, 13 May 2011 16:59:23 +0100
Cc: Anthony Perard <anthony.perard@xxxxxxxxxx>, Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Fri, 13 May 2011 09:09:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1305302343.31488.162.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1305302343.31488.162.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Do this by subsuming the existing COREBOOT boolean into a choice
option of COREBOOT, XEN and GENERIC.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 src/Kconfig  |   17 ++++++++++++++++-
 src/shadow.c |    4 ++--
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/Kconfig b/src/Kconfig
index 3133d88..fd7de41 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -4,12 +4,27 @@ mainmenu "SeaBIOS Configuration"
 
 menu "General Features"
 
+    choice
+        prompt "Select target environment"
+        default GENERIC
+
     config COREBOOT
         bool "Build for coreboot"
-        default n
         help
             Configure as a coreboot payload.
 
+    config XEN
+        bool "Build for Xen HVM"
+        help
+            Configure to be used by xen hvmloader, for a HVM guest.
+
+    config GENERIC
+        bool "Build for generic target environment"
+        help
+            Configure to be used in a generic target environment.
+
+    endchoice
+
     config THREADS
         bool "Parallelize hardware init"
         default y
diff --git a/src/shadow.c b/src/shadow.c
index ed530e0..a778701 100644
--- a/src/shadow.c
+++ b/src/shadow.c
@@ -102,7 +102,7 @@ static const struct pci_device_id 
dram_controller_make_writable_tbl[] = {
 void
 make_bios_writable(void)
 {
-    if (CONFIG_COREBOOT)
+    if (CONFIG_COREBOOT || CONFIG_XEN)
         return;
 
     dprintf(3, "enabling shadow ram\n");
@@ -127,7 +127,7 @@ static const struct pci_device_id 
dram_controller_make_readonly_tbl[] = {
 void
 make_bios_readonly(void)
 {
-    if (CONFIG_COREBOOT)
+    if (CONFIG_COREBOOT || CONFIG_XEN)
         return;
 
     dprintf(3, "locking shadow ram\n");
-- 
1.7.2.5


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