public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, qing.huang@intel.com
Subject: Re: [edk2-devel] [PATCH v1] MdePkg/BaseCpuLibNull: Add stub function of StandardSignatureIsAuthenticAMD() in CpuLibNull instance
Date: Tue, 23 Jan 2024 14:56:50 +0100	[thread overview]
Message-ID: <7e6f85e2-6467-daf5-07db-4cb872b78ee7@redhat.com> (raw)
In-Reply-To: <20240123113649.712-1-qing.huang@intel.com>

On 1/23/24 12:36, Huang, Qing wrote:
> CpuLib.h exposes StandardSignatureIsAuthenticAMD() API and we require stub function in its BaseCpuLibNull library
> instance to avoid potential link issue.
> 
> Signed-off-by: Qing Huang <qing.huang@intel.com>
> ---
>  MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.c | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.c b/MdePkg/Library/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.
>  
> -  Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2020 - 2024, Intel Corporation. All rights reserved.<BR>
>    SPDX-License-Identifier: BSD-2-Clause-Patent
>  
>  **/
> @@ -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



-=-=-=-=-=-=-=-=-=-=-=-
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/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-01-23 13:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 11:36 [edk2-devel] [PATCH v1] MdePkg/BaseCpuLibNull: Add stub function of StandardSignatureIsAuthenticAMD() in CpuLibNull instance Huang, Qing
2024-01-23 13:56 ` Laszlo Ersek [this message]
2024-01-23 22:33   ` Michael D Kinney
2024-01-23 17:26 ` Michael D Kinney
2024-01-23 21:48   ` Michael D Kinney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e6f85e2-6467-daf5-07db-4cb872b78ee7@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox