From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1drunR-00012G-8m for mharc-grub-devel@gnu.org; Tue, 12 Sep 2017 19:40:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drunO-000120-N4 for grub-devel@gnu.org; Tue, 12 Sep 2017 19:40:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drunK-0006qb-9k for grub-devel@gnu.org; Tue, 12 Sep 2017 19:40:46 -0400 Received: from mga04.intel.com ([192.55.52.120]:17603) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1drunJ-0006pQ-TM for grub-devel@gnu.org; Tue, 12 Sep 2017 19:40:42 -0400 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Sep 2017 16:40:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,384,1500966000"; d="scan'208";a="310992169" Received: from linux.intel.com ([10.54.29.200]) by fmsmga004.fm.intel.com with ESMTP; 12 Sep 2017 16:40:39 -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 2E5AC5803DB; Tue, 12 Sep 2017 16:40:39 -0700 (PDT) Message-ID: <1505259631.9724.49.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: Paul Menzel Cc: grub-devel@gnu.org Date: Tue, 12 Sep 2017 16:40:31 -0700 In-Reply-To: <1505200231.12343.126.camel@users.sourceforge.net> References: <20170906202054.2214-1-david.e.box@linux.intel.com> <1505200231.12343.126.camel@users.sourceforge.net> 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: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.120 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: Tue, 12 Sep 2017 23:40:48 -0000 Hi Paul, On Tue, 2017-09-12 at 09:10 +0200, Paul Menzel wrote: > Dear David, > > > Am Mittwoch, den 06.09.2017, 13:20 -0700 schrieb David E. Box: > > 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. > > Could you please be specific, what “newer x86 systems” are? Also, > what > is the “GRUB boot failure”? A hang? Intel SoC's supporting the S0ix feature require the 8254 to be power gated. This feature as been around as early as the Cherry Trail line. In order to support this some firmware configurations clock gate the 8254 by default. This causes grub to hang on these systems when they attempt to use it to calibrate the tsc. See section 18.9.2.4 in https://www.intel.com/content/www/us/en/process ors/atom/atom-z8000-datasheet-vol-1.html > > What about older EFI x86 systems? Is there a chance, that they hang > now?support this some firmware configurations clock gate the 8254 by > default. This causes grub to hang on t Can't say for sure. I have no reason to suspect so. Such a system would have to have no (or broken) support for the EFI_STALL boot service command, which has been around since EFI 1.0. > > > 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 > > > Thanks, > > Paul Dave