From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dsyl1-0001ZK-I5 for mharc-grub-devel@gnu.org; Fri, 15 Sep 2017 18:06:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsykz-0001Us-2n for grub-devel@gnu.org; Fri, 15 Sep 2017 18:06:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsykv-00007J-UO for grub-devel@gnu.org; Fri, 15 Sep 2017 18:06:41 -0400 Received: from mga07.intel.com ([134.134.136.100]:49351) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dsykv-000072-Kw for grub-devel@gnu.org; Fri, 15 Sep 2017 18:06:37 -0400 Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP; 15 Sep 2017 15:06:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,399,1500966000"; d="scan'208";a="151891544" Received: from linux.intel.com ([10.54.29.200]) by fmsmga005.fm.intel.com with ESMTP; 15 Sep 2017 15:06:35 -0700 Received: from debox1-dev.jf.intel.com (debox1-dev.jf.intel.com [10.54.75.155]) by linux.intel.com (Postfix) with ESMTP id E95EF580392 for ; Fri, 15 Sep 2017 15:06:34 -0700 (PDT) Message-ID: <1505513182.6240.29.camel@linux.intel.com> Subject: Re: [PATCH] tsc: Change default tsc calibration method to EFI on EFI systems From: "David E. Box" Reply-To: david.e.box@linux.intel.com To: grub-devel@gnu.org Date: Fri, 15 Sep 2017 15:06:22 -0700 In-Reply-To: References: <20170906202054.2214-1-david.e.box@linux.intel.com> Organization: David E. Box Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.5 (3.24.5-1.fc26) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.100 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2017 22:06:42 -0000 On Tue, 2017-09-12 at 23:46 +0000, Vladimir 'phcoder' Serbinenko wrote: > > > On Wed, Sep 6, 2017, 22:21 David E. Box > wrote: > > On efi systems, make efi based tsc calibration the default, > > followed by > > the pmtimer before using the pit. This prevents Grub boot failure > > on > > newer x86 systems that power gate the pit. > > Why does put code fail? I think it was changed to detect gated pit. On these systems, even though the pit is gated the timer2 latch logic still works. So when the tics are set the latch still goes from high to active low as expected for a functional timer. But since the device is clock gated it never counts down and the bit never gets reset, leading to an infinite loop. > Also I'd prefer to use pmtimer first as we had problems with event > and time routines on some Macs. Any reason not to use pmtimer first? No reason not to use pmtimer first. I had not considered boot speed as well which must be prioritized. I'll submit a new patch. > > Signed-off-by: David E. Box > > --- > > grub-core/kern/i386/tsc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/grub-core/kern/i386/tsc.c b/grub-core/kern/i386/tsc.c > > index 2e85289d8..de4057ddb 100644 > > --- a/grub-core/kern/i386/tsc.c > > +++ b/grub-core/kern/i386/tsc.c > > @@ -68,7 +68,7 @@ grub_tsc_init (void) > > #ifdef GRUB_MACHINE_XEN > > (void) (grub_tsc_calibrate_from_xen () || > > calibrate_tsc_hardcode()); > > #elif defined (GRUB_MACHINE_EFI) > > - (void) (grub_tsc_calibrate_from_pit () || > > grub_tsc_calibrate_from_pmtimer () || grub_tsc_calibrate_from_efi() > > || calibrate_tsc_hardcode()); > > + (void) (grub_tsc_calibrate_from_efi () || > > grub_tsc_calibrate_from_pmtimer () || grub_tsc_calibrate_from_pit > > () || calibrate_tsc_hardcode()); > > #elif defined (GRUB_MACHINE_COREBOOT) > > (void) (grub_tsc_calibrate_from_pmtimer () || > > grub_tsc_calibrate_from_pit () || calibrate_tsc_hardcode()); > > #else > > -- > > 2.13.5 > > > > > > _______________________________________________ > > Grub-devel mailing list > > Grub-devel@gnu.org > > https://lists.gnu.org/mailman/listinfo/grub-devel > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel