package janestreet_cpuid

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Intel.Version_and_feature_informationSource

On Intel CPUs the leaf retrieved when EAX is set to 0x1 contains processor model information as well as some basic features about the processor. Typically if you're checking a flag in this section it's probably available on every machine that we run on (our machines tend towards modernity) but good on you for checking!

Sourcemodule Eax : sig ... end

This information can be used to build a unique identifier for a given processor, which can be useful for any pre-computed data which you need to index into based on what machine it's running on.

Sourcemodule Ebx : sig ... end

This is the only field in the CPUID which changes when called multiple times. The initial_apic_id field changes based on which core the process is currently running on. *

Sourcemodule Ecx_flags : sig ... end
Sourcemodule Edx_flags : sig ... end
Sourcetype t = {
  1. eax : Eax.t;
  2. ebx : Ebx.t;
  3. mutable ecx : Ecx_flags.t;
  4. mutable edx : Edx_flags.t;
}
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
Sourceval canonical_version_string : t -> string
Sourceval retrieve : unit -> t
Sourcemodule For_testing : sig ... end
OCaml

Innovation. Community. Security.