]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.h
Prompt the PI specification version to 1.20 and UEFI specification version to 2.30...
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / DeviceMngr / DeviceManager.h
CommitLineData
5c08e117 1/** @file\r
2 The platform device manager reference implement\r
3\r
4Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef _DEVICE_MANAGER_H_\r
16#define _DEVICE_MANAGER_H_\r
17\r
18#include "Bds.h"\r
19#include "FrontPage.h"\r
20\r
21//\r
22// These are defined as the same with vfr file\r
23//\r
24#define DEVICE_MANAGER_FORMSET_GUID \\r
25 { \\r
26 0x3ebfa8e6, 0x511d, 0x4b5b, {0xa9, 0x5f, 0xfb, 0x38, 0x26, 0xf, 0x1c, 0x27} \\r
27 }\r
28\r
75bf9d0e
LG
29#define LABEL_DEVICES_LIST 0x0080\r
30#define LABEL_END 0xffff\r
31\r
5c08e117 32#define LABEL_VBIOS 0x0040\r
33\r
34#define DEVICE_MANAGER_FORM_ID 0x1000\r
35\r
36#define DEVICE_KEY_OFFSET 0x1000\r
37#define DEVICE_MANAGER_KEY_VBIOS 0x2000\r
38\r
39//\r
40// These are the VFR compiler generated data representing our VFR data.\r
41//\r
42extern UINT8 DeviceManagerVfrBin[];\r
43\r
44#define DEVICE_MANAGER_CALLBACK_DATA_SIGNATURE SIGNATURE_32 ('D', 'M', 'C', 'B')\r
45\r
46typedef struct {\r
47 UINTN Signature;\r
48\r
49 ///\r
50 /// HII relative handles\r
51 ///\r
52 EFI_HII_HANDLE HiiHandle;\r
53 EFI_HANDLE DriverHandle;\r
54\r
55 ///\r
56 /// Produced protocols\r
57 ///\r
58 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;\r
59\r
60 ///\r
61 /// Configuration data\r
62 ///\r
63 UINT8 VideoBios;\r
64} DEVICE_MANAGER_CALLBACK_DATA;\r
65\r
66#define DEVICE_MANAGER_CALLBACK_DATA_FROM_THIS(a) \\r
67 CR (a, \\r
68 DEVICE_MANAGER_CALLBACK_DATA, \\r
69 ConfigAccess, \\r
70 DEVICE_MANAGER_CALLBACK_DATA_SIGNATURE \\r
71 )\r
72typedef struct {\r
73 EFI_STRING_ID StringId;\r
74 UINT16 Class;\r
75} DEVICE_MANAGER_MENU_ITEM;\r
76\r
77/**\r
78 This function is invoked if user selected a iteractive opcode from Device Manager's\r
79 Formset. The decision by user is saved to gCallbackKey for later processing. If\r
80 user set VBIOS, the new value is saved to EFI variable.\r
81\r
82\r
83 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
84 @param Action Specifies the type of action taken by the browser.\r
85 @param QuestionId A unique value which is sent to the original exporting driver\r
86 so that it can identify the type of data to expect.\r
87 @param Type The type of value for the question.\r
88 @param Value A pointer to the data being sent to the original exporting driver.\r
89 @param ActionRequest On return, points to the action requested by the callback function.\r
90\r
91 @retval EFI_SUCCESS The callback successfully handled the action.\r
92 @retval EFI_INVALID_PARAMETER The setup browser call this function with invalid parameters.\r
93\r
94**/\r
95EFI_STATUS\r
96EFIAPI\r
97DeviceManagerCallback (\r
98 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
99 IN EFI_BROWSER_ACTION Action,\r
100 IN EFI_QUESTION_ID QuestionId,\r
101 IN UINT8 Type,\r
102 IN EFI_IFR_TYPE_VALUE *Value,\r
103 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r
104 );\r
105\r
106/**\r
107\r
108 This function registers HII packages to HII database.\r
109\r
cb7d01c0 110 @retval EFI_SUCCESS HII packages for the Device Manager were registered successfully.\r
111 @retval EFI_OUT_OF_RESOURCES HII packages for the Device Manager failed to be registered.\r
5c08e117 112\r
113**/\r
114EFI_STATUS\r
115InitializeDeviceManager (\r
116 VOID\r
117 );\r
118\r
119/**\r
120\r
121 Call the browser and display the device manager to allow user\r
122 to configure the platform.\r
123\r
124 This function create the dynamic content for device manager. It includes\r
125 section header for all class of devices, one-of opcode to set VBIOS.\r
126 \r
127 @retval EFI_SUCCESS Operation is successful.\r
128 @retval Other values if failed to clean up the dynamic content from HII\r
129 database.\r
130\r
131**/\r
132EFI_STATUS\r
133CallDeviceManager (\r
134 VOID\r
135 );\r
136\r
137#endif\r