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 71AD8AC12C1 for ; Wed, 24 Jan 2024 13:00:07 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=d5b1JiTDJHMdLZ0Alcgaz7hT9IE078ytLM5VtRtwMqc=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc: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=1706101206; v=1; b=G4RiAPVok6R3CdLpOS1LxrIAuF1cpv83RoaxeQ+lzjniL6obBOVCAUwP3FhBVaJgv36k/AY6 GhgUbINImNKaQNES32bUNulxBZG6SpXEbXTNAacE7hQeqshWV79RnjuLydodfwoQivMf60h7wvr AWslWJmnLJ58UkoCS+cBcFSM= X-Received: by 127.0.0.2 with SMTP id rQOGYY7687511xb48piIw1P0; Wed, 24 Jan 2024 05:00:06 -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.web10.21676.1706101205502254506 for ; Wed, 24 Jan 2024 05:00:05 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-551-OsAATfpHOXa2NC2ruvL3gA-1; Wed, 24 Jan 2024 07:59:59 -0500 X-MC-Unique: OsAATfpHOXa2NC2ruvL3gA-1 X-Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 043C2185A783; Wed, 24 Jan 2024 12:59:59 +0000 (UTC) X-Received: from [10.39.195.127] (unknown [10.39.195.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A82F6200A7B4; Wed, 24 Jan 2024 12:59:56 +0000 (UTC) Message-ID: Date: Wed, 24 Jan 2024 13:59:55 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [Patch 1/1] MdePkg/Library/BaseCpuLibNull: Add missing X86 specific services To: Michael D Kinney , devel@edk2.groups.io Cc: Liming Gao , Zhiguang Liu , Qing Huang References: <20240123225236.618-1-michael.d.kinney@intel.com> From: "Laszlo Ersek" In-Reply-To: <20240123225236.618-1-michael.d.kinney@intel.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 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: fOu0AdEa2UVvGojvmnylBzAjx7686176AA= 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=G4RiAPVo; 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 23:52, Michael D Kinney wrote: > * Add InitializeFloatingPointUnits() to x86 specific file > * Add GetCpuFamilyModel() to x86 specific file > * Add GetCpuSteppingId() to x86 specific file > * Move StandardSignatureIsAuthenticAMD() to x86 specific file. > * Add CpuLib library class include to all C files. >=20 > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Laszlo Ersek > Cc: Qing Huang > Signed-off-by: Michael D Kinney > --- > .../Library/BaseCpuLibNull/BaseCpuLibNull.c | 17 +---- > .../Library/BaseCpuLibNull/BaseCpuLibNull.inf | 3 + > .../BaseCpuLibNull/X86BaseCpuLibNull.c | 64 +++++++++++++++++++ > 3 files changed, 69 insertions(+), 15 deletions(-) > create mode 100644 MdePkg/Library/BaseCpuLibNull/X86BaseCpuLibNull.c >=20 > diff --git a/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.c b/MdePkg/Libr= ary/BaseCpuLibNull/BaseCpuLibNull.c > index 3542cf6921f7..0080022b94ef 100644 > --- a/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.c > +++ b/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.c > @@ -6,6 +6,8 @@ > =20 > **/ > =20 > +#include > + > /** > Places the CPU in a sleep state until an interrupt is received. > =20 > @@ -35,18 +37,3 @@ 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; > -} > diff --git a/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.inf b/MdePkg/Li= brary/BaseCpuLibNull/BaseCpuLibNull.inf > index a9e8399038a6..9f20d6833f56 100644 > --- a/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.inf > +++ b/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.inf > @@ -22,5 +22,8 @@ [Defines] > [Sources] > BaseCpuLibNull.c > =20 > +[Sources.IA32, Sources.X64] > + X86BaseCpuLibNull.c > + > [Packages] > MdePkg/MdePkg.dec > diff --git a/MdePkg/Library/BaseCpuLibNull/X86BaseCpuLibNull.c b/MdePkg/L= ibrary/BaseCpuLibNull/X86BaseCpuLibNull.c > new file mode 100644 > index 000000000000..4469bcc767cf > --- /dev/null > +++ b/MdePkg/Library/BaseCpuLibNull/X86BaseCpuLibNull.c > @@ -0,0 +1,64 @@ > +/** @file > + Null instance of CPU Library for IA32/X64 specific services. > + > + Copyright (c) 2024, Intel Corporation. All rights reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include > + > +/** > + Initializes floating point units for requirement of UEFI specification= . > + This function initializes floating-point control word to 0x027F (all e= xceptions > + masked,double-precision, round-to-nearest) and multimedia-extensions c= ontrol word > + (if supported) to 0x1F80 (all exceptions masked, round-to-nearest, flu= sh to zero > + for masked underflow). > +**/ > +VOID > +EFIAPI > +InitializeFloatingPointUnits ( > + VOID > + ) > +{ > +} > + > +/** > + 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; > +} > + > +/** > + Return the 32bit CPU family and model value. > + @return CPUID[01h].EAX with Processor Type and Stepping ID cleared. > +**/ > +UINT32 > +EFIAPI > +GetCpuFamilyModel ( > + VOID > + ) > +{ > + return 0; > +} > + > +/** > + Return the CPU stepping ID. > + @return CPU stepping ID value in CPUID[01h].EAX. > +**/ > +UINT8 > +EFIAPI > +GetCpuSteppingId ( > + VOID > + ) > +{ > + return 0; > +} Reviewed-by: Laszlo Ersek -=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 (#114290): https://edk2.groups.io/g/devel/message/114290 Mute This Topic: https://groups.io/mt/103921248/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-