# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1213171062 -32400
# Node ID 69f1c456d2f04f63f82362b2bdade89ec67aa0a9
# Parent e358ef6cbd41309f794b6bfa68375311d904d65e
[IA64] efi: remove old efi code to copmile newer linux acpi code.
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
diff --git a/xen/arch/ia64/linux-xen/efi.c b/xen/arch/ia64/linux-xen/efi.c
--- a/xen/arch/ia64/linux-xen/efi.c
+++ b/xen/arch/ia64/linux-xen/efi.c
@@ -504,7 +504,6 @@
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 @@
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 --git a/xen/arch/ia64/xen/dom_fw_dom0.c b/xen/arch/ia64/xen/dom_fw_dom0.c
--- a/xen/arch/ia64/xen/dom_fw_dom0.c
+++ b/xen/arch/ia64/xen/dom_fw_dom0.c
@@ -212,33 +212,33 @@
/* 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 --git a/xen/arch/ia64/xen/pcdp.c b/xen/arch/ia64/xen/pcdp.c
--- a/xen/arch/ia64/xen/pcdp.c
+++ b/xen/arch/ia64/xen/pcdp.c
@@ -146,10 +146,17 @@
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 @@
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 --git a/xen/arch/ia64/xen/xensetup.c b/xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c
+++ b/xen/arch/ia64/xen/xensetup.c
@@ -557,7 +557,8 @@
/* 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 --git a/xen/include/asm-ia64/linux-xen/linux/efi.h
b/xen/include/asm-ia64/linux-xen/linux/efi.h
--- a/xen/include/asm-ia64/linux-xen/linux/efi.h
+++ b/xen/include/asm-ia64/linux-xen/linux/efi.h
@@ -256,7 +256,6 @@
*/
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 @@
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;
1-update-struct-efi.patch
Description: Text Data
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|