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