Skip to content

Commit 63c5021

Browse files
debmcdcrowell77
authored andcommitted
Update DDR5 PMIC Health Check Log Trigger
In a recent fix the l_response_size was needing a multiplication factor to accommodate the hwp_data_unit calculation. This value was also being used to trigger when to log based upon payload size greater than 1 unit. This payload size check also needs to factor the hwp_data_unit multiplication to properly trigger the logging of DDR5 PMIC Health Check data. In addition, the DDR5 Telemetry structures now support l_pmic_status so populate the DDR5 Telemetry flow with the proper values to properly update the SRC words accordingly. STGD: 611479 Change-Id: I7017ac129eaf2de8e511547541b65b76243c7f83 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/c/hostboot/+/170353 Tested-by: FSP CI Jenkins <[email protected]> Reviewed-by: Daniel M Crowell <[email protected]> Reviewed-by: Veena Ganti <[email protected]> Tested-by: Hostboot CI <[email protected]> Tested-by: Jenkins Combined Simics CI <[email protected]> Tested-by: Jenkins OP Build CI <[email protected]> Tested-by: Jenkins OP HW <[email protected]> Tested-by: Jenkins Server <[email protected]>
1 parent a10243c commit 63c5021

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/usr/sbeio/sbe_psuSendMemConfig.C

+8-3
Original file line numberDiff line numberDiff line change
@@ -312,13 +312,15 @@ errlHndl_t getMultiPmicHealthCheckData(Target * i_proc,
312312
// is retrieved by calling the HWP pmic_health_check_ddr5
313313
l_pmic_revision = l_pmic_health_data_ddr5.iv_revision; // use ONLY on periodic_telemetry_data struct
314314
l_response_size = l_pmic_data_ddr5.getLength() * sizeof(fapi2::hwp_data_unit); // fapi2 ostream requires the unit size multiplication
315+
// DDR5 Telemetry uses the iv_aggregate_pmic_state, if DDR5 Health Check will be updated in the l_ddr5_run_health_check below
316+
l_pmic_status = l_pmic_health_data_ddr5.iv_aggregate_pmic_state; // DDR5 Telemetry, use ONLY on periodic_telemetry_data struct
315317
if (l_ddr5_run_health_check)
316318
{
317319
l_pmic_status = l_pmic_health_data_ddr5_consolidated.iv_health_check.iv_aggregate_state; // use ONLY on consolidated_health_check_data struct
318320
l_pmic_revision = l_pmic_health_data_ddr5_consolidated.iv_health_check.iv_revision; // use ONLY on consolidated_health_check_data struct
319321
// If the response size is one byte, then the DDR5 Health Check HWP is indicating for Hostboot not to log anything
320-
// For DDR5 Health Check the only logs produced will be if the payload from the HWP comes back greater than one byte
321-
if (l_response_size > 1) // We have something to log from DDR5 Health Check
322+
// For DDR5 Health Check the only logs produced will be if the payload from the HWP comes back greater than one unit (hwp_data_unit)
323+
if ( l_response_size > (1 * sizeof(fapi2::hwp_data_unit)) ) // We have something to log from DDR5 Health Check
322324
{
323325
l_logs_available = true; // flag so we know we should log later, most healthy cases we should not log anything
324326
}
@@ -351,7 +353,10 @@ errlHndl_t getMultiPmicHealthCheckData(Target * i_proc,
351353
l_err_log->collectTrace(SBEIO_COMP_NAME);
352354

353355
// DDR4 Update mask for this pmic status in the SRC word 9
354-
// DDR5 l_pmic_status comes from iv_aggregate_state (consolidated_health_check_data struct), set previously on DDR5 4U Health Check above
356+
// DDR5 l_pmic_status will be set by Telemetry iv_aggregate_pmic_state (periodic_telemetry_data struct)
357+
// and Health Check iv_aggregate_state (consolidated_health_check_data struct)
358+
TRACFCOMP(g_trac_sbeio, "getMultiPmicHealthCheckData HUID=0x%X l_pmic_status=0x%X l_pmic_combined_status=0x%X",
359+
get_huid(l_pOcmb), l_pmic_status, l_pmic_combined_status);
355360
if( l_pmic_status > l_pmic_combined_status )
356361
{
357362
l_pmic_combined_status = l_pmic_status;

0 commit comments

Comments
 (0)