Skip to content
  • G Edhaya Chandran's avatar
    UEFI-SCT: SctPkg: Updated the check for monotonic count after restart · dedfd87f
    G Edhaya Chandran authored
    Updated the check for montonic count in the case of after restart
    
    From the UEFI Spec:
    "The platform?s monotonic counter is comprised of two parts: the high 32 bits and the low 32 bits.
    The low 32-bit value is volatile and is reset to zero on every system reset.
    It is increased by 1 on every call to GetNextMonotonicCount().
    The high 32-bit value is nonvolatile and is increased by one on
    whenever the system resets or the low 32-bit counter overflows."
    
    It was found in one case where the higher 32-bit increased by 2
    presumably due to the overflow of lower 32-bit counter.
    Update the logic to handle this case and to print a warning.
    
    Please find more details in the ticket: https://bugzilla.tianocore.org/show_bug.cgi?id=2774
    
    
    
    Cc: Barton Gao <gaojie@byosoft.com.cn>
    Cc: Carolyn Gjertsen <Carolyn.Gjertsen@amd.com>
    Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
    Cc: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com>
    
    Signed-off-by: default avatarG Edhaya <Chandran&lt;edhaya.chandran@arm.com>
    Reviewed-by: default avatarBarton Gao <gaojie@byosoft.com.cn>
    dedfd87f