Skip to contentSkip to conversation

acpi: handle FADT 2.0 xpmtmr address 0 case

PATCH In review [email protected] 1 participant 1 message Oct 28, 2005 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 4/9 acpi: handle FADT 2.0 xpmtmr address 0 case

From: Shaohua Li <[email protected]>

Handle FADT 2.0 xpmtmr address 0 case. The patch makes the pmtmr ioport detecting align with ACPICA (the comments are copied from ACPICA code).

---

 arch/i386/kernel/acpi/boot.c |    7 +++++++
 1 files changed, 7 insertions(+)
arch/i386/kernel/acpi/boot.c renamed from arch/i386/kernel/acpi/boot.c~acpi-handle-fadt-20-xpmtmr-address-0-case +7 -0
diff -puN arch/i386/kernel/acpi/boot.c~acpi-handle-fadt-20-xpmtmr-address-0-case arch/i386/kernel/acpi/boot.c
@@ -641,6 +641,13 @@ static int __init acpi_parse_fadt(unsign
 			return 0;
 
 		pmtmr_ioport = fadt->xpm_tmr_blk.address;
+		/*
+		 * "X" fields are optional extensions to the original V1.0
+		 * fields, so we must selectively expand V1.0 fields if the
+		 * corresponding X field is zero.
+	 	 */
+		if (!pmtmr_ioport)
+			pmtmr_ioport = fadt->V1_pm_tmr_blk;
 	} else {
 		/* FADT rev. 1 */
 		pmtmr_ioport = fadt->V1_pm_tmr_blk;

_

-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information