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

[Xen-ia64-devel] [rfc 12/15] Kexec: map EFI after paging is initilaised

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [rfc 12/15] Kexec: map EFI after paging is initilaised
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Fri, 17 Aug 2007 15:50:54 +0900
Delivery-date: Fri, 17 Aug 2007 00:41:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070817065042.645546902@xxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.46-1
If the EFI region is mapped into a region within the address space usually
used by guests, then the mapping can't be made until paging is fully
initialised.  A description of why this mapping is made is included in the
patch that makes the mapping.

This is in preparation for a patch that will move the
run-time EFI regions into such a space.

It assumes that patches to allow SAL calls to run in physical
mode have been applied.

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

Index: xen-unstable.hg/xen/arch/ia64/linux-xen/efi.c
===================================================================
--- xen-unstable.hg.orig/xen/arch/ia64/linux-xen/efi.c  2007-08-07 
10:03:55.000000000 +0900
+++ xen-unstable.hg/xen/arch/ia64/linux-xen/efi.c       2007-08-07 
11:11:16.000000000 +0900
@@ -484,9 +484,6 @@ efi_init (void)
        efi_char16_t *c16;
        u64 efi_desc_size;
        char *cp, vendor[100] = "unknown";
-#ifdef XEN
-       int phys_efi = 0;
-#endif
        int i;
 
        /* it's too early to be able to use the standard kernel command line 
support... */
@@ -502,11 +499,6 @@ efi_init (void)
                        max_addr = GRANULEROUNDDOWN(memparse(cp + 9, &cp));
                } else if (memcmp(cp, "min_addr=", 9) == 0) {
                        min_addr = GRANULEROUNDDOWN(memparse(cp + 9, &cp));
-#ifdef XEN
-               } else if (memcmp(cp, "phys_efi", 8) == 0) {
-                       phys_efi = 1;
-                       cp+=8;
-#endif
                } else {
                        while (*cp != ' ' && *cp)
                                ++cp;
@@ -640,10 +632,20 @@ efi_init (void)
 #ifndef XEN
        efi_enter_virtual_mode();
 #else
+}
+
+static unsigned int __initdata phys_efi = 0;
+integer_param("phys_efi", phys_efi); 
+
+void __init
+late_efi_init (void)
+{
        if (phys_efi)
                printk("Forcing EFI to stay in physical mode\n");
-       else
+       else {
+               printk("Puting EFI into virtual mode\n");
                efi_enter_virtual_mode();
+       }
 #endif
 }
 
Index: xen-unstable.hg/xen/arch/ia64/linux-xen/setup.c
===================================================================
--- xen-unstable.hg.orig/xen/arch/ia64/linux-xen/setup.c        2007-08-07 
10:03:54.000000000 +0900
+++ xen-unstable.hg/xen/arch/ia64/linux-xen/setup.c     2007-08-07 
10:03:55.000000000 +0900
@@ -594,6 +594,9 @@ late_setup_arch (char **cmdline_p)
 #endif
 
        cpu_init();     /* initialize the bootstrap CPU */
+#ifdef XEN
+       late_efi_init();
+#endif
 
 #ifdef CONFIG_ACPI_BOOT
        acpi_boot_init();
Index: xen-unstable.hg/xen/include/asm-ia64/linux-xen/linux/efi.h
===================================================================
--- xen-unstable.hg.orig/xen/include/asm-ia64/linux-xen/linux/efi.h     
2007-08-07 10:03:54.000000000 +0900
+++ xen-unstable.hg/xen/include/asm-ia64/linux-xen/linux/efi.h  2007-08-07 
10:03:55.000000000 +0900
@@ -310,6 +310,7 @@ efi_guid_unparse(efi_guid_t *guid, char 
 }
 
 extern void efi_init (void);
+extern void late_efi_init (void);
 extern void *efi_get_pal_addr (void);
 extern void efi_map_pal_code (void);
 extern void efi_map_memmap(void);

-- 

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/


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