From nobody Fri Dec 27 20:42:28 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1500000562759371.83435557885366; Thu, 13 Jul 2017 19:49:22 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6E92A21D147CD; Thu, 13 Jul 2017 19:47:29 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 C11AF2095D8DA for ; Thu, 13 Jul 2017 19:47:28 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jul 2017 19:49:17 -0700 Received: from ydong10-win10.ccr.corp.intel.com ([10.239.158.51]) by orsmga003.jf.intel.com with ESMTP; 13 Jul 2017 19:49:16 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,357,1496127600"; d="scan'208";a="992840963" From: Eric Dong To: edk2-devel@lists.01.org Date: Fri, 14 Jul 2017 10:49:11 +0800 Message-Id: <1500000554-21960-2-git-send-email-eric.dong@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 In-Reply-To: <1500000554-21960-1-git-send-email-eric.dong@intel.com> References: <1500000554-21960-1-git-send-email-eric.dong@intel.com> Subject: [edk2] [Patch 1/4] UefiCpuPkg: Add PPIN related MSR for Xeon E5. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jeff Fan MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Cc: Jeff Fan --- UefiCpuPkg/Include/Register/Msr.h | 1 + UefiCpuPkg/Include/Register/Msr/XeonE5v2Msr.h | 91 +++++++++++++++++++++++= ++++ 2 files changed, 92 insertions(+) create mode 100644 UefiCpuPkg/Include/Register/Msr/XeonE5v2Msr.h diff --git a/UefiCpuPkg/Include/Register/Msr.h b/UefiCpuPkg/Include/Registe= r/Msr.h index 0ac8d5b..8dbd6f7 100644 --- a/UefiCpuPkg/Include/Register/Msr.h +++ b/UefiCpuPkg/Include/Register/Msr.h @@ -45,5 +45,6 @@ #include #include #include +#include =20 #endif diff --git a/UefiCpuPkg/Include/Register/Msr/XeonE5v2Msr.h b/UefiCpuPkg/Inc= lude/Register/Msr/XeonE5v2Msr.h new file mode 100644 index 0000000..29ba125 --- /dev/null +++ b/UefiCpuPkg/Include/Register/Msr/XeonE5v2Msr.h @@ -0,0 +1,91 @@ +/** @file + MSR Definitions for Intel(R) Xeon(R) Processor E5 v2 Family. + + Provides defines for Machine Specific Registers(MSR) indexes. Data struc= tures + are provided for MSRs that contain one or more bit fields. If the MSR v= alue + returned is a single 32-bit or 64-bit value, then a data structure is not + provided for that MSR. + + Copyright (c) 2017, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BS= D License + which accompanies this distribution. The full text of the license may b= e found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. + + @par Specification Reference: + Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Volume = 3, + September 2016, Chapter 35 Model-Specific-Registers (MSR), Section 35.8. + +**/ + +#ifndef __XEON_E5_V2_MSR_H__ +#define __XEON_E5_V2_MSR_H__ + +#include + +/** + Is Intel(R) Xeon(R) Processor E5 V2 Family? + + @param DisplayFamily Display Family ID + @param DisplayModel Display Model ID + + DisplayModel =3D=3D 0x3E Intel Xeon processors E5 V2 + + @retval TRUE Yes, it is. + @retval FALSE No, it isn't. +**/ +#define IS_XEON_E5_V2_PROCESSOR(DisplayFamily, DisplayModel) \ + (DisplayFamily =3D=3D 0x06 && \ + ( \ + DisplayModel =3D=3D 0x3E \ + ) \ + ) + +#define MSR_XEON_E5_V2_PIN_CTL 0x0000004E + +/** + MSR information returned for MSR index #MSR_XEON_E7_FEATURE_CONFIG +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bit 0] LockOut (R/WO) 1 =3D Locked; 0 =3D unlocked + /// Set 1 to prevent further writes to MSR_PPIN_CTL. Writing 1 to + /// MSR_PPINCTL[bit 0] is permitted only if MSR_PPIN_CTL[bit 1] is + /// clear, Default is 0. + /// BIOS should provide an opt-in menu to enable the user to turn on + /// MSR_PPIN_CTL[bit 1] for privileged inventory initialization agent = to + /// access MSR_PPIN. After reading MSR_PPIN, the privileged + /// inventory initialization agent should write '1b' to MSR_PPIN_CTL + /// to disable further access to MSR_PPIN and prevent unauthorized + /// modification to MSR_PPIN_CTL + /// + UINT32 LockOut:1; + /// [Bit 1] Enable_PPIN (R/W) 1 =3D Enabled; 0 =3D Disabled + /// If 1, enables MSR_PPIN to be accessible using RDMSR. Once set, + /// attempt to write 1 to MSR_PPIN_CTL[bit 0] will cause #GP. + /// If 0, an attempt to read MSR_PPIN will cause #GP. Default is 0 + /// + UINT32 EnablePpin:1; + UINT32 Reserved1:30; + UINT32 Reserved2:32; + } Bits; + /// + /// All bit fields as a 32-bit value + /// + UINT32 Uint32; + /// + /// All bit fields as a 64-bit value + /// + UINT64 Uint64; +} MSR_XEON_E5_V2_PIN_CTL_REGISTER; + +#define MSR_XEON_E5_V2_PLATFORM_INFO 0x000000CE + +#endif \ No newline at end of file --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel