From 130b649a8b5fdd8ed8f88816eae7ca38c6e7dfc4 Mon Sep 17 00:00:00 2001 From: Nhi Pham Date: Mon, 19 Sep 2022 09:19:47 +0700 Subject: ArmPkg/SmbiosMiscDxe: Support fetching System UUID This adds an API to OemMiscLib for fetching the system UUID according to the platform. Signed-off-by: Nhi Pham Reviewed-by: Rebecca Cran Reviewed-by: Sami Mujawar Acked-by: Ard Biesheuvel Acked-by: Leif Lindholm --- ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c | 18 ++++++++++++++++++ .../Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf | 4 ++++ .../Type01/MiscSystemManufacturerFunction.c | 3 ++- 3 files changed, 24 insertions(+), 1 deletion(-) (limited to 'ArmPkg/Universal') diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c index 98970407a6..32f6d55c1a 100644 --- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c +++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c @@ -1,6 +1,7 @@ /** @file * OemMiscLib.c * +* Copyright (c) 2022, Ampere Computing LLC. All rights reserved. * Copyright (c) 2021, NUVIA Inc. All rights reserved. * Copyright (c) 2018, Hisilicon Limited. All rights reserved. * Copyright (c) 2018, Linaro Limited. All rights reserved. @@ -10,6 +11,7 @@ **/ #include +#include #include #include #include @@ -236,3 +238,19 @@ OemGetChassisNumPowerCords ( ASSERT (FALSE); 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 + ) +{ + ASSERT (FALSE); + CopyGuid (SystemUuid, &gZeroGuid); +} diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf index 5c4268f68b..8653f57720 100644 --- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf +++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf @@ -1,6 +1,7 @@ #/** @file # OemMiscLib.inf # +# Copyright (c) 2022, Ampere Computing LLC. All rights reserved. # Copyright (c) 2021, NUVIA Inc. All rights reserved. # Copyright (c) 2018, Hisilicon Limited. All rights reserved. # Copyright (c) 2018, Linaro Limited. All rights reserved. @@ -29,3 +30,6 @@ [LibraryClasses] BaseMemoryLib DebugLib + +[Guids] + gZeroGuid diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c index 5cf72644d0..22fb5eccaa 100644 --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c @@ -4,6 +4,7 @@ Based on files under Nt32Pkg/MiscSubClassPlatformDxe/ + Copyright (c) 2022, Ampere Computing LLC. All rights reserved.
Copyright (c) 2021, NUVIA Inc. All rights reserved.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
Copyright (c) 2015, Hisilicon Limited. All rights reserved.
@@ -160,7 +161,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscSystemManufacturer) { SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE1); - CopyGuid (&SmbiosRecord->Uuid, &InputData->Uuid); + OemGetSystemUuid (&SmbiosRecord->Uuid); OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1); UnicodeStrToAsciiStrS (Manufacturer, OptionalStrStart, ManuStrLen + 1); -- cgit