<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe, branch dependabot/github_actions/github/codeql-action-4</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Fgithub%2Fcodeql-action-4</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Fgithub%2Fcodeql-action-4'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2024-11-13T09:05:56+00:00</updated>
<entry>
<title>PcAtChipsetPkg: Write RTC time in PcRtcInit() only when it is needed</title>
<updated>2024-11-13T09:05:56+00:00</updated>
<author>
<name>Chen Lin Z</name>
<email>lin.z.chen@intel.com</email>
</author>
<published>2024-10-31T04:46:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2839fed575f0eccae7f5a89f7252487dd058b462'/>
<id>urn:sha1:2839fed575f0eccae7f5a89f7252487dd058b462</id>
<content type='text'>
In PcRtcInit(), it always read RTC time and then write it back. It could
potentially cause two issues:
1) There is time gap between read RTC and write RTC, writing RTC time on
every boot could cause RTC time drift after many reboot cycles

2) Writing RTC registers on every boot could cause some unnecessary delay,
slightly impact the boot performance.

The change is only writing RTC time when 1) the current RTC time is not
valid or 2) the RegisterB value is changed.

Signed-off-by: Chen Lin Z &lt;lin.z.chen@intel.com&gt;
</content>
</entry>
<entry>
<title>PcAtChipsetPkg: Use DV bit to stop the RTC first when changing the time</title>
<updated>2024-11-13T09:05:56+00:00</updated>
<author>
<name>Chen Lin Z</name>
<email>lin.z.chen@intel.com</email>
</author>
<published>2024-10-15T05:51:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=df6b43f61b074a9c8c09471b586561ca35370408'/>
<id>urn:sha1:df6b43f61b074a9c8c09471b586561ca35370408</id>
<content type='text'>
Legacy BIOS design sets only the Update Cycle Inhibit (SET) bit when
changing the RTC time. Update Cycle Inhibit Bit may not be supported
by the backend device (Common I2C RTC device). It could add Division
Chain Select (DV) bit to stop the RTC first (Write to 0x07), Changing
the RTC time and then Set the DV bit back.

Signed-off-by: Di Zhang &lt;di.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename LibRtcVirtualNotifyEvent</title>
<updated>2023-10-18T16:15:41+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2023-10-12T09:10:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c62fb455491bc029ca225e61702a7259c4ec324a'/>
<id>urn:sha1:c62fb455491bc029ca225e61702a7259c4ec324a</id>
<content type='text'>
PcatRealTimeClockRuntimeDxe seems to have copied the interface name
LibRtcVirtualNotifyEvent() from EmbeddedPkg's RealTimeClockLib class.
That's not right, for two reasons:

- PcatRealTimeClockRuntimeDxe doesn't consume "EmbeddedPkg.dec" in the
  first place,

- in EmbeddedPkg, the RealTimeClockLib class API
  LibRtcVirtualNotifyEvent() is about to be eliminated (it's a bogus API).

Rename the LibRtcVirtualNotifyEvent() function to VirtualNotifyEvent(),
and make it static.

Tested with booting OVMF.

Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Message-Id: &lt;20231012091057.108728-2-lersek@redhat.com&gt;
Reviewed-by: Sami Mujawar &lt;sami.mujawar@arm.com&gt;
Tested-by: Sami Mujawar &lt;sami.mujawar@arm.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
</content>
</entry>
<entry>
<title>PcAtChipsetPkg: RTC Runtime unable to get correct IO port by PCD</title>
<updated>2023-05-29T02:34:35+00:00</updated>
<author>
<name>Gua Guo</name>
<email>gua.guo@intel.com</email>
</author>
<published>2023-05-22T02:07:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ba2300f97b1947d4ae927cee05f76791c417d707'/>
<id>urn:sha1:ba2300f97b1947d4ae927cee05f76791c417d707</id>
<content type='text'>
RTC runtime is unable to get dynamic PCD value after booting to
OS using runtime services.

Resolution: Cache the dynamic PCD value in RTC driver entry point

Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Gua Guo &lt;gua.guo@intel.com&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
</content>
</entry>
<entry>
<title>PcAtChipsetPkg: Fix conditionally uninitialized variables</title>
<updated>2023-04-03T15:29:08+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2022-11-08T20:32:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7dc182ed1e7198420fa10fb523e3d52093fefab2'/>
<id>urn:sha1:7dc182ed1e7198420fa10fb523e3d52093fefab2</id>
<content type='text'>
Fixes CodeQL alerts for CWE-457:
https://cwe.mitre.org/data/definitions/457.html

Cc: Erich McMillan &lt;emcmillan@microsoft.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Co-authored-by: Erich McMillan &lt;emcmillan@microsoft.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
Reviewed-by: Oliver Smith-Denny &lt;osd@smith-denny.com&gt;
</content>
</entry>
<entry>
<title>PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe:  PcdRtcDefaultYear bounds</title>
<updated>2023-03-30T16:49:05+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2023-03-29T21:22:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e9e61671237e10f7d7672ff74e8907941a954c1d'/>
<id>urn:sha1:e9e61671237e10f7d7672ff74e8907941a954c1d</id>
<content type='text'>
Add bounds checks of PcdRtcDefaultYear to guarantee that the year
is always between PcdMinimalValidYear and PcdMaximalValidYear.
This is required to make the following commit a backwards compatible
change and guarantee and invalid year is never set.

https://github.com/tianocore/edk2/commit/d55d73152ebf5c793b645d6ec5bc517d219881cd

This is required because use of an expression in the DEC file
PCD default value is only used to determine the DEC default values.
If an INF/DSC overrides PcdRtcDefaultYear, then the DEC expression
for PcdMinimalValidYear is not applied again.

Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
</content>
</entry>
<entry>
<title>PcAtChipsetPkg: Add PCD for RTC default year</title>
<updated>2023-03-27T06:19:04+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2023-03-26T02:41:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=d55d73152ebf5c793b645d6ec5bc517d219881cd'/>
<id>urn:sha1:d55d73152ebf5c793b645d6ec5bc517d219881cd</id>
<content type='text'>
Add PcdRtcDefaultYear to specify the default year to use when
the RTC is in an invalid state. Make sure PcdRtcDefaultYear is
&gt;= PcdMinimalValidYear and &lt;= PcdMaximalValidYear.  Set the
default value for this PCD to PcdMinimalValidYear to preserve
the existing behavior. A platform DSC file can override this
default value setting.

Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
</content>
</entry>
<entry>
<title>PcAtChipsetPkg: Change the flow of PcRtcInit()</title>
<updated>2022-05-09T02:45:01+00:00</updated>
<author>
<name>Chao, Zhuoran</name>
<email>zhuoran.chao@intel.com</email>
</author>
<published>2022-05-07T09:39:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=29ae55a0b8194fef2e769f2882297aa601b4777a'/>
<id>urn:sha1:29ae55a0b8194fef2e769f2882297aa601b4777a</id>
<content type='text'>
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3913

The original flow of PcRtcInit() is like:
1. Guarantee atomic accesses to the RTC time registers and
   read out the value.
2. Program RTC register B. (adopt 12h mode or 24h mode. Current
   bios code sets RTC to 24h mode by default).
3. Then function ConvertRtcTimeToEfiTime converts the RTC time
   value to their 24h mode by checking the hour format bit
   (1:24h mode,0:12h mode).
And here lies the problem: Step3 will fail to adjust the value
if Step2 already sets RTC to 24h mode. The hour value in 12h mode
will not be converted to its 24h mode.
The solution is to program RTC register B a little later when all
the original RTC registers' value is retrieved, adjusted
and validated.

ConvertRtcTimeToEfiTime is modified to be more robust.

Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;

Signed-off-by: Zhuoran Chao &lt;zhuoran.chao@intel.com&gt;
</content>
</entry>
<entry>
<title>PcAtChipsetPkg: Apply uncrustify changes</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2021-12-05T22:54:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=5220bd211df890f2672c23c050082862cd1e82d6'/>
<id>urn:sha1:5220bd211df890f2672c23c050082862cd1e82d6</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the PcAtChipsetPkg package

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
</content>
</entry>
<entry>
<title>PcAtChipsetPkg: Change OPTIONAL keyword usage style</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2021-12-03T02:00:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=237295f46d83bf9e384103aaa77d9cf19dcc50b2'/>
<id>urn:sha1:237295f46d83bf9e384103aaa77d9cf19dcc50b2</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760

Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params.

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
</content>
</entry>
</feed>
