2 The platform device manager reference implement
4 Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
5 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"
20 #include <Protocol/PciIo.h>
23 // These are defined as the same with vfr file
25 #define DEVICE_MANAGER_FORMSET_GUID \
27 0x3ebfa8e6, 0x511d, 0x4b5b, {0xa9, 0x5f, 0xfb, 0x38, 0x26, 0xf, 0x1c, 0x27} \
30 #define LABEL_DEVICES_LIST 0x1100
31 #define LABEL_NETWORK_DEVICE_LIST_ID 0x1101
32 #define LABEL_NETWORK_DEVICE_ID 0x1102
33 #define LABEL_END 0xffff
34 #define LABEL_FORM_ID_OFFSET 0x0100
36 #define LABEL_VBIOS 0x0040
38 #define DEVICE_MANAGER_FORM_ID 0x1000
39 #define NETWORK_DEVICE_LIST_FORM_ID 0x1001
40 #define NETWORK_DEVICE_FORM_ID 0x1002
41 #define DEVICE_KEY_OFFSET 0x4000
42 #define NETWORK_DEVICE_LIST_KEY_OFFSET 0x2000
43 #define DEVICE_MANAGER_KEY_VBIOS 0x3000
44 #define MAX_KEY_SECTION_LEN 0x1000
46 #define QUESTION_NETWORK_DEVICE_ID 0x3FFF
48 // These are the VFR compiler generated data representing our VFR data.
50 extern UINT8 DeviceManagerVfrBin
[];
52 #define DEVICE_MANAGER_CALLBACK_DATA_SIGNATURE SIGNATURE_32 ('D', 'M', 'C', 'B')
59 /// Device Manager HII relative handles
61 EFI_HII_HANDLE HiiHandle
;
63 EFI_HANDLE DriverHandle
;
66 /// Device Manager Produced protocols
68 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess
;
71 /// Configuration data
74 } DEVICE_MANAGER_CALLBACK_DATA
;
77 EFI_STRING_ID PromptId
;
78 EFI_QUESTION_ID QuestionId
;
84 MENU_INFO_ITEM
*NodeList
;
85 } MAC_ADDRESS_NODE_LIST
;
87 #define DEVICE_MANAGER_CALLBACK_DATA_FROM_THIS(a) \
89 DEVICE_MANAGER_CALLBACK_DATA, \
91 DEVICE_MANAGER_CALLBACK_DATA_SIGNATURE \
94 EFI_STRING_ID StringId
;
96 } DEVICE_MANAGER_MENU_ITEM
;
99 This function is invoked if user selected a interactive opcode from Device Manager's
100 Formset. If user set VBIOS, the new value is saved to EFI variable.
103 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
104 @param Action Specifies the type of action taken by the browser.
105 @param QuestionId A unique value which is sent to the original exporting driver
106 so that it can identify the type of data to expect.
107 @param Type The type of value for the question.
108 @param Value A pointer to the data being sent to the original exporting driver.
109 @param ActionRequest On return, points to the action requested by the callback function.
111 @retval EFI_SUCCESS The callback successfully handled the action.
112 @retval EFI_INVALID_PARAMETER The setup browser call this function with invalid parameters.
117 DeviceManagerCallback (
118 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL
*This
,
119 IN EFI_BROWSER_ACTION Action
,
120 IN EFI_QUESTION_ID QuestionId
,
122 IN EFI_IFR_TYPE_VALUE
*Value
,
123 OUT EFI_BROWSER_ACTION_REQUEST
*ActionRequest
127 This function registers HII packages to HII database.
131 InitializeDeviceManager (
136 Remove the installed packages from the HII Database.
145 Dynamic create Hii information for Device Manager.
147 @param NextShowFormId The FormId which need to be show.
151 CreateDeviceManagerForm(
152 IN EFI_FORM_ID NextShowFormId