package janestreet_cpuid

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

Module gateway into AMD specific flags and functionality. *

All of the information in this file comes from (currently) page 1779 of the AMD Architecture Programmer's Manual, Volumes 1-5. Specifically, Volume 3: Appendix E detailing the CPUID instruction. *

type t
val maximum_leaf : t -> int
val create : Cpuid__.Cpuid_intf.Basic_info.t -> t
module Version_and_feature_information : sig ... end

On AMD CPUs the leaf retrieved when EAX is set to 0x1 contains processor model information as well as some basic features about the processor. *

val canonical_identifier : t -> string

Canonical identifier similar to the one we use on Intel CPUs to index into a list of supported performance counters.

See Intel_cpuid.canonical_identifier for a description of that. *

The leaf at 0x7 is special because in addition to putting 0x7 it also lets you put a value into ECX to get a particular feature subleaf. In this case we want ECX=0x0, and any processor which supports EAX=0x7 (which we do check) supports ECX=0x0.

OCaml

Innovation. Community. Security.