From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=rech5hpn; spf=pass (domain: linaro.org, ip: 209.85.128.67, mailfrom: leif.lindholm@linaro.org) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by groups.io with SMTP; Thu, 13 Jun 2019 09:18:38 -0700 Received: by mail-wm1-f67.google.com with SMTP id s15so10766966wmj.3 for ; Thu, 13 Jun 2019 09:18:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=O8YtmVmpnN7ywBza+msRX421QQs9/c6m+dJLD8+9jeI=; b=rech5hpnELCcEjzthpICRoN3jFYmIy4t/GrPE7JXVIqkpX2i48WQChJuq6u3FOmp6+ llkQX1HKFutx57GnxIhIQBdBE7UFCpUBblyWrYfI6pdzHd6zpvSwEabIdGK7dkrWznrO ls3TPWiNfT/NxcUXLBnM7gMlkRIUK5VSbTpccCx3Zd00kWAaO3i4c9Y90NO7cmU4ofAc 4jwnmyuGH7bXoSUGjfAq04V3vpgOeViJipQklpNP80cVrSTsI1R5UyrYg4VGOTvGlgEu 2o1QydoJXvYHOaTAirJwHBaqfHJMQY7eNNR6bHyoqMi2t8+qd8L08IKbvChmwPKri25I z/TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=O8YtmVmpnN7ywBza+msRX421QQs9/c6m+dJLD8+9jeI=; b=U81PzX0BdglDSiFBy/WvZmJyjZBixeDM22NGwdUo6VfSfCg83sSXbSbYVBDK5C7+8S Bhwdy2+XpA0JTfdkHbAItxMMvZ3L/g8Hlb4GeyktiwO+SybWX0YAgxYifj3SJ9B1AYzy MpBaZb+A+DycwHvEX5UqxxzXQBj4aogVG3+AELlPYfiP5EPYVW81W0tWpzdC8U8XUa7G AGIfHmqio3rGxpTJUB/5YX+gztsZ3xeg/faccFr6/PnXqsUOQgyr12hGvr71hum8Suns F/hXIrcVprhm83rLWoy+W+dsRIlsssV0SWuxjR2xwVma/ZHzzHh1XowQRmoHJ3VF4duH 41OA== X-Gm-Message-State: APjAAAXOw2rFEAW6vc3caElT4P1V+r5El1h/o97uIiXkF8sxCq2Tp/sA dLexWXyWRDyJAyGZZhrv5wNI/qYTzItH+g== X-Google-Smtp-Source: APXvYqyV+56Xw8OmbqR0HBm7jtCNUrf2E8WqcrN4Ic8n67TzYRHngnUJp+spjKBOd1OuquKSm3mK3g== X-Received: by 2002:a7b:cc0a:: with SMTP id f10mr4640273wmh.81.1560442716879; Thu, 13 Jun 2019 09:18:36 -0700 (PDT) Return-Path: Received: from vanye.hemma.eciton.net (cpc92302-cmbg19-2-0-cust304.5-4.cable.virginm.net. [82.1.209.49]) by smtp.gmail.com with ESMTPSA id s10sm171671wrw.45.2019.06.13.09.18.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 09:18:35 -0700 (PDT) From: "Leif Lindholm" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org Subject: [PATCH 1/2] ArmPlatformPkg: use UINT32 epoch second counter Date: Thu, 13 Jun 2019 17:18:32 +0100 Message-Id: <20190613161833.30102-2-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 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 --- ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c index 5d5495503d18..b630a5cfbfcd 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.
Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.
+ Copyright (c) 2019, Linaro Ltd. All rights reserved.
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. -- 2.11.0