* [Patch V7 1/3] MinPlatformPkg: Add PCDs for Serial Terminal feature
@ 2020-11-16 1:31 Heng Luo
2020-11-16 1:31 ` [Patch V7 2/3] OpenBoardPkg: Configurae PcdSerialTerminalEnable Heng Luo
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Heng Luo @ 2020-11-16 1:31 UTC (permalink / raw)
To: devel; +Cc: Eric Dong, Chasel Chiu, Nate DeSimone, Liming Gao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3014
Add PcdSerialTerminalEnable to enable/disable Serial Terminal feature,
this feature supports console redirect after the shell is loaded.
Cc: Eric Dong <eric.dong@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Heng Luo <heng.luo@intel.com>
---
Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec | 1 +
Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
index 7ef189dac8..2a831f2669 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
@@ -318,3 +318,4 @@
gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable |FALSE|BOOLEAN|0xF00000A5
gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|FALSE|BOOLEAN|0xF00000A6
gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable |FALSE|BOOLEAN|0xF00000A7
+ gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable |FALSE|BOOLEAN|0xF00000B0
diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
index 112ddff7d9..d0b5593817 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
@@ -1,7 +1,7 @@
## @file
# Platform description.
#
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -44,6 +44,7 @@
gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE
################################################################################
#
--
2.24.0.windows.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Patch V7 2/3] OpenBoardPkg: Configurae PcdSerialTerminalEnable
2020-11-16 1:31 [Patch V7 1/3] MinPlatformPkg: Add PCDs for Serial Terminal feature Heng Luo
@ 2020-11-16 1:31 ` Heng Luo
2020-12-09 8:48 ` Nate DeSimone
2020-12-09 9:12 ` Nate DeSimone
2020-11-16 1:31 ` [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature Heng Luo
` (2 subsequent siblings)
3 siblings, 2 replies; 12+ messages in thread
From: Heng Luo @ 2020-11-16 1:31 UTC (permalink / raw)
To: devel; +Cc: Eric Dong, Chasel Chiu, Nate DeSimone, Liming Gao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3014
Enable Serial Terminal Feature for UpXtreme,
and disable it for other platform by default.
Cc: Eric Dong <eric.dong@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Heng Luo <heng.luo@intel.com>
---
Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkgPcd.dsc | 1 +
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc | 1 +
Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc | 1 +
Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc | 1 +
Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc | 1 +
Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc | 1 +
6 files changed, 6 insertions(+)
diff --git a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkgPcd.dsc b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkgPcd.dsc
index d611e99fc1..589b002d06 100644
--- a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkgPcd.dsc
+++ b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkgPcd.dsc
@@ -131,6 +131,7 @@
gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE
!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc
index 352416a489..44dacdf082 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc
@@ -130,6 +130,7 @@
gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE
!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc
index 9e8b148753..725596cbf7 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc
@@ -168,6 +168,7 @@
gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE
!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE
diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc
index 52cdf9ec0f..251f46f812 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc
+++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc
@@ -50,6 +50,7 @@
gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE
!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE
diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc
index d797ae9d94..e161bf06f4 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc
@@ -127,6 +127,7 @@
gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|TRUE
!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE
diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc
index 5d769e8153..83ada3c95c 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc
@@ -127,6 +127,7 @@
gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE
!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE
--
2.24.0.windows.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature
2020-11-16 1:31 [Patch V7 1/3] MinPlatformPkg: Add PCDs for Serial Terminal feature Heng Luo
2020-11-16 1:31 ` [Patch V7 2/3] OpenBoardPkg: Configurae PcdSerialTerminalEnable Heng Luo
@ 2020-11-16 1:31 ` Heng Luo
2020-11-17 3:17 ` 回复: " gaoliming
2020-12-09 8:47 ` [Patch V7 1/3] MinPlatformPkg: Add PCDs for " Nate DeSimone
2020-12-09 9:12 ` Nate DeSimone
3 siblings, 1 reply; 12+ messages in thread
From: Heng Luo @ 2020-11-16 1:31 UTC (permalink / raw)
To: devel; +Cc: Eric Dong, Chasel Chiu, Nate DeSimone, Liming Gao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3014
1. Add SerialPortTerminalLib to MinPlatformPkg/Library.
2. Add SerialPortTerminalLib to BdsDxe driver, to add the serial device to
ConIn and ConOut variables
3. Include SerialDxe and TerminalDxe to CoreDxeInclude.dsc and
CoreUefiBootInclude.fdf.
Cc: Eric Dong <eric.dong@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Heng Luo <heng.luo@intel.com>
---
Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc | 15 +++++++++++++--
Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf | 8 +++++++-
Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.h | 34 ++++++++++++++++++++++++++++++++++
Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.inf | 40 ++++++++++++++++++++++++++++++++++++++++
5 files changed, 196 insertions(+), 3 deletions(-)
diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
index f0e578f8cc..1038a29c5c 100644
--- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
+++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
@@ -1,7 +1,7 @@
## @file
# Platform description.
#
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -46,7 +46,18 @@
MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
- MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+ MdeModulePkg/Universal/BdsDxe/BdsDxe.inf {
+ <LibraryClasses>
+!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
+ NULL|MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.inf
+!endif
+ }
+
+!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
+ MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
+ MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+!endif
+
MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {
<LibraryClasses>
diff --git a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
index 7859c0b1a5..ef4576eedf 100644
--- a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
+++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
@@ -1,7 +1,7 @@
## @file
# FDF file of Platform.
#
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -26,6 +26,12 @@ INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+
+!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
+INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
+INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+!endif
+
INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
diff --git a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.c b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.c
new file mode 100644
index 0000000000..66e8ee018b
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.c
@@ -0,0 +1,102 @@
+/** @file
+ Main file for NULL named library for Serial Port Terminal Redirection library.
+
+ Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include "SerialPortTerminalLib.h"
+
+GLOBAL_REMOVE_IF_UNREFERENCED SERIAL_DEVICE_PATH mSerialDevicePath = {
+ {
+ {
+ HARDWARE_DEVICE_PATH,
+ HW_VENDOR_DP,
+ {
+ (UINT8) sizeof (VENDOR_DEVICE_PATH),
+ (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
+ }
+ },
+ EDKII_SERIAL_PORT_LIB_VENDOR_GUID
+ },
+ {
+ {
+ MESSAGING_DEVICE_PATH,
+ MSG_UART_DP,
+ {
+ (UINT8) sizeof (UART_DEVICE_PATH),
+ (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8)
+ }
+ },
+ 0, // Reserved
+ 0, // BaudRate
+ 0, // DataBits
+ 0, // Parity
+ 0 // StopBits
+ },
+ {
+ {
+ MESSAGING_DEVICE_PATH,
+ MSG_VENDOR_DP,
+ {
+ (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
+ (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),
+ }
+ },
+ DEVICE_PATH_MESSAGING_PC_ANSI
+ },
+ gEndEntire
+};
+
+/**
+ Updates the ConOut, ConIn, ErrOut variables with the serial terminal device path
+ @param none
+ @retval none
+**/
+VOID
+AddSerialTerminal (
+ VOID
+ )
+{
+ DEBUG ((DEBUG_INFO, "[AddSerialPortTerminal]\n"));
+
+ //
+ // Append Serial Terminal into "ConIn"
+ //
+ EfiBootManagerUpdateConsoleVariable (ConOut, (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
+ EfiBootManagerUpdateConsoleVariable (ConIn, (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
+ EfiBootManagerUpdateConsoleVariable (ErrOut, (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
+}
+
+
+/**
+ Constructor for the Serial Port Device controller library.
+
+ @param ImageHandle the image handle of the process
+ @param SystemTable the EFI System Table pointer
+
+ @retval EFI_SUCCESS the shell command handlers were installed sucessfully
+ @retval EFI_UNSUPPORTED the shell level required was not found.
+**/
+EFI_STATUS
+EFIAPI
+SerialPortTerminalLibConstructor (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+ mSerialDevicePath.Uart.BaudRate = PcdGet64(PcdUartDefaultBaudRate);
+ mSerialDevicePath.Uart.DataBits = PcdGet8(PcdUartDefaultDataBits);
+ mSerialDevicePath.Uart.Parity = PcdGet8(PcdUartDefaultParity);
+ mSerialDevicePath.Uart.StopBits = PcdGet8(PcdUartDefaultStopBits);
+ DEBUG ((DEBUG_INFO, "[SerialPortTerminalLibConstructor] [%d, %d, %d, %d]\n",
+ mSerialDevicePath.Uart.BaudRate,
+ mSerialDevicePath.Uart.DataBits,
+ mSerialDevicePath.Uart.Parity,
+ mSerialDevicePath.Uart.StopBits));
+
+ AddSerialTerminal();
+
+ return EFI_SUCCESS;
+}
diff --git a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.h b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.h
new file mode 100644
index 0000000000..bfa73cca7d
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.h
@@ -0,0 +1,34 @@
+/** @file
+ Header file for NULL named library for for Serial Port Terminal Redirection library.
+
+ Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _SERIAL_PORT_TERMINAL_LIB_H_
+#define _SERIAL_PORT_TERMINAL_LIB_H_
+
+#include <Uefi.h>
+#include <Guid/SerialPortLibVendor.h>
+#include <Library/UefiLib.h>
+#include <Library/DevicePathLib.h>
+#include <Library/DebugLib.h>
+#include <Library/UefiBootManagerLib.h>
+
+//
+// Below is the platform console device path
+//
+typedef struct {
+ VENDOR_DEVICE_PATH Guid;
+ UART_DEVICE_PATH Uart;
+ VENDOR_DEVICE_PATH TerminalType;
+ EFI_DEVICE_PATH_PROTOCOL End;
+} SERIAL_DEVICE_PATH;
+
+#define gEndEntire \
+ { \
+ END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, { END_DEVICE_PATH_LENGTH, 0 } \
+ }
+
+#endif
diff --git a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.inf b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.inf
new file mode 100644
index 0000000000..2d95fe79f2
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.inf
@@ -0,0 +1,40 @@
+## @file
+# Component information file for Serial Port Terminal Redirection Library
+#
+# INTEL CONFIDENTIAL
+# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+[Defines]
+ INF_VERSION = 0x00010006
+ BASE_NAME = SerialPortTerminalLib
+ FILE_GUID = E12BFA46-95F2-4ADC-9774-7E38DE78741E
+ MODULE_TYPE = UEFI_DRIVER
+ VERSION_STRING = 1.2
+ LIBRARY_CLASS = NULL|UEFI_DRIVER DXE_DRIVER DXE_RUNTIME_DRIVER
+ CONSTRUCTOR = SerialPortTerminalLibConstructor
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ BoardModulePkg/BoardModulePkg.dec
+ MinPlatformPkg/MinPlatformPkg.dec
+
+[Sources]
+ SerialPortTerminalLib.c
+ SerialPortTerminalLib.h
+
+[LibraryClasses]
+ DevicePathLib
+ DebugLib
+ UefiDriverEntryPoint
+ UefiBootManagerLib
+ UefiLib
+
+[Pcd]
+ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate
+ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
+ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
+ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits
--
2.24.0.windows.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* 回复: [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature
2020-11-16 1:31 ` [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature Heng Luo
@ 2020-11-17 3:17 ` gaoliming
2020-11-23 1:30 ` [edk2-devel] " Heng Luo
0 siblings, 1 reply; 12+ messages in thread
From: gaoliming @ 2020-11-17 3:17 UTC (permalink / raw)
To: 'Heng Luo', devel
Cc: 'Eric Dong', 'Chasel Chiu',
'Nate DeSimone'
Heng:
Thanks for your update. This version is good to me. Reviewed-by: Liming
Gao <gaoliming@byosoft.com.cn>
Besides, please let me know your test case for this case.
Thanks
Liming
> -----邮件原件-----
> 发件人: Heng Luo <heng.luo@intel.com>
> 发送时间: 2020年11月16日 9:31
> 收件人: devel@edk2.groups.io
> 抄送: Eric Dong <eric.dong@intel.com>; Chasel Chiu
> <chasel.chiu@intel.com>; Nate DeSimone <nathaniel.l.desimone@intel.com>;
> Liming Gao <gaoliming@byosoft.com.cn>
> 主题: [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport
> Serial Terminal feature
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3014
>
> 1. Add SerialPortTerminalLib to MinPlatformPkg/Library.
> 2. Add SerialPortTerminalLib to BdsDxe driver, to add the serial device to
> ConIn and ConOut variables
> 3. Include SerialDxe and TerminalDxe to CoreDxeInclude.dsc and
> CoreUefiBootInclude.fdf.
>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Signed-off-by: Heng Luo <heng.luo@intel.com>
> ---
> Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> | 15 +++++++++++++--
> Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> | 8 +++++++-
>
>
Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTermi
> nalLib.c | 102
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++++++++++++++
>
>
Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTermi
> nalLib.h | 34 ++++++++++++++++++++++++++++++++++
>
>
Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTermi
> nalLib.inf | 40 ++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 196 insertions(+), 3 deletions(-)
>
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> index f0e578f8cc..1038a29c5c 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> @@ -1,7 +1,7 @@
> ## @file
>
> # Platform description.
>
> #
>
> -# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
>
> +# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR>
>
> #
>
> # SPDX-License-Identifier: BSD-2-Clause-Patent
>
> #
>
> @@ -46,7 +46,18 @@
>
>
>
> MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounte
> rRuntimeDxe.inf
>
>
>
> - MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
>
> + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf {
>
> + <LibraryClasses>
>
> +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
>
> +
> NULL|MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLib.in
> f
>
> +!endif
>
> + }
>
> +
>
> +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
>
> + MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
>
> + MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
>
> +!endif
>
> +
>
>
> MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerD
> xe.inf
>
> MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {
>
> <LibraryClasses>
>
> diff --git
> a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> index 7859c0b1a5..ef4576eedf 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> +++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> @@ -1,7 +1,7 @@
> ## @file
>
> # FDF file of Platform.
>
> #
>
> -# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
>
> +# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR>
>
> #
>
> # SPDX-License-Identifier: BSD-2-Clause-Patent
>
> #
>
> @@ -26,6 +26,12 @@ INF
> MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
> INF
> MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounte
> rRuntimeDxe.inf
>
>
>
> INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
>
> +
>
> +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
>
> +INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
>
> +INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
>
> +!endif
>
> +
>
> INF
> MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerD
> xe.inf
>
> INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
>
> INF
> MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
>
> diff --git
>
a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> minalLib.c
>
b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> minalLib.c
> new file mode 100644
> index 0000000000..66e8ee018b
> --- /dev/null
> +++
>
b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> minalLib.c
> @@ -0,0 +1,102 @@
> +/** @file
>
> + Main file for NULL named library for Serial Port Terminal Redirection
> library.
>
> +
>
> + Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
>
> + SPDX-License-Identifier: BSD-2-Clause-Patent
>
> +
>
> +**/
>
> +
>
> +#include "SerialPortTerminalLib.h"
>
> +
>
> +GLOBAL_REMOVE_IF_UNREFERENCED SERIAL_DEVICE_PATH
> mSerialDevicePath = {
>
> + {
>
> + {
>
> + HARDWARE_DEVICE_PATH,
>
> + HW_VENDOR_DP,
>
> + {
>
> + (UINT8) sizeof (VENDOR_DEVICE_PATH),
>
> + (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
>
> + }
>
> + },
>
> + EDKII_SERIAL_PORT_LIB_VENDOR_GUID
>
> + },
>
> + {
>
> + {
>
> + MESSAGING_DEVICE_PATH,
>
> + MSG_UART_DP,
>
> + {
>
> + (UINT8) sizeof (UART_DEVICE_PATH),
>
> + (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8)
>
> + }
>
> + },
>
> + 0, // Reserved
>
> + 0, // BaudRate
>
> + 0, // DataBits
>
> + 0, // Parity
>
> + 0 // StopBits
>
> + },
>
> + {
>
> + {
>
> + MESSAGING_DEVICE_PATH,
>
> + MSG_VENDOR_DP,
>
> + {
>
> + (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
>
> + (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),
>
> + }
>
> + },
>
> + DEVICE_PATH_MESSAGING_PC_ANSI
>
> + },
>
> + gEndEntire
>
> +};
>
> +
>
> +/**
>
> + Updates the ConOut, ConIn, ErrOut variables with the serial terminal
> device path
>
> + @param none
>
> + @retval none
>
> +**/
>
> +VOID
>
> +AddSerialTerminal (
>
> + VOID
>
> + )
>
> +{
>
> + DEBUG ((DEBUG_INFO, "[AddSerialPortTerminal]\n"));
>
> +
>
> + //
>
> + // Append Serial Terminal into "ConIn"
>
> + //
>
> + EfiBootManagerUpdateConsoleVariable (ConOut,
> (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
>
> + EfiBootManagerUpdateConsoleVariable (ConIn,
> (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
>
> + EfiBootManagerUpdateConsoleVariable (ErrOut,
> (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
>
> +}
>
> +
>
> +
>
> +/**
>
> + Constructor for the Serial Port Device controller library.
>
> +
>
> + @param ImageHandle the image handle of the process
>
> + @param SystemTable the EFI System Table pointer
>
> +
>
> + @retval EFI_SUCCESS the shell command handlers were
> installed sucessfully
>
> + @retval EFI_UNSUPPORTED the shell level required was not found.
>
> +**/
>
> +EFI_STATUS
>
> +EFIAPI
>
> +SerialPortTerminalLibConstructor (
>
> + IN EFI_HANDLE ImageHandle,
>
> + IN EFI_SYSTEM_TABLE *SystemTable
>
> + )
>
> +{
>
> + mSerialDevicePath.Uart.BaudRate = PcdGet64(PcdUartDefaultBaudRate);
>
> + mSerialDevicePath.Uart.DataBits = PcdGet8(PcdUartDefaultDataBits);
>
> + mSerialDevicePath.Uart.Parity = PcdGet8(PcdUartDefaultParity);
>
> + mSerialDevicePath.Uart.StopBits = PcdGet8(PcdUartDefaultStopBits);
>
> + DEBUG ((DEBUG_INFO, "[SerialPortTerminalLibConstructor]
> [%d, %d, %d, %d]\n",
>
> + mSerialDevicePath.Uart.BaudRate,
>
> + mSerialDevicePath.Uart.DataBits,
>
> + mSerialDevicePath.Uart.Parity,
>
> + mSerialDevicePath.Uart.StopBits));
>
> +
>
> + AddSerialTerminal();
>
> +
>
> + return EFI_SUCCESS;
>
> +}
>
> diff --git
>
a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> minalLib.h
>
b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> minalLib.h
> new file mode 100644
> index 0000000000..bfa73cca7d
> --- /dev/null
> +++
>
b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> minalLib.h
> @@ -0,0 +1,34 @@
> +/** @file
>
> + Header file for NULL named library for for Serial Port Terminal
Redirection
> library.
>
> +
>
> + Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
>
> + SPDX-License-Identifier: BSD-2-Clause-Patent
>
> +
>
> +**/
>
> +
>
> +#ifndef _SERIAL_PORT_TERMINAL_LIB_H_
>
> +#define _SERIAL_PORT_TERMINAL_LIB_H_
>
> +
>
> +#include <Uefi.h>
>
> +#include <Guid/SerialPortLibVendor.h>
>
> +#include <Library/UefiLib.h>
>
> +#include <Library/DevicePathLib.h>
>
> +#include <Library/DebugLib.h>
>
> +#include <Library/UefiBootManagerLib.h>
>
> +
>
> +//
>
> +// Below is the platform console device path
>
> +//
>
> +typedef struct {
>
> + VENDOR_DEVICE_PATH Guid;
>
> + UART_DEVICE_PATH Uart;
>
> + VENDOR_DEVICE_PATH TerminalType;
>
> + EFI_DEVICE_PATH_PROTOCOL End;
>
> +} SERIAL_DEVICE_PATH;
>
> +
>
> +#define gEndEntire \
>
> + { \
>
> + END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE,
> { END_DEVICE_PATH_LENGTH, 0 } \
>
> + }
>
> +
>
> +#endif
>
> diff --git
>
a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> minalLib.inf
>
b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> minalLib.inf
> new file mode 100644
> index 0000000000..2d95fe79f2
> --- /dev/null
> +++
>
b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> minalLib.inf
> @@ -0,0 +1,40 @@
> +## @file
>
> +# Component information file for Serial Port Terminal Redirection Library
>
> +#
>
> +# INTEL CONFIDENTIAL
>
> +# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
>
> +#
>
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
>
> +#
>
> +##
>
> +[Defines]
>
> + INF_VERSION = 0x00010006
>
> + BASE_NAME = SerialPortTerminalLib
>
> + FILE_GUID =
> E12BFA46-95F2-4ADC-9774-7E38DE78741E
>
> + MODULE_TYPE = UEFI_DRIVER
>
> + VERSION_STRING = 1.2
>
> + LIBRARY_CLASS = NULL|UEFI_DRIVER DXE_DRIVER
> DXE_RUNTIME_DRIVER
>
> + CONSTRUCTOR =
> SerialPortTerminalLibConstructor
>
> +
>
> +[Packages]
>
> + MdePkg/MdePkg.dec
>
> + MdeModulePkg/MdeModulePkg.dec
>
> + BoardModulePkg/BoardModulePkg.dec
>
> + MinPlatformPkg/MinPlatformPkg.dec
>
> +
>
> +[Sources]
>
> + SerialPortTerminalLib.c
>
> + SerialPortTerminalLib.h
>
> +
>
> +[LibraryClasses]
>
> + DevicePathLib
>
> + DebugLib
>
> + UefiDriverEntryPoint
>
> + UefiBootManagerLib
>
> + UefiLib
>
> +
>
> +[Pcd]
>
> + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate
>
> + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
>
> + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
>
> + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits
>
> --
> 2.24.0.windows.2
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [edk2-devel] 回复: [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature
2020-11-17 3:17 ` 回复: " gaoliming
@ 2020-11-23 1:30 ` Heng Luo
2020-11-24 6:22 ` Dong, Eric
0 siblings, 1 reply; 12+ messages in thread
From: Heng Luo @ 2020-11-23 1:30 UTC (permalink / raw)
To: devel@edk2.groups.io, gaoliming@byosoft.com.cn
Cc: Dong, Eric, Chiu, Chasel, Desimone, Nathaniel L
Hi Chasel and Eric,
Could you help to review the patches?
Nate is on vacation now, I have fixed the bug in patch V6 Nate mentioned, I think he have no more comments.
Thanks,
Heng
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> gaoliming
> Sent: Tuesday, November 17, 2020 11:17 AM
> To: Luo, Heng <heng.luo@intel.com>; devel@edk2.groups.io
> Cc: Dong, Eric <eric.dong@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>;
> Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
> Subject: [edk2-devel] 回复: [Patch V7 3/3] MinPlatformPkg: Add
> SerialPortTerminalLib to suport Serial Terminal feature
>
> Heng:
> Thanks for your update. This version is good to me. Reviewed-by: Liming
> Gao <gaoliming@byosoft.com.cn>
>
> Besides, please let me know your test case for this case.
>
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: Heng Luo <heng.luo@intel.com>
> > 发送时间: 2020年11月16日 9:31
> > 收件人: devel@edk2.groups.io
> > 抄送: Eric Dong <eric.dong@intel.com>; Chasel Chiu
> > <chasel.chiu@intel.com>; Nate DeSimone
> > <nathaniel.l.desimone@intel.com>; Liming Gao
> > <gaoliming@byosoft.com.cn>
> > 主题: [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport
> > Serial Terminal feature
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3014
> >
> > 1. Add SerialPortTerminalLib to MinPlatformPkg/Library.
> > 2. Add SerialPortTerminalLib to BdsDxe driver, to add the serial device to
> > ConIn and ConOut variables
> > 3. Include SerialDxe and TerminalDxe to CoreDxeInclude.dsc and
> > CoreUefiBootInclude.fdf.
> >
> > Cc: Eric Dong <eric.dong@intel.com>
> > Cc: Chasel Chiu <chasel.chiu@intel.com>
> > Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Signed-off-by: Heng Luo <heng.luo@intel.com>
> > ---
> > Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > | 15 +++++++++++++--
> > Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> > | 8 +++++++-
> >
> >
> Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerm
> i
> > nalLib.c | 102
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > ++++++++++++++++++++++++++++++++++++++++
> >
> >
> Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerm
> i
> > nalLib.h | 34 ++++++++++++++++++++++++++++++++++
> >
> >
> Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerm
> i
> > nalLib.inf | 40 ++++++++++++++++++++++++++++++++++++++++
> > 5 files changed, 196 insertions(+), 3 deletions(-)
> >
> > diff --git
> > a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > index f0e578f8cc..1038a29c5c 100644
> > --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > @@ -1,7 +1,7 @@
> > ## @file
> >
> > # Platform description.
> >
> > #
> >
> > -# Copyright (c) 2017 - 2019, Intel Corporation. All rights
> > reserved.<BR>
> >
> > +# Copyright (c) 2017 - 2020, Intel Corporation. All rights
> > +reserved.<BR>
> >
> > #
> >
> > # SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > #
> >
> > @@ -46,7 +46,18 @@
> >
> >
> >
> >
> MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCount
> e
> > rRuntimeDxe.inf
> >
> >
> >
> > - MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
> >
> > + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf {
> >
> > + <LibraryClasses>
> >
> > +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
> >
> > +
> > NULL|MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLi
> > NULL|b.in
> > f
> >
> > +!endif
> >
> > + }
> >
> > +
> >
> > +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
> >
> > + MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
> >
> > + MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
> >
> > +!endif
> >
> > +
> >
> >
> >
> MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerD
> > xe.inf
> >
> > MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {
> >
> > <LibraryClasses>
> >
> > diff --git
> > a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> > b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> > index 7859c0b1a5..ef4576eedf 100644
> > ---
> > a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> > +++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fd
> > +++ f
> > @@ -1,7 +1,7 @@
> > ## @file
> >
> > # FDF file of Platform.
> >
> > #
> >
> > -# Copyright (c) 2017 - 2019, Intel Corporation. All rights
> > reserved.<BR>
> >
> > +# Copyright (c) 2017 - 2020, Intel Corporation. All rights
> > +reserved.<BR>
> >
> > #
> >
> > # SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > #
> >
> > @@ -26,6 +26,12 @@ INF
> > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
> > INF
> >
> MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCount
> e
> > rRuntimeDxe.inf
> >
> >
> >
> > INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
> >
> > +
> >
> > +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
> >
> > +INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
> >
> > +INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
> >
> > +!endif
> >
> > +
> >
> > INF
> >
> MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerD
> > xe.inf
> >
> > INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
> >
> > INF
> > MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
> >
> > diff --git
> >
> a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.c
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.c
> > new file mode 100644
> > index 0000000000..66e8ee018b
> > --- /dev/null
> > +++
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.c
> > @@ -0,0 +1,102 @@
> > +/** @file
> >
> > + Main file for NULL named library for Serial Port Terminal
> > + Redirection
> > library.
> >
> > +
> >
> > + Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> >
> > + SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > +
> >
> > +**/
> >
> > +
> >
> > +#include "SerialPortTerminalLib.h"
> >
> > +
> >
> > +GLOBAL_REMOVE_IF_UNREFERENCED SERIAL_DEVICE_PATH
> > mSerialDevicePath = {
> >
> > + {
> >
> > + {
> >
> > + HARDWARE_DEVICE_PATH,
> >
> > + HW_VENDOR_DP,
> >
> > + {
> >
> > + (UINT8) sizeof (VENDOR_DEVICE_PATH),
> >
> > + (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
> >
> > + }
> >
> > + },
> >
> > + EDKII_SERIAL_PORT_LIB_VENDOR_GUID
> >
> > + },
> >
> > + {
> >
> > + {
> >
> > + MESSAGING_DEVICE_PATH,
> >
> > + MSG_UART_DP,
> >
> > + {
> >
> > + (UINT8) sizeof (UART_DEVICE_PATH),
> >
> > + (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8)
> >
> > + }
> >
> > + },
> >
> > + 0, // Reserved
> >
> > + 0, // BaudRate
> >
> > + 0, // DataBits
> >
> > + 0, // Parity
> >
> > + 0 // StopBits
> >
> > + },
> >
> > + {
> >
> > + {
> >
> > + MESSAGING_DEVICE_PATH,
> >
> > + MSG_VENDOR_DP,
> >
> > + {
> >
> > + (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
> >
> > + (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),
> >
> > + }
> >
> > + },
> >
> > + DEVICE_PATH_MESSAGING_PC_ANSI
> >
> > + },
> >
> > + gEndEntire
> >
> > +};
> >
> > +
> >
> > +/**
> >
> > + Updates the ConOut, ConIn, ErrOut variables with the serial
> > + terminal
> > device path
> >
> > + @param none
> >
> > + @retval none
> >
> > +**/
> >
> > +VOID
> >
> > +AddSerialTerminal (
> >
> > + VOID
> >
> > + )
> >
> > +{
> >
> > + DEBUG ((DEBUG_INFO, "[AddSerialPortTerminal]\n"));
> >
> > +
> >
> > + //
> >
> > + // Append Serial Terminal into "ConIn"
> >
> > + //
> >
> > + EfiBootManagerUpdateConsoleVariable (ConOut,
> > (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
> >
> > + EfiBootManagerUpdateConsoleVariable (ConIn,
> > (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
> >
> > + EfiBootManagerUpdateConsoleVariable (ErrOut,
> > (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
> >
> > +}
> >
> > +
> >
> > +
> >
> > +/**
> >
> > + Constructor for the Serial Port Device controller library.
> >
> > +
> >
> > + @param ImageHandle the image handle of the process
> >
> > + @param SystemTable the EFI System Table pointer
> >
> > +
> >
> > + @retval EFI_SUCCESS the shell command handlers were
> > installed sucessfully
> >
> > + @retval EFI_UNSUPPORTED the shell level required was not found.
> >
> > +**/
> >
> > +EFI_STATUS
> >
> > +EFIAPI
> >
> > +SerialPortTerminalLibConstructor (
> >
> > + IN EFI_HANDLE ImageHandle,
> >
> > + IN EFI_SYSTEM_TABLE *SystemTable
> >
> > + )
> >
> > +{
> >
> > + mSerialDevicePath.Uart.BaudRate = PcdGet64(PcdUartDefaultBaudRate);
> >
> > + mSerialDevicePath.Uart.DataBits = PcdGet8(PcdUartDefaultDataBits);
> >
> > + mSerialDevicePath.Uart.Parity = PcdGet8(PcdUartDefaultParity);
> >
> > + mSerialDevicePath.Uart.StopBits = PcdGet8(PcdUartDefaultStopBits);
> >
> > + DEBUG ((DEBUG_INFO, "[SerialPortTerminalLibConstructor]
> > [%d, %d, %d, %d]\n",
> >
> > + mSerialDevicePath.Uart.BaudRate,
> >
> > + mSerialDevicePath.Uart.DataBits,
> >
> > + mSerialDevicePath.Uart.Parity,
> >
> > + mSerialDevicePath.Uart.StopBits));
> >
> > +
> >
> > + AddSerialTerminal();
> >
> > +
> >
> > + return EFI_SUCCESS;
> >
> > +}
> >
> > diff --git
> >
> a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.h
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.h
> > new file mode 100644
> > index 0000000000..bfa73cca7d
> > --- /dev/null
> > +++
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.h
> > @@ -0,0 +1,34 @@
> > +/** @file
> >
> > + Header file for NULL named library for for Serial Port Terminal
> Redirection
> > library.
> >
> > +
> >
> > + Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> >
> > + SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > +
> >
> > +**/
> >
> > +
> >
> > +#ifndef _SERIAL_PORT_TERMINAL_LIB_H_
> >
> > +#define _SERIAL_PORT_TERMINAL_LIB_H_
> >
> > +
> >
> > +#include <Uefi.h>
> >
> > +#include <Guid/SerialPortLibVendor.h>
> >
> > +#include <Library/UefiLib.h>
> >
> > +#include <Library/DevicePathLib.h>
> >
> > +#include <Library/DebugLib.h>
> >
> > +#include <Library/UefiBootManagerLib.h>
> >
> > +
> >
> > +//
> >
> > +// Below is the platform console device path
> >
> > +//
> >
> > +typedef struct {
> >
> > + VENDOR_DEVICE_PATH Guid;
> >
> > + UART_DEVICE_PATH Uart;
> >
> > + VENDOR_DEVICE_PATH TerminalType;
> >
> > + EFI_DEVICE_PATH_PROTOCOL End;
> >
> > +} SERIAL_DEVICE_PATH;
> >
> > +
> >
> > +#define gEndEntire \
> >
> > + { \
> >
> > + END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE,
> > { END_DEVICE_PATH_LENGTH, 0 } \
> >
> > + }
> >
> > +
> >
> > +#endif
> >
> > diff --git
> >
> a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.inf
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.inf
> > new file mode 100644
> > index 0000000000..2d95fe79f2
> > --- /dev/null
> > +++
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.inf
> > @@ -0,0 +1,40 @@
> > +## @file
> >
> > +# Component information file for Serial Port Terminal Redirection
> > +Library
> >
> > +#
> >
> > +# INTEL CONFIDENTIAL
> >
> > +# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> >
> > +#
> >
> > +# SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > +#
> >
> > +##
> >
> > +[Defines]
> >
> > + INF_VERSION = 0x00010006
> >
> > + BASE_NAME = SerialPortTerminalLib
> >
> > + FILE_GUID =
> > E12BFA46-95F2-4ADC-9774-7E38DE78741E
> >
> > + MODULE_TYPE = UEFI_DRIVER
> >
> > + VERSION_STRING = 1.2
> >
> > + LIBRARY_CLASS = NULL|UEFI_DRIVER DXE_DRIVER
> > DXE_RUNTIME_DRIVER
> >
> > + CONSTRUCTOR =
> > SerialPortTerminalLibConstructor
> >
> > +
> >
> > +[Packages]
> >
> > + MdePkg/MdePkg.dec
> >
> > + MdeModulePkg/MdeModulePkg.dec
> >
> > + BoardModulePkg/BoardModulePkg.dec
> >
> > + MinPlatformPkg/MinPlatformPkg.dec
> >
> > +
> >
> > +[Sources]
> >
> > + SerialPortTerminalLib.c
> >
> > + SerialPortTerminalLib.h
> >
> > +
> >
> > +[LibraryClasses]
> >
> > + DevicePathLib
> >
> > + DebugLib
> >
> > + UefiDriverEntryPoint
> >
> > + UefiBootManagerLib
> >
> > + UefiLib
> >
> > +
> >
> > +[Pcd]
> >
> > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate
> >
> > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
> >
> > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
> >
> > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits
> >
> > --
> > 2.24.0.windows.2
>
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [edk2-devel] 回复: [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature
2020-11-23 1:30 ` [edk2-devel] " Heng Luo
@ 2020-11-24 6:22 ` Dong, Eric
2020-12-08 2:01 ` Heng Luo
0 siblings, 1 reply; 12+ messages in thread
From: Dong, Eric @ 2020-11-24 6:22 UTC (permalink / raw)
To: Luo, Heng, devel@edk2.groups.io, gaoliming@byosoft.com.cn
Cc: Chiu, Chasel, Desimone, Nathaniel L
[-- Attachment #1: Type: text/plain, Size: 15051 bytes --]
Reviewed-by: Eric Dong <eric.dong@intel.com>
From: Luo, Heng <heng.luo@intel.com>
Sent: Monday, November 23, 2020 9:31 AM
To: devel@edk2.groups.io; gaoliming@byosoft.com.cn
Cc: Dong, Eric <eric.dong@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
Subject: RE: [edk2-devel] 回复: [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature
Hi Chasel and Eric,
Could you help to review the patches?
Nate is on vacation now, I have fixed the bug in patch V6 Nate mentioned, I think he have no more comments.
Thanks,
Heng
> -----Original Message-----
> From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of
> gaoliming
> Sent: Tuesday, November 17, 2020 11:17 AM
> To: Luo, Heng <heng.luo@intel.com<mailto:heng.luo@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Cc: Dong, Eric <eric.dong@intel.com<mailto:eric.dong@intel.com>>; Chiu, Chasel <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>;
> Desimone, Nathaniel L <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>
> Subject: [edk2-devel] 回复: [Patch V7 3/3] MinPlatformPkg: Add
> SerialPortTerminalLib to suport Serial Terminal feature
>
> Heng:
> Thanks for your update. This version is good to me. Reviewed-by: Liming
> Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
>
> Besides, please let me know your test case for this case.
>
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: Heng Luo <heng.luo@intel.com<mailto:heng.luo@intel.com>>
> > 发送时间: 2020年11月16日 9:31
> > 收件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> > 抄送: Eric Dong <eric.dong@intel.com<mailto:eric.dong@intel.com>>; Chasel Chiu
> > <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>; Nate DeSimone
> > <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>; Liming Gao
> > <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
> > 主题: [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport
> > Serial Terminal feature
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3014
> >
> > 1. Add SerialPortTerminalLib to MinPlatformPkg/Library.
> > 2. Add SerialPortTerminalLib to BdsDxe driver, to add the serial device to
> > ConIn and ConOut variables
> > 3. Include SerialDxe and TerminalDxe to CoreDxeInclude.dsc and
> > CoreUefiBootInclude.fdf.
> >
> > Cc: Eric Dong <eric.dong@intel.com<mailto:eric.dong@intel.com>>
> > Cc: Chasel Chiu <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>
> > Cc: Nate DeSimone <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
> > Signed-off-by: Heng Luo <heng.luo@intel.com<mailto:heng.luo@intel.com>>
> > ---
> > Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > | 15 +++++++++++++--
> > Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> > | 8 +++++++-
> >
> >
> Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerm
> i
> > nalLib.c | 102
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > ++++++++++++++++++++++++++++++++++++++++
> >
> >
> Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerm
> i
> > nalLib.h | 34 ++++++++++++++++++++++++++++++++++
> >
> >
> Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerm
> i
> > nalLib.inf | 40 ++++++++++++++++++++++++++++++++++++++++
> > 5 files changed, 196 insertions(+), 3 deletions(-)
> >
> > diff --git
> > a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > index f0e578f8cc..1038a29c5c 100644
> > --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > @@ -1,7 +1,7 @@
> > ## @file
> >
> > # Platform description.
> >
> > #
> >
> > -# Copyright (c) 2017 - 2019, Intel Corporation. All rights
> > reserved.<BR>
> >
> > +# Copyright (c) 2017 - 2020, Intel Corporation. All rights
> > +reserved.<BR>
> >
> > #
> >
> > # SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > #
> >
> > @@ -46,7 +46,18 @@
> >
> >
> >
> >
> MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCount
> e
> > rRuntimeDxe.inf
> >
> >
> >
> > - MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
> >
> > + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf {
> >
> > + <LibraryClasses>
> >
> > +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
> >
> > +
> > NULL|MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLi
> > NULL|b.in
> > f
> >
> > +!endif
> >
> > + }
> >
> > +
> >
> > +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
> >
> > + MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
> >
> > + MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
> >
> > +!endif
> >
> > +
> >
> >
> >
> MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerD
> > xe.inf
> >
> > MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {
> >
> > <LibraryClasses>
> >
> > diff --git
> > a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> > b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> > index 7859c0b1a5..ef4576eedf 100644
> > ---
> > a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> > +++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fd
> > +++ f
> > @@ -1,7 +1,7 @@
> > ## @file
> >
> > # FDF file of Platform.
> >
> > #
> >
> > -# Copyright (c) 2017 - 2019, Intel Corporation. All rights
> > reserved.<BR>
> >
> > +# Copyright (c) 2017 - 2020, Intel Corporation. All rights
> > +reserved.<BR>
> >
> > #
> >
> > # SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > #
> >
> > @@ -26,6 +26,12 @@ INF
> > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
> > INF
> >
> MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCount
> e
> > rRuntimeDxe.inf
> >
> >
> >
> > INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
> >
> > +
> >
> > +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
> >
> > +INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
> >
> > +INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
> >
> > +!endif
> >
> > +
> >
> > INF
> >
> MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerD
> > xe.inf
> >
> > INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
> >
> > INF
> > MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
> >
> > diff --git
> >
> a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.c
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.c
> > new file mode 100644
> > index 0000000000..66e8ee018b
> > --- /dev/null
> > +++
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.c
> > @@ -0,0 +1,102 @@
> > +/** @file
> >
> > + Main file for NULL named library for Serial Port Terminal
> > + Redirection
> > library.
> >
> > +
> >
> > + Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> >
> > + SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > +
> >
> > +**/
> >
> > +
> >
> > +#include "SerialPortTerminalLib.h"
> >
> > +
> >
> > +GLOBAL_REMOVE_IF_UNREFERENCED SERIAL_DEVICE_PATH
> > mSerialDevicePath = {
> >
> > + {
> >
> > + {
> >
> > + HARDWARE_DEVICE_PATH,
> >
> > + HW_VENDOR_DP,
> >
> > + {
> >
> > + (UINT8) sizeof (VENDOR_DEVICE_PATH),
> >
> > + (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
> >
> > + }
> >
> > + },
> >
> > + EDKII_SERIAL_PORT_LIB_VENDOR_GUID
> >
> > + },
> >
> > + {
> >
> > + {
> >
> > + MESSAGING_DEVICE_PATH,
> >
> > + MSG_UART_DP,
> >
> > + {
> >
> > + (UINT8) sizeof (UART_DEVICE_PATH),
> >
> > + (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8)
> >
> > + }
> >
> > + },
> >
> > + 0, // Reserved
> >
> > + 0, // BaudRate
> >
> > + 0, // DataBits
> >
> > + 0, // Parity
> >
> > + 0 // StopBits
> >
> > + },
> >
> > + {
> >
> > + {
> >
> > + MESSAGING_DEVICE_PATH,
> >
> > + MSG_VENDOR_DP,
> >
> > + {
> >
> > + (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
> >
> > + (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),
> >
> > + }
> >
> > + },
> >
> > + DEVICE_PATH_MESSAGING_PC_ANSI
> >
> > + },
> >
> > + gEndEntire
> >
> > +};
> >
> > +
> >
> > +/**
> >
> > + Updates the ConOut, ConIn, ErrOut variables with the serial
> > + terminal
> > device path
> >
> > + @param none
> >
> > + @retval none
> >
> > +**/
> >
> > +VOID
> >
> > +AddSerialTerminal (
> >
> > + VOID
> >
> > + )
> >
> > +{
> >
> > + DEBUG ((DEBUG_INFO, "[AddSerialPortTerminal]\n"));
> >
> > +
> >
> > + //
> >
> > + // Append Serial Terminal into "ConIn"
> >
> > + //
> >
> > + EfiBootManagerUpdateConsoleVariable (ConOut,
> > (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
> >
> > + EfiBootManagerUpdateConsoleVariable (ConIn,
> > (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
> >
> > + EfiBootManagerUpdateConsoleVariable (ErrOut,
> > (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
> >
> > +}
> >
> > +
> >
> > +
> >
> > +/**
> >
> > + Constructor for the Serial Port Device controller library.
> >
> > +
> >
> > + @param ImageHandle the image handle of the process
> >
> > + @param SystemTable the EFI System Table pointer
> >
> > +
> >
> > + @retval EFI_SUCCESS the shell command handlers were
> > installed sucessfully
> >
> > + @retval EFI_UNSUPPORTED the shell level required was not found.
> >
> > +**/
> >
> > +EFI_STATUS
> >
> > +EFIAPI
> >
> > +SerialPortTerminalLibConstructor (
> >
> > + IN EFI_HANDLE ImageHandle,
> >
> > + IN EFI_SYSTEM_TABLE *SystemTable
> >
> > + )
> >
> > +{
> >
> > + mSerialDevicePath.Uart.BaudRate = PcdGet64(PcdUartDefaultBaudRate);
> >
> > + mSerialDevicePath.Uart.DataBits = PcdGet8(PcdUartDefaultDataBits);
> >
> > + mSerialDevicePath.Uart.Parity = PcdGet8(PcdUartDefaultParity);
> >
> > + mSerialDevicePath.Uart.StopBits = PcdGet8(PcdUartDefaultStopBits);
> >
> > + DEBUG ((DEBUG_INFO, "[SerialPortTerminalLibConstructor]
> > [%d, %d, %d, %d]\n",
> >
> > + mSerialDevicePath.Uart.BaudRate,
> >
> > + mSerialDevicePath.Uart.DataBits,
> >
> > + mSerialDevicePath.Uart.Parity,
> >
> > + mSerialDevicePath.Uart.StopBits));
> >
> > +
> >
> > + AddSerialTerminal();
> >
> > +
> >
> > + return EFI_SUCCESS;
> >
> > +}
> >
> > diff --git
> >
> a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.h
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.h
> > new file mode 100644
> > index 0000000000..bfa73cca7d
> > --- /dev/null
> > +++
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.h
> > @@ -0,0 +1,34 @@
> > +/** @file
> >
> > + Header file for NULL named library for for Serial Port Terminal
> Redirection
> > library.
> >
> > +
> >
> > + Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> >
> > + SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > +
> >
> > +**/
> >
> > +
> >
> > +#ifndef _SERIAL_PORT_TERMINAL_LIB_H_
> >
> > +#define _SERIAL_PORT_TERMINAL_LIB_H_
> >
> > +
> >
> > +#include <Uefi.h>
> >
> > +#include <Guid/SerialPortLibVendor.h>
> >
> > +#include <Library/UefiLib.h>
> >
> > +#include <Library/DevicePathLib.h>
> >
> > +#include <Library/DebugLib.h>
> >
> > +#include <Library/UefiBootManagerLib.h>
> >
> > +
> >
> > +//
> >
> > +// Below is the platform console device path
> >
> > +//
> >
> > +typedef struct {
> >
> > + VENDOR_DEVICE_PATH Guid;
> >
> > + UART_DEVICE_PATH Uart;
> >
> > + VENDOR_DEVICE_PATH TerminalType;
> >
> > + EFI_DEVICE_PATH_PROTOCOL End;
> >
> > +} SERIAL_DEVICE_PATH;
> >
> > +
> >
> > +#define gEndEntire \
> >
> > + { \
> >
> > + END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE,
> > { END_DEVICE_PATH_LENGTH, 0 } \
> >
> > + }
> >
> > +
> >
> > +#endif
> >
> > diff --git
> >
> a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.inf
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.inf
> > new file mode 100644
> > index 0000000000..2d95fe79f2
> > --- /dev/null
> > +++
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.inf
> > @@ -0,0 +1,40 @@
> > +## @file
> >
> > +# Component information file for Serial Port Terminal Redirection
> > +Library
> >
> > +#
> >
> > +# INTEL CONFIDENTIAL
> >
> > +# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> >
> > +#
> >
> > +# SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > +#
> >
> > +##
> >
> > +[Defines]
> >
> > + INF_VERSION = 0x00010006
> >
> > + BASE_NAME = SerialPortTerminalLib
> >
> > + FILE_GUID =
> > E12BFA46-95F2-4ADC-9774-7E38DE78741E
> >
> > + MODULE_TYPE = UEFI_DRIVER
> >
> > + VERSION_STRING = 1.2
> >
> > + LIBRARY_CLASS = NULL|UEFI_DRIVER DXE_DRIVER
> > DXE_RUNTIME_DRIVER
> >
> > + CONSTRUCTOR =
> > SerialPortTerminalLibConstructor
> >
> > +
> >
> > +[Packages]
> >
> > + MdePkg/MdePkg.dec
> >
> > + MdeModulePkg/MdeModulePkg.dec
> >
> > + BoardModulePkg/BoardModulePkg.dec
> >
> > + MinPlatformPkg/MinPlatformPkg.dec
> >
> > +
> >
> > +[Sources]
> >
> > + SerialPortTerminalLib.c
> >
> > + SerialPortTerminalLib.h
> >
> > +
> >
> > +[LibraryClasses]
> >
> > + DevicePathLib
> >
> > + DebugLib
> >
> > + UefiDriverEntryPoint
> >
> > + UefiBootManagerLib
> >
> > + UefiLib
> >
> > +
> >
> > +[Pcd]
> >
> > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate
> >
> > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
> >
> > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
> >
> > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits
> >
> > --
> > 2.24.0.windows.2
>
>
>
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 57853 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [edk2-devel] 回复: [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature
2020-11-24 6:22 ` Dong, Eric
@ 2020-12-08 2:01 ` Heng Luo
2020-12-08 3:03 ` Dong, Eric
0 siblings, 1 reply; 12+ messages in thread
From: Heng Luo @ 2020-12-08 2:01 UTC (permalink / raw)
To: Dong, Eric, devel@edk2.groups.io, gaoliming@byosoft.com.cn
Cc: Chiu, Chasel, Desimone, Nathaniel L
[-- Attachment #1: Type: text/plain, Size: 15746 bytes --]
Dear Eric, Chasel and Nate,
Could you help to upload these patches?
Thanks,
Heng
From: Dong, Eric <eric.dong@intel.com>
Sent: Tuesday, November 24, 2020 2:23 PM
To: Luo, Heng <heng.luo@intel.com>; devel@edk2.groups.io; gaoliming@byosoft.com.cn
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
Subject: RE: [edk2-devel] 回复: [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature
Reviewed-by: Eric Dong <eric.dong@intel.com<mailto:eric.dong@intel.com>>
From: Luo, Heng <heng.luo@intel.com<mailto:heng.luo@intel.com>>
Sent: Monday, November 23, 2020 9:31 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>
Cc: Dong, Eric <eric.dong@intel.com<mailto:eric.dong@intel.com>>; Chiu, Chasel <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>
Subject: RE: [edk2-devel] 回复: [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature
Hi Chasel and Eric,
Could you help to review the patches?
Nate is on vacation now, I have fixed the bug in patch V6 Nate mentioned, I think he have no more comments.
Thanks,
Heng
> -----Original Message-----
> From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of
> gaoliming
> Sent: Tuesday, November 17, 2020 11:17 AM
> To: Luo, Heng <heng.luo@intel.com<mailto:heng.luo@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Cc: Dong, Eric <eric.dong@intel.com<mailto:eric.dong@intel.com>>; Chiu, Chasel <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>;
> Desimone, Nathaniel L <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>
> Subject: [edk2-devel] 回复: [Patch V7 3/3] MinPlatformPkg: Add
> SerialPortTerminalLib to suport Serial Terminal feature
>
> Heng:
> Thanks for your update. This version is good to me. Reviewed-by: Liming
> Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
>
> Besides, please let me know your test case for this case.
>
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: Heng Luo <heng.luo@intel.com<mailto:heng.luo@intel.com>>
> > 发送时间: 2020年11月16日 9:31
> > 收件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> > 抄送: Eric Dong <eric.dong@intel.com<mailto:eric.dong@intel.com>>; Chasel Chiu
> > <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>; Nate DeSimone
> > <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>; Liming Gao
> > <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
> > 主题: [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport
> > Serial Terminal feature
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3014
> >
> > 1. Add SerialPortTerminalLib to MinPlatformPkg/Library.
> > 2. Add SerialPortTerminalLib to BdsDxe driver, to add the serial device to
> > ConIn and ConOut variables
> > 3. Include SerialDxe and TerminalDxe to CoreDxeInclude.dsc and
> > CoreUefiBootInclude.fdf.
> >
> > Cc: Eric Dong <eric.dong@intel.com<mailto:eric.dong@intel.com>>
> > Cc: Chasel Chiu <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>
> > Cc: Nate DeSimone <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
> > Signed-off-by: Heng Luo <heng.luo@intel.com<mailto:heng.luo@intel.com>>
> > ---
> > Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > | 15 +++++++++++++--
> > Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> > | 8 +++++++-
> >
> >
> Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerm
> i
> > nalLib.c | 102
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > ++++++++++++++++++++++++++++++++++++++++
> >
> >
> Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerm
> i
> > nalLib.h | 34 ++++++++++++++++++++++++++++++++++
> >
> >
> Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerm
> i
> > nalLib.inf | 40 ++++++++++++++++++++++++++++++++++++++++
> > 5 files changed, 196 insertions(+), 3 deletions(-)
> >
> > diff --git
> > a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > index f0e578f8cc..1038a29c5c 100644
> > --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > @@ -1,7 +1,7 @@
> > ## @file
> >
> > # Platform description.
> >
> > #
> >
> > -# Copyright (c) 2017 - 2019, Intel Corporation. All rights
> > reserved.<BR>
> >
> > +# Copyright (c) 2017 - 2020, Intel Corporation. All rights
> > +reserved.<BR>
> >
> > #
> >
> > # SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > #
> >
> > @@ -46,7 +46,18 @@
> >
> >
> >
> >
> MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCount
> e
> > rRuntimeDxe.inf
> >
> >
> >
> > - MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
> >
> > + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf {
> >
> > + <LibraryClasses>
> >
> > +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
> >
> > +
> > NULL|MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLi
> > NULL|b.in
> > f
> >
> > +!endif
> >
> > + }
> >
> > +
> >
> > +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
> >
> > + MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
> >
> > + MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
> >
> > +!endif
> >
> > +
> >
> >
> >
> MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerD
> > xe.inf
> >
> > MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {
> >
> > <LibraryClasses>
> >
> > diff --git
> > a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> > b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> > index 7859c0b1a5..ef4576eedf 100644
> > ---
> > a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> > +++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fd
> > +++ f
> > @@ -1,7 +1,7 @@
> > ## @file
> >
> > # FDF file of Platform.
> >
> > #
> >
> > -# Copyright (c) 2017 - 2019, Intel Corporation. All rights
> > reserved.<BR>
> >
> > +# Copyright (c) 2017 - 2020, Intel Corporation. All rights
> > +reserved.<BR>
> >
> > #
> >
> > # SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > #
> >
> > @@ -26,6 +26,12 @@ INF
> > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
> > INF
> >
> MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCount
> e
> > rRuntimeDxe.inf
> >
> >
> >
> > INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
> >
> > +
> >
> > +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
> >
> > +INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
> >
> > +INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
> >
> > +!endif
> >
> > +
> >
> > INF
> >
> MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerD
> > xe.inf
> >
> > INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
> >
> > INF
> > MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
> >
> > diff --git
> >
> a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.c
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.c
> > new file mode 100644
> > index 0000000000..66e8ee018b
> > --- /dev/null
> > +++
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.c
> > @@ -0,0 +1,102 @@
> > +/** @file
> >
> > + Main file for NULL named library for Serial Port Terminal
> > + Redirection
> > library.
> >
> > +
> >
> > + Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> >
> > + SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > +
> >
> > +**/
> >
> > +
> >
> > +#include "SerialPortTerminalLib.h"
> >
> > +
> >
> > +GLOBAL_REMOVE_IF_UNREFERENCED SERIAL_DEVICE_PATH
> > mSerialDevicePath = {
> >
> > + {
> >
> > + {
> >
> > + HARDWARE_DEVICE_PATH,
> >
> > + HW_VENDOR_DP,
> >
> > + {
> >
> > + (UINT8) sizeof (VENDOR_DEVICE_PATH),
> >
> > + (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
> >
> > + }
> >
> > + },
> >
> > + EDKII_SERIAL_PORT_LIB_VENDOR_GUID
> >
> > + },
> >
> > + {
> >
> > + {
> >
> > + MESSAGING_DEVICE_PATH,
> >
> > + MSG_UART_DP,
> >
> > + {
> >
> > + (UINT8) sizeof (UART_DEVICE_PATH),
> >
> > + (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8)
> >
> > + }
> >
> > + },
> >
> > + 0, // Reserved
> >
> > + 0, // BaudRate
> >
> > + 0, // DataBits
> >
> > + 0, // Parity
> >
> > + 0 // StopBits
> >
> > + },
> >
> > + {
> >
> > + {
> >
> > + MESSAGING_DEVICE_PATH,
> >
> > + MSG_VENDOR_DP,
> >
> > + {
> >
> > + (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
> >
> > + (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),
> >
> > + }
> >
> > + },
> >
> > + DEVICE_PATH_MESSAGING_PC_ANSI
> >
> > + },
> >
> > + gEndEntire
> >
> > +};
> >
> > +
> >
> > +/**
> >
> > + Updates the ConOut, ConIn, ErrOut variables with the serial
> > + terminal
> > device path
> >
> > + @param none
> >
> > + @retval none
> >
> > +**/
> >
> > +VOID
> >
> > +AddSerialTerminal (
> >
> > + VOID
> >
> > + )
> >
> > +{
> >
> > + DEBUG ((DEBUG_INFO, "[AddSerialPortTerminal]\n"));
> >
> > +
> >
> > + //
> >
> > + // Append Serial Terminal into "ConIn"
> >
> > + //
> >
> > + EfiBootManagerUpdateConsoleVariable (ConOut,
> > (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
> >
> > + EfiBootManagerUpdateConsoleVariable (ConIn,
> > (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
> >
> > + EfiBootManagerUpdateConsoleVariable (ErrOut,
> > (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
> >
> > +}
> >
> > +
> >
> > +
> >
> > +/**
> >
> > + Constructor for the Serial Port Device controller library.
> >
> > +
> >
> > + @param ImageHandle the image handle of the process
> >
> > + @param SystemTable the EFI System Table pointer
> >
> > +
> >
> > + @retval EFI_SUCCESS the shell command handlers were
> > installed sucessfully
> >
> > + @retval EFI_UNSUPPORTED the shell level required was not found.
> >
> > +**/
> >
> > +EFI_STATUS
> >
> > +EFIAPI
> >
> > +SerialPortTerminalLibConstructor (
> >
> > + IN EFI_HANDLE ImageHandle,
> >
> > + IN EFI_SYSTEM_TABLE *SystemTable
> >
> > + )
> >
> > +{
> >
> > + mSerialDevicePath.Uart.BaudRate = PcdGet64(PcdUartDefaultBaudRate);
> >
> > + mSerialDevicePath.Uart.DataBits = PcdGet8(PcdUartDefaultDataBits);
> >
> > + mSerialDevicePath.Uart.Parity = PcdGet8(PcdUartDefaultParity);
> >
> > + mSerialDevicePath.Uart.StopBits = PcdGet8(PcdUartDefaultStopBits);
> >
> > + DEBUG ((DEBUG_INFO, "[SerialPortTerminalLibConstructor]
> > [%d, %d, %d, %d]\n",
> >
> > + mSerialDevicePath.Uart.BaudRate,
> >
> > + mSerialDevicePath.Uart.DataBits,
> >
> > + mSerialDevicePath.Uart.Parity,
> >
> > + mSerialDevicePath.Uart.StopBits));
> >
> > +
> >
> > + AddSerialTerminal();
> >
> > +
> >
> > + return EFI_SUCCESS;
> >
> > +}
> >
> > diff --git
> >
> a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.h
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.h
> > new file mode 100644
> > index 0000000000..bfa73cca7d
> > --- /dev/null
> > +++
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.h
> > @@ -0,0 +1,34 @@
> > +/** @file
> >
> > + Header file for NULL named library for for Serial Port Terminal
> Redirection
> > library.
> >
> > +
> >
> > + Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> >
> > + SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > +
> >
> > +**/
> >
> > +
> >
> > +#ifndef _SERIAL_PORT_TERMINAL_LIB_H_
> >
> > +#define _SERIAL_PORT_TERMINAL_LIB_H_
> >
> > +
> >
> > +#include <Uefi.h>
> >
> > +#include <Guid/SerialPortLibVendor.h>
> >
> > +#include <Library/UefiLib.h>
> >
> > +#include <Library/DevicePathLib.h>
> >
> > +#include <Library/DebugLib.h>
> >
> > +#include <Library/UefiBootManagerLib.h>
> >
> > +
> >
> > +//
> >
> > +// Below is the platform console device path
> >
> > +//
> >
> > +typedef struct {
> >
> > + VENDOR_DEVICE_PATH Guid;
> >
> > + UART_DEVICE_PATH Uart;
> >
> > + VENDOR_DEVICE_PATH TerminalType;
> >
> > + EFI_DEVICE_PATH_PROTOCOL End;
> >
> > +} SERIAL_DEVICE_PATH;
> >
> > +
> >
> > +#define gEndEntire \
> >
> > + { \
> >
> > + END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE,
> > { END_DEVICE_PATH_LENGTH, 0 } \
> >
> > + }
> >
> > +
> >
> > +#endif
> >
> > diff --git
> >
> a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.inf
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.inf
> > new file mode 100644
> > index 0000000000..2d95fe79f2
> > --- /dev/null
> > +++
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.inf
> > @@ -0,0 +1,40 @@
> > +## @file
> >
> > +# Component information file for Serial Port Terminal Redirection
> > +Library
> >
> > +#
> >
> > +# INTEL CONFIDENTIAL
> >
> > +# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> >
> > +#
> >
> > +# SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > +#
> >
> > +##
> >
> > +[Defines]
> >
> > + INF_VERSION = 0x00010006
> >
> > + BASE_NAME = SerialPortTerminalLib
> >
> > + FILE_GUID =
> > E12BFA46-95F2-4ADC-9774-7E38DE78741E
> >
> > + MODULE_TYPE = UEFI_DRIVER
> >
> > + VERSION_STRING = 1.2
> >
> > + LIBRARY_CLASS = NULL|UEFI_DRIVER DXE_DRIVER
> > DXE_RUNTIME_DRIVER
> >
> > + CONSTRUCTOR =
> > SerialPortTerminalLibConstructor
> >
> > +
> >
> > +[Packages]
> >
> > + MdePkg/MdePkg.dec
> >
> > + MdeModulePkg/MdeModulePkg.dec
> >
> > + BoardModulePkg/BoardModulePkg.dec
> >
> > + MinPlatformPkg/MinPlatformPkg.dec
> >
> > +
> >
> > +[Sources]
> >
> > + SerialPortTerminalLib.c
> >
> > + SerialPortTerminalLib.h
> >
> > +
> >
> > +[LibraryClasses]
> >
> > + DevicePathLib
> >
> > + DebugLib
> >
> > + UefiDriverEntryPoint
> >
> > + UefiBootManagerLib
> >
> > + UefiLib
> >
> > +
> >
> > +[Pcd]
> >
> > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate
> >
> > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
> >
> > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
> >
> > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits
> >
> > --
> > 2.24.0.windows.2
>
>
>
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 60247 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [edk2-devel] 回复: [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature
2020-12-08 2:01 ` Heng Luo
@ 2020-12-08 3:03 ` Dong, Eric
0 siblings, 0 replies; 12+ messages in thread
From: Dong, Eric @ 2020-12-08 3:03 UTC (permalink / raw)
To: Luo, Heng, devel@edk2.groups.io, gaoliming@byosoft.com.cn
Cc: Chiu, Chasel, Desimone, Nathaniel L
[-- Attachment #1: Type: text/plain, Size: 17104 bytes --]
Hi Heng,
Thanks for your contribution. I have committed the change.
SHA-1: c3c477792d2f90d1d78edf947ccad6915e4e0b06
* MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3014
1. Add SerialPortTerminalLib to MinPlatformPkg/Library.
2. Add SerialPortTerminalLib to BdsDxe driver, to add the serial device to
ConIn and ConOut variables
3. Include SerialDxe and TerminalDxe to CoreDxeInclude.dsc and
CoreUefiBootInclude.fdf.
Reviewed-by: Eric Dong <eric.dong@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Heng Luo <heng.luo@intel.com>
Thanks,
Eric
From: Luo, Heng <heng.luo@intel.com>
Sent: Tuesday, December 8, 2020 10:01 AM
To: Dong, Eric <eric.dong@intel.com>; devel@edk2.groups.io; gaoliming@byosoft.com.cn
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
Subject: RE: [edk2-devel] 回复: [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature
Dear Eric, Chasel and Nate,
Could you help to upload these patches?
Thanks,
Heng
From: Dong, Eric <eric.dong@intel.com<mailto:eric.dong@intel.com>>
Sent: Tuesday, November 24, 2020 2:23 PM
To: Luo, Heng <heng.luo@intel.com<mailto:heng.luo@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>
Cc: Chiu, Chasel <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>
Subject: RE: [edk2-devel] 回复: [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature
Reviewed-by: Eric Dong <eric.dong@intel.com<mailto:eric.dong@intel.com>>
From: Luo, Heng <heng.luo@intel.com<mailto:heng.luo@intel.com>>
Sent: Monday, November 23, 2020 9:31 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>
Cc: Dong, Eric <eric.dong@intel.com<mailto:eric.dong@intel.com>>; Chiu, Chasel <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>
Subject: RE: [edk2-devel] 回复: [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature
Hi Chasel and Eric,
Could you help to review the patches?
Nate is on vacation now, I have fixed the bug in patch V6 Nate mentioned, I think he have no more comments.
Thanks,
Heng
> -----Original Message-----
> From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of
> gaoliming
> Sent: Tuesday, November 17, 2020 11:17 AM
> To: Luo, Heng <heng.luo@intel.com<mailto:heng.luo@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Cc: Dong, Eric <eric.dong@intel.com<mailto:eric.dong@intel.com>>; Chiu, Chasel <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>;
> Desimone, Nathaniel L <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>
> Subject: [edk2-devel] 回复: [Patch V7 3/3] MinPlatformPkg: Add
> SerialPortTerminalLib to suport Serial Terminal feature
>
> Heng:
> Thanks for your update. This version is good to me. Reviewed-by: Liming
> Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
>
> Besides, please let me know your test case for this case.
>
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: Heng Luo <heng.luo@intel.com<mailto:heng.luo@intel.com>>
> > 发送时间: 2020年11月16日 9:31
> > 收件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> > 抄送: Eric Dong <eric.dong@intel.com<mailto:eric.dong@intel.com>>; Chasel Chiu
> > <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>; Nate DeSimone
> > <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>; Liming Gao
> > <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
> > 主题: [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport
> > Serial Terminal feature
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3014
> >
> > 1. Add SerialPortTerminalLib to MinPlatformPkg/Library.
> > 2. Add SerialPortTerminalLib to BdsDxe driver, to add the serial device to
> > ConIn and ConOut variables
> > 3. Include SerialDxe and TerminalDxe to CoreDxeInclude.dsc and
> > CoreUefiBootInclude.fdf.
> >
> > Cc: Eric Dong <eric.dong@intel.com<mailto:eric.dong@intel.com>>
> > Cc: Chasel Chiu <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>
> > Cc: Nate DeSimone <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
> > Signed-off-by: Heng Luo <heng.luo@intel.com<mailto:heng.luo@intel.com>>
> > ---
> > Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > | 15 +++++++++++++--
> > Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> > | 8 +++++++-
> >
> >
> Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerm
> i
> > nalLib.c | 102
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > ++++++++++++++++++++++++++++++++++++++++
> >
> >
> Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerm
> i
> > nalLib.h | 34 ++++++++++++++++++++++++++++++++++
> >
> >
> Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerm
> i
> > nalLib.inf | 40 ++++++++++++++++++++++++++++++++++++++++
> > 5 files changed, 196 insertions(+), 3 deletions(-)
> >
> > diff --git
> > a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > index f0e578f8cc..1038a29c5c 100644
> > --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc
> > @@ -1,7 +1,7 @@
> > ## @file
> >
> > # Platform description.
> >
> > #
> >
> > -# Copyright (c) 2017 - 2019, Intel Corporation. All rights
> > reserved.<BR>
> >
> > +# Copyright (c) 2017 - 2020, Intel Corporation. All rights
> > +reserved.<BR>
> >
> > #
> >
> > # SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > #
> >
> > @@ -46,7 +46,18 @@
> >
> >
> >
> >
> MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCount
> e
> > rRuntimeDxe.inf
> >
> >
> >
> > - MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
> >
> > + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf {
> >
> > + <LibraryClasses>
> >
> > +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
> >
> > +
> > NULL|MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTerminalLi
> > NULL|b.in
> > f
> >
> > +!endif
> >
> > + }
> >
> > +
> >
> > +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
> >
> > + MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
> >
> > + MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
> >
> > +!endif
> >
> > +
> >
> >
> >
> MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerD
> > xe.inf
> >
> > MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf {
> >
> > <LibraryClasses>
> >
> > diff --git
> > a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> > b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> > index 7859c0b1a5..ef4576eedf 100644
> > ---
> > a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fdf
> > +++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreUefiBootInclude.fd
> > +++ f
> > @@ -1,7 +1,7 @@
> > ## @file
> >
> > # FDF file of Platform.
> >
> > #
> >
> > -# Copyright (c) 2017 - 2019, Intel Corporation. All rights
> > reserved.<BR>
> >
> > +# Copyright (c) 2017 - 2020, Intel Corporation. All rights
> > +reserved.<BR>
> >
> > #
> >
> > # SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > #
> >
> > @@ -26,6 +26,12 @@ INF
> > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
> > INF
> >
> MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCount
> e
> > rRuntimeDxe.inf
> >
> >
> >
> > INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
> >
> > +
> >
> > +!if gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable == TRUE
> >
> > +INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
> >
> > +INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
> >
> > +!endif
> >
> > +
> >
> > INF
> >
> MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerD
> > xe.inf
> >
> > INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
> >
> > INF
> > MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
> >
> > diff --git
> >
> a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.c
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.c
> > new file mode 100644
> > index 0000000000..66e8ee018b
> > --- /dev/null
> > +++
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.c
> > @@ -0,0 +1,102 @@
> > +/** @file
> >
> > + Main file for NULL named library for Serial Port Terminal
> > + Redirection
> > library.
> >
> > +
> >
> > + Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> >
> > + SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > +
> >
> > +**/
> >
> > +
> >
> > +#include "SerialPortTerminalLib.h"
> >
> > +
> >
> > +GLOBAL_REMOVE_IF_UNREFERENCED SERIAL_DEVICE_PATH
> > mSerialDevicePath = {
> >
> > + {
> >
> > + {
> >
> > + HARDWARE_DEVICE_PATH,
> >
> > + HW_VENDOR_DP,
> >
> > + {
> >
> > + (UINT8) sizeof (VENDOR_DEVICE_PATH),
> >
> > + (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
> >
> > + }
> >
> > + },
> >
> > + EDKII_SERIAL_PORT_LIB_VENDOR_GUID
> >
> > + },
> >
> > + {
> >
> > + {
> >
> > + MESSAGING_DEVICE_PATH,
> >
> > + MSG_UART_DP,
> >
> > + {
> >
> > + (UINT8) sizeof (UART_DEVICE_PATH),
> >
> > + (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8)
> >
> > + }
> >
> > + },
> >
> > + 0, // Reserved
> >
> > + 0, // BaudRate
> >
> > + 0, // DataBits
> >
> > + 0, // Parity
> >
> > + 0 // StopBits
> >
> > + },
> >
> > + {
> >
> > + {
> >
> > + MESSAGING_DEVICE_PATH,
> >
> > + MSG_VENDOR_DP,
> >
> > + {
> >
> > + (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
> >
> > + (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),
> >
> > + }
> >
> > + },
> >
> > + DEVICE_PATH_MESSAGING_PC_ANSI
> >
> > + },
> >
> > + gEndEntire
> >
> > +};
> >
> > +
> >
> > +/**
> >
> > + Updates the ConOut, ConIn, ErrOut variables with the serial
> > + terminal
> > device path
> >
> > + @param none
> >
> > + @retval none
> >
> > +**/
> >
> > +VOID
> >
> > +AddSerialTerminal (
> >
> > + VOID
> >
> > + )
> >
> > +{
> >
> > + DEBUG ((DEBUG_INFO, "[AddSerialPortTerminal]\n"));
> >
> > +
> >
> > + //
> >
> > + // Append Serial Terminal into "ConIn"
> >
> > + //
> >
> > + EfiBootManagerUpdateConsoleVariable (ConOut,
> > (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
> >
> > + EfiBootManagerUpdateConsoleVariable (ConIn,
> > (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
> >
> > + EfiBootManagerUpdateConsoleVariable (ErrOut,
> > (EFI_DEVICE_PATH_PROTOCOL *) &mSerialDevicePath, NULL);
> >
> > +}
> >
> > +
> >
> > +
> >
> > +/**
> >
> > + Constructor for the Serial Port Device controller library.
> >
> > +
> >
> > + @param ImageHandle the image handle of the process
> >
> > + @param SystemTable the EFI System Table pointer
> >
> > +
> >
> > + @retval EFI_SUCCESS the shell command handlers were
> > installed sucessfully
> >
> > + @retval EFI_UNSUPPORTED the shell level required was not found.
> >
> > +**/
> >
> > +EFI_STATUS
> >
> > +EFIAPI
> >
> > +SerialPortTerminalLibConstructor (
> >
> > + IN EFI_HANDLE ImageHandle,
> >
> > + IN EFI_SYSTEM_TABLE *SystemTable
> >
> > + )
> >
> > +{
> >
> > + mSerialDevicePath.Uart.BaudRate = PcdGet64(PcdUartDefaultBaudRate);
> >
> > + mSerialDevicePath.Uart.DataBits = PcdGet8(PcdUartDefaultDataBits);
> >
> > + mSerialDevicePath.Uart.Parity = PcdGet8(PcdUartDefaultParity);
> >
> > + mSerialDevicePath.Uart.StopBits = PcdGet8(PcdUartDefaultStopBits);
> >
> > + DEBUG ((DEBUG_INFO, "[SerialPortTerminalLibConstructor]
> > [%d, %d, %d, %d]\n",
> >
> > + mSerialDevicePath.Uart.BaudRate,
> >
> > + mSerialDevicePath.Uart.DataBits,
> >
> > + mSerialDevicePath.Uart.Parity,
> >
> > + mSerialDevicePath.Uart.StopBits));
> >
> > +
> >
> > + AddSerialTerminal();
> >
> > +
> >
> > + return EFI_SUCCESS;
> >
> > +}
> >
> > diff --git
> >
> a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.h
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.h
> > new file mode 100644
> > index 0000000000..bfa73cca7d
> > --- /dev/null
> > +++
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.h
> > @@ -0,0 +1,34 @@
> > +/** @file
> >
> > + Header file for NULL named library for for Serial Port Terminal
> Redirection
> > library.
> >
> > +
> >
> > + Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> >
> > + SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > +
> >
> > +**/
> >
> > +
> >
> > +#ifndef _SERIAL_PORT_TERMINAL_LIB_H_
> >
> > +#define _SERIAL_PORT_TERMINAL_LIB_H_
> >
> > +
> >
> > +#include <Uefi.h>
> >
> > +#include <Guid/SerialPortLibVendor.h>
> >
> > +#include <Library/UefiLib.h>
> >
> > +#include <Library/DevicePathLib.h>
> >
> > +#include <Library/DebugLib.h>
> >
> > +#include <Library/UefiBootManagerLib.h>
> >
> > +
> >
> > +//
> >
> > +// Below is the platform console device path
> >
> > +//
> >
> > +typedef struct {
> >
> > + VENDOR_DEVICE_PATH Guid;
> >
> > + UART_DEVICE_PATH Uart;
> >
> > + VENDOR_DEVICE_PATH TerminalType;
> >
> > + EFI_DEVICE_PATH_PROTOCOL End;
> >
> > +} SERIAL_DEVICE_PATH;
> >
> > +
> >
> > +#define gEndEntire \
> >
> > + { \
> >
> > + END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE,
> > { END_DEVICE_PATH_LENGTH, 0 } \
> >
> > + }
> >
> > +
> >
> > +#endif
> >
> > diff --git
> >
> a/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.inf
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.inf
> > new file mode 100644
> > index 0000000000..2d95fe79f2
> > --- /dev/null
> > +++
> >
> b/Platform/Intel/MinPlatformPkg/Library/SerialPortTerminalLib/SerialPortTer
> > minalLib.inf
> > @@ -0,0 +1,40 @@
> > +## @file
> >
> > +# Component information file for Serial Port Terminal Redirection
> > +Library
> >
> > +#
> >
> > +# INTEL CONFIDENTIAL
> >
> > +# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> >
> > +#
> >
> > +# SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > +#
> >
> > +##
> >
> > +[Defines]
> >
> > + INF_VERSION = 0x00010006
> >
> > + BASE_NAME = SerialPortTerminalLib
> >
> > + FILE_GUID =
> > E12BFA46-95F2-4ADC-9774-7E38DE78741E
> >
> > + MODULE_TYPE = UEFI_DRIVER
> >
> > + VERSION_STRING = 1.2
> >
> > + LIBRARY_CLASS = NULL|UEFI_DRIVER DXE_DRIVER
> > DXE_RUNTIME_DRIVER
> >
> > + CONSTRUCTOR =
> > SerialPortTerminalLibConstructor
> >
> > +
> >
> > +[Packages]
> >
> > + MdePkg/MdePkg.dec
> >
> > + MdeModulePkg/MdeModulePkg.dec
> >
> > + BoardModulePkg/BoardModulePkg.dec
> >
> > + MinPlatformPkg/MinPlatformPkg.dec
> >
> > +
> >
> > +[Sources]
> >
> > + SerialPortTerminalLib.c
> >
> > + SerialPortTerminalLib.h
> >
> > +
> >
> > +[LibraryClasses]
> >
> > + DevicePathLib
> >
> > + DebugLib
> >
> > + UefiDriverEntryPoint
> >
> > + UefiBootManagerLib
> >
> > + UefiLib
> >
> > +
> >
> > +[Pcd]
> >
> > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate
> >
> > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
> >
> > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
> >
> > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits
> >
> > --
> > 2.24.0.windows.2
>
>
>
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 65897 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Patch V7 1/3] MinPlatformPkg: Add PCDs for Serial Terminal feature
2020-11-16 1:31 [Patch V7 1/3] MinPlatformPkg: Add PCDs for Serial Terminal feature Heng Luo
2020-11-16 1:31 ` [Patch V7 2/3] OpenBoardPkg: Configurae PcdSerialTerminalEnable Heng Luo
2020-11-16 1:31 ` [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature Heng Luo
@ 2020-12-09 8:47 ` Nate DeSimone
2020-12-09 9:12 ` Nate DeSimone
3 siblings, 0 replies; 12+ messages in thread
From: Nate DeSimone @ 2020-12-09 8:47 UTC (permalink / raw)
To: Luo, Heng, devel@edk2.groups.io; +Cc: Dong, Eric, Chiu, Chasel, Liming Gao
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
> -----Original Message-----
> From: Luo, Heng <heng.luo@intel.com>
> Sent: Sunday, November 15, 2020 5:31 PM
> To: devel@edk2.groups.io
> Cc: Dong, Eric <eric.dong@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>;
> Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>
> Subject: [Patch V7 1/3] MinPlatformPkg: Add PCDs for Serial Terminal feature
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3014
>
> Add PcdSerialTerminalEnable to enable/disable Serial Terminal feature, this
> feature supports console redirect after the shell is loaded.
>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Signed-off-by: Heng Luo <heng.luo@intel.com>
> ---
> Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec | 1 +
> Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc | 3 ++-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> index 7ef189dac8..2a831f2669 100644
> --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> @@ -318,3 +318,4 @@
> gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable
> |FALSE|BOOLEAN|0xF00000A5
> gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|FALSE|BOOL
> EAN|0xF00000A6 gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable
> |FALSE|BOOLEAN|0xF00000A7+
> gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable
> |FALSE|BOOLEAN|0xF00000B0diff --git
> a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> index 112ddff7d9..d0b5593817 100644
> --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> @@ -1,7 +1,7 @@
> ## @file # Platform description. #-# Copyright (c) 2017 - 2019, Intel
> Corporation. All rights reserved.<BR>+# Copyright (c) 2017 - 2020, Intel
> Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-
> Clause-Patent #@@ -44,6 +44,7 @@
> gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|FALSE+
> gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE
> ##########################################################
> ###################### #--
> 2.24.0.windows.2
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Patch V7 2/3] OpenBoardPkg: Configurae PcdSerialTerminalEnable
2020-11-16 1:31 ` [Patch V7 2/3] OpenBoardPkg: Configurae PcdSerialTerminalEnable Heng Luo
@ 2020-12-09 8:48 ` Nate DeSimone
2020-12-09 9:12 ` Nate DeSimone
1 sibling, 0 replies; 12+ messages in thread
From: Nate DeSimone @ 2020-12-09 8:48 UTC (permalink / raw)
To: Luo, Heng, devel@edk2.groups.io; +Cc: Dong, Eric, Chiu, Chasel, Liming Gao
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
> -----Original Message-----
> From: Luo, Heng <heng.luo@intel.com>
> Sent: Sunday, November 15, 2020 5:31 PM
> To: devel@edk2.groups.io
> Cc: Dong, Eric <eric.dong@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>;
> Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>
> Subject: [Patch V7 2/3] OpenBoardPkg: Configurae PcdSerialTerminalEnable
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3014
>
> Enable Serial Terminal Feature for UpXtreme, and disable it for other
> platform by default.
>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Signed-off-by: Heng Luo <heng.luo@intel.com>
> ---
>
> Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkgPc
> d.dsc | 1 +
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc
> | 1 +
>
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.ds
> c | 1 +
> Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc
> | 1 +
>
> Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.ds
> c | 1 +
>
> Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPk
> gPcd.dsc | 1 +
> 6 files changed, 6 insertions(+)
>
> diff --git
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg
> Pcd.dsc
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg
> Pcd.dsc
> index d611e99fc1..589b002d06 100644
> ---
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg
> Pcd.dsc
> +++
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg
> Pcd
> +++ .dsc
> @@ -131,6 +131,7 @@
> gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE+
> gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
> gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUEdiff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.ds
> c
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.ds
> c
> index 352416a489..44dacdf082 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.ds
> c
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.ds
> c
> @@ -130,6 +130,7 @@
> gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE+
> gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
> gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUEdiff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.
> dsc
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.
> dsc
> index 9e8b148753..725596cbf7 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.
> dsc
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.
> d
> +++ sc
> @@ -168,6 +168,7 @@
> gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE+
> gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
> gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUEdiff --git
> a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.ds
> c
> b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.ds
> c
> index 52cdf9ec0f..251f46f812 100644
> ---
> a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.ds
> c
> +++
> b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.ds
> +++ c
> @@ -50,6 +50,7 @@
> gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE+
> gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
> gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUEdiff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.
> dsc
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.
> dsc
> index d797ae9d94..e161bf06f4 100644
> ---
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.
> dsc
> +++
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.
> ds
> +++ c
> @@ -127,6 +127,7 @@
> gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE+
> gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|TRUE !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
> gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUEdiff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard
> PkgPcd.dsc
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard
> PkgPcd.dsc
> index 5d769e8153..83ada3c95c 100644
> ---
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard
> PkgPcd.dsc
> +++
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard
> Pk
> +++ gPcd.dsc
> @@ -127,6 +127,7 @@
> gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE+
> gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
> gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE--
> 2.24.0.windows.2
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Patch V7 1/3] MinPlatformPkg: Add PCDs for Serial Terminal feature
2020-11-16 1:31 [Patch V7 1/3] MinPlatformPkg: Add PCDs for Serial Terminal feature Heng Luo
` (2 preceding siblings ...)
2020-12-09 8:47 ` [Patch V7 1/3] MinPlatformPkg: Add PCDs for " Nate DeSimone
@ 2020-12-09 9:12 ` Nate DeSimone
3 siblings, 0 replies; 12+ messages in thread
From: Nate DeSimone @ 2020-12-09 9:12 UTC (permalink / raw)
To: Luo, Heng, devel@edk2.groups.io; +Cc: Dong, Eric, Chiu, Chasel, Liming Gao
Pushed: https://github.com/tianocore/edk2-platforms/commit/79f4d39
> -----Original Message-----
> From: Luo, Heng <heng.luo@intel.com>
> Sent: Sunday, November 15, 2020 5:31 PM
> To: devel@edk2.groups.io
> Cc: Dong, Eric <eric.dong@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>;
> Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>
> Subject: [Patch V7 1/3] MinPlatformPkg: Add PCDs for Serial Terminal feature
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3014
>
> Add PcdSerialTerminalEnable to enable/disable Serial Terminal feature, this
> feature supports console redirect after the shell is loaded.
>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Signed-off-by: Heng Luo <heng.luo@intel.com>
> ---
> Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec | 1 +
> Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc | 3 ++-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> index 7ef189dac8..2a831f2669 100644
> --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> @@ -318,3 +318,4 @@
> gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable
> |FALSE|BOOLEAN|0xF00000A5
> gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|FALSE|BOOL
> EAN|0xF00000A6 gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable
> |FALSE|BOOLEAN|0xF00000A7+
> gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable
> |FALSE|BOOLEAN|0xF00000B0diff --git
> a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> index 112ddff7d9..d0b5593817 100644
> --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> @@ -1,7 +1,7 @@
> ## @file # Platform description. #-# Copyright (c) 2017 - 2019, Intel
> Corporation. All rights reserved.<BR>+# Copyright (c) 2017 - 2020, Intel
> Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-
> Clause-Patent #@@ -44,6 +44,7 @@
> gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|FALSE+
> gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE
> ##########################################################
> ###################### #--
> 2.24.0.windows.2
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Patch V7 2/3] OpenBoardPkg: Configurae PcdSerialTerminalEnable
2020-11-16 1:31 ` [Patch V7 2/3] OpenBoardPkg: Configurae PcdSerialTerminalEnable Heng Luo
2020-12-09 8:48 ` Nate DeSimone
@ 2020-12-09 9:12 ` Nate DeSimone
1 sibling, 0 replies; 12+ messages in thread
From: Nate DeSimone @ 2020-12-09 9:12 UTC (permalink / raw)
To: Luo, Heng, devel@edk2.groups.io; +Cc: Dong, Eric, Chiu, Chasel, Liming Gao
Pushed: https://github.com/tianocore/edk2-platforms/commit/8f088a1
> -----Original Message-----
> From: Luo, Heng <heng.luo@intel.com>
> Sent: Sunday, November 15, 2020 5:31 PM
> To: devel@edk2.groups.io
> Cc: Dong, Eric <eric.dong@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>;
> Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>
> Subject: [Patch V7 2/3] OpenBoardPkg: Configurae PcdSerialTerminalEnable
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3014
>
> Enable Serial Terminal Feature for UpXtreme, and disable it for other
> platform by default.
>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Signed-off-by: Heng Luo <heng.luo@intel.com>
> ---
>
> Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkgPc
> d.dsc | 1 +
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc
> | 1 +
>
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.ds
> c | 1 +
> Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc
> | 1 +
>
> Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.ds
> c | 1 +
>
> Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPk
> gPcd.dsc | 1 +
> 6 files changed, 6 insertions(+)
>
> diff --git
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg
> Pcd.dsc
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg
> Pcd.dsc
> index d611e99fc1..589b002d06 100644
> ---
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg
> Pcd.dsc
> +++
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg
> Pcd
> +++ .dsc
> @@ -131,6 +131,7 @@
> gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE+
> gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
> gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUEdiff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.ds
> c
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.ds
> c
> index 352416a489..44dacdf082 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.ds
> c
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.ds
> c
> @@ -130,6 +130,7 @@
> gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE+
> gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
> gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUEdiff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.
> dsc
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.
> dsc
> index 9e8b148753..725596cbf7 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.
> dsc
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.
> d
> +++ sc
> @@ -168,6 +168,7 @@
> gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE+
> gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
> gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUEdiff --git
> a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.ds
> c
> b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.ds
> c
> index 52cdf9ec0f..251f46f812 100644
> ---
> a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.ds
> c
> +++
> b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.ds
> +++ c
> @@ -50,6 +50,7 @@
> gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE+
> gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
> gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUEdiff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.
> dsc
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.
> dsc
> index d797ae9d94..e161bf06f4 100644
> ---
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.
> dsc
> +++
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.
> ds
> +++ c
> @@ -127,6 +127,7 @@
> gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE+
> gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|TRUE !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
> gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUEdiff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard
> PkgPcd.dsc
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard
> PkgPcd.dsc
> index 5d769e8153..83ada3c95c 100644
> ---
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard
> PkgPcd.dsc
> +++
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard
> Pk
> +++ gPcd.dsc
> @@ -127,6 +127,7 @@
> gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
> gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE+
> gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|FALSE !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
> gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE--
> 2.24.0.windows.2
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-12-09 9:13 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-16 1:31 [Patch V7 1/3] MinPlatformPkg: Add PCDs for Serial Terminal feature Heng Luo
2020-11-16 1:31 ` [Patch V7 2/3] OpenBoardPkg: Configurae PcdSerialTerminalEnable Heng Luo
2020-12-09 8:48 ` Nate DeSimone
2020-12-09 9:12 ` Nate DeSimone
2020-11-16 1:31 ` [Patch V7 3/3] MinPlatformPkg: Add SerialPortTerminalLib to suport Serial Terminal feature Heng Luo
2020-11-17 3:17 ` 回复: " gaoliming
2020-11-23 1:30 ` [edk2-devel] " Heng Luo
2020-11-24 6:22 ` Dong, Eric
2020-12-08 2:01 ` Heng Luo
2020-12-08 3:03 ` Dong, Eric
2020-12-09 8:47 ` [Patch V7 1/3] MinPlatformPkg: Add PCDs for " Nate DeSimone
2020-12-09 9:12 ` Nate DeSimone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox