Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33534 )
Change subject: vboot: relocate code to log and clear recovery mode switch ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/#/c/33534/3/src/security/vboot/vboot_logic.c File src/security/vboot/vboot_logic.c:
https://review.coreboot.org/#/c/33534/3/src/security/vboot/vboot_logic.c@302 PS3, Line 302: ROMSTAGE_CBMEM_INIT_HOOK(vboot_log_and_clear_recovery_mode_switch)
Why are we doing all of this in the first place?
Do you mean clearing of recovery request here instead of some place else like when the switches are actually read from the EC? I think it is probably because the get recovery mode function has changed a lot in past few years and at the time this was added probably that was the source of truth for identifying recovery mode. I agree that get_recovery-mode_switch() should not be used by anything other than verstage_main(). It might be good to clean this up in a follow up CL and test it out to ensure no flows break.