2 This driver parses the mSmbiosMiscDataTable structure and reports
3 any generated data using SMBIOS protocol.
5 Copyright (c) 2013-2015 Intel Corporation.
7 SPDX-License-Identifier: BSD-2-Clause-Patent
13 #include "CommonHeader.h"
15 #include "SmbiosMisc.h"
18 extern UINT8 SmbiosMiscStrings
[];
19 EFI_HANDLE mImageHandle
;
21 EFI_HII_HANDLE mHiiHandle
;
26 Standard EFI driver point. This driver parses the mSmbiosMiscDataTable
27 structure and reports any generated data using SMBIOS protocol.
29 @param ImageHandle Handle for the image of this driver
30 @param SystemTable Pointer to the EFI System Table
32 @retval EFI_SUCCESS The data was successfully stored.
38 IN EFI_HANDLE ImageHandle
,
39 IN EFI_SYSTEM_TABLE
*SystemTable
44 EFI_SMBIOS_PROTOCOL
*Smbios
;
47 mImageHandle
= ImageHandle
;
49 EfiStatus
= gBS
->LocateProtocol(&gEfiSmbiosProtocolGuid
, NULL
, (VOID
**)&Smbios
);
51 if (EFI_ERROR(EfiStatus
)) {
52 DEBUG((EFI_D_ERROR
, "Could not locate SMBIOS protocol. %r\n", EfiStatus
));
56 mHiiHandle
= HiiAddPackages (
62 ASSERT (mHiiHandle
!= NULL
);
64 for (Index
= 0; Index
< mSmbiosMiscDataTableEntries
; ++Index
) {
66 // If the entry have a function pointer, just log the data.
68 if (mSmbiosMiscDataTable
[Index
].Function
!= NULL
) {
69 EfiStatus
= (*mSmbiosMiscDataTable
[Index
].Function
)(
70 mSmbiosMiscDataTable
[Index
].RecordData
,
74 if (EFI_ERROR(EfiStatus
)) {
75 DEBUG((EFI_D_ERROR
, "Misc smbios store error. Index=%d, ReturnStatus=%r\n", Index
, EfiStatus
));