2 This driver parses the mSmbiosMiscDataTable structure and reports
3 any generated data using SMBIOS protocol.
5 Copyright (c) 2013-2015 Intel Corporation.
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 #include "CommonHeader.h"
21 #include "SmbiosMisc.h"
24 extern UINT8 SmbiosMiscStrings
[];
25 EFI_HANDLE mImageHandle
;
27 EFI_HII_HANDLE mHiiHandle
;
32 Standard EFI driver point. This driver parses the mSmbiosMiscDataTable
33 structure and reports any generated data using SMBIOS protocol.
35 @param ImageHandle Handle for the image of this driver
36 @param SystemTable Pointer to the EFI System Table
38 @retval EFI_SUCCESS The data was successfully stored.
44 IN EFI_HANDLE ImageHandle
,
45 IN EFI_SYSTEM_TABLE
*SystemTable
50 EFI_SMBIOS_PROTOCOL
*Smbios
;
53 mImageHandle
= ImageHandle
;
55 EfiStatus
= gBS
->LocateProtocol(&gEfiSmbiosProtocolGuid
, NULL
, (VOID
**)&Smbios
);
57 if (EFI_ERROR(EfiStatus
)) {
58 DEBUG((EFI_D_ERROR
, "Could not locate SMBIOS protocol. %r\n", EfiStatus
));
62 mHiiHandle
= HiiAddPackages (
68 ASSERT (mHiiHandle
!= NULL
);
70 for (Index
= 0; Index
< mSmbiosMiscDataTableEntries
; ++Index
) {
72 // If the entry have a function pointer, just log the data.
74 if (mSmbiosMiscDataTable
[Index
].Function
!= NULL
) {
75 EfiStatus
= (*mSmbiosMiscDataTable
[Index
].Function
)(
76 mSmbiosMiscDataTable
[Index
].RecordData
,
80 if (EFI_ERROR(EfiStatus
)) {
81 DEBUG((EFI_D_ERROR
, "Misc smbios store error. Index=%d, ReturnStatus=%r\n", Index
, EfiStatus
));