Questions tagged [cpuid]

CPUID is an Intel x86 and x86_64 processor instruction that returns the processor type and the presence of particular features.

Originally introduced by Intel, the CPUID instruction returns the processor type and the presence of features such as MMX/SSE.

163 questions
3
votes
2 answers

Load-time dynamic link library dispatching

I'd like my Windows application to be able to reference an extensive set of classes and functions wrapped inside a DLL, but I need to be able to guide the application into choosing the correct version of this DLL before it's loaded. I'm familiar…
Kumputer
  • 588
  • 1
  • 6
  • 22
3
votes
1 answer

What is the CPUID standard function 01H?

I need to check ECX for bit 30, which is a CPU feature necessary for RDRAND. From the RDRAND Wiki, If supported, bit 30 of the ECX register is set after calling CPUID standard function 01H. I don't exactly know what this means. "Standard function…
8protons
  • 3,591
  • 5
  • 32
  • 67
3
votes
0 answers

CPUID family/model number for AMD processors

I'd like to use CPUID (eax=1) to check for a particular range of AMD CPU's, in particular, the Bulldozer line, but I can't seem to find any information online as to what the model number range of these CPU's are. That said, I can get a decent range…
Kumputer
  • 588
  • 1
  • 6
  • 22
3
votes
1 answer

Implementing __cpuid example from MSDN gives insanely large numbers

I'm quickly implementing this code http://msdn.microsoft.com/en-us/library/hskdteyh(v=vs.80).aspx into my program, since I needed to get some CPU info, however when i get to this part of the code: __cpuid(CPUInfo, 0x80000000); nExIds =…
ulak blade
  • 2,515
  • 5
  • 37
  • 81
3
votes
1 answer

CPUID wrong values?

My CPU is the Intel Core2Quad Q9300 2.5GHz. CPU-Z gives me as values for Family: 6, Model:7 and Stepping:7. Trying to write a x86 assembly using the cpuid instruction with EAX=1, all I get is a value of 0000 0010 in AL (where I suppose it should…
sample_nickname
  • 301
  • 2
  • 6
  • 14
3
votes
1 answer

CPUID in x86 Architecture

I am trying to access the Information using CPUID in C++. I have produced this code so far and could not go any longer. I found some useful articles here and on the web but they did not seem to help me. I am supposed to use instructions and…
Sasha
  • 492
  • 2
  • 6
  • 21
2
votes
1 answer

Which x86 CPUID return values cannot be changed on a processor?

I know that the Name String on some AMD processors can be changed to return a different string. I believe the BIOS can disable cache or SSE support which would necessitate that the bits that indicate cache/SSE support would have to return different…
JohnPS
  • 2,518
  • 19
  • 17
2
votes
0 answers

Knowing if we are running in a VM programmatically

I'm trying to find a way to know if my program is running in a VM programmatically. This needs to work on any OS and any architecture (x86, or ARM). Using the CPUID in x86 with eax=1, we are able to see if the hypervisor bit is set to 1, and this…
Flyfe
  • 33
  • 5
2
votes
0 answers

How to detect heterogeneous CPU topologies on Linux?

Many recent CPUs out there--Alder Lake from Intel and many big.LITTLE designs from ARM--have heterogeneous CPU topologies: some cores are faster than others. There exists good ways to detect such CPUs on Windows and macOS, but Linux/Android seems…
Myria
  • 3,372
  • 1
  • 24
  • 42
2
votes
1 answer

Integrating x86 assembly in C++ project for old MS-DOS system information program

I'm new to C++ programming and have always wanted to write a system information program for MS-DOS. I'm currently using the latest DigiMars C++ compiler and MASM 6.13 for my project. The project settings are for large memory model with a target…
Charlie Dobson
  • 193
  • 1
  • 11
2
votes
2 answers

CallNtPowerInformation and GetPwrCapabilities under Linux

I have code that returns information about the running CPUs on an intel-based system under Windows. It does this with the CallNtPowerInformation and GetPwrCapabilities functions. Typical information returned is the maximum Mhz, current Mhz, maximum…
vy32
  • 28,461
  • 37
  • 122
  • 246
2
votes
2 answers

Packing an int into a bitfield in C++

I'm converting some code from ASM to C++, the ASM simply looks like so: mov dword ptr miscStruct, eax the Struct looks like: struct miscStruct_s { uLong brandID : 8, chunks : 8, //etc } miscStruct; Is there an easy one-two…
Riley
  • 45
  • 5
2
votes
1 answer

Checking for ID flag in RFLAGS using inline assembly in C

I have written the following inline assembly to try check for the ID flag. I know that it should be set because I can use the cpuid instruction, however this function returns 0 when I test it. _Bool /* Checks whether the cpu has the cpuid…
Leander
  • 35
  • 5
2
votes
3 answers

How do I get every supported CPU flags as QEMU CPU flags?

In my QEMU virtual machine, I need to use a specific CPU model, but with the maximum CPU flags enabled (for performance). To do that I wanted to use /proc/cpuinfo and use grep and cut to get the flags, but the problem is that QEMU uses different…
ShiningLea
  • 132
  • 1
  • 12
2
votes
1 answer

lscpu and cpuid say I have AVX2, but vpsllvw does not work

If I run lscpu or look in /proc/cpuinfo, they both say that my processor supports AVX2. $ lscpu | grep -o avx2 avx2 However, when I used vpsllvw in my code, it gave SIGILL. bits 64 global main section .text main: movdqa xmm0, [initial] …