STRUCT CPUID_PARSE_ENTRY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ NAME πŸ¦‹

okay so bestie, welcome to the Kernel API Manual πŸ’… β€” this page is all about struct cpuid_parse_entry, aka the CPUID parse table entry. literally one struct, one job, and it ate. ✨

🌸 SYNOPSIS 🌸

struct cpuid_parse_entry {
    unsigned int    leaf;
    unsigned int    subleaf;
    unsigned int    regs_offs;
    unsigned int    info_offs;
    unsigned int    maxcnt;
    void (*read)(const struct cpuid_parse_entry *e, const struct cpuid_output *o);
 };

no cap, that's the whole vibe. now let's meet the members πŸ‘‘

πŸŽ€ Members πŸŽ€

  • leaf β€” the leaf number that's getting parsed πŸ“ like, this is the CPUID leaf, bestie, it's giving main character energy.
  • subleaf β€” the subleaf number to be parsed πŸ¦‹ the little sibling of leaf, and yes it also matters.
  • regs_offs β€” offset within struct cpuid_leaves where the CPUID query output gets saved πŸ’Ύ this is the one you pass to cpuid_table_regs_p. iykyk.
  • info_offs β€” offset within struct cpuid_leaves where the CPUID query parse info gets saved πŸ“ and this one goes to cpuid_table_info_p. two offsets, two destinations, no mixing them up bestie πŸ™ˆ
  • maxcnt β€” the maximum number of output storage entries available for the CPUID query πŸ”₯ that's the cap, literally and figuratively.
  • read β€” the read function for this entry πŸ‘‘ it must save the parsed CPUID output to the passed parsed and filled. a generic implementation is provided at cpuid_read_generic, so you don't have to hand-roll it if you don't wanna 🫢

🌈 SEE ALSO 🌈

  • Kernel file ./arch/x86/kernel/cpu/cpuid_parser.h πŸ“‚
  • struct cpuid_output(9) πŸ’–
go read those too, bestie β€” this struct doesn't exist in a vacuum and you know it ✨

and that's the whole page, mwah πŸ’‹ this came from ./arch/x86/kernel/cpu, October 2026, straight outta the Kernel API Manual β€” slay, bye πŸŽ€πŸ’œ

πŸ“¦ where this page comes from