3 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Header file for MiscSubclass Driver.
22 #ifndef _MISC_SUBCLASS_DRIVER_H
23 #define _MISC_SUBCLASS_DRIVER_H
25 #include <FrameworkDxe.h>
27 #include <Guid/DataHubRecords.h>
28 #include <IndustryStandard/SmBios.h>
29 #include <Protocol/Smbios.h>
30 #include <Protocol/WinNtIo.h>
31 #include <Library/BaseLib.h>
32 #include <Library/DebugLib.h>
33 #include <Library/HiiLib.h>
34 #include <Library/UefiLib.h>
35 #include <Library/UefiDriverEntryPoint.h>
36 #include <Library/BaseMemoryLib.h>
37 #include <Library/UefiBootServicesTableLib.h>
38 #include <Library/DevicePathLib.h>
39 #include <Library/PcdLib.h>
40 #include <Library/MemoryAllocationLib.h>
41 #include <MiscDevicePath.h>
45 // Data table entry update function.
47 typedef EFI_STATUS (EFIAPI EFI_MISC_SMBIOS_DATA_FUNCTION
) (
49 IN EFI_SMBIOS_PROTOCOL
*Smbios
53 // Data table entry definition.
57 // intermediat input data for SMBIOS record
60 EFI_MISC_SMBIOS_DATA_FUNCTION
*Function
;
61 } EFI_MISC_SMBIOS_DATA_TABLE
;
64 // Data Table extern definitions.
66 #define MISC_SMBIOS_TABLE_EXTERNS(NAME1, NAME2, NAME3) \
67 extern NAME1 NAME2 ## Data; \
68 extern EFI_MISC_SMBIOS_DATA_FUNCTION NAME3 ## Function
74 #define MISC_SMBIOS_TABLE_ENTRY_DATA_AND_FUNCTION(NAME1, NAME2) \
81 // Global definition macros.
83 #define MISC_SMBIOS_TABLE_DATA(NAME1, NAME2) \
86 #define MISC_SMBIOS_TABLE_FUNCTION(NAME2) \
87 EFI_STATUS EFIAPI NAME2 ## Function( \
88 IN VOID *RecordData, \
89 IN EFI_SMBIOS_PROTOCOL *Smbios \
96 extern EFI_MISC_SMBIOS_DATA_TABLE mMiscSubclassDataTable
[];
99 // Data Table Array Entries
101 extern UINTN mMiscSubclassDataTableEntries
;
102 extern UINT8 MiscSubclassStrings
[];
103 extern EFI_HII_HANDLE mHiiHandle
;
107 Add an SMBIOS record.
109 @param Smbios The EFI_SMBIOS_PROTOCOL instance.
110 @param SmbiosHandle A unique handle will be assigned to the SMBIOS record.
111 @param Record The data for the fixed portion of the SMBIOS record. The format of the record is
112 determined by EFI_SMBIOS_TABLE_HEADER.Type. The size of the formatted area is defined
113 by EFI_SMBIOS_TABLE_HEADER.Length and either followed by a double-null (0x0000) or
114 a set of null terminated strings and a null.
116 @retval EFI_SUCCESS Record was added.
117 @retval EFI_OUT_OF_RESOURCES Record was not added due to lack of system resources.
122 IN EFI_SMBIOS_PROTOCOL
*Smbios
,
123 OUT EFI_SMBIOS_HANDLE
*SmbiosHandle
,
124 IN EFI_SMBIOS_TABLE_HEADER
*Record
127 #endif /* _MISC_SUBCLASS_DRIVER_H */
129 /* eof - MiscSubclassDriver.h */