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 346CFD8027A for ; Wed, 30 Aug 2023 11:39:51 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=zczXn/59QM34wJfzPcGBdj4+NDwj7GeOe7mcEFXNXto=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1693395588; v=1; b=wOKsMDQG8wlq2LVe67xs2isQe4umJU6UdNm0DC8hObgizeWGUYpX3wHyL4AM1aMk4YhgdKwI t7FUFXqoM9O5owOOXtmrhwh6jSNHO4XZxSStxAhqmBepRZD40ngBhE+h6mvRVC2qU1UK/HcZ9F5 MCXCl79LPFk/1WPQwcfNG8nQ= X-Received: by 127.0.0.2 with SMTP id kCvgYY7687511xeycjs3cDWC; Wed, 30 Aug 2023 04:39:48 -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.11549.1693395583204344202 for ; Wed, 30 Aug 2023 04:39:43 -0700 X-Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37UB0Yus021948; Wed, 30 Aug 2023 11:39:40 GMT X-Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3st28a8ae1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Aug 2023 11:39:40 +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 37UBdepV014341 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Aug 2023 11:39:40 GMT X-Received: from qc-i7.qualcomm.com (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 04:39:38 -0700 From: "Leif Lindholm" To: CC: Ard Biesheuvel , Rebecca Cran Subject: [edk2-devel] [PATCH 1/1] ArmPkg/SmbiosMiscDxe: use UINT64 for BiosPhysicalSize Date: Wed, 30 Aug 2023 12:39:30 +0100 Message-ID: <20230830113930.9933-1-quic_llindhol@quicinc.com> MIME-Version: 1.0 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: kZp_LCvmGL28YSdLspgNNZbqsbtpAV9Y X-Proofpoint-GUID: kZp_LCvmGL28YSdLspgNNZbqsbtpAV9Y 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: qZeC9nDbSQ12zJKpW7QI9PZzx7686176AA= Content-Transfer-Encoding: 8bit Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=wOKsMDQG; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=quicinc.com (policy=none) 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 --- 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 (#108142): https://edk2.groups.io/g/devel/message/108142 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] -=-=-=-=-=-=-=-=-=-=-=-