Attention is currently required from: Dinesh Gehlot, Intel coreboot Reviewers, Jayvik Desai, Julius Werner, Jérémy Compostella, Kapil Porwal, Karthik Ramasubramanian, Nick Vaccaro.
Subrata Banik has posted comments on this change by Subrata Banik. ( https://review.coreboot.org/c/coreboot/+/86227?usp=email )
Change subject: soc/intel/adl: Handle critical low battery early in romstage ......................................................................
Patch Set 3:
(2 comments)
File src/soc/intel/alderlake/romstage/fsp_params.c:
https://review.coreboot.org/c/coreboot/+/86227/comment/c472f06a_49e66fe2?usp... : PS3, Line 421: if (CONFIG(EC_GOOGLE_CHROMEEC) && google_chromeec_is_below_critical_threshold()) {
I would recommend to decouple ChromeEC and SoC code as much as possible. Probably introduce a weak platform_early_shutdown callback and then override it in vendorcode/google/chromeos?
as you know we won't be able to move `ux_inform_user_of_poweroff_operation` into vc/google/chromeos due to the scope of the function. Are you suggesting to override `platform_early_shutdown` with below code alone
``` /* Allow user to notice the low battery indicator before poweroff */ delay(3); elog_add_event_byte(ELOG_TYPE_LOW_BATTERY_INDICATOR, ELOG_FW_ISSUE_SHUTDOWN); /* Send Shutdown command to EC */ google_chromeec_reboot(EC_REBOOT_COLD_AP_OFF, 0); ```
https://review.coreboot.org/c/coreboot/+/86227/comment/eb56393f_7af099dd?usp... : PS3, Line 446: early_shutdown_if_battery_below_critical_threshold();
Oh, okay, so this isn't mutually exclusive with the ramstage version, this is only for the memory training / CSE update case, and in all other cases we want to wait until ramstage.
correct
That really isn't obvious from the code yet, it would be good to add a comment and expand the Kconfig help description to explain that more clearly.
I will add comment to explain the motivation