Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36847 )
Change subject: [WIP] security/vboot: Remove selected_region from struct vboot_working_data ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36847/1/src/security/vboot/bootmode... File src/security/vboot/bootmode.c:
https://review.coreboot.org/c/coreboot/+/36847/1/src/security/vboot/bootmode... PS1, Line 27: vboot_get_recovery_reason_shared_data
We should also start thinking about how to clean up this recovery_reason business. […]
First of all, we should fix these ugly x86 hacks of saving/restoring the recovery reason in various cases. coreboot shouldn't have to deal with any of that stuff. We should just clear the recovery reason at a later point (e.g. right before entering the recovery UI) so that when early platform init needs to reboot for whatever reason, it doesn't affect vboot state.
After that, we should evaluate if we really need anything outside of vboot to know the recovery reason at all anymore. The one more thing I'm aware of is the MEMORY_RETRAIN stuff, but that might be better served by a context flag instead. If we do decide we need it, then yeah, just a vb2_get_recovery_reason() is probably best.