RtlGetEnabledExtendedFeatures routine

The RtlGetEnabledExtendedFeatures routine returns a mask of extended processor features that are enabled by the system.

Syntax


ULONG64 RtlGetEnabledExtendedFeatures(
  _In_ ULONG64 FeatureMask
);

Parameters

FeatureMask [in]

A 64-bit feature mask. This parameter indicates a set of extended processor features for which the caller requests information about whether the features are enabled. If a mask bit is one, the caller requests information about the feature that corresponds to this mask bit. The caller sets all other mask bits to zero. Set this parameter to (ULONG64)(-1) to get the mask of all enabled features. To determine whether a particular set of features is enabled, set this parameter to the bitwise OR of one or more of the following XSTATE_MASK_XXX flag bits:

ValueMeaning
XSTATE_MASK_LEGACY_FLOATING_POINT

The floating-point extension (x87/MMX).

XSTATE_MASK_LEGACY_SSE

The streaming SIMD extension (SSE).

XSTATE_MASK_LEGACY

Both the x87/MMX and SSE extensions.

XSTATE_MASK_GSSE

The Intel Sandy Bridge (formerly Gesher) SSE extension.

 

Return value

RtlGetEnabledExtendedFeatures returns a 64-bitmask of enabled extended processor features. The routine calculates this mask as the intersection (bitwise AND) between all enabled features and the value of the FeatureMask parameter. For more information about the features that are indicated by this return value, see XSTATE_MASK_XXX.

RtlGetEnabledExtendedFeatures returns 0 if the XSAVE and XRSTOR instructions are disabled by the system. This happens even if the system supports XSTATE_MASK_LEGACY_FLOATING_POINT and XSTATE_MASK_LEGACY_SSE features. Use ExIsProcessorFeaturePresent or CPUID to determine the availability of x87, MMX, and SSE processor features on x86 or x64 systems.

Remarks

Another routine, ExIsProcessorFeaturePresent, indicates whether an extended processor feature is available. Unlike RtlGetEnabledExtendedFeatures, however, it does not indicate whether the operating system has enabled the feature for use by kernel-mode drivers.

Requirements

Target platform

Universal

Version

Available in Windows 7 and later versions of the Windows operating system.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntdll.lib (user mode);
NtosKrnl.lib (kernel mode);
OneCoreUAP.lib on Windows 10

DLL

NtDll.dll (user mode);
NtosKrnl.exe (kernel mode)

IRQL

PASSIVE_LEVEL

See also

ExIsProcessorFeaturePresent

 

 

Send comments about this topic to Microsoft

Show: