]> git.proxmox.com Git - mirror_edk2.git/blob - UnixPkg/MiscSubClassPlatformDxe/MiscSubClassDriver.h
Retire FrameworkHiiLib library class. Remove FrameworkHiiLib library instance now...
[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 <Guid/DataHubProducer.h>
29 #include <Protocol/DataHub.h>
30 #include <Protocol/UnixIo.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/MemoryAllocationLib.h>
38 #include <Library/UefiBootServicesTableLib.h>
39 #include <Library/DevicePathLib.h>
40 #include <Library/PcdLib.h>
41
42
43 #include <MiscDevicePath.h>
44 #include <Protocol/DataHub.h>
45 #include <Protocol/FrameworkHii.h>
46 #include <Library/HiiLib.h>
47
48 //
49 // Data table entry update function.
50 //
51 typedef
52 EFI_STATUS
53 (EFIAPI EFI_MISC_SUBCLASS_DATA_FUNCTION) (
54 IN UINT16 RecordType,
55 IN UINT32 *RecordLen,
56 IN OUT EFI_MISC_SUBCLASS_RECORDS *RecordData,
57 OUT BOOLEAN *LogRecordData
58 );
59
60 //
61 // Data table entry definition.
62 //
63 typedef struct {
64 UINT16 RecordType;
65 UINT32 RecordLen;
66 VOID *RecordData;
67 EFI_MISC_SUBCLASS_DATA_FUNCTION *Function;
68 } EFI_MISC_SUBCLASS_DATA_TABLE;
69
70 //
71 // Data Table extern definitions.
72 //
73 #define MISC_SUBCLASS_TABLE_EXTERNS(NAME1, NAME2) \
74 extern NAME1 NAME2 ## Data; \
75 extern EFI_MISC_SUBCLASS_DATA_FUNCTION NAME2 ## Function
76
77 //
78 // Data Table entries
79 //
80 #define MISC_SUBCLASS_TABLE_ENTRY_DATA_ONLY(NAME1, NAME2) { \
81 NAME1 ## _RECORD_NUMBER, sizeof (NAME1 ## _DATA), &NAME2 ## Data, NULL \
82 }
83
84 #define MISC_SUBCLASS_TABLE_ENTRY_FUNCTION_ONLY(NAME1, NAME2) \
85 { \
86 NAME1 ## _RECORD_NUMBER, 0, NULL, &NAME2 ## Function \
87 }
88
89 #define MISC_SUBCLASS_TABLE_ENTRY_DATA_AND_FUNCTION(NAME1, NAME2, NAME3) \
90 { \
91 NAME1 ## _RECORD_NUMBER, sizeof (NAME1 ## _DATA), &NAME2 ## Data, &NAME3 ## Function \
92 }
93
94 //
95 // Global definition macros.
96 //
97 #define MISC_SUBCLASS_TABLE_DATA(NAME1, NAME2) NAME1 NAME2 ## Data
98
99 #define MISC_SUBCLASS_TABLE_FUNCTION(NAME2) \
100 EFI_STATUS EFIAPI NAME2 ## Function ( \
101 IN UINT16 RecordType, \
102 IN UINT32 *RecordLen, \
103 IN OUT EFI_MISC_SUBCLASS_RECORDS * RecordData, \
104 OUT BOOLEAN *LogRecordData \
105 )
106
107 //
108 // Data Table Array
109 //
110 extern EFI_MISC_SUBCLASS_DATA_TABLE mMiscSubclassDataTable[];
111
112 //
113 // Data Table Array Entries
114 //
115 extern UINTN mMiscSubclassDataTableEntries;
116
117 #endif /* _MISC_SUBCLASS_DRIVER_H */
118
119 /* eof - MiscSubclassDriver.h */