summaryrefslogtreecommitdiff
path: root/source/components/hardware/hwtimer.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2017-08-31 17:21:06 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2017-08-31 17:21:06 +0000
commit0810e26699e1b40b9384eca2137be6155de0a5ba (patch)
tree2f9f57dbc41ae321c10f66c7d7985e328edbdec8 /source/components/hardware/hwtimer.c
parent834d4c5613e9c57c0b9fba46fa717fd7fb9d5891 (diff)
Notes
Diffstat (limited to 'source/components/hardware/hwtimer.c')
-rw-r--r--source/components/hardware/hwtimer.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/components/hardware/hwtimer.c b/source/components/hardware/hwtimer.c
index 174769d56348..358164ee8a31 100644
--- a/source/components/hardware/hwtimer.c
+++ b/source/components/hardware/hwtimer.c
@@ -215,6 +215,7 @@ AcpiGetTimer (
UINT32 *Ticks)
{
ACPI_STATUS Status;
+ UINT64 TimerValue;
ACPI_FUNCTION_TRACE (AcpiGetTimer);
@@ -232,7 +233,14 @@ AcpiGetTimer (
return_ACPI_STATUS (AE_SUPPORT);
}
- Status = AcpiHwRead (Ticks, &AcpiGbl_FADT.XPmTimerBlock);
+ Status = AcpiHwRead (&TimerValue, &AcpiGbl_FADT.XPmTimerBlock);
+ if (ACPI_SUCCESS (Status))
+ {
+ /* ACPI PM Timer is defined to be 32 bits (PM_TMR_LEN) */
+
+ *Ticks = (UINT32) TimerValue;
+ }
+
return_ACPI_STATUS (Status);
}