diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-12-15 02:56:46 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-12-15 02:56:46 +0000 |
commit | 847240774030f9da79140a9d515a64ec817eb6eb (patch) | |
tree | aec7f7665adee7363cdd9ab353eb44f19b66ee50 /IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr | |
parent | 3a4e7a3e73a40eecbb0a977a0e7421ff5743c353 (diff) | |
download | edk2-platforms-847240774030f9da79140a9d515a64ec817eb6eb.tar.xz |
Update for IntelFrameworkModulePkg.
Per UEFI spec, on CallBack action EFI_BROWSER_ACTION_CHANGING, the return value of ActionRequest will be ignored, but on CallBack action EFI_BROWSER_ACTION_CHANGED, the return value of ActionRequest will be used.
But, EDKII browser still processes the got ActionRequest. And, all HII drivers in EDKII project also returns their expected ActionRequest value on action EFI_BROWSER_ACTION_CHANGING.
Now update the browser to follow the spec, and update all core Hii drivers to keep old working modal.
Signed-off-by: ydong10
Reviewed-by: lgao4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12866 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr')
-rw-r--r-- | IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c | 53 | ||||
-rw-r--r-- | IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManagerVfr.h | 1 |
2 files changed, 25 insertions, 29 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c index d0bf764667..6cb9d6b7ab 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c @@ -133,35 +133,30 @@ DeviceManagerCallback ( {
UINTN CurIndex;
- if (Action == EFI_BROWSER_ACTION_CHANGING) {
- if ((Value == NULL) || (ActionRequest == NULL)) {
- return EFI_INVALID_PARAMETER;
- }
-
- gCallbackKey = QuestionId;
- if ((QuestionId < MAX_KEY_SECTION_LEN + NETWORK_DEVICE_LIST_KEY_OFFSET) && (QuestionId >= NETWORK_DEVICE_LIST_KEY_OFFSET)) {
- //
- // If user select the mac address, need to record mac address string to support next form show.
- //
- for (CurIndex = 0; CurIndex < mMacDeviceList.CurListLen; CurIndex ++) {
- if (mMacDeviceList.NodeList[CurIndex].QuestionId == QuestionId) {
- mSelectedMacAddrString = HiiGetString (gDeviceManagerPrivate.HiiHandle, mMacDeviceList.NodeList[CurIndex].PromptId, NULL);
- }
- }
- }
-
+ if (Action != EFI_BROWSER_ACTION_CHANGING) {
//
- // Request to exit SendForm(), so as to switch to selected form
+ // All other action return unsupported.
//
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
+ return EFI_UNSUPPORTED;
+ }
- return EFI_SUCCESS;
+ if (Value == NULL) {
+ return EFI_INVALID_PARAMETER;
}
- //
- // All other action return unsupported.
- //
- return EFI_UNSUPPORTED;
+ gCallbackKey = QuestionId;
+ if ((QuestionId < MAX_KEY_SECTION_LEN + NETWORK_DEVICE_LIST_KEY_OFFSET) && (QuestionId >= NETWORK_DEVICE_LIST_KEY_OFFSET)) {
+ //
+ // If user select the mac address, need to record mac address string to support next form show.
+ //
+ for (CurIndex = 0; CurIndex < mMacDeviceList.CurListLen; CurIndex ++) {
+ if (mMacDeviceList.NodeList[CurIndex].QuestionId == QuestionId) {
+ mSelectedMacAddrString = HiiGetString (gDeviceManagerPrivate.HiiHandle, mMacDeviceList.NodeList[CurIndex].PromptId, NULL);
+ }
+ }
+ }
+
+ return EFI_SUCCESS;
}
/**
@@ -873,7 +868,7 @@ CallDeviceManager ( AddNetworkMenu = TRUE;
HiiCreateGotoOpCode (
StartOpCodeHandle,
- DEVICE_MANAGER_FORM_ID,
+ INVALID_FORM_ID,
STRING_TOKEN (STR_FORM_NETWORK_DEVICE_LIST_TITLE),
STRING_TOKEN (STR_FORM_NETWORK_DEVICE_LIST_HELP),
EFI_IFR_FLAG_CALLBACK,
@@ -887,7 +882,7 @@ CallDeviceManager ( while (AddItemCount > 0) {
HiiCreateGotoOpCode (
StartOpCodeHandle,
- NETWORK_DEVICE_LIST_FORM_ID,
+ INVALID_FORM_ID,
mMacDeviceList.NodeList[mMacDeviceList.CurListLen - AddItemCount].PromptId,
STRING_TOKEN (STR_NETWORK_DEVICE_HELP),
EFI_IFR_FLAG_CALLBACK,
@@ -901,7 +896,7 @@ CallDeviceManager ( //
HiiCreateGotoOpCode (
StartOpCodeHandle,
- NETWORK_DEVICE_FORM_ID,
+ INVALID_FORM_ID,
Token,
TokenHelp,
EFI_IFR_FLAG_CALLBACK,
@@ -916,7 +911,7 @@ CallDeviceManager ( if (mNextShowFormId == DEVICE_MANAGER_FORM_ID) {
HiiCreateGotoOpCode (
StartOpCodeHandle,
- DEVICE_MANAGER_FORM_ID,
+ INVALID_FORM_ID,
Token,
TokenHelp,
EFI_IFR_FLAG_CALLBACK,
@@ -1097,7 +1092,7 @@ DriverHealthCallback ( OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
)
{
- if (Action == EFI_BROWSER_ACTION_CHANGING) {
+ if (Action == EFI_BROWSER_ACTION_CHANGED) {
if ((Value == NULL) || (ActionRequest == NULL)) {
return EFI_INVALID_PARAMETER;
}
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManagerVfr.h b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManagerVfr.h index 96e2c0a2cf..b6b086600f 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManagerVfr.h +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManagerVfr.h @@ -31,6 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define LABEL_VBIOS 0x0040
+#define INVALID_FORM_ID 0x0FFF
#define DEVICE_MANAGER_FORM_ID 0x1000
#define NETWORK_DEVICE_LIST_FORM_ID 0x1001
#define NETWORK_DEVICE_FORM_ID 0x1002
|