From c5753c3e38f3fde23eec9641cb3c433f443ff99e Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Wed, 30 Aug 2023 11:44:22 +0100 Subject: [PATCH] ArmPkg/SmbiosMiscDxe: use UINT64 for BiosPhysicalSize The top two bits of the Extended BIOS ROM Size field indicates the unit used for the remaining 14 bits. If the size is greater than 16GB, the unit is gigabytes. The test for this uses the local BiosPhysicalSize variable, which is a UINTN, meaning that when building for ARM/CLANGDWARF we have a tautological constant comparison, which the toolchain flags now we've stopped disabling that warning. So switch the BiosPhysicalSize variable to UINT64. Signed-off-by: Leif Lindholm Cc: Ard Biesheuvel Cc: Rebecca Cran Reviewed-by: Ard Biesheuvel --- .../Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c index 38f3864b16..03f9f07cfa 100644 --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c @@ -185,7 +185,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor) { UINTN VendorStrLen; UINTN VerStrLen; UINTN DateStrLen; - UINTN BiosPhysicalSize; + UINT64 BiosPhysicalSize; CHAR16 *Vendor; CHAR16 *Version; CHAR16 *ReleaseDate;