public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class
@ 2023-10-12  9:08 Laszlo Ersek
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                   ` (2 more replies)
  0 siblings, 3 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:08 UTC (permalink / raw)
  To: edk2-devel-groups-io
  Cc: Abner Chang, Ard Biesheuvel, Bibo Mao, Chao Li, Chuong Tran,
	Daniel Schaefer, Leif Lindholm, Ling Jia, Marcin Wojtas,
	Masami Hiramatsu, Meenakshi Aggarwal, Nhi Pham, Peng Xie, Ray Ni,
	Rebecca Cran, Wenyi Xie, Xianglai li, Yiqi Shu

https://bugzilla.tianocore.org/show_bug.cgi?id=4564

I'm only posting this message as a common root for three upcoming patch
series that belong together (one series for each of edk2-platforms,
edk2-non-osi, and edk2). Please see the cover letter in each of those
series.

Thanks
Laszlo



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109539): https://edk2.groups.io/g/devel/message/109539
Mute This Topic: https://groups.io/mt/101914633/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped
  2023-10-12  9:08 [edk2-devel] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
@ 2023-10-12  9:09 ` Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 01/19] Hisilicon: enable NOOPT builds Laszlo Ersek
                     ` (19 more replies)
  2023-10-12  9:10 ` [edk2-devel] [edk2-non-osi PATCH 0/1] Hisilicon: rename OemMiscLib class dependencies to HisiOemMiscLib Laszlo Ersek
  2023-10-12  9:10 ` [edk2-devel] [PATCH 0/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
  2 siblings, 20 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io
  Cc: Ard Biesheuvel, Bibo Mao, Chao Li, Chuong Tran, Leif Lindholm,
	Ling Jia, Marcin Wojtas, Masami Hiramatsu, Meenakshi Aggarwal,
	Nhi Pham, Peng Xie, Rebecca Cran, Wenyi Xie, Xianglai li,
	Yiqi Shu

https://bugzilla.tianocore.org/show_bug.cgi?id=4564

The RealTimeClockLib class header in edk2's EmbeddedPkg mistakenly
declares a function called LibRtcVirtualNotifyEvent(). No component ever
calls this function across module boundaries; all RealTimeClockLib
instances in edk2 and edk2-platforms are supposed to register -- and do
register -- their SetVirtualAddressMap() notification functions.

In a sibling series for edk2, we're going to remove the
LibRtcVirtualNotifyEvent() API from the RealTimeClockLib *class* header.
In edk2-platforms, that means the following:

(1) Fix existent (independent) build failures / bitrot. This is a
pre-requisite for showing that the other changes don't regress the
build. Build regression testing is only possible if you have a build
that completes in the first place.

Patch #1 enables the NOOPT target for Hisilicon platforms, so that they
can be more quickly built: Hisilicon needs several fixes for existent
build issues. Patches #2 through #7 fix those issues.

In particular patch#4 ("Hisilicon: rename OemMiscLib class to
HisiOemMiscLib") requires an ek2-non-osi complement; please see that in
the sibling edk2-non-osi posting ("Hisilicon: rename OemMiscLib class
dependencies to HisiOemMiscLib").

Patch #12 fixes prior build breakage in AmpereAltraPkg.

(2) In those RealTimeClockLib instances that define
LibRtcVirtualNotifyEvent(), demonstrate that either (a) the usage is
module-internal, or (b) there is no usage.

In case (a), rename LibRtcVirtualNotifyEvent() to VirtualNotifyEvent(),
and make it static. If needed, hoist the function definition above the
reference. In case (b), remove the function definition.

(3) Some affected RealTimeClockLib instances turn out to be entirely
unused / superfluous; drop those altogether.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Bibo Mao <maobibo@loongson.cn>
Cc: Chao Li <lichao@loongson.cn>
Cc: Chuong Tran <chuong@os.amperecomputing.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ling Jia <jialing@phytium.com.cn>
Cc: Marcin Wojtas <mw@semihalf.com>
Cc: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Cc: Nhi Pham <nhi@os.amperecomputing.com>
Cc: Peng Xie <xiepeng@phytium.com.cn>
Cc: Rebecca Cran <rebecca@os.amperecomputing.com>
Cc: Wenyi Xie <xiewenyi2@huawei.com>
Cc: Xianglai li <lixianglai@loongson.cn>
Cc: Yiqi Shu <shuyiqi@phytium.com.cn>

Thanks
Laszlo

Laszlo Ersek (19):
  Hisilicon: enable NOOPT builds
  Hisilicon/FlashFvbDxe: fix PcdNorFlashCheckBlockLocked token space
    GUID
  Hisilicon.dsc.inc: resolve VariableFlashInfoLib
  Hisilicon: rename OemMiscLib class to HisiOemMiscLib
  Hisilicon: add missing include file to Pptt components
  Hisilicon/Hi1620AcpiTables: fix up ASL
  Hisilicon/ProcessorSubClassDxe: drop conflicting PROCESSOR_STATUS_DATA
    type
  Hisilicon: drop unused DS3231RealTimeClockLib instance
  Hisilicon: drop unused VirtualRealTimeClockLib instance
  Hisilicon/DS3231RealTimeClockLib: drop LibRtcVirtualNotifyEvent
  Hisilicon/RX8900RealTimeClockLib: drop LibRtcVirtualNotifyEvent
  AmpereAltraPkg/Ac01PcieLib: fix compilation error
  JadePkg/PCF85063RealTimeClockLib: hide LibRtcVirtualNotifyEvent
  LoongArchQemuPkg/LsRealTimeClockLib: hide LibRtcVirtualNotifyEvent
  Styx/RealTimeClockLib: hide LibRtcVirtualNotifyEvent
  Armada7k8k/RealTimeClockLib: hide LibRtcVirtualNotifyEvent
  NXP/Pcf8563RealTimeClockLib: hide LibRtcVirtualNotifyEvent
  FT2000-4Pkg/RealTimeClockLib: hide LibRtcVirtualNotifyEvent
  Omap35xxPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent

 Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063RealTimeClockLib.c                                 |   5 +-
 Platform/Hisilicon/D03/D03.dsc                                                                                      |   4 +-
 Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.c                                                         |   2 +-
 Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c                                      |  25 --
 Platform/Hisilicon/D03/Library/{OemMiscLib2P => HisiOemMiscLib2P}/BoardFeature2PHi1610.c                            |   4 +-
 Platform/Hisilicon/D03/Library/{OemMiscLib2P => HisiOemMiscLib2P}/BoardFeature2PHi1610Strings.uni                   |   0
 Platform/Hisilicon/D03/Library/{OemMiscLib2P => HisiOemMiscLib2P}/OemMiscLib2PHi1610.c                              |   2 +-
 Platform/Hisilicon/D03/Library/{OemMiscLib2P/OemMiscLib2PHi1610.inf => HisiOemMiscLib2P/HisiOemMiscLib2PHi1610.inf} |   4 +-
 Platform/Hisilicon/D05/D05.dsc                                                                                      |   4 +-
 Platform/Hisilicon/D05/Library/{OemMiscLibD05 => HisiOemMiscLibD05}/BoardFeatureD05.c                               |   4 +-
 Platform/Hisilicon/D05/Library/{OemMiscLibD05 => HisiOemMiscLibD05}/BoardFeatureD05Strings.uni                      |   0
 Platform/Hisilicon/D05/Library/{OemMiscLibD05 => HisiOemMiscLibD05}/OemMiscLibD05.c                                 |   2 +-
 Platform/Hisilicon/D05/Library/{OemMiscLibD05/OemMiscLibD05.inf => HisiOemMiscLibD05/HisiOemMiscLibD05.inf}         |   4 +-
 Platform/Hisilicon/D06/D06.dsc                                                                                      |   4 +-
 Platform/Hisilicon/D06/Library/{OemMiscLibD06 => HisiOemMiscLibD06}/BoardFeatureD06.c                               |   4 +-
 Platform/Hisilicon/D06/Library/{OemMiscLibD06 => HisiOemMiscLibD06}/BoardFeatureD06Strings.uni                      |   0
 Platform/Hisilicon/D06/Library/{OemMiscLibD06 => HisiOemMiscLibD06}/OemMiscLibD06.c                                 |   2 +-
 Platform/Hisilicon/D06/Library/{OemMiscLibD06/OemMiscLibD06.inf => HisiOemMiscLibD06/HisiOemMiscLibD06.inf}         |   4 +-
 Platform/Hisilicon/HiKey/HiKey.dsc                                                                                  |   2 +-
 Platform/Hisilicon/HiKey960/HiKey960.dsc                                                                            |   2 +-
 Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.c                                                      |   2 +-
 Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.inf                                                    |   2 +-
 Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c                                  |   5 +-
 Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.c                                                        |  55 ++-
 Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c                                                        |   3 +-
 Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf                                                               |   4 +-
 Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c                                                     |   4 +-
 Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.h                                                    |   2 +-
 Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.inf                                                  |   2 +-
 Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClass.h                                                 |   2 +-
 Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.h                                           |  15 +-
 Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClassDxe.inf                                      |   2 +-
 Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf                                                    |   2 +-
 Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type09/MiscSystemSlotDesignationFunction.c                           |   2 +-
 Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInit.c                                                            |   2 +-
 Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInitDxe.inf                                                       |   2 +-
 Silicon/Hisilicon/Hi1610/Library/Hi161xPciPlatformLib/Hi161xPciPlatformLib.c                                        |   2 +-
 Silicon/Hisilicon/Hi1616/Pptt/Pptt.h                                                                                |   1 +
 Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl                                                            |  60 +--
 Silicon/Hisilicon/Hi1620/Pptt/Pptt.h                                                                                |   1 +
 Silicon/Hisilicon/HisiPkg.dec                                                                                       |   2 +-
 Silicon/Hisilicon/Hisilicon.dsc.inc                                                                                 |   1 +
 Silicon/Hisilicon/Include/Library/{OemMiscLib.h => HisiOemMiscLib.h}                                                |   4 +-
 Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClock.h                                              | 172 --------
 Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c                                           | 427 --------------------
 Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf                                         |  43 --
 Silicon/Hisilicon/Library/RX8900RealTimeClockLib/RX8900RealTimeClockLib.c                                           |  11 -
 Silicon/Hisilicon/Library/VirtualRealTimeClockLib/RealTimeClockLib.c                                                | 423 -------------------
 Silicon/Hisilicon/Library/VirtualRealTimeClockLib/RealTimeClockLib.inf                                              |  41 --
 Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c                                              |  52 +--
 Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c                                               |   5 +-
 Silicon/Phytium/FT2000-4Pkg/Library/RealTimeClockLib/RealTimeClockLib.c                                             |   5 +-
 Silicon/TexasInstruments/Omap35xxPkg/Library/RealTimeClockLib/RealTimeClockLib.c                                    |  18 -
 53 files changed, 141 insertions(+), 1311 deletions(-)
 rename Platform/Hisilicon/D03/Library/{OemMiscLib2P => HisiOemMiscLib2P}/BoardFeature2PHi1610.c (96%)
 rename Platform/Hisilicon/D03/Library/{OemMiscLib2P => HisiOemMiscLib2P}/BoardFeature2PHi1610Strings.uni (100%)
 rename Platform/Hisilicon/D03/Library/{OemMiscLib2P => HisiOemMiscLib2P}/OemMiscLib2PHi1610.c (93%)
 rename Platform/Hisilicon/D03/Library/{OemMiscLib2P/OemMiscLib2PHi1610.inf => HisiOemMiscLib2P/HisiOemMiscLib2PHi1610.inf} (86%)
 rename Platform/Hisilicon/D05/Library/{OemMiscLibD05 => HisiOemMiscLibD05}/BoardFeatureD05.c (95%)
 rename Platform/Hisilicon/D05/Library/{OemMiscLibD05 => HisiOemMiscLibD05}/BoardFeatureD05Strings.uni (100%)
 rename Platform/Hisilicon/D05/Library/{OemMiscLibD05 => HisiOemMiscLibD05}/OemMiscLibD05.c (92%)
 rename Platform/Hisilicon/D05/Library/{OemMiscLibD05/OemMiscLibD05.inf => HisiOemMiscLibD05/HisiOemMiscLibD05.inf} (86%)
 rename Platform/Hisilicon/D06/Library/{OemMiscLibD06 => HisiOemMiscLibD06}/BoardFeatureD06.c (97%)
 rename Platform/Hisilicon/D06/Library/{OemMiscLibD06 => HisiOemMiscLibD06}/BoardFeatureD06Strings.uni (100%)
 rename Platform/Hisilicon/D06/Library/{OemMiscLibD06 => HisiOemMiscLibD06}/OemMiscLibD06.c (94%)
 rename Platform/Hisilicon/D06/Library/{OemMiscLibD06/OemMiscLibD06.inf => HisiOemMiscLibD06/HisiOemMiscLibD06.inf} (87%)
 rename Silicon/Hisilicon/Include/Library/{OemMiscLib.h => HisiOemMiscLib.h} (93%)
 delete mode 100644 Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClock.h
 delete mode 100644 Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c
 delete mode 100644 Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
 delete mode 100644 Silicon/Hisilicon/Library/VirtualRealTimeClockLib/RealTimeClockLib.c
 delete mode 100644 Silicon/Hisilicon/Library/VirtualRealTimeClockLib/RealTimeClockLib.inf


base-commit: d6e36a151ff8365cdc55a6914cc5e6138d5788dc


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109541): https://edk2.groups.io/g/devel/message/109541
Mute This Topic: https://groups.io/mt/101914650/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 01/19] Hisilicon: enable NOOPT builds
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 02/19] Hisilicon/FlashFvbDxe: fix PcdNorFlashCheckBlockLocked token space GUID Laszlo Ersek
                     ` (18 subsequent siblings)
  19 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Ard Biesheuvel, Leif Lindholm, Wenyi Xie

There's no reason for not supporting NOOPT in the Hisilicon platform DSCs,
and there is a reason for supporting them: build-only testing. Add NOOPT
wherever it's missing, and stick to a consistent order wherever NOOPT
already exists.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Wenyi Xie <xiewenyi2@huawei.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Platform/Hisilicon/D03/D03.dsc           | 2 +-
 Platform/Hisilicon/D05/D05.dsc           | 2 +-
 Platform/Hisilicon/D06/D06.dsc           | 2 +-
 Platform/Hisilicon/HiKey/HiKey.dsc       | 2 +-
 Platform/Hisilicon/HiKey960/HiKey960.dsc | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Platform/Hisilicon/D03/D03.dsc b/Platform/Hisilicon/D03/D03.dsc
index 0c17815d716d..aa62ae4e3aa1 100644
--- a/Platform/Hisilicon/D03/D03.dsc
+++ b/Platform/Hisilicon/D03/D03.dsc
@@ -19,7 +19,7 @@ [Defines]
   DSC_SPECIFICATION              = 0x00010005
   OUTPUT_DIRECTORY               = Build/$(PLATFORM_NAME)
   SUPPORTED_ARCHITECTURES        = AARCH64
-  BUILD_TARGETS                  = DEBUG|RELEASE
+  BUILD_TARGETS                  = NOOPT|DEBUG|RELEASE
   SKUID_IDENTIFIER               = DEFAULT
   FLASH_DEFINITION               = Platform/Hisilicon/$(PLATFORM_NAME)/$(PLATFORM_NAME).fdf
 
diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc
index e01f6e335f09..05cc0614b8fb 100644
--- a/Platform/Hisilicon/D05/D05.dsc
+++ b/Platform/Hisilicon/D05/D05.dsc
@@ -19,7 +19,7 @@ [Defines]
   DSC_SPECIFICATION              = 0x00010019
   OUTPUT_DIRECTORY               = Build/$(PLATFORM_NAME)
   SUPPORTED_ARCHITECTURES        = AARCH64
-  BUILD_TARGETS                  = DEBUG|RELEASE
+  BUILD_TARGETS                  = NOOPT|DEBUG|RELEASE
   SKUID_IDENTIFIER               = DEFAULT
   FLASH_DEFINITION               = Platform/Hisilicon/$(PLATFORM_NAME)/$(PLATFORM_NAME).fdf
   DEFINE EDK2_SKIP_PEICORE=0
diff --git a/Platform/Hisilicon/D06/D06.dsc b/Platform/Hisilicon/D06/D06.dsc
index 2c5afa5b0e8d..da2005b7ab6b 100644
--- a/Platform/Hisilicon/D06/D06.dsc
+++ b/Platform/Hisilicon/D06/D06.dsc
@@ -19,7 +19,7 @@ [Defines]
   DSC_SPECIFICATION              = 0x0001001A
   OUTPUT_DIRECTORY               = Build/$(PLATFORM_NAME)
   SUPPORTED_ARCHITECTURES        = AARCH64
-  BUILD_TARGETS                  = DEBUG|NOOPT|RELEASE
+  BUILD_TARGETS                  = NOOPT|DEBUG|RELEASE
   SKUID_IDENTIFIER               = DEFAULT
   FLASH_DEFINITION               = Platform/Hisilicon/$(PLATFORM_NAME)/$(PLATFORM_NAME).fdf
 
diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc b/Platform/Hisilicon/HiKey/HiKey.dsc
index 375b29375d75..c26df673afe9 100644
--- a/Platform/Hisilicon/HiKey/HiKey.dsc
+++ b/Platform/Hisilicon/HiKey/HiKey.dsc
@@ -16,7 +16,7 @@ [Defines]
   DSC_SPECIFICATION              = 0x00010019
   OUTPUT_DIRECTORY               = Build/$(PLATFORM_NAME)
   SUPPORTED_ARCHITECTURES        = AARCH64
-  BUILD_TARGETS                  = DEBUG|RELEASE
+  BUILD_TARGETS                  = NOOPT|DEBUG|RELEASE
   SKUID_IDENTIFIER               = DEFAULT
   FLASH_DEFINITION               = Platform/Hisilicon/$(PLATFORM_NAME)/$(PLATFORM_NAME).fdf
 
diff --git a/Platform/Hisilicon/HiKey960/HiKey960.dsc b/Platform/Hisilicon/HiKey960/HiKey960.dsc
index 1d09e3f5da74..9e7c209716bc 100644
--- a/Platform/Hisilicon/HiKey960/HiKey960.dsc
+++ b/Platform/Hisilicon/HiKey960/HiKey960.dsc
@@ -16,7 +16,7 @@ [Defines]
   DSC_SPECIFICATION              = 0x00010019
   OUTPUT_DIRECTORY               = Build/$(PLATFORM_NAME)
   SUPPORTED_ARCHITECTURES        = AARCH64
-  BUILD_TARGETS                  = DEBUG|RELEASE
+  BUILD_TARGETS                  = NOOPT|DEBUG|RELEASE
   SKUID_IDENTIFIER               = DEFAULT
   FLASH_DEFINITION               = Platform/Hisilicon/$(PLATFORM_NAME)/$(PLATFORM_NAME).fdf
 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109540): https://edk2.groups.io/g/devel/message/109540
Mute This Topic: https://groups.io/mt/101914649/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 02/19] Hisilicon/FlashFvbDxe: fix PcdNorFlashCheckBlockLocked token space GUID
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 01/19] Hisilicon: enable NOOPT builds Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 03/19] Hisilicon.dsc.inc: resolve VariableFlashInfoLib Laszlo Ersek
                     ` (17 subsequent siblings)
  19 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Ard Biesheuvel, Leif Lindholm, Wenyi Xie

Edk2 commit cc650a0378f8 ("ArmPlatformPkg: Retire NorFlashDxe driver",
2022-11-06) removed PcdNorFlashCheckBlockLocked from
"gArmPlatformTokenSpaceGuid"; edk2-platforms commit d7b286ae5f53
("Platform/ARM: clone NorFlashDxe from ArmPlatformPkg", 2022-10-19)
provided it in the *different* namespace "gPlatformArmTokenSpaceGuid"
(notice that "Arm" and "Platform" are in the opposite order).

However, the dependency in "FlashFvbDxe.inf" was not updated. Found when
trying to build:

- Platform/Hisilicon/D03/D03.dsc
- Platform/Hisilicon/D05/D05.dsc
- Platform/Hisilicon/D06/D06.fdf

Update the token space GUID reference.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Wenyi Xie <xiewenyi2@huawei.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
index 1119361e7726..3600e101b600 100644
--- a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
+++ b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.inf
@@ -24,7 +24,7 @@ [Sources.common]
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  ArmPlatformPkg/ArmPlatformPkg.dec
+  Platform/ARM/ARM.dec
   Silicon/Hisilicon/HisiPkg.dec
 
 [LibraryClasses]
@@ -56,7 +56,7 @@ [Pcd.common]
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
 
-  gArmPlatformTokenSpaceGuid.PcdNorFlashCheckBlockLocked
+  gPlatformArmTokenSpaceGuid.PcdNorFlashCheckBlockLocked
   gHisiTokenSpaceGuid.PcdSFCMEM0BaseAddress
 
 [Depex]



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109542): https://edk2.groups.io/g/devel/message/109542
Mute This Topic: https://groups.io/mt/101914651/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 03/19] Hisilicon.dsc.inc: resolve VariableFlashInfoLib
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 01/19] Hisilicon: enable NOOPT builds Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 02/19] Hisilicon/FlashFvbDxe: fix PcdNorFlashCheckBlockLocked token space GUID Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 04/19] Hisilicon: rename OemMiscLib class to HisiOemMiscLib Laszlo Ersek
                     ` (16 subsequent siblings)
  19 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Leif Lindholm, Ard Biesheuvel, Wenyi Xie

Since edk2 commit 8db39c60cdf3 ("MdeModulePkg/FaultTolerantWrite: Consume
Variable Flash Info", 2022-05-19), the Hisilicon platforms (D03, D05, D06,
HiKey, HiKey960) must have been broken; they don't resolve the new
VariableFlashInfoLib class to the (only) BaseVariableFlashInfoLib
instance. Do that now.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Wenyi Xie <xiewenyi2@huawei.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/Hisilicon/Hisilicon.dsc.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Silicon/Hisilicon/Hisilicon.dsc.inc b/Silicon/Hisilicon/Hisilicon.dsc.inc
index b12efd7f031b..85dca9ab8d0d 100644
--- a/Silicon/Hisilicon/Hisilicon.dsc.inc
+++ b/Silicon/Hisilicon/Hisilicon.dsc.inc
@@ -92,6 +92,7 @@ [LibraryClasses.common]
 
   VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
   VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
+  VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf
 
   ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
   LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109548): https://edk2.groups.io/g/devel/message/109548
