aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/include/intelblocks/msr.h
diff options
context:
space:
mode:
authorPratik Prajapati <pratikkumar.v.prajapati@intel.com>2017-10-11 11:48:04 -0700
committerAaron Durbin <adurbin@chromium.org>2017-10-20 20:06:21 +0000
commit0e5eb46bb79d9737594eb296043c3e2d65a609fb (patch)
tree95f8b6a7ea54ed9ecd3d0cf9da618bfefa098667 /src/soc/intel/common/block/include/intelblocks/msr.h
parent90ebf96df59bfe9d60721ac881c07c00df29c418 (diff)
intel/common/block/sgx: Add API to enumerate SGX resources and update GNVS
Intel SDM: Table 36-6. CPUID Leaf 12H, Sub-Leaf Index 2 is called to enumerate SGX resources. Change-Id: I62f3fd8527e27040336c52bc78768035f4b7e5a9 Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com> Reviewed-on: https://review.coreboot.org/21966 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/common/block/include/intelblocks/msr.h')
-rw-r--r--src/soc/intel/common/block/include/intelblocks/msr.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/include/intelblocks/msr.h b/src/soc/intel/common/block/include/intelblocks/msr.h
index 6236915c53..45f201c7da 100644
--- a/src/soc/intel/common/block/include/intelblocks/msr.h
+++ b/src/soc/intel/common/block/include/intelblocks/msr.h
@@ -130,4 +130,13 @@
#define PRMRR_SUPPORTED (1<<12)
#define SGX_SUPPORTED (1<<2)
+/* Intel SDM: Table 36-6.
+ * CPUID Leaf 12H, Sub-Leaf Index 2 or Higher for enumeration of
+ * SGX Resources. Same Table mentions about return values of the CPUID */
+#define SGX_RESOURCE_ENUM_CPUID_LEAF (0x12)
+#define SGX_RESOURCE_ENUM_CPUID_SUBLEAF (0x2)
+#define SGX_RESOURCE_ENUM_BIT (0x1)
+#define SGX_RESOURCE_MASK_LO (0xfffff000UL)
+#define SGX_RESOURCE_MASK_HI (0xfffffUL)
+
#endif /* SOC_INTEL_COMMON_MSR_H */