From: "Marcin Wojtas via groups.io" <mw=semihalf.com@groups.io>
To: Laszlo Ersek <lersek@redhat.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
Leif Lindholm <quic_llindhol@quicinc.com>
Subject: Re: [edk2-devel] [edk2-platforms PATCH 16/19] Armada7k8k/RealTimeClockLib: hide LibRtcVirtualNotifyEvent
Date: Thu, 12 Oct 2023 16:32:28 +0200 [thread overview]
Message-ID: <CAPv3WKd4Dhq=Ey+AJNjnNyg6+SEFDfy=MopVi3DjsWHoFMDkHw@mail.gmail.com> (raw)
In-Reply-To: <20231012090950.108577-17-lersek@redhat.com>
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]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2023-10-12 14:32 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPv3WKd4Dhq=Ey+AJNjnNyg6+SEFDfy=MopVi3DjsWHoFMDkHw@mail.gmail.com' \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox