Address the potential system TPL does not been restore.

This patch make sure the TPL been raised and restored in pair.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Deric Cole <Deric_Cole@phoenix.com>
Reviewed-by: Elvin Li <elvin.li@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16556 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Deric Cole 2014-12-24 00:53:11 +00:00 committed by li-elvin
parent 0b13fe741b
commit 0927c81df6
1 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,7 @@
/** @file
ConsoleOut Routines that speak VGA.
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@ -2202,15 +2202,18 @@ BiosKeyboardSetState (
Status = KeyboardWrite (BiosKeyboardPrivate, 0xed);
if (EFI_ERROR (Status)) {
return EFI_DEVICE_ERROR;
Status = EFI_DEVICE_ERROR;
goto Exit;
}
Status = KeyboardWaitForValue (BiosKeyboardPrivate, 0xfa, KEYBOARD_WAITFORVALUE_TIMEOUT);
if (EFI_ERROR (Status)) {
return EFI_DEVICE_ERROR;
Status = EFI_DEVICE_ERROR;
goto Exit;
}
Status = KeyboardWrite (BiosKeyboardPrivate, Command);
if (EFI_ERROR (Status)) {
return EFI_DEVICE_ERROR;
Status = EFI_DEVICE_ERROR;
goto Exit;
}
//
// Call Legacy BIOS Protocol to set whatever is necessary
@ -2219,6 +2222,7 @@ BiosKeyboardSetState (
Status = EFI_SUCCESS;
Exit:
//
// Leave critical section and return
//