]> git.proxmox.com Git - mirror_edk2.git/blob - Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriver.h
clean up
[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
26 //
27 // Include common header file for this module.
28 //
29 #include "CommonHeader.h"
30
31 #include <MiscDevicePath.h>
32
33
34 //
35 // Data table entry update function.
36 //
37 typedef
38 EFI_STATUS
39 (EFIAPI EFI_MISC_SUBCLASS_DATA_FUNCTION) (
40 IN UINT16 RecordType,
41 IN UINT32 *RecordLen,
42 IN OUT EFI_MISC_SUBCLASS_RECORDS *RecordData,
43 OUT BOOLEAN *LogRecordData
44 );
45
46 //
47 // Data table entry definition.
48 //
49 typedef struct {
50 UINT16 RecordType;
51 UINT32 RecordLen;
52 VOID *RecordData;
53 EFI_MISC_SUBCLASS_DATA_FUNCTION *Function;
54 } EFI_MISC_SUBCLASS_DATA_TABLE;
55
56 //
57 // Data Table extern definitions.
58 //
59 #define MISC_SUBCLASS_TABLE_EXTERNS(NAME1, NAME2) \
60 extern NAME1 NAME2 ## Data; \
61 extern EFI_MISC_SUBCLASS_DATA_FUNCTION NAME2 ## Function
62
63 //
64 // Data Table entries
65 //
66 #define MISC_SUBCLASS_TABLE_ENTRY_DATA_ONLY(NAME1, NAME2) { \
67 NAME1 ## _RECORD_NUMBER, sizeof (NAME1 ## _DATA), &NAME2 ## Data, NULL \
68 }
69
70 #define MISC_SUBCLASS_TABLE_ENTRY_FUNCTION_ONLY(NAME1, NAME2) \
71 { \
72 NAME1 ## _RECORD_NUMBER, 0, NULL, &NAME2 ## Function \
73 }
74
75 #define MISC_SUBCLASS_TABLE_ENTRY_DATA_AND_FUNCTION(NAME1, NAME2, NAME3) \
76 { \
77 NAME1 ## _RECORD_NUMBER, sizeof (NAME1 ## _DATA), &NAME2 ## Data, &NAME3 ## Function \
78 }
79
80 //
81 // Global definition macros.
82 //
83 #define MISC_SUBCLASS_TABLE_DATA(NAME1, NAME2) NAME1 NAME2 ## Data
84
85 #define MISC_SUBCLASS_TABLE_FUNCTION(NAME2) \
86 EFI_STATUS EFIAPI NAME2 ## Function ( \
87 IN UINT16 RecordType, \
88 IN UINT32 *RecordLen, \
89 IN OUT EFI_MISC_SUBCLASS_RECORDS * RecordData, \
90 OUT BOOLEAN *LogRecordData \
91 )
92
93 //
94 // Data Table Array
95 //
96 extern EFI_MISC_SUBCLASS_DATA_TABLE mMiscSubclassDataTable[];
97
98 //
99 // Data Table Array Entries
100 //
101 extern UINTN mMiscSubclassDataTableEntries;
102
103 #endif /* _MISC_SUBCLASS_DRIVER_H */
104
105 /* eof - MiscSubclassDriver.h */