mirror of
				https://github.com/acidanthera/audk.git
				synced 2025-11-04 05:25:45 +01:00 
			
		
		
		
	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);
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Drop the TPL level from TPL_APPLICATION to TPL_APPLICATION
 | 
			
		||||
  //
 | 
			
		||||
  gBS->RestoreTPL (TPL_APPLICATION);
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Init the BMM
 | 
			
		||||
  //
 | 
			
		||||
  Status = InitializeBM ();
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Raise the TPL level back to TPL_APPLICATION
 | 
			
		||||
  //
 | 
			
		||||
  gBS->RaiseTPL (TPL_APPLICATION);
 | 
			
		||||
 | 
			
		||||
  return Status;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -174,14 +174,10 @@ BootThisFile (
 | 
			
		||||
  //
 | 
			
		||||
  gST->ConOut->ClearScreen (gST->ConOut);
 | 
			
		||||
 | 
			
		||||
  gBS->RaiseTPL (TPL_APPLICATION);
 | 
			
		||||
 | 
			
		||||
  ExitDataSize  = 0;
 | 
			
		||||
 | 
			
		||||
  Status        = BdsLibBootViaBootOption (Option, Option->DevicePath, &ExitDataSize, &ExitData);
 | 
			
		||||
 | 
			
		||||
  gBS->RestoreTPL (TPL_APPLICATION);
 | 
			
		||||
 | 
			
		||||
  return Status;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -255,11 +255,6 @@ CallBootManager (
 | 
			
		||||
    );
 | 
			
		||||
  FreePool (UpdateData.Data);
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Drop the TPL level from TPL_APPLICATION to TPL_APPLICATION
 | 
			
		||||
  //
 | 
			
		||||
  gBS->RestoreTPL (TPL_APPLICATION);
 | 
			
		||||
 | 
			
		||||
  ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
 | 
			
		||||
  Status = gFormBrowser2->SendForm (
 | 
			
		||||
                           gFormBrowser2,
 | 
			
		||||
@ -275,7 +270,6 @@ CallBootManager (
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (gOption == NULL) {
 | 
			
		||||
    gBS->RaiseTPL (TPL_APPLICATION);
 | 
			
		||||
    return ;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -284,11 +278,6 @@ CallBootManager (
 | 
			
		||||
  //
 | 
			
		||||
  SetupResetReminder ();
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Raise the TPL level back to TPL_APPLICATION
 | 
			
		||||
  //
 | 
			
		||||
  gBS->RaiseTPL (TPL_APPLICATION);
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // parse the selected option
 | 
			
		||||
  //
 | 
			
		||||
@ -304,11 +293,6 @@ CallBootManager (
 | 
			
		||||
                  gST->ConOut,
 | 
			
		||||
                  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);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -348,11 +348,6 @@ CallDeviceManager (
 | 
			
		||||
    &UpdateData[0]
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Drop the TPL level from TPL_APPLICATION to TPL_APPLICATION
 | 
			
		||||
  //
 | 
			
		||||
  gBS->RestoreTPL (TPL_APPLICATION);
 | 
			
		||||
 | 
			
		||||
  ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
 | 
			
		||||
  Status = gFormBrowser2->SendForm (
 | 
			
		||||
                           gFormBrowser2,
 | 
			
		||||
@ -412,7 +407,5 @@ CallDeviceManager (
 | 
			
		||||
  }
 | 
			
		||||
  FreePool (HiiHandles);
 | 
			
		||||
 | 
			
		||||
  gBS->RaiseTPL (TPL_APPLICATION);
 | 
			
		||||
 | 
			
		||||
  return Status;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -467,12 +467,6 @@ CallFrontPage (
 | 
			
		||||
    (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;
 | 
			
		||||
  Status = gFormBrowser2->SendForm (
 | 
			
		||||
                            gFormBrowser2,
 | 
			
		||||
@ -490,7 +484,6 @@ CallFrontPage (
 | 
			
		||||
    EnableResetRequired ();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  gBS->RaiseTPL (TPL_APPLICATION);
 | 
			
		||||
  return Status;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -883,9 +876,7 @@ PlatformBdsEnterFrontPage (
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (TimeoutDefault != 0xffff) {
 | 
			
		||||
    gBS->RestoreTPL (TPL_APPLICATION);
 | 
			
		||||
    Status = ShowProgress (TimeoutDefault);
 | 
			
		||||
    gBS->RaiseTPL (TPL_APPLICATION);
 | 
			
		||||
 | 
			
		||||
    //
 | 
			
		||||
    // 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
 | 
			
		||||
  //
 | 
			
		||||
  gBS->RestoreTPL (TPL_APPLICATION);
 | 
			
		||||
  SetupResetReminder ();
 | 
			
		||||
  gBS->RaiseTPL (TPL_APPLICATION);
 | 
			
		||||
 | 
			
		||||
Exit:
 | 
			
		||||
  //
 | 
			
		||||
 | 
			
		||||
@ -327,7 +327,6 @@ HotkeyCallback (
 | 
			
		||||
  BDS_COMMON_OPTION  *BootOption;
 | 
			
		||||
  UINTN              ExitDataSize;
 | 
			
		||||
  CHAR16             *ExitData;
 | 
			
		||||
  EFI_TPL            OldTpl;
 | 
			
		||||
  EFI_STATUS         Status;
 | 
			
		||||
  EFI_KEY_DATA       *HotkeyData;
 | 
			
		||||
 | 
			
		||||
@ -402,18 +401,10 @@ HotkeyCallback (
 | 
			
		||||
      //
 | 
			
		||||
      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;
 | 
			
		||||
      Status = BdsLibBootViaBootOption (BootOption, BootOption->DevicePath, &ExitDataSize, &ExitData);
 | 
			
		||||
      mHotkeyCallbackPending = FALSE;
 | 
			
		||||
 | 
			
		||||
      gBS->RestoreTPL (OldTpl);
 | 
			
		||||
 | 
			
		||||
      if (EFI_ERROR (Status)) {
 | 
			
		||||
        //
 | 
			
		||||
        // Call platform action to indicate the boot fail
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user