Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UefiPayloadPkg: Use DxeRuntimeDebugLibSerialPort in DXE_RUNTIME_DRIVER #99

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

miczyg1
Copy link
Contributor

@miczyg1 miczyg1 commented Oct 20, 2023

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)

@miczyg1
Copy link
Contributor Author

miczyg1 commented Oct 20, 2023

UNTESTED

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>
@miczyg1
Copy link
Contributor Author

miczyg1 commented Oct 25, 2023

Tried to reproduce the problem on QubesOS, but shutdown didn't trigger the crash (tried few times). The cbmem log information is not lost after this change and its content is the same as before the change.

@miczyg1 miczyg1 merged commit 6be227e into dasharo Oct 25, 2023
2 checks passed
@miczyg1 miczyg1 deleted the runtime_debug_fix branch October 25, 2023 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant