]> git.proxmox.com Git - mirror_edk2.git/blame - EmulatorPkg/MiscSubClassPlatformDxe/MiscSubClassDriver.h
StdLib/LibC/StdLib/Malloc.c: Make the free() function conform to the ISO/IEC 9899...
[mirror_edk2.git] / EmulatorPkg / MiscSubClassPlatformDxe / MiscSubClassDriver.h
CommitLineData
949f388f 1/*++\r
2\r
2bfd90f9 3Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
949f388f 4This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12Module Name:\r
13\r
14 MiscSubclassDriver.h\r
15\r
16Abstract:\r
17\r
18 Header file for MiscSubclass Driver.\r
19\r
20**/\r
21\r
22#ifndef _MISC_SUBCLASS_DRIVER_H\r
23#define _MISC_SUBCLASS_DRIVER_H\r
24\r
25#include <FrameworkDxe.h>\r
26\r
27#include <Guid/DataHubRecords.h>\r
28#include <IndustryStandard/SmBios.h>\r
29#include <Protocol/Smbios.h>\r
30#include <Protocol/EmuIoThunk.h>\r
31\r
32#include <Library/BaseLib.h>\r
33#include <Library/DebugLib.h>\r
34#include <Library/HiiLib.h>\r
35#include <Library/UefiLib.h>\r
36#include <Library/UefiDriverEntryPoint.h>\r
37#include <Library/BaseMemoryLib.h>\r
38#include <Library/MemoryAllocationLib.h>\r
39#include <Library/UefiBootServicesTableLib.h>\r
40#include <Library/DevicePathLib.h>\r
41#include <Library/PcdLib.h>\r
42\r
43\r
44#include <MiscDevicePath.h>\r
45#include <Protocol/FrameworkHii.h>\r
46#include <Library/HiiLib.h>\r
47\r
48//\r
49// Data table entry update function.\r
50//\r
51typedef EFI_STATUS (EFIAPI EFI_MISC_SMBIOS_DATA_FUNCTION) (\r
52 IN VOID *RecordData,\r
53 IN EFI_SMBIOS_PROTOCOL *Smbios\r
54 );\r
55\r
56//\r
57// Data table entry definition.\r
58//\r
59typedef struct {\r
60 //\r
61 // intermediat input data for SMBIOS record\r
62 //\r
63 VOID *RecordData;\r
64 EFI_MISC_SMBIOS_DATA_FUNCTION *Function;\r
65} EFI_MISC_SMBIOS_DATA_TABLE;\r
66\r
67//\r
68// Data Table extern definitions.\r
69//\r
70#define MISC_SMBIOS_TABLE_EXTERNS(NAME1, NAME2, NAME3) \\r
71extern NAME1 NAME2 ## Data; \\r
72extern EFI_MISC_SMBIOS_DATA_FUNCTION NAME3 ## Function\r
73\r
74\r
75//\r
76// Data Table entries\r
77//\r
78#define MISC_SMBIOS_TABLE_ENTRY_DATA_AND_FUNCTION(NAME1, NAME2) \\r
79{ \\r
80 & NAME1 ## Data, \\r
81 & NAME2 ## Function \\r
82}\r
83\r
84//\r
85// Global definition macros.\r
86//\r
87#define MISC_SMBIOS_TABLE_DATA(NAME1, NAME2) \\r
88 NAME1 NAME2 ## Data\r
89\r
90#define MISC_SMBIOS_TABLE_FUNCTION(NAME2) \\r
91 EFI_STATUS EFIAPI NAME2 ## Function( \\r
92 IN VOID *RecordData, \\r
93 IN EFI_SMBIOS_PROTOCOL *Smbios \\r
94 )\r
95\r
96\r
97//\r
98// Data Table Array\r
99//\r
100extern EFI_MISC_SMBIOS_DATA_TABLE mMiscSubclassDataTable[];\r
101\r
102//\r
103// Data Table Array Entries\r
104//\r
105extern UINTN mMiscSubclassDataTableEntries;\r
106extern UINT8 MiscSubclassStrings[];\r
107extern EFI_HII_HANDLE mHiiHandle;\r
108\r
2bfd90f9
SZ
109/**\r
110 Add an SMBIOS record.\r
111\r
112 @param Smbios The EFI_SMBIOS_PROTOCOL instance.\r
113 @param SmbiosHandle A unique handle will be assigned to the SMBIOS record.\r
114 @param Record The data for the fixed portion of the SMBIOS record. The format of the record is\r
115 determined by EFI_SMBIOS_TABLE_HEADER.Type. The size of the formatted area is defined \r
116 by EFI_SMBIOS_TABLE_HEADER.Length and either followed by a double-null (0x0000) or \r
117 a set of null terminated strings and a null.\r
118\r
119 @retval EFI_SUCCESS Record was added.\r
120 @retval EFI_OUT_OF_RESOURCES Record was not added due to lack of system resources.\r
121\r
122**/\r
949f388f 123EFI_STATUS\r
2bfd90f9
SZ
124AddSmbiosRecord (\r
125 IN EFI_SMBIOS_PROTOCOL *Smbios,\r
126 OUT EFI_SMBIOS_HANDLE *SmbiosHandle,\r
127 IN EFI_SMBIOS_TABLE_HEADER *Record\r
949f388f 128 );\r
129\r
949f388f 130#endif /* _MISC_SUBCLASS_DRIVER_H */\r
131\r
132/* eof - MiscSubclassDriver.h */\r