ec: Add romstage function for checking and rebooting EC
Now that we are executing VbInit() in coreboot we can end up in a situation where the recovery reason is consumed during VbInit (end of romstage) and then the EC is rebooted to RO during ramstage EC init, thereby losing the recovery reason. Two possiblities are to remove the EC check+reboot from ramstage and let it happen in depthcharge. This however means that the system has to boot all the way into depthcharge and then reboot the EC and the system again. Instead if we do a check in romstage before VbInit() is called then we can reboot the EC into RO early and avoid booting all the way to depthcharge first. This change adds a ramstage version the EC init function and calls it from the shared romstage code immediately after the PCH decode windows are setup. BUG=chrome-os-partner:19928 BRANCH=none TEST=manual: enter recovery with crossystem recovery_request=193 Change-Id: Ic927c69a95a2114e29c343f0dcc28374266db394 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/57470 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
8f6c55c28f
commit
1ee11133c0
3 changed files with 46 additions and 2 deletions
|
|
@ -38,6 +38,9 @@
|
|||
#if CONFIG_CHROMEOS
|
||||
#include <vendorcode/google/chromeos/chromeos.h>
|
||||
#endif
|
||||
#if CONFIG_EC_GOOGLE_CHROMEEC
|
||||
#include <ec/google/chromeec/ec.h>
|
||||
#endif
|
||||
#include "haswell.h"
|
||||
#include "northbridge/intel/haswell/haswell.h"
|
||||
#include "northbridge/intel/haswell/raminit.h"
|
||||
|
|
@ -216,6 +219,11 @@ void romstage_common(const struct romstage_params *params)
|
|||
|
||||
wake_from_s3 = early_pch_init(params->gpio_map, params->rcba_config);
|
||||
|
||||
#if CONFIG_EC_GOOGLE_CHROMEEC
|
||||
/* Ensure the EC is in the right mode for recovery */
|
||||
google_chromeec_early_init();
|
||||
#endif
|
||||
|
||||
/* Halt if there was a built in self test failure */
|
||||
report_bist_failure(params->bist);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue