Files
Stanley Chang 9240705ab8 fix: [ADL] Refactor the UpdateResetReason #2442
This commit refines the UpdateResetReason for ADL with the following improvements:
1. Replacing IsRebootByWdt with WasBootCausedByTcoTimeout. Previously, ADL utilized
   IsRebootByWdt, which was incorrect and redundant. The incorrect aspect involved
   checking a non-existent bit field (TCO_STS_NO_REBOOT), while the redundancy lay
   in its functionality being identical to WasBootCausedByTcoTimeout(). Consequently,
   this commit removes IsRebootByWdt and substitutes IsRebootByWdt with
   WasBootCausedByTcoTimeout.

2. Prioritizing S3/S4 for RstCause assignment in UpdateResetReason. The original code
   assigned ResetWakeS3 or ResetWakeS4 or S3/S4 resume at the end of the check logic.
   However, ResetWakeS3 and ResetWakeS4 already imply a successful resume, allowing us
   to move these checks to the beginning of the function.

3. Setting ResetUnknown for MMIO failure.

4. Setting ResetUnknown for B_PMC_PWRM_GEN_PMCON_A_PWR_FLR. This should be an independent
   check, rather than an "else-if" check as in the original code.

5. Simplifying the check for ResetWarm and ResetCold, as both are held when
   B_PMC_PWRM_GEN_PMCON_A_HOST_RST_STS is set.

Additionally, the commit skips ResetWakeS4 for crash mode in GetCurrentBootOption.
Finally, it removes the UpdateResetReason from TGL and EHL as it is unused.

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2025-05-20 10:36:20 -07:00
..
2022-06-24 08:47:05 -07:00
2022-06-24 08:47:05 -07:00