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 471292117A28D for ; Tue, 16 Oct 2018 19:16:41 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2018 19:16:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,389,1534834800"; d="scan'208";a="83193886" Received: from ydong10-win10.ccr.corp.intel.com ([10.239.9.125]) by orsmga006.jf.intel.com with ESMTP; 16 Oct 2018 19:16:40 -0700 From: Eric Dong To: edk2-devel@lists.01.org Cc: Ruiyu Ni , Laszlo Ersek Date: Wed, 17 Oct 2018 10:16:31 +0800 Message-Id: <20181017021635.14972-3-eric.dong@intel.com> X-Mailer: git-send-email 2.15.0.windows.1 In-Reply-To: <20181017021635.14972-1-eric.dong@intel.com> References: <20181017021635.14972-1-eric.dong@intel.com> Subject: [Patch v2 2/6] UefiCpuPkg/RegisterCpuFeaturesLib.h: Add new dependence types. 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: Wed, 17 Oct 2018 02:16:41 -0000 Add new core/package dependence types which consumed by different MSRs. Cc: Ruiyu Ni Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong --- .../Include/Library/RegisterCpuFeaturesLib.h | 25 ++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h b/UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h index 9331e49d13..e6f0ebe4bc 100644 --- a/UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h +++ b/UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h @@ -73,10 +73,17 @@ #define CPU_FEATURE_PPIN (32+11) #define CPU_FEATURE_PROC_TRACE (32+12) -#define CPU_FEATURE_BEFORE_ALL BIT27 -#define CPU_FEATURE_AFTER_ALL BIT28 -#define CPU_FEATURE_BEFORE BIT29 -#define CPU_FEATURE_AFTER BIT30 +#define CPU_FEATURE_BEFORE_ALL BIT23 +#define CPU_FEATURE_AFTER_ALL BIT24 +#define CPU_FEATURE_BEFORE BIT25 +#define CPU_FEATURE_AFTER BIT26 + +#define CPU_FEATURE_THREAD_BEFORE CPU_FEATURE_BEFORE +#define CPU_FEATURE_THREAD_AFTER CPU_FEATURE_AFTER +#define CPU_FEATURE_CORE_BEFORE BIT27 +#define CPU_FEATURE_CORE_AFTER BIT28 +#define CPU_FEATURE_PACKAGE_BEFORE BIT29 +#define CPU_FEATURE_PACKAGE_AFTER BIT30 #define CPU_FEATURE_END MAX_UINT32 /// @} @@ -116,6 +123,16 @@ typedef struct { CPUID_VERSION_INFO_EDX CpuIdVersionInfoEdx; } REGISTER_CPU_FEATURE_INFORMATION; +// +// Describe the dependency type for different features. +// +typedef enum { + NoneDepType, + ThreadDepType, + CoreDepType, + PackageDepType +} CPU_FEATURE_DEPENDENCE_TYPE; + /** Determines if a CPU feature is enabled in PcdCpuFeaturesSupport bit mask. If a CPU feature is disabled in PcdCpuFeaturesSupport then all the code/data -- 2.15.0.windows.1