From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=17.151.62.67; helo=nwk-aaemail-lapp02.apple.com; envelope-from=afish@apple.com; receiver=edk2-devel@lists.01.org Received: from nwk-aaemail-lapp02.apple.com (nwk-aaemail-lapp02.apple.com [17.151.62.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 080132117CE94 for ; Tue, 6 Nov 2018 07:52:56 -0800 (PST) Received: from pps.filterd (nwk-aaemail-lapp02.apple.com [127.0.0.1]) by nwk-aaemail-lapp02.apple.com (8.16.0.22/8.16.0.22) with SMTP id wA6Fq7nm017158; Tue, 6 Nov 2018 07:52:56 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=mime-version : content-transfer-encoding : content-type : sender : subject : from : in-reply-to : date : cc : message-id : references : to; s=20180706; bh=2T+SD6iUPV5B9Ihkg718tWyhSzGOmQclhdmSQimQMJ0=; b=o9q2aidop5o8neRnYmc4q6K0xe0L0vkjB3OGnKHavTgrPl74FqgeqAEr62cVHY7QmG2C JpMnu6g/rV3s8HdeAMeCSrsKy/97LqmNdtbBPOaxRhuppNmP7+YL2Hx+8g+xe7lLG45x qLsUpT1MNDClgbYbsuyijgqX6oEXvtVnG1bY4BJQkWPpZ89DvmiqbF6HmU6otlCxCZ1P W9hrpwFGEPOhIkTjrokdjNKeMavGcz4p6j2nzVh/Yec96btgcTVc1YlWjLvqspRa+PcU DzqKV2bhLRyaKMta1ZVKuJCLXuSObT5TNpjzlJJUY6TRDpX5/FcP6qHov2G5BIEuOW7E cg== Received: from ma1-mtap-s03.corp.apple.com (ma1-mtap-s03.corp.apple.com [17.40.76.7]) by nwk-aaemail-lapp02.apple.com with ESMTP id 2njv1bj585-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 06 Nov 2018 07:52:56 -0800 MIME-version: 1.0 Received: from nwk-mmpp-sz13.apple.com (nwk-mmpp-sz13.apple.com [17.128.115.216]) by ma1-mtap-s03.corp.apple.com (Oracle Communications Messaging Server 8.0.2.3.20180614 64bit (built Jun 14 2018)) with ESMTPS id <0PHS00HBK447D920@ma1-mtap-s03.corp.apple.com>; Tue, 06 Nov 2018 07:52:55 -0800 (PST) Received: from process_viserion-daemon.nwk-mmpp-sz13.apple.com by nwk-mmpp-sz13.apple.com (Oracle Communications Messaging Server 8.0.2.3.20180614 64bit (built Jun 14 2018)) id <0PHS00A003YL8N00@nwk-mmpp-sz13.apple.com>; Tue, 06 Nov 2018 07:52:55 -0800 (PST) X-Va-A: X-Va-T-CD: 77e387ec3c739d704a517d09ba3d9f68 X-Va-E-CD: 13a010d962732d34e981f6ced0901b21 X-Va-R-CD: 53f76dd3c6aeef2558d82be798e33c14 X-Va-CD: 0 X-Va-ID: c951aec5-045b-4309-9376-c962f74e9963 X-V-A: X-V-T-CD: 81ca60fce39c2560b6c4a7e5841f9b8f X-V-E-CD: 13a010d962732d34e981f6ced0901b21 X-V-R-CD: 53f76dd3c6aeef2558d82be798e33c14 X-V-CD: 0 X-V-ID: 36723536-f988-4e12-9140-36e842568030 Received: from process_milters-daemon.nwk-mmpp-sz13.apple.com by nwk-mmpp-sz13.apple.com (Oracle Communications Messaging Server 8.0.2.3.20180614 64bit (built Jun 14 2018)) id <0PHS00A003YH8L00@nwk-mmpp-sz13.apple.com>; Tue, 06 Nov 2018 07:52:55 -0800 (PST) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-06_07:,, signatures=0 Received: from [17.103.47.72] (unknown [17.103.47.72]) by nwk-mmpp-sz13.apple.com (Oracle Communications Messaging Server 8.0.2.3.20180614 64bit (built Jun 14 2018)) with ESMTPSA id <0PHS001ZT446HH80@nwk-mmpp-sz13.apple.com>; Tue, 06 Nov 2018 07:52:54 -0800 (PST) Sender: afish@apple.com From: Andrew Fish In-reply-to: <01F0790E56F0534D8DCAD4AC5838792F618A084F@irsmsx111.ger.corp.intel.com> Date: Tue, 06 Nov 2018 09:52:43 -0600 Cc: "edk2-devel@lists.01.org" Message-id: References: <01F0790E56F0534D8DCAD4AC5838792F618A084F@irsmsx111.ger.corp.intel.com> To: "Knop, Ryszard" X-Mailer: Apple Mail (2.3445.6.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-06_07:, , signatures=0 Subject: Re: TimerLib - usable library on X64? X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2018 15:52:57 -0000 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII 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 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