Add Intel Linear Address Masking (LAM) support to <sys/platform/x86.h>.
HAS_CPU_FEATURE (LAM) can be used to detect if LAM is enabled in CPU.
LAM modifies the checking that is applied to 64-bit linear addresses,
allowing software to use of the untranslated address bits for metadata.
@item
@code{KL} -- AES Key Locker instructions.
+@item
+@code{LAM} -- Linear Address Masking.
+
@item
@code{L1D_FLUSH} -- IA32_FLUSH_CMD MSR.
#define bit_cpu_FSRS (1u << 11)
#define bit_cpu_FSRCS (1u << 12)
#define bit_cpu_HRESET (1u << 22)
+#define bit_cpu_LAM (1u << 26)
/* COMMON_CPUID_INDEX_19. */
#define index_cpu_FSRS COMMON_CPUID_INDEX_7_ECX_1
#define index_cpu_FSRCS COMMON_CPUID_INDEX_7_ECX_1
#define index_cpu_HRESET COMMON_CPUID_INDEX_7_ECX_1
+#define index_cpu_LAM COMMON_CPUID_INDEX_7_ECX_1
/* COMMON_CPUID_INDEX_19. */
#define reg_FSRS eax
#define reg_FSRCS eax
#define reg_HRESET eax
+#define reg_LAM eax
/* COMMON_CPUID_INDEX_19. */
CHECK_CPU_FEATURE (FSRS);
CHECK_CPU_FEATURE (FSRCS);
CHECK_CPU_FEATURE (HRESET);
+ CHECK_CPU_FEATURE (LAM);
CHECK_CPU_FEATURE (AESKLE);
CHECK_CPU_FEATURE (WIDE_KL);