sysreset: Add SYSRESET_TO_FIRMWARE_UI with reset -u support

Add new SYSRESET_TO_FIRMWARE_UI reset type to allow resetting directly
to firmware UI. This is implemented via the reset command's new -u flag.

For the EFI app, this sets the EFI_OS_INDICATIONS_BOOT_TO_FW_UI bit in
the OsIndications variable before performing a warm reset, causing the
firmware to boot to its setup interface.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-08-29 07:54:17 -06:00
parent 1ad04a7895
commit 96adc477be
7 changed files with 44 additions and 1 deletions

View File

@@ -77,11 +77,13 @@ static int dm_test_sysreset_walk(struct unit_test_state *uts)
state->sysreset_allowed[SYSRESET_POWER] = false;
state->sysreset_allowed[SYSRESET_POWER_OFF] = false;
state->sysreset_allowed[SYSRESET_HOT] = false;
state->sysreset_allowed[SYSRESET_TO_FIRMWARE_UI] = false;
ut_asserteq(-EACCES, sysreset_walk(SYSRESET_WARM));
ut_asserteq(-EACCES, sysreset_walk(SYSRESET_COLD));
ut_asserteq(-EACCES, sysreset_walk(SYSRESET_POWER));
ut_asserteq(-EACCES, sysreset_walk(SYSRESET_POWER_OFF));
ut_asserteq(-EACCES, sysreset_walk(SYSRESET_HOT));
ut_asserteq(-EACCES, sysreset_walk(SYSRESET_TO_FIRMWARE_UI));
/*
* Enable cold system reset - this should make cold system reset work,