X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FConsole%2FTerminalDxe%2FTerminalConIn.c;h=1c5fd7be4731804f5cdb96808cd6ddfc8228b586;hp=44b62d7aed03fd372b3f74eec8935c60f9a6b045;hb=e5eed7d3641d71d7ea539e5379ea9c6a5cd97004;hpb=0dc99784366897508ea0309df6e2a75f85662fcc diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c index 44b62d7aed..1c5fd7be47 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c @@ -1,8 +1,8 @@ /** @file Implementation for EFI_SIMPLE_TEXT_INPUT_PROTOCOL protocol. -Copyright (c) 2006 - 2008, Intel Corporation.
-All rights reserved. This program and the accompanying materials +Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -113,7 +113,7 @@ TerminalConInReset ( // REPORT_STATUS_CODE_WITH_DEVICE_PATH ( EFI_PROGRESS_CODE, - PcdGet32 (PcdStatusCodeValueRemoteConsoleReset), + (EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_PC_RESET), TerminalDevice->DevicePath ); @@ -129,7 +129,7 @@ TerminalConInReset ( if (EFI_ERROR (Status)) { REPORT_STATUS_CODE_WITH_DEVICE_PATH ( EFI_ERROR_CODE | EFI_ERROR_MINOR, - PcdGet32 (PcdStatusCodeValueRemoteConsoleError), + (EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_CONTROLLER_ERROR), TerminalDevice->DevicePath ); } @@ -426,7 +426,6 @@ TerminalConInRegisterKeyNotify ( @retval EFI_SUCCESS The notification function was unregistered successfully. @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid. - @retval EFI_NOT_FOUND Can not find the matching entry in database. **/ EFI_STATUS @@ -470,7 +469,10 @@ TerminalConInUnregisterKeyNotify ( } } - return EFI_NOT_FOUND; + // + // Can not find the matching entry in database. + // + return EFI_INVALID_PARAMETER; } /** @@ -634,7 +636,7 @@ TerminalConInCheckForKey ( if (Status == EFI_DEVICE_ERROR) { REPORT_STATUS_CODE_WITH_DEVICE_PATH ( EFI_ERROR_CODE | EFI_ERROR_MINOR, - PcdGet32 (PcdStatusCodeValueRemoteConsoleInputError), + (EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_INPUT_ERROR), TerminalDevice->DevicePath ); } @@ -1166,6 +1168,10 @@ UnicodeToEfiKeyFlushState ( There is one special input sequence that will force the system to reset. This is ESC R ESC r ESC R. + Note: current implementation support terminal types include: PC ANSI, VT100+/VTUTF8, VT100. + The table below is not same with UEFI Spec 2.3 Appendix B Table 201(not support ANSI X3.64 / + DEC VT200-500 and extra support PC ANSI, VT100)since UEFI Table 201 is just an example. + Symbols used in table below =========================== ESC = 0x1B @@ -1340,14 +1346,14 @@ UnicodeToEfiKey ( if (TerminalDevice->ResetState == RESET_STATE_DEFAULT) { TerminalDevice->ResetState = RESET_STATE_ESC_R; SetDefaultResetState = FALSE; - } else if (TerminalDevice->ResetState == RESET_STATE_ESC_R_ESC_r) { + } else if (TerminalDevice->ResetState == RESET_STATE_ESC_R_ESC_R) { gRT->ResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL); } Key.ScanCode = SCAN_NULL; break; case 'r': if (TerminalDevice->ResetState == RESET_STATE_ESC_R) { - TerminalDevice->ResetState = RESET_STATE_ESC_R_ESC_r; + TerminalDevice->ResetState = RESET_STATE_ESC_R_ESC_R; SetDefaultResetState = FALSE; } Key.ScanCode = SCAN_NULL;