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>
This commit is contained in:
parent
42258e399d
commit
0f56f83760
|
@ -154,6 +154,16 @@ int __weak cpu_cl_clear_data(void)
|
||||||
return cpu_cl_mailbox_cmd(CPU_CRASHLOG_CMD_CLEAR, 0);
|
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,
|
int pmc_cl_gen_descriptor_table(u32 desc_table_addr,
|
||||||
pmc_crashlog_desc_table_t *descriptor_table)
|
pmc_crashlog_desc_table_t *descriptor_table)
|
||||||
{
|
{
|
||||||
|
@ -466,6 +476,10 @@ void cl_get_cpu_sram_data(void)
|
||||||
|
|
||||||
/* clear telemetry SRAM region */
|
/* clear telemetry SRAM region */
|
||||||
cpu_cl_clear_data();
|
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)
|
void collect_pmc_and_cpu_crashlog_from_srams(void)
|
||||||
|
|
|
@ -138,7 +138,6 @@ typedef union {
|
||||||
u64 data;
|
u64 data;
|
||||||
} __packed cpu_crashlog_header_t;
|
} __packed cpu_crashlog_header_t;
|
||||||
|
|
||||||
|
|
||||||
/* Structures for CPU CrashLog mailbox interface */
|
/* Structures for CPU CrashLog mailbox interface */
|
||||||
typedef union {
|
typedef union {
|
||||||
struct {
|
struct {
|
||||||
|
@ -192,6 +191,8 @@ u32 cl_gen_cpu_bar_addr(void);
|
||||||
int cpu_cl_poll_mailbox_ready(u32 cl_mailbox_addr);
|
int cpu_cl_poll_mailbox_ready(u32 cl_mailbox_addr);
|
||||||
int cpu_cl_mailbox_cmd(u8 cmd, u8 param);
|
int cpu_cl_mailbox_cmd(u8 cmd, u8 param);
|
||||||
int cpu_cl_clear_data(void);
|
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,
|
int pmc_cl_gen_descriptor_table(u32 desc_table_addr,
|
||||||
pmc_crashlog_desc_table_t *descriptor_table);
|
pmc_crashlog_desc_table_t *descriptor_table);
|
||||||
bool pmc_cl_discovery(void);
|
bool pmc_cl_discovery(void);
|
||||||
|
|
Loading…
Reference in New Issue