<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2-platforms.git/Silicon/Hisilicon/Library, branch CodeCleanup</title>
<subtitle>EDK II sample platform branches and tags (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2-platforms.git/atom?h=CodeCleanup</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/atom?h=CodeCleanup'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/'/>
<updated>2023-10-24T13:19:17+00:00</updated>
<entry>
<title>Hisilicon/RX8900RealTimeClockLib: remove superfluous instance init steps</title>
<updated>2023-10-24T13:19:17+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2023-10-20T12:19:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=34d6ed1e26df80833fe1fc9f76996131a48bf10d'/>
<id>urn:sha1:34d6ed1e26df80833fe1fc9f76996131a48bf10d</id>
<content type='text'>
RealTimeClockLib instances are consumed by edk2's
EmbeddedPkg/RealTimeClockRuntimeDxe driver. In its entry point function
InitializeRealTimeClock(), the driver:

(1) calls LibRtcInitialize(),

(2) sets the GetTime(), SetTime(), GetWakeupTime() and SetWakeupTime()
    runtime services to its own similarly-named functions -- where those
    functions wrap the corresponding RealTimeClockLib APIs,

(3) installs EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL with a NULL protocol
    interface.

Steps (2) and (3) conform to PI v1.8 sections II-9.7.2.4 through
II-9.7.2.7.

However, this means that LibRtcInitialize() (of any RealTimeClockLib
instance) should not itself (a) set the GetTime(), SetTime(),
GetWakeupTime() and SetWakeupTime() runtime services, nor (b) install
EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL. The runtime service pointers will be
overwritten in step (2) anyway, and step (3) will uselessly install a
second (NULL-interface) EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL instance in the
protocol database. (The protocol only serves to notify the DXE Foundation
about said runtime services being available.)

Clean up Hisilicon/RX8900RealTimeClockLib accordingly.

(Note that the lib instance INF file already does not list
UefiBootServicesTableLib, UefiRuntimeServicesTableLib, and
gEfiRealTimeClockArchProtocolGuid.)

Note that this patch is *untestable* in edk2-platforms (and in
edk2-non-osi too), because no platform consumes RX8900RealTimeClockLib --
worse, there hasn't been a single consumer since the introduction of the
lib instance in commit de704335c47f ("Silicon/Hisilicon: Add
RX8900RealTimeClockLib", 2020-05-20).

Normally this would nominate RX8900RealTimeClockLib to the axe, but commit
de704335c47f said, "There are some boards base on D06, but use RX8900 RTC,
so upstream the RX8900RealTimeClockLib", so I guess there might be
out-of-tree / proprietary consumers. Quite unfortunate.

Cc: Ard Biesheuvel &lt;ardb+tianocore@kernel.org&gt;
Cc: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Cc: Wenyi Xie &lt;xiewenyi2@huawei.com&gt;
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4565
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Message-Id: &lt;20231020121903.44986-5-lersek@redhat.com&gt;
Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
</content>
</entry>
<entry>
<title>Hisilicon/M41T83RealTimeClockLib: remove superfluous instance init steps</title>
<updated>2023-10-24T13:19:17+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2023-10-20T12:18:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=875aa400fb5418b366b5461a7820319c0d6b041c'/>
<id>urn:sha1:875aa400fb5418b366b5461a7820319c0d6b041c</id>
<content type='text'>
RealTimeClockLib instances are consumed by edk2's
EmbeddedPkg/RealTimeClockRuntimeDxe driver. In its entry point function
InitializeRealTimeClock(), the driver:

(1) calls LibRtcInitialize(),

(2) sets the GetTime(), SetTime(), GetWakeupTime() and SetWakeupTime()
    runtime services to its own similarly-named functions -- where those
    functions wrap the corresponding RealTimeClockLib APIs,

(3) installs EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL with a NULL protocol
    interface.

Steps (2) and (3) conform to PI v1.8 sections II-9.7.2.4 through
II-9.7.2.7.

However, this means that LibRtcInitialize() (of any RealTimeClockLib
instance) should not itself (a) set the GetTime(), SetTime(),
GetWakeupTime() and SetWakeupTime() runtime services, nor (b) install
EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL. The runtime service pointers will be
overwritten in step (2) anyway, and step (3) will uselessly install a
second (NULL-interface) EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL instance in the
protocol database. (The protocol only serves to notify the DXE Foundation
about said runtime services being available.)

Clean up Hisilicon/M41T83RealTimeClockLib accordingly (it only has code
that's redundant for step (2); it does not try to install
EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL).

(Note that the lib instance INF file already does not list
UefiRuntimeServicesTableLib.)

Build-tested only (with the D06 platform).

Cc: Ard Biesheuvel &lt;ardb+tianocore@kernel.org&gt;
Cc: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Cc: Wenyi Xie &lt;xiewenyi2@huawei.com&gt;
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4565
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Message-Id: &lt;20231020121903.44986-4-lersek@redhat.com&gt;
Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
</content>
</entry>
<entry>
<title>Hisilicon/RX8900RealTimeClockLib: drop LibRtcVirtualNotifyEvent</title>
<updated>2023-10-13T10:11:32+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2023-10-12T09:09:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=c71fae8f2a641442f9ad62b7e792a1de8d59460f'/>
<id>urn:sha1:c71fae8f2a641442f9ad62b7e792a1de8d59460f</id>
<content type='text'>
The RealTimeClockLib class header in edk2 mistakenly declares a function
called LibRtcVirtualNotifyEvent(). No component ever calls this function
crossing module boundaries; all RealTimeClockLib instances in edk2 and
edk2-platforms are supposed to register (and do register) their
SetVirtualAddressMap() notification functions.

In particular, RX8900RealTimeClockLib *itself* doesn't even use
LibRtcVirtualNotifyEvent() -- the function is defined with an empty body,
clearly in an understandable, but misguided, attempt, to conform to the
(bogus) library interface. Remove the function.

Note that this patch is *untestable* in edk2-platforms (and in
edk2-non-osi too), because no platform consumes RX8900RealTimeClockLib --
worse, there hasn't been a single consumer since the introduction of the
lib instance in commit de704335c47f ("Silicon/Hisilicon: Add
RX8900RealTimeClockLib", 2020-05-20).

Normally this would nominate RX8900RealTimeClockLib to the axe, but commit
de704335c47f said, "There are some boards base on D06, but use RX8900 RTC,
so upstream the RX8900RealTimeClockLib", so I guess there might be
out-of-tree / proprietary consumers. Quite unfortunate.

Cc: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Cc: Wenyi Xie &lt;xiewenyi2@huawei.com&gt;
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
</content>
</entry>
<entry>
<title>Hisilicon: drop unused VirtualRealTimeClockLib instance</title>
<updated>2023-10-13T10:11:24+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2023-10-12T09:09:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=d4baf8d4e7a532b6b862cd1bcb2c5a6a2c858f51'/>
<id>urn:sha1:d4baf8d4e7a532b6b862cd1bcb2c5a6a2c858f51</id>
<content type='text'>
VirtualRealTimeClockLib is not used in either edk2-platforms or
edk2-non-osi, and there never has been a reference to it -- even the
initial code drop that added it to edk2-platforms [*] contained zero
references to it. Remove it.

[*] commit 600081b52deb ("Platform,Silicon: Import Hisilicon D02,D03,D05
and HiKey", 2017-08-03)

Cc: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Cc: Wenyi Xie &lt;xiewenyi2@huawei.com&gt;
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
</content>
</entry>
<entry>
<title>Hisilicon: drop unused DS3231RealTimeClockLib instance</title>
<updated>2023-10-13T10:11:19+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2023-10-12T09:09:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=a24eacb88b378d6816b54635e3dfee3e20037e61'/>
<id>urn:sha1:a24eacb88b378d6816b54635e3dfee3e20037e61</id>
<content type='text'>
Edk2-platforms contains two DS3231RealTimeClockLib instances:

- Silicon/Hisilicon/Library/DS3231RealTimeClockLib
- Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib

The latter is still used (by the D03 and D05 platforms), but the former
has not been referenced since commit 478282ea28c7 ("Hisilicon/D02: Remove
D02 platform", 2018-08-08). Remove the unused library instance.

(There's no reference in edk2-non-osi either.)

Cc: Leif Lindholm &lt;quic_llindhol@quicinc.com&gt;
Cc: Wenyi Xie &lt;xiewenyi2@huawei.com&gt;
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
</content>
</entry>
<entry>
<title>Silicon/Hisilicon: Add RX8900RealTimeClockLib</title>
<updated>2020-05-20T11:29:58+00:00</updated>
<author>
<name>Ming Huang</name>
<email>huangming23@huawei.com</email>
</author>
<published>2020-05-19T14:09:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=de704335c47f8f1f55bbcc72a2d206f4acfc485a'/>
<id>urn:sha1:de704335c47f8f1f55bbcc72a2d206f4acfc485a</id>
<content type='text'>
There are some boards base on D06, but use RX8900 RTC,
so upstream the RX8900RealTimeClockLib.

Signed-off-by: Ming Huang &lt;huangming23@huawei.com&gt;
Reviewed-by: Leif Lindholm &lt;leif@nuviainc.com&gt;
</content>
</entry>
<entry>
<title>Hisilicon/Library: Move two functions to RtcHelperLib</title>
<updated>2020-05-20T11:29:51+00:00</updated>
<author>
<name>Ming Huang</name>
<email>huangming23@huawei.com</email>
</author>
<published>2020-05-19T14:09:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=d727a45140852dd878239866879c069540079fa7'/>
<id>urn:sha1:d727a45140852dd878239866879c069540079fa7</id>
<content type='text'>
The functions of acquiring ownership of RTC will be used for other
RTC library, so move them to RtcHelperLib. Rename them by add leading
Oem for uniform.

Signed-off-by: Ming Huang &lt;huangming23@huawei.com&gt;
Reviewed-by: Leif Lindholm &lt;leif@nuviainc.com&gt;
</content>
</entry>
<entry>
<title>Silicon/Hisilicon: Fix a typo issue in M41T83RealTimeClockLib</title>
<updated>2020-05-20T11:29:41+00:00</updated>
<author>
<name>Ming Huang</name>
<email>huangming23@huawei.com</email>
</author>
<published>2020-05-19T14:09:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=014fe610cf764077622d61f25a266f3744f70dfa'/>
<id>urn:sha1:014fe610cf764077622d61f25a266f3744f70dfa</id>
<content type='text'>
There is a typo issue in M41T83RealTimeClockLib. The MACROSECOND
should be MICROSECOND.

Signed-off-by: Ming Huang &lt;huangming23@huawei.com&gt;
Reviewed-by: Leif Lindholm &lt;leif@nuviainc.com&gt;
</content>
</entry>
<entry>
<title>Silicon/Hisilicon/PlatformIntelBdsLib: Remove Hisilicon PlatformBdsLib</title>
<updated>2019-06-12T00:19:13+00:00</updated>
<author>
<name>Hao A Wu</name>
<email>hao.a.wu@intel.com</email>
</author>
<published>2019-05-13T06:15:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=6e2e07bb2c99bf74abafdb7f1892589f320d1b6d'/>
<id>urn:sha1:6e2e07bb2c99bf74abafdb7f1892589f320d1b6d</id>
<content type='text'>
Hisilicon platforms have already switched to the BDS driver in
MdeModulePkg by commit 5845a5cde9d6bd51d77067b2594654005887a434.

Thus, the Hisilicon PlatformBdsLib is no longer needed. This commit will
remove this library instance implementation.

Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Hao A Wu &lt;hao.a.wu@intel.com&gt;
Reviewed-by: Leif Lindholm &lt;leif.lindholm@linaro.org&gt;
Reviewed-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
</content>
</entry>
<entry>
<title>Silicon/Hisilicon: Replace BSD License with BSD+Patent License</title>
<updated>2019-05-17T21:22:17+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2019-05-15T22:48:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2-platforms.git/commit/?id=c68ba67344f9e627dc26ba6f3e0438319bf598c6'/>
<id>urn:sha1:c68ba67344f9e627dc26ba6f3e0438319bf598c6</id>
<content type='text'>
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Cc: Leif Lindholm &lt;leif.lindholm@linaro.org&gt;
Cc: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Leif Lindholm &lt;leif.lindholm@linaro.org&gt;
</content>
</entry>
</feed>
