public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm" <quic_llindhol@quicinc.com>
To: Nhi Pham <nhi@os.amperecomputing.com>
Cc: <devel@edk2.groups.io>, <ardb+tianocore@kernel.org>,
	<sami.mujawar@arm.com>, <quic_rcran@quicinc.com>,
	<patches@amperecomputing.com>
Subject: Re: [edk2-platforms][PATCH 1/2] SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs
Date: Thu, 15 Sep 2022 11:55:49 +0100	[thread overview]
Message-ID: <YyMEtUkcrE8730+7@qc-i7.hemma.eciton.net> (raw)
In-Reply-To: <20220913061735.735632-2-nhi@os.amperecomputing.com>

On Tue, Sep 13, 2022 at 13:17:34 +0700, Nhi Pham wrote:
> This is to reflect the new APIs added to edk2/OemMiscLib library.
> 
> Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>

Matching my comment on OemMiscLibNull - could you use
PcdSystemBiosRelease and PcdEmbeddedControllerFirmwareRelease here?

/
    Leif

> ---
>  Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf |  3 ++
>  Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c   | 42 ++++++++++++++++++++
>  2 files changed, 45 insertions(+)
> 
> diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf
> index 04a07a55cee9..94e368e50a3c 100644
> --- a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf
> +++ b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf
> @@ -34,6 +34,9 @@ [LibraryClasses]
>    IoLib
>    PcdLib
>  
> +[Guids]
> +  gZeroGuid
> +
>  [Pcd]
>    gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress
>  
> diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> index 326bb56bcfa3..f14c18ef0874 100644
> --- a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> +++ b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> @@ -9,6 +9,7 @@
>  **/
>  
>  #include <Uefi.h>
> +#include <Guid/ZeroGuid.h>
>  #include <Library/BaseMemoryLib.h>
>  #include <Library/DebugLib.h>
>  #include <Library/FdtHelperLib.h>
> @@ -330,3 +331,44 @@ OemGetChassisNumPowerCords (
>  {
>    return 1;
>  }
> +
> +/**
> +  Fetches the system UUID.
> +
> +  @param[out] SystemUuid     The pointer to the buffer to store the System UUID.
> +
> +**/
> +VOID
> +EFIAPI
> +OemGetSystemUuid (
> +  OUT GUID  *SystemUuid
> +  )
> +{
> +  CopyGuid (SystemUuid, &gZeroGuid);
> +}
> +
> +/** Fetches the BIOS release.
> +
> +  @return The BIOS release.
> +**/
> +UINT16
> +EFIAPI
> +OemGetBiosRelease (
> +  VOID
> +  )
> +{
> +  return 0xFFFF;
> +}
> +
> +/** Fetches the embedded controller firmware release.
> +
> +  @return The embedded controller firmware release.
> +**/
> +UINT16
> +EFIAPI
> +OemGetEmbeddedControllerFirmwareRelease (
> +  VOID
> +  )
> +{
> +  return 0xFFFF;
> +}
> -- 
> 2.25.1
> 

  reply	other threads:[~2022-09-15 11:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-13  6:17 [edk2-platforms][PATCH 0/2] Update SbsaQemu/OemMiscLib Nhi Pham
2022-09-13  6:17 ` [edk2-platforms][PATCH 1/2] SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs Nhi Pham
2022-09-15 10:55   ` Leif Lindholm [this message]
2022-09-13  6:17 ` [edk2-platforms][PATCH 2/2] SbsaQemu/OemMiscLib: Fix typo of "AssetTagType02" Nhi Pham
2022-09-15 10:56   ` Leif Lindholm

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=YyMEtUkcrE8730+7@qc-i7.hemma.eciton.net \
    --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