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
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.
18 Header file for MiscSubclass Driver.
22 #ifndef _MISC_SUBCLASS_DRIVER_H
23 #define _MISC_SUBCLASS_DRIVER_H
25 #include <FrameworkDxe.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>
42 #include <MiscDevicePath.h>
43 #include <Protocol/DataHub.h>
44 #include <Protocol/FrameworkHii.h>
45 #include <Library/HiiLib.h>
48 // Data table entry update function.
52 (EFIAPI EFI_MISC_SUBCLASS_DATA_FUNCTION
) (
55 IN OUT EFI_MISC_SUBCLASS_RECORDS
*RecordData
,
56 OUT BOOLEAN
*LogRecordData
60 // Data table entry definition.
66 EFI_MISC_SUBCLASS_DATA_FUNCTION
*Function
;
67 } EFI_MISC_SUBCLASS_DATA_TABLE
;
70 // Data Table extern definitions.
72 #define MISC_SUBCLASS_TABLE_EXTERNS(NAME1, NAME2) \
73 extern NAME1 NAME2 ## Data; \
74 extern EFI_MISC_SUBCLASS_DATA_FUNCTION NAME2 ## Function
79 #define MISC_SUBCLASS_TABLE_ENTRY_DATA_ONLY(NAME1, NAME2) { \
80 NAME1 ## _RECORD_NUMBER, sizeof (NAME1 ## _DATA), &NAME2 ## Data, NULL \
83 #define MISC_SUBCLASS_TABLE_ENTRY_FUNCTION_ONLY(NAME1, NAME2) \
85 NAME1 ## _RECORD_NUMBER, 0, NULL, &NAME2 ## Function \
88 #define MISC_SUBCLASS_TABLE_ENTRY_DATA_AND_FUNCTION(NAME1, NAME2, NAME3) \
90 NAME1 ## _RECORD_NUMBER, sizeof (NAME1 ## _DATA), &NAME2 ## Data, &NAME3 ## Function \
94 // Global definition macros.
96 #define MISC_SUBCLASS_TABLE_DATA(NAME1, NAME2) NAME1 NAME2 ## Data
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 \
109 extern EFI_MISC_SUBCLASS_DATA_TABLE mMiscSubclassDataTable
[];
112 // Data Table Array Entries
114 extern UINTN mMiscSubclassDataTableEntries
;
116 #endif /* _MISC_SUBCLASS_DRIVER_H */
118 /* eof - MiscSubclassDriver.h */