public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-platforms][PATCH 0/2] Update SbsaQemu/OemMiscLib
@ 2022-09-13  6:17 Nhi Pham
  2022-09-13  6:17 ` [edk2-platforms][PATCH 1/2] SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs Nhi Pham
  2022-09-13  6:17 ` [edk2-platforms][PATCH 2/2] SbsaQemu/OemMiscLib: Fix typo of "AssetTagType02" Nhi Pham
  0 siblings, 2 replies; 5+ messages in thread
From: Nhi Pham @ 2022-09-13  6:17 UTC (permalink / raw)
  To: devel, quic_llindhol, ardb+tianocore, sami.mujawar, quic_rcran
  Cc: patches, Nhi Pham

This patchset is to update SbsaQemu/OemMiscLib to reflect the recent
changes in edk2/OemMiscLib.

Nhi Pham (2):
  SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs
  SbsaQemu/OemMiscLib: Fix typo of "AssetTagType02"

 Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf |  3 ++
 Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c   | 44 +++++++++++++++++++-
 2 files changed, 46 insertions(+), 1 deletion(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [edk2-platforms][PATCH 1/2] SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs
  2022-09-13  6:17 [edk2-platforms][PATCH 0/2] Update SbsaQemu/OemMiscLib Nhi Pham
@ 2022-09-13  6:17 ` Nhi Pham
  2022-09-15 10:55   ` Leif Lindholm
  2022-09-13  6:17 ` [edk2-platforms][PATCH 2/2] SbsaQemu/OemMiscLib: Fix typo of "AssetTagType02" Nhi Pham
  1 sibling, 1 reply; 5+ messages in thread
From: Nhi Pham @ 2022-09-13  6:17 UTC (permalink / raw)
  To: devel, quic_llindhol, ardb+tianocore, sami.mujawar, quic_rcran
  Cc: patches, Nhi Pham

This is to reflect the new APIs added to edk2/OemMiscLib library.

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [edk2-platforms][PATCH 2/2] SbsaQemu/OemMiscLib: Fix typo of "AssetTagType02"
  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-13  6:17 ` Nhi Pham
  2022-09-15 10:56   ` Leif Lindholm
  1 sibling, 1 reply; 5+ messages in thread
From: Nhi Pham @ 2022-09-13  6:17 UTC (permalink / raw)
  To: devel, quic_llindhol, ardb+tianocore, sami.mujawar, quic_rcran
  Cc: patches, Nhi Pham

This fixes the typo of AssetTagType02 according to the recent changes
from OemMiscLib.h in the edk2.

Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
---
 Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
index f14c18ef0874..a4b40bb8c6de 100644
--- a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
+++ b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
@@ -201,7 +201,7 @@ OemUpdateSmbiosInfo (
     case FamilyType01:
       String = (CHAR16*)PcdGetPtr (PcdSystemFamily);
       break;
-    case AssertTagType02:
+    case AssetTagType02:
       String = (CHAR16*)PcdGetPtr (PcdBaseBoardAssetTag);
       break;
     case SerialNumberType02:
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [edk2-platforms][PATCH 1/2] SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs
  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
  0 siblings, 0 replies; 5+ messages in thread
From: Leif Lindholm @ 2022-09-15 10:55 UTC (permalink / raw)
  To: Nhi Pham; +Cc: devel, ardb+tianocore, sami.mujawar, quic_rcran, patches

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
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-platforms][PATCH 2/2] SbsaQemu/OemMiscLib: Fix typo of "AssetTagType02"
  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
  0 siblings, 0 replies; 5+ messages in thread
From: Leif Lindholm @ 2022-09-15 10:56 UTC (permalink / raw)
  To: Nhi Pham; +Cc: devel, ardb+tianocore, sami.mujawar, quic_rcran, patches

On Tue, Sep 13, 2022 at 13:17:35 +0700, Nhi Pham wrote:
> This fixes the typo of AssetTagType02 according to the recent changes
> from OemMiscLib.h in the edk2.
> 
> Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>

Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>

> ---
>  Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> index f14c18ef0874..a4b40bb8c6de 100644
> --- a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> +++ b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> @@ -201,7 +201,7 @@ OemUpdateSmbiosInfo (
>      case FamilyType01:
>        String = (CHAR16*)PcdGetPtr (PcdSystemFamily);
>        break;
> -    case AssertTagType02:
> +    case AssetTagType02:
>        String = (CHAR16*)PcdGetPtr (PcdBaseBoardAssetTag);
>        break;
>      case SerialNumberType02:
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-15 11:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox