From: "Chai, Evan" <evan.chai@intel.com>
To: devel@edk2.groups.io
Cc: Andrei Warkentin <andrei.warkentin@intel.com>,
Sunil V L <sunilvl@ventanamicro.com>, Yong Li <yong.li@intel.com>
Subject: [edk2-devel] [PATCH 1/3] RISC-V/PlatformBootManagerLib: add terminal interaction interface
Date: Thu, 29 Feb 2024 23:24:50 +0800 [thread overview]
Message-ID: <20240229152452.1096498-2-evan.chai@intel.com> (raw)
In-Reply-To: <20240229152452.1096498-1-evan.chai@intel.com>
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.warkentin@intel.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Yong Li <yong.li@intel.com>
Signed-off-by: Evan Chai <evan.chai@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/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-02-29 15:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 15:24 [edk2-devel] [PATCH 0/3] RISC-V Edk2 Server Platform Reference board Chai, Evan
2024-02-29 15:24 ` Chai, Evan [this message]
2024-02-29 15:24 ` [edk2-devel] [PATCH 2/3] RiscVPlatformPkg: introduce more Pcds for PCI initialization Chai, Evan
2024-02-29 15:24 ` [edk2-devel] [PATCH 3/3] RiscVQemuServerPlatform: create qemu-based server reference board Chai, Evan
2024-03-01 23:55 ` Andrei Warkentin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240229152452.1096498-2-evan.chai@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox