diff --git a/src/soc/intel/pantherlake/crashlog.c b/src/soc/intel/pantherlake/crashlog.c index d9a80f46c1..a57a16863f 100644 --- a/src/soc/intel/pantherlake/crashlog.c +++ b/src/soc/intel/pantherlake/crashlog.c @@ -18,6 +18,8 @@ #define CRASHLOG_PUNIT_STORAGE_OFF_MASK BIT(24) #define CRASHLOG_RE_ARM_STATUS_MASK BIT(25) #define CRASHLOG_CONSUMED_BIOS_MASK BIT(27) +#define CRASHLOG_SET_CLEAR_TRIGGER_MASK BIT(30) +#define CRASHLOG_SET_CONSUMED_MASK BIT(18) /* Global crashLog info */ static bool m_pmc_crash_log_support; @@ -392,6 +394,10 @@ static uintptr_t get_control_status_interface(void) int cpu_cl_clear_data(void) { + /* Clear all crashlog data and CRASHLOG_SET_CONSUMED = 1 -> sets CONSUMED_BIOS bit */ + setbits64p(cl_get_cpu_bar_addr() + CRASHLOG_WATCHER_CONTROL_OFFSET, + CRASHLOG_SET_CLEAR_TRIGGER_MASK | CRASHLOG_SET_CONSUMED_MASK); + return 0; } diff --git a/src/soc/intel/pantherlake/include/soc/crashlog.h b/src/soc/intel/pantherlake/include/soc/crashlog.h index eed653ba7d..32a37bd89b 100644 --- a/src/soc/intel/pantherlake/include/soc/crashlog.h +++ b/src/soc/intel/pantherlake/include/soc/crashlog.h @@ -14,6 +14,7 @@ #define CRASHLOG_DVSEC_ID 0x04 #define TEL_DVSEC_TBIR_BAR0 0 #define TEL_DVSEC_TBIR_BAR1 1 +#define CRASHLOG_WATCHER_CONTROL_OFFSET 0x10 typedef union { struct {