Attention is currently required from: Pratikkumar Prajapati.
Hello Pratikkumar Prajapati,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/77238?usp=email
to review the following change.
Change subject: soc/intel/common: Add cleanup and rearm functions ......................................................................
soc/intel/common: Add cleanup and rearm functions
Introduce cpu_cl_cleanup() and cpu_cl_rearm() functions for CPU crashlog flow. Also add default weak implementations.
BUG=b:262501347 TEST=Able to build REX.
Change-Id: Iad68d3fdaf7061148b184371f7ef87d83f2b2b38 Signed-off-by: Pratikkumar Prajapati pratikkumar.v.prajapati@intel.corp-partner.google.com --- M src/soc/intel/common/block/crashlog/crashlog.c M src/soc/intel/common/block/include/intelblocks/crashlog.h 2 files changed, 27 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/77238/1
diff --git a/src/soc/intel/common/block/crashlog/crashlog.c b/src/soc/intel/common/block/crashlog/crashlog.c index 4412cbb..ce4ed37 100644 --- a/src/soc/intel/common/block/crashlog/crashlog.c +++ b/src/soc/intel/common/block/crashlog/crashlog.c @@ -154,6 +154,16 @@ return cpu_cl_mailbox_cmd(CPU_CRASHLOG_CMD_CLEAR, 0); }
+void __weak cpu_cl_rearm(void) +{ + return; +} + +void __weak cpu_cl_cleanup(void) +{ + return; +} + int pmc_cl_gen_descriptor_table(u32 desc_table_addr, pmc_crashlog_desc_table_t *descriptor_table) { @@ -466,6 +476,10 @@
/* clear telemetry SRAM region */ cpu_cl_clear_data(); + /* perform any SOC specific cleanup */ + cpu_cl_cleanup(); + /* rearm crashlog */ + cpu_cl_rearm(); }
void collect_pmc_and_cpu_crashlog_from_srams(void) diff --git a/src/soc/intel/common/block/include/intelblocks/crashlog.h b/src/soc/intel/common/block/include/intelblocks/crashlog.h index 749f63f..df2879e 100644 --- a/src/soc/intel/common/block/include/intelblocks/crashlog.h +++ b/src/soc/intel/common/block/include/intelblocks/crashlog.h @@ -121,16 +121,21 @@
typedef union { struct { - u64 access_type :4; - u64 crash_type :4; - u64 count :8; - u64 reserved :16; - u64 guid :32; + u64 access_type :4; + u64 crash_type :4; + u64 count :8; + u64 reserved1 :4; + u64 clr_support :1; + u64 storage_off_support :1; + u64 reserved2 :2; + u64 storage_off_status :1; + u64 re_arm_status :1; + u64 reserved3 :6; + u64 guid :32; } fields; u64 data; } __packed cpu_crashlog_header_t;
- /* Structures for CPU CrashLog mailbox interface */ typedef union { struct { @@ -184,6 +189,8 @@ int cpu_cl_poll_mailbox_ready(u32 cl_mailbox_addr); int cpu_cl_mailbox_cmd(u8 cmd, u8 param); int cpu_cl_clear_data(void); +void cpu_cl_rearm(void); +void cpu_cl_cleanup(void); int pmc_cl_gen_descriptor_table(u32 desc_table_addr, pmc_crashlog_desc_table_t *descriptor_table); bool pmc_cl_discovery(void);