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 9A95F740047 for ; Tue, 23 Jan 2024 13:56:57 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=cY8G7tMbEt09IiJ1eDQM66gGLm3D0BPrYFzjCfcgC0A=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1706018216; v=1; b=fxfjyXhxkZC4owu5wcjb/kfAwiELSEGo3hIJNw8TnWO7WmWDexUIhPFtsvwQuUnIU33CpGt9 FE2SW8UhA8Q443LswBzXXynCbtMLDgA0arf3ruG9UEXfBoMFpQcmiZxBwuCM8t2Vh7fBZMVl4cG rqnjezy+hr1pSLOBgDC1XY7I= X-Received: by 127.0.0.2 with SMTP id A30EYY7687511xmdUZRQ3axP; Tue, 23 Jan 2024 05:56:56 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.12883.1706018215687582337 for ; Tue, 23 Jan 2024 05:56:55 -0800 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-677-Xzy6n4p4MsqM6FwDa8nQhg-1; Tue, 23 Jan 2024 08:56:51 -0500 X-MC-Unique: Xzy6n4p4MsqM6FwDa8nQhg-1 X-Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8F76C38562CB; Tue, 23 Jan 2024 13:56:51 +0000 (UTC) X-Received: from [10.39.194.212] (unknown [10.39.194.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1C21040C106C; Tue, 23 Jan 2024 13:56:50 +0000 (UTC) Message-ID: <7e6f85e2-6467-daf5-07db-4cb872b78ee7@redhat.com> Date: Tue, 23 Jan 2024 14:56:50 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v1] MdePkg/BaseCpuLibNull: Add stub function of StandardSignatureIsAuthenticAMD() in CpuLibNull instance To: devel@edk2.groups.io, qing.huang@intel.com References: <20240123113649.712-1-qing.huang@intel.com> From: "Laszlo Ersek" In-Reply-To: <20240123113649.712-1-qing.huang@intel.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 89LwwfBD0Vr3D4JhtLUJtaqpx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=fxfjyXhx; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.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 1/23/24 12:36, Huang, Qing wrote: > CpuLib.h exposes StandardSignatureIsAuthenticAMD() API and we require stu= b function in its BaseCpuLibNull library > instance to avoid potential link issue. >=20 > Signed-off-by: Qing Huang > --- > MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.c | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) >=20 > diff --git a/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.c b/MdePkg/Libr= ary/BaseCpuLibNull/BaseCpuLibNull.c > index 3ba7a35096..ba7981551d 100644 > --- a/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.c > +++ b/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.c > @@ -1,7 +1,7 @@ > /** @file > Null instance of CPU Library. > =20 > - Copyright (c) 2020, Intel Corporation. All rights reserved.
> + Copyright (c) 2020 - 2024, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent > =20 > **/ > @@ -35,3 +35,18 @@ CpuFlushTlb ( > ) > { > } > + > +/** > + Determine if the standard CPU signature is "AuthenticAMD". > + > + @retval TRUE The CPU signature matches. > + @retval FALSE The CPU signature does not match. > +**/ > +BOOLEAN > +EFIAPI > +StandardSignatureIsAuthenticAMD ( > + VOID > + ) > +{ > + return FALSE; > +} (1) Could we complete the Null instance with all the missing functions, in one go? Such as: InitializeFloatingPointUnits, StandardSignatureIsAuthenticAMD, GetCpuFamilyModel, GetCpuSteppingId? (2) All four of the mentioned APIs are only declared for IA32 and X64, by the lib class header. Therefore their stub implementations, including that of StandardSignatureIsAuthenticAMD(), should be restricted to IA32 and X64 too. Thanks Laszlo -=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 (#114197): https://edk2.groups.io/g/devel/message/114197 Mute This Topic: https://groups.io/mt/103907626/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-