3 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
12 Header file for MiscSubclass Driver.
16 #ifndef _MISC_SUBCLASS_DRIVER_H
17 #define _MISC_SUBCLASS_DRIVER_H
19 #include <FrameworkDxe.h>
21 #include <Guid/DataHubRecords.h>
22 #include <IndustryStandard/SmBios.h>
23 #include <Protocol/Smbios.h>
24 #include <Protocol/EmuIoThunk.h>
26 #include <Library/BaseLib.h>
27 #include <Library/DebugLib.h>
28 #include <Library/HiiLib.h>
29 #include <Library/UefiLib.h>
30 #include <Library/UefiDriverEntryPoint.h>
31 #include <Library/BaseMemoryLib.h>
32 #include <Library/MemoryAllocationLib.h>
33 #include <Library/UefiBootServicesTableLib.h>
34 #include <Library/DevicePathLib.h>
35 #include <Library/PcdLib.h>
38 #include <MiscDevicePath.h>
39 #include <Protocol/FrameworkHii.h>
40 #include <Library/HiiLib.h>
43 // Data table entry update function.
45 typedef EFI_STATUS (EFIAPI EFI_MISC_SMBIOS_DATA_FUNCTION
) (
47 IN EFI_SMBIOS_PROTOCOL
*Smbios
51 // Data table entry definition.
55 // intermediat input data for SMBIOS record
58 EFI_MISC_SMBIOS_DATA_FUNCTION
*Function
;
59 } EFI_MISC_SMBIOS_DATA_TABLE
;
62 // Data Table extern definitions.
64 #define MISC_SMBIOS_TABLE_EXTERNS(NAME1, NAME2, NAME3) \
65 extern NAME1 NAME2 ## Data; \
66 extern EFI_MISC_SMBIOS_DATA_FUNCTION NAME3 ## Function
72 #define MISC_SMBIOS_TABLE_ENTRY_DATA_AND_FUNCTION(NAME1, NAME2) \
79 // Global definition macros.
81 #define MISC_SMBIOS_TABLE_DATA(NAME1, NAME2) \
84 #define MISC_SMBIOS_TABLE_FUNCTION(NAME2) \
85 EFI_STATUS EFIAPI NAME2 ## Function( \
86 IN VOID *RecordData, \
87 IN EFI_SMBIOS_PROTOCOL *Smbios \
94 extern EFI_MISC_SMBIOS_DATA_TABLE mMiscSubclassDataTable
[];
97 // Data Table Array Entries
99 extern UINTN mMiscSubclassDataTableEntries
;
100 extern UINT8 MiscSubclassStrings
[];
101 extern EFI_HII_HANDLE mHiiHandle
;
104 Add an SMBIOS record.
106 @param Smbios The EFI_SMBIOS_PROTOCOL instance.
107 @param SmbiosHandle A unique handle will be assigned to the SMBIOS record.
108 @param Record The data for the fixed portion of the SMBIOS record. The format of the record is
109 determined by EFI_SMBIOS_TABLE_HEADER.Type. The size of the formatted area is defined
110 by EFI_SMBIOS_TABLE_HEADER.Length and either followed by a double-null (0x0000) or
111 a set of null terminated strings and a null.
113 @retval EFI_SUCCESS Record was added.
114 @retval EFI_OUT_OF_RESOURCES Record was not added due to lack of system resources.
119 IN EFI_SMBIOS_PROTOCOL
*Smbios
,
120 OUT EFI_SMBIOS_HANDLE
*SmbiosHandle
,
121 IN EFI_SMBIOS_TABLE_HEADER
*Record
124 #endif /* _MISC_SUBCLASS_DRIVER_H */
126 /* eof - MiscSubclassDriver.h */