[edk2-devel] [PATCH v2] PcAtChipsetPkg: Change the flow of PcRtcInit()
Ni, Ray
ray.ni at intel.com
Sat May 7 05:43:32 UTC 2022
> - if ((Time->Hour & 0x80) != 0) {
> - IsPM = TRUE;
> - } else {
> - IsPM = FALSE;
> + // Check 24-hour format situation
> + if (RegisterB.Bits.Mil == 1) {
> + if (RegisterB.Bits.Dm == 0) {
> + if (Time->Hour > 0x23) {
> + return EFI_INVALID_PARAMETER;
> + }
> + } else {
> + if (Time->Hour > 0x17) {
> + return EFI_INVALID_PARAMETER;
> + }
> + }
> + }
> +
> + // IsPM only makes sense for 12-hour format.
> + if (RegisterB.Bits.Mil == 0) {
> + if ((Time->Hour & 0x80) != 0) {
> + IsPM = TRUE;
> + } else {
> + IsPM = FALSE;
> + }
> }
>
Is it possible to remove above check?
RtcTimeFieldsValid() already does the check.
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89573): https://edk2.groups.io/g/devel/message/89573
Mute This Topic: https://groups.io/mt/90947516/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list