/** @file\r
ConsoleOut Routines that speak VGA.\r
\r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
// Check bit 6 of Feature Byte 2.\r
// If it is set, then Int 16 Func 09 is supported\r
//\r
- if (*(UINT8 *)(UINTN) ((Regs.X.ES << 4) + Regs.X.BX + 0x06) & 0x40) {\r
+ if (*(UINT8 *) (((UINTN) Regs.X.ES << 4) + Regs.X.BX + 0x06) & 0x40) {\r
//\r
// Get Keyboard Functionality\r
//\r
//\r
// Clear the CTRL and ALT BDA flag\r
//\r
- KbFlag1 = *((UINT8 *) (UINTN) 0x417); // read the STATUS FLAGS 1\r
- KbFlag2 = *((UINT8 *) (UINTN) 0x418); // read STATUS FLAGS 2\r
+ ACCESS_PAGE0_CODE (\r
+ KbFlag1 = *((UINT8 *) (UINTN) 0x417); // read the STATUS FLAGS 1\r
+ KbFlag2 = *((UINT8 *) (UINTN) 0x418); // read STATUS FLAGS 2\r
+ );\r
\r
DEBUG_CODE (\r
{\r
//\r
// Clear left alt and left ctrl BDA flag\r
//\r
- KbFlag2 &= ~(KB_LEFT_ALT_PRESSED | KB_LEFT_CTRL_PRESSED);\r
- *((UINT8 *) (UINTN) 0x418) = KbFlag2;\r
- KbFlag1 &= ~0x0C; \r
- *((UINT8 *) (UINTN) 0x417) = KbFlag1; \r
-\r
+ ACCESS_PAGE0_CODE (\r
+ KbFlag2 &= ~(KB_LEFT_ALT_PRESSED | KB_LEFT_CTRL_PRESSED);\r
+ *((UINT8 *) (UINTN) 0x418) = KbFlag2;\r
+ KbFlag1 &= ~0x0C;\r
+ *((UINT8 *) (UINTN) 0x417) = KbFlag1;\r
+ );\r
\r
//\r
// Output EFI input key and shift/toggle state\r
\r
@param This Protocol instance pointer.\r
@param KeyData A pointer to a buffer that is filled in with the keystroke \r
- information data for the key that was pressed.\r
+ information data for the key that was pressed. If KeyData.Key,\r
+ KeyData.KeyState.KeyToggleState and KeyData.KeyState.KeyShiftState\r
+ are 0, then any incomplete keystroke will trigger a notification of\r
+ the KeyNotificationFunction.\r
@param KeyNotificationFunction Points to the function to be called when the key \r
- sequence is typed specified by KeyData. \r
- @param NotifyHandle Points to the unique handle assigned to the registered notification. \r
+ sequence is typed specified by KeyData. This notification function\r
+ should be called at <=TPL_CALLBACK.\r
+ @param NotifyHandle Points to the unique handle assigned to the registered notification.\r
\r
- \r
@retval EFI_SUCCESS The notification function was registered successfully.\r
@retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data structures.\r
@retval EFI_INVALID_PARAMETER KeyData or NotifyHandle is NULL.\r
- \r
-**/ \r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
BiosKeyboardRegisterKeyNotify (\r