Skip to content

uefi/helpers: logger logs to debugcon device #1172

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

Merged
merged 1 commit into from
May 22, 2024

Conversation

phip1611
Copy link
Member

@phip1611 phip1611 commented May 22, 2024

uefi/helpers: logger logs to debugcon device

This modifies the logger so that it also prints to the debugcon device
in QEMU respectively the debug-console device in cloud-hypervisor [0].
By default, this device is at I/O port 0xe9. This only works on x86.

The major benefit is that one can get log output from the logger set up
by uefi::helpers::init even after boot services has been exited. Now the
memory map can be logged, for example.

When the integration test runs, the output txt file is put into the root
directory of the project.

Also everyone else developing UEFI apps using uefi-rs and running them in
QEMU or cloud-hypervisor (on x86) benefits.

[0] https://phip1611.de/blog/how-to-use-qemus-debugcon-feature/

@phip1611 phip1611 requested a review from nicholasbishop May 22, 2024 16:51
@phip1611 phip1611 force-pushed the debugcon branch 5 times, most recently from 480d816 to 0652ed6 Compare May 22, 2024 17:49
This modifies the logger so that it also prints to the debugcon device
in QEMU respectively the debug-console device in cloud-hypervisor [0].
By default, this device is at I/O port 0xe9. This only works on x86.

The major benefit is that one can get log output from the logger set up
by uefi::helpers::init even after boot services has been exited. Now the
memory map can be logged, for example.

When the integration test runs, the output txt file is put into the root
directory of the project.

Also everyone else developing UEFI apps using uefi-rs and running them in
QEMU or cloud-hypervisor (on x86) benefits.

[0]: https://phip1611.de/blog/how-to-use-qemus-debugcon-feature/
@nicholasbishop nicholasbishop added this pull request to the merge queue May 22, 2024
Merged via the queue into rust-osdev:main with commit 65a215d May 22, 2024
12 checks passed
@phip1611 phip1611 deleted the debugcon branch June 21, 2024 07:53
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.

2 participants