debuggers.hg

changeset 21027:f6d7b66fdb80

ACPI: workaround for S3 fail in two facs tables case

Some legacy BIOS which support ACPI2.0+ may expose two FACS tables via
both FADT->FIRMWARE_CTRL and FADT->X_FIRMWARE_CTRL, but only lookup S3
waking_vector in the first one.

Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 25 20:56:43 2010 +0000 (2010-02-25)
parents d9db3684f292
children 5db0a9bd6a50
files xen/arch/x86/acpi/boot.c
line diff
     1.1 --- a/xen/arch/x86/acpi/boot.c	Thu Feb 25 11:54:19 2010 +0000
     1.2 +++ b/xen/arch/x86/acpi/boot.c	Thu Feb 25 20:56:43 2010 +0000
     1.3 @@ -365,10 +365,15 @@ acpi_fadt_parse_sleep_info(struct acpi_t
     1.4  	       acpi_sinfo.pm1b_evt_blk.address);
     1.5  
     1.6  	/* Now FACS... */
     1.7 -	if (fadt->header.revision >= FADT2_REVISION_ID)
     1.8 -		facs_pa = fadt->Xfacs;
     1.9 -	else
    1.10 +	facs_pa = ((fadt->header.revision >= FADT2_REVISION_ID)
    1.11 +		   ? fadt->Xfacs : (uint64_t)fadt->facs);
    1.12 +	if (fadt->facs && ((uint64_t)fadt->facs != facs_pa)) {
    1.13 +		printk(KERN_WARNING PREFIX
    1.14 +		       "32/64X FACS address mismatch in FADT - "
    1.15 +		       "%08x/%016"PRIx64", using 32",
    1.16 +		       fadt->facs, facs_pa);
    1.17  		facs_pa = (uint64_t)fadt->facs;
    1.18 +	}
    1.19  
    1.20  	facs = (struct acpi_table_facs *)
    1.21  		__acpi_map_table(facs_pa, sizeof(struct acpi_table_facs));