summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Csm
diff options
context:
space:
mode:
authorDeric Cole <Deric_Cole@phoenix.com>2014-12-24 00:53:11 +0000
committerli-elvin <li-elvin@Edk2>2014-12-24 00:53:11 +0000
commit0927c81df6eac780c326866be9cd6116d5556e57 (patch)
tree03a3d69e4ef07719536a00a31de93259d80f7995 /IntelFrameworkModulePkg/Csm
parent0b13fe741b7221514da510c165a55e47a3d377b2 (diff)
downloadedk2-platforms-0927c81df6eac780c326866be9cd6116d5556e57.tar.xz
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
Diffstat (limited to 'IntelFrameworkModulePkg/Csm')
-rw-r--r--IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c
index 4ee20df1f7..8c7019f4f6 100644
--- a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c
+++ b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c
@@ -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
//