soc/intel/cmn/cse: Skip sending CSE `get_boot_perf` when CSE hidden

This patch avoids sending the `Get Boot perf` command while booting
with CSE device hidden.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I498c14d144295a9bc694b90060ca74c66966d65e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63867
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
This commit is contained in:
Subrata Banik 2022-04-26 20:34:56 +05:30 committed by Felix Held
parent 40c2c07b6f
commit 0feef99814
1 changed files with 12 additions and 1 deletions

View File

@ -6,7 +6,7 @@
#define MSEC_TO_USEC(x) (x * 1000)
void cse_get_telemetry_data(void)
static void cbmem_inject_telemetry_data(void)
{
struct cse_boot_perf_rsp cse_perf_data;
s64 ts[NUM_CSE_BOOT_PERF_DATA] = {0};
@ -72,3 +72,14 @@ void cse_get_telemetry_data(void)
timestamp_add(TS_ME_RECEIVED_CRDA_FROM_PMC,
start_stamp + ts[PERF_DATA_PMC_SENT_CRDA]);
}
void cse_get_telemetry_data(void)
{
/* If CSE is already hidden then accessing CSE registers should be avoided */
if (!is_cse_enabled()) {
printk(BIOS_DEBUG, "CSE is disabled, not sending `Get Boot Perf` message\n");
return;
}
cbmem_inject_telemetry_data();
}