* [PATCH 1/2] Omap35xxPkg: add GetTimeInNanoSecond implementation
@ 2017-11-30 14:07 Leif Lindholm
2017-11-30 14:07 ` [PATCH 2/2] BeagleBoardPkg: add CapsuleLib resolution Leif Lindholm
2017-11-30 14:09 ` [PATCH 1/2] Omap35xxPkg: add GetTimeInNanoSecond implementation Ard Biesheuvel
0 siblings, 2 replies; 5+ messages in thread
From: Leif Lindholm @ 2017-11-30 14:07 UTC (permalink / raw)
To: edk2-devel; +Cc: ard.biesheuvel
Commit a63be426f8e3 ("ArmPlatformPkg: Store initial timer value") caused
BeagleBoard to stop building, due to Omap35xxTimerLib lacking an
implementation of GetTimeInNanoSecond (). So add one.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
---
Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c
index 652c47b6f6..33b314922b 100644
--- a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c
+++ b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c
@@ -131,3 +131,27 @@ GetPerformanceCounterProperties (
return PcdGet64(PcdEmbeddedPerformanceCounterFrequencyInHz);
}
+
+/**
+ Converts elapsed ticks of performance counter to time in nanoseconds.
+
+ This function converts the elapsed ticks of running performance counter to
+ time value in unit of nanoseconds.
+
+ @param Ticks The number of elapsed ticks of running performance counter.
+
+ @return The elapsed time in nanoseconds.
+
+**/
+UINT64
+EFIAPI
+GetTimeInNanoSecond (
+ IN UINT64 Ticks
+ )
+{
+ UINT32 Period;
+
+ Period = PcdGet32 (PcdEmbeddedPerformanceCounterPeriodInNanoseconds);
+
+ return (GetPerformanceCounter () * Period);
+}
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] BeagleBoardPkg: add CapsuleLib resolution
2017-11-30 14:07 [PATCH 1/2] Omap35xxPkg: add GetTimeInNanoSecond implementation Leif Lindholm
@ 2017-11-30 14:07 ` Leif Lindholm
2017-11-30 14:09 ` Ard Biesheuvel
2017-11-30 14:09 ` [PATCH 1/2] Omap35xxPkg: add GetTimeInNanoSecond implementation Ard Biesheuvel
1 sibling, 1 reply; 5+ messages in thread
From: Leif Lindholm @ 2017-11-30 14:07 UTC (permalink / raw)
To: edk2-devel; +Cc: ard.biesheuvel
Commit 4bbcc285d5f7 ("ArmPkg/PlatformBootManagerLib: process pending
capsules") added a dependency on CapsuleLib. Add DxeCapsuleLibNull
resolution to BeagleBoardPkg.dsc to resolve this.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
---
BeagleBoardPkg/BeagleBoardPkg.dsc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/BeagleBoardPkg/BeagleBoardPkg.dsc b/BeagleBoardPkg/BeagleBoardPkg.dsc
index d67ccf377e..2837ef3c06 100644
--- a/BeagleBoardPkg/BeagleBoardPkg.dsc
+++ b/BeagleBoardPkg/BeagleBoardPkg.dsc
@@ -135,6 +135,8 @@ [LibraryClasses.common]
FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
+ CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
+
[LibraryClasses.common.SEC]
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
ReportStatusCodeLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] BeagleBoardPkg: add CapsuleLib resolution
2017-11-30 14:07 ` [PATCH 2/2] BeagleBoardPkg: add CapsuleLib resolution Leif Lindholm
@ 2017-11-30 14:09 ` Ard Biesheuvel
0 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2017-11-30 14:09 UTC (permalink / raw)
To: Leif Lindholm; +Cc: edk2-devel@lists.01.org
On 30 November 2017 at 14:07, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> Commit 4bbcc285d5f7 ("ArmPkg/PlatformBootManagerLib: process pending
> capsules") added a dependency on CapsuleLib. Add DxeCapsuleLibNull
> resolution to BeagleBoardPkg.dsc to resolve this.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> BeagleBoardPkg/BeagleBoardPkg.dsc | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/BeagleBoardPkg/BeagleBoardPkg.dsc b/BeagleBoardPkg/BeagleBoardPkg.dsc
> index d67ccf377e..2837ef3c06 100644
> --- a/BeagleBoardPkg/BeagleBoardPkg.dsc
> +++ b/BeagleBoardPkg/BeagleBoardPkg.dsc
> @@ -135,6 +135,8 @@ [LibraryClasses.common]
> FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
> DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
>
> + CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
> +
> [LibraryClasses.common.SEC]
> PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> ReportStatusCodeLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Omap35xxPkg: add GetTimeInNanoSecond implementation
2017-11-30 14:07 [PATCH 1/2] Omap35xxPkg: add GetTimeInNanoSecond implementation Leif Lindholm
2017-11-30 14:07 ` [PATCH 2/2] BeagleBoardPkg: add CapsuleLib resolution Leif Lindholm
@ 2017-11-30 14:09 ` Ard Biesheuvel
2017-11-30 14:16 ` Leif Lindholm
1 sibling, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2017-11-30 14:09 UTC (permalink / raw)
To: Leif Lindholm; +Cc: edk2-devel@lists.01.org
On 30 November 2017 at 14:07, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> Commit a63be426f8e3 ("ArmPlatformPkg: Store initial timer value") caused
> BeagleBoard to stop building, due to Omap35xxTimerLib lacking an
> implementation of GetTimeInNanoSecond (). So add one.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
> ---
> Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c
> index 652c47b6f6..33b314922b 100644
> --- a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c
> +++ b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c
> @@ -131,3 +131,27 @@ GetPerformanceCounterProperties (
>
> return PcdGet64(PcdEmbeddedPerformanceCounterFrequencyInHz);
> }
> +
> +/**
> + Converts elapsed ticks of performance counter to time in nanoseconds.
> +
> + This function converts the elapsed ticks of running performance counter to
> + time value in unit of nanoseconds.
> +
> + @param Ticks The number of elapsed ticks of running performance counter.
> +
> + @return The elapsed time in nanoseconds.
> +
> +**/
> +UINT64
> +EFIAPI
> +GetTimeInNanoSecond (
> + IN UINT64 Ticks
> + )
> +{
> + UINT32 Period;
> +
> + Period = PcdGet32 (PcdEmbeddedPerformanceCounterPeriodInNanoseconds);
> +
> + return (GetPerformanceCounter () * Period);
Shouldn't this use 'Ticks' anywhere?
> +}
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Omap35xxPkg: add GetTimeInNanoSecond implementation
2017-11-30 14:09 ` [PATCH 1/2] Omap35xxPkg: add GetTimeInNanoSecond implementation Ard Biesheuvel
@ 2017-11-30 14:16 ` Leif Lindholm
0 siblings, 0 replies; 5+ messages in thread
From: Leif Lindholm @ 2017-11-30 14:16 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: edk2-devel@lists.01.org
On Thu, Nov 30, 2017 at 02:09:33PM +0000, Ard Biesheuvel wrote:
> On 30 November 2017 at 14:07, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> > Commit a63be426f8e3 ("ArmPlatformPkg: Store initial timer value") caused
> > BeagleBoard to stop building, due to Omap35xxTimerLib lacking an
> > implementation of GetTimeInNanoSecond (). So add one.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
> > ---
> > Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c | 24 ++++++++++++++++++++++++
> > 1 file changed, 24 insertions(+)
> >
> > diff --git a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c
> > index 652c47b6f6..33b314922b 100644
> > --- a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c
> > +++ b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c
> > @@ -131,3 +131,27 @@ GetPerformanceCounterProperties (
> >
> > return PcdGet64(PcdEmbeddedPerformanceCounterFrequencyInHz);
> > }
> > +
> > +/**
> > + Converts elapsed ticks of performance counter to time in nanoseconds.
> > +
> > + This function converts the elapsed ticks of running performance counter to
> > + time value in unit of nanoseconds.
> > +
> > + @param Ticks The number of elapsed ticks of running performance counter.
> > +
> > + @return The elapsed time in nanoseconds.
> > +
> > +**/
> > +UINT64
> > +EFIAPI
> > +GetTimeInNanoSecond (
> > + IN UINT64 Ticks
> > + )
> > +{
> > + UINT32 Period;
> > +
> > + Period = PcdGet32 (PcdEmbeddedPerformanceCounterPeriodInNanoseconds);
> > +
> > + return (GetPerformanceCounter () * Period);
>
> Shouldn't this use 'Ticks' anywhere?
*Goes to grab coffee*
v2 coming up.
/
Leif
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-11-30 14:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-30 14:07 [PATCH 1/2] Omap35xxPkg: add GetTimeInNanoSecond implementation Leif Lindholm
2017-11-30 14:07 ` [PATCH 2/2] BeagleBoardPkg: add CapsuleLib resolution Leif Lindholm
2017-11-30 14:09 ` Ard Biesheuvel
2017-11-30 14:09 ` [PATCH 1/2] Omap35xxPkg: add GetTimeInNanoSecond implementation Ard Biesheuvel
2017-11-30 14:16 ` Leif Lindholm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox