Fixed the hotkey not wokring in SCT(like F5, F6, F9, etc...), causing all SCT tests to be run only through the command line. This change provides a standard terminal interaction interface in the UEFI environment.
Cc: Andrei Warkentin <andrei.warken...@intel.com> Cc: Sunil V L <suni...@ventanamicro.com> Cc: Yong Li <yong...@intel.com> Signed-off-by: Evan Chai <evan.c...@intel.com> --- Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c | 7 ++++++- Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.h | 12 +++++++++++- Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 2 ++ Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformData.c | 15 ++++++++++++++- 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c b/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c index 21667f42..c2336a07 100644 --- a/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c +++ b/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c @@ -2,7 +2,7 @@ This file include all platform actions Copyright (c) 2021-2022, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> -Copyright (c) 2015, Intel Corporation. All rights reserved.<BR> +Copyright (c) 2015 - 2024, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent @@ -169,6 +169,11 @@ PlatformBootManagerBeforeConsole ( // EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid); + // + // Add the hardcoded serial console device path to ConIn, ConOut, ErrOut. + // + PlatformUefiEnvHotkeyRegister (); + // // Update the console variables. // diff --git a/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.h b/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.h index 7da15b01..8b71045f 100644 --- a/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.h +++ b/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.h @@ -2,7 +2,7 @@ Head file for BDS Platform specific code Copyright (c) 2016, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> -Copyright (c) 2015, Intel Corporation. All rights reserved.<BR> +Copyright (c) 2015 - 2024, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent @@ -106,4 +106,14 @@ PlatformBootManagerShowProgress ( IN UINTN PreviousValue ); +/** + It provides a standard interface for interacting with terminal devices in + the UEFI environment. +**/ +VOID +EFIAPI +PlatformUefiEnvHotkeyRegister ( + VOID + ); + #endif // _PLATFORM_BOOT_MANAGER_H diff --git a/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf index caefae3b..0dd0cd67 100644 --- a/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -2,6 +2,7 @@ # Include all platform action which can be customized by IBV/OEM. # # Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> +# Copyright (c) 2024, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -42,6 +43,7 @@ [Guids] gEfiEndOfDxeEventGroupGuid + gEfiTtyTermGuid [Protocols] gEfiGenericMemTestProtocolGuid ## CONSUMES diff --git a/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformData.c b/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformData.c index 4a79c6ca..3b66f3c8 100644 --- a/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformData.c +++ b/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformData.c @@ -3,7 +3,7 @@ ConIn/ConOut variables. Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> -Copyright (c) 2015, Intel Corporation. All rights reserved.<BR> +Copyright (c) 2015 - 2024, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent @@ -51,3 +51,16 @@ PLATFORM_CONSOLE_CONNECT_ENTRY gPlatformConsole[] = { 0 } }; + +/** + It provides a standard interface for interacting with terminal devices in + the UEFI environment. +**/ +VOID +EFIAPI +PlatformUefiEnvHotkeyRegister ( + VOID + ) +{ + CopyGuid (&gSerialConsoleDevicePath0.TerminalType.Guid, &gEfiTtyTermGuid); +} -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116172): https://edk2.groups.io/g/devel/message/116172 Mute This Topic: https://groups.io/mt/104645138/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-