Attention is currently required from: Karthik Ramasubramanian, Subrata Banik.
Julius Werner has posted comments on this change by Subrata Banik. ( https://review.coreboot.org/c/coreboot/+/86228?usp=email )
Change subject: vc/google/chromeos: Implement platform callback for critical shutdown ......................................................................
Patch Set 7:
(1 comment)
File src/vendorcode/google/chromeos/battery.c:
https://review.coreboot.org/c/coreboot/+/86228/comment/6672f47e_f23467bb?usp... : PS7, Line 59: google_chromeec_reboot(EC_REBOOT_COLD_AP_OFF, 0); I'm still not really clear why this needs to be an EC command rather than a normal `poweroff()`? If this was about there being some sort of bug with `poweroff()` ― I think I read that somewhere(?) ― then perhaps the answer is to change the `poweroff()` implementation for the ChromeOS platforms to use an EC command instead, rather than making generic code avoid using the API entirely. If coreboot has a global API like `poweroff()` that's implemented by the platforms, the assumption is that the platform should implement it in a way that works correctly, and the generic code should not need to be aware of any platform-specific quirks with it.
This plays into the question whether this function needs to be platform-specific at all. If you need to use an EC command then I guess it needs to, but if you could just use `poweroff()` you could make it generic.