VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.h@ 77662

Last change on this file since 77662 was 77662, checked in by vboxsync, 6 years ago

EFI: First step in UDK2018 merge. Does not build yet.

  • Property svn:eol-style set to native
File size: 3.7 KB
Line 
1/** @file
2
3Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
4This program and the accompanying materials
5are licensed and made available under the terms and conditions of the BSD License
6which accompanies this distribution. The full text of the license may be found at
7http://opensource.org/licenses/bsd-license.php
8
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12Module Name:
13
14 DriverSample.h
15
16Abstract:
17
18
19Revision History
20
21
22**/
23
24#ifndef _DRIVER_SAMPLE_H_
25#define _DRIVER_SAMPLE_H_
26
27#include <Uefi.h>
28
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>
34#include <Protocol/FormBrowserEx.h>
35#include <Protocol/HiiConfigKeyword.h>
36#include <Protocol/HiiPopup.h>
37
38#include <Guid/MdeModuleHii.h>
39#include <Library/DebugLib.h>
40#include <Library/BaseLib.h>
41#include <Library/BaseMemoryLib.h>
42#include <Library/UefiRuntimeServicesTableLib.h>
43#include <Library/UefiDriverEntryPoint.h>
44#include <Library/UefiBootServicesTableLib.h>
45#include <Library/MemoryAllocationLib.h>
46#include <Library/HiiLib.h>
47#include <Library/DevicePathLib.h>
48#include <Library/PrintLib.h>
49#include <Library/UefiLib.h>
50
51#include "NVDataStruc.h"
52
53//
54// This is the generated IFR binary data for each formset defined in VFR.
55// This data array is ready to be used as input of HiiAddPackages() to
56// create a packagelist (which contains Form packages, String packages, etc).
57//
58extern UINT8 VfrBin[];
59extern UINT8 InventoryBin[];
60
61//
62// This is the generated String package data for all .UNI files.
63// This data array is ready to be used as input of HiiAddPackages() to
64// create a packagelist (which contains Form packages, String packages, etc).
65//
66extern UINT8 DriverSampleStrings[];
67
68#define DYNAMIC_ONE_OF_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOneof)
69#define DYNAMIC_ORDERED_LIST_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOrderedList)
70
71#define DEFAULT_CLASS_MANUFACTURING_VALUE 0xFF
72#define DEFAULT_CLASS_STANDARD_VALUE 0x0
73
74//
75// Number of name in Name/Value storage
76//
77#define NAME_VALUE_NAME_NUMBER 3
78
79#define DRIVER_SAMPLE_PRIVATE_SIGNATURE SIGNATURE_32 ('D', 'S', 'p', 's')
80
81typedef struct {
82 UINTN Signature;
83
84 EFI_HANDLE DriverHandle[2];
85 EFI_HII_HANDLE HiiHandle[2];
86 DRIVER_SAMPLE_CONFIGURATION Configuration;
87 MY_EFI_VARSTORE_DATA VarStoreConfig;
88 MY_EFI_BITS_VARSTORE_DATA BitsVarStoreConfig;
89 MY_EFI_UNION_DATA UnionConfig;
90
91 //
92 // Name/Value storage Name list
93 //
94 EFI_STRING_ID NameStringId[NAME_VALUE_NAME_NUMBER];
95 EFI_STRING NameValueName[NAME_VALUE_NAME_NUMBER];
96
97 //
98 // Consumed protocol
99 //
100 EFI_HII_DATABASE_PROTOCOL *HiiDatabase;
101 EFI_HII_STRING_PROTOCOL *HiiString;
102 EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting;
103 EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *HiiKeywordHandler;
104 EFI_HII_POPUP_PROTOCOL *HiiPopup;
105
106 EFI_FORM_BROWSER2_PROTOCOL *FormBrowser2;
107
108 //
109 // Produced protocol
110 //
111 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;
112} DRIVER_SAMPLE_PRIVATE_DATA;
113
114#define DRIVER_SAMPLE_PRIVATE_FROM_THIS(a) CR (a, DRIVER_SAMPLE_PRIVATE_DATA, ConfigAccess, DRIVER_SAMPLE_PRIVATE_SIGNATURE)
115
116#pragma pack(1)
117
118///
119/// HII specific Vendor Device Path definition.
120///
121typedef struct {
122 VENDOR_DEVICE_PATH VendorDevicePath;
123 EFI_DEVICE_PATH_PROTOCOL End;
124} HII_VENDOR_DEVICE_PATH;
125
126#pragma pack()
127
128#endif
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette