Function get_cpuid_info

Synopsis

#include "breeze/cpu/get_cpuid_info.hpp"

cpuid_result get_cpuid_info(std::uint32_t eax, std::uint32_t ecx)

Description

Executes the CPUID instruction with the provided values in EAX and ECX.

Precondition
The CPUID instruction is supported (this is always true on x86_64 CPUs).
Returns
A struct with the values of EAX, EBX, ECX, EDX returned by the CPUID instruction itself.
Note
Note that all the values (either in input and output) are 32-bit. This is not by mistake: the CPUID instruction still uses 32-bit values even in 64-bit mode.
Note
It's intended that this function is the lowest level before dealing with assembly. And that higher level interfaces be defined upper in the library/application logic.

Mentioned in

Source

Line 60 in breeze/cpu/get_cpuid_info.hpp.