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=cKtKJJpD; spf=pass (domain: linaro.org, ip: 209.85.221.43, mailfrom: leif.lindholm@linaro.org) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by groups.io with SMTP; Thu, 13 Jun 2019 09:18:37 -0700 Received: by mail-wr1-f43.google.com with SMTP id n4so21391250wrw.13 for ; Thu, 13 Jun 2019 09:18:36 -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=MNAA0Z3J+9YAqTPL44nvBOFn+BLXd14PWpVdF9BnV6A=; b=cKtKJJpDY8Lysf17mLmWLCyBWEIG5Bf0+ZD12+C1G4Po0SLrCyrXSrdZqHRHw3O2vc AZjCpF9y5ImnGx1P508n0fhtXe9hoIcaNWF/Usj+/ptTb9kP/bt7W/bNK49xDOG1fcqd X4LQPm3qw/HqOynyZKqIhhzvxEaDwLEaUEY8aL3KmMOFv9TgkXRAMV4scbbHt/0gNIBF Z4dZ56CCBitCqbtq6mriPS773D4sdvDLa84Qt9PlpJesH7QILmqraICDA+P7w5ZZrOgs PXmAjLScHS9s08wIJ0sxe3u1qIsXn7/AYedo/Wf4naI6IMibXX1vym7N/gnDHbLMPQz3 omUQ== 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=MNAA0Z3J+9YAqTPL44nvBOFn+BLXd14PWpVdF9BnV6A=; b=lgdnKQGAO0Lv4LdTS88TwggfumOuofHCElS03HUJ2tbiVTcwy4kiV1zTfEclBGMWSu zXwNOiZl9PnPOB3UsDwdjnDPKMUaO7tXvzvriyPtfg3FNy1yyErBYOs38kjf+2thKxNV iew8KEGJZLXKrTrx57IyMF8rCvcC4Xs7ltZSA8qNw1JUqTWGXy7NNGFjXGNcGksYeS/O wK1AKseo0hHBZqanKJsiAAq4Np4JUL/BtR/P2m1UT6Ht3j4sHm+whISqkWZwxy0keHj0 7floZQbLT9cP9ulKRLpOCQ0DZ49Arp9aVXDd4oRLvCeRGJnKJuS4QoVQvgId3FssLs/j XccA== X-Gm-Message-State: APjAAAUY+qBAV4KWhoJifOnB0OYzh6p3QtrvUUll5NrRY1jkUHeo5XdO VmnN2bAFMnT/f+i1kt8CjbeLCYpRfawa7A== X-Google-Smtp-Source: APXvYqydEk2kR9ZwdYPtmggyZJF5KKi2nhXMe7zV+xffoCfvL8TG4l6aGRMnB7nLhgW7FB7iW5QaEg== X-Received: by 2002:a5d:4d06:: with SMTP id z6mr34877279wrt.343.1560442715446; Thu, 13 Jun 2019 09:18:35 -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.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 09:18:34 -0700 (PDT) From: "Leif Lindholm" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, Alexei Fedorov Subject: [PATCH 0/2] EmbeddedPkg,ArmPlatformPkg: fix VS2017 TimeBaseLib build errors Date: Thu, 13 Jun 2019 17:18:31 +0100 Message-Id: <20190613161833.30102-1-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 TimeBaseLib EfiTimeToEpoch returns a UINTN, meaning its behaviour differs between architectures. This upsets VS2017 when building for 32-bit ARM (and likely would if building for IA32 too). Similarly, some internal calculations used UINTN for operating on fixed-size fields, giving further issues. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=997 PL031RealTimeClockLib needed an adjustment to support the resulting API change, but frankly that change just makes the code agree with the comments surrounding it. This series cleans up the type handling Visual Studio complains about. This is not a proper overhaul of the library, just a fix of encountered build errors. Leif Lindholm (2): ArmPlatformPkg: use UINT32 epoch second counter EmbeddedPkg: improve TimeBaseLib type safety ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c | 3 ++- EmbeddedPkg/Include/Library/TimeBaseLib.h | 4 ++-- EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c | 18 +++++++++--------- 3 files changed, 13 insertions(+), 12 deletions(-) Cc: Alexei Fedorov -- 2.11.0