Attention is currently required from: Intel coreboot Reviewers, Julius Werner, Karthik Ramasubramanian, Subrata Banik.
Angel Pons has posted comments on this change by Subrata Banik. ( https://review.coreboot.org/c/coreboot/+/86336?usp=email )
Change subject: soc/intel/cmn/pmc: Add support for early power off ......................................................................
Patch Set 3:
(1 comment)
File src/soc/intel/common/block/pmc/pmclib.c:
https://review.coreboot.org/c/coreboot/+/86336/comment/58cfaed8_f38cb763?usp... : PS3, Line 635: __weak void platform_do_early_poweroff(void)
I'm unable to follow what is **inappropriate** here. […]
How about guarding `platform_do_early_poweroff()` behind a generic `PLATFORM_HAS_EARLY_POWEROFF` Kconfig option? The idea is that whoever selects this Kconfig has to provide a definition of `platform_do_early_poweroff()`, which could be mainboard code, EC code or whatever.
``` void poweroff(void) { if (!ENV_ROMSTAGE_OR_BEFORE) { pmc_control_poweroff(); } else if (CONFIG(PLATFORM_HAS_EARLY_POWEROFF)) { platform_do_early_poweroff(); } else { printk(BIOS_EMERG, "This platform doesn't know how to power off before ramstage, hanging!\n"); halt(); } } ``` As for making the chipset behave, I know I was able to power off Haswell during romstage (before raminit), but I had to perform a few extra steps for it to work. I don't remember where I put that code but I can look for it tomorrow (it's part of an interactive command-line I use for testing, I never published it).