Skip to content

uefi: Handle break in --console recent#131

Merged
JohnAZoidberg merged 3 commits intomainfrom
uefi-break
Mar 8, 2026
Merged

uefi: Handle break in --console recent#131
JohnAZoidberg merged 3 commits intomainfrom
uefi-break

Conversation

@JohnAZoidberg
Copy link
Member

Otherwise if you run
framework_tool.efi --console recent -b
and then stop at one of the screens, the app never exits.

@JohnAZoidberg
Copy link
Member Author

Hm no I don't think this will fix it

@JohnAZoidberg JohnAZoidberg marked this pull request as draft May 5, 2025 06:10
Otherwise if you run
`framework_tool.efi --console recent -b`
and then stop at one of the screens, the app never exits.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
…vent

get_page_break only returns whether page break mode is enabled, not
whether the user requested an execution break (e.g. by pressing 'q'
during pagination or Ctrl+C). Use boot::check_event on the
execution_break Event instead, matching the edk2 ShellGetExecutionBreakFlag
implementation.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
The uefi crate's println! macro calls .expect() on write results. When
the user presses 'q' during -b page break mode, the UEFI shell's
ConsoleLogger disables output and returns EFI_DEVICE_ERROR for all
subsequent writes. This causes the .expect() to panic, resulting in a
page fault crash.

Replace the uefi crate's print!/println! macros with non-panicking
versions that silently ignore write errors, allowing the application to
exit cleanly after the user breaks out of pagination.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
@JohnAZoidberg JohnAZoidberg marked this pull request as ready for review March 8, 2026 17:33
@JohnAZoidberg
Copy link
Member Author

Hm no I don't think this will fix it

Necessary but not sufficient.

Now it works - tried in qemu with framework_tool.efi -h -b and press q does not crash anymore.

@JohnAZoidberg JohnAZoidberg merged commit 5a45784 into main Mar 8, 2026
8 checks passed
@JohnAZoidberg JohnAZoidberg deleted the uefi-break branch March 8, 2026 17:36
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