From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by ml01.01.org (Postfix) with ESMTP id 6C7131A1DEB for ; Thu, 11 Aug 2016 18:08:10 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 11 Aug 2016 18:08:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,507,1464678000"; d="scan'208";a="864063161" Received: from shmintpr01.sh.intel.com (HELO [10.7.209.27]) ([172.16.213.225]) by orsmga003.jf.intel.com with ESMTP; 11 Aug 2016 18:08:08 -0700 To: "Brian J. Johnson" , edk2-devel@lists.01.org References: <1470883079-4472-1-git-send-email-star.zeng@intel.com> Cc: Michael D Kinney , Liming Gao From: "Zeng, Star" Message-ID: <661df3d9-bb67-0022-3a84-c663a969d53a@intel.com> Date: Fri, 12 Aug 2016 09:07:36 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Subject: Re: [PATCH] PcAtChipsetPkg AcpiTimerLib: Get more accurate TSC Frequency X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2016 01:08:10 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 2016/8/11 21:41, Brian J. Johnson wrote: > On 08/10/2016 09:37 PM, Star Zeng wrote: >> Minimize the code overhead between the two TSC reads by adding >> new internal API to calculate TSC Frequency instead of reusing >> MicroSecondDelay (). > > Why not just use the MSR_PLATFORM_INFO (0xce) register bits 15..8, on > CPUs where it's available, to read the TSC frequency directly? Per my understanding, not every generation CPU has this MSR_PLATFORM_INFO (0xce) register defined, and also MSR_PLATFORM_INFO (0xce) register bits 15..8 is just the ratio, then the radio needs to multiply external clock frequency which may be different for various generation CPU. I believe the library's position stands as a generic library and not for specific CPU. Thanks, Star