Mute This Topic: https://groups.io/mt/101914657/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 04/19] Hisilicon: rename OemMiscLib class to HisiOemMiscLib
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (2 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 03/19] Hisilicon.dsc.inc: resolve VariableFlashInfoLib Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 05/19] Hisilicon: add missing include file to Pptt components Laszlo Ersek
                     ` (15 subsequent siblings)
  19 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Ard Biesheuvel, Leif Lindholm, Wenyi Xie

Edk2 commit [1] introduced the <OemMiscLib.h> library class header to
ArmPkg; commit [2] introduced the first OemMiscLib instance to ArmPkg; and
commit [3] introduced (retroactively) the library class itself to ArmPkg.

Alas, when all these edk2 commits were made, edk2-platforms already had a
(Hisilicon-specific) library class called OemMiscLib -- and many of the
Hisilicon modules would use both "HisiPkg.dec" and "ArmPkg.dec". Therefore
the edk2 OemMiscLib brought about a library class conflict, breaking both
edk2-platforms and edk2-non-osi content.

Rename the original OemMiscLib class to HisiOemMiscLib, and update all
references.

This patch is necessary for building the D03, D05, D06, HiKey, and
HiKey960 platforms.

[1] 2c7c64fc04a0 ("ArmPkg: Add Library/OemMiscLib.h", 2021-02-08)

[2] 0e51d7e445e0 ("ArmPkg: Add Universal/Smbios/OemMiscLibNull",
    2021-02-08)

[3] d03f71dd8be6 ("ArmPkg: Add missing library headers to ArmPkg.dec",
    2021-04-28)

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Wenyi Xie <xiewenyi2@huawei.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/Hisilicon/HisiPkg.dec                                                                                       | 2 +-
 Platform/Hisilicon/D03/Library/{OemMiscLib2P => HisiOemMiscLib2P}/BoardFeature2PHi1610Strings.uni                   | 0
 Platform/Hisilicon/D05/Library/{OemMiscLibD05 => HisiOemMiscLibD05}/BoardFeatureD05Strings.uni                      | 0
 Platform/Hisilicon/D06/Library/{OemMiscLibD06 => HisiOemMiscLibD06}/BoardFeatureD06Strings.uni                      | 0
 Platform/Hisilicon/D03/D03.dsc                                                                                      | 2 +-
 Platform/Hisilicon/D05/D05.dsc                                                                                      | 2 +-
 Platform/Hisilicon/D06/D06.dsc                                                                                      | 2 +-
 Silicon/Hisilicon/Include/Library/{OemMiscLib.h => HisiOemMiscLib.h}                                                | 4 ++--
 Platform/Hisilicon/D03/Library/{OemMiscLib2P/OemMiscLib2PHi1610.inf => HisiOemMiscLib2P/HisiOemMiscLib2PHi1610.inf} | 4 ++--
 Platform/Hisilicon/D05/Library/{OemMiscLibD05/OemMiscLibD05.inf => HisiOemMiscLibD05/HisiOemMiscLibD05.inf}         | 4 ++--
 Platform/Hisilicon/D06/Library/{OemMiscLibD06/OemMiscLibD06.inf => HisiOemMiscLibD06/HisiOemMiscLibD06.inf}         | 4 ++--
 Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.inf                                                    | 2 +-
 Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.inf                                                  | 2 +-
 Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClassDxe.inf                                      | 2 +-
 Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf                                                    | 2 +-
 Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInitDxe.inf                                                       | 2 +-
 Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.h                                                    | 2 +-
 Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClass.h                                                 | 2 +-
 Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.h                                           | 2 +-
 Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.c                                                         | 2 +-
 Platform/Hisilicon/D03/Library/{OemMiscLib2P => HisiOemMiscLib2P}/BoardFeature2PHi1610.c                            | 4 ++--
 Platform/Hisilicon/D03/Library/{OemMiscLib2P => HisiOemMiscLib2P}/OemMiscLib2PHi1610.c                              | 2 +-
 Platform/Hisilicon/D05/Library/{OemMiscLibD05 => HisiOemMiscLibD05}/BoardFeatureD05.c                               | 4 ++--
 Platform/Hisilicon/D05/Library/{OemMiscLibD05 => HisiOemMiscLibD05}/OemMiscLibD05.c                                 | 2 +-
 Platform/Hisilicon/D06/Library/{OemMiscLibD06 => HisiOemMiscLibD06}/BoardFeatureD06.c                               | 4 ++--
 Platform/Hisilicon/D06/Library/{OemMiscLibD06 => HisiOemMiscLibD06}/OemMiscLibD06.c                                 | 2 +-
 Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.c                                                      | 2 +-
 Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c                                                     | 4 ++--
 Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type09/MiscSystemSlotDesignationFunction.c                           | 2 +-
 Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInit.c                                                            | 2 +-
 Silicon/Hisilicon/Hi1610/Library/Hi161xPciPlatformLib/Hi161xPciPlatformLib.c                                        | 2 +-
 31 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/Silicon/Hisilicon/HisiPkg.dec b/Silicon/Hisilicon/HisiPkg.dec
index 051b5b8c3d88..e0339f093a9e 100644
--- a/Silicon/Hisilicon/HisiPkg.dec
+++ b/Silicon/Hisilicon/HisiPkg.dec
@@ -49,7 +49,7 @@ [LibraryClasses]
   PlatformSysCtrlLib|Include/Library/PlatformSysCtrlLib.h
   CpldIoLib|Include/Library/CpldIoLib.h
   OemAddressMapLib|Include/Library/OemAddressMapLib.h
-  OemMiscLib|Include/Library/OemMiscLib.h
+  HisiOemMiscLib|Include/Library/HisiOemMiscLib.h
   I2CLib|Include/Library/I2CLib.h
   PlatformPciLib|Include/Library/PlatformPciLib.h
   FdtUpdateLib|Include/Library/FdtUpdateLib.h
diff --git a/Platform/Hisilicon/D03/Library/OemMiscLib2P/BoardFeature2PHi1610Strings.uni b/Platform/Hisilicon/D03/Library/HisiOemMiscLib2P/BoardFeature2PHi1610Strings.uni
similarity index 100%
rename from Platform/Hisilicon/D03/Library/OemMiscLib2P/BoardFeature2PHi1610Strings.uni
rename to Platform/Hisilicon/D03/Library/HisiOemMiscLib2P/BoardFeature2PHi1610Strings.uni
diff --git a/Platform/Hisilicon/D05/Library/OemMiscLibD05/BoardFeatureD05Strings.uni b/Platform/Hisilicon/D05/Library/HisiOemMiscLibD05/BoardFeatureD05Strings.uni
similarity index 100%
rename from Platform/Hisilicon/D05/Library/OemMiscLibD05/BoardFeatureD05Strings.uni
rename to Platform/Hisilicon/D05/Library/HisiOemMiscLibD05/BoardFeatureD05Strings.uni
diff --git a/Platform/Hisilicon/D06/Library/OemMiscLibD06/BoardFeatureD06Strings.uni b/Platform/Hisilicon/D06/Library/HisiOemMiscLibD06/BoardFeatureD06Strings.uni
similarity index 100%
rename from Platform/Hisilicon/D06/Library/OemMiscLibD06/BoardFeatureD06Strings.uni
rename to Platform/Hisilicon/D06/Library/HisiOemMiscLibD06/BoardFeatureD06Strings.uni
diff --git a/Platform/Hisilicon/D03/D03.dsc b/Platform/Hisilicon/D03/D03.dsc
index aa62ae4e3aa1..66c2bb31a5ef 100644
--- a/Platform/Hisilicon/D03/D03.dsc
+++ b/Platform/Hisilicon/D03/D03.dsc
@@ -61,7 +61,7 @@ [LibraryClasses.common]
   TimeBaseLib|EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf
   RealTimeClockLib|Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
 
-  OemMiscLib|Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.inf
+  HisiOemMiscLib|Platform/Hisilicon/D03/Library/HisiOemMiscLib2P/HisiOemMiscLib2PHi1610.inf
   OemAddressMapLib|Platform/Hisilicon/D03/Library/OemAddressMap2P/OemAddressMap2PHi1610.inf
   PlatformSysCtrlLib|Silicon/Hisilicon/Hi1610/Library/PlatformSysCtrlLibHi1610/PlatformSysCtrlLibHi1610.inf
 
diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc
index 05cc0614b8fb..d247e67e92fc 100644
--- a/Platform/Hisilicon/D05/D05.dsc
+++ b/Platform/Hisilicon/D05/D05.dsc
@@ -68,7 +68,7 @@ [LibraryClasses.common]
   #D05 RTC hardware is same as D03
   RealTimeClockLib|Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
 
-  OemMiscLib|Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.inf
+  HisiOemMiscLib|Platform/Hisilicon/D05/Library/HisiOemMiscLibD05/HisiOemMiscLibD05.inf
   OemAddressMapLib|Platform/Hisilicon/D05/Library/OemAddressMapD05/OemAddressMapD05.inf
   PlatformSysCtrlLib|Silicon/Hisilicon/Hi1616/Library/PlatformSysCtrlLibHi1616/PlatformSysCtrlLibHi1616.inf
 
diff --git a/Platform/Hisilicon/D06/D06.dsc b/Platform/Hisilicon/D06/D06.dsc
index da2005b7ab6b..f8a8dad01a0e 100644
--- a/Platform/Hisilicon/D06/D06.dsc
+++ b/Platform/Hisilicon/D06/D06.dsc
@@ -57,7 +57,7 @@ [LibraryClasses.common]
   TimeBaseLib|EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf
   RtcHelperLib|Silicon/Hisilicon/Library/RtcHelperLib/RtcHelperLib.inf
   RealTimeClockLib|Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.inf
-  OemMiscLib|Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.inf
+  HisiOemMiscLib|Platform/Hisilicon/D06/Library/HisiOemMiscLibD06/HisiOemMiscLibD06.inf
   OemAddressMapLib|Platform/Hisilicon/D06/Library/OemAddressMapD06/OemAddressMapD06.inf
   PlatformSysCtrlLib|Silicon/Hisilicon/Hi1620/Library/PlatformSysCtrlLibHi1620/PlatformSysCtrlLibHi1620.inf
 
diff --git a/Silicon/Hisilicon/Include/Library/OemMiscLib.h b/Silicon/Hisilicon/Include/Library/HisiOemMiscLib.h
similarity index 93%
rename from Silicon/Hisilicon/Include/Library/OemMiscLib.h
rename to Silicon/Hisilicon/Include/Library/HisiOemMiscLib.h
index 834fb9ceac66..bb040e61703b 100644
--- a/Silicon/Hisilicon/Include/Library/OemMiscLib.h
+++ b/Silicon/Hisilicon/Include/Library/HisiOemMiscLib.h
@@ -8,8 +8,8 @@
 **/
 
 
-#ifndef _OEM_MISC_LIB_H_
-#define _OEM_MISC_LIB_H_
+#ifndef HISI_OEM_MISC_LIB_H_
+#define HISI_OEM_MISC_LIB_H_
 
 #include <Uefi.h>
 
diff --git a/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.inf b/Platform/Hisilicon/D03/Library/HisiOemMiscLib2P/HisiOemMiscLib2PHi1610.inf
similarity index 86%
rename from Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.inf
rename to Platform/Hisilicon/D03/Library/HisiOemMiscLib2P/HisiOemMiscLib2PHi1610.inf
index ab14597d8b75..a91444c71dcb 100644
--- a/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.inf
+++ b/Platform/Hisilicon/D03/Library/HisiOemMiscLib2P/HisiOemMiscLib2PHi1610.inf
@@ -9,11 +9,11 @@
 
 [Defines]
   INF_VERSION                    = 0x00010005
-  BASE_NAME                      = OemMiscLib2P
+  BASE_NAME                      = HisiOemMiscLib2P
   FILE_GUID                      = B9CE7465-21A2-4ecd-B347-BBDDBD098CEE
   MODULE_TYPE                    = BASE
   VERSION_STRING                 = 1.0
-  LIBRARY_CLASS                  = OemMiscLib
+  LIBRARY_CLASS                  = HisiOemMiscLib
 
 [Sources.common]
   BoardFeature2PHi1610.c
diff --git a/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.inf b/Platform/Hisilicon/D05/Library/HisiOemMiscLibD05/HisiOemMiscLibD05.inf
similarity index 86%
rename from Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.inf
rename to Platform/Hisilicon/D05/Library/HisiOemMiscLibD05/HisiOemMiscLibD05.inf
index d471102199ee..f223097ba8d4 100644
--- a/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.inf
+++ b/Platform/Hisilicon/D05/Library/HisiOemMiscLibD05/HisiOemMiscLibD05.inf
@@ -9,11 +9,11 @@
 
 [Defines]
   INF_VERSION                    = 0x00010019
-  BASE_NAME                      = OemMiscLibHi1616Evb
+  BASE_NAME                      = HisiOemMiscLibHi1616Evb
   FILE_GUID                      = 751C7627-D5F8-499C-AEEEE-C87858759612
   MODULE_TYPE                    = BASE
   VERSION_STRING                 = 1.0
-  LIBRARY_CLASS                  = OemMiscLib
+  LIBRARY_CLASS                  = HisiOemMiscLib
 
 [Sources.common]
   BoardFeatureD05.c
diff --git a/Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.inf b/Platform/Hisilicon/D06/Library/HisiOemMiscLibD06/HisiOemMiscLibD06.inf
similarity index 87%
rename from Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.inf
rename to Platform/Hisilicon/D06/Library/HisiOemMiscLibD06/HisiOemMiscLibD06.inf
index 59373a968523..0d030950ee54 100644
--- a/Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.inf
+++ b/Platform/Hisilicon/D06/Library/HisiOemMiscLibD06/HisiOemMiscLibD06.inf
@@ -9,11 +9,11 @@
 
 [Defines]
   INF_VERSION                    = 0x0001001A
-  BASE_NAME                      = OemMiscLib
+  BASE_NAME                      = HisiOemMiscLib
   FILE_GUID                      = 3002911C-C160-4C46-93BB-782846673EEA
   MODULE_TYPE                    = BASE
   VERSION_STRING                 = 1.0
-  LIBRARY_CLASS                  = OemMiscLib
+  LIBRARY_CLASS                  = HisiOemMiscLib
 
 [Sources.common]
   BoardFeatureD06.c
diff --git a/Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.inf b/Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.inf
index 6f2576c61c9d..fb9baf407205 100644
--- a/Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.inf
+++ b/Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.inf
@@ -37,8 +37,8 @@ [LibraryClasses]
   BaseMemoryLib
   DebugLib
   DevicePathLib
+  HisiOemMiscLib
   MemoryAllocationLib
-  OemMiscLib
 
 [Pcd]
   gHisiTokenSpaceGuid.PcdPcieRootBridgeMask
diff --git a/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.inf b/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.inf
index 7af37f93bd90..279d8487cfe2 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.inf
+++ b/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.inf
@@ -29,7 +29,7 @@ [LibraryClasses]
   DebugLib
   UefiLib
   UefiDriverEntryPoint
-  OemMiscLib
+  HisiOemMiscLib
 
 [Protocols]
   gEfiSmbiosProtocolGuid
diff --git a/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClassDxe.inf b/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClassDxe.inf
index 99eea93b7988..895d72fc040f 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClassDxe.inf
+++ b/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClassDxe.inf
@@ -40,7 +40,7 @@ [LibraryClasses]
   PcdLib
 
   PlatformSysCtrlLib
-  OemMiscLib
+  HisiOemMiscLib
 
 [Protocols]
   gEfiSmbiosProtocolGuid                       # PROTOCOL ALWAYS_CONSUMED
diff --git a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf
index 9c795b5fd401..e574c7209d4f 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf
+++ b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf
@@ -62,7 +62,7 @@ [LibraryClasses]
   BaseMemoryLib
   BaseLib
   DebugLib
-  OemMiscLib
+  HisiOemMiscLib
   UefiBootServicesTableLib
   UefiRuntimeServicesTableLib
   UefiDriverEntryPoint
diff --git a/Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInitDxe.inf b/Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInitDxe.inf
index 25d301f210ba..0a4c1aad307b 100644
--- a/Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInitDxe.inf
+++ b/Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInitDxe.inf
@@ -36,7 +36,7 @@ [LibraryClasses]
   TimerLib
   PcdLib
   IoLib
-  OemMiscLib
+  HisiOemMiscLib
 
 [Protocols]
   #gEfiPcieRootBridgeProtocolGuid
diff --git a/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.h b/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.h
index 7194ae589042..1f07c0e1f364 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.h
+++ b/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.h
@@ -25,6 +25,6 @@
 #include <Library/PrintLib.h>
 #include <Library/UefiBootServicesTableLib.h>
 #include <Library/MemoryAllocationLib.h>
-#include <Library/OemMiscLib.h>
+#include <Library/HisiOemMiscLib.h>
 
 #endif
diff --git a/Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClass.h b/Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClass.h
index 22c7f6797168..cd47eefc3428 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClass.h
+++ b/Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClass.h
@@ -30,7 +30,7 @@
 #include <Guid/DebugMask.h>
 #include <Guid/MemoryMapData.h>
 #include <Library/PlatformSysCtrlLib.h>
-#include <Library/OemMiscLib.h>
+#include <Library/HisiOemMiscLib.h>
 
 //
 // This is the generated header file which includes whatever needs to be exported (strings + IFR)
diff --git a/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.h b/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.h
index 3ce180d21df3..e1c41ab65e4c 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.h
+++ b/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.h
@@ -25,7 +25,7 @@
 #include <Library/PcdLib.h>
 #include <PlatformArch.h>
 #include <Library/PlatformSysCtrlLib.h>
-#include <Library/OemMiscLib.h>
+#include <Library/HisiOemMiscLib.h>
 #include <Library/ArmLib.h>
 
 //
diff --git a/Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.c b/Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.c
index 75b6dec34b30..2e50494d974b 100644
--- a/Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.c
+++ b/Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.c
@@ -18,7 +18,7 @@
 #include <PlatformArch.h>
 #include <Library/PlatformSysCtrlLib.h>
 
-#include <Library/OemMiscLib.h>
+#include <Library/HisiOemMiscLib.h>
 #include <Library/OemAddressMapLib.h>
 #include <Library/ArmLib.h>
 
diff --git a/Platform/Hisilicon/D03/Library/OemMiscLib2P/BoardFeature2PHi1610.c b/Platform/Hisilicon/D03/Library/HisiOemMiscLib2P/BoardFeature2PHi1610.c
similarity index 96%
rename from Platform/Hisilicon/D03/Library/OemMiscLib2P/BoardFeature2PHi1610.c
rename to Platform/Hisilicon/D03/Library/HisiOemMiscLib2P/BoardFeature2PHi1610.c
index 1670cac1d491..5c4f732588bc 100644
--- a/Platform/Hisilicon/D03/Library/OemMiscLib2P/BoardFeature2PHi1610.c
+++ b/Platform/Hisilicon/D03/Library/HisiOemMiscLib2P/BoardFeature2PHi1610.c
@@ -14,7 +14,7 @@
 #include <IndustryStandard/SmBios.h>
 
 #include <PlatformArch.h>
-#include <Library/OemMiscLib.h>
+#include <Library/HisiOemMiscLib.h>
 #include <Library/I2CLib.h>
 #include <Library/HiiLib.h>
 
@@ -181,7 +181,7 @@ OemGetPackages (
     return HiiAddPackages (
                             &gEfiCallerIdGuid,
                             NULL,
-                            OemMiscLib2PStrings,
+                            HisiOemMiscLib2PStrings,
                             NULL,
                             NULL
                             );
diff --git a/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c b/Platform/Hisilicon/D03/Library/HisiOemMiscLib2P/OemMiscLib2PHi1610.c
similarity index 93%
rename from Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c
rename to Platform/Hisilicon/D03/Library/HisiOemMiscLib2P/OemMiscLib2PHi1610.c
index 1d9c3dfd491b..a52a6cff0537 100644
--- a/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c
+++ b/Platform/Hisilicon/D03/Library/HisiOemMiscLib2P/OemMiscLib2PHi1610.c
@@ -14,7 +14,7 @@
 #include <Library/IoLib.h>
 #include <Library/TimerLib.h>
 #include <Library/SerialPortLib.h>
-#include <Library/OemMiscLib.h>
+#include <Library/HisiOemMiscLib.h>
 #include <PlatformArch.h>
 #include <Library/PlatformSysCtrlLib.h>
 #include <Library/OemAddressMapLib.h>
diff --git a/Platform/Hisilicon/D05/Library/OemMiscLibD05/BoardFeatureD05.c b/Platform/Hisilicon/D05/Library/HisiOemMiscLibD05/BoardFeatureD05.c
similarity index 95%
rename from Platform/Hisilicon/D05/Library/OemMiscLibD05/BoardFeatureD05.c
rename to Platform/Hisilicon/D05/Library/HisiOemMiscLibD05/BoardFeatureD05.c
index ac013ca30890..2cda0fd7b6d8 100644
--- a/Platform/Hisilicon/D05/Library/OemMiscLibD05/BoardFeatureD05.c
+++ b/Platform/Hisilicon/D05/Library/HisiOemMiscLibD05/BoardFeatureD05.c
@@ -13,9 +13,9 @@
 #include <Library/BaseMemoryLib.h>
 #include <Library/DebugLib.h>
 #include <Library/HiiLib.h>
+#include <Library/HisiOemMiscLib.h>
 #include <Library/I2CLib.h>
 #include <Library/IoLib.h>
-#include <Library/OemMiscLib.h>
 #include <Protocol/Smbios.h>
 
 
@@ -209,7 +209,7 @@ OemGetPackages (
   return HiiAddPackages (
                         &gEfiCallerIdGuid,
                         NULL,
-                        OemMiscLibHi1616EvbStrings,
+                        HisiOemMiscLibHi1616EvbStrings,
                         NULL,
                         NULL
                         );
diff --git a/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c b/Platform/Hisilicon/D05/Library/HisiOemMiscLibD05/OemMiscLibD05.c
similarity index 92%
rename from Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c
rename to Platform/Hisilicon/D05/Library/HisiOemMiscLibD05/OemMiscLibD05.c
index 2ee15dbc7b43..4cd50c868f8f 100644
--- a/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c
+++ b/Platform/Hisilicon/D05/Library/HisiOemMiscLibD05/OemMiscLibD05.c
@@ -12,10 +12,10 @@
 
 #include <Library/BaseMemoryLib.h>
 #include <Library/DebugLib.h>
+#include <Library/HisiOemMiscLib.h>
 #include <Library/IoLib.h>
 #include <Library/LpcLib.h>
 #include <Library/OemAddressMapLib.h>
-#include <Library/OemMiscLib.h>
 #include <Library/PcdLib.h>
 #include <Library/PlatformPciLib.h>
 #include <Library/PlatformSysCtrlLib.h>
diff --git a/Platform/Hisilicon/D06/Library/OemMiscLibD06/BoardFeatureD06.c b/Platform/Hisilicon/D06/Library/HisiOemMiscLibD06/BoardFeatureD06.c
similarity index 97%
rename from Platform/Hisilicon/D06/Library/OemMiscLibD06/BoardFeatureD06.c
rename to Platform/Hisilicon/D06/Library/HisiOemMiscLibD06/BoardFeatureD06.c
index 980eabfe3355..01f5e091a855 100644
--- a/Platform/Hisilicon/D06/Library/OemMiscLibD06/BoardFeatureD06.c
+++ b/Platform/Hisilicon/D06/Library/HisiOemMiscLibD06/BoardFeatureD06.c
@@ -12,9 +12,9 @@
 #include <Library/BaseMemoryLib.h>
 #include <Library/DebugLib.h>
 #include <Library/HiiLib.h>
+#include <Library/HisiOemMiscLib.h>
 #include <Library/I2CLib.h>
 #include <Library/IoLib.h>
-#include <Library/OemMiscLib.h>
 #include <Protocol/Smbios.h>
 
 #include <PlatformArch.h>
@@ -416,7 +416,7 @@ OemGetPackages (
   return HiiAddPackages (
            &gEfiCallerIdGuid,
            NULL,
-           OemMiscLibStrings,
+           HisiOemMiscLibStrings,
            NULL,
            NULL
            );
diff --git a/Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.c b/Platform/Hisilicon/D06/Library/HisiOemMiscLibD06/OemMiscLibD06.c
similarity index 94%
rename from Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.c
rename to Platform/Hisilicon/D06/Library/HisiOemMiscLibD06/OemMiscLibD06.c
index 1b0a2180c179..0e6e1b39a83d 100644
--- a/Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.c
+++ b/Platform/Hisilicon/D06/Library/HisiOemMiscLibD06/OemMiscLibD06.c
@@ -12,10 +12,10 @@
 #include <Library/BaseMemoryLib.h>
 #include <Library/CpldD06.h>
 #include <Library/DebugLib.h>
+#include <Library/HisiOemMiscLib.h>
 #include <Library/IoLib.h>
 #include <Library/LpcLib.h>
 #include <Library/OemAddressMapLib.h>
-#include <Library/OemMiscLib.h>
 #include <Library/PcdLib.h>
 #include <Library/PlatformSysCtrlLib.h>
 #include <Library/SerialPortLib.h>
diff --git a/Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.c b/Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.c
index 1be7de5ccf44..7a2d7b267f03 100644
--- a/Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.c
+++ b/Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.c
@@ -11,9 +11,9 @@
 #include <Library/BaseMemoryLib.h>
 #include <Library/DebugLib.h>
 #include <Library/DevicePathLib.h>
+#include <Library/HisiOemMiscLib.h>
 #include <Library/IoLib.h>
 #include <Library/MemoryAllocationLib.h>
-#include <Library/OemMiscLib.h>
 #include <Library/PcdLib.h>
 #include <Library/PciHostBridgeLib.h>
 #include <Library/PlatformPciLib.h>
diff --git a/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c b/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c
index 39f7f6b1a333..72fcf741582a 100644
--- a/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c
+++ b/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c
@@ -8,13 +8,13 @@
 #include <Library/BaseLib.h>
 #include <Library/BaseMemoryLib.h>
 #include <Library/DebugLib.h>
+#include <Library/HisiOemMiscLib.h>
 #include <Library/HobLib.h>
 #include <Library/HwMemInitLib.h>
 #include <Library/OemConfigData.h>
-#include <Library/OemMiscLib.h>
 #include <Library/UefiBootServicesTableLib.h>
-#include <Library/UefiRuntimeServicesTableLib.h>
 #include <Library/UefiLib.h>
+#include <Library/UefiRuntimeServicesTableLib.h>
 
 #define CORECOUNT(X) ((X) * CORE_NUM_PER_SOCKET)
 
diff --git a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type09/MiscSystemSlotDesignationFunction.c b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type09/MiscSystemSlotDesignationFunction.c
index 929288519780..3ca0c18a9cee 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type09/MiscSystemSlotDesignationFunction.c
+++ b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type09/MiscSystemSlotDesignationFunction.c
@@ -11,7 +11,7 @@
 
 #include "SmbiosMisc.h"
 
-#include <Library/OemMiscLib.h>
+#include <Library/HisiOemMiscLib.h>
 
 extern SMBIOS_TABLE_TYPE9 MiscSystemSlotDesignationPcie0Data;
 extern SMBIOS_TABLE_TYPE9 MiscSystemSlotDesignationPcie1Data;
diff --git a/Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInit.c b/Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInit.c
index 954655d47087..7eeb92e6154e 100644
--- a/Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInit.c
+++ b/Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInit.c
@@ -10,7 +10,7 @@
 #include "PcieInit.h"
 #include <Library/UefiBootServicesTableLib.h>
 #include <Library/PcdLib.h>
-#include <Library/OemMiscLib.h>
+#include <Library/HisiOemMiscLib.h>
 #include <Library/PlatformPciLib.h>
 
 
diff --git a/Silicon/Hisilicon/Hi1610/Library/Hi161xPciPlatformLib/Hi161xPciPlatformLib.c b/Silicon/Hisilicon/Hi1610/Library/Hi161xPciPlatformLib/Hi161xPciPlatformLib.c
index 4fb092009a25..350f9611c794 100644
--- a/Silicon/Hisilicon/Hi1610/Library/Hi161xPciPlatformLib/Hi161xPciPlatformLib.c
+++ b/Silicon/Hisilicon/Hi1610/Library/Hi161xPciPlatformLib/Hi161xPciPlatformLib.c
@@ -10,8 +10,8 @@
 #include <Uefi.h>
 #include <IndustryStandard/Acpi.h>
 #include <Library/DebugLib.h>
+#include <Library/HisiOemMiscLib.h>
 #include <Library/IoLib.h>
-#include <Library/OemMiscLib.h>
 #include <Library/PcdLib.h>
 #include <Library/PciExpressLib.h>
 #include <Library/PlatformPciLib.h>



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109543): https://edk2.groups.io/g/devel/message/109543
Mute This Topic: https://groups.io/mt/101914652/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 05/19] Hisilicon: add missing include file to Pptt components
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (3 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 04/19] Hisilicon: rename OemMiscLib class to HisiOemMiscLib Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 06/19] Hisilicon/Hi1620AcpiTables: fix up ASL Laszlo Ersek
                     ` (14 subsequent siblings)
  19 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Ard Biesheuvel, Leif Lindholm, Wenyi Xie

Some more random bitrot in Hisilicon; must be fixed for building the
Hisilicon DSCs.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Wenyi Xie <xiewenyi2@huawei.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/Hisilicon/Hi1616/Pptt/Pptt.h | 1 +
 Silicon/Hisilicon/Hi1620/Pptt/Pptt.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Silicon/Hisilicon/Hi1616/Pptt/Pptt.h b/Silicon/Hisilicon/Hi1616/Pptt/Pptt.h
index a0ad31a990db..29b260d619c5 100644
--- a/Silicon/Hisilicon/Hi1616/Pptt/Pptt.h
+++ b/Silicon/Hisilicon/Hi1616/Pptt/Pptt.h
@@ -13,6 +13,7 @@
 #define _PPTT_H_
 
 #include <IndustryStandard/Acpi.h>
+#include <Library/ArmLib.h>
 #include <Library/ArmLib/ArmLibPrivate.h>
 #include <Library/BaseMemoryLib.h>
 #include <Library/DebugLib.h>
diff --git a/Silicon/Hisilicon/Hi1620/Pptt/Pptt.h b/Silicon/Hisilicon/Hi1620/Pptt/Pptt.h
index 30ba5fff65ce..3019ea0e11d3 100644
--- a/Silicon/Hisilicon/Hi1620/Pptt/Pptt.h
+++ b/Silicon/Hisilicon/Hi1620/Pptt/Pptt.h
@@ -14,6 +14,7 @@
 
 #include <PlatformArch.h>
 #include <IndustryStandard/Acpi.h>
+#include <Library/ArmLib.h>
 #include <Library/ArmLib/ArmLibPrivate.h>
 #include <Library/BaseMemoryLib.h>
 #include <Library/DebugLib.h>



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109544): https://edk2.groups.io/g/devel/message/109544
Mute This Topic: https://groups.io/mt/101914653/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 06/19] Hisilicon/Hi1620AcpiTables: fix up ASL
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (4 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 05/19] Hisilicon: add missing include file to Pptt components Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 07/19] Hisilicon/ProcessorSubClassDxe: drop conflicting PROCESSOR_STATUS_DATA type Laszlo Ersek
                     ` (13 subsequent siblings)
  19 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Ard Biesheuvel, Leif Lindholm, Wenyi Xie

Recent "iasl" does not accept "Hi1620Iort.asl" any longer:

- various "Interrupt" fields are now called "GSIV",

- "DeviceID mapping index" has been renamed to "Device ID Mapping Index".

Update the field names in "Hi1620Iort.asl"; it's necessary for building
the Hisilicon platform DSCs.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Wenyi Xie <xiewenyi2@huawei.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl | 60 ++++++++++----------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl
index 910e406841c1..5e27ce65b4d2 100644
--- a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl
+++ b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Iort.asl
@@ -51,12 +51,12 @@
 [0004]                           Reserved : 00000000
 [0008]                      VATOS Address : 0
 [0004]                              Model : 00000000
-[0004]                    Event Interrupt : 00000000
-[0004]                      PRI Interrupt : 00000000
-[0004]                     GERR Interrupt : 00000000
-[0004]                     Sync Interrupt : 00000000
+[0004]                         Event GSIV : 00000000
+[0004]                           PRI GSIV : 00000000
+[0004]                          GERR GSIV : 00000000
+[0004]                          Sync GSIV : 00000000
 [0004]                   Proximity Domain : 00000000
-[0004]             DeviceID mapping index : 00000002
+[0004]            Device ID Mapping Index : 00000002
 
 [0004]                         Input base : 00000000
 [0004]                           ID Count : 00004000
@@ -95,12 +95,12 @@
 [0004]                           Reserved : 00000000
 [0008]                      VATOS Address : 0
 [0004]                              Model : 00000000
-[0004]                    Event Interrupt : 00000000
-[0004]                      PRI Interrupt : 00000000
-[0004]                     GERR Interrupt : 00000000
-[0004]                     Sync Interrupt : 00000000
+[0004]                         Event GSIV : 00000000
+[0004]                           PRI GSIV : 00000000
+[0004]                          GERR GSIV : 00000000
+[0004]                          Sync GSIV : 00000000
 [0004]                   Proximity Domain : 00000000
-[0004]             DeviceID mapping index : 0001
+[0004]            Device ID Mapping Index : 0001
 
 [0004]                         Input base : 00007c00
 [0004]                           ID Count : 00000200
@@ -133,12 +133,12 @@
 [0004]                           Reserved : 00000000
 [0008]                      VATOS Address : 0
 [0004]                              Model : 00000000
-[0004]                    Event Interrupt : 00000000
-[0004]                      PRI Interrupt : 00000000
-[0004]                     GERR Interrupt : 00000000
-[0004]                     Sync Interrupt : 00000000
+[0004]                         Event GSIV : 00000000
+[0004]                           PRI GSIV : 00000000
+[0004]                          GERR GSIV : 00000000
+[0004]                          Sync GSIV : 00000000
 [0004]                   Proximity Domain : 00000000
-[0004]             DeviceID mapping index : 00000001
+[0004]            Device ID Mapping Index : 00000001
 
 [0004]                         Input base : 00007400
 [0004]                           ID Count : 00000300
@@ -171,12 +171,12 @@
 [0004]                           Reserved : 00000000
 [0008]                      VATOS Address : 0
 [0004]                              Model : 00000000
-[0004]                    Event Interrupt : 00000000
-[0004]                      PRI Interrupt : 00000000
-[0004]                     GERR Interrupt : 00000000
-[0004]                     Sync Interrupt : 00000000
+[0004]                         Event GSIV : 00000000
+[0004]                           PRI GSIV : 00000000
+[0004]                          GERR GSIV : 00000000
+[0004]                          Sync GSIV : 00000000
 [0004]                   Proximity Domain : 00000002
-[0004]             DeviceID mapping index : 00000002
+[0004]            Device ID Mapping Index : 00000002
 
 [0004]                         Input base : 00008000
 [0004]                           ID Count : 00002000
@@ -215,12 +215,12 @@
 [0004]                           Reserved : 00000000
 [0008]                      VATOS Address : 0
 [0004]                              Model : 00000000
-[0004]                    Event Interrupt : 00000000
-[0004]                      PRI Interrupt : 00000000
-[0004]                     GERR Interrupt : 00000000
-[0004]                     Sync Interrupt : 00000000
+[0004]                         Event GSIV : 00000000
+[0004]                           PRI GSIV : 00000000
+[0004]                          GERR GSIV : 00000000
+[0004]                          Sync GSIV : 00000000
 [0004]                   Proximity Domain : 00000002
-[0004]             DeviceID mapping index : 0001
+[0004]            Device ID Mapping Index : 0001
 
 [0004]                         Input base : 0000BC00
 [0004]                           ID Count : 00000200
@@ -253,12 +253,12 @@
 [0004]                           Reserved : 00000000
 [0008]                      VATOS Address : 0
 [0004]                              Model : 00000000
-[0004]                    Event Interrupt : 00000000
-[0004]                      PRI Interrupt : 00000000
-[0004]                     GERR Interrupt : 00000000
-[0004]                     Sync Interrupt : 00000000
+[0004]                         Event GSIV : 00000000
+[0004]                           PRI GSIV : 00000000
+[0004]                          GERR GSIV : 00000000
+[0004]                          Sync GSIV : 00000000
 [0004]                   Proximity Domain : 00000002
-[0004]             DeviceID mapping index : 00000001
+[0004]            Device ID Mapping Index : 00000001
 
 [0004]                         Input base : 0000B400
 [0004]                           ID Count : 00000300



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109545): https://edk2.groups.io/g/devel/message/109545
Mute This Topic: https://groups.io/mt/101914654/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 07/19] Hisilicon/ProcessorSubClassDxe: drop conflicting PROCESSOR_STATUS_DATA type
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (5 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 06/19] Hisilicon/Hi1620AcpiTables: fix up ASL Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 08/19] Hisilicon: drop unused DS3231RealTimeClockLib instance Laszlo Ersek
                     ` (12 subsequent siblings)
  19 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Ard Biesheuvel, Leif Lindholm, Wenyi Xie

Edk2 commit 4e1f316cec3f ("MdePkg: Update IndustryStandard/SmBios.h with
processor status data", 2021-02-08) upstreamed the PROCESSOR_STATUS_DATA
type, so now the identical typedef in "ProcessorSubClass.h" is
superfluous, and conflicts, breaking the Hisilicon DSCs' compilation.
Remove it.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Wenyi Xie <xiewenyi2@huawei.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.h | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.h b/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.h
index e1c41ab65e4c..7ed6696a1f23 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.h
+++ b/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.h
@@ -68,19 +68,6 @@ typedef union {
   UINT16 Data;
 }CACHE_CONFIGURATION;
 
-//
-// Processor Status
-//
-typedef union {
-  struct {
-    UINT8 CpuStatus       :3; // Indicates the status of the processor.
-    UINT8 Reserved1       :3; // Reserved for future use. Should be set to zero.
-    UINT8 SocketPopulated :1; // Indicates if the processor socket is populated or not.
-    UINT8 Reserved2       :1; // Reserved for future use. Should be set to zero.
-  } Bits;
-  UINT8 Data;
-}PROCESSOR_STATUS_DATA;
-
 //
 // Processor Characteristics
 //



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109546): https://edk2.groups.io/g/devel/message/109546
Mute This Topic: https://groups.io/mt/101914655/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 08/19] Hisilicon: drop unused DS3231RealTimeClockLib instance
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (6 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 07/19] Hisilicon/ProcessorSubClassDxe: drop conflicting PROCESSOR_STATUS_DATA type Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 09/19] Hisilicon: drop unused VirtualRealTimeClockLib instance Laszlo Ersek
                     ` (11 subsequent siblings)
  19 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Ard Biesheuvel, Leif Lindholm, Wenyi Xie

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: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Wenyi Xie <xiewenyi2@huawei.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf |  43 --
 Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClock.h      | 172 --------
 Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c   | 427 --------------------
 3 files changed, 642 deletions(-)

diff --git a/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf b/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
deleted file mode 100644
index 35042e07ed1f..000000000000
--- a/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
+++ /dev/null
@@ -1,43 +0,0 @@
-#/** @file
-#
-# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
-# Copyright (c) 2011-2013, ARM Ltd. All rights reserved.<BR>
-# Copyright (c) 2015, Hisilicon Limited. All rights reserved.
-# Copyright (c) 2015, Linaro Limited. All rights reserved.
-#
-#  SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-#
-#  Based on the files under ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.inf
-#
-#**/
-
-[Defines]
-  INF_VERSION                    = 0x00010005
-  BASE_NAME                      = DS3231RealTimeClockLib
-  FILE_GUID                      = 5FD8127D-11E1-488F-8CF1-A143157D6BF0
-  MODULE_TYPE                    = BASE
-  VERSION_STRING                 = 1.0
-  LIBRARY_CLASS                  = RealTimeClockLib
-
-[Sources.common]
-  DS3231RealTimeClockLib.c
-
-[Packages]
-  MdePkg/MdePkg.dec
-  EmbeddedPkg/EmbeddedPkg.dec
-  Silicon/Hisilicon/HisiPkg.dec
-
-[LibraryClasses]
-  IoLib
-  UefiLib
-  DebugLib
-  PcdLib
-  I2CLib
-  TimeBaseLib
-  TimerLib
-# Use EFiAtRuntime to check stage
-  UefiRuntimeLib
-
-[Pcd]
-
diff --git a/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClock.h b/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClock.h
deleted file mode 100644
index da18d0f5589e..000000000000
--- a/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClock.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/** @file
-*
-*  Copyright (c) 2011, ARM Limited. All rights reserved.
-*  Copyright (c) 2015, Hisilicon Limited. All rights reserved.
-*  Copyright (c) 2015, Linaro Limited. All rights reserved.
-*
-*  SPDX-License-Identifier: BSD-2-Clause-Patent
-*
-*  Based on the files under ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.inf
-**/
-
-
-#ifndef __DS3231_REAL_TIME_CLOCK_H__
-#define __DS3231_REAL_TIME_CLOCK_H__
-
-#define DS3231_REGADDR_SECONDS      0x00
-#define DS3231_REGADDR_MIUTES       0x01
-#define DS3231_REGADDR_HOURS        0x02
-#define DS3231_REGADDR_DAY          0x03
-#define DS3231_REGADDR_DATE         0x04
-#define DS3231_REGADDR_MONTH        0x05
-#define DS3231_REGADDR_YEAR         0x06
-#define DS3231_REGADDR_ALARM1SEC    0x07
-#define DS3231_REGADDR_ALARM1MIN    0x08
-#define DS3231_REGADDR_ALARM1HOUR   0x09
-#define DS3231_REGADDR_ALARM1DAY    0x0A
-#define DS3231_REGADDR_ALARM2MIN    0x0B
-#define DS3231_REGADDR_ALARM2HOUR   0x0C
-#define DS3231_REGADDR_ALARM2DAY    0x0D
-#define DS3231_REGADDR_CONTROL      0x0E
-#define DS3231_REGADDR_STATUS       0x0F
-#define DS3231_REGADDR_AGOFFSET     0x10
-#define DS3231_REGADDR_TEMPMSB      0x11
-#define DS3231_REGADDR_TEMPLSB      0x12
-
-
-typedef union {
-  struct{
-    UINT8 A1IE:1;
-    UINT8 A2IE:1;
-    UINT8 INTCN:1;
-    UINT8 RSV:2;
-    UINT8 CONV:1;
-    UINT8 BBSQW:1;
-    UINT8 EOSC_N:1;
-  }bits;
-  UINT8 u8;
-}RTC_DS3231_CONTROL;
-
-typedef union {
-  struct{
-    UINT8 A1F:1;
-    UINT8 A2F:1;
-    UINT8 BSY:1;
-    UINT8 EN32KHZ:2;
-    UINT8 Rsv:3;
-    UINT8 OSF:1;
-  }bits;
-  UINT8 u8;
-}RTC_DS3231_STATUS;
-
-
-typedef union {
-  struct{
-    UINT8 Data:7;
-    UINT8 Sign:1;
-  }bits;
-  UINT8 u8;
-}RTC_DS3231_AGOFFSET;
-
-typedef union {
-  struct{
-    UINT8 Data:7;
-    UINT8 Sign:1;
-  }bits;
-  UINT8 u8;
-}RTC_DS3231_TEMPMSB;
-
-
-typedef union {
-  struct{
-    UINT8 Rsv:6;
-    UINT8 Data:2;
-  }bits;
-  UINT8 u8;
-}RTC_DS3231_TEMPLSB;
-
-typedef union {
-  struct{
-    UINT8 Seconds:4;
-    UINT8 Seconds10:3;
-    UINT8 Rsv:1;
-  }bits;
-  UINT8 u8;
-}RTC_DS3231_SECONDS;
-
-typedef union {
-  struct{
-    UINT8 Minutes:4;
-    UINT8 Minutes10:3;
-    UINT8 Rsv:1;
-  }bits;
-  UINT8 u8;
-}RTC_DS3231_MINUTES;
-
-typedef union {
-  struct{
-    UINT8 Hour:4;
-    UINT8 Hours10:1;
-    UINT8 PM_20Hours:1;
-    UINT8 Hour24_n:1;
-    UINT8 Rsv:1;
-  }bits;
-  UINT8 u8;
-}RTC_DS3231_HOURS;
-
-typedef union {
-  struct{
-    UINT8 Day:3;
-    UINT8 Rsv:5;
-  }bits;
-  UINT8 u8;
-}RTC_DS3231_DAY;
-
-typedef union {
-  struct{
-    UINT8 Month:4;
-    UINT8 Month10:1;
-    UINT8 Rsv:2;
-    UINT8 Century:1;
-  }bits;
-  UINT8 u8;
-}RTC_DS3231_MONTH;
-
-typedef union {
-  struct{
-    UINT8 Year:4;
-    UINT8 Year10:4;
-  }bits;
-  UINT8 u8;
-}RTC_DS3231_YEAR;
-
-typedef union {
-  struct{
-    UINT8 Seconds:4;
-    UINT8 Seconds10:3;
-    UINT8 A1M1:1;
-  }bits;
-  UINT8 u8;
-}RTC_DS3231_ALARM1SEC;
-
-typedef union {
-  struct{
-    UINT8 Minutes:4;
-    UINT8 Minutes10:3;
-    UINT8 A1M2:1;
-  }bits;
-  UINT8 u8;
-}RTC_DS3231_ALARM1MIN;
-
-typedef union {
-  struct{
-    UINT8 Hour:4;
-    UINT8 Hours10:1;
-    UINT8 PM_20Hours:1;
-    UINT8 Hours24:1;
-    UINT8 A1M3:1;
-  }bits;
-  UINT8 u8;
-}RTC_DS3231_ALARM1HOUR;
-
-#endif
diff --git a/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c b/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c
deleted file mode 100644
index 30dc86414232..000000000000
--- a/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c
+++ /dev/null
@@ -1,427 +0,0 @@
-/** @file
-  Implement EFI RealTimeClock runtime services via RTC Lib.
-
-  Currently this driver does not support runtime virtual calling.
-
-  Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
-  Copyright (c) 2011-2013, ARM Ltd. All rights reserved.<BR>
-  Copyright (c) 2015, Hisilicon Limited. All rights reserved.<BR>
-  Copyright (c) 2015, Linaro Limited. All rights reserved.<BR>
-
-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-  Based on the files under ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.inf
-
-**/
-
-#include <Uefi.h>
-#include <PiDxe.h>
-#include <Library/BaseLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/DebugLib.h>
-#include <Library/UefiLib.h>
-// Use EfiAtRuntime to check stage
-#include <Library/UefiRuntimeLib.h>
-#include <Library/IoLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/PcdLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/UefiRuntimeServicesTableLib.h>
-#include <Library/TimerLib.h>
-#include <Library/TimeBaseLib.h>
-#include <Protocol/RealTimeClock.h>
-#include <Library/I2CLib.h>
-#include "DS3231RealTimeClock.h"
-
-extern I2C_DEVICE gRtcDevice;
-
-STATIC BOOLEAN       mDS3231Initialized = FALSE;
-
-EFI_STATUS
-IdentifyDS3231 (
-  VOID
-  )
-{
-  EFI_STATUS    Status;
-
-  Status = EFI_SUCCESS;
-  return Status;
-}
-
-EFI_STATUS
-InitializeDS3231 (
-  VOID
-  )
-{
-  EFI_STATUS    Status;
-  I2C_DEVICE    Dev;
-  RTC_DS3231_CONTROL Temp;
-  RTC_DS3231_HOURS   Hours;
-
-  // Prepare the hardware
-  (VOID)IdentifyDS3231();
-
-  (VOID)CopyMem (&Dev, &gRtcDevice, sizeof (Dev));
-
-  Status = I2CInit(Dev.Socket,Dev.Port,Normal);
-  if (EFI_ERROR (Status)) {
-    goto EXIT;
-  }
-  // Ensure interrupts are masked. We do not want RTC interrupts in UEFI
-  Status = I2CRead(&Dev,DS3231_REGADDR_CONTROL,1,&Temp.u8);
-  if (EFI_ERROR (Status)) {
-    goto EXIT;
-  }
-  Temp.bits.INTCN = 0;
-  Status = I2CWrite(&Dev,DS3231_REGADDR_CONTROL,1,&Temp.u8);
-  if (EFI_ERROR (Status)) {
-    goto EXIT;
-  }
-
-  MicroSecondDelay(2000);
-  Status = I2CRead(&Dev,DS3231_REGADDR_HOURS,1,&Hours.u8);
-  if (EFI_ERROR (Status)) {
-    goto EXIT;
-  }
-  Hours.bits.Hour24_n = 0;
-  Status = I2CWrite(&Dev,DS3231_REGADDR_HOURS,1,&Hours.u8);
-  if (EFI_ERROR (Status)) {
-    goto EXIT;
-  }
-
-
-  mDS3231Initialized = TRUE;
-
-  EXIT:
-  return Status;
-}
-
-
-/**
-  Returns the current time and date information, and the time-keeping capabilities
-  of the hardware platform.
-
-  @param  Time                   A pointer to storage to receive a snapshot of the current time.
-  @param  Capabilities           An optional pointer to a buffer to receive the real time clock
-                                 device's capabilities.
-
-  @retval EFI_SUCCESS            The operation completed successfully.
-  @retval EFI_INVALID_PARAMETER  Time is NULL.
-  @retval EFI_DEVICE_ERROR       The time could not be retrieved due to hardware error.
-  @retval EFI_SECURITY_VIOLATION The time could not be retrieved due to an authentication failure.
-**/
-EFI_STATUS
-EFIAPI
-LibGetTime (
-  OUT EFI_TIME                *Time,
-  OUT EFI_TIME_CAPABILITIES   *Capabilities
-  )
-{
-  EFI_STATUS  Status = EFI_SUCCESS;
-  UINT8       Temp;
-  UINT8       BaseHour = 0;
-  UINT16      BaseYear = 1900;
-
-  I2C_DEVICE    Dev;
-
-  // Ensure Time is a valid pointer
-  if (NULL == Time) {
-    return EFI_INVALID_PARAMETER;
-  }
-
-  // Initialize the hardware if not already done
-  if (!mDS3231Initialized) {
-    Status = InitializeDS3231 ();
-    if (EFI_ERROR (Status)) {
-      return EFI_NOT_READY;
-    }
-  }
-
-  (VOID)CopyMem (&Dev, &gRtcDevice, sizeof (Dev));
-
-
-  Status |= I2CRead(&Dev,DS3231_REGADDR_MONTH,1,&Temp);
-
-  Time->Month = ((Temp>>4)&1)*10+(Temp&0x0F);
-
-
-  if(Temp&0x80){
-    BaseYear = 2000;
-  }
-
-  Status |= I2CRead(&Dev,DS3231_REGADDR_YEAR,1,&Temp);
-
-  Time->Year  = BaseYear+(Temp>>4) *10 + (Temp&0x0F);
-
-
-  Status |= I2CRead(&Dev,DS3231_REGADDR_DATE,1,&Temp);
-
-  Time->Day   = ((Temp>>4)&3) *10 + (Temp&0x0F);
-
-
-  Status |= I2CRead(&Dev,DS3231_REGADDR_HOURS,1,&Temp);
-
-  BaseHour = 0;
-  if((Temp&0x30) == 0x30){
-    return EFI_DEVICE_ERROR;
-  }else if(Temp&0x20){
-    BaseHour = 20;
-  }else if(Temp&0x10){
-    BaseHour = 10;
-  }
-  Time->Hour        = BaseHour + (Temp&0x0F);
-
-
-  Status |= I2CRead(&Dev,DS3231_REGADDR_MIUTES,1,&Temp);
-
-  Time->Minute      = ((Temp>>4)&7) * 10 + (Temp&0x0F);
-
-
-  Status |= I2CRead(&Dev,DS3231_REGADDR_SECONDS,1,&Temp);
-
-  Time->Second      = (Temp>>4) * 10 + (Temp&0x0F);
-
-  Time->Nanosecond  = 0;
-  Time->Daylight    = 0;
-  Time->TimeZone    = EFI_UNSPECIFIED_TIMEZONE;
-
-  if((EFI_ERROR(Status)) || (!IsTimeValid(Time)) || ((Time->Year - BaseYear) > 99)) {
-    return EFI_DEVICE_ERROR;
-  }
-
-  return EFI_SUCCESS;
-}
-
-
-/**
-  Sets the current local time and date information.
-
-  @param  Time                  A pointer to the current time.
-
-  @retval EFI_SUCCESS           The operation completed successfully.
-  @retval EFI_INVALID_PARAMETER A time field is out of range.
-  @retval EFI_DEVICE_ERROR      The time could not be set due due to hardware error.
-
-**/
-EFI_STATUS
-EFIAPI
-LibSetTime (
-  IN  EFI_TIME                *Time
-  )
-{
-  EFI_STATUS  Status = EFI_SUCCESS;
-  I2C_DEVICE    Dev;
-  UINT8 Temp;
-  UINT16 BaseYear = 1900;
-
-  // Check the input parameters are within the range specified by UEFI
-  if(!IsTimeValid(Time)){
-    return EFI_INVALID_PARAMETER;
-  }
-
-  // Initialize the hardware if not already done
-  if (!mDS3231Initialized) {
-    Status = InitializeDS3231 ();
-    if (EFI_ERROR (Status)) {
-      goto EXIT;
-    }
-  }
-
-  (VOID)CopyMem (&Dev, &gRtcDevice, sizeof (Dev));
-
-  Temp = ((Time->Second/10)<<4) | (Time->Second%10);
-  MicroSecondDelay(1000);
-  Status = I2CWrite(&Dev,DS3231_REGADDR_SECONDS,1,&Temp);
-  if(EFI_ERROR (Status)){
-    goto EXIT;
-  }
-
-  Temp = ((Time->Minute/10)<<4) | (Time->Minute%10);
-  MicroSecondDelay(1000);
-  Status = I2CWrite(&Dev,DS3231_REGADDR_MIUTES,1,&Temp);
-  if(EFI_ERROR (Status)){
-    goto EXIT;
-  }
-
-  Temp = 0;
-  if(Time->Hour > 19){
-    Temp = 2;
-  } else if(Time->Hour > 9){
-    Temp = 1;
-  }
-  Temp = (Temp << 4) | (Time->Hour%10);
-  MicroSecondDelay(1000);
-  Status = I2CWrite(&Dev,DS3231_REGADDR_HOURS,1,&Temp);
-  if(EFI_ERROR (Status)){
-    goto EXIT;
-  }
-
-  Temp = ((Time->Day/10)<<4) | (Time->Day%10);
-  MicroSecondDelay(1000);
-  Status = I2CWrite(&Dev,DS3231_REGADDR_DATE,1,&Temp);
-  if(EFI_ERROR (Status)){
-    goto EXIT;
-  }
-
-  Temp = 0;
-  if(Time->Year >= 2000){
-    Temp = 0x8;
-    BaseYear = 2000;
-  }
-
-  if(Time->Month > 9){
-    Temp |= 0x1;
-  }
-  Temp = (Temp<<4) | (Time->Month%10);
-  MicroSecondDelay(1000);
-  Status = I2CWrite(&Dev,DS3231_REGADDR_MONTH,1,&Temp);
-  if(EFI_ERROR (Status)){
-    goto EXIT;
-  }
-
-  Temp = (((Time->Year-BaseYear)/10)<<4) | (Time->Year%10);
-  MicroSecondDelay(1000);
-  Status = I2CWrite(&Dev,DS3231_REGADDR_YEAR,1,&Temp);
-  if(EFI_ERROR (Status)){
-    goto EXIT;
-  }
-
-  EXIT:
-  return Status;
-}
-
-
-/**
-  Returns the current wakeup alarm clock setting.
-
-  @param  Enabled               Indicates if the alarm is currently enabled or disabled.
-  @param  Pending               Indicates if the alarm signal is pending and requires acknowledgement.
-  @param  Time                  The current alarm setting.
-
-  @retval EFI_SUCCESS           The alarm settings were returned.
-  @retval EFI_INVALID_PARAMETER Any parameter is NULL.
-  @retval EFI_DEVICE_ERROR      The wakeup time could not be retrieved due to a hardware error.
-
-**/
-EFI_STATUS
-EFIAPI
-LibGetWakeupTime (
-  OUT BOOLEAN     *Enabled,
-  OUT BOOLEAN     *Pending,
-  OUT EFI_TIME    *Time
-  )
-{
-  // Not a required feature
-  return EFI_UNSUPPORTED;
-}
-
-
-/**
-  Sets the system wakeup alarm clock time.
-
-  @param  Enabled               Enable or disable the wakeup alarm.
-  @param  Time                  If Enable is TRUE, the time to set the wakeup alarm for.
-
-  @retval EFI_SUCCESS           If Enable is TRUE, then the wakeup alarm was enabled. If
-                                Enable is FALSE, then the wakeup alarm was disabled.
-  @retval EFI_INVALID_PARAMETER A time field is out of range.
-  @retval EFI_DEVICE_ERROR      The wakeup time could not be set due to a hardware error.
-  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this platform.
-
-**/
-EFI_STATUS
-EFIAPI
-LibSetWakeupTime (
-  IN BOOLEAN      Enabled,
-  OUT EFI_TIME    *Time
-  )
-{
-  // Not a required feature
-  return EFI_UNSUPPORTED;
-}
-
-
-
-/**
-  This is the declaration of an EFI image entry point. This can be the entry point to an application
-  written to this specification, an EFI boot service driver, or an EFI runtime driver.
-
-  @param  ImageHandle           Handle that identifies the loaded image.
-  @param  SystemTable           System Table for this image.
-
-  @retval EFI_SUCCESS           The operation completed successfully.
-
-**/
-EFI_STATUS
-EFIAPI
-LibRtcInitialize (
-  IN EFI_HANDLE                            ImageHandle,
-  IN EFI_SYSTEM_TABLE                      *SystemTable
-  )
-{
-  EFI_STATUS    Status;
-  EFI_HANDLE    Handle;
-
-
-  EFI_TIME      EfiTime;
-
-  // Setup the setters and getters
-  gRT->GetTime       = LibGetTime;
-  gRT->SetTime       = LibSetTime;
-  gRT->GetWakeupTime = LibGetWakeupTime;
-  gRT->SetWakeupTime = LibSetWakeupTime;
-
-  Status = gRT->GetTime (&EfiTime, NULL);
-  if(EFI_ERROR (Status) || (EfiTime.Year < 2000) || (EfiTime.Year > 2099)){
-      EfiTime.Year          = 2000;
-      EfiTime.Month         = 1;
-      EfiTime.Day           = 1;
-      EfiTime.Hour          = 0;
-      EfiTime.Minute        = 0;
-      EfiTime.Second        = 0;
-      EfiTime.Nanosecond    = 0;
-      EfiTime.Daylight      = 0;
-      EfiTime.TimeZone      = EFI_UNSPECIFIED_TIMEZONE;
-
-      Status = gRT->SetTime(&EfiTime);
-      if (EFI_ERROR(Status))
-      {
-        DEBUG((EFI_D_ERROR, "[%a]:[%dL] Status : %r\n", __FUNCTION__, __LINE__, Status));
-      }
-  }
-
-  // Install the protocol
-  Handle = NULL;
-  Status = gBS->InstallMultipleProtocolInterfaces (
-                  &Handle,
-                  &gEfiRealTimeClockArchProtocolGuid,  NULL,
-                  NULL
-                 );
-
-  return Status;
-}
-
-
-/**
-  Fixup internal data so that EFI can be call in virtual mode.
-  Call the passed in Child Notify event and convert any pointers in
-  lib to virtual mode.
-
-  @param[in]    Event   The Event that is being processed
-  @param[in]    Context Event Context
-**/
-VOID
-EFIAPI
-LibRtcVirtualNotifyEvent (
-  IN EFI_EVENT        Event,
-  IN VOID             *Context
-  )
-{
-  //
-  // Only needed if you are going to support the OS calling RTC functions in virtual mode.
-  // You will need to call EfiConvertPointer (). To convert any stored physical addresses
-  // to virtual address. After the OS transitions to calling in virtual mode, all future
-  // runtime calls will be made in virtual mode.
-  //
-  return;
-}



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109559): https://edk2.groups.io/g/devel/message/109559
Mute This Topic: https://groups.io/mt/101914671/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 09/19] Hisilicon: drop unused VirtualRealTimeClockLib instance
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (7 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 08/19] Hisilicon: drop unused DS3231RealTimeClockLib instance Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 10/19] Hisilicon/DS3231RealTimeClockLib: drop LibRtcVirtualNotifyEvent Laszlo Ersek
                     ` (10 subsequent siblings)
  19 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Ard Biesheuvel, Leif Lindholm, Wenyi Xie

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: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Wenyi Xie <xiewenyi2@huawei.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/Hisilicon/Library/VirtualRealTimeClockLib/RealTimeClockLib.inf |  41 --
 Silicon/Hisilicon/Library/VirtualRealTimeClockLib/RealTimeClockLib.c   | 423 --------------------
 2 files changed, 464 deletions(-)

diff --git a/Silicon/Hisilicon/Library/VirtualRealTimeClockLib/RealTimeClockLib.inf b/Silicon/Hisilicon/Library/VirtualRealTimeClockLib/RealTimeClockLib.inf
deleted file mode 100644
index 8029dda436db..000000000000
--- a/Silicon/Hisilicon/Library/VirtualRealTimeClockLib/RealTimeClockLib.inf
+++ /dev/null
@@ -1,41 +0,0 @@
-#/** @file
-#
-#    Copyright (c) 2015, Hisilicon Limited. All rights reserved.
-#    Copyright (c) 2015, Linaro Limited. All rights reserved.
-#
-#    SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-#**/
-
-[Defines]
-  INF_VERSION                    = 0x00010005
-  BASE_NAME                      = RealTimeClockLibVirtual
-  FILE_GUID                      = 432B35C1-A0CC-4720-A4B9-1EFD70050107
-  MODULE_TYPE                    = BASE
-  VERSION_STRING                 = 1.0
-  LIBRARY_CLASS                  = RealTimeClockLib
-
-[Sources.common]
-  RealTimeClockLib.c
-
-[Packages]
-  MdePkg/MdePkg.dec
-  EmbeddedPkg/EmbeddedPkg.dec
-  ArmPkg/ArmPkg.dec
-  OpenPlatformPkg/OpenPlatformPkg.dec
-
-[LibraryClasses]
-  IoLib
-  UefiLib
-  DebugLib
-  PcdLib
-  DxeServicesTableLib
-  TimeBaseLib
-  UefiRuntimeLib
-  ArmLib
-
-[Guids]
-  gEfiEventVirtualAddressChangeGuid
-
-[Pcd]
-  gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz
diff --git a/Silicon/Hisilicon/Library/VirtualRealTimeClockLib/RealTimeClockLib.c b/Silicon/Hisilicon/Library/VirtualRealTimeClockLib/RealTimeClockLib.c
deleted file mode 100644
index 60edbce0f158..000000000000
--- a/Silicon/Hisilicon/Library/VirtualRealTimeClockLib/RealTimeClockLib.c
+++ /dev/null
@@ -1,423 +0,0 @@
-/** @file
-  Implement EFI RealTimeClock runtime services via RTC Lib.
-
-  Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
-  Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR>
-  Copyright (c) 2015, Hisilicon Limited. All rights reserved.<BR>
-  Copyright (c) 2015, Linaro Limited. All rights reserved.<BR>
-
-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-  Based on the files under ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.inf
-
-**/
-
-#include <Uefi.h>
-#include <PiDxe.h>
-#include <Library/BaseLib.h>
-#include <Library/DebugLib.h>
-#include <Library/UefiLib.h>
-#include <Library/IoLib.h>
-#include <Library/RealTimeClockLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/PcdLib.h>
-#include <Library/DxeServicesTableLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/UefiRuntimeServicesTableLib.h>
-#include <Library/UefiRuntimeLib.h>
-#include <Library/TimeBaseLib.h>
-
-#include <Protocol/RealTimeClock.h>
-
-#include <Guid/GlobalVariable.h>
-#include <Guid/EventGroup.h>
-
-#include <Library/ArmArchTimer.h>
-
-STATIC CONST CHAR16           mTimeZoneVariableName[] = L"PV660VirtualRtcTimeZone";
-STATIC CONST CHAR16           mDaylightVariableName[] = L"PV660VirtualRtcDaylight";
-STATIC EFI_EVENT              mRtcVirtualAddrChangeEvent;
-STATIC EFI_RUNTIME_SERVICES   *mRT;
-
-
-STATIC INTN mEpochDiff = 0;
-
-/**
-  Returns the current time and date information, and the time-keeping capabilities
-  of the hardware platform.
-
-  @param  Time                   A pointer to storage to receive a snapshot of the current time.
-  @param  Capabilities           An optional pointer to a buffer to receive the real time clock
-                                 device's capabilities.
-
-  @retval EFI_SUCCESS            The operation completed successfully.
-  @retval EFI_INVALID_PARAMETER  Time is NULL.
-  @retval EFI_DEVICE_ERROR       The time could not be retrieved due to hardware error.
-  @retval EFI_SECURITY_VIOLATION The time could not be retrieved due to an authentication failure.
-**/
-EFI_STATUS
-EFIAPI
-LibGetTime (
-  OUT EFI_TIME                *Time,
-  OUT EFI_TIME_CAPABILITIES   *Capabilities
-  )
-{
-  EFI_STATUS  Status = EFI_SUCCESS;
-  UINT64      Temp;
-  UINT32      EpochSeconds;
-  INT16       TimeZone = 0;
-  UINT8       Daylight = 0;
-  UINTN       Size;
-
-  // Ensure Time is a valid pointer
-  if (Time == NULL) {
-    return EFI_INVALID_PARAMETER;
-  }
-
-  ArmArchTimerReadReg(CntPct,&Temp);
-
-  // UINT32 force convertion for PC-LINT
-  EpochSeconds = mEpochDiff + Temp / (UINT32) PcdGet32(PcdArmArchTimerFreqInHz);
-
-  // Get the current time zone information from non-volatile storage
-  Size = sizeof (TimeZone);
-  Status = mRT->GetVariable (
-                  (CHAR16 *)mTimeZoneVariableName,
-                  &gEfiCallerIdGuid,
-                  NULL,
-                  &Size,
-                  (VOID *)&TimeZone
-                  );
-
-  if (EFI_ERROR (Status)) {
-    ASSERT(Status != EFI_INVALID_PARAMETER);
-    ASSERT(Status != EFI_BUFFER_TOO_SMALL);
-
-    if (Status != EFI_NOT_FOUND)
-      goto EXIT;
-
-    // The time zone variable does not exist in non-volatile storage, so create it.
-    Time->TimeZone = EFI_UNSPECIFIED_TIMEZONE;
-    // Store it
-    Status = mRT->SetVariable (
-                    (CHAR16 *)mTimeZoneVariableName,
-                    &gEfiCallerIdGuid,
-                    EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
-                    Size,
-                    (VOID *)&(Time->TimeZone)
-                    );
-    if (EFI_ERROR (Status)) {
-      DEBUG ((
-        EFI_D_ERROR,
-        "LibGetTime: Failed to save %s variable to non-volatile storage, Status = %r\n",
-        mTimeZoneVariableName,
-        Status
-        ));
-      goto EXIT;
-    }
-  } else {
-    // Got the time zone
-    Time->TimeZone = TimeZone;
-
-    // Check TimeZone bounds:   -1440 to 1440 or 2047
-    if (((Time->TimeZone < -1440) || (Time->TimeZone > 1440))
-        && (Time->TimeZone != EFI_UNSPECIFIED_TIMEZONE)) {
-      Time->TimeZone = EFI_UNSPECIFIED_TIMEZONE;
-    }
-
-    // Adjust for the correct time zone
-    if (Time->TimeZone != EFI_UNSPECIFIED_TIMEZONE) {
-      EpochSeconds += Time->TimeZone * SEC_PER_MIN;
-    }
-  }
-
-  // Get the current daylight information from non-volatile storage
-  Size = sizeof (Daylight);
-  Status = mRT->GetVariable (
-                  (CHAR16 *)mDaylightVariableName,
-                  &gEfiCallerIdGuid,
-                  NULL,
-                  &Size,
-                  (VOID *)&Daylight
-                  );
-
-  if (EFI_ERROR (Status)) {
-    ASSERT(Status != EFI_INVALID_PARAMETER);
-    ASSERT(Status != EFI_BUFFER_TOO_SMALL);
-
-    if (Status != EFI_NOT_FOUND)
-      goto EXIT;
-
-    // The daylight variable does not exist in non-volatile storage, so create it.
-    Time->Daylight = 0;
-    // Store it
-    Status = mRT->SetVariable (
-                    (CHAR16 *)mDaylightVariableName,
-                    &gEfiCallerIdGuid,
-                    EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
-                    Size,
-                    (VOID *)&(Time->Daylight)
-                    );
-    if (EFI_ERROR (Status)) {
-      DEBUG ((
-        EFI_D_ERROR,
-        "LibGetTime: Failed to save %s variable to non-volatile storage, Status = %r\n",
-        mDaylightVariableName,
-        Status
-        ));
-      goto EXIT;
-    }
-  } else {
-    // Got the daylight information
-    Time->Daylight = Daylight;
-
-    // Adjust for the correct period
-    if ((Time->Daylight & EFI_TIME_IN_DAYLIGHT) == EFI_TIME_IN_DAYLIGHT) {
-      // Convert to adjusted time, i.e. spring forwards one hour
-      EpochSeconds += SEC_PER_HOUR;
-    }
-  }
-
-  // Convert from internal 32-bit time to UEFI time
-  EpochToEfiTime (EpochSeconds, Time);
-
-  // Update the Capabilities info
-  if (Capabilities != NULL) {
-    Capabilities->Resolution  = 1;
-    // Accuracy in ppm multiplied by 1,000,000, e.g. for 50ppm set 50,000,000
-
-    Capabilities->Accuracy    = PcdGet32 (PcdArmArchTimerFreqInHz);
-    // FALSE: Setting the time does not clear the values below the resolution level
-    Capabilities->SetsToZero  = FALSE;
-  }
-
-  EXIT:
-  return Status;
-}
-
-
-/**
-  Sets the current local time and date information.
-
-  @param  Time                  A pointer to the current time.
-
-  @retval EFI_SUCCESS           The operation completed successfully.
-  @retval EFI_INVALID_PARAMETER A time field is out of range.
-  @retval EFI_DEVICE_ERROR      The time could not be set due due to hardware error.
-
-**/
-EFI_STATUS
-EFIAPI
-LibSetTime (
-  IN  EFI_TIME                *Time
-  )
-{
-  EFI_STATUS  Status;
-  UINTN       EpochSeconds;
-  UINTN       Temp;
-
-  // Check the input parameters are within the range specified by UEFI
-  if (!IsTimeValid (Time)) {
-    Status = EFI_INVALID_PARAMETER;
-    goto EXIT;
-  }
-
-  // Because the PL031 is a 32-bit counter counting seconds,
-  // the maximum time span is just over 136 years.
-  // Time is stored in Unix Epoch format, so it starts in 1970,
-  // Therefore it can not exceed the year 2106.
-  if ((Time->Year < 1970) || (Time->Year >= 2106)) {
-    Status = EFI_UNSUPPORTED;
-    goto EXIT;
-  }
-
-  EpochSeconds = EfiTimeToEpoch (Time);
-
-  // Adjust for the correct time zone, i.e. convert to UTC time zone
-  if (Time->TimeZone != EFI_UNSPECIFIED_TIMEZONE) {
-    EpochSeconds -= Time->TimeZone * SEC_PER_MIN;
-  }
-
-  // TODO: Automatic Daylight activation
-
-  // Adjust for the correct period
-  if ((Time->Daylight & EFI_TIME_IN_DAYLIGHT) == EFI_TIME_IN_DAYLIGHT) {
-    // Convert to un-adjusted time, i.e. fall back one hour
-    EpochSeconds -= SEC_PER_HOUR;
-  }
-
-  ArmArchTimerReadReg(CntPct,&Temp);
-
-  // UINT32 force convertion for PC-LINT
-  mEpochDiff = EpochSeconds - Temp / (UINT32) PcdGet32(PcdArmArchTimerFreqInHz);
-
-  // The accesses to Variable Services can be very slow, because we may be writing to Flash.
-  // Do this after having set the RTC.
-
-  // Save the current time zone information into non-volatile storage
-  Status = mRT->SetVariable (
-                  (CHAR16 *)mTimeZoneVariableName,
-                  &gEfiCallerIdGuid,
-                  EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
-                  sizeof (Time->TimeZone),
-                  (VOID *)&(Time->TimeZone)
-                  );
-  if (EFI_ERROR (Status)) {
-      DEBUG ((
-        EFI_D_ERROR,
-        "LibSetTime: Failed to save %s variable to non-volatile storage, Status = %r\n",
-        mTimeZoneVariableName,
-        Status
-        ));
-    goto EXIT;
-  }
-
-  // Save the current daylight information into non-volatile storage
-  Status = mRT->SetVariable (
-                  (CHAR16 *)mDaylightVariableName,
-                  &gEfiCallerIdGuid,
-                  EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
-                  sizeof(Time->Daylight),
-                  (VOID *)&(Time->Daylight)
-                  );
-  if (EFI_ERROR (Status)) {
-    DEBUG ((
-      EFI_D_ERROR,
-      "LibSetTime: Failed to save %s variable to non-volatile storage, Status = %r\n",
-      mDaylightVariableName,
-      Status
-      ));
-    goto EXIT;
-  }
-
-  EXIT:
-  return Status;
-}
-
-
-/**
-  Returns the current wakeup alarm clock setting.
-
-  @param  Enabled               Indicates if the alarm is currently enabled or disabled.
-  @param  Pending               Indicates if the alarm signal is pending and requires acknowledgement.
-  @param  Time                  The current alarm setting.
-
-  @retval EFI_SUCCESS           The alarm settings were returned.
-  @retval EFI_INVALID_PARAMETER Any parameter is NULL.
-  @retval EFI_DEVICE_ERROR      The wakeup time could not be retrieved due to a hardware error.
-
-**/
-EFI_STATUS
-EFIAPI
-LibGetWakeupTime (
-  OUT BOOLEAN     *Enabled,
-  OUT BOOLEAN     *Pending,
-  OUT EFI_TIME    *Time
-  )
-{
-  // Not a required feature
-  return EFI_UNSUPPORTED;
-}
-
-
-/**
-  Sets the system wakeup alarm clock time.
-
-  @param  Enabled               Enable or disable the wakeup alarm.
-  @param  Time                  If Enable is TRUE, the time to set the wakeup alarm for.
-
-  @retval EFI_SUCCESS           If Enable is TRUE, then the wakeup alarm was enabled. If
-                                Enable is FALSE, then the wakeup alarm was disabled.
-  @retval EFI_INVALID_PARAMETER A time field is out of range.
-  @retval EFI_DEVICE_ERROR      The wakeup time could not be set due to a hardware error.
-  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this platform.
-
-**/
-EFI_STATUS
-EFIAPI
-LibSetWakeupTime (
-  IN BOOLEAN      Enabled,
-  OUT EFI_TIME    *Time
-  )
-{
-  // Not a required feature
-  return EFI_UNSUPPORTED;
-}
-
-/**
-  Fixup internal data so that EFI can be call in virtual mode.
-  Call the passed in Child Notify event and convert any pointers in
-  lib to virtual mode.
-
-  @param[in]    Event   The Event that is being processed
-  @param[in]    Context Event Context
-**/
-VOID
-EFIAPI
-LibRtcVirtualNotifyEvent (
-  IN EFI_EVENT        Event,
-  IN VOID             *Context
-  )
-{
-  //
-  // Only needed if you are going to support the OS calling RTC functions in virtual mode.
-  // You will need to call EfiConvertPointer (). To convert any stored physical addresses
-  // to virtual address. After the OS transitions to calling in virtual mode, all future
-  // runtime calls will be made in virtual mode.
-  //
-  EfiConvertPointer (0x0, (VOID**)&mRT);
-  return;
-}
-
-/**
-  This is the declaration of an EFI image entry point. This can be the entry point to an application
-  written to this specification, an EFI boot service driver, or an EFI runtime driver.
-
-  @param  ImageHandle           Handle that identifies the loaded image.
-  @param  SystemTable           System Table for this image.
-
-  @retval EFI_SUCCESS           The operation completed successfully.
-
-**/
-EFI_STATUS
-EFIAPI
-LibRtcInitialize (
-  IN EFI_HANDLE                            ImageHandle,
-  IN EFI_SYSTEM_TABLE                      *SystemTable
-  )
-{
-  EFI_STATUS    Status;
-  EFI_HANDLE    Handle;
-
-  // Setup the setters and getters
-  gRT->GetTime       = LibGetTime;
-  gRT->SetTime       = LibSetTime;
-  gRT->GetWakeupTime = LibGetWakeupTime;
-  gRT->SetWakeupTime = LibSetWakeupTime;
-
-  mRT = gRT;
-
-  // Install the protocol
-  Handle = NULL;
-  Status = gBS->InstallMultipleProtocolInterfaces (
-                  &Handle,
-                  &gEfiRealTimeClockArchProtocolGuid,  NULL,
-                  NULL
-                 );
-  ASSERT_EFI_ERROR (Status);
-
-  //
-  // Register for the virtual address change event
-  //
-  Status = gBS->CreateEventEx (
-                  EVT_NOTIFY_SIGNAL,
-                  TPL_NOTIFY,
-                  LibRtcVirtualNotifyEvent,
-                  NULL,
-                  &gEfiEventVirtualAddressChangeGuid,
-                  &mRtcVirtualAddrChangeEvent
-                  );
-  ASSERT_EFI_ERROR (Status);
-
-  return Status;
-}



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109547): https://edk2.groups.io/g/devel/message/109547
Mute This Topic: https://groups.io/mt/101914656/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 10/19] Hisilicon/DS3231RealTimeClockLib: drop LibRtcVirtualNotifyEvent
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (8 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 09/19] Hisilicon: drop unused VirtualRealTimeClockLib instance Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 11/19] Hisilicon/RX8900RealTimeClockLib: " Laszlo Ersek
                     ` (9 subsequent siblings)
  19 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Ard Biesheuvel, Leif Lindholm, Wenyi Xie

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, DS3231RealTimeClockLib *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.

Build-tested only (with the Hisilicon platforms).

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Wenyi Xie <xiewenyi2@huawei.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c | 25 --------------------
 1 file changed, 25 deletions(-)

diff --git a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c
index 898335a7b73f..3a84b6e9297b 100644
--- a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c
+++ b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c
@@ -471,28 +471,3 @@ LibRtcInitialize (
 
   return Status;
 }
-
-
-/**
-  Fixup internal data so that EFI can be call in virtual mode.
-  Call the passed in Child Notify event and convert any pointers in
-  lib to virtual mode.
-
-  @param[in]    Event   The Event that is being processed
-  @param[in]    Context Event Context
-**/
-VOID
-EFIAPI
-LibRtcVirtualNotifyEvent (
-  IN EFI_EVENT        Event,
-  IN VOID             *Context
-  )
-{
-  //
-  // Only needed if you are going to support the OS calling RTC functions in virtual mode.
-  // You will need to call EfiConvertPointer (). To convert any stored physical addresses
-  // to virtual address. After the OS transitions to calling in virtual mode, all future
-  // runtime calls will be made in virtual mode.
-  //
-  return;
-}



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109550): https://edk2.groups.io/g/devel/message/109550
Mute This Topic: https://groups.io/mt/101914659/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 11/19] Hisilicon/RX8900RealTimeClockLib: drop LibRtcVirtualNotifyEvent
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (9 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 10/19] Hisilicon/DS3231RealTimeClockLib: drop LibRtcVirtualNotifyEvent Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 12/19] AmpereAltraPkg/Ac01PcieLib: fix compilation error Laszlo Ersek
                     ` (8 subsequent siblings)
  19 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Ard Biesheuvel, Leif Lindholm, Wenyi Xie

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: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Wenyi Xie <xiewenyi2@huawei.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/Hisilicon/Library/RX8900RealTimeClockLib/RX8900RealTimeClockLib.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/Silicon/Hisilicon/Library/RX8900RealTimeClockLib/RX8900RealTimeClockLib.c b/Silicon/Hisilicon/Library/RX8900RealTimeClockLib/RX8900RealTimeClockLib.c
index b6c9e6769fce..ea41202fc72a 100644
--- a/Silicon/Hisilicon/Library/RX8900RealTimeClockLib/RX8900RealTimeClockLib.c
+++ b/Silicon/Hisilicon/Library/RX8900RealTimeClockLib/RX8900RealTimeClockLib.c
@@ -455,14 +455,3 @@ LibRtcInitialize (
 
   return Status;
 }
-
-
-VOID
-EFIAPI
-LibRtcVirtualNotifyEvent (
-  IN EFI_EVENT        Event,
-  IN VOID             *Context
-  )
-{
-  return;
-}



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109549): https://edk2.groups.io/g/devel/message/109549
Mute This Topic: https://groups.io/mt/101914658/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 12/19] AmpereAltraPkg/Ac01PcieLib: fix compilation error
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (10 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 11/19] Hisilicon/RX8900RealTimeClockLib: " Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-13  2:20     ` Nhi Pham via groups.io
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 13/19] JadePkg/PCF85063RealTimeClockLib: hide LibRtcVirtualNotifyEvent Laszlo Ersek
                     ` (7 subsequent siblings)
  19 siblings, 1 reply; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Chuong Tran, Leif Lindholm, Nhi Pham, Rebecca Cran

Commit 380b4b40c60d ("AmpereAltraPkg: Update Ampere specific platform PCIe
core", 2023-03-29) removed the DEBUG macro call from
Ac01PcieCoreUpdateLink() that was the only reader of "Val". Since then,
Val has only been set, but never read. This triggers
"-Werror=unused-but-set-variable".

Found when trying to build "Jade.dsc".

Keep the MmioRead32() call, so that the PCIe config space sees the same
behavior as before, but explicitly throw away the result.

Cc: Chuong Tran <chuong@os.amperecomputing.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Nhi Pham <nhi@os.amperecomputing.com>
Cc: Rebecca Cran <rebecca@os.amperecomputing.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
index 3c1fe5e35ca2..fa00c1e36999 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
@@ -1747,7 +1747,6 @@ Ac01PcieCoreUpdateLink (
   PHYSICAL_ADDRESS          CfgBase;
   UINT8                     PcieIndex;
   UINT32                    Index;
-  UINT32                    Val;
 
   *IsNextRoundNeeded = FALSE;
   *FailedPcieCount   = 0;
@@ -1767,7 +1766,7 @@ Ac01PcieCoreUpdateLink (
     if (Pcie->Active && !Pcie->LinkUp) {
       if (PcieLinkUpCheck (Pcie)) {
         Pcie->LinkUp = TRUE;
-        Val = MmioRead32 (CfgBase + PCIE_CAPABILITY_BASE + LINK_CONTROL_LINK_STATUS_REG);
+        (VOID)MmioRead32 (CfgBase + PCIE_CAPABILITY_BASE + LINK_CONTROL_LINK_STATUS_REG);
 
         // Doing link checking and recovery if needed
         Ac01PcieCoreQoSLinkCheckRecovery (RootComplex, PcieIndex);



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109551): https://edk2.groups.io/g/devel/message/109551
Mute This Topic: https://groups.io/mt/101914660/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 13/19] JadePkg/PCF85063RealTimeClockLib: hide LibRtcVirtualNotifyEvent
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (11 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 12/19] AmpereAltraPkg/Ac01PcieLib: fix compilation error Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-13  2:24     ` Nhi Pham via groups.io
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 14/19] LoongArchQemuPkg/LsRealTimeClockLib: " Laszlo Ersek
                     ` (6 subsequent siblings)
  19 siblings, 1 reply; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Chuong Tran, Leif Lindholm, Nhi Pham, Rebecca Cran

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.

Rename LibRtcVirtualNotifyEvent() to VirtualNotifyEvent(), and make it
static, in preparation for removing the LibRtcVirtualNotifyEvent()
declaration from the lib class header later.

Build-tested only (with "Jade.dsc").

Cc: Chuong Tran <chuong@os.amperecomputing.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Nhi Pham <nhi@os.amperecomputing.com>
Cc: Rebecca Cran <rebecca@os.amperecomputing.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063RealTimeClockLib.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063RealTimeClockLib.c b/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063RealTimeClockLib.c
index ef8c71e92c18..1df781364bbc 100644
--- a/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063RealTimeClockLib.c
+++ b/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063RealTimeClockLib.c
@@ -201,9 +201,10 @@ LibSetWakeupTime (
   @param[in]    Event   The Event that is being processed
   @param[in]    Context Event Context
 **/
+STATIC
 VOID
 EFIAPI
-LibRtcVirtualNotifyEvent (
+VirtualNotifyEvent (
   IN EFI_EVENT        Event,
   IN VOID             *Context
   )
@@ -246,7 +247,7 @@ LibRtcInitialize (
   Status = gBS->CreateEventEx (
                   EVT_NOTIFY_SIGNAL,
                   TPL_NOTIFY,
-                  LibRtcVirtualNotifyEvent,
+                  VirtualNotifyEvent,
                   NULL,
                   &gEfiEventVirtualAddressChangeGuid,
                   &mVirtualAddressChangeEvent



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109556): https://edk2.groups.io/g/devel/message/109556
Mute This Topic: https://groups.io/mt/101914668/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 14/19] LoongArchQemuPkg/LsRealTimeClockLib: hide LibRtcVirtualNotifyEvent
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (12 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 13/19] JadePkg/PCF85063RealTimeClockLib: hide LibRtcVirtualNotifyEvent Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-12 12:14     ` xianglai
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 15/19] Styx/RealTimeClockLib: " Laszlo Ersek
                     ` (5 subsequent siblings)
  19 siblings, 1 reply; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Bibo Mao, Chao Li, Xianglai li

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.

Rename LibRtcVirtualNotifyEvent() to VirtualNotifyEvent(), and make it
static, in preparation for removing the LibRtcVirtualNotifyEvent()
declaration from the lib class header later.

Build-tested only (with "Loongson.dsc").

Cc: Bibo Mao <maobibo@loongson.cn>
Cc: Chao Li <lichao@loongson.cn>
Cc: Xianglai li <lixianglai@loongson.cn>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c b/Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c
index 4315c2074d2f..eeac011a9400 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c
+++ b/Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c
@@ -180,9 +180,10 @@ LibSetWakeupTime (
   @param[in]    Event   The Event that is being processed
   @param[in]    Context Event Context
 **/
+STATIC
 VOID
 EFIAPI
-LibRtcVirtualNotifyEvent (
+VirtualNotifyEvent (
   IN EFI_EVENT        Event,
   IN VOID             *Context
   )
@@ -325,7 +326,7 @@ LibRtcInitialize (
   Status = gBS->CreateEventEx (
                   EVT_NOTIFY_SIGNAL,
                   TPL_NOTIFY,
-                  LibRtcVirtualNotifyEvent,
+                  VirtualNotifyEvent,
                   NULL,
                   &gEfiEventVirtualAddressChangeGuid,
                   &mRtcVirtualAddrChangeEvent



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109553): https://edk2.groups.io/g/devel/message/109553
Mute This Topic: https://groups.io/mt/101914663/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 15/19] Styx/RealTimeClockLib: hide LibRtcVirtualNotifyEvent
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (13 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 14/19] LoongArchQemuPkg/LsRealTimeClockLib: " Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 16/19] Armada7k8k/RealTimeClockLib: " Laszlo Ersek
                     ` (4 subsequent siblings)
  19 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Ard Biesheuvel, Leif Lindholm

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.

Rename LibRtcVirtualNotifyEvent() to VirtualNotifyEvent(), and make it
static, in preparation for removing the LibRtcVirtualNotifyEvent()
declaration from the lib class header later. Also hoist the function
definition above the reference.

Build-tested only (with "OverdriveBoard.dsc", "CelloBoard.dsc",
"Overdrive1000Board.dsc").

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.c | 55 +++++++++-----------
 1 file changed, 26 insertions(+), 29 deletions(-)

diff --git a/Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.c b/Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.c
index d15fcf031afa..052359f60b44 100644
--- a/Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.c
+++ b/Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.c
@@ -179,6 +179,31 @@ LibSetWakeupTime (
 }
 
 
+/**
+  Fixup internal data so that EFI can be call in virtual mode.
+  Call the passed in Child Notify event and convert any pointers in
+  lib to virtual mode.
+
+  @param[in]    Event   The Event that is being processed
+  @param[in]    Context Event Context
+**/
+STATIC
+VOID
+EFIAPI
+VirtualNotifyEvent (
+  IN EFI_EVENT        Event,
+  IN VOID             *Context
+  )
+{
+  //
+  // Only needed if you are going to support the OS calling RTC functions in virtual mode.
+  // You will need to call EfiConvertPointer (). To convert any stored physical addresses
+  // to virtual address. After the OS transistions to calling in virtual mode, all future
+  // runtime calls will be made in virtual mode.
+  //
+  EfiConvertPointer (0x0, (VOID**)&mRtcIscpDxeProtocol);
+}
+
 
 /**
   This is the declaration of an EFI image entry point. This can be the entry point to an application
@@ -218,7 +243,7 @@ LibRtcInitialize (
   Status = gBS->CreateEventEx (
                   EVT_NOTIFY_SIGNAL,
                   TPL_NOTIFY,
-                  LibRtcVirtualNotifyEvent,
+                  VirtualNotifyEvent,
                   NULL,
                   &gEfiEventVirtualAddressChangeGuid,
                   &mRtcVirtualAddrChangeEvent
@@ -227,31 +252,3 @@ LibRtcInitialize (
 
   return Status;
 }
-
-
-/**
-  Fixup internal data so that EFI can be call in virtual mode.
-  Call the passed in Child Notify event and convert any pointers in
-  lib to virtual mode.
-
-  @param[in]    Event   The Event that is being processed
-  @param[in]    Context Event Context
-**/
-VOID
-EFIAPI
-LibRtcVirtualNotifyEvent (
-  IN EFI_EVENT        Event,
-  IN VOID             *Context
-  )
-{
-  //
-  // Only needed if you are going to support the OS calling RTC functions in virtual mode.
-  // You will need to call EfiConvertPointer (). To convert any stored physical addresses
-  // to virtual address. After the OS transistions to calling in virtual mode, all future
-  // runtime calls will be made in virtual mode.
-  //
-  EfiConvertPointer (0x0, (VOID**)&mRtcIscpDxeProtocol);
-}
-
-
-



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109552): https://edk2.groups.io/g/devel/message/109552
Mute This Topic: https://groups.io/mt/101914661/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 16/19] Armada7k8k/RealTimeClockLib: hide LibRtcVirtualNotifyEvent
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (14 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 15/19] Styx/RealTimeClockLib: " Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-12 14:32     ` Marcin Wojtas via groups.io
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 17/19] NXP/Pcf8563RealTimeClockLib: " Laszlo Ersek
                     ` (3 subsequent siblings)
  19 siblings, 1 reply; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Leif Lindholm, Marcin Wojtas

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.

Rename LibRtcVirtualNotifyEvent() to VirtualNotifyEvent(), and make it
static, in preparation for removing the LibRtcVirtualNotifyEvent()
declaration from the lib class header later. Also hoist the function
definition above the reference.

Build-tested only, with the following platforms:

- Platform/Marvell/Armada70x0Db/Armada70x0Db.dsc
- Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
- Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc
- Platform/SolidRun/Cn913xCEx7Eval/Cn913xCEx7Eval.dsc

("Platform/Marvell/Cn913xDb/Cn913xDbA.dsc" fails to build regardless:
"build" complains that
"Silicon/Marvell/OcteonTx/DeviceTree/T91/$(PLATFORM_NAME).inf" is missing,
and as far as I can see, not even the
"Silicon/Marvell/OcteonTx/DeviceTree" directory exists.)

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Marcin Wojtas <mw@semihalf.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c | 52 ++++++++++----------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c b/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c
index 49c9385d53d6..d538b030b111 100644
--- a/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c
+++ b/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c
@@ -205,6 +205,31 @@ LibSetWakeupTime (
   return EFI_SUCCESS;
 }
 
+/**
+  Fixup internal data so that EFI can be call in virtual mode.
+  Call the passed in Child Notify event and convert any pointers in
+  lib to virtual mode.
+
+  @param[in]    Event   The Event that is being processed
+  @param[in]    Context Event Context
+**/
+STATIC
+VOID
+EFIAPI
+VirtualNotifyEvent (
+  IN EFI_EVENT        Event,
+  IN VOID             *Context
+  )
+{
+  //
+  // Only needed if you are going to support the OS calling RTC functions in virtual mode.
+  // You will need to call EfiConvertPointer (). To convert any stored physical addresses
+  // to virtual address. After the OS transistions to calling in virtual mode, all future
+  // runtime calls will be made in virtual mode.
+  //
+  EfiConvertPointer (0x0, (VOID**)&mArmadaRtcBase);
+}
+
 /**
   This is the declaration of an EFI image entry point. This can be the entry point to an application
   written to this specification, an EFI boot service driver, or an EFI runtime driver.
@@ -285,7 +310,7 @@ LibRtcInitialize (
   Status = gBS->CreateEventEx (
                   EVT_NOTIFY_SIGNAL,
                   TPL_NOTIFY,
-                  LibRtcVirtualNotifyEvent,
+                  VirtualNotifyEvent,
                   NULL,
                   &gEfiEventVirtualAddressChangeGuid,
                   &mRtcVirtualAddrChangeEvent
@@ -304,28 +329,3 @@ ErrSetMem:
 
   return Status;
 }
-
-
-/**
-  Fixup internal data so that EFI can be call in virtual mode.
-  Call the passed in Child Notify event and convert any pointers in
-  lib to virtual mode.
-
-  @param[in]    Event   The Event that is being processed
-  @param[in]    Context Event Context
-**/
-VOID
-EFIAPI
-LibRtcVirtualNotifyEvent (
-  IN EFI_EVENT        Event,
-  IN VOID             *Context
-  )
-{
-  //
-  // Only needed if you are going to support the OS calling RTC functions in virtual mode.
-  // You will need to call EfiConvertPointer (). To convert any stored physical addresses
-  // to virtual address. After the OS transistions to calling in virtual mode, all future
-  // runtime calls will be made in virtual mode.
-  //
-  EfiConvertPointer (0x0, (VOID**)&mArmadaRtcBase);
-}



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109558): https://edk2.groups.io/g/devel/message/109558
Mute This Topic: https://groups.io/mt/101914670/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 17/19] NXP/Pcf8563RealTimeClockLib: hide LibRtcVirtualNotifyEvent
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (15 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 16/19] Armada7k8k/RealTimeClockLib: " Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 18/19] FT2000-4Pkg/RealTimeClockLib: " Laszlo Ersek
                     ` (2 subsequent siblings)
  19 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io
  Cc: Ard Biesheuvel, Leif Lindholm, Masami Hiramatsu,
	Meenakshi Aggarwal

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.

Rename LibRtcVirtualNotifyEvent() to VirtualNotifyEvent(), and make it
static, in preparation for removing the LibRtcVirtualNotifyEvent()
declaration from the lib class header later.

Build-tested only (with "DeveloperBox.dsc").

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
index b79ea89fea0f..ac68c0396776 100644
--- a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
+++ b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
@@ -339,9 +339,10 @@ I2cMasterRegistrationEvent (
   @param[in]    Event   The Event that is being processed
   @param[in]    Context Event Context
 **/
+STATIC
 VOID
 EFIAPI
-LibRtcVirtualNotifyEvent (
+VirtualNotifyEvent (
   IN EFI_EVENT        Event,
   IN VOID             *Context
   )
@@ -394,7 +395,7 @@ LibRtcInitialize (
   // Register for the virtual address change event
   //
   Status = gBS->CreateEventEx (EVT_NOTIFY_SIGNAL, TPL_NOTIFY,
-                  LibRtcVirtualNotifyEvent, NULL,
+                  VirtualNotifyEvent, NULL,
                   &gEfiEventVirtualAddressChangeGuid,
                   &mRtcVirtualAddrChangeEvent);
   ASSERT_EFI_ERROR (Status);



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109555): https://edk2.groups.io/g/devel/message/109555
Mute This Topic: https://groups.io/mt/101914667/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 18/19] FT2000-4Pkg/RealTimeClockLib: hide LibRtcVirtualNotifyEvent
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (16 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 17/19] NXP/Pcf8563RealTimeClockLib: " Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 19/19] Omap35xxPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent Laszlo Ersek
  2023-10-13 10:12   ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Ard Biesheuvel
  19 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Leif Lindholm, Ling Jia, Peng Xie, Yiqi Shu

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.

Rename LibRtcVirtualNotifyEvent() to VirtualNotifyEvent(), and make it
static, in preparation for removing the LibRtcVirtualNotifyEvent()
declaration from the lib class header later.

Build-tested only (with "DurianPkg.dsc").

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ling Jia <jialing@phytium.com.cn>
Cc: Peng Xie <xiepeng@phytium.com.cn>
Cc: Yiqi Shu <shuyiqi@phytium.com.cn>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/Phytium/FT2000-4Pkg/Library/RealTimeClockLib/RealTimeClockLib.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Silicon/Phytium/FT2000-4Pkg/Library/RealTimeClockLib/RealTimeClockLib.c b/Silicon/Phytium/FT2000-4Pkg/Library/RealTimeClockLib/RealTimeClockLib.c
index 1c88958e3bb7..5c3d0cdccff8 100644
--- a/Silicon/Phytium/FT2000-4Pkg/Library/RealTimeClockLib/RealTimeClockLib.c
+++ b/Silicon/Phytium/FT2000-4Pkg/Library/RealTimeClockLib/RealTimeClockLib.c
@@ -307,9 +307,10 @@ LibSetWakeupTime (
   @param[in]    Context Event Context
 
 **/
+STATIC
 VOID
 EFIAPI
-LibRtcVirtualNotifyEvent (
+VirtualNotifyEvent (
   IN EFI_EVENT        Event,
   IN VOID             *Context
   )
@@ -452,7 +453,7 @@ LibRtcInitialize (
   Status = gBS->CreateEventEx (
     EVT_NOTIFY_SIGNAL,
     TPL_NOTIFY,
-    LibRtcVirtualNotifyEvent,
+    VirtualNotifyEvent,
     NULL,
     &gEfiEventVirtualAddressChangeGuid,
     &mRtcVirtualAddrChangeEvent



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109557): https://edk2.groups.io/g/devel/message/109557
Mute This Topic: https://groups.io/mt/101914669/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-platforms PATCH 19/19] Omap35xxPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (17 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 18/19] FT2000-4Pkg/RealTimeClockLib: " Laszlo Ersek
@ 2023-10-12  9:09   ` Laszlo Ersek
  2023-10-13 10:12   ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Ard Biesheuvel
  19 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:09 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Ard Biesheuvel, Leif Lindholm

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, Omap35xxPkg/RealTimeClockLib *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.

Build-tested only (with "BeagleBoardPkg.dsc").

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/TexasInstruments/Omap35xxPkg/Library/RealTimeClockLib/RealTimeClockLib.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/Silicon/TexasInstruments/Omap35xxPkg/Library/RealTimeClockLib/RealTimeClockLib.c b/Silicon/TexasInstruments/Omap35xxPkg/Library/RealTimeClockLib/RealTimeClockLib.c
index ddde1868ac01..10920a13786b 100644
--- a/Silicon/TexasInstruments/Omap35xxPkg/Library/RealTimeClockLib/RealTimeClockLib.c
+++ b/Silicon/TexasInstruments/Omap35xxPkg/Library/RealTimeClockLib/RealTimeClockLib.c
@@ -271,21 +271,3 @@ LibRtcInitialize (
 
   return Status;
 }
-
-/**
-  Fixup internal data so that EFI can be call in virtual mode.
-  Call the passed in Child Notify event and convert any pointers in
-  lib to virtual mode.
-
-  @param[in]    Event   The Event that is being processed
-  @param[in]    Context Event Context
-**/
-VOID
-EFIAPI
-LibRtcVirtualNotifyEvent (
-  IN EFI_EVENT        Event,
-  IN VOID             *Context
-  )
-{
-  return;
-}


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109554): https://edk2.groups.io/g/devel/message/109554
Mute This Topic: https://groups.io/mt/101914666/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-non-osi PATCH 0/1] Hisilicon: rename OemMiscLib class dependencies to HisiOemMiscLib
  2023-10-12  9:08 [edk2-devel] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
@ 2023-10-12  9:10 ` Laszlo Ersek
  2023-10-12  9:10   ` [edk2-devel] [edk2-non-osi PATCH 1/1] " Laszlo Ersek
  2023-10-12  9:10 ` [edk2-devel] [PATCH 0/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
  2 siblings, 1 reply; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:10 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Ard Biesheuvel, Leif Lindholm, Wenyi Xie

https://bugzilla.tianocore.org/show_bug.cgi?id=4564

This patch accompanies "[edk2-platforms PATCH 04/19] Hisilicon: rename
OemMiscLib class to HisiOemMiscLib".

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Wenyi Xie <xiewenyi2@huawei.com>

Thanks
Laszlo

Laszlo Ersek (1):
  Hisilicon: rename OemMiscLib class dependencies to HisiOemMiscLib

 Silicon/Hisilicon/Hi1610/Library/Hi1610Serdes/Hi1610SerdesLib.inf                      | 2 +-
 Silicon/Hisilicon/Hi1610/Library/PlatformSysCtrlLibHi1610/PlatformSysCtrlLibHi1610.inf | 2 +-
 Silicon/Hisilicon/Hi1616/Library/Hi1616Serdes/Hi1616SerdesLib.inf                      | 2 +-
 Silicon/Hisilicon/Hi1616/Library/PlatformSysCtrlLibHi1616/PlatformSysCtrlLibHi1616.inf | 2 +-
 Silicon/Hisilicon/Hi1620/Library/Hi1620Serdes/Hi1620SerdesLib.inf                      | 2 +-
 Silicon/Hisilicon/Hi1620/Library/PlatformSysCtrlLibHi1620/PlatformSysCtrlLibHi1620.inf | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)


base-commit: 4b86269c9a31d3f0b25abea7f46c01839ca05a4c


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109561): https://edk2.groups.io/g/devel/message/109561
Mute This Topic: https://groups.io/mt/101914673/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [edk2-devel] [edk2-non-osi PATCH 1/1] Hisilicon: rename OemMiscLib class dependencies to HisiOemMiscLib
  2023-10-12  9:10 ` [edk2-devel] [edk2-non-osi PATCH 0/1] Hisilicon: rename OemMiscLib class dependencies to HisiOemMiscLib Laszlo Ersek
@ 2023-10-12  9:10   ` Laszlo Ersek
  0 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:10 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Ard Biesheuvel, Leif Lindholm, Wenyi Xie

Edk2 commit [1] introduced the <OemMiscLib.h> library class header to
ArmPkg; commit [2] introduced the first OemMiscLib instance to ArmPkg; and
commit [3] introduced (retroactively) the library class itself to ArmPkg.

Alas, when all these edk2 commits were made, edk2-platforms already had a
(Hisilicon-specific) library class called OemMiscLib -- and many of the
Hisilicon modules would use both "HisiPkg.dec" and "ArmPkg.dec". Therefore
the edk2 OemMiscLib brought about a library class conflict, breaking both
edk2-platforms and edk2-non-osi content.

In edk2-platforms, we're renaming the original OemMiscLib class to
HisiOemMiscLib; in edk2-non-osi, update the lib class references in a
number of INF files now. Keep those [LibraryClasses] sections sorted that
were sorted to begin with.

This patch is necessary for building the D03, D05, D06, HiKey, and
HiKey960 platforms in edk2-platforms.

[1] 2c7c64fc04a0 ("ArmPkg: Add Library/OemMiscLib.h", 2021-02-08)

[2] 0e51d7e445e0 ("ArmPkg: Add Universal/Smbios/OemMiscLibNull",
    2021-02-08)

[3] d03f71dd8be6 ("ArmPkg: Add missing library headers to ArmPkg.dec",
    2021-04-28)

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Wenyi Xie <xiewenyi2@huawei.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 Silicon/Hisilicon/Hi1610/Library/Hi1610Serdes/Hi1610SerdesLib.inf                      | 2 +-
 Silicon/Hisilicon/Hi1610/Library/PlatformSysCtrlLibHi1610/PlatformSysCtrlLibHi1610.inf | 2 +-
 Silicon/Hisilicon/Hi1616/Library/Hi1616Serdes/Hi1616SerdesLib.inf                      | 2 +-
 Silicon/Hisilicon/Hi1616/Library/PlatformSysCtrlLibHi1616/PlatformSysCtrlLibHi1616.inf | 2 +-
 Silicon/Hisilicon/Hi1620/Library/Hi1620Serdes/Hi1620SerdesLib.inf                      | 2 +-
 Silicon/Hisilicon/Hi1620/Library/PlatformSysCtrlLibHi1620/PlatformSysCtrlLibHi1620.inf | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Silicon/Hisilicon/Hi1610/Library/Hi1610Serdes/Hi1610SerdesLib.inf b/Silicon/Hisilicon/Hi1610/Library/Hi1610Serdes/Hi1610SerdesLib.inf
index 10ff0db87dd0..a3b1d9d32594 100644
--- a/Silicon/Hisilicon/Hi1610/Library/Hi1610Serdes/Hi1610SerdesLib.inf
+++ b/Silicon/Hisilicon/Hi1610/Library/Hi1610Serdes/Hi1610SerdesLib.inf
@@ -38,7 +38,7 @@ [LibraryClasses]
   BaseMemoryLib
   TimerLib
 
-  OemMiscLib
+  HisiOemMiscLib
 
 [BuildOptions]
 
diff --git a/Silicon/Hisilicon/Hi1610/Library/PlatformSysCtrlLibHi1610/PlatformSysCtrlLibHi1610.inf b/Silicon/Hisilicon/Hi1610/Library/PlatformSysCtrlLibHi1610/PlatformSysCtrlLibHi1610.inf
index fbf16d62941c..28c3cbfb2d31 100644
--- a/Silicon/Hisilicon/Hi1610/Library/PlatformSysCtrlLibHi1610/PlatformSysCtrlLibHi1610.inf
+++ b/Silicon/Hisilicon/Hi1610/Library/PlatformSysCtrlLibHi1610/PlatformSysCtrlLibHi1610.inf
@@ -39,7 +39,7 @@ [Packages]
 [LibraryClasses]
   ArmLib
   OemAddressMapLib
-  OemMiscLib
+  HisiOemMiscLib
   IoLib
 
 [FixedPcd]
diff --git a/Silicon/Hisilicon/Hi1616/Library/Hi1616Serdes/Hi1616SerdesLib.inf b/Silicon/Hisilicon/Hi1616/Library/Hi1616Serdes/Hi1616SerdesLib.inf
index 67d4a2b4fb30..c5d825a6c158 100644
--- a/Silicon/Hisilicon/Hi1616/Library/Hi1616Serdes/Hi1616SerdesLib.inf
+++ b/Silicon/Hisilicon/Hi1616/Library/Hi1616Serdes/Hi1616SerdesLib.inf
@@ -38,7 +38,7 @@ [LibraryClasses]
   TimerLib
   IoLib
 
-  OemMiscLib
+  HisiOemMiscLib
 
 [BuildOptions]
 
diff --git a/Silicon/Hisilicon/Hi1616/Library/PlatformSysCtrlLibHi1616/PlatformSysCtrlLibHi1616.inf b/Silicon/Hisilicon/Hi1616/Library/PlatformSysCtrlLibHi1616/PlatformSysCtrlLibHi1616.inf
index 0343f5949b26..53659034983c 100644
--- a/Silicon/Hisilicon/Hi1616/Library/PlatformSysCtrlLibHi1616/PlatformSysCtrlLibHi1616.inf
+++ b/Silicon/Hisilicon/Hi1616/Library/PlatformSysCtrlLibHi1616/PlatformSysCtrlLibHi1616.inf
@@ -38,9 +38,9 @@ [Packages]
 
 [LibraryClasses]
   ArmLib
+  HisiOemMiscLib
   IoLib
   OemAddressMapLib
-  OemMiscLib
 
 [FixedPcd]
   gHisiTokenSpaceGuid.PcdAlgSmmuBaseAddress
diff --git a/Silicon/Hisilicon/Hi1620/Library/Hi1620Serdes/Hi1620SerdesLib.inf b/Silicon/Hisilicon/Hi1620/Library/Hi1620Serdes/Hi1620SerdesLib.inf
index 60de63ffca04..d78d887a793f 100644
--- a/Silicon/Hisilicon/Hi1620/Library/Hi1620Serdes/Hi1620SerdesLib.inf
+++ b/Silicon/Hisilicon/Hi1620/Library/Hi1620Serdes/Hi1620SerdesLib.inf
@@ -33,8 +33,8 @@ [LibraryClasses]
   BaseLib
   BaseMemoryLib
   DebugLib
+  HisiOemMiscLib
   IoLib
-  OemMiscLib
   PlatformSysCtrlLib
   TimerLib
 
diff --git a/Silicon/Hisilicon/Hi1620/Library/PlatformSysCtrlLibHi1620/PlatformSysCtrlLibHi1620.inf b/Silicon/Hisilicon/Hi1620/Library/PlatformSysCtrlLibHi1620/PlatformSysCtrlLibHi1620.inf
index 468fae9d2134..a6c6efa92edd 100644
--- a/Silicon/Hisilicon/Hi1620/Library/PlatformSysCtrlLibHi1620/PlatformSysCtrlLibHi1620.inf
+++ b/Silicon/Hisilicon/Hi1620/Library/PlatformSysCtrlLibHi1620/PlatformSysCtrlLibHi1620.inf
@@ -33,10 +33,10 @@ [Packages]
 
 [LibraryClasses]
   ArmLib
+  HisiOemMiscLib
   IoLib
   LpcLib
   OemAddressMapLib
-  OemMiscLib
   PcdLib
 
 [FixedPcd]


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109560): https://edk2.groups.io/g/devel/message/109560
Mute This Topic: https://groups.io/mt/101914672/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [PATCH 0/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class
  2023-10-12  9:08 [edk2-devel] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
  2023-10-12  9:10 ` [edk2-devel] [edk2-non-osi PATCH 0/1] Hisilicon: rename OemMiscLib class dependencies to HisiOemMiscLib Laszlo Ersek
@ 2023-10-12  9:10 ` Laszlo Ersek
  2023-10-12  9:10   ` [edk2-devel] [PATCH 1/5] PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename LibRtcVirtualNotifyEvent Laszlo Ersek
                     ` (5 more replies)
  2 siblings, 6 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:10 UTC (permalink / raw)
  To: edk2-devel-groups-io
  Cc: Abner Chang, Ard Biesheuvel, Daniel Schaefer, Leif Lindholm,
	Ray Ni

https://bugzilla.tianocore.org/show_bug.cgi?id=4564

The RealTimeClockLib class header in edk2's EmbeddedPkg mistakenly
declares a function called LibRtcVirtualNotifyEvent(). No component ever
calls this function across module boundaries; all RealTimeClockLib
instances in edk2 and edk2-platforms are supposed to register -- and do
register -- their SetVirtualAddressMap() notification functions.

After the edk2-platforms and edk2-non-osi changes, we can repeat the
procedure form the edk2-platforms series in edk2. In those
RealTimeClockLib instances that define LibRtcVirtualNotifyEvent(),
demonstrate that either (a) the usage is module-internal, or (b) there
is no usage. In case (a), rename LibRtcVirtualNotifyEvent() to
VirtualNotifyEvent(), and make it static. In case (b), remove the
function definition.

There is a superficial name match in
PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe. Note that that module is a
*driver*, not a library instance; what's more,
PcatRealTimeClockRuntimeDxe does not depend on "EmbeddedPkg.dec" at all.
Treat that module too as case (a), right at the front of the series.

Finally, drop the LibRtcVirtualNotifyEvent() API declaration.

Cc: Abner Chang <abner.chang@amd.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Daniel Schaefer <git@danielschaefer.me>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ray Ni <ray.ni@intel.com>

Thanks
Laszlo

Laszlo Ersek (5):
  PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename
    LibRtcVirtualNotifyEvent
  ArmPlatformPkg/PL031RealTimeClockLib: hide LibRtcVirtualNotifyEvent
  EmbeddedPkg/TemplateRealTimeClockLib: drop LibRtcVirtualNotifyEvent
  EmbeddedPkg/VirtualRealTimeClockLib: drop LibRtcVirtualNotifyEvent
  EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib
    class

 ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c  |  5 ++--
 EmbeddedPkg/Include/Library/RealTimeClockLib.h                        | 15 ------------
 EmbeddedPkg/Library/TemplateRealTimeClockLib/RealTimeClockLib.c       | 24 --------------------
 EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c | 18 ---------------
 PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c               |  5 ++--
 5 files changed, 6 insertions(+), 61 deletions(-)


base-commit: 95c9f470ca6eab23bfd016bd438f932d7263d395


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109563): https://edk2.groups.io/g/devel/message/109563
Mute This Topic: https://groups.io/mt/101914677/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [edk2-devel] [PATCH 1/5] PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename LibRtcVirtualNotifyEvent
  2023-10-12  9:10 ` [edk2-devel] [PATCH 0/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
@ 2023-10-12  9:10   ` Laszlo Ersek
  2023-10-12 12:33     ` Sami Mujawar
  2023-10-12  9:10   ` [edk2-devel] [PATCH 2/5] ArmPlatformPkg/PL031RealTimeClockLib: hide LibRtcVirtualNotifyEvent Laszlo Ersek
                     ` (4 subsequent siblings)
  5 siblings, 1 reply; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:10 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Ray Ni

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 <ray.ni@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
index b600df487952..ca0cad9b0198 100644
--- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
+++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
@@ -122,9 +122,10 @@ PcRtcEfiSetWakeupTime (
   @param[in]    Event   The Event that is being processed
   @param[in]    Context Event Context
 **/
+STATIC
 VOID
 EFIAPI
-LibRtcVirtualNotifyEvent (
+VirtualNotifyEvent (
   IN EFI_EVENT  Event,
   IN VOID       *Context
   )
@@ -220,7 +221,7 @@ InitializePcRtc (
     Status = gBS->CreateEventEx (
                     EVT_NOTIFY_SIGNAL,
                     TPL_NOTIFY,
-                    LibRtcVirtualNotifyEvent,
+                    VirtualNotifyEvent,
                     NULL,
                     &gEfiEventVirtualAddressChangeGuid,
                     &mVirtualAddrChangeEvent



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109562): https://edk2.groups.io/g/devel/message/109562
Mute This Topic: https://groups.io/mt/101914676/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [PATCH 2/5] ArmPlatformPkg/PL031RealTimeClockLib: hide LibRtcVirtualNotifyEvent
  2023-10-12  9:10 ` [edk2-devel] [PATCH 0/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
  2023-10-12  9:10   ` [edk2-devel] [PATCH 1/5] PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename LibRtcVirtualNotifyEvent Laszlo Ersek
@ 2023-10-12  9:10   ` Laszlo Ersek
  2023-10-12 12:31     ` Sami Mujawar
  2023-10-12  9:10   ` [edk2-devel] [PATCH 3/5] EmbeddedPkg/TemplateRealTimeClockLib: drop LibRtcVirtualNotifyEvent Laszlo Ersek
                     ` (3 subsequent siblings)
  5 siblings, 1 reply; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:10 UTC (permalink / raw)
  To: edk2-devel-groups-io; +Cc: Ard Biesheuvel, Leif Lindholm

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.

Rename LibRtcVirtualNotifyEvent() to VirtualNotifyEvent(), and make it
static, in preparation for removing the LibRtcVirtualNotifyEvent()
declaration from the lib class header later.

Build- and boot-tested with ArmVirtQemu.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
index ec7feaeedcf8..9e852696d2fd 100644
--- a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
+++ b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
@@ -274,9 +274,10 @@ LibSetWakeupTime (
   @param[in]    Event   The Event that is being processed
   @param[in]    Context Event Context
 **/
+STATIC
 VOID
 EFIAPI
-LibRtcVirtualNotifyEvent (
+VirtualNotifyEvent (
   IN EFI_EVENT  Event,
   IN VOID       *Context
   )
@@ -346,7 +347,7 @@ LibRtcInitialize (
   Status = gBS->CreateEventEx (
                   EVT_NOTIFY_SIGNAL,
                   TPL_NOTIFY,
-                  LibRtcVirtualNotifyEvent,
+                  VirtualNotifyEvent,
                   NULL,
                   &gEfiEventVirtualAddressChangeGuid,
                   &mRtcVirtualAddrChangeEvent



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109564): https://edk2.groups.io/g/devel/message/109564
Mute This Topic: https://groups.io/mt/101914679/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [PATCH 3/5] EmbeddedPkg/TemplateRealTimeClockLib: drop LibRtcVirtualNotifyEvent
  2023-10-12  9:10 ` [edk2-devel] [PATCH 0/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
  2023-10-12  9:10   ` [edk2-devel] [PATCH 1/5] PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename LibRtcVirtualNotifyEvent Laszlo Ersek
  2023-10-12  9:10   ` [edk2-devel] [PATCH 2/5] ArmPlatformPkg/PL031RealTimeClockLib: hide LibRtcVirtualNotifyEvent Laszlo Ersek
@ 2023-10-12  9:10   ` Laszlo Ersek
  2023-10-12  9:10   ` [edk2-devel] [PATCH 4/5] EmbeddedPkg/VirtualRealTimeClockLib: " Laszlo Ersek
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:10 UTC (permalink / raw)
  To: edk2-devel-groups-io
  Cc: Abner Chang, Ard Biesheuvel, Daniel Schaefer, Leif Lindholm

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, TemplateRealTimeClockLib *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.

Build-tested only (with "EmbeddedPkg.dsc").

Cc: Abner Chang <abner.chang@amd.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Daniel Schaefer <git@danielschaefer.me>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 EmbeddedPkg/Library/TemplateRealTimeClockLib/RealTimeClockLib.c | 24 --------------------
 1 file changed, 24 deletions(-)

diff --git a/EmbeddedPkg/Library/TemplateRealTimeClockLib/RealTimeClockLib.c b/EmbeddedPkg/Library/TemplateRealTimeClockLib/RealTimeClockLib.c
index cb5025914e3f..4e0f52ef7bce 100644
--- a/EmbeddedPkg/Library/TemplateRealTimeClockLib/RealTimeClockLib.c
+++ b/EmbeddedPkg/Library/TemplateRealTimeClockLib/RealTimeClockLib.c
@@ -133,27 +133,3 @@ LibRtcInitialize (
   //
   return EFI_SUCCESS;
 }
-
-/**
-  Fixup internal data so that EFI can be call in virtual mode.
-  Call the passed in Child Notify event and convert any pointers in
-  lib to virtual mode.
-
-  @param[in]    Event   The Event that is being processed
-  @param[in]    Context Event Context
-**/
-VOID
-EFIAPI
-LibRtcVirtualNotifyEvent (
-  IN EFI_EVENT  Event,
-  IN VOID       *Context
-  )
-{
-  //
-  // Only needed if you are going to support the OS calling RTC functions in virtual mode.
-  // You will need to call EfiConvertPointer (). To convert any stored physical addresses
-  // to virtual address. After the OS transitions to calling in virtual mode, all future
-  // runtime calls will be made in virtual mode.
-  //
-  return;
-}



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109565): https://edk2.groups.io/g/devel/message/109565
Mute This Topic: https://groups.io/mt/101914680/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [PATCH 4/5] EmbeddedPkg/VirtualRealTimeClockLib: drop LibRtcVirtualNotifyEvent
  2023-10-12  9:10 ` [edk2-devel] [PATCH 0/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
                     ` (2 preceding siblings ...)
  2023-10-12  9:10   ` [edk2-devel] [PATCH 3/5] EmbeddedPkg/TemplateRealTimeClockLib: drop LibRtcVirtualNotifyEvent Laszlo Ersek
@ 2023-10-12  9:10   ` Laszlo Ersek
  2023-10-12  9:10   ` [edk2-devel] [PATCH 5/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
  2023-10-18 13:42   ` [edk2-devel] [PATCH 0/5] " Laszlo Ersek
  5 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:10 UTC (permalink / raw)
  To: edk2-devel-groups-io
  Cc: Abner Chang, Ard Biesheuvel, Daniel Schaefer, Leif Lindholm

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, VirtualRealTimeClockLib *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.

Build-tested only (with "RiscVVirtQemu.dsc").

Cc: Abner Chang <abner.chang@amd.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Daniel Schaefer <git@danielschaefer.me>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c b/EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c
index 685e590980ec..ce288d719fba 100644
--- a/EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c
+++ b/EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c
@@ -402,21 +402,3 @@ LibRtcInitialize (
 {
   return EFI_SUCCESS;
 }
-
-/**
-   Fixup internal data so that EFI can be call in virtual mode.
-   Call the passed in Child Notify event and convert any pointers in
-   lib to virtual mode.
-
-   @param[in]    Event   The Event that is being processed
-   @param[in]    Context Event Context
-**/
-VOID
-EFIAPI
-LibRtcVirtualNotifyEvent (
-  IN EFI_EVENT  Event,
-  IN VOID       *Context
-  )
-{
-  return;
-}



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109566): https://edk2.groups.io/g/devel/message/109566
Mute This Topic: https://groups.io/mt/101914681/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [edk2-devel] [PATCH 5/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class
  2023-10-12  9:10 ` [edk2-devel] [PATCH 0/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
                     ` (3 preceding siblings ...)
  2023-10-12  9:10   ` [edk2-devel] [PATCH 4/5] EmbeddedPkg/VirtualRealTimeClockLib: " Laszlo Ersek
@ 2023-10-12  9:10   ` Laszlo Ersek
  2023-10-18 13:42   ` [edk2-devel] [PATCH 0/5] " Laszlo Ersek
  5 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-12  9:10 UTC (permalink / raw)
  To: edk2-devel-groups-io
  Cc: Abner Chang, Ard Biesheuvel, Daniel Schaefer, Leif Lindholm

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.

At this point, the word "LibRtcVirtualNotifyEvent" no longer occurs in any
of edk2, edk2-platforms, even edk2-non-osi, except the library class
header proper. Remove the LibRtcVirtualNotifyEvent() function declaration.

Build-tested only (with "EmbeddedPkg.dsc").

Cc: Abner Chang <abner.chang@amd.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Daniel Schaefer <git@danielschaefer.me>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 EmbeddedPkg/Include/Library/RealTimeClockLib.h | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/EmbeddedPkg/Include/Library/RealTimeClockLib.h b/EmbeddedPkg/Include/Library/RealTimeClockLib.h
index ff45e26d6cfc..b2ff3f233bea 100644
--- a/EmbeddedPkg/Include/Library/RealTimeClockLib.h
+++ b/EmbeddedPkg/Include/Library/RealTimeClockLib.h
@@ -105,19 +105,4 @@ LibRtcInitialize (
   IN EFI_SYSTEM_TABLE  *SystemTable
   );
 
-/**
-  Fixup internal data so that EFI can be call in virtual mode.
-  Call the passed in Child Notify event and convert any pointers in
-  lib to virtual mode.
-
-  @param[in]    Event   The Event that is being processed
-  @param[in]    Context Event Context
-**/
-VOID
-EFIAPI
-LibRtcVirtualNotifyEvent (
-  IN EFI_EVENT  Event,
-  IN VOID       *Context
-  );
-
 #endif


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109567): https://edk2.groups.io/g/devel/message/109567
Mute This Topic: https://groups.io/mt/101914682/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [edk2-platforms PATCH 14/19] LoongArchQemuPkg/LsRealTimeClockLib: hide LibRtcVirtualNotifyEvent
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 14/19] LoongArchQemuPkg/LsRealTimeClockLib: " Laszlo Ersek
@ 2023-10-12 12:14     ` xianglai
  2023-10-12 12:25       ` Chao Li
  0 siblings, 1 reply; 46+ messages in thread
From: xianglai @ 2023-10-12 12:14 UTC (permalink / raw)
  To: devel, lersek; +Cc: Bibo Mao, Chao Li

Hi Laszlo Ersek:
> 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.
>
> Rename LibRtcVirtualNotifyEvent() to VirtualNotifyEvent(), and make it
> static, in preparation for removing the LibRtcVirtualNotifyEvent()
> declaration from the lib class header later.
>
> Build-tested only (with "Loongson.dsc").
>
> Cc: Bibo Mao <maobibo@loongson.cn>
> Cc: Chao Li <lichao@loongson.cn>
> Cc: Xianglai li <lixianglai@loongson.cn>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>   Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c b/Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c
> index 4315c2074d2f..eeac011a9400 100644
> --- a/Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c
> +++ b/Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c
> @@ -180,9 +180,10 @@ LibSetWakeupTime (
>     @param[in]    Event   The Event that is being processed
>     @param[in]    Context Event Context
>   **/
> +STATIC
>   VOID
>   EFIAPI
> -LibRtcVirtualNotifyEvent (
> +VirtualNotifyEvent (
>     IN EFI_EVENT        Event,
>     IN VOID             *Context
>     )
> @@ -325,7 +326,7 @@ LibRtcInitialize (
>     Status = gBS->CreateEventEx (
>                     EVT_NOTIFY_SIGNAL,
>                     TPL_NOTIFY,
> -                  LibRtcVirtualNotifyEvent,
> +                  VirtualNotifyEvent,
>                     NULL,
>                     &gEfiEventVirtualAddressChangeGuid,
>                     &mRtcVirtualAddrChangeEvent
>
This patch was compiled and tested on loongson without problems, and 
modification is agreed.

Thanks,

xianglai.


>
> 
>
>



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109569): https://edk2.groups.io/g/devel/message/109569
Mute This Topic: https://groups.io/mt/101914663/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [edk2-platforms PATCH 14/19] LoongArchQemuPkg/LsRealTimeClockLib: hide LibRtcVirtualNotifyEvent
  2023-10-12 12:14     ` xianglai
@ 2023-10-12 12:25       ` Chao Li
  0 siblings, 0 replies; 46+ messages in thread
From: Chao Li @ 2023-10-12 12:25 UTC (permalink / raw)
  To: devel, lixianglai, lersek; +Cc: Bibo Mao

[-- Attachment #1: Type: text/plain, Size: 2973 bytes --]

Hi Laszlo,

This patch is look good to me. Thanks.

Acked-by: Chao Li <lichao@loongson.cn>


Thanks,
Chao
在 2023/10/12 20:14, xianglai 写道:
> Hi Laszlo Ersek:
>> 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.
>>
>> Rename LibRtcVirtualNotifyEvent() to VirtualNotifyEvent(), and make it
>> static, in preparation for removing the LibRtcVirtualNotifyEvent()
>> declaration from the lib class header later.
>>
>> Build-tested only (with "Loongson.dsc").
>>
>> Cc: Bibo Mao <maobibo@loongson.cn>
>> Cc: Chao Li <lichao@loongson.cn>
>> Cc: Xianglai li <lixianglai@loongson.cn>
>> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
>> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
>> ---
>> Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c 
>> | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git 
>> a/Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c 
>> b/Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c 
>>
>> index 4315c2074d2f..eeac011a9400 100644
>> --- 
>> a/Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c
>> +++ 
>> b/Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c
>> @@ -180,9 +180,10 @@ LibSetWakeupTime (
>>     @param[in]    Event   The Event that is being processed
>>     @param[in]    Context Event Context
>>   **/
>> +STATIC
>>   VOID
>>   EFIAPI
>> -LibRtcVirtualNotifyEvent (
>> +VirtualNotifyEvent (
>>     IN EFI_EVENT        Event,
>>     IN VOID             *Context
>>     )
>> @@ -325,7 +326,7 @@ LibRtcInitialize (
>>     Status = gBS->CreateEventEx (
>>                     EVT_NOTIFY_SIGNAL,
>>                     TPL_NOTIFY,
>> -                  LibRtcVirtualNotifyEvent,
>> +                  VirtualNotifyEvent,
>>                     NULL,
>>                     &gEfiEventVirtualAddressChangeGuid,
>>                     &mRtcVirtualAddrChangeEvent
>>
> This patch was compiled and tested on loongson without problems, and 
> modification is agreed.
>
> Thanks,
>
> xianglai.
>
>
>>
>>
>>
>>
>
>
>
> 
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109570): https://edk2.groups.io/g/devel/message/109570
Mute This Topic: https://groups.io/mt/101914663/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 5618 bytes --]

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [PATCH 2/5] ArmPlatformPkg/PL031RealTimeClockLib: hide LibRtcVirtualNotifyEvent
  2023-10-12  9:10   ` [edk2-devel] [PATCH 2/5] ArmPlatformPkg/PL031RealTimeClockLib: hide LibRtcVirtualNotifyEvent Laszlo Ersek
@ 2023-10-12 12:31     ` Sami Mujawar
  0 siblings, 0 replies; 46+ messages in thread
From: Sami Mujawar @ 2023-10-12 12:31 UTC (permalink / raw)
  To: devel@edk2.groups.io, lersek@redhat.com; +Cc: Ard Biesheuvel, Leif Lindholm, nd

Hi Laszlo,

Thank you for this patch. 
These changes look good to me.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

On 12/10/2023, 10:27, "devel@edk2.groups.io <mailto:devel@edk2.groups.io> on behalf of Laszlo Ersek via groups.io" <devel@edk2.groups.io <mailto:devel@edk2.groups.io> on behalf of lersek=redhat.com@groups.io <mailto:redhat.com@groups.io>> wrote:


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.


Rename LibRtcVirtualNotifyEvent() to VirtualNotifyEvent(), and make it
static, in preparation for removing the LibRtcVirtualNotifyEvent()
declaration from the lib class header later.


Build- and boot-tested with ArmVirtQemu.


Cc: Ard Biesheuvel <ardb+tianocore@kernel.org <mailto:ardb+tianocore@kernel.org>>
Cc: Leif Lindholm <quic_llindhol@quicinc.com <mailto:quic_llindhol@quicinc.com>>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564 <https://bugzilla.tianocore.org/show_bug.cgi?id=4564>
Signed-off-by: Laszlo Ersek <lersek@redhat.com <mailto:lersek@redhat.com>>
---
ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)


diff --git a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
index ec7feaeedcf8..9e852696d2fd 100644
--- a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
+++ b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
@@ -274,9 +274,10 @@ LibSetWakeupTime (
@param[in] Event The Event that is being processed
@param[in] Context Event Context
**/
+STATIC
VOID
EFIAPI
-LibRtcVirtualNotifyEvent (
+VirtualNotifyEvent (
IN EFI_EVENT Event,
IN VOID *Context
)
@@ -346,7 +347,7 @@ LibRtcInitialize (
Status = gBS->CreateEventEx (
EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
- LibRtcVirtualNotifyEvent,
+ VirtualNotifyEvent,
NULL,
&gEfiEventVirtualAddressChangeGuid,
&mRtcVirtualAddrChangeEvent
















-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109572): https://edk2.groups.io/g/devel/message/109572
Mute This Topic: https://groups.io/mt/101914679/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [PATCH 1/5] PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename LibRtcVirtualNotifyEvent
  2023-10-12  9:10   ` [edk2-devel] [PATCH 1/5] PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename LibRtcVirtualNotifyEvent Laszlo Ersek
@ 2023-10-12 12:33     ` Sami Mujawar
  2023-10-18 13:42       ` Laszlo Ersek
  0 siblings, 1 reply; 46+ messages in thread
From: Sami Mujawar @ 2023-10-12 12:33 UTC (permalink / raw)
  To: devel@edk2.groups.io, lersek@redhat.com; +Cc: Ray Ni, nd

Hi Laszlo,

Thank you for this patch. 
These changes look good to me.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Tested by booting a Linux guest using Kvmtool guest firmware (ArmVirtPkg/ArmVirtKvmTool.dsc) for AArch64.
Tested-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

On 12/10/2023, 10:25, "devel@edk2.groups.io <mailto:devel@edk2.groups.io> on behalf of Laszlo Ersek via groups.io" <devel@edk2.groups.io <mailto:devel@edk2.groups.io> on behalf of lersek=redhat.com@groups.io <mailto:redhat.com@groups.io>> wrote:


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 <ray.ni@intel.com <mailto:ray.ni@intel.com>>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564 <https://bugzilla.tianocore.org/show_bug.cgi?id=4564>
Signed-off-by: Laszlo Ersek <lersek@redhat.com <mailto:lersek@redhat.com>>
---
PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)


diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
index b600df487952..ca0cad9b0198 100644
--- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
+++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
@@ -122,9 +122,10 @@ PcRtcEfiSetWakeupTime (
@param[in] Event The Event that is being processed
@param[in] Context Event Context
**/
+STATIC
VOID
EFIAPI
-LibRtcVirtualNotifyEvent (
+VirtualNotifyEvent (
IN EFI_EVENT Event,
IN VOID *Context
)
@@ -220,7 +221,7 @@ InitializePcRtc (
Status = gBS->CreateEventEx (
EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
- LibRtcVirtualNotifyEvent,
+ VirtualNotifyEvent,
NULL,
&gEfiEventVirtualAddressChangeGuid,
&mVirtualAddrChangeEvent
















-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109573): https://edk2.groups.io/g/devel/message/109573
Mute This Topic: https://groups.io/mt/101914676/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [edk2-platforms PATCH 16/19] Armada7k8k/RealTimeClockLib: hide LibRtcVirtualNotifyEvent
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 16/19] Armada7k8k/RealTimeClockLib: " Laszlo Ersek
@ 2023-10-12 14:32     ` Marcin Wojtas via groups.io
  0 siblings, 0 replies; 46+ messages in thread
From: Marcin Wojtas via groups.io @ 2023-10-12 14:32 UTC (permalink / raw)
  To: Laszlo Ersek; +Cc: edk2-devel-groups-io, Leif Lindholm

Hi,

czw., 12 paź 2023 o 11:10 Laszlo Ersek <lersek@redhat.com> napisał(a):
>
> 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.
>
> Rename LibRtcVirtualNotifyEvent() to VirtualNotifyEvent(), and make it
> static, in preparation for removing the LibRtcVirtualNotifyEvent()
> declaration from the lib class header later. Also hoist the function
> definition above the reference.
>
> Build-tested only, with the following platforms:
>
> - Platform/Marvell/Armada70x0Db/Armada70x0Db.dsc
> - Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> - Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc
> - Platform/SolidRun/Cn913xCEx7Eval/Cn913xCEx7Eval.dsc
>
> ("Platform/Marvell/Cn913xDb/Cn913xDbA.dsc" fails to build regardless:
> "build" complains that
> "Silicon/Marvell/OcteonTx/DeviceTree/T91/$(PLATFORM_NAME).inf" is missing,
> and as far as I can see, not even the
> "Silicon/Marvell/OcteonTx/DeviceTree" directory exists.)
>
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Marcin Wojtas <mw@semihalf.com>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>  Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c | 52 ++++++++++----------
>  1 file changed, 26 insertions(+), 26 deletions(-)
>
> diff --git a/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c b/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c
> index 49c9385d53d6..d538b030b111 100644
> --- a/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c
> +++ b/Silicon/Marvell/Armada7k8k/Library/RealTimeClockLib/RealTimeClockLib.c
> @@ -205,6 +205,31 @@ LibSetWakeupTime (
>    return EFI_SUCCESS;
>  }
>
> +/**
> +  Fixup internal data so that EFI can be call in virtual mode.
> +  Call the passed in Child Notify event and convert any pointers in
> +  lib to virtual mode.
> +
> +  @param[in]    Event   The Event that is being processed
> +  @param[in]    Context Event Context
> +**/
> +STATIC
> +VOID
> +EFIAPI
> +VirtualNotifyEvent (
> +  IN EFI_EVENT        Event,
> +  IN VOID             *Context
> +  )
> +{
> +  //
> +  // Only needed if you are going to support the OS calling RTC functions in virtual mode.
> +  // You will need to call EfiConvertPointer (). To convert any stored physical addresses
> +  // to virtual address. After the OS transistions to calling in virtual mode, all future
> +  // runtime calls will be made in virtual mode.
> +  //
> +  EfiConvertPointer (0x0, (VOID**)&mArmadaRtcBase);
> +}
> +
>  /**
>    This is the declaration of an EFI image entry point. This can be the entry point to an application
>    written to this specification, an EFI boot service driver, or an EFI runtime driver.
> @@ -285,7 +310,7 @@ LibRtcInitialize (
>    Status = gBS->CreateEventEx (
>                    EVT_NOTIFY_SIGNAL,
>                    TPL_NOTIFY,
> -                  LibRtcVirtualNotifyEvent,
> +                  VirtualNotifyEvent,
>                    NULL,
>                    &gEfiEventVirtualAddressChangeGuid,
>                    &mRtcVirtualAddrChangeEvent
> @@ -304,28 +329,3 @@ ErrSetMem:
>
>    return Status;
>  }
> -
> -
> -/**
> -  Fixup internal data so that EFI can be call in virtual mode.
> -  Call the passed in Child Notify event and convert any pointers in
> -  lib to virtual mode.
> -
> -  @param[in]    Event   The Event that is being processed
> -  @param[in]    Context Event Context
> -**/
> -VOID
> -EFIAPI
> -LibRtcVirtualNotifyEvent (
> -  IN EFI_EVENT        Event,
> -  IN VOID             *Context
> -  )
> -{
> -  //
> -  // Only needed if you are going to support the OS calling RTC functions in virtual mode.
> -  // You will need to call EfiConvertPointer (). To convert any stored physical addresses
> -  // to virtual address. After the OS transistions to calling in virtual mode, all future
> -  // runtime calls will be made in virtual mode.
> -  //
> -  EfiConvertPointer (0x0, (VOID**)&mArmadaRtcBase);
> -}
>

Reviewed-by: Marcin Wojtas <mw@semihalf.com>

Thanks,
Marcin


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109574): https://edk2.groups.io/g/devel/message/109574
Mute This Topic: https://groups.io/mt/101914670/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [edk2-platforms PATCH 12/19] AmpereAltraPkg/Ac01PcieLib: fix compilation error
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 12/19] AmpereAltraPkg/Ac01PcieLib: fix compilation error Laszlo Ersek
@ 2023-10-13  2:20     ` Nhi Pham via groups.io
  2023-10-13  3:24       ` Nhi Pham via groups.io
  0 siblings, 1 reply; 46+ messages in thread
From: Nhi Pham via groups.io @ 2023-10-13  2:20 UTC (permalink / raw)
  To: Laszlo Ersek, edk2-devel-groups-io
  Cc: Chuong Tran, Leif Lindholm, Rebecca Cran

Thanks for fixing it.

Reviewed-by: Nhi Pham <nhi@os.amperecomputing.com>

Regards,
Nhi

On 10/12/2023 4:09 PM, Laszlo Ersek wrote:
> Commit 380b4b40c60d ("AmpereAltraPkg: Update Ampere specific platform PCIe
> core", 2023-03-29) removed the DEBUG macro call from
> Ac01PcieCoreUpdateLink() that was the only reader of "Val". Since then,
> Val has only been set, but never read. This triggers
> "-Werror=unused-but-set-variable".
> 
> Found when trying to build "Jade.dsc".
> 
> Keep the MmioRead32() call, so that the PCIe config space sees the same
> behavior as before, but explicitly throw away the result.
> 
> Cc: Chuong Tran <chuong@os.amperecomputing.com>
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Nhi Pham <nhi@os.amperecomputing.com>
> Cc: Rebecca Cran <rebecca@os.amperecomputing.com>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>   Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
> index 3c1fe5e35ca2..fa00c1e36999 100644
> --- a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
> +++ b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
> @@ -1747,7 +1747,6 @@ Ac01PcieCoreUpdateLink (
>     PHYSICAL_ADDRESS          CfgBase;
>     UINT8                     PcieIndex;
>     UINT32                    Index;
> -  UINT32                    Val;
>   
>     *IsNextRoundNeeded = FALSE;
>     *FailedPcieCount   = 0;
> @@ -1767,7 +1766,7 @@ Ac01PcieCoreUpdateLink (
>       if (Pcie->Active && !Pcie->LinkUp) {
>         if (PcieLinkUpCheck (Pcie)) {
>           Pcie->LinkUp = TRUE;
> -        Val = MmioRead32 (CfgBase + PCIE_CAPABILITY_BASE + LINK_CONTROL_LINK_STATUS_REG);
> +        (VOID)MmioRead32 (CfgBase + PCIE_CAPABILITY_BASE + LINK_CONTROL_LINK_STATUS_REG);
>   
>           // Doing link checking and recovery if needed
>           Ac01PcieCoreQoSLinkCheckRecovery (RootComplex, PcieIndex);
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109579): https://edk2.groups.io/g/devel/message/109579
Mute This Topic: https://groups.io/mt/101914660/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [edk2-platforms PATCH 13/19] JadePkg/PCF85063RealTimeClockLib: hide LibRtcVirtualNotifyEvent
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 13/19] JadePkg/PCF85063RealTimeClockLib: hide LibRtcVirtualNotifyEvent Laszlo Ersek
@ 2023-10-13  2:24     ` Nhi Pham via groups.io
  0 siblings, 0 replies; 46+ messages in thread
From: Nhi Pham via groups.io @ 2023-10-13  2:24 UTC (permalink / raw)
  To: Laszlo Ersek, edk2-devel-groups-io
  Cc: Chuong Tran, Leif Lindholm, Rebecca Cran

It looks good to me.

Reviewed-by: Nhi Pham <nhi@os.amperecomputing.com>

Thanks,
Nhi

On 10/12/2023 4:09 PM, Laszlo Ersek wrote:
> 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.
> 
> Rename LibRtcVirtualNotifyEvent() to VirtualNotifyEvent(), and make it
> static, in preparation for removing the LibRtcVirtualNotifyEvent()
> declaration from the lib class header later.
> 
> Build-tested only (with "Jade.dsc").
> 
> Cc: Chuong Tran <chuong@os.amperecomputing.com>
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Nhi Pham <nhi@os.amperecomputing.com>
> Cc: Rebecca Cran <rebecca@os.amperecomputing.com>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>   Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063RealTimeClockLib.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063RealTimeClockLib.c b/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063RealTimeClockLib.c
> index ef8c71e92c18..1df781364bbc 100644
> --- a/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063RealTimeClockLib.c
> +++ b/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063RealTimeClockLib.c
> @@ -201,9 +201,10 @@ LibSetWakeupTime (
>     @param[in]    Event   The Event that is being processed
>     @param[in]    Context Event Context
>   **/
> +STATIC
>   VOID
>   EFIAPI
> -LibRtcVirtualNotifyEvent (
> +VirtualNotifyEvent (
>     IN EFI_EVENT        Event,
>     IN VOID             *Context
>     )
> @@ -246,7 +247,7 @@ LibRtcInitialize (
>     Status = gBS->CreateEventEx (
>                     EVT_NOTIFY_SIGNAL,
>                     TPL_NOTIFY,
> -                  LibRtcVirtualNotifyEvent,
> +                  VirtualNotifyEvent,
>                     NULL,
>                     &gEfiEventVirtualAddressChangeGuid,
>                     &mVirtualAddressChangeEvent
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109580): https://edk2.groups.io/g/devel/message/109580
Mute This Topic: https://groups.io/mt/101914668/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [edk2-platforms PATCH 12/19] AmpereAltraPkg/Ac01PcieLib: fix compilation error
  2023-10-13  2:20     ` Nhi Pham via groups.io
@ 2023-10-13  3:24       ` Nhi Pham via groups.io
  2023-10-13 20:37         ` Laszlo Ersek
  0 siblings, 1 reply; 46+ messages in thread
From: Nhi Pham via groups.io @ 2023-10-13  3:24 UTC (permalink / raw)
  To: Laszlo Ersek, edk2-devel-groups-io
  Cc: Chuong Tran, Leif Lindholm, Rebecca Cran

HI Lazslo,

I was not reviewing carefully. The MmioRead32 is redundant code. Can you 
help me get rid of that code?

Thanks,
Nhi

On 10/13/2023 9:20 AM, Nhi Pham wrote:
> Thanks for fixing it.
> 
> Reviewed-by: Nhi Pham <nhi@os.amperecomputing.com>
> 
> Regards,
> Nhi
> 
> On 10/12/2023 4:09 PM, Laszlo Ersek wrote:
>> Commit 380b4b40c60d ("AmpereAltraPkg: Update Ampere specific platform 
>> PCIe
>> core", 2023-03-29) removed the DEBUG macro call from
>> Ac01PcieCoreUpdateLink() that was the only reader of "Val". Since then,
>> Val has only been set, but never read. This triggers
>> "-Werror=unused-but-set-variable".
>>
>> Found when trying to build "Jade.dsc".
>>
>> Keep the MmioRead32() call, so that the PCIe config space sees the same
>> behavior as before, but explicitly throw away the result.
>>
>> Cc: Chuong Tran <chuong@os.amperecomputing.com>
>> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
>> Cc: Nhi Pham <nhi@os.amperecomputing.com>
>> Cc: Rebecca Cran <rebecca@os.amperecomputing.com>
>> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
>> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
>> ---
>>   Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git 
>> a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c 
>> b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
>> index 3c1fe5e35ca2..fa00c1e36999 100644
>> --- a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
>> +++ b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
>> @@ -1747,7 +1747,6 @@ Ac01PcieCoreUpdateLink (
>>     PHYSICAL_ADDRESS          CfgBase;
>>     UINT8                     PcieIndex;
>>     UINT32                    Index;
>> -  UINT32                    Val;
>>     *IsNextRoundNeeded = FALSE;
>>     *FailedPcieCount   = 0;
>> @@ -1767,7 +1766,7 @@ Ac01PcieCoreUpdateLink (
>>       if (Pcie->Active && !Pcie->LinkUp) {
>>         if (PcieLinkUpCheck (Pcie)) {
>>           Pcie->LinkUp = TRUE;
>> -        Val = MmioRead32 (CfgBase + PCIE_CAPABILITY_BASE + 
>> LINK_CONTROL_LINK_STATUS_REG);
>> +        (VOID)MmioRead32 (CfgBase + PCIE_CAPABILITY_BASE + 
>> LINK_CONTROL_LINK_STATUS_REG);
>>           // Doing link checking and recovery if needed
>>           Ac01PcieCoreQoSLinkCheckRecovery (RootComplex, PcieIndex);
>>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109581): https://edk2.groups.io/g/devel/message/109581
Mute This Topic: https://groups.io/mt/101914660/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped
  2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
                     ` (18 preceding siblings ...)
  2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 19/19] Omap35xxPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent Laszlo Ersek
@ 2023-10-13 10:12   ` Ard Biesheuvel
  2023-10-13 20:42     ` Laszlo Ersek
  19 siblings, 1 reply; 46+ messages in thread
From: Ard Biesheuvel @ 2023-10-13 10:12 UTC (permalink / raw)
  To: devel, lersek
  Cc: Ard Biesheuvel, Bibo Mao, Chao Li, Chuong Tran, Leif Lindholm,
	Ling Jia, Marcin Wojtas, Masami Hiramatsu, Meenakshi Aggarwal,
	Nhi Pham, Peng Xie, Rebecca Cran, Wenyi Xie, Xianglai li,
	Yiqi Shu

On Thu, 12 Oct 2023 at 11:10, Laszlo Ersek <lersek@redhat.com> wrote:
>
> https://bugzilla.tianocore.org/show_bug.cgi?id=4564
>
> The RealTimeClockLib class header in edk2's EmbeddedPkg mistakenly
> declares a function called LibRtcVirtualNotifyEvent(). No component ever
> calls this function across module boundaries; all RealTimeClockLib
> instances in edk2 and edk2-platforms are supposed to register -- and do
> register -- their SetVirtualAddressMap() notification functions.
>
> In a sibling series for edk2, we're going to remove the
> LibRtcVirtualNotifyEvent() API from the RealTimeClockLib *class* header.
> In edk2-platforms, that means the following:
>
> (1) Fix existent (independent) build failures / bitrot. This is a
> pre-requisite for showing that the other changes don't regress the
> build. Build regression testing is only possible if you have a build
> that completes in the first place.
>
> Patch #1 enables the NOOPT target for Hisilicon platforms, so that they
> can be more quickly built: Hisilicon needs several fixes for existent
> build issues. Patches #2 through #7 fix those issues.
>
> In particular patch#4 ("Hisilicon: rename OemMiscLib class to
> HisiOemMiscLib") requires an ek2-non-osi complement; please see that in
> the sibling edk2-non-osi posting ("Hisilicon: rename OemMiscLib class
> dependencies to HisiOemMiscLib").
>
> Patch #12 fixes prior build breakage in AmpereAltraPkg.
>
> (2) In those RealTimeClockLib instances that define
> LibRtcVirtualNotifyEvent(), demonstrate that either (a) the usage is
> module-internal, or (b) there is no usage.
>
> In case (a), rename LibRtcVirtualNotifyEvent() to VirtualNotifyEvent(),
> and make it static. If needed, hoist the function definition above the
> reference. In case (b), remove the function definition.
>
> (3) Some affected RealTimeClockLib instances turn out to be entirely
> unused / superfluous; drop those altogether.
>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Bibo Mao <maobibo@loongson.cn>
> Cc: Chao Li <lichao@loongson.cn>
> Cc: Chuong Tran <chuong@os.amperecomputing.com>
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Ling Jia <jialing@phytium.com.cn>
> Cc: Marcin Wojtas <mw@semihalf.com>
> Cc: Masami Hiramatsu <masami.hiramatsu@linaro.org>
> Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
> Cc: Nhi Pham <nhi@os.amperecomputing.com>
> Cc: Peng Xie <xiepeng@phytium.com.cn>
> Cc: Rebecca Cran <rebecca@os.amperecomputing.com>
> Cc: Wenyi Xie <xiewenyi2@huawei.com>
> Cc: Xianglai li <lixianglai@loongson.cn>
> Cc: Yiqi Shu <shuyiqi@phytium.com.cn>
>
> Thanks
> Laszlo
>
> Laszlo Ersek (19):
>   Hisilicon: enable NOOPT builds
>   Hisilicon/FlashFvbDxe: fix PcdNorFlashCheckBlockLocked token space
>     GUID
>   Hisilicon.dsc.inc: resolve VariableFlashInfoLib
>   Hisilicon: rename OemMiscLib class to HisiOemMiscLib
>   Hisilicon: add missing include file to Pptt components
>   Hisilicon/Hi1620AcpiTables: fix up ASL
>   Hisilicon/ProcessorSubClassDxe: drop conflicting PROCESSOR_STATUS_DATA
>     type
>   Hisilicon: drop unused DS3231RealTimeClockLib instance
>   Hisilicon: drop unused VirtualRealTimeClockLib instance
>   Hisilicon/DS3231RealTimeClockLib: drop LibRtcVirtualNotifyEvent
>   Hisilicon/RX8900RealTimeClockLib: drop LibRtcVirtualNotifyEvent
>   AmpereAltraPkg/Ac01PcieLib: fix compilation error
>   JadePkg/PCF85063RealTimeClockLib: hide LibRtcVirtualNotifyEvent
>   LoongArchQemuPkg/LsRealTimeClockLib: hide LibRtcVirtualNotifyEvent
>   Styx/RealTimeClockLib: hide LibRtcVirtualNotifyEvent
>   Armada7k8k/RealTimeClockLib: hide LibRtcVirtualNotifyEvent
>   NXP/Pcf8563RealTimeClockLib: hide LibRtcVirtualNotifyEvent
>   FT2000-4Pkg/RealTimeClockLib: hide LibRtcVirtualNotifyEvent
>   Omap35xxPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent
>

Thanks a lot for cleaning this up!

For the series,

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>

Pushed as d6e36a151ff8..06f6274d5642

edk2-non-osi patch pushed as d6e36a151ff8..06f6274d5642


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109584): https://edk2.groups.io/g/devel/message/109584
Mute This Topic: https://groups.io/mt/101914650/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [edk2-platforms PATCH 12/19] AmpereAltraPkg/Ac01PcieLib: fix compilation error
  2023-10-13  3:24       ` Nhi Pham via groups.io
@ 2023-10-13 20:37         ` Laszlo Ersek
  0 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-13 20:37 UTC (permalink / raw)
  To: Nhi Pham, edk2-devel-groups-io; +Cc: Chuong Tran, Leif Lindholm, Rebecca Cran

On 10/13/23 05:24, Nhi Pham wrote:
> HI Lazslo,
> 
> I was not reviewing carefully. The MmioRead32 is redundant code. Can you
> help me get rid of that code?

Sure, if you don't need the read access to the
LINK_CONTROL_LINK_STATUS_REG register, I can drop that too; I just
didn't want to do it without asking.

Thansk
Laszlo

> 
> Thanks,
> Nhi
> 
> On 10/13/2023 9:20 AM, Nhi Pham wrote:
>> Thanks for fixing it.
>>
>> Reviewed-by: Nhi Pham <nhi@os.amperecomputing.com>
>>
>> Regards,
>> Nhi
>>
>> On 10/12/2023 4:09 PM, Laszlo Ersek wrote:
>>> Commit 380b4b40c60d ("AmpereAltraPkg: Update Ampere specific platform
>>> PCIe
>>> core", 2023-03-29) removed the DEBUG macro call from
>>> Ac01PcieCoreUpdateLink() that was the only reader of "Val". Since then,
>>> Val has only been set, but never read. This triggers
>>> "-Werror=unused-but-set-variable".
>>>
>>> Found when trying to build "Jade.dsc".
>>>
>>> Keep the MmioRead32() call, so that the PCIe config space sees the same
>>> behavior as before, but explicitly throw away the result.
>>>
>>> Cc: Chuong Tran <chuong@os.amperecomputing.com>
>>> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
>>> Cc: Nhi Pham <nhi@os.amperecomputing.com>
>>> Cc: Rebecca Cran <rebecca@os.amperecomputing.com>
>>> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
>>> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
>>> ---
>>>   Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c | 3 +--
>>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git
>>> a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
>>> b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
>>> index 3c1fe5e35ca2..fa00c1e36999 100644
>>> --- a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
>>> +++ b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
>>> @@ -1747,7 +1747,6 @@ Ac01PcieCoreUpdateLink (
>>>     PHYSICAL_ADDRESS          CfgBase;
>>>     UINT8                     PcieIndex;
>>>     UINT32                    Index;
>>> -  UINT32                    Val;
>>>     *IsNextRoundNeeded = FALSE;
>>>     *FailedPcieCount   = 0;
>>> @@ -1767,7 +1766,7 @@ Ac01PcieCoreUpdateLink (
>>>       if (Pcie->Active && !Pcie->LinkUp) {
>>>         if (PcieLinkUpCheck (Pcie)) {
>>>           Pcie->LinkUp = TRUE;
>>> -        Val = MmioRead32 (CfgBase + PCIE_CAPABILITY_BASE +
>>> LINK_CONTROL_LINK_STATUS_REG);
>>> +        (VOID)MmioRead32 (CfgBase + PCIE_CAPABILITY_BASE +
>>> LINK_CONTROL_LINK_STATUS_REG);
>>>           // Doing link checking and recovery if needed
>>>           Ac01PcieCoreQoSLinkCheckRecovery (RootComplex, PcieIndex);
>>>
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109609): https://edk2.groups.io/g/devel/message/109609
Mute This Topic: https://groups.io/mt/101914660/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped
  2023-10-13 10:12   ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Ard Biesheuvel
@ 2023-10-13 20:42     ` Laszlo Ersek
  0 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-13 20:42 UTC (permalink / raw)
  To: Ard Biesheuvel, devel
  Cc: Ard Biesheuvel, Bibo Mao, Chao Li, Chuong Tran, Leif Lindholm,
	Ling Jia, Marcin Wojtas, Masami Hiramatsu, Meenakshi Aggarwal,
	Nhi Pham, Peng Xie, Rebecca Cran, Wenyi Xie, Xianglai li,
	Yiqi Shu

On 10/13/23 12:12, Ard Biesheuvel wrote:
> On Thu, 12 Oct 2023 at 11:10, Laszlo Ersek <lersek@redhat.com> wrote:
>>
>> https://bugzilla.tianocore.org/show_bug.cgi?id=4564
>>
>> The RealTimeClockLib class header in edk2's EmbeddedPkg mistakenly
>> declares a function called LibRtcVirtualNotifyEvent(). No component ever
>> calls this function across module boundaries; all RealTimeClockLib
>> instances in edk2 and edk2-platforms are supposed to register -- and do
>> register -- their SetVirtualAddressMap() notification functions.
>>
>> In a sibling series for edk2, we're going to remove the
>> LibRtcVirtualNotifyEvent() API from the RealTimeClockLib *class* header.
>> In edk2-platforms, that means the following:
>>
>> (1) Fix existent (independent) build failures / bitrot. This is a
>> pre-requisite for showing that the other changes don't regress the
>> build. Build regression testing is only possible if you have a build
>> that completes in the first place.
>>
>> Patch #1 enables the NOOPT target for Hisilicon platforms, so that they
>> can be more quickly built: Hisilicon needs several fixes for existent
>> build issues. Patches #2 through #7 fix those issues.
>>
>> In particular patch#4 ("Hisilicon: rename OemMiscLib class to
>> HisiOemMiscLib") requires an ek2-non-osi complement; please see that in
>> the sibling edk2-non-osi posting ("Hisilicon: rename OemMiscLib class
>> dependencies to HisiOemMiscLib").
>>
>> Patch #12 fixes prior build breakage in AmpereAltraPkg.
>>
>> (2) In those RealTimeClockLib instances that define
>> LibRtcVirtualNotifyEvent(), demonstrate that either (a) the usage is
>> module-internal, or (b) there is no usage.
>>
>> In case (a), rename LibRtcVirtualNotifyEvent() to VirtualNotifyEvent(),
>> and make it static. If needed, hoist the function definition above the
>> reference. In case (b), remove the function definition.
>>
>> (3) Some affected RealTimeClockLib instances turn out to be entirely
>> unused / superfluous; drop those altogether.
>>
>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>> Cc: Bibo Mao <maobibo@loongson.cn>
>> Cc: Chao Li <lichao@loongson.cn>
>> Cc: Chuong Tran <chuong@os.amperecomputing.com>
>> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
>> Cc: Ling Jia <jialing@phytium.com.cn>
>> Cc: Marcin Wojtas <mw@semihalf.com>
>> Cc: Masami Hiramatsu <masami.hiramatsu@linaro.org>
>> Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
>> Cc: Nhi Pham <nhi@os.amperecomputing.com>
>> Cc: Peng Xie <xiepeng@phytium.com.cn>
>> Cc: Rebecca Cran <rebecca@os.amperecomputing.com>
>> Cc: Wenyi Xie <xiewenyi2@huawei.com>
>> Cc: Xianglai li <lixianglai@loongson.cn>
>> Cc: Yiqi Shu <shuyiqi@phytium.com.cn>
>>
>> Thanks
>> Laszlo
>>
>> Laszlo Ersek (19):
>>   Hisilicon: enable NOOPT builds
>>   Hisilicon/FlashFvbDxe: fix PcdNorFlashCheckBlockLocked token space
>>     GUID
>>   Hisilicon.dsc.inc: resolve VariableFlashInfoLib
>>   Hisilicon: rename OemMiscLib class to HisiOemMiscLib
>>   Hisilicon: add missing include file to Pptt components
>>   Hisilicon/Hi1620AcpiTables: fix up ASL
>>   Hisilicon/ProcessorSubClassDxe: drop conflicting PROCESSOR_STATUS_DATA
>>     type
>>   Hisilicon: drop unused DS3231RealTimeClockLib instance
>>   Hisilicon: drop unused VirtualRealTimeClockLib instance
>>   Hisilicon/DS3231RealTimeClockLib: drop LibRtcVirtualNotifyEvent
>>   Hisilicon/RX8900RealTimeClockLib: drop LibRtcVirtualNotifyEvent
>>   AmpereAltraPkg/Ac01PcieLib: fix compilation error
>>   JadePkg/PCF85063RealTimeClockLib: hide LibRtcVirtualNotifyEvent
>>   LoongArchQemuPkg/LsRealTimeClockLib: hide LibRtcVirtualNotifyEvent
>>   Styx/RealTimeClockLib: hide LibRtcVirtualNotifyEvent
>>   Armada7k8k/RealTimeClockLib: hide LibRtcVirtualNotifyEvent
>>   NXP/Pcf8563RealTimeClockLib: hide LibRtcVirtualNotifyEvent
>>   FT2000-4Pkg/RealTimeClockLib: hide LibRtcVirtualNotifyEvent
>>   Omap35xxPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent
>>
> 
> Thanks a lot for cleaning this up!
> 
> For the series,
> 
> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
> 
> Pushed as d6e36a151ff8..06f6274d5642
> 
> edk2-non-osi patch pushed as d6e36a151ff8..06f6274d5642
> 

Thanks much! :)

I'll post a followup for removing the stale MmioRead32() from
AmpereAltraPkg/Ac01PcieLib.

Cheers
Laszlo



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109610): https://edk2.groups.io/g/devel/message/109610
Mute This Topic: https://groups.io/mt/101914650/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [PATCH 1/5] PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename LibRtcVirtualNotifyEvent
  2023-10-12 12:33     ` Sami Mujawar
@ 2023-10-18 13:42       ` Laszlo Ersek
  2023-10-18 15:15         ` Sami Mujawar
  0 siblings, 1 reply; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-18 13:42 UTC (permalink / raw)
  To: devel, sami.mujawar; +Cc: Ray Ni, nd

Hi Sami,

On 10/12/23 14:33, Sami Mujawar wrote:
> Hi Laszlo,
> 
> Thank you for this patch. 
> These changes look good to me.
> 
> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
> 
> Tested by booting a Linux guest using Kvmtool guest firmware (ArmVirtPkg/ArmVirtKvmTool.dsc) for AArch64.
> Tested-by: Sami Mujawar <sami.mujawar@arm.com>

your response is under a PcAtChipsetPkg patch -- that's not used in
"ArmVirtPkg/ArmVirtKvmTool.dsc".

Which patches did you mean your Tested-by for?

Thanks!
Laszlo

> 
> Regards,
> 
> Sami Mujawar
> 
> On 12/10/2023, 10:25, "devel@edk2.groups.io <mailto:devel@edk2.groups.io> on behalf of Laszlo Ersek via groups.io" <devel@edk2.groups.io <mailto:devel@edk2.groups.io> on behalf of lersek=redhat.com@groups.io <mailto:redhat.com@groups.io>> wrote:
> 
> 
> 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 <ray.ni@intel.com <mailto:ray.ni@intel.com>>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564 <https://bugzilla.tianocore.org/show_bug.cgi?id=4564>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com <mailto:lersek@redhat.com>>
> ---
> PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> 
> 
> diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
> index b600df487952..ca0cad9b0198 100644
> --- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
> +++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
> @@ -122,9 +122,10 @@ PcRtcEfiSetWakeupTime (
> @param[in] Event The Event that is being processed
> @param[in] Context Event Context
> **/
> +STATIC
> VOID
> EFIAPI
> -LibRtcVirtualNotifyEvent (
> +VirtualNotifyEvent (
> IN EFI_EVENT Event,
> IN VOID *Context
> )
> @@ -220,7 +221,7 @@ InitializePcRtc (
> Status = gBS->CreateEventEx (
> EVT_NOTIFY_SIGNAL,
> TPL_NOTIFY,
> - LibRtcVirtualNotifyEvent,
> + VirtualNotifyEvent,
> NULL,
> &gEfiEventVirtualAddressChangeGuid,
> &mVirtualAddrChangeEvent
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109750): https://edk2.groups.io/g/devel/message/109750
Mute This Topic: https://groups.io/mt/101914676/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [PATCH 0/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class
  2023-10-12  9:10 ` [edk2-devel] [PATCH 0/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
                     ` (4 preceding siblings ...)
  2023-10-12  9:10   ` [edk2-devel] [PATCH 5/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
@ 2023-10-18 13:42   ` Laszlo Ersek
  2023-10-18 13:44     ` Ard Biesheuvel
  5 siblings, 1 reply; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-18 13:42 UTC (permalink / raw)
  To: edk2-devel-groups-io
  Cc: Abner Chang, Ard Biesheuvel, Daniel Schaefer, Leif Lindholm,
	Ray Ni

On 10/12/23 11:10, Laszlo Ersek wrote:
> https://bugzilla.tianocore.org/show_bug.cgi?id=4564
> 
> The RealTimeClockLib class header in edk2's EmbeddedPkg mistakenly
> declares a function called LibRtcVirtualNotifyEvent(). No component ever
> calls this function across module boundaries; all RealTimeClockLib
> instances in edk2 and edk2-platforms are supposed to register -- and do
> register -- their SetVirtualAddressMap() notification functions.
> 
> After the edk2-platforms and edk2-non-osi changes, we can repeat the
> procedure form the edk2-platforms series in edk2. In those
> RealTimeClockLib instances that define LibRtcVirtualNotifyEvent(),
> demonstrate that either (a) the usage is module-internal, or (b) there
> is no usage. In case (a), rename LibRtcVirtualNotifyEvent() to
> VirtualNotifyEvent(), and make it static. In case (b), remove the
> function definition.
> 
> There is a superficial name match in
> PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe. Note that that module is a
> *driver*, not a library instance; what's more,
> PcatRealTimeClockRuntimeDxe does not depend on "EmbeddedPkg.dec" at all.
> Treat that module too as case (a), right at the front of the series.
> 
> Finally, drop the LibRtcVirtualNotifyEvent() API declaration.
> 
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Daniel Schaefer <git@danielschaefer.me>
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Ray Ni <ray.ni@intel.com>

Can I get an ACK for the last three (EmbeddedPkg) patches?

Thanks
Laszlo

> 
> Thanks
> Laszlo
> 
> Laszlo Ersek (5):
>   PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename
>     LibRtcVirtualNotifyEvent
>   ArmPlatformPkg/PL031RealTimeClockLib: hide LibRtcVirtualNotifyEvent
>   EmbeddedPkg/TemplateRealTimeClockLib: drop LibRtcVirtualNotifyEvent
>   EmbeddedPkg/VirtualRealTimeClockLib: drop LibRtcVirtualNotifyEvent
>   EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib
>     class
> 
>  ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c  |  5 ++--
>  EmbeddedPkg/Include/Library/RealTimeClockLib.h                        | 15 ------------
>  EmbeddedPkg/Library/TemplateRealTimeClockLib/RealTimeClockLib.c       | 24 --------------------
>  EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c | 18 ---------------
>  PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c               |  5 ++--
>  5 files changed, 6 insertions(+), 61 deletions(-)
> 
> 
> base-commit: 95c9f470ca6eab23bfd016bd438f932d7263d395
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109751): https://edk2.groups.io/g/devel/message/109751
Mute This Topic: https://groups.io/mt/101914677/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [PATCH 0/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class
  2023-10-18 13:42   ` [edk2-devel] [PATCH 0/5] " Laszlo Ersek
@ 2023-10-18 13:44     ` Ard Biesheuvel
  2023-10-18 17:03       ` Laszlo Ersek
  0 siblings, 1 reply; 46+ messages in thread
From: Ard Biesheuvel @ 2023-10-18 13:44 UTC (permalink / raw)
  To: devel, lersek
  Cc: Abner Chang, Ard Biesheuvel, Daniel Schaefer, Leif Lindholm,
	Ray Ni

On Wed, 18 Oct 2023 at 15:43, Laszlo Ersek <lersek@redhat.com> wrote:
>
> On 10/12/23 11:10, Laszlo Ersek wrote:
> > https://bugzilla.tianocore.org/show_bug.cgi?id=4564
> >
> > The RealTimeClockLib class header in edk2's EmbeddedPkg mistakenly
> > declares a function called LibRtcVirtualNotifyEvent(). No component ever
> > calls this function across module boundaries; all RealTimeClockLib
> > instances in edk2 and edk2-platforms are supposed to register -- and do
> > register -- their SetVirtualAddressMap() notification functions.
> >
> > After the edk2-platforms and edk2-non-osi changes, we can repeat the
> > procedure form the edk2-platforms series in edk2. In those
> > RealTimeClockLib instances that define LibRtcVirtualNotifyEvent(),
> > demonstrate that either (a) the usage is module-internal, or (b) there
> > is no usage. In case (a), rename LibRtcVirtualNotifyEvent() to
> > VirtualNotifyEvent(), and make it static. In case (b), remove the
> > function definition.
> >
> > There is a superficial name match in
> > PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe. Note that that module is a
> > *driver*, not a library instance; what's more,
> > PcatRealTimeClockRuntimeDxe does not depend on "EmbeddedPkg.dec" at all.
> > Treat that module too as case (a), right at the front of the series.
> >
> > Finally, drop the LibRtcVirtualNotifyEvent() API declaration.
> >
> > Cc: Abner Chang <abner.chang@amd.com>
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > Cc: Daniel Schaefer <git@danielschaefer.me>
> > Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> > Cc: Ray Ni <ray.ni@intel.com>
>
> Can I get an ACK for the last three (EmbeddedPkg) patches?
>

For the series,

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>

> >
> > Laszlo Ersek (5):
> >   PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename
> >     LibRtcVirtualNotifyEvent
> >   ArmPlatformPkg/PL031RealTimeClockLib: hide LibRtcVirtualNotifyEvent
> >   EmbeddedPkg/TemplateRealTimeClockLib: drop LibRtcVirtualNotifyEvent
> >   EmbeddedPkg/VirtualRealTimeClockLib: drop LibRtcVirtualNotifyEvent
> >   EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib
> >     class
> >
> >  ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c  |  5 ++--
> >  EmbeddedPkg/Include/Library/RealTimeClockLib.h                        | 15 ------------
> >  EmbeddedPkg/Library/TemplateRealTimeClockLib/RealTimeClockLib.c       | 24 --------------------
> >  EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c | 18 ---------------
> >  PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c               |  5 ++--
> >  5 files changed, 6 insertions(+), 61 deletions(-)
> >
> >
> > base-commit: 95c9f470ca6eab23bfd016bd438f932d7263d395
> >
> >
> >
> >
> >
>
>
>
> 
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109752): https://edk2.groups.io/g/devel/message/109752
Mute This Topic: https://groups.io/mt/101914677/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [PATCH 1/5] PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename LibRtcVirtualNotifyEvent
  2023-10-18 13:42       ` Laszlo Ersek
@ 2023-10-18 15:15         ` Sami Mujawar
  2023-10-18 15:19           ` Laszlo Ersek
  0 siblings, 1 reply; 46+ messages in thread
From: Sami Mujawar @ 2023-10-18 15:15 UTC (permalink / raw)
  To: Laszlo Ersek, devel@edk2.groups.io; +Cc: Ray Ni, nd

Hi Laszlo,

Please see my response inline marked [SAMI].

Regards,

Sami Mujawar

On 18/10/2023, 14:42, "Laszlo Ersek" <lersek@redhat.com <mailto:lersek@redhat.com>> wrote:


Hi Sami,


On 10/12/23 14:33, Sami Mujawar wrote:
> Hi Laszlo,
> 
> Thank you for this patch. 
> These changes look good to me.
> 
> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com>>
> 
> Tested by booting a Linux guest using Kvmtool guest firmware (ArmVirtPkg/ArmVirtKvmTool.dsc) for AArch64.
> Tested-by: Sami Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com>>


your response is under a PcAtChipsetPkg patch -- that's not used in
"ArmVirtPkg/ArmVirtKvmTool.dsc".


Which patches did you mean your Tested-by for?
[SAMI] Sorry for not being clear. PcatRealTimeClockRuntimeDxe is used by the Kvmtool guest firmware, 
please see https://github.com/tianocore/edk2/blob/master/ArmVirtPkg/ArmVirtKvmTool.dsc#L285-L288
I have applied this patch and tested that it works for the Kvmtool guest firmware.
[/SAMI]

Thanks!
Laszlo


> 
> Regards,
> 
> Sami Mujawar
> 
> On 12/10/2023, 10:25, "devel@edk2.groups.io <mailto:devel@edk2.groups.io> <mailto:devel@edk2.groups.io <mailto:devel@edk2.groups.io>> on behalf of Laszlo Ersek via groups.io" <devel@edk2.groups.io <mailto:devel@edk2.groups.io> <mailto:devel@edk2.groups.io <mailto:devel@edk2.groups.io>> on behalf of lersek=redhat.com@groups.io <mailto:redhat.com@groups.io> <mailto:redhat.com@groups.io <mailto:redhat.com@groups.io>>> wrote:
> 
> 
> 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 <ray.ni@intel.com <mailto:ray.ni@intel.com> <mailto:ray.ni@intel.com <mailto:ray.ni@intel.com>>>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564 <https://bugzilla.tianocore.org/show_bug.cgi?id=4564> <https://bugzilla.tianocore.org/show_bug.cgi?id=4564> <https://bugzilla.tianocore.org/show_bug.cgi?id=4564&gt;>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com <mailto:lersek@redhat.com> <mailto:lersek@redhat.com <mailto:lersek@redhat.com>>>
> ---
> PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> 
> 
> diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
> index b600df487952..ca0cad9b0198 100644
> --- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
> +++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
> @@ -122,9 +122,10 @@ PcRtcEfiSetWakeupTime (
> @param[in] Event The Event that is being processed
> @param[in] Context Event Context
> **/
> +STATIC
> VOID
> EFIAPI
> -LibRtcVirtualNotifyEvent (
> +VirtualNotifyEvent (
> IN EFI_EVENT Event,
> IN VOID *Context
> )
> @@ -220,7 +221,7 @@ InitializePcRtc (
> Status = gBS->CreateEventEx (
> EVT_NOTIFY_SIGNAL,
> TPL_NOTIFY,
> - LibRtcVirtualNotifyEvent,
> + VirtualNotifyEvent,
> NULL,
> &gEfiEventVirtualAddressChangeGuid,
> &mVirtualAddrChangeEvent
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 







-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109763): https://edk2.groups.io/g/devel/message/109763
Mute This Topic: https://groups.io/mt/101914676/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [PATCH 1/5] PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename LibRtcVirtualNotifyEvent
  2023-10-18 15:15         ` Sami Mujawar
@ 2023-10-18 15:19           ` Laszlo Ersek
  0 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-18 15:19 UTC (permalink / raw)
  To: Sami Mujawar, devel@edk2.groups.io; +Cc: Ray Ni, nd

On 10/18/23 17:15, Sami Mujawar wrote:
> Hi Laszlo,
> 
> Please see my response inline marked [SAMI].
> 
> Regards,
> 
> Sami Mujawar
> 
> On 18/10/2023, 14:42, "Laszlo Ersek" <lersek@redhat.com <mailto:lersek@redhat.com>> wrote:
> 
> 
> Hi Sami,
> 
> 
> On 10/12/23 14:33, Sami Mujawar wrote:
>> Hi Laszlo,
>>
>> Thank you for this patch. 
>> These changes look good to me.
>>
>> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com>>
>>
>> Tested by booting a Linux guest using Kvmtool guest firmware (ArmVirtPkg/ArmVirtKvmTool.dsc) for AArch64.
>> Tested-by: Sami Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com>>
> 
> 
> your response is under a PcAtChipsetPkg patch -- that's not used in
> "ArmVirtPkg/ArmVirtKvmTool.dsc".
> 
> 
> Which patches did you mean your Tested-by for?
> [SAMI] Sorry for not being clear. PcatRealTimeClockRuntimeDxe is used by the Kvmtool guest firmware, 
> please see https://github.com/tianocore/edk2/blob/master/ArmVirtPkg/ArmVirtKvmTool.dsc#L285-L288
> I have applied this patch and tested that it works for the Kvmtool guest firmware.
> [/SAMI]

And right you are! Wow... that's unexpected of ArmVirtPkg content!

Thanks!
Laszlo

> 
> Thanks!
> Laszlo
> 
> 
>>
>> Regards,
>>
>> Sami Mujawar
>>
>> On 12/10/2023, 10:25, "devel@edk2.groups.io <mailto:devel@edk2.groups.io> <mailto:devel@edk2.groups.io <mailto:devel@edk2.groups.io>> on behalf of Laszlo Ersek via groups.io" <devel@edk2.groups.io <mailto:devel@edk2.groups.io> <mailto:devel@edk2.groups.io <mailto:devel@edk2.groups.io>> on behalf of lersek=redhat.com@groups.io <mailto:redhat.com@groups.io> <mailto:redhat.com@groups.io <mailto:redhat.com@groups.io>>> wrote:
>>
>>
>> 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 <ray.ni@intel.com <mailto:ray.ni@intel.com> <mailto:ray.ni@intel.com <mailto:ray.ni@intel.com>>>
>> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564 <https://bugzilla.tianocore.org/show_bug.cgi?id=4564> <https://bugzilla.tianocore.org/show_bug.cgi?id=4564> <https://bugzilla.tianocore.org/show_bug.cgi?id=4564&gt;>
>> Signed-off-by: Laszlo Ersek <lersek@redhat.com <mailto:lersek@redhat.com> <mailto:lersek@redhat.com <mailto:lersek@redhat.com>>>
>> ---
>> PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>>
>> diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
>> index b600df487952..ca0cad9b0198 100644
>> --- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
>> +++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
>> @@ -122,9 +122,10 @@ PcRtcEfiSetWakeupTime (
>> @param[in] Event The Event that is being processed
>> @param[in] Context Event Context
>> **/
>> +STATIC
>> VOID
>> EFIAPI
>> -LibRtcVirtualNotifyEvent (
>> +VirtualNotifyEvent (
>> IN EFI_EVENT Event,
>> IN VOID *Context
>> )
>> @@ -220,7 +221,7 @@ InitializePcRtc (
>> Status = gBS->CreateEventEx (
>> EVT_NOTIFY_SIGNAL,
>> TPL_NOTIFY,
>> - LibRtcVirtualNotifyEvent,
>> + VirtualNotifyEvent,
>> NULL,
>> &gEfiEventVirtualAddressChangeGuid,
>> &mVirtualAddrChangeEvent
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> 
>>
>>
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109764): https://edk2.groups.io/g/devel/message/109764
Mute This Topic: https://groups.io/mt/101914676/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [edk2-devel] [PATCH 0/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class
  2023-10-18 13:44     ` Ard Biesheuvel
@ 2023-10-18 17:03       ` Laszlo Ersek
  0 siblings, 0 replies; 46+ messages in thread
From: Laszlo Ersek @ 2023-10-18 17:03 UTC (permalink / raw)
  To: devel, ardb
  Cc: Abner Chang, Ard Biesheuvel, Daniel Schaefer, Leif Lindholm,
	Ray Ni

On 10/18/23 15:44, Ard Biesheuvel wrote:
> On Wed, 18 Oct 2023 at 15:43, Laszlo Ersek <lersek@redhat.com> wrote:
>>
>> On 10/12/23 11:10, Laszlo Ersek wrote:
>>> https://bugzilla.tianocore.org/show_bug.cgi?id=4564
>>>
>>> The RealTimeClockLib class header in edk2's EmbeddedPkg mistakenly
>>> declares a function called LibRtcVirtualNotifyEvent(). No component ever
>>> calls this function across module boundaries; all RealTimeClockLib
>>> instances in edk2 and edk2-platforms are supposed to register -- and do
>>> register -- their SetVirtualAddressMap() notification functions.
>>>
>>> After the edk2-platforms and edk2-non-osi changes, we can repeat the
>>> procedure form the edk2-platforms series in edk2. In those
>>> RealTimeClockLib instances that define LibRtcVirtualNotifyEvent(),
>>> demonstrate that either (a) the usage is module-internal, or (b) there
>>> is no usage. In case (a), rename LibRtcVirtualNotifyEvent() to
>>> VirtualNotifyEvent(), and make it static. In case (b), remove the
>>> function definition.
>>>
>>> There is a superficial name match in
>>> PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe. Note that that module is a
>>> *driver*, not a library instance; what's more,
>>> PcatRealTimeClockRuntimeDxe does not depend on "EmbeddedPkg.dec" at all.
>>> Treat that module too as case (a), right at the front of the series.
>>>
>>> Finally, drop the LibRtcVirtualNotifyEvent() API declaration.
>>>
>>> Cc: Abner Chang <abner.chang@amd.com>
>>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>>> Cc: Daniel Schaefer <git@danielschaefer.me>
>>> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
>>> Cc: Ray Ni <ray.ni@intel.com>
>>
>> Can I get an ACK for the last three (EmbeddedPkg) patches?
>>
> 
> For the series,
> 
> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>

Merged via <https://github.com/tianocore/edk2/pull/4926>; commit range
747a08eae26b..7fe49887c4d2.

Thank you!
Laszlo

> 
>>>
>>> Laszlo Ersek (5):
>>>   PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename
>>>     LibRtcVirtualNotifyEvent
>>>   ArmPlatformPkg/PL031RealTimeClockLib: hide LibRtcVirtualNotifyEvent
>>>   EmbeddedPkg/TemplateRealTimeClockLib: drop LibRtcVirtualNotifyEvent
>>>   EmbeddedPkg/VirtualRealTimeClockLib: drop LibRtcVirtualNotifyEvent
>>>   EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib
>>>     class
>>>
>>>  ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c  |  5 ++--
>>>  EmbeddedPkg/Include/Library/RealTimeClockLib.h                        | 15 ------------
>>>  EmbeddedPkg/Library/TemplateRealTimeClockLib/RealTimeClockLib.c       | 24 --------------------
>>>  EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c | 18 ---------------
>>>  PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c               |  5 ++--
>>>  5 files changed, 6 insertions(+), 61 deletions(-)
>>>
>>>
>>> base-commit: 95c9f470ca6eab23bfd016bd438f932d7263d395
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>>
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109765): https://edk2.groups.io/g/devel/message/109765
Mute This Topic: https://groups.io/mt/101914677/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2023-10-18 17:03 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-12  9:08 [edk2-devel] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 01/19] Hisilicon: enable NOOPT builds Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 02/19] Hisilicon/FlashFvbDxe: fix PcdNorFlashCheckBlockLocked token space GUID Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 03/19] Hisilicon.dsc.inc: resolve VariableFlashInfoLib Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 04/19] Hisilicon: rename OemMiscLib class to HisiOemMiscLib Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 05/19] Hisilicon: add missing include file to Pptt components Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 06/19] Hisilicon/Hi1620AcpiTables: fix up ASL Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 07/19] Hisilicon/ProcessorSubClassDxe: drop conflicting PROCESSOR_STATUS_DATA type Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 08/19] Hisilicon: drop unused DS3231RealTimeClockLib instance Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 09/19] Hisilicon: drop unused VirtualRealTimeClockLib instance Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 10/19] Hisilicon/DS3231RealTimeClockLib: drop LibRtcVirtualNotifyEvent Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 11/19] Hisilicon/RX8900RealTimeClockLib: " Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 12/19] AmpereAltraPkg/Ac01PcieLib: fix compilation error Laszlo Ersek
2023-10-13  2:20     ` Nhi Pham via groups.io
2023-10-13  3:24       ` Nhi Pham via groups.io
2023-10-13 20:37         ` Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 13/19] JadePkg/PCF85063RealTimeClockLib: hide LibRtcVirtualNotifyEvent Laszlo Ersek
2023-10-13  2:24     ` Nhi Pham via groups.io
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 14/19] LoongArchQemuPkg/LsRealTimeClockLib: " Laszlo Ersek
2023-10-12 12:14     ` xianglai
2023-10-12 12:25       ` Chao Li
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 15/19] Styx/RealTimeClockLib: " Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 16/19] Armada7k8k/RealTimeClockLib: " Laszlo Ersek
2023-10-12 14:32     ` Marcin Wojtas via groups.io
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 17/19] NXP/Pcf8563RealTimeClockLib: " Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 18/19] FT2000-4Pkg/RealTimeClockLib: " Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 19/19] Omap35xxPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent Laszlo Ersek
2023-10-13 10:12   ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Ard Biesheuvel
2023-10-13 20:42     ` Laszlo Ersek
2023-10-12  9:10 ` [edk2-devel] [edk2-non-osi PATCH 0/1] Hisilicon: rename OemMiscLib class dependencies to HisiOemMiscLib Laszlo Ersek
2023-10-12  9:10   ` [edk2-devel] [edk2-non-osi PATCH 1/1] " Laszlo Ersek
2023-10-12  9:10 ` [edk2-devel] [PATCH 0/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
2023-10-12  9:10   ` [edk2-devel] [PATCH 1/5] PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename LibRtcVirtualNotifyEvent Laszlo Ersek
2023-10-12 12:33     ` Sami Mujawar
2023-10-18 13:42       ` Laszlo Ersek
2023-10-18 15:15         ` Sami Mujawar
2023-10-18 15:19           ` Laszlo Ersek
2023-10-12  9:10   ` [edk2-devel] [PATCH 2/5] ArmPlatformPkg/PL031RealTimeClockLib: hide LibRtcVirtualNotifyEvent Laszlo Ersek
2023-10-12 12:31     ` Sami Mujawar
2023-10-12  9:10   ` [edk2-devel] [PATCH 3/5] EmbeddedPkg/TemplateRealTimeClockLib: drop LibRtcVirtualNotifyEvent Laszlo Ersek
2023-10-12  9:10   ` [edk2-devel] [PATCH 4/5] EmbeddedPkg/VirtualRealTimeClockLib: " Laszlo Ersek
2023-10-12  9:10   ` [edk2-devel] [PATCH 5/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
2023-10-18 13:42   ` [edk2-devel] [PATCH 0/5] " Laszlo Ersek
2023-10-18 13:44     ` Ard Biesheuvel
2023-10-18 17:03       ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox