3 Copyright (c) 2007, 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.
24 #ifndef _DRIVER_SAMPLE_H
25 #define _DRIVER_SAMPLE_H
29 #include <Protocol/HiiConfigRouting.h>
30 #include <Protocol/FormBrowser2.h>
31 #include <Protocol/HiiConfigAccess.h>
32 #include <Protocol/HiiDatabase.h>
33 #include <Protocol/HiiString.h>
35 #include <Library/DebugLib.h>
36 #include <Library/BaseMemoryLib.h>
37 #include <Library/UefiRuntimeServicesTableLib.h>
38 #include <Library/UefiDriverEntryPoint.h>
39 #include <Library/UefiBootServicesTableLib.h>
40 #include <Library/MemoryAllocationLib.h>
41 #include <Library/IfrSupportLib.h>
42 #include <Library/ExtendedIfrSupportLib.h>
43 #include <Library/HiiLib.h>
44 #include <Library/ExtendedHiiLib.h>
46 #include <MdeModuleHii.h>
49 #include "NVDataStruc.h"
52 // This is the generated <AltResp> for defaults defined in VFR
54 extern UINT8 VfrMyIfrNVDataDefault0000
[];
55 extern UINT8 VfrMyIfrNVDataDefault0001
[];
56 extern UINT8 VfrMyIfrNVDataBlockName
[];
59 // This is the generated IFR binary data for each formset defined in VFR.
60 // This data array is ready to be used as input of HiiLibPreparePackageList() to
61 // create a packagelist (which contains Form packages, String packages, etc).
63 extern UINT8 VfrBin
[];
64 extern UINT8 InventoryBin
[];
67 // This is the generated String package data for all .UNI files.
68 // This data array is ready to be used as input of HiiLibPreparePackageList() to
69 // create a packagelist (which contains Form packages, String packages, etc).
71 extern UINT8 DriverSampleStrings
[];
73 #define VAR_OFFSET(Field) \
74 ((UINT16) ((UINTN) &(((DRIVER_SAMPLE_CONFIGURATION *) 0)->Field)))
76 #define DYNAMIC_ONE_OF_VAR_OFFSET VAR_OFFSET (DynamicOneof)
77 #define DYNAMIC_ORDERED_LIST_VAR_OFFSET VAR_OFFSET (DynamicOrderedList)
79 #define DRIVER_SAMPLE_PRIVATE_SIGNATURE EFI_SIGNATURE_32 ('D', 'S', 'p', 's')
84 EFI_HANDLE DriverHandle
[2];
85 EFI_HII_HANDLE HiiHandle
[2];
86 DRIVER_SAMPLE_CONFIGURATION Configuration
;
92 EFI_HII_DATABASE_PROTOCOL
*HiiDatabase
;
93 EFI_HII_STRING_PROTOCOL
*HiiString
;
94 EFI_HII_CONFIG_ROUTING_PROTOCOL
*HiiConfigRouting
;
95 EFI_FORM_BROWSER2_PROTOCOL
*FormBrowser2
;
100 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess
;
101 } DRIVER_SAMPLE_PRIVATE_DATA
;
103 #define DRIVER_SAMPLE_PRIVATE_FROM_THIS(a) CR (a, DRIVER_SAMPLE_PRIVATE_DATA, ConfigAccess, DRIVER_SAMPLE_PRIVATE_SIGNATURE)