From nobody Mon Sep 16 19:02:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+101530+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+101530+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1679448653; cv=none; d=zohomail.com; s=zohoarc; b=CopJnF2b3SwjauGZWLM/Tykkv4QuZqlt4qkfwgFxjSK3fDeZMMrB8YDHv7TqJsPSFVFDy9xBD9MtwOokdTtjY6Pt86DLJJ9rxG7lmbPYUtxotGWp0e6kxNld1q7jPxc4X4zPMlnBoe2NfwkjZSxbbaCcAlfkVyyKJO1n1XSi/nY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1679448653; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=BN1ALcvH8qGDWhYh3OAyDTs/I45ObfNxcpOqqzSMwdU=; b=kV4A65Vc4qZljc8B7/jt9yBm85vwfmPUBIYjTksHYjIkz4d8ocVC+YWTikrR5685B4J9WmxFtKTmCoo2QmCnC4zmLsjV3EdWTwSyQS7ljIMj/z5WDBfL90vKKvELGNHc1sm099r8g73kF67kfMfkJFYevuETTouhmooGdCBd7m8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+101530+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1679448653555899.1897465631257; Tue, 21 Mar 2023 18:30:53 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ZLFaYY1788612x15qf057hif; Tue, 21 Mar 2023 18:30:53 -0700 X-Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mx.groups.io with SMTP id smtpd.web11.32425.1679448652528870167 for ; Tue, 21 Mar 2023 18:30:52 -0700 X-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D97985C00BB; Tue, 21 Mar 2023 21:30:51 -0400 (EDT) X-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 21 Mar 2023 21:30:51 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeguddgfeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 Mar 2023 21:30:50 -0400 (EDT) From: "Rebecca Cran" To: devel@edk2.groups.io, Michael D Kinney , Liming Gao , Zhiguang Liu , Bob Feng , Yuwei Chen , Andrew Fish , Leif Lindholm , Ard Biesheuvel , Jordan Justen , Gerd Hoffmann Cc: Rebecca Cran Subject: [edk2-devel] [PATCH 1/9] OvmfPkg: Replace static struct initialization with ZeroMem call Date: Tue, 21 Mar 2023 19:30:32 -0600 Message-Id: <20230322013040.3322865-2-rebecca@bsdio.com> In-Reply-To: <20230322013040.3322865-1-rebecca@bsdio.com> References: <20230322013040.3322865-1-rebecca@bsdio.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,rebecca@bsdio.com X-Gm-Message-State: 4CxY4isxy3zKqJ3lRaGul6hMx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1679448653; bh=MR6TFt12GBX4rclQytU6xS844xL8cux4O3YffAJfwqc=; h=Cc:Date:From:Reply-To:Subject:To; b=dVgEDHjGxQ2JgN2KxwxG2Elnjf3tzoz65JXFjG7y6MjdIDJBEcTssuHgLgl+i4U9HN8 MuXLv1KZT3J/e69UbAltKy0Zhu7WYuH81+gPEXQP+m65Vt7R6at6SJwzy8JQhmpyshzgu LN0EREC5U5Ty8WbMBUHJD8dZeY7dsqnxkKw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1679448654545100002 Content-Type: text/plain; charset="utf-8" Replace the static struct initialization with a call to ZeroMem to avoid generating a call to memset in certain build configurations. Signed-off-by: Rebecca Cran Reviewed-by: Gerd Hoffmann --- OvmfPkg/Library/PlatformInitLib/MemDetect.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/= PlatformInitLib/MemDetect.c index 38cece9173e8..0bcdfb83721f 100644 --- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c +++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c @@ -608,10 +608,12 @@ PlatformAddressWidthFromCpuid ( { UINT32 RegEax, RegEbx, RegEcx, RegEdx, Max; UINT8 PhysBits; - CHAR8 Signature[13] =3D { 0 }; + CHAR8 Signature[13]; BOOLEAN Valid =3D FALSE; BOOLEAN Page1GSupport =3D FALSE; =20 + ZeroMem (Signature, sizeof (Signature)); + AsmCpuid (0x80000000, &RegEax, &RegEbx, &RegEcx, &RegEdx); *(UINT32 *)(Signature + 0) =3D RegEbx; *(UINT32 *)(Signature + 4) =3D RegEdx; --=20 2.34.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#101530): https://edk2.groups.io/g/devel/message/101530 Mute This Topic: https://groups.io/mt/97769542/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-