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

[Xen-changelog] [xen-unstable] [IA64] efi: remove old efi code to copmil

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] efi: remove old efi code to copmile newer linux acpi code.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 02 Jul 2008 05:40:19 -0700
Delivery-date: Wed, 02 Jul 2008 05:40:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1213171062 -32400
# Node ID cfbc535ebf6f3f33be596e15dccdc2a32d6d7c4e
# Parent  0034766b45c27400b334fd202eb397d30776e06a
[IA64] efi: remove old efi code to copmile newer linux acpi code.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/arch/ia64/linux-xen/efi.c              |   26 --------------------------
 xen/arch/ia64/xen/dom_fw_dom0.c            |   20 ++++++++++----------
 xen/arch/ia64/xen/pcdp.c                   |   13 +++++++++++++
 xen/arch/ia64/xen/xensetup.c               |    3 ++-
 xen/include/asm-ia64/linux-xen/linux/efi.h |   11 -----------
 5 files changed, 25 insertions(+), 48 deletions(-)

diff -r 0034766b45c2 -r cfbc535ebf6f xen/arch/ia64/linux-xen/efi.c
--- a/xen/arch/ia64/linux-xen/efi.c     Thu Jun 19 12:46:26 2008 +0900
+++ b/xen/arch/ia64/linux-xen/efi.c     Wed Jun 11 16:57:42 2008 +0900
@@ -504,7 +504,6 @@ efi_init (void)
        printk(KERN_INFO "EFI v%u.%.02u by %s:",
               efi.systab->hdr.revision >> 16, efi.systab->hdr.revision & 
0xffff, vendor);
 
-#ifndef XEN
        efi.mps        = EFI_INVALID_TABLE_ADDR;
        efi.acpi       = EFI_INVALID_TABLE_ADDR;
        efi.acpi20     = EFI_INVALID_TABLE_ADDR;
@@ -535,31 +534,6 @@ efi_init (void)
                        printk(" HCDP=0x%lx", config_tables[i].table);
                }
        }
-#else
-       /* Members of efi are set with virtual address in old linux code.
-          The latest linux set wiht physicall address. */
-       for (i = 0; i < (int) efi.systab->nr_tables; i++) {
-               if (efi_guidcmp(config_tables[i].guid, MPS_TABLE_GUID) == 0) {
-                       efi.mps = __va(config_tables[i].table);
-                       printk(" MPS=0x%lx", config_tables[i].table);
-               } else if (efi_guidcmp(config_tables[i].guid, 
ACPI_20_TABLE_GUID) == 0) {
-                       efi.acpi20 = __va(config_tables[i].table);
-                       printk(" ACPI 2.0=0x%lx", config_tables[i].table);
-               } else if (efi_guidcmp(config_tables[i].guid, ACPI_TABLE_GUID) 
== 0) {
-                       efi.acpi = __va(config_tables[i].table);
-                       printk(" ACPI=0x%lx", config_tables[i].table);
-               } else if (efi_guidcmp(config_tables[i].guid, 
SMBIOS_TABLE_GUID) == 0) {
-                       efi.smbios = __va(config_tables[i].table);
-                       printk(" SMBIOS=0x%lx", config_tables[i].table);
-               } else if (efi_guidcmp(config_tables[i].guid, 
SAL_SYSTEM_TABLE_GUID) == 0) {
-                       efi.sal_systab = __va(config_tables[i].table);
-                       printk(" SALsystab=0x%lx", config_tables[i].table);
-               } else if (efi_guidcmp(config_tables[i].guid, HCDP_TABLE_GUID) 
== 0) {
-                       efi.hcdp = __va(config_tables[i].table);
-                       printk(" HCDP=0x%lx", config_tables[i].table);
-               }
-       }
-#endif
        printk("\n");
 
        runtime = __va(efi.systab->runtime);
