soc/intel/common/block/cse: allow CSE telemetry on non-lite CSE SKU
The CSE MKHI_BUP_COMMON_GET_BOOT_PERF_DATA command is also implemented in non-Lite CSE SKUs. Original CL [1] adding this feature also says that, but at that point the feature was validated for CSE Lite only. Move cse_get_boot_performance_data() to shared blk/cse/telemetry.c to have it compile for mainboards without CSE Lite. TEST=Boot NovaCustom V540TU (MTL-P / ME Consumer) with SOC_INTEL_CSE_PRE_CPU_RESET_TELEMETRY_V2 selected and check `cbmem -t`: 990:CSME ROM started execution 0 944:CSE sent 'Boot Stall Done' to PMC 34,000 945:CSE started to handle ICC configuration 172,000 (138,000) 946:CSE sent 'Host BIOS Prep Done' to PMC 172,000 (0) 947:CSE received 'CPU Reset Done Ack sent' from PMC 314,000 (142,000) 991:Die Management Unit (DMU) load completed 360,000 (46,000) 0:1st timestamp 385,844 (25,844) 11:start of bootblock 398,796 (12,952) 12:end of bootblock 402,099 (3,302) [...] [1]: https://review.coreboot.org/c/coreboot/+/59507 Change-Id: I3a5b1abd282af9af33cef2371719df4133684a2e Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82898 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com> Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
This commit is contained in:
parent
0d284bfc36
commit
a7437ca340
3 changed files with 31 additions and 30 deletions
|
|
@ -294,7 +294,7 @@ config SOC_INTEL_CSE_LITE_COMPRESS_ME_RW
|
|||
|
||||
config SOC_INTEL_CSE_PRE_CPU_RESET_TELEMETRY
|
||||
def_bool n
|
||||
depends on SOC_INTEL_CSE_LITE_SKU && !SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD
|
||||
depends on !SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD
|
||||
help
|
||||
Mainboard user to select this Kconfig in order to capture pre-cpu
|
||||
reset boot performance telemetry data.
|
||||
|
|
|
|||
|
|
@ -60,35 +60,6 @@ void cse_log_ro_write_protection_info(bool mfg_mode)
|
|||
printk(BIOS_ERR, "ME: Write protection for CSE RO is not enabled\n");
|
||||
}
|
||||
|
||||
enum cb_err cse_get_boot_performance_data(struct cse_boot_perf_rsp *boot_perf_rsp)
|
||||
{
|
||||
struct cse_boot_perf_req {
|
||||
struct mkhi_hdr hdr;
|
||||
uint32_t reserved;
|
||||
} __packed;
|
||||
|
||||
struct cse_boot_perf_req req = {
|
||||
.hdr.group_id = MKHI_GROUP_ID_BUP_COMMON,
|
||||
.hdr.command = MKHI_BUP_COMMON_GET_BOOT_PERF_DATA,
|
||||
.reserved = 0,
|
||||
};
|
||||
|
||||
size_t resp_size = sizeof(struct cse_boot_perf_rsp);
|
||||
|
||||
if (heci_send_receive(&req, sizeof(req), boot_perf_rsp, &resp_size,
|
||||
HECI_MKHI_ADDR)) {
|
||||
printk(BIOS_ERR, "cse_lite: Could not get boot performance data\n");
|
||||
return CB_ERR;
|
||||
}
|
||||
|
||||
if (boot_perf_rsp->hdr.result) {
|
||||
printk(BIOS_ERR, "cse_lite: Get boot performance data resp failed: %d\n",
|
||||
boot_perf_rsp->hdr.result);
|
||||
return CB_ERR;
|
||||
}
|
||||
|
||||
return CB_SUCCESS;
|
||||
}
|
||||
|
||||
static const struct cse_bp_info *cse_get_bp_info_from_rsp(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,6 +6,36 @@
|
|||
|
||||
#define MSEC_TO_USEC(x) (x * 1000)
|
||||
|
||||
enum cb_err cse_get_boot_performance_data(struct cse_boot_perf_rsp *boot_perf_rsp)
|
||||
{
|
||||
struct cse_boot_perf_req {
|
||||
struct mkhi_hdr hdr;
|
||||
uint32_t reserved;
|
||||
} __packed;
|
||||
|
||||
struct cse_boot_perf_req req = {
|
||||
.hdr.group_id = MKHI_GROUP_ID_BUP_COMMON,
|
||||
.hdr.command = MKHI_BUP_COMMON_GET_BOOT_PERF_DATA,
|
||||
.reserved = 0,
|
||||
};
|
||||
|
||||
size_t resp_size = sizeof(struct cse_boot_perf_rsp);
|
||||
|
||||
if (heci_send_receive(&req, sizeof(req), boot_perf_rsp, &resp_size,
|
||||
HECI_MKHI_ADDR)) {
|
||||
printk(BIOS_ERR, "cse: Could not get boot performance data\n");
|
||||
return CB_ERR;
|
||||
}
|
||||
|
||||
if (boot_perf_rsp->hdr.result) {
|
||||
printk(BIOS_ERR, "cse: Get boot performance data resp failed: %d\n",
|
||||
boot_perf_rsp->hdr.result);
|
||||
return CB_ERR;
|
||||
}
|
||||
|
||||
return CB_SUCCESS;
|
||||
}
|
||||
|
||||
static void process_cse_telemetry_data(void)
|
||||
{
|
||||
struct cse_boot_perf_rsp cse_perf_data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue