From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1UMg3I-0006fN-19 for mharc-grub-devel@gnu.org; Mon, 01 Apr 2013 10:49:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMg37-0006fA-TG for grub-devel@gnu.org; Mon, 01 Apr 2013 10:49:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMg35-0004vf-2h for grub-devel@gnu.org; Mon, 01 Apr 2013 10:49:29 -0400 Received: from mail-ee0-f53.google.com ([74.125.83.53]:33926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMg34-0004vZ-SJ for grub-devel@gnu.org; Mon, 01 Apr 2013 10:49:26 -0400 Received: by mail-ee0-f53.google.com with SMTP id c13so1048189eek.12 for ; Mon, 01 Apr 2013 07:49:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=PWsjCRtCQxsI0fTSDXlOn/mIXFTbdkBsRmbmf5G1YN4=; b=kMXBBDaL8I74v68+8mV/7iNN6qJuT6KVFTcxR/eYKwLeFWJ9TXIqmaBTaGQkLQYzdf xudsozlVMgReVZfVX/FmqY8SjPExGt7wGcbQOakdXwPPz3y1UY8gccIgvsEC9UNLd98K qP06+Gl8sxkyFl+ZqPgQLnAkAY/JOOfRXpTTZyH2u0irH7w0nRWfAskl13PmhH0x1gFX OvZVKBbJJuE8IiVx4TxeC3amY20WC8GxQEBi/ub5R+QnHQHZn2gJ651kQvmENFPIczDq /gUY9QyNlHBKQMmb08cx8zs1VRPXmIfdY76xooi7dGEKQJ7Pff5oJBkQ4Q01JnjZOO2w x79A== X-Received: by 10.14.175.71 with SMTP id y47mr38236714eel.18.1364827765928; Mon, 01 Apr 2013 07:49:25 -0700 (PDT) Received: from [192.168.56.2] ([151.36.245.148]) by mx.google.com with ESMTPS id f47sm21451459eep.13.2013.04.01.07.49.24 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Apr 2013 07:49:25 -0700 (PDT) Message-ID: <51599E7E.6040703@gmail.com> Date: Mon, 01 Apr 2013 16:49:34 +0200 From: Francesco Lavra User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: [PATCH 7/7] Add support for ARM UEFI ("EFI") platforms References: <5158F171.6030702@gmail.com> <51596446.3030709@gmail.com> <51596E28.2030702@gmail.com> <5159954F.5090207@gmail.com> <515996A6.8010804@gmail.com> In-Reply-To: <515996A6.8010804@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 74.125.83.53 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2013 14:49:39 -0000 On 04/01/2013 04:16 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > On 01.04.2013 16:10, Francesco Lavra wrote: > >> On 04/01/2013 01:23 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: >>> get_time is wrong function for getting tsc. You should create a timer >>> event with 10000 units (=1 ms) and in its callback increase millisecond >>> counter. >> >> The problem is that such timer event would be machine-specific and >> wouldn't work across different ARM SoCs. So the best place to handle >> these machine-specific details would be in the platform firmware. >> Unfortunately the EFI spec doesn't have a standard mechanism to retrieve >> a timestamp counter, the most similar mechanism currently defined by the >> spec is the get_time service. > > Looks at events in EFI spec. You can define a periodic event with 1ms > period and custom function as callback. Then you just need to count in > this function. You are right, I wasn't aware of this capability. I have no idea how widespread is support of timer events in different ARM EFI implementations. We'll find out...