summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2019-06-13 16:44:27 +0100
committerLeif Lindholm <leif.lindholm@linaro.org>2019-06-17 12:02:59 +0100
commit7c974d6b6e8119372d9e51b8b686d31d8665ab91 (patch)
treee815fa0a2471df504653837367f5ec838a38197b /ArmPlatformPkg
parent2378ea55151eef8284b4cf35e95b058b0e591ea0 (diff)
downloadedk2-7c974d6b6e8119372d9e51b8b686d31d8665ab91.tar.gz
edk2-7c974d6b6e8119372d9e51b8b686d31d8665ab91.tar.bz2
edk2-7c974d6b6e8119372d9e51b8b686d31d8665ab91.zip
ArmPlatformPkg: use UINT32 epoch second counter
The comments describes the device as being 32-bit: "the maximum time span is just over 136 years" then uses a UINTN to hold the value. Change to UINT32 so we don't get different behaviour for different architectures. Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r--ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
index 5d5495503d..b630a5cfbf 100644
--- a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
+++ b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
@@ -3,6 +3,7 @@
Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR>
+ Copyright (c) 2019, Linaro Ltd. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -181,7 +182,7 @@ LibSetTime (
)
{
EFI_STATUS Status;
- UINTN EpochSeconds;
+ UINT32 EpochSeconds;
// Because the PL031 is a 32-bit counter counting seconds,
// the maximum time span is just over 136 years.