]> git.proxmox.com Git - mirror_edk2.git/blob - UnixPkg/MiscSubClassPlatformDxe/MiscSubClassDriver.h
Retire gEfiProcessorProducerGuid,gEfiMemoryProducerGuid,
[mirror_edk2.git] / UnixPkg / MiscSubClassPlatformDxe / MiscSubClassDriver.h
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. 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
8
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.
11
12 Module Name:
13
14 MiscSubclassDriver.h
15
16 Abstract:
17
18 Header file for MiscSubclass Driver.
19
20 --*/
21
22 #ifndef _MISC_SUBCLASS_DRIVER_H
23 #define _MISC_SUBCLASS_DRIVER_H
24
25 #include <FrameworkDxe.h>
26 #include <UnixDxe.h>
27 #include <Guid/DataHubRecords.h>
28 #include <Protocol/DataHub.h>
29 #include <Protocol/UnixIo.h>
30 #include <Library/BaseLib.h>
31 #include <Library/DebugLib.h>
32 #include <Library/HiiLib.h>
33 #include <Library/UefiLib.h>
34 #include <Library/UefiDriverEntryPoint.h>
35 #include <Library/BaseMemoryLib.h>
36 #include <Library/MemoryAllocationLib.h>
37 #include <Library/UefiBootServicesTableLib.h>
38 #include <Library/DevicePathLib.h>
39 #include <Library/PcdLib.h>
40
41
42 #include <MiscDevicePath.h>
43 #include <Protocol/DataHub.h>
44 #include <Protocol/FrameworkHii.h>
45 #include <Library/HiiLib.h>
46
47 //
48 // Data table entry update function.
49 //
50 typedef
51 EFI_STATUS
52 (EFIAPI EFI_MISC_SUBCLASS_DATA_FUNCTION) (
53 IN UINT16 RecordType,
54 IN UINT32 *RecordLen,
55 IN OUT EFI_MISC_SUBCLASS_RECORDS *RecordData,
56 OUT BOOLEAN *LogRecordData
57 );
58
59 //
60 // Data table entry definition.
61 //
62 typedef struct {
63 UINT16 RecordType;
64 UINT32 RecordLen;
65 VOID *RecordData;
66 EFI_MISC_SUBCLASS_DATA_FUNCTION *Function;
67 } EFI_MISC_SUBCLASS_DATA_TABLE;
68
69 //
70 // Data Table extern definitions.
71 //
72 #define MISC_SUBCLASS_TABLE_EXTERNS(NAME1, NAME2) \
73 extern NAME1 NAME2 ## Data; \
74 extern EFI_MISC_SUBCLASS_DATA_FUNCTION NAME2 ## Function
75
76 //
77 // Data Table entries
78 //
79 #define MISC_SUBCLASS_TABLE_ENTRY_DATA_ONLY(NAME1, NAME2) { \
80 NAME1 ## _RECORD_NUMBER, sizeof (NAME1 ## _DATA), &NAME2 ## Data, NULL \
81 }
82
83 #define MISC_SUBCLASS_TABLE_ENTRY_FUNCTION_ONLY(NAME1, NAME2) \
84 { \
85 NAME1 ## _RECORD_NUMBER, 0, NULL, &NAME2 ## Function \
86 }
87
88 #define MISC_SUBCLASS_TABLE_ENTRY_DATA_AND_FUNCTION(NAME1, NAME2, NAME3) \
89 { \
90 NAME1 ## _RECORD_NUMBER, sizeof (NAME1 ## _DATA), &NAME2 ## Data, &NAME3 ## Function \
91 }
92
93 //
94 // Global definition macros.
95 //
96 #define MISC_SUBCLASS_TABLE_DATA(NAME1, NAME2) NAME1 NAME2 ## Data
97
98 #define MISC_SUBCLASS_TABLE_FUNCTION(NAME2) \
99 EFI_STATUS EFIAPI NAME2 ## Function ( \
100 IN UINT16 RecordType, \
101 IN UINT32 *RecordLen, \
102 IN OUT EFI_MISC_SUBCLASS_RECORDS * RecordData, \
103 OUT BOOLEAN *LogRecordData \
104 )
105
106 //
107 // Data Table Array
108 //
109 extern EFI_MISC_SUBCLASS_DATA_TABLE mMiscSubclassDataTable[];
110
111 //
112 // Data Table Array Entries
113 //
114 extern UINTN mMiscSubclassDataTableEntries;
115
116 #endif /* _MISC_SUBCLASS_DRIVER_H */
117
118 /* eof - MiscSubclassDriver.h */