[edk2-devel] [edk2-platforms][PATCH 1/2] SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs
Leif Lindholm
quic_llindhol at quicinc.com
Thu Sep 15 10:55:49 UTC 2022
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 at 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
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#93823): https://edk2.groups.io/g/devel/message/93823
Mute This Topic: https://groups.io/mt/93650265/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list