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] fix acpi_os_get_root_pointer() broken by 17814:9af7a

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] fix acpi_os_get_root_pointer() broken by 17814:9af7a535225f
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 12 Jun 2008 18:10:23 +0900
Delivery-date: Thu, 12 Jun 2008 02:10:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1213241021 -32400
# Node ID d84baff75387166913985a705b5ea91e909406b3
# Parent  b477fb2022639b1e7d9832d6433e234176d5fb6f
[IA64] readd efi support to acpi_os_get_root_pointer()

On ia64 RSDP address is obtained from efi table instead of
memory scan. Otherwise it may use wrong table to fail to find
tables.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff --git a/xen/drivers/acpi/osl.c b/xen/drivers/acpi/osl.c
--- a/xen/drivers/acpi/osl.c
+++ b/xen/drivers/acpi/osl.c
@@ -37,6 +37,9 @@
 #include <acpi/platform/aclinux.h>
 #include <xen/spinlock.h>
 #include <xen/domain_page.h>
+#ifdef __ia64__
+#include <linux/efi.h>
+#endif
 
 #define _COMPONENT             ACPI_OS_SERVICES
 ACPI_MODULE_NAME("osl")
@@ -82,9 +85,25 @@
 
 acpi_physical_address __init acpi_os_get_root_pointer(void)
 {
-       acpi_physical_address pa = 0;
-       acpi_find_root_pointer(&pa);
-       return pa;
+#ifdef __ia64__
+       if (efi_enabled) {
+               if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
+                       return efi.acpi20;
+               else if (efi.acpi != EFI_INVALID_TABLE_ADDR)
+                       return efi.acpi;
+               else {
+                       printk(KERN_ERR PREFIX
+                              "System description tables not found\n");
+                       return 0;
+               }
+       } else
+#endif
+       {
+               acpi_physical_address pa = 0;
+
+               acpi_find_root_pointer(&pa);
+               return pa;
+       }
 }
 
 void __iomem *
diff --git a/xen/include/asm-ia64/config.h b/xen/include/asm-ia64/config.h
--- a/xen/include/asm-ia64/config.h
+++ b/xen/include/asm-ia64/config.h
@@ -17,6 +17,7 @@
 // this needs to be on to run on system with large memory hole
 #define        CONFIG_VIRTUAL_FRAME_TABLE
 
+#define CONFIG_EFI
 #define CONFIG_EFI_PCDP
 #define CONFIG_SERIAL_SGI_L1_CONSOLE
 


-- 
yamahata

Attachment: 2-fix-acpi_os_get_root_pointer.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] fix acpi_os_get_root_pointer() broken by 17814:9af7a535225f, Isaku Yamahata <=