5

I'm using some basic processor detection in an installer, to determine which version of a software package should be available to the user. Currently, I'm going through WMI to get some basic information, but I found out that doing that, I very regularly get unreliable results for the CPU features (CPUID is apparently poorly supported on a good number of mobile processors).

To avoid this kind of issue and to speed things up, I've been looking at getting the processor capabilities from the windows registry instead -- after all, the information should all be available there, under HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor{n} Reading a key from the registry makes the installer much simpler in code, doesn't have to call out to WMI (slow and can fail since I'd have to rely on calling out to a language like VBScript with WMI access, while registry operations are supported as standard in my development scripting language) and should avoid getting incorrect information from CPU value issues through it.

Sure, enough, I found a wealth of information, but the most important part, the "FeatureSet" value stored there, which I assume is a DWORD containing flags about available processor features like SIMD instruction sets etc., is not documented anywhere. I've spent a good while searching the 'net now trying to find any sort of documentation about this registry value, to no avail.

Does anyone have a document outlining or describing the bits in that registry value?

4
  • 1
    I'm not sure about the bits but is IsProcessorFeaturePresent the API you could use? Commented Jul 21, 2013 at 11:21
  • I'm aware of other methods to get processor features, but since the installer is not written in a language with direct access to the WinAPI, I'm looking for the info needed to get the features without having to probe the hardware or API directly. Commented Jul 21, 2013 at 12:27
  • It is documented in the processor manuals Commented Jul 21, 2013 at 12:42
  • I'm afraid not - that's an intel-specific hardware manual that isn't describing this windows registry value. of note: the value does not seem to conform to the CPUID response value at all. If it was, I wouldn't have such a hard time trying to figure this one out. Commented Jul 21, 2013 at 12:48

1 Answer 1

1

The bytes returned in the FeatureSet correspond to the FeatureBits field of the KCPRB structure.

While they aren't specifically documented anywhere, this site lists the corresponding bits as they map to various headers:

FeatureBits in the KPRCB

Microsoft’s names for a smattering of the feature bits are known from assembly-language headers KS386.INC and KSAMD64.INC in various development kits, starting with the Device Driver Kit (DDK) for Windows Server 2003 SP1. Names for many feature bits might easily be hypothesised, since most correspond directly to a single bit in output from one or another cpuid leaf.

Those files in the Windows SDK (ks386.inc and ksamd.inc) contain 7 of the flags, but the comments give the internal variable name KeFeatureBits which you can use to search the SDK for many other tests of other bits.

Scrolling down the list, the bits largely seem to match a subset of flags in the CPUID, but in a different order, and none of them appear to identify SIMD.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.