Attention is currently required from: Julius Werner, Karthik Ramasubramanian.
Subrata Banik 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/94644268_23bdda24?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.
Please refer to b/383044280.
In summary, there is a chipset limitation that `poweroff()` using PMC register doesn't work at an early stage on Intel chipset so, we need to use EC driven method.
In future Intel might add that chipset capability