2 The platform device manager reference implement
4 Copyright (c) 2004 - 2008, Intel Corporation. <BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _DEVICE_MANAGER_H_
16 #define _DEVICE_MANAGER_H_
19 #include "FrontPage.h"
22 // These are defined as the same with vfr file
24 #define DEVICE_MANAGER_FORMSET_GUID \
26 0x3ebfa8e6, 0x511d, 0x4b5b, {0xa9, 0x5f, 0xfb, 0x38, 0x26, 0xf, 0x1c, 0x27} \
29 #define LABEL_VBIOS 0x0040
31 #define DEVICE_MANAGER_FORM_ID 0x1000
33 #define DEVICE_KEY_OFFSET 0x1000
34 #define DEVICE_MANAGER_KEY_VBIOS 0x2000
37 // These are the VFR compiler generated data representing our VFR data.
39 extern UINT8 DeviceManagerVfrBin
[];
41 #define DEVICE_MANAGER_CALLBACK_DATA_SIGNATURE SIGNATURE_32 ('D', 'M', 'C', 'B')
47 /// HII relative handles
49 EFI_HII_HANDLE HiiHandle
;
50 EFI_HANDLE DriverHandle
;
53 /// Produced protocols
55 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess
;
58 /// Configuration data
61 } DEVICE_MANAGER_CALLBACK_DATA
;
63 #define DEVICE_MANAGER_CALLBACK_DATA_FROM_THIS(a) \
65 DEVICE_MANAGER_CALLBACK_DATA, \
67 DEVICE_MANAGER_CALLBACK_DATA_SIGNATURE \
70 EFI_STRING_ID StringId
;
72 } DEVICE_MANAGER_MENU_ITEM
;
75 This function is invoked if user selected a iteractive opcode from Device Manager's
76 Formset. The decision by user is saved to gCallbackKey for later processing. If
77 user set VBIOS, the new value is saved to EFI variable.
80 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
81 @param Action Specifies the type of action taken by the browser.
82 @param QuestionId A unique value which is sent to the original exporting driver
83 so that it can identify the type of data to expect.
84 @param Type The type of value for the question.
85 @param Value A pointer to the data being sent to the original exporting driver.
86 @param ActionRequest On return, points to the action requested by the callback function.
88 @retval EFI_SUCCESS The callback successfully handled the action.
89 @retval EFI_INVALID_PARAMETER The setup browser call this function with invalid parameters.
94 DeviceManagerCallback (
95 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL
*This
,
96 IN EFI_BROWSER_ACTION Action
,
97 IN EFI_QUESTION_ID QuestionId
,
99 IN EFI_IFR_TYPE_VALUE
*Value
,
100 OUT EFI_BROWSER_ACTION_REQUEST
*ActionRequest
105 This function registers HII packages to HII database.
107 @retval EFI_SUCCESS HII packages for the Device Manager were registered successfully.
108 @retval EFI_OUT_OF_RESOURCES HII packages for the Device Manager failed to be registered.
112 InitializeDeviceManager (
118 Call the browser and display the device manager to allow user
119 to configure the platform.
121 This function create the dynamic content for device manager. It includes
122 section header for all class of devices, one-of opcode to set VBIOS.
124 @retval EFI_SUCCESS Operation is successful.
125 @retval Other values if failed to clean up the dynamic content from HII