diff -r 0034766b45c2 -r cfbc535ebf6f xen/arch/ia64/xen/dom_fw_dom0.c
--- a/xen/arch/ia64/xen/dom_fw_dom0.c   Thu Jun 19 12:46:26 2008 +0900
+++ b/xen/arch/ia64/xen/dom_fw_dom0.c   Wed Jun 11 16:57:42 2008 +0900
@@ -212,33 +212,33 @@ void __init efi_systable_init_dom0(struc
 
        /* Write messages to the console.  */
        printk("Domain0 EFI passthrough:");
-       if (efi.mps) {
+       if (efi.mps != EFI_INVALID_TABLE_ADDR) {
                tables->efi_tables[i].guid = MPS_TABLE_GUID;
-               tables->efi_tables[i].table = __pa(efi.mps);
+               tables->efi_tables[i].table = efi.mps;
                printk(" MPS=0x%lx", tables->efi_tables[i].table);
                i++;
        }
-       if (efi.acpi20) {
+       if (efi.acpi20 != EFI_INVALID_TABLE_ADDR) {
                tables->efi_tables[i].guid = ACPI_20_TABLE_GUID;
-               tables->efi_tables[i].table = __pa(efi.acpi20);
+               tables->efi_tables[i].table = efi.acpi20;
                printk(" ACPI 2.0=0x%lx", tables->efi_tables[i].table);
                i++;
        }
-       if (efi.acpi) {
+       if (efi.acpi != EFI_INVALID_TABLE_ADDR) {
                tables->efi_tables[i].guid = ACPI_TABLE_GUID;
-               tables->efi_tables[i].table = __pa(efi.acpi);
+               tables->efi_tables[i].table = efi.acpi;
                printk(" ACPI=0x%lx", tables->efi_tables[i].table);
                i++;
        }
-       if (efi.smbios) {
+       if (efi.smbios != EFI_INVALID_TABLE_ADDR) {
                tables->efi_tables[i].guid = SMBIOS_TABLE_GUID;
-               tables->efi_tables[i].table = __pa(efi.smbios);
+               tables->efi_tables[i].table = efi.smbios;
                printk(" SMBIOS=0x%lx", tables->efi_tables[i].table);
                i++;
        }
-       if (efi.hcdp) {
+       if (efi.hcdp != EFI_INVALID_TABLE_ADDR) {
                tables->efi_tables[i].guid = HCDP_TABLE_GUID;
-               tables->efi_tables[i].table = __pa(efi.hcdp);
+               tables->efi_tables[i].table = efi.hcdp;
                printk(" HCDP=0x%lx", tables->efi_tables[i].table);
                i++;
        }
diff -r 0034766b45c2 -r cfbc535ebf6f xen/arch/ia64/xen/pcdp.c
--- a/xen/arch/ia64/xen/pcdp.c  Thu Jun 19 12:46:26 2008 +0900
+++ b/xen/arch/ia64/xen/pcdp.c  Wed Jun 11 16:57:42 2008 +0900
@@ -146,10 +146,17 @@ setup_serial_console(struct pcdp_uart *u
        if (uart->bits)
                ns16550_com1.data_bits = uart->bits;
 
+#ifndef XEN
        setup_pcdp_irq(efi.hcdp, uart);
 
        /* Hide the HCDP table from dom0, xencons will be the console */
        efi.hcdp = NULL;
+#else
+       setup_pcdp_irq(__va(efi.hcdp), uart);
+
+       /* Hide the HCDP table from dom0, xencons will be the console */
+       efi.hcdp = EFI_INVALID_TABLE_ADDR;
+#endif
 
        return 0;
 }
@@ -227,9 +234,15 @@ efi_setup_pcdp_console(char *cmdline)
        struct pcdp_device *dev, *end;
        int i, serial = 0;
 
+#ifndef XEN
        pcdp = efi.hcdp;
        if (!pcdp)
                return -ENODEV;
+#else
+       if (efi.hcdp == EFI_INVALID_TABLE_ADDR)
+               return -ENODEV;
+       pcdp = __va(efi.hcdp);
+#endif
 
        printk(KERN_INFO "PCDP: v%d at 0x%lx\n", pcdp->rev, __pa(pcdp));
 
diff -r 0034766b45c2 -r cfbc535ebf6f xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Thu Jun 19 12:46:26 2008 +0900
+++ b/xen/arch/ia64/xen/xensetup.c      Wed Jun 11 16:57:42 2008 +0900
@@ -557,7 +557,8 @@ skip_move:
 
     /* process SAL system table */
     /* must be before any pal/sal call */
-    ia64_sal_init(efi.sal_systab);
+    BUG_ON(efi.sal_systab == EFI_INVALID_TABLE_ADDR);
+    ia64_sal_init(__va(efi.sal_systab));
 
     /* early_setup_arch() maps PAL code. */
     identify_vmx_feature();
diff -r 0034766b45c2 -r cfbc535ebf6f xen/include/asm-ia64/linux-xen/linux/efi.h
--- a/xen/include/asm-ia64/linux-xen/linux/efi.h        Thu Jun 19 12:46:26 
2008 +0900
+++ b/xen/include/asm-ia64/linux-xen/linux/efi.h        Wed Jun 11 16:57:42 
2008 +0900
@@ -256,7 +256,6 @@ struct efi_memory_map {
  */
 extern struct efi {
        efi_system_table_t *systab;     /* EFI system table */
-#ifndef XEN
        unsigned long mps;              /* MPS table */
        unsigned long acpi;             /* ACPI table  (IA64 ext 0.71) */
        unsigned long acpi20;           /* ACPI table  (ACPI 2.0) */
@@ -265,16 +264,6 @@ extern struct efi {
        unsigned long boot_info;        /* boot info table */
        unsigned long hcdp;             /* HCDP table */
        unsigned long uga;              /* UGA table */
-#else
-       void *mps;                      /* MPS table */
-       void *acpi;                     /* ACPI table  (IA64 ext 0.71) */
-       void *acpi20;                   /* ACPI table  (ACPI 2.0) */
-       void *smbios;                   /* SM BIOS table */
-       void *sal_systab;               /* SAL system table */
-       void *boot_info;                /* boot info table */
-       void *hcdp;                     /* HCDP table */
-       void *uga;                      /* UGA table */
-#endif
        efi_get_time_t *get_time;
        efi_set_time_t *set_time;
        efi_get_wakeup_time_t *get_wakeup_time;

_______________________________________________
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] [IA64] efi: remove old efi code to copmile newer linux acpi code., Xen patchbot-unstable <=