]> git.proxmox.com Git - mirror_edk2.git/blame - Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriver.h
MdeModulePkg DxeIplPeim: Convert Ia32/IdtVectorAsm.asm to NASM
[mirror_edk2.git] / Nt32Pkg / MiscSubClassPlatformDxe / MiscSubclassDriver.h
CommitLineData
6ae81428 1/**@file\r
8879d432 2\r
7ee85aa2 3Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
8f2a5f80 4This program and the accompanying materials\r
dd356cc4 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
8879d432 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
6ae81428 20**/\r
8879d432 21\r
22#ifndef _MISC_SUBCLASS_DRIVER_H\r
23#define _MISC_SUBCLASS_DRIVER_H\r
24\r
f2569572
A
25#include <FrameworkDxe.h>\r
26#include <WinNtDxe.h>\r
27#include <Guid/DataHubRecords.h>\r
1fdd39d3 28#include <IndustryStandard/SmBios.h>\r
29#include <Protocol/Smbios.h>\r
f2569572
A
30#include <Protocol/WinNtIo.h>\r
31#include <Library/BaseLib.h>\r
32#include <Library/DebugLib.h>\r
8d9bda4f 33#include <Library/HiiLib.h>\r
f2569572
A
34#include <Library/UefiLib.h>\r
35#include <Library/UefiDriverEntryPoint.h>\r
36#include <Library/BaseMemoryLib.h>\r
f2569572
A
37#include <Library/UefiBootServicesTableLib.h>\r
38#include <Library/DevicePathLib.h>\r
b397fbbb 39#include <Library/PcdLib.h>\r
1fdd39d3 40#include <Library/MemoryAllocationLib.h>\r
8879d432 41#include <MiscDevicePath.h>\r
42\r
1fdd39d3 43\r
8879d432 44//\r
45// Data table entry update function.\r
46//\r
1fdd39d3 47typedef EFI_STATUS (EFIAPI EFI_MISC_SMBIOS_DATA_FUNCTION) (\r
48 IN VOID *RecordData,\r
49 IN EFI_SMBIOS_PROTOCOL *Smbios\r
8879d432 50 );\r
51\r
52//\r
53// Data table entry definition.\r
54//\r
55typedef struct {\r
1fdd39d3 56 //\r
57 // intermediat input data for SMBIOS record\r
58 //\r
59 VOID *RecordData;\r
60 EFI_MISC_SMBIOS_DATA_FUNCTION *Function;\r
61} EFI_MISC_SMBIOS_DATA_TABLE;\r
8879d432 62\r
63//\r
64// Data Table extern definitions.\r
65//\r
1fdd39d3 66#define MISC_SMBIOS_TABLE_EXTERNS(NAME1, NAME2, NAME3) \\r
67extern NAME1 NAME2 ## Data; \\r
68extern EFI_MISC_SMBIOS_DATA_FUNCTION NAME3 ## Function\r
69\r
8879d432 70\r
71//\r
72// Data Table entries\r
73//\r
1fdd39d3 74#define MISC_SMBIOS_TABLE_ENTRY_DATA_AND_FUNCTION(NAME1, NAME2) \\r
75{ \\r
76 & NAME1 ## Data, \\r
77 & NAME2 ## Function \\r
78}\r
8879d432 79\r
80//\r
81// Global definition macros.\r
82//\r
1fdd39d3 83#define MISC_SMBIOS_TABLE_DATA(NAME1, NAME2) \\r
84 NAME1 NAME2 ## Data\r
8879d432 85\r
1fdd39d3 86#define MISC_SMBIOS_TABLE_FUNCTION(NAME2) \\r
87 EFI_STATUS EFIAPI NAME2 ## Function( \\r
88 IN VOID *RecordData, \\r
89 IN EFI_SMBIOS_PROTOCOL *Smbios \\r
8879d432 90 )\r
91\r
1fdd39d3 92\r
8879d432 93//\r
94// Data Table Array\r
95//\r
1fdd39d3 96extern EFI_MISC_SMBIOS_DATA_TABLE mMiscSubclassDataTable[];\r
8879d432 97\r
98//\r
99// Data Table Array Entries\r
100//\r
1fdd39d3 101extern UINTN mMiscSubclassDataTableEntries;\r
102extern UINT8 MiscSubclassStrings[];\r
103extern EFI_HII_HANDLE mHiiHandle;\r
104\r
7ee85aa2
SZ
105\r
106/**\r
107 Add an SMBIOS record.\r
108\r
109 @param Smbios The EFI_SMBIOS_PROTOCOL instance.\r
110 @param SmbiosHandle A unique handle will be assigned to the SMBIOS record.\r
111 @param Record The data for the fixed portion of the SMBIOS record. The format of the record is\r
112 determined by EFI_SMBIOS_TABLE_HEADER.Type. The size of the formatted area is defined \r
113 by EFI_SMBIOS_TABLE_HEADER.Length and either followed by a double-null (0x0000) or \r
114 a set of null terminated strings and a null.\r
115\r
116 @retval EFI_SUCCESS Record was added.\r
117 @retval EFI_OUT_OF_RESOURCES Record was not added due to lack of system resources.\r
118\r
119**/\r
1fdd39d3 120EFI_STATUS\r
7ee85aa2
SZ
121AddSmbiosRecord (\r
122 IN EFI_SMBIOS_PROTOCOL *Smbios,\r
123 OUT EFI_SMBIOS_HANDLE *SmbiosHandle,\r
124 IN EFI_SMBIOS_TABLE_HEADER *Record\r
1fdd39d3 125 );\r
126\r
8879d432 127#endif /* _MISC_SUBCLASS_DRIVER_H */\r
128\r
129/* eof - MiscSubclassDriver.h */\r