diff options
author | Jingle Hsu <jingle_hsu@wiwynn.com> | 2020-07-02 09:35:06 +0800 |
---|---|---|
committer | Angel Pons <th3fanbus@gmail.com> | 2020-07-24 09:48:34 +0000 |
commit | 1ba62015184c5e8cb750f4f39de9dd382d869cb8 (patch) | |
tree | e9459f03d96235d9b1f9779d467091a40492331a /src/mainboard/ocp/deltalake/romstage.c | |
parent | f9e12e82f75448c557ce5dc840b4a33eae63a342 (diff) |
mb/ocp/deltalake: Send OEM IPMI command for CMOS clear on RTC failure
When RTC failure is detected, send IPMI OEM command to issue CMOS clear.
This is to let the payload (LinuxBoot) handle the IPMI OEM CMOS
clear command by resetting RTC data, erasing RW_VPD (TODO) and add a
SEL, then reboot the system.
Tested=on OCP Delta Lake, after removing RTC battery we can see the above
flow can be executed correctly.
Signed-off-by: Jingle Hsu <jingle_hsu@wiwynn.com>
Change-Id: I27428c02e99040754e15e07782ec1ad8524def2f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43005
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/ocp/deltalake/romstage.c')
-rw-r--r-- | src/mainboard/ocp/deltalake/romstage.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mainboard/ocp/deltalake/romstage.c b/src/mainboard/ocp/deltalake/romstage.c index b366fd9cde..f69ec60c73 100644 --- a/src/mainboard/ocp/deltalake/romstage.c +++ b/src/mainboard/ocp/deltalake/romstage.c @@ -126,3 +126,11 @@ void mainboard_memory_init_params(FSPM_UPD *mupd) mainboard_config_iio(mupd); mainboard_config_upd(mupd); } + +void mainboard_rtc_failed(void) +{ + if (ipmi_set_cmos_clear() == CB_SUCCESS) + printk(BIOS_DEBUG, "%s: IPMI set cmos clear successful\n", __func__); + else + printk(BIOS_ERR, "%s: IPMI set cmos clear failed\n", __func__); +} |