summaryrefslogtreecommitdiff
path: root/source/components/hardware
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2013-07-26 18:20:00 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2013-07-26 18:20:00 +0000
commitdbded195f9840f9044a6828c8877c6bf0a956482 (patch)
treee05da15a04629f6e36af5ca6c81a2efda47a9dc3 /source/components/hardware
parent94c37fb2483cc09856a30e74879a69f2ccfe22f0 (diff)
Notes
Diffstat (limited to 'source/components/hardware')
-rw-r--r--source/components/hardware/hwtimer.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/components/hardware/hwtimer.c b/source/components/hardware/hwtimer.c
index 7e4177afd6d5..cbfa96b0c7a3 100644
--- a/source/components/hardware/hwtimer.c
+++ b/source/components/hardware/hwtimer.c
@@ -115,8 +115,14 @@ AcpiGetTimer (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
- Status = AcpiHwRead (Ticks, &AcpiGbl_FADT.XPmTimerBlock);
+ /* ACPI 5.0A: PM Timer is optional */
+ if (!AcpiGbl_FADT.XPmTimerBlock.Address)
+ {
+ return_ACPI_STATUS (AE_SUPPORT);
+ }
+
+ Status = AcpiHwRead (Ticks, &AcpiGbl_FADT.XPmTimerBlock);
return_ACPI_STATUS (Status);
}
@@ -171,6 +177,13 @@ AcpiGetTimerDuration (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
+ /* ACPI 5.0A: PM Timer is optional */
+
+ if (!AcpiGbl_FADT.XPmTimerBlock.Address)
+ {
+ return_ACPI_STATUS (AE_SUPPORT);
+ }
+
/*
* Compute Tick Delta:
* Handle (max one) timer rollovers on 24-bit versus 32-bit timers.