public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Reusing DXE driver code in edk2 packages
@ 2017-05-17 14:18 Tomas Pilar (tpilar)
  2017-05-17 14:31 ` Gao, Liming
  2017-05-17 14:44 ` Sergei Temerkhanov
  0 siblings, 2 replies; 4+ messages in thread
From: Tomas Pilar (tpilar) @ 2017-05-17 14:18 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

Hi,

I want to use timestamping in my optionrom UEFI driver so I checkout the 
Timestamp protocol that comes in UEFI 2.5. I check my platform for 
gEfiTimestampProtocolGuid using gBS->LocateProtocol but that comes up 
empty.

In EDK2 I notice MdeModulePkg/Universal/TimestampDxe which is a DXE 
driver that uses TimerLib to produce timestamps. How would I use this in 
my driver? Can I just stick the TimestampDxe.inf as a library to 
[LibraryClasses] in my package DSC file?

Cheers,
Tom


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

* Re: Reusing DXE driver code in edk2 packages
  2017-05-17 14:18 Reusing DXE driver code in edk2 packages Tomas Pilar (tpilar)
@ 2017-05-17 14:31 ` Gao, Liming
  2017-05-17 14:44 ` Sergei Temerkhanov
  1 sibling, 0 replies; 4+ messages in thread
From: Gao, Liming @ 2017-05-17 14:31 UTC (permalink / raw)
  To: Tomas Pilar (tpilar), edk2-devel@lists.01.org

Tom:
  Your request is to combine two drivers into one. This is not supported in BaseTools. Now, you have to copy the cod logic from TimestampDxe to your UEFI driver to install gEfiTimestampProtocolGuid.

  If you want to this support, you can specify this request in https://bugzilla.tianocore.org/ 

Thanks
Liming
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Tomas Pilar (tpilar)
> Sent: Wednesday, May 17, 2017 10:19 PM
> To: edk2-devel@lists.01.org
> Subject: [edk2] Reusing DXE driver code in edk2 packages
> 
> Hi,
> 
> I want to use timestamping in my optionrom UEFI driver so I checkout the
> Timestamp protocol that comes in UEFI 2.5. I check my platform for
> gEfiTimestampProtocolGuid using gBS->LocateProtocol but that comes up
> empty.
> 
> In EDK2 I notice MdeModulePkg/Universal/TimestampDxe which is a DXE
> driver that uses TimerLib to produce timestamps. How would I use this in
> my driver? Can I just stick the TimestampDxe.inf as a library to
> [LibraryClasses] in my package DSC file?
> 
> Cheers,
> Tom
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


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

* Re: Reusing DXE driver code in edk2 packages
  2017-05-17 14:18 Reusing DXE driver code in edk2 packages Tomas Pilar (tpilar)
  2017-05-17 14:31 ` Gao, Liming
@ 2017-05-17 14:44 ` Sergei Temerkhanov
  2017-05-17 15:41   ` Kinney, Michael D
  1 sibling, 1 reply; 4+ messages in thread
From: Sergei Temerkhanov @ 2017-05-17 14:44 UTC (permalink / raw)
  To: Tomas Pilar (tpilar); +Cc: edk2-devel@lists.01.org

On Wed, May 17, 2017 at 5:18 PM, Tomas Pilar (tpilar)
<tpilar@solarflare.com> wrote:
> Hi,
>
> I want to use timestamping in my optionrom UEFI driver so I checkout the
> Timestamp protocol that comes in UEFI 2.5. I check my platform for
> gEfiTimestampProtocolGuid using gBS->LocateProtocol but that comes up empty.
>
> In EDK2 I notice MdeModulePkg/Universal/TimestampDxe which is a DXE driver
> that uses TimerLib to produce timestamps. How would I use this in my driver?
> Can I just stick the TimestampDxe.inf as a library to [LibraryClasses] in my
> package DSC file?

TimestampDxe.inf goes into the [Components] section, and into the .fdf
file as well.
Also, [Depex] sections of modules using this protocol have to contain
gEfiTimestampProtocolGuid.

Regards,
Sergey

>
> Cheers,
> Tom
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


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

* Re: Reusing DXE driver code in edk2 packages
  2017-05-17 14:44 ` Sergei Temerkhanov
@ 2017-05-17 15:41   ` Kinney, Michael D
  0 siblings, 0 replies; 4+ messages in thread
From: Kinney, Michael D @ 2017-05-17 15:41 UTC (permalink / raw)
  To: Sergei Temerkhanov, Tomas Pilar (tpilar), Kinney, Michael D
  Cc: edk2-devel@lists.01.org

Sergey,

For a UEFI driver, you can look for the Time Stamp Protocol.  If it
is present, you can use it.  This is an optional protocol, so a UEFI
driver must continue to work if the protocol is not provided by the
platform firmware.  The UEFI driver should fall back to other UEFI
spec defined time sources or reduce features if those time sources
are not sufficient.

Mike
 

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Sergei
> Temerkhanov
> Sent: Wednesday, May 17, 2017 7:44 AM
> To: Tomas Pilar (tpilar) <tpilar@solarflare.com>
> Cc: edk2-devel@lists.01.org
> Subject: Re: [edk2] Reusing DXE driver code in edk2 packages
> 
> On Wed, May 17, 2017 at 5:18 PM, Tomas Pilar (tpilar)
> <tpilar@solarflare.com> wrote:
> > Hi,
> >
> > I want to use timestamping in my optionrom UEFI driver so I checkout the
> > Timestamp protocol that comes in UEFI 2.5. I check my platform for
> > gEfiTimestampProtocolGuid using gBS->LocateProtocol but that comes up empty.
> >
> > In EDK2 I notice MdeModulePkg/Universal/TimestampDxe which is a DXE driver
> > that uses TimerLib to produce timestamps. How would I use this in my driver?
> > Can I just stick the TimestampDxe.inf as a library to [LibraryClasses] in my
> > package DSC file?
> 
> TimestampDxe.inf goes into the [Components] section, and into the .fdf
> file as well.
> Also, [Depex] sections of modules using this protocol have to contain
> gEfiTimestampProtocolGuid.
> 
> Regards,
> Sergey
> 
> >
> > Cheers,
> > Tom
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


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

end of thread, other threads:[~2017-05-17 15:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-17 14:18 Reusing DXE driver code in edk2 packages Tomas Pilar (tpilar)
2017-05-17 14:31 ` Gao, Liming
2017-05-17 14:44 ` Sergei Temerkhanov
2017-05-17 15:41   ` Kinney, Michael D

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