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
This commit is contained in:
ydong10
2011-12-15 02:56:46 +00:00
parent 3a4e7a3e73
commit 8472407740
10 changed files with 152 additions and 158 deletions

View File

@ -175,23 +175,26 @@ FrontPageCallback (
CHAR8 *PlatformSupportedLanguages;
CHAR8 *BestLanguage;
if (Action == EFI_BROWSER_ACTION_CHANGING) {
if (Action != EFI_BROWSER_ACTION_CHANGING && Action != EFI_BROWSER_ACTION_CHANGED) {
//
// All other action return unsupported.
//
return EFI_UNSUPPORTED;
}
gCallbackKey = QuestionId;
if (Action == EFI_BROWSER_ACTION_CHANGED) {
if ((Value == NULL) || (ActionRequest == NULL)) {
return EFI_INVALID_PARAMETER;
}
gCallbackKey = QuestionId;
//
// The first 4 entries in the Front Page are to be GUARANTEED to remain constant so IHV's can
// describe to their customers in documentation how to find their setup information (namely
// under the device manager and specific buckets)
//
switch (QuestionId) {
case FRONT_PAGE_KEY_CONTINUE:
//
// This is the continue - clear the screen and return an error to get out of FrontPage loop
//
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
break;
case FRONT_PAGE_KEY_LANGUAGE:
@ -250,11 +253,27 @@ FrontPageCallback (
ASSERT (FALSE);
}
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
FreePool (PlatformSupportedLanguages);
FreePool (Lang);
FreePool (LanguageString);
break;
default:
break;
}
} else if (Action == EFI_BROWSER_ACTION_CHANGING) {
if (Value == NULL) {
return EFI_INVALID_PARAMETER;
}
//
// The first 4 entries in the Front Page are to be GUARANTEED to remain constant so IHV's can
// describe to their customers in documentation how to find their setup information (namely
// under the device manager and specific buckets)
//
switch (QuestionId) {
case FRONT_PAGE_KEY_BOOT_MANAGER:
//
// Boot Manager
@ -277,16 +296,9 @@ FrontPageCallback (
gCallbackKey = 0;
break;
}
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
return EFI_SUCCESS;
}
//
// All other action return unsupported.
//
return EFI_UNSUPPORTED;
return EFI_SUCCESS;
}
/**
@ -1181,6 +1193,7 @@ PlatformBdsEnterFrontPage (
BootLogo->SetBootLogo (BootLogo, NULL, 0, 0, 0, 0);
}
Status = EFI_SUCCESS;
do {
//
// Set proper video resolution and text mode for setup
@ -1195,7 +1208,7 @@ PlatformBdsEnterFrontPage (
UpdateFrontPageStrings ();
gCallbackKey = 0;
Status = CallFrontPage ();
CallFrontPage ();
//
// If gCallbackKey is greater than 1 and less or equal to 5,