]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h
Use default UNDI information if NII protocol not exists.
[mirror_edk2.git] / MdeModulePkg / Universal / DriverSampleDxe / DriverSample.h
CommitLineData
0bb0f8b8 1/** @file\r
2\r
3Copyright (c) 2007, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12Module Name:\r
13\r
14 DriverSample.h\r
15\r
16Abstract:\r
17\r
18\r
19Revision History\r
20\r
21\r
22**/\r
23\r
7064c0a5 24#ifndef _DRIVER_SAMPLE_H_\r
25#define _DRIVER_SAMPLE_H_\r
0bb0f8b8 26\r
27#include <Uefi.h>\r
28\r
29#include <Protocol/HiiConfigRouting.h>\r
30#include <Protocol/FormBrowser2.h>\r
31#include <Protocol/HiiConfigAccess.h>\r
32#include <Protocol/HiiDatabase.h>\r
33#include <Protocol/HiiString.h>\r
34\r
5c526736 35#include <Guid/MdeModuleHii.h>\r
0bb0f8b8 36#include <Library/DebugLib.h>\r
37#include <Library/BaseMemoryLib.h>\r
38#include <Library/UefiRuntimeServicesTableLib.h>\r
39#include <Library/UefiDriverEntryPoint.h>\r
40#include <Library/UefiBootServicesTableLib.h>\r
41#include <Library/MemoryAllocationLib.h>\r
0bb0f8b8 42#include <Library/HiiLib.h>\r
f6f910dd 43#include <Library/DevicePathLib.h>\r
0bb0f8b8 44\r
0bb0f8b8 45#include "NVDataStruc.h"\r
46\r
47//\r
48// This is the generated <AltResp> for defaults defined in VFR\r
49//\r
50extern UINT8 VfrMyIfrNVDataDefault0000[];\r
8d00a0f1 51extern UINT8 VfrMyIfrNVDataDefault0001[];\r
52extern UINT8 VfrMyIfrNVDataBlockName[];\r
0bb0f8b8 53\r
54//\r
55// This is the generated IFR binary data for each formset defined in VFR.\r
56// This data array is ready to be used as input of HiiLibPreparePackageList() to\r
57// create a packagelist (which contains Form packages, String packages, etc).\r
58//\r
59extern UINT8 VfrBin[];\r
60extern UINT8 InventoryBin[];\r
61\r
62//\r
63// This is the generated String package data for all .UNI files.\r
64// This data array is ready to be used as input of HiiLibPreparePackageList() to\r
65// create a packagelist (which contains Form packages, String packages, etc).\r
66//\r
67extern UINT8 DriverSampleStrings[];\r
68\r
36dadb8a 69#define DYNAMIC_ONE_OF_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOneof)\r
70#define DYNAMIC_ORDERED_LIST_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOrderedList)\r
0bb0f8b8 71\r
f3f2e05d 72#define DRIVER_SAMPLE_PRIVATE_SIGNATURE SIGNATURE_32 ('D', 'S', 'p', 's')\r
0bb0f8b8 73\r
74typedef struct {\r
75 UINTN Signature;\r
76\r
77 EFI_HANDLE DriverHandle[2];\r
78 EFI_HII_HANDLE HiiHandle[2];\r
79 DRIVER_SAMPLE_CONFIGURATION Configuration;\r
80 UINT8 PasswordState;\r
81\r
82 //\r
83 // Consumed protocol\r
84 //\r
85 EFI_HII_DATABASE_PROTOCOL *HiiDatabase;\r
86 EFI_HII_STRING_PROTOCOL *HiiString;\r
87 EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting;\r
88 EFI_FORM_BROWSER2_PROTOCOL *FormBrowser2;\r
89\r
90 //\r
91 // Produced protocol\r
92 //\r
93 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;\r
94} DRIVER_SAMPLE_PRIVATE_DATA;\r
95\r
96#define DRIVER_SAMPLE_PRIVATE_FROM_THIS(a) CR (a, DRIVER_SAMPLE_PRIVATE_DATA, ConfigAccess, DRIVER_SAMPLE_PRIVATE_SIGNATURE)\r
97\r
f6f910dd 98#pragma pack(1)\r
99\r
100///\r
101/// HII specific Vendor Device Path definition.\r
102///\r
103typedef struct {\r
104 VENDOR_DEVICE_PATH VendorDevicePath;\r
105 EFI_DEVICE_PATH_PROTOCOL End;\r
106} HII_VENDOR_DEVICE_PATH;\r
107\r
108#pragma pack()\r
109\r
0bb0f8b8 110#endif\r