Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remember whether we cut power to ourselves, and re-check during boot
On the hx20 (and presumably hx30,) a design issue prevents us from hibernating the EC properly. Therefore, every time we bring the machine down we cut power instead of hibernating. That results in the next boot being a complete reset. There is code in lfw that checks whether the current boot is due to a watchdog reset or a power-on reset and if it is, clears the image type back to EC_IMAGE_UNKNOWN. Due to that design issue, the hx20 EC is *always* in POR/VTR or WDT on startup. By storing whether the last shutdown was graceful/intended and checking it before resetting the image type, we can work around this issue.
- Loading branch information