From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 03769AC15DA for ; Wed, 30 Aug 2023 12:50:49 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=3DbYSEQKcWU/cUGJBqZo8W6+GJuvrpMEypNuv8F2XHM=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1693399848; v=1; b=UyRQZ7SzYDOkLUWtx9xZGmOuixU2u7JfFTvTQkbv6UAgdAypXP4lu9rf8umBa0rx7bFIJgCE vQFoBwgvWxBZUHXVwqxRn+o5YYJxYcMu2v+XzwKMpLydP6YdbmLjkjUUV1KfuRXMcm5wPriAzfv s0K92SUQLWQOFH4lI6VHHNwk= X-Received: by 127.0.0.2 with SMTP id EPmXYY7687511xyonePVsNpY; Wed, 30 Aug 2023 05:50:48 -0700 X-Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web11.12839.1693399847919845690 for ; Wed, 30 Aug 2023 05:50:48 -0700 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 602CB60DF6 for ; Wed, 30 Aug 2023 12:50:47 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7CCCC433C8 for ; Wed, 30 Aug 2023 12:50:46 +0000 (UTC) X-Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-50087d47d4dso8840224e87.1 for ; Wed, 30 Aug 2023 05:50:46 -0700 (PDT) X-Gm-Message-State: W5akv74nlLqYJrRD3h88hSmix7686176AA= X-Google-Smtp-Source: AGHT+IEocU1cNgemEr36AXlBSNpXRBlgXdc2yFqFLT8zJsRik4CgPLIVdVQe4l+XLrwS9tpGk9BeMsS9WrKwKeRlNLI= X-Received: by 2002:a05:6512:3ca4:b0:500:a002:292a with SMTP id h36-20020a0565123ca400b00500a002292amr2054486lfv.29.1693399844807; Wed, 30 Aug 2023 05:50:44 -0700 (PDT) MIME-Version: 1.0 References: <20230830113930.9933-1-quic_llindhol@quicinc.com> In-Reply-To: <20230830113930.9933-1-quic_llindhol@quicinc.com> From: "Ard Biesheuvel" Date: Wed, 30 Aug 2023 14:50:33 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH 1/1] ArmPkg/SmbiosMiscDxe: use UINT64 for BiosPhysicalSize To: Leif Lindholm Cc: devel@edk2.groups.io, Rebecca Cran Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ardb@kernel.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=UyRQZ7Sz; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Wed, 30 Aug 2023 at 13:39, Leif Lindholm wrote: > > 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 a 32/bit architecture (ARM) with > 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 > --- > > Ultimately, the size is still restricted to 32-bit since it is set > directly from a PcdGet32 (PcdFvSize). This should ideally be broken > out into an OemMiscLib function since PcdFvSize is fundamentally an > ArmPkg concept. > > ArmPkg/Universal/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 38f3864b160e..03f9f07cfa29 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; > -- > 2.30.2 > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108143): https://edk2.groups.io/g/devel/message/108143 Mute This Topic: https://groups.io/mt/101050018/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-