diff options
Diffstat (limited to 'source/components/hardware/hwtimer.c')
-rw-r--r-- | source/components/hardware/hwtimer.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/components/hardware/hwtimer.c b/source/components/hardware/hwtimer.c index 7e4177afd6d52..cbfa96b0c7a3e 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. |