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 29FA674003A for ; Wed, 30 Aug 2023 21:15:24 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=g+Hlvti6Swad9wKCtKZt/T6M9skVt96VOxKZ+cBZp1k=; c=relaxed/simple; d=groups.io; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20140610; t=1693430122; v=1; b=pJPy7NdwYR1z4yJQ4ahbReM2+PaDwn+kWuXZ8dqBMojLG4BZmBXnT9EGe9/FGHACpKiQtBq3 9Mn/gZYmeAtdIxoIvlsES2VC4/TykRZ+K++ZgcM5gWtEUlWR8QrB+eNxlHjpaVy7BJtrQLB5Fu3 f/W31NsLaHR9qEi6pdDE4CoY= X-Received: by 127.0.0.2 with SMTP id MZCXYY7687511xmlCVrVwNFo; Wed, 30 Aug 2023 14:15:22 -0700 X-Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web11.2351.1693430121852999475 for ; Wed, 30 Aug 2023 14:15:21 -0700 X-Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37ULA3jp015018; Wed, 30 Aug 2023 21:15:19 GMT X-Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ssv00a6s9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Aug 2023 21:15:19 +0000 X-Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 37ULFIJT005330 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Aug 2023 21:15:18 GMT X-Received: from qc-i7.hemma.eciton.net (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.36; Wed, 30 Aug 2023 14:15:17 -0700 Date: Wed, 30 Aug 2023 22:15:14 +0100 From: "Leif Lindholm" To: , CC: Rebecca Cran Subject: Re: [edk2-devel] [PATCH 1/1] ArmPkg/SmbiosMiscDxe: use UINT64 for BiosPhysicalSize Message-ID: References: <20230830113930.9933-1-quic_llindhol@quicinc.com> MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-ORIG-GUID: va0QgeklkyMG9p-HViAsKE5-oWxLveHj X-Proofpoint-GUID: va0QgeklkyMG9p-HViAsKE5-oWxLveHj 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,quic_llindhol@quicinc.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: N8mvGgARtidHD1mUa2ekoRwrx7686176AA= Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=pJPy7Ndw; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=quicinc.com (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, Aug 30, 2023 at 14:50:33 +0200, Ard Biesheuvel wrote: > 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 Thanks! Pushed as c5753c3e38f3. / Leif > > --- > > > > 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 (#108153): https://edk2.groups.io/g/devel/message/108153 Mute This Topic: https://groups.io/mt/101050018/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-