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