tree: 6719dad31fea8d41a3b5e791f8d6f960643762d6 [path history] [tgz]
  1. amd-a10-7870k.inc
  2. amd-ryzen-5-1500x.inc
  3. amd-ryzen-7-1700.inc
  4. amd-ryzen-7-2700x.inc
  5. amd-ryzen-9-3950x-virtualbox-hyperv.inc
  6. amd-ryzen-9-3950x-virtualbox-kvm.inc
  7. amd-ryzen-9-3950x-vmware.inc
  8. amd-ryzen-9-3950x-wsl2.inc
  9. amd-ryzen-9-3950x.inc
  10. amd-ryzen-threadripper-1950x.inc
  11. amd-ryzen-threadripper-2970wx.inc
  12. converter.py
  13. intel-atom-330.inc
  14. intel-atom-d510.inc
  15. intel-atom-x5-z8350.inc
  16. intel-celeron-3855u.inc
  17. intel-core-i3-3240.inc
  18. intel-core-i3-6100.inc
  19. intel-core-i5-7300u.inc
  20. intel-core-i7-2600k.inc
  21. intel-core-i7-6500u.inc
  22. intel-core-i7-6700k.inc
  23. intel-core-m3-7y30.inc
  24. intel-core2-6300.inc
  25. intel-xeon-e5-2690-v3.inc
  26. intel-xeon-e5-2690-v4.inc
  27. intel-xeon-e5520.inc
  28. README.md
zircon/kernel/lib/arch/testing/data/cpuid/README.md

CPUID value corpus

This directory holds a corpus of CPUID values from a variety of microprocessors. Each file gives the set of CPUID values for a particular one and is meant to be #include'd with the DEFINE_CPUID_VALUES macro defined, wherein in each line is of the form

DEF_CPUID_VALUES(leaf, subleaf, EAX, EBX, ECX, EDX)

Usage would look like

#define DEFINE_CPUID_VALUES(leaf, subleaf, eax, ebx, ecx, edx) ...
#include "data/cpuid/my-microprocessor.inc"
#undef DEFINE_CPUID_VALUES

For the convenience of extending the corpus without writing the values out by hand, one can use converter.py to convert the raw output of the cpuid tool to our format. (The tool is only available on Linux.) The python script expects the raw cpuid output on stdin and writes the output to stdout.

Example usage:

cpuid -r1 | converter.py > cpuid.inc

(cpuid -r may also be piped into the script.)

Any addition to the corpus is expected to be given an associated value in arch::testing::X86Microprocessor and a set of expectation tests extending those written in cpuid-corpus-tests.cc.