From c6c897280e4997eeb3be0311d01c5e2f26b816cd Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Thu, 24 May 2018 17:57:37 -0600 Subject: soc/amd/stoneyridge: Increment boot_count on non-S3 boots Increment the boot_count from romstage when not resuming from S3. BUG=b:80266624 TEST=firmware_EventLog TEST=boot, then: mosys eventlog list | grep boot 1 | 2018-05-24 16:51:42 | System boot | 1 reboot mosys eventlog list | grep boot 1 | 2018-05-24 16:51:42 | System boot | 1 6 | 2018-05-24 16:52:34 | System boot | 2 Change-Id: Ideec9da809e494fb0ea073f648540285972f8238 Signed-off-by: Daniel Kurtz Reviewed-on: https://review.coreboot.org/26525 Reviewed-by: Martin Roth Reviewed-by: Aaron Durbin Reviewed-by: Simon Glass Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) --- src/soc/amd/stoneyridge/romstage.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/soc/amd/stoneyridge') diff --git a/src/soc/amd/stoneyridge/romstage.c b/src/soc/amd/stoneyridge/romstage.c index 0e019f7a86..179168b867 100644 --- a/src/soc/amd/stoneyridge/romstage.c +++ b/src/soc/amd/stoneyridge/romstage.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -94,6 +95,8 @@ asmlinkage void car_stage_entry(void) msr_t sys_cfg = rdmsr(SYSCFG_MSR); sys_cfg.lo &= ~SYSCFG_MSR_TOM2WB; wrmsr(SYSCFG_MSR, sys_cfg); + if (IS_ENABLED(CONFIG_ELOG_BOOT_COUNT)) + boot_count_increment(); } else { printk(BIOS_INFO, "S3 detected\n"); post_code(0x60); -- cgit v1.2.3