From: Andrew Fish <afish@apple.com>
To: "Knop, Ryszard" <ryszard.knop@intel.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: TimerLib - usable library on X64?
Date: Tue, 06 Nov 2018 09:52:43 -0600 [thread overview]
Message-ID: <BAA55A90-8840-4BDE-8280-0E1196650824@apple.com> (raw)
In-Reply-To: <01F0790E56F0534D8DCAD4AC5838792F618A084F@irsmsx111.ger.corp.intel.com>
Ryszard,
The different libraries mix timers, and TSC (for x86).
For some of the timer libs there may be some PCD settings that need to get mapped to your platform. You can look in the timer libs INF to see what it depends on.
PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf
[Pcd]
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciBusNumber ## CONSUMES
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciDeviceNumber ## CONSUMES
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciFunctionNumber ## CONSUMES
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciEnableRegisterOffset ## CONSUMES
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoBarEnableMask ## CONSUMES
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciBarRegisterOffset ## CONSUMES
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPortBaseAddress ## CONSUMES
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiPm1TmrOffset ## CONSUMES
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPortBaseAddressMask ## CONSUMES
Thanks,
Andrew Fish
> On Nov 6, 2018, at 6:13 AM, Knop, Ryszard <ryszard.knop@intel.com> wrote:
>
> Hi everyone,
> I'm trying to use TimerLib to precisely measure time elapsed between specific functions, and I'm having some issues trying to get it to work. On X64 platforms all I get is (depending on the TimerLib impl I use) either zeroes from QueryPerformanceCounter (QueryPerformanceCounterProperties returns zeroes for all the counters, except the frequency which is always reported as 100Hz), or the platform hangs. I've tried a few TimerLib implementations and I'm a bit out of ideas by now. Am I doing something wrong in the code itself, or is there any concrete implementation that is known to work well?
>
> Sources I'm using: https://gist.github.com/DragoonAethis/7df6d8fb35c4f1932ec42bacbcbf73a8
>
> Thanks, Richard.
> --------------------------------------------------------------------
>
> Intel Technology Poland sp. z o.o.
> ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
>
> Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
> przegladanie lub rozpowszechnianie jest zabronione.
> This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
> others is strictly prohibited.
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
prev parent reply other threads:[~2018-11-06 15:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-06 12:13 TimerLib - usable library on X64? Knop, Ryszard
2018-11-06 15:52 ` Andrew Fish [this message]
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=BAA55A90-8840-4BDE-8280-0E1196650824@apple.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