summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2022-04-26 20:34:56 +0530
committerFelix Held <felix-coreboot@felixheld.de>2022-04-29 21:34:04 +0000
commit0feef9981428eaa1cb94701d260ba8123dd79c35 (patch)
tree681d0784861f96eda6759ed236b166082652cae2
parent40c2c07b6f93ef63ef6f5a1588253bb5a91e0016 (diff)
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>
-rw-r--r--src/soc/intel/common/block/cse/telemetry.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/soc/intel/common/block/cse/telemetry.c b/src/soc/intel/common/block/cse/telemetry.c
index 544de802d1..f3dd7ee819 100644
--- a/src/soc/intel/common/block/cse/telemetry.c
+++ b/src/soc/intel/common/block/cse/telemetry.c
@@ -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();
+}