Skip to content

Commit

Permalink
UefiPayloadPkg: Use DxeRuntimeDebugLibSerialPort in DXE_RUNTIME_DRIVER
Browse files Browse the repository at this point in the history
Prevent debugging on serial port (whether physical or cbmem console) at
runtime by using the DxeRuntimeDebugLibSerialPort library as DebugLib. It
will stop calling SerialPortWrite if EFI switches to runtime and avoid access
to cbmem CONSOLE buffer which is neither marked as runtime code nor data.
Solves the issue with Xen backtrace on EFI reset system runtime service:
Dasharo/dasharo-issues#488 (comment)

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
  • Loading branch information
miczyg1 committed Oct 25, 2023
1 parent d5fd308 commit 6be227e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions UefiPayloadPkg/UefiPayloadPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,8 @@
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
SmbusLib|MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf
PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf

[LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION]
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
Expand Down

0 comments on commit 6be227e

Please sign in to comment.