cr50: check if the new image needs to be enabled and act on it
The AP sends the Cr50 a request to enable the new firmware image. If
the new Cr50 image was found and enabled, the AP expects the Cr50 to
reset the device in 1 second.
While waiting for the Cr50 to reset, the AP logs a newly defined event
and optionally shuts down the system. By default the x86 systems power
off as shutting those systems down is not board specific.
BRANCH=gru,reef
BUG=b:35580805
TEST=built a reef image, observed that in case cr50 image is updated,
after the next reboot the AP stops booting before loading depthcharge,
reports upcoming reset and waits for it.
Once the system is booted after that, the new event can be found
in the log:
localhost ~ # mosys eventlog list
...
7 | 2017-03-23 18:42:12 | Chrome OS Developer Mode
8 | 2017-03-23 18:42:13 | Unknown | 0xac
9 | 2017-03-23 18:42:21 | System boot | 46
...
Change-Id: I45fd6058c03f32ff8edccd56ca2aa5359d9b21b1
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/18946
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
parent
c623aa055d
commit
b9126fe46c
4 changed files with 82 additions and 0 deletions
|
|
@ -122,6 +122,7 @@
|
|||
#define ELOG_WAKE_SOURCE_GPIO 0x04
|
||||
#define ELOG_WAKE_SOURCE_SMBUS 0x05
|
||||
#define ELOG_WAKE_SOURCE_PWRBTN 0x06
|
||||
|
||||
struct elog_event_data_wake {
|
||||
u8 source;
|
||||
u32 instance;
|
||||
|
|
@ -174,6 +175,9 @@ struct elog_event_mem_cache_update {
|
|||
/* CPU Thermal Trip */
|
||||
#define ELOG_TYPE_THERM_TRIP 0xab
|
||||
|
||||
/* Cr50 */
|
||||
#define ELOG_TYPE_CR50_UPDATE 0xac
|
||||
|
||||
#if CONFIG_ELOG
|
||||
/* Eventlog backing storage must be initialized before calling elog_init(). */
|
||||
extern int elog_init(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue