Laszlo, thanks for the quick proposal. I will send out a formal patch to fix this issue.
Regards, Ray >-----Original Message----- >From: Laszlo Ersek [mailto:ler...@redhat.com] >Sent: Tuesday, May 17, 2016 5:42 PM >To: Anbazhagan, Baraneedharan <anbazha...@hp.com>; edk2-devel@lists.01.org ><edk2-de...@ml01.01.org>; Ni, Ruiyu ><ruiyu...@intel.com> >Subject: Re: [edk2] PcRtcAcpiTableChangeCallback question > >On 05/17/16 01:20, Anbazhagan, Baraneedharan wrote: > >> PcRtcAcpiTableChangeCallback doesn't seem to be called if >> gEfiAcpiTableGuid or gEfiAcpi10TableGuid is already installed before >> PcRtc module gets loaded. Whether ACPI table Guid can be checked in >> system configuration table and then register a callback if it's not >> available or register a single callback on End of Dxe(assuming ACPI >> table Guid will be available)? > >The right way for registering callbacks for protocol and sysconfig table >installations is to kick the event immediately after >registering the callback. (The callback has to be written defensively anyway.) > >This pattern can be seen for example in UefiLib, in the >EfiCreateProtocolNotifyEvent() function. > >So, I'd propose: > >> diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c >b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c >> index 1cfb0cb19889..741c7ce625d0 100644 >> --- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c >> +++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c >> @@ -160,6 +160,11 @@ InitializePcRtc ( >> ); >> ASSERT_EFI_ERROR (Status); >> >> + // >> + // ACPI tables may have been installed already >> + // >> + gBS->SignalEvent (Event); >> + >> gRT->GetTime = PcRtcEfiGetTime; >> gRT->SetTime = PcRtcEfiSetTime; >> gRT->GetWakeupTime = PcRtcEfiGetWakeupTime; > >(totally untested) > >Thanks >Laszlo _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel