ia64/xen-unstable

changeset 17886:cfbc535ebf6f

[IA64] efi: remove old efi code to copmile newer linux acpi code.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Wed Jun 11 16:57:42 2008 +0900 (2008-06-11)
parents 0034766b45c2
children cddaea5d6528
files xen/arch/ia64/linux-xen/efi.c xen/arch/ia64/xen/dom_fw_dom0.c xen/arch/ia64/xen/pcdp.c xen/arch/ia64/xen/xensetup.c xen/include/asm-ia64/linux-xen/linux/efi.h
line diff
     1.1 --- a/xen/arch/ia64/linux-xen/efi.c	Thu Jun 19 12:46:26 2008 +0900
     1.2 +++ b/xen/arch/ia64/linux-xen/efi.c	Wed Jun 11 16:57:42 2008 +0900
     1.3 @@ -504,7 +504,6 @@ efi_init (void)
     1.4  	printk(KERN_INFO "EFI v%u.%.02u by %s:",
     1.5  	       efi.systab->hdr.revision >> 16, efi.systab->hdr.revision & 0xffff, vendor);
     1.6  
     1.7 -#ifndef XEN
     1.8  	efi.mps        = EFI_INVALID_TABLE_ADDR;
     1.9  	efi.acpi       = EFI_INVALID_TABLE_ADDR;
    1.10  	efi.acpi20     = EFI_INVALID_TABLE_ADDR;
    1.11 @@ -535,31 +534,6 @@ efi_init (void)
    1.12  			printk(" HCDP=0x%lx", config_tables[i].table);
    1.13  		}
    1.14  	}
    1.15 -#else
    1.16 -	/* Members of efi are set with virtual address in old linux code.
    1.17 -	   The latest linux set wiht physicall address. */
    1.18 -	for (i = 0; i < (int) efi.systab->nr_tables; i++) {
    1.19 -		if (efi_guidcmp(config_tables[i].guid, MPS_TABLE_GUID) == 0) {
    1.20 -			efi.mps = __va(config_tables[i].table);
    1.21 -			printk(" MPS=0x%lx", config_tables[i].table);
    1.22 -		} else if (efi_guidcmp(config_tables[i].guid, ACPI_20_TABLE_GUID) == 0) {
    1.23 -			efi.acpi20 = __va(config_tables[i].table);
    1.24 -			printk(" ACPI 2.0=0x%lx", config_tables[i].table);
    1.25 -		} else if (efi_guidcmp(config_tables[i].guid, ACPI_TABLE_GUID) == 0) {
    1.26 -			efi.acpi = __va(config_tables[i].table);
    1.27 -			printk(" ACPI=0x%lx", config_tables[i].table);
    1.28 -		} else if (efi_guidcmp(config_tables[i].guid, SMBIOS_TABLE_GUID) == 0) {
    1.29 -			efi.smbios = __va(config_tables[i].table);
    1.30 -			printk(" SMBIOS=0x%lx", config_tables[i].table);
    1.31 -		} else if (efi_guidcmp(config_tables[i].guid, SAL_SYSTEM_TABLE_GUID) == 0) {
    1.32 -			efi.sal_systab = __va(config_tables[i].table);
    1.33 -			printk(" SALsystab=0x%lx", config_tables[i].table);
    1.34 -		} else if (efi_guidcmp(config_tables[i].guid, HCDP_TABLE_GUID) == 0) {
    1.35 -			efi.hcdp = __va(config_tables[i].table);
    1.36 -			printk(" HCDP=0x%lx", config_tables[i].table);
    1.37 -		}
    1.38 -	}
    1.39 -#endif
    1.40  	printk("\n");
    1.41  
    1.42  	runtime = __va(efi.systab->runtime);
     2.1 --- a/xen/arch/ia64/xen/dom_fw_dom0.c	Thu Jun 19 12:46:26 2008 +0900
     2.2 +++ b/xen/arch/ia64/xen/dom_fw_dom0.c	Wed Jun 11 16:57:42 2008 +0900
     2.3 @@ -212,33 +212,33 @@ void __init efi_systable_init_dom0(struc
     2.4  
     2.5  	/* Write messages to the console.  */
     2.6  	printk("Domain0 EFI passthrough:");
     2.7 -	if (efi.mps) {
     2.8 +	if (efi.mps != EFI_INVALID_TABLE_ADDR) {
     2.9  		tables->efi_tables[i].guid = MPS_TABLE_GUID;
    2.10 -		tables->efi_tables[i].table = __pa(efi.mps);
    2.11 +		tables->efi_tables[i].table = efi.mps;
    2.12  		printk(" MPS=0x%lx", tables->efi_tables[i].table);
    2.13  		i++;
    2.14  	}
    2.15 -	if (efi.acpi20) {
    2.16 +	if (efi.acpi20 != EFI_INVALID_TABLE_ADDR) {
    2.17  		tables->efi_tables[i].guid = ACPI_20_TABLE_GUID;
    2.18 -		tables->efi_tables[i].table = __pa(efi.acpi20);
    2.19 +		tables->efi_tables[i].table = efi.acpi20;
    2.20  		printk(" ACPI 2.0=0x%lx", tables->efi_tables[i].table);
    2.21  		i++;
    2.22  	}
    2.23 -	if (efi.acpi) {
    2.24 +	if (efi.acpi != EFI_INVALID_TABLE_ADDR) {
    2.25  		tables->efi_tables[i].guid = ACPI_TABLE_GUID;
    2.26 -		tables->efi_tables[i].table = __pa(efi.acpi);
    2.27 +		tables->efi_tables[i].table = efi.acpi;
    2.28  		printk(" ACPI=0x%lx", tables->efi_tables[i].table);
    2.29  		i++;
    2.30  	}
    2.31 -	if (efi.smbios) {
    2.32 +	if (efi.smbios != EFI_INVALID_TABLE_ADDR) {
    2.33  		tables->efi_tables[i].guid = SMBIOS_TABLE_GUID;
    2.34 -		tables->efi_tables[i].table = __pa(efi.smbios);
    2.35 +		tables->efi_tables[i].table = efi.smbios;
    2.36  		printk(" SMBIOS=0x%lx", tables->efi_tables[i].table);
    2.37  		i++;
    2.38  	}
    2.39 -	if (efi.hcdp) {
    2.40 +	if (efi.hcdp != EFI_INVALID_TABLE_ADDR) {
    2.41  		tables->efi_tables[i].guid = HCDP_TABLE_GUID;
    2.42 -		tables->efi_tables[i].table = __pa(efi.hcdp);
    2.43 +		tables->efi_tables[i].table = efi.hcdp;
    2.44  		printk(" HCDP=0x%lx", tables->efi_tables[i].table);
    2.45  		i++;
    2.46  	}
     3.1 --- a/xen/arch/ia64/xen/pcdp.c	Thu Jun 19 12:46:26 2008 +0900
     3.2 +++ b/xen/arch/ia64/xen/pcdp.c	Wed Jun 11 16:57:42 2008 +0900
     3.3 @@ -146,10 +146,17 @@ setup_serial_console(struct pcdp_uart *u
     3.4  	if (uart->bits)
     3.5  		ns16550_com1.data_bits = uart->bits;
     3.6  
     3.7 +#ifndef XEN
     3.8  	setup_pcdp_irq(efi.hcdp, uart);
     3.9  
    3.10  	/* Hide the HCDP table from dom0, xencons will be the console */
    3.11  	efi.hcdp = NULL;
    3.12 +#else
    3.13 +	setup_pcdp_irq(__va(efi.hcdp), uart);
    3.14 +
    3.15 +	/* Hide the HCDP table from dom0, xencons will be the console */
    3.16 +	efi.hcdp = EFI_INVALID_TABLE_ADDR;
    3.17 +#endif
    3.18  
    3.19  	return 0;
    3.20  }
    3.21 @@ -227,9 +234,15 @@ efi_setup_pcdp_console(char *cmdline)
    3.22  	struct pcdp_device *dev, *end;
    3.23  	int i, serial = 0;
    3.24  
    3.25 +#ifndef XEN
    3.26  	pcdp = efi.hcdp;
    3.27  	if (!pcdp)
    3.28  		return -ENODEV;
    3.29 +#else
    3.30 +	if (efi.hcdp == EFI_INVALID_TABLE_ADDR)
    3.31 +		return -ENODEV;
    3.32 +	pcdp = __va(efi.hcdp);
    3.33 +#endif
    3.34  
    3.35  	printk(KERN_INFO "PCDP: v%d at 0x%lx\n", pcdp->rev, __pa(pcdp));
    3.36  
     4.1 --- a/xen/arch/ia64/xen/xensetup.c	Thu Jun 19 12:46:26 2008 +0900
     4.2 +++ b/xen/arch/ia64/xen/xensetup.c	Wed Jun 11 16:57:42 2008 +0900
     4.3 @@ -557,7 +557,8 @@ skip_move:
     4.4  
     4.5      /* process SAL system table */
     4.6      /* must be before any pal/sal call */
     4.7 -    ia64_sal_init(efi.sal_systab);
     4.8 +    BUG_ON(efi.sal_systab == EFI_INVALID_TABLE_ADDR);
     4.9 +    ia64_sal_init(__va(efi.sal_systab));
    4.10  
    4.11      /* early_setup_arch() maps PAL code. */
    4.12      identify_vmx_feature();
     5.1 --- a/xen/include/asm-ia64/linux-xen/linux/efi.h	Thu Jun 19 12:46:26 2008 +0900
     5.2 +++ b/xen/include/asm-ia64/linux-xen/linux/efi.h	Wed Jun 11 16:57:42 2008 +0900
     5.3 @@ -256,7 +256,6 @@ struct efi_memory_map {
     5.4   */
     5.5  extern struct efi {
     5.6  	efi_system_table_t *systab;	/* EFI system table */
     5.7 -#ifndef XEN
     5.8  	unsigned long mps;		/* MPS table */
     5.9  	unsigned long acpi;		/* ACPI table  (IA64 ext 0.71) */
    5.10  	unsigned long acpi20;		/* ACPI table  (ACPI 2.0) */
    5.11 @@ -265,16 +264,6 @@ extern struct efi {
    5.12  	unsigned long boot_info;	/* boot info table */
    5.13  	unsigned long hcdp;		/* HCDP table */
    5.14  	unsigned long uga;		/* UGA table */
    5.15 -#else
    5.16 -	void *mps;			/* MPS table */
    5.17 -	void *acpi;			/* ACPI table  (IA64 ext 0.71) */
    5.18 -	void *acpi20;			/* ACPI table  (ACPI 2.0) */
    5.19 -	void *smbios;			/* SM BIOS table */
    5.20 -	void *sal_systab;		/* SAL system table */
    5.21 -	void *boot_info;		/* boot info table */
    5.22 -	void *hcdp;			/* HCDP table */
    5.23 -	void *uga;			/* UGA table */
    5.24 -#endif
    5.25  	efi_get_time_t *get_time;
    5.26  	efi_set_time_t *set_time;
    5.27  	efi_get_wakeup_time_t *get_wakeup_time;