From: "Ni, Ray" <ray.ni@intel.com>
To: "Chao, Zhuoran" <zhuoran.chao@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: Re: [PATCH v2] PcAtChipsetPkg: Change the flow of PcRtcInit()
Date: Sat, 7 May 2022 05:43:32 +0000 [thread overview]
Message-ID: <MWHPR11MB1631C925F4FC95A45E6864B38CC49@MWHPR11MB1631.namprd11.prod.outlook.com> (raw)
In-Reply-To: <a6e9e25475c69706646f81706769910cb8410495.1651891697.git.zhuoran.chao@intel.com>
> - 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.
prev parent reply other threads:[~2022-05-07 5:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-07 2:50 [PATCH v2] PcAtChipsetPkg: Change the flow of PcRtcInit() Zhuoran Chao
2022-05-07 5:43 ` Ni, Ray [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MWHPR11MB1631C925F4FC95A45E6864B38CC49@MWHPR11MB1631.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox