Remove unnecessary TPL operations in BDS module & library.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5779 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
3ffe97a634
commit
8d9a52eba8
@ -1249,21 +1249,11 @@ BdsStartBootMaint (
|
|||||||
//
|
//
|
||||||
BdsLibEnumerateAllBootOption (&BdsBootOptionList);
|
BdsLibEnumerateAllBootOption (&BdsBootOptionList);
|
||||||
|
|
||||||
//
|
|
||||||
// Drop the TPL level from TPL_APPLICATION to TPL_APPLICATION
|
|
||||||
//
|
|
||||||
gBS->RestoreTPL (TPL_APPLICATION);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Init the BMM
|
// Init the BMM
|
||||||
//
|
//
|
||||||
Status = InitializeBM ();
|
Status = InitializeBM ();
|
||||||
|
|
||||||
//
|
|
||||||
// Raise the TPL level back to TPL_APPLICATION
|
|
||||||
//
|
|
||||||
gBS->RaiseTPL (TPL_APPLICATION);
|
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,14 +174,10 @@ BootThisFile (
|
|||||||
//
|
//
|
||||||
gST->ConOut->ClearScreen (gST->ConOut);
|
gST->ConOut->ClearScreen (gST->ConOut);
|
||||||
|
|
||||||
gBS->RaiseTPL (TPL_APPLICATION);
|
|
||||||
|
|
||||||
ExitDataSize = 0;
|
ExitDataSize = 0;
|
||||||
|
|
||||||
Status = BdsLibBootViaBootOption (Option, Option->DevicePath, &ExitDataSize, &ExitData);
|
Status = BdsLibBootViaBootOption (Option, Option->DevicePath, &ExitDataSize, &ExitData);
|
||||||
|
|
||||||
gBS->RestoreTPL (TPL_APPLICATION);
|
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -255,11 +255,6 @@ CallBootManager (
|
|||||||
);
|
);
|
||||||
FreePool (UpdateData.Data);
|
FreePool (UpdateData.Data);
|
||||||
|
|
||||||
//
|
|
||||||
// Drop the TPL level from TPL_APPLICATION to TPL_APPLICATION
|
|
||||||
//
|
|
||||||
gBS->RestoreTPL (TPL_APPLICATION);
|
|
||||||
|
|
||||||
ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
|
ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
|
||||||
Status = gFormBrowser2->SendForm (
|
Status = gFormBrowser2->SendForm (
|
||||||
gFormBrowser2,
|
gFormBrowser2,
|
||||||
@ -275,7 +270,6 @@ CallBootManager (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (gOption == NULL) {
|
if (gOption == NULL) {
|
||||||
gBS->RaiseTPL (TPL_APPLICATION);
|
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,11 +278,6 @@ CallBootManager (
|
|||||||
//
|
//
|
||||||
SetupResetReminder ();
|
SetupResetReminder ();
|
||||||
|
|
||||||
//
|
|
||||||
// Raise the TPL level back to TPL_APPLICATION
|
|
||||||
//
|
|
||||||
gBS->RaiseTPL (TPL_APPLICATION);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// parse the selected option
|
// parse the selected option
|
||||||
//
|
//
|
||||||
@ -304,11 +293,6 @@ CallBootManager (
|
|||||||
gST->ConOut,
|
gST->ConOut,
|
||||||
GetStringById (STRING_TOKEN (STR_ANY_KEY_CONTINUE))
|
GetStringById (STRING_TOKEN (STR_ANY_KEY_CONTINUE))
|
||||||
);
|
);
|
||||||
gBS->RestoreTPL (TPL_APPLICATION);
|
|
||||||
//
|
|
||||||
// BdsLibUiWaitForSingleEvent (gST->ConIn->WaitForKey, 0);
|
|
||||||
//
|
|
||||||
gBS->RaiseTPL (TPL_APPLICATION);
|
|
||||||
gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -348,11 +348,6 @@ CallDeviceManager (
|
|||||||
&UpdateData[0]
|
&UpdateData[0]
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
|
||||||
// Drop the TPL level from TPL_APPLICATION to TPL_APPLICATION
|
|
||||||
//
|
|
||||||
gBS->RestoreTPL (TPL_APPLICATION);
|
|
||||||
|
|
||||||
ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
|
ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
|
||||||
Status = gFormBrowser2->SendForm (
|
Status = gFormBrowser2->SendForm (
|
||||||
gFormBrowser2,
|
gFormBrowser2,
|
||||||
@ -412,7 +407,5 @@ CallDeviceManager (
|
|||||||
}
|
}
|
||||||
FreePool (HiiHandles);
|
FreePool (HiiHandles);
|
||||||
|
|
||||||
gBS->RaiseTPL (TPL_APPLICATION);
|
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -467,12 +467,6 @@ CallFrontPage (
|
|||||||
(EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_PC_INPUT_WAIT)
|
(EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_PC_INPUT_WAIT)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Drop the TPL level from TPL_APPLICATION to TPL_APPLICATION
|
|
||||||
//
|
|
||||||
gBS->RestoreTPL (TPL_APPLICATION);
|
|
||||||
|
|
||||||
ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
|
ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
|
||||||
Status = gFormBrowser2->SendForm (
|
Status = gFormBrowser2->SendForm (
|
||||||
gFormBrowser2,
|
gFormBrowser2,
|
||||||
@ -490,7 +484,6 @@ CallFrontPage (
|
|||||||
EnableResetRequired ();
|
EnableResetRequired ();
|
||||||
}
|
}
|
||||||
|
|
||||||
gBS->RaiseTPL (TPL_APPLICATION);
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -883,9 +876,7 @@ PlatformBdsEnterFrontPage (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (TimeoutDefault != 0xffff) {
|
if (TimeoutDefault != 0xffff) {
|
||||||
gBS->RestoreTPL (TPL_APPLICATION);
|
|
||||||
Status = ShowProgress (TimeoutDefault);
|
Status = ShowProgress (TimeoutDefault);
|
||||||
gBS->RaiseTPL (TPL_APPLICATION);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Ensure screen is clear when switch Console from Graphics mode to Text mode
|
// Ensure screen is clear when switch Console from Graphics mode to Text mode
|
||||||
@ -979,9 +970,7 @@ PlatformBdsEnterFrontPage (
|
|||||||
//
|
//
|
||||||
//Will leave browser, check any reset required change is applied? if yes, reset system
|
//Will leave browser, check any reset required change is applied? if yes, reset system
|
||||||
//
|
//
|
||||||
gBS->RestoreTPL (TPL_APPLICATION);
|
|
||||||
SetupResetReminder ();
|
SetupResetReminder ();
|
||||||
gBS->RaiseTPL (TPL_APPLICATION);
|
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
//
|
//
|
||||||
|
@ -327,7 +327,6 @@ HotkeyCallback (
|
|||||||
BDS_COMMON_OPTION *BootOption;
|
BDS_COMMON_OPTION *BootOption;
|
||||||
UINTN ExitDataSize;
|
UINTN ExitDataSize;
|
||||||
CHAR16 *ExitData;
|
CHAR16 *ExitData;
|
||||||
EFI_TPL OldTpl;
|
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_KEY_DATA *HotkeyData;
|
EFI_KEY_DATA *HotkeyData;
|
||||||
|
|
||||||
@ -402,18 +401,10 @@ HotkeyCallback (
|
|||||||
//
|
//
|
||||||
gST->ConOut->Reset (gST->ConOut, FALSE);
|
gST->ConOut->Reset (gST->ConOut, FALSE);
|
||||||
|
|
||||||
//
|
|
||||||
// BdsLibBootViaBootOption() is expected to be invoked at TPL level TPL_APPLICATION,
|
|
||||||
// so raise the TPL to TPL_APPLICATION first, then restore it
|
|
||||||
//
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_APPLICATION);
|
|
||||||
|
|
||||||
mHotkeyCallbackPending = TRUE;
|
mHotkeyCallbackPending = TRUE;
|
||||||
Status = BdsLibBootViaBootOption (BootOption, BootOption->DevicePath, &ExitDataSize, &ExitData);
|
Status = BdsLibBootViaBootOption (BootOption, BootOption->DevicePath, &ExitDataSize, &ExitData);
|
||||||
mHotkeyCallbackPending = FALSE;
|
mHotkeyCallbackPending = FALSE;
|
||||||
|
|
||||||
gBS->RestoreTPL (OldTpl);
|
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
//
|
//
|
||||||
// Call platform action to indicate the boot fail
|
// Call platform action to indicate the boot fail
|
||||||
|
Loading…
x
Reference in New Issue
Block a user