mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 07:04:28 +02:00
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 <nhi@os.amperecomputing.com> Reviewed-by: Rebecca Cran <rebecca@quicinc.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
This commit is contained in:
parent
11b5093ce4
commit
130b649a8b
@ -235,4 +235,16 @@ OemGetChassisNumPowerCords (
|
|||||||
VOID
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Fetches the system UUID.
|
||||||
|
|
||||||
|
@param[out] SystemUuid The pointer to the buffer to store the System UUID.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
OemGetSystemUuid (
|
||||||
|
OUT GUID *SystemUuid
|
||||||
|
);
|
||||||
|
|
||||||
#endif // OEM_MISC_LIB_H_
|
#endif // OEM_MISC_LIB_H_
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
* OemMiscLib.c
|
* OemMiscLib.c
|
||||||
*
|
*
|
||||||
|
* Copyright (c) 2022, Ampere Computing LLC. All rights reserved.
|
||||||
* Copyright (c) 2021, NUVIA Inc. All rights reserved.
|
* Copyright (c) 2021, NUVIA Inc. All rights reserved.
|
||||||
* Copyright (c) 2018, Hisilicon Limited. All rights reserved.
|
* Copyright (c) 2018, Hisilicon Limited. All rights reserved.
|
||||||
* Copyright (c) 2018, Linaro Limited. All rights reserved.
|
* Copyright (c) 2018, Linaro Limited. All rights reserved.
|
||||||
@ -10,6 +11,7 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
#include <Uefi.h>
|
#include <Uefi.h>
|
||||||
|
#include <Guid/ZeroGuid.h>
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/HiiLib.h>
|
#include <Library/HiiLib.h>
|
||||||
@ -236,3 +238,19 @@ OemGetChassisNumPowerCords (
|
|||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
return 1;
|
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);
|
||||||
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#/** @file
|
#/** @file
|
||||||
# OemMiscLib.inf
|
# OemMiscLib.inf
|
||||||
#
|
#
|
||||||
|
# Copyright (c) 2022, Ampere Computing LLC. All rights reserved.
|
||||||
# Copyright (c) 2021, NUVIA Inc. All rights reserved.
|
# Copyright (c) 2021, NUVIA Inc. All rights reserved.
|
||||||
# Copyright (c) 2018, Hisilicon Limited. All rights reserved.
|
# Copyright (c) 2018, Hisilicon Limited. All rights reserved.
|
||||||
# Copyright (c) 2018, Linaro Limited. All rights reserved.
|
# Copyright (c) 2018, Linaro Limited. All rights reserved.
|
||||||
@ -29,3 +30,6 @@
|
|||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
BaseMemoryLib
|
BaseMemoryLib
|
||||||
DebugLib
|
DebugLib
|
||||||
|
|
||||||
|
[Guids]
|
||||||
|
gZeroGuid
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
Based on files under Nt32Pkg/MiscSubClassPlatformDxe/
|
Based on files under Nt32Pkg/MiscSubClassPlatformDxe/
|
||||||
|
|
||||||
|
Copyright (c) 2022, Ampere Computing LLC. All rights reserved.<BR>
|
||||||
Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>
|
Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>
|
||||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||||
Copyright (c) 2015, Hisilicon Limited. All rights reserved.<BR>
|
Copyright (c) 2015, Hisilicon Limited. All rights reserved.<BR>
|
||||||
@ -160,7 +161,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscSystemManufacturer) {
|
|||||||
|
|
||||||
SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE1);
|
SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE1);
|
||||||
|
|
||||||
CopyGuid (&SmbiosRecord->Uuid, &InputData->Uuid);
|
OemGetSystemUuid (&SmbiosRecord->Uuid);
|
||||||
|
|
||||||
OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1);
|
OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1);
|
||||||
UnicodeStrToAsciiStrS (Manufacturer, OptionalStrStart, ManuStrLen + 1);
|
UnicodeStrToAsciiStrS (Manufacturer, OptionalStrStart, ManuStrLen + 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user