public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-platforms][PATCH v2 0/2] Update SbsaQemu/OemMiscLib
@ 2022-09-19  2:19 Nhi Pham
  2022-09-19  2:19 ` [edk2-platforms][PATCH v2 1/2] SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs Nhi Pham
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Nhi Pham @ 2022-09-19  2:19 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.

Changes since v1:
    + Update OemGetBiosRelease and
    OemGetEmbeddedControllerFirmwareRelease functions [Leif, Sami]

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

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

-- 
2.25.1


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

* [edk2-platforms][PATCH v2 1/2] SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs
  2022-09-19  2:19 [edk2-platforms][PATCH v2 0/2] Update SbsaQemu/OemMiscLib Nhi Pham
@ 2022-09-19  2:19 ` Nhi Pham
  2022-09-21 15:02   ` Sami Mujawar
  2022-09-19  2:19 ` [edk2-platforms][PATCH v2 2/2] SbsaQemu/OemMiscLib: Fix typo of "AssetTagType02" Nhi Pham
  2022-09-23 10:19 ` [edk2-platforms][PATCH v2 0/2] Update SbsaQemu/OemMiscLib Sami Mujawar
  2 siblings, 1 reply; 8+ messages in thread
From: Nhi Pham @ 2022-09-19  2:19 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 |  5 +++
 Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c   | 42 ++++++++++++++++++++
 2 files changed, 47 insertions(+)

diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf
index 04a07a55cee9..a34f54d431d4 100644
--- a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf
+++ b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf
@@ -34,7 +34,12 @@ [LibraryClasses]
   IoLib
   PcdLib
 
+[Guids]
+  gZeroGuid
+
 [Pcd]
+  gArmTokenSpaceGuid.PcdEmbeddedControllerFirmwareRelease
+  gArmTokenSpaceGuid.PcdSystemBiosRelease
   gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress
 
   gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdSystemManufacturer
diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
index 326bb56bcfa3..3ccf22bf282d 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 PcdGet16 (PcdSystemBiosRelease);
+}
+
+/** Fetches the embedded controller firmware release.
+
+  @return The embedded controller firmware release.
+**/
+UINT16
+EFIAPI
+OemGetEmbeddedControllerFirmwareRelease (
+  VOID
+  )
+{
+  return PcdGet16 (PcdEmbeddedControllerFirmwareRelease);
+}
-- 
2.25.1


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

* [edk2-platforms][PATCH v2 2/2] SbsaQemu/OemMiscLib: Fix typo of "AssetTagType02"
  2022-09-19  2:19 [edk2-platforms][PATCH v2 0/2] Update SbsaQemu/OemMiscLib Nhi Pham
  2022-09-19  2:19 ` [edk2-platforms][PATCH v2 1/2] SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs Nhi Pham
@ 2022-09-19  2:19 ` Nhi Pham
  2022-09-21 14:46   ` Sami Mujawar
  2022-09-23 10:19 ` [edk2-platforms][PATCH v2 0/2] Update SbsaQemu/OemMiscLib Sami Mujawar
  2 siblings, 1 reply; 8+ messages in thread
From: Nhi Pham @ 2022-09-19  2:19 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>
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 3ccf22bf282d..c38f2851904f 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] 8+ messages in thread

* Re: [edk2-platforms][PATCH v2 2/2] SbsaQemu/OemMiscLib: Fix typo of "AssetTagType02"
  2022-09-19  2:19 ` [edk2-platforms][PATCH v2 2/2] SbsaQemu/OemMiscLib: Fix typo of "AssetTagType02" Nhi Pham
@ 2022-09-21 14:46   ` Sami Mujawar
  0 siblings, 0 replies; 8+ messages in thread
From: Sami Mujawar @ 2022-09-21 14:46 UTC (permalink / raw)
  To: Nhi Pham, devel, quic_llindhol, ardb+tianocore, quic_rcran
  Cc: patches, nd@arm.com

Hi Nhi,

Thank you for this patch.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

On 19/09/2022 03:19 am, 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 3ccf22bf282d..c38f2851904f 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:

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

* Re: [edk2-platforms][PATCH v2 1/2] SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs
  2022-09-19  2:19 ` [edk2-platforms][PATCH v2 1/2] SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs Nhi Pham
