diff options
author | Pratikkumar Prajapati <pratikkumar.v.prajapati@intel.com> | 2023-08-15 11:56:29 -0700 |
---|---|---|
committer | Subrata Banik <subratabanik@google.com> | 2023-09-17 04:48:14 +0000 |
commit | 0f56f8376099722b671e118950441731075c71c7 (patch) | |
tree | 8c35c22d894e26a5ad3d48d1ecf218991a6da14c /src/soc/intel/common/block/crashlog | |
parent | 42258e399d3c8143e37a740a10adfe972340107a (diff) | |
download | coreboot-0f56f8376099722b671e118950441731075c71c7.tar.gz coreboot-0f56f8376099722b671e118950441731075c71c7.tar.bz2 coreboot-0f56f8376099722b671e118950441731075c71c7.zip |
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 google/rex.
Change-Id: Iad68d3fdaf7061148b184371f7ef87d83f2b2b38
Signed-off-by: Pratikkumar Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77238
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/common/block/crashlog')
-rw-r--r-- | src/soc/intel/common/block/crashlog/crashlog.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/crashlog/crashlog.c b/src/soc/intel/common/block/crashlog/crashlog.c index 4412cbb17435..e3d85cde2268 100644 --- a/src/soc/intel/common/block/crashlog/crashlog.c +++ b/src/soc/intel/common/block/crashlog/crashlog.c @@ -154,6 +154,16 @@ int __weak cpu_cl_clear_data(void) return cpu_cl_mailbox_cmd(CPU_CRASHLOG_CMD_CLEAR, 0); } +void __weak cpu_cl_rearm(void) +{ + /* empty implementation */ +} + +void __weak cpu_cl_cleanup(void) +{ + /* empty implementation */ +} + int pmc_cl_gen_descriptor_table(u32 desc_table_addr, pmc_crashlog_desc_table_t *descriptor_table) { @@ -466,6 +476,10 @@ void cl_get_cpu_sram_data(void) /* 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) |