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] [patch 1/1] Dont use dummy set_virtual_address_map

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [patch 1/1] Dont use dummy set_virtual_address_map
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Wed, 12 Sep 2007 17:38:32 +0900
Delivery-date: Wed, 12 Sep 2007 01:45:30 -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: <20070912083831.571142878@xxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.46-1
Instead of relying on purgatory to set up a dummy
set_virtual_address_map(), which requires purgatory
to know how to do __va() opperations, just test to see
if efi has already been mapped at boot time.

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

Index: linux-2.6/arch/ia64/kernel/efi.c
===================================================================
--- linux-2.6.orig/arch/ia64/kernel/efi.c       2007-02-19 15:28:02.000000000 
+0900
+++ linux-2.6/arch/ia64/kernel/efi.c    2007-02-19 18:08:35.000000000 +0900
@@ -586,15 +586,28 @@
                }
        }
 
-       status = efi_call_phys(__va(runtime->set_virtual_address_map),
-                              ia64_boot_param->efi_memmap_size,
-                              efi_desc_size, 
ia64_boot_param->efi_memdesc_version,
-                              ia64_boot_param->efi_memmap);
-       if (status != EFI_SUCCESS) {
-               printk(KERN_WARNING "warning: unable to switch EFI into virtual 
mode "
-                      "(status=%lu)\n", status);
+       if ((unsigned long)__va(runtime->set_virtual_address_map) ==
+           runtime->set_virtual_address_map) {
+               printk(KERN_WARNING "warning: EFI is already mapped "
+                      "in the right place\n");
+       }
+       else if (runtime->set_virtual_address_map & (0xfUL << 60)) {
+               printk(KERN_WARNING "warning: EFI is already mapped "
+                      "in the wrong place\n");
                return;
        }
+       else {
+               status = efi_call_phys(__va(runtime->set_virtual_address_map),
+                                      ia64_boot_param->efi_memmap_size,
+                                      efi_desc_size,
+                                      ia64_boot_param->efi_memdesc_version,
+                                      ia64_boot_param->efi_memmap);
+               if (status != EFI_SUCCESS) {
+                       printk(KERN_WARNING "warning: unable to switch EFI "
+                              "into virtual mode (status=%lu)\n", status);
+                       return;
+               }
+       }
 
        /*
         * Now that EFI is in virtual mode, we call the EFI functions more 
efficiently:

-- 

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

<Prev in Thread] Current Thread [Next in Thread>