@ 2022-09-21 15:02   ` Sami Mujawar
  0 siblings, 0 replies; 8+ messages in thread
From: Sami Mujawar @ 2022-09-21 15:02 UTC (permalink / raw)
  To: Nhi Pham, devel, quic_llindhol, ardb+tianocore, quic_rcran
  Cc: patches, nd@arm.com

Hi Nhi,

Thank you for this patch.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

On 19/09/2022 03:19 am, Nhi Pham wrote:
> 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 |  5 +++
>   Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c   | 42 ++++++++++++++++++++
>   2 files changed, 47 insertions(+)
>
> diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf
> index 04a07a55cee9..a34f54d431d4 100644
> --- a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf
> +++ b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf
> @@ -34,7 +34,12 @@ [LibraryClasses]
>     IoLib
>     PcdLib
>   
> +[Guids]
> +  gZeroGuid
> +
>   [Pcd]
> +  gArmTokenSpaceGuid.PcdEmbeddedControllerFirmwareRelease
> +  gArmTokenSpaceGuid.PcdSystemBiosRelease
>     gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress
>   
>     gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdSystemManufacturer
> diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> index 326bb56bcfa3..3ccf22bf282d 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 PcdGet16 (PcdSystemBiosRelease);
> +}
> +
> +/** Fetches the embedded controller firmware release.
> +
> +  @return The embedded controller firmware release.
> +**/
> +UINT16
> +EFIAPI
> +OemGetEmbeddedControllerFirmwareRelease (
> +  VOID
> +  )
> +{
> +  return PcdGet16 (PcdEmbeddedControllerFirmwareRelease);
> +}

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

* Re: [edk2-platforms][PATCH v2 0/2] Update SbsaQemu/OemMiscLib
  2022-09-19  2:19 [edk2-platforms][PATCH v2 0/2] Update SbsaQemu/OemMiscLib Nhi Pham
  2022-09-19  2:19 ` [edk2-platforms][PATCH v2 1/2] SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs Nhi Pham
  2022-09-19  2:19 ` [edk2-platforms][PATCH v2 2/2] SbsaQemu/OemMiscLib: Fix typo of "AssetTagType02" Nhi Pham
@ 2022-09-23 10:19 ` Sami Mujawar
  2022-09-23 10:20   ` [edk2-devel] " Ard Biesheuvel
  2 siblings, 1 reply; 8+ messages in thread
From: Sami Mujawar @ 2022-09-23 10:19 UTC (permalink / raw)
  To: Nhi Pham, devel, quic_llindhol, ardb+tianocore, quic_rcran
  Cc: patches, nd@arm.com

Hi Ard, Leif,

This patch series and the corresponding edk2 series at 
https://edk2.groups.io/g/devel/message/93926 looks good to me and I have 
tested these with SbsaQemu as well.

I already have a pull request for the edk2 series at 
https://github.com/tianocore/edk2/pull/3391 and am planning to merge it 
soon.

Can you let me know if I can merge this edk2-platform series as well, 
please?

Regards,

Sami Mujawar

On 19/09/2022 03:19 am, Nhi Pham wrote:
> This patchset is to update SbsaQemu/OemMiscLib to reflect the recent
> changes in edk2/OemMiscLib.
>
> Changes since v1:
>      + Update OemGetBiosRelease and
>      OemGetEmbeddedControllerFirmwareRelease functions [Leif, Sami]
>
> Nhi Pham (2):
>    SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs
>    SbsaQemu/OemMiscLib: Fix typo of "AssetTagType02"
>
>   Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf |  5 +++
>   Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c   | 44 +++++++++++++++++++-
>   2 files changed, 48 insertions(+), 1 deletion(-)
>

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

* Re: [edk2-devel] [edk2-platforms][PATCH v2 0/2] Update SbsaQemu/OemMiscLib
  2022-09-23 10:19 ` [edk2-platforms][PATCH v2 0/2] Update SbsaQemu/OemMiscLib Sami Mujawar
@ 2022-09-23 10:20   ` Ard Biesheuvel
  2022-09-23 14:47     ` Sami Mujawar
  0 siblings, 1 reply; 8+ messages in thread
From: Ard Biesheuvel @ 2022-09-23 10:20 UTC (permalink / raw)
  To: devel, sami.mujawar
  Cc: Nhi Pham, quic_llindhol, ardb+tianocore, quic_rcran, patches,
	nd@arm.com

On Fri, 23 Sept 2022 at 12:19, Sami Mujawar <sami.mujawar@arm.com> wrote:
>
> Hi Ard, Leif,
>
> This patch series and the corresponding edk2 series at
> https://edk2.groups.io/g/devel/message/93926 looks good to me and I have
> tested these with SbsaQemu as well.
>
> I already have a pull request for the edk2 series at
> https://github.com/tianocore/edk2/pull/3391 and am planning to merge it
> soon.
>
> Can you let me know if I can merge this edk2-platform series as well,
> please?
>

Yes, please go ahead whenever you feel is appropriate.

Thanks,
Ard.


> On 19/09/2022 03:19 am, Nhi Pham wrote:
> > This patchset is to update SbsaQemu/OemMiscLib to reflect the recent
> > changes in edk2/OemMiscLib.
> >
> > Changes since v1:
> >      + Update OemGetBiosRelease and
> >      OemGetEmbeddedControllerFirmwareRelease functions [Leif, Sami]
> >
> > Nhi Pham (2):
> >    SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs
> >    SbsaQemu/OemMiscLib: Fix typo of "AssetTagType02"
> >
> >   Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf |  5 +++
> >   Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c   | 44 +++++++++++++++++++-
> >   2 files changed, 48 insertions(+), 1 deletion(-)
> >
>
>
> 
>
>

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

* Re: [edk2-devel] [edk2-platforms][PATCH v2 0/2] Update SbsaQemu/OemMiscLib
  2022-09-23 10:20   ` [edk2-devel] " Ard Biesheuvel
@ 2022-09-23 14:47     ` Sami Mujawar
  0 siblings, 0 replies; 8+ messages in thread
From: Sami Mujawar @ 2022-09-23 14:47 UTC (permalink / raw)
  To: Ard Biesheuvel, devel
  Cc: Nhi Pham, quic_llindhol, ardb+tianocore, quic_rcran, patches,
	nd@arm.com

Merged as e55f0527dde4..727e458d6387

Thanks,

Regards,

Sami Mujawar

On 23/09/2022 11:20 am, Ard Biesheuvel wrote:
> On Fri, 23 Sept 2022 at 12:19, Sami Mujawar <sami.mujawar@arm.com> wrote:
>> Hi Ard, Leif,
>>
>> This patch series and the corresponding edk2 series at
>> https://edk2.groups.io/g/devel/message/93926 looks good to me and I have
>> tested these with SbsaQemu as well.
>>
>> I already have a pull request for the edk2 series at
>> https://github.com/tianocore/edk2/pull/3391 and am planning to merge it
>> soon.
>>
>> Can you let me know if I can merge this edk2-platform series as well,
>> please?
>>
> Yes, please go ahead whenever you feel is appropriate.
>
> Thanks,
> Ard.
>
>
>> On 19/09/2022 03:19 am, Nhi Pham wrote:
>>> This patchset is to update SbsaQemu/OemMiscLib to reflect the recent
>>> changes in edk2/OemMiscLib.
>>>
>>> Changes since v1:
>>>       + Update OemGetBiosRelease and
>>>       OemGetEmbeddedControllerFirmwareRelease functions [Leif, Sami]
>>>
>>> Nhi Pham (2):
>>>     SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs
>>>     SbsaQemu/OemMiscLib: Fix typo of "AssetTagType02"
>>>
>>>    Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf |  5 +++
>>>    Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c   | 44 +++++++++++++++++++-
>>>    2 files changed, 48 insertions(+), 1 deletion(-)
>>>
>>
>> 
>>
>>

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

end of thread, other threads:[~2022-09-23 14:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-19  2:19 [edk2-platforms][PATCH v2 0/2] Update SbsaQemu/OemMiscLib Nhi Pham
2022-09-19  2:19 ` [edk2-platforms][PATCH v2 1/2] SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs Nhi Pham
2022-09-21 15:02   ` Sami Mujawar
2022-09-19  2:19 ` [edk2-platforms][PATCH v2 2/2] SbsaQemu/OemMiscLib: Fix typo of "AssetTagType02" Nhi Pham
2022-09-21 14:46   ` Sami Mujawar
2022-09-23 10:19 ` [edk2-platforms][PATCH v2 0/2] Update SbsaQemu/OemMiscLib Sami Mujawar
2022-09-23 10:20   ` [edk2-devel] " Ard Biesheuvel
2022-09-23 14:47     ` Sami Mujawar

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