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/WinNtIo.h>
25 #include <Library/BaseLib.h>
26 #include <Library/DebugLib.h>
27 #include <Library/HiiLib.h>
28 #include <Library/UefiLib.h>
29 #include <Library/UefiDriverEntryPoint.h>
30 #include <Library/BaseMemoryLib.h>
31 #include <Library/UefiBootServicesTableLib.h>
32 #include <Library/DevicePathLib.h>
33 #include <Library/PcdLib.h>
34 #include <Library/MemoryAllocationLib.h>
35 #include <MiscDevicePath.h>
39 // Data table entry update function.
41 typedef EFI_STATUS (EFIAPI EFI_MISC_SMBIOS_DATA_FUNCTION
) (
43 IN EFI_SMBIOS_PROTOCOL
*Smbios
47 // Data table entry definition.
51 // intermediat input data for SMBIOS record
54 EFI_MISC_SMBIOS_DATA_FUNCTION
*Function
;
55 } EFI_MISC_SMBIOS_DATA_TABLE
;
58 // Data Table extern definitions.
60 #define MISC_SMBIOS_TABLE_EXTERNS(NAME1, NAME2, NAME3) \
61 extern NAME1 NAME2 ## Data; \
62 extern EFI_MISC_SMBIOS_DATA_FUNCTION NAME3 ## Function
68 #define MISC_SMBIOS_TABLE_ENTRY_DATA_AND_FUNCTION(NAME1, NAME2) \
75 // Global definition macros.
77 #define MISC_SMBIOS_TABLE_DATA(NAME1, NAME2) \
80 #define MISC_SMBIOS_TABLE_FUNCTION(NAME2) \
81 EFI_STATUS EFIAPI NAME2 ## Function( \
82 IN VOID *RecordData, \
83 IN EFI_SMBIOS_PROTOCOL *Smbios \
90 extern EFI_MISC_SMBIOS_DATA_TABLE mMiscSubclassDataTable
[];
93 // Data Table Array Entries
95 extern UINTN mMiscSubclassDataTableEntries
;
96 extern UINT8 MiscSubclassStrings
[];
97 extern EFI_HII_HANDLE mHiiHandle
;
101 Add an SMBIOS record.
103 @param Smbios The EFI_SMBIOS_PROTOCOL instance.
104 @param SmbiosHandle A unique handle will be assigned to the SMBIOS record.
105 @param Record The data for the fixed portion of the SMBIOS record. The format of the record is
106 determined by EFI_SMBIOS_TABLE_HEADER.Type. The size of the formatted area is defined
107 by EFI_SMBIOS_TABLE_HEADER.Length and either followed by a double-null (0x0000) or
108 a set of null terminated strings and a null.
110 @retval EFI_SUCCESS Record was added.
111 @retval EFI_OUT_OF_RESOURCES Record was not added due to lack of system resources.
116 IN EFI_SMBIOS_PROTOCOL
*Smbios
,
117 OUT EFI_SMBIOS_HANDLE
*SmbiosHandle
,
118 IN EFI_SMBIOS_TABLE_HEADER
*Record
121 #endif /* _MISC_SUBCLASS_DRIVER_H */
123 /* eof - MiscSubclassDriver.h */