From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=eric.dong@intel.com; receiver=edk2-devel@lists.01.org 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 543922194D3B8 for ; Mon, 24 Sep 2018 19:13:49 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Sep 2018 19:13:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,300,1534834800"; d="scan'208";a="93410463" Received: from ydong10-win10.ccr.corp.intel.com ([10.239.9.125]) by orsmga001.jf.intel.com with ESMTP; 24 Sep 2018 19:09:05 -0700 From: Eric Dong To: edk2-devel@lists.01.org Cc: Michael D Kinney , Ruiyu Ni , Laszlo Ersek Date: Tue, 25 Sep 2018 10:08:46 +0800 Message-Id: <20180925020853.25804-8-eric.dong@intel.com> X-Mailer: git-send-email 2.15.0.windows.1 In-Reply-To: <20180925020853.25804-1-eric.dong@intel.com> References: <20180925020853.25804-1-eric.dong@intel.com> Subject: [Patch v3 07/14] UefiCpuPkg/Include/Register/ArchitecturalMsr.h: Add new MSR. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2018 02:13:49 -0000 Changes includes: 1. Add new MSRs: MSR_IA32_L2_QOS_CFG/MSR_IA32_CSTAR. Cc: Michael D Kinney Cc: Ruiyu Ni Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong --- UefiCpuPkg/Include/Register/ArchitecturalMsr.h | 64 ++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/UefiCpuPkg/Include/Register/ArchitecturalMsr.h b/UefiCpuPkg/Include/Register/ArchitecturalMsr.h index 5d2242aa80..b467ffaf26 100644 --- a/UefiCpuPkg/Include/Register/ArchitecturalMsr.h +++ b/UefiCpuPkg/Include/Register/ArchitecturalMsr.h @@ -5908,6 +5908,51 @@ typedef union { UINT64 Uint64; } MSR_IA32_L3_QOS_CFG_REGISTER; +/** + L2 QOS Configuration (R/W). If ( CPUID.(EAX=10H, ECX=2):ECX.[2] = 1 ). + + @param ECX MSR_IA32_L2_QOS_CFG (0x00000C82) + @param EAX Lower 32-bits of MSR value. + Described by the type MSR_IA32_L2_QOS_CFG_REGISTER. + @param EDX Upper 32-bits of MSR value. + Described by the type MSR_IA32_L2_QOS_CFG_REGISTER. + + Example usage + @code + MSR_IA32_L2_QOS_CFG_REGISTER Msr; + + Msr.Uint64 = AsmReadMsr64 (MSR_IA32_L2_QOS_CFG); + AsmWriteMsr64 (MSR_IA32_L2_QOS_CFG, Msr.Uint64); + @endcode + @note MSR_IA32_L2_QOS_CFG is defined as IA32_L2_QOS_CFG in SDM. +**/ +#define MSR_IA32_L2_QOS_CFG 0x00000C82 + +/** + MSR information returned for MSR index #MSR_IA32_L2_QOS_CFG +**/ +typedef union { + /// + /// Individual bit fields + /// + struct { + /// + /// [Bit 0] Enable (R/W) Set 1 to enable L2 CAT masks and COS to operate + /// in Code and Data Prioritization (CDP) mode. + /// + UINT32 Enable:1; + UINT32 Reserved1:31; + 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_IA32_L2_QOS_CFG_REGISTER; /** Monitoring Event Select Register (R/W). If ( CPUID.(EAX=07H, ECX=0):EBX.[12] @@ -6380,6 +6425,25 @@ typedef union { **/ #define MSR_IA32_LSTAR 0xC0000082 +/** + IA-32e Mode System Call Target Address (R/W) Not used, as the SYSCALL + instruction is not recognized in compatibility mode. If + CPUID.80000001:EDX.[29] = 1. + + @param ECX MSR_IA32_CSTAR (0xC0000083) + @param EAX Lower 32-bits of MSR value. + @param EDX Upper 32-bits of MSR value. + + Example usage + @code + UINT64 Msr; + + Msr = AsmReadMsr64 (MSR_IA32_CSTAR); + AsmWriteMsr64 (MSR_IA32_CSTAR, Msr); + @endcode + @note MSR_IA32_CSTAR is defined as IA32_CSTAR in SDM. +**/ +#define MSR_IA32_CSTAR 0xC0000083 /** System Call Flag Mask (R/W). If CPUID.80000001:EDX.[29] = 1. -- 2.15.0.windows.1