STRUCT CP_HEADER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct cp_header(9) πŸ’–

okay bestie, so this is a page from the Kernel API Manual about struct cp_header β€” yes the whole manual section 9, we're doing kernel internals today, slay πŸŽ€

✨ NAME ✨

struct cp_header β€” the SST-CP (core-power) header, and yes it does exactly what it says on the tin 🫢

🌸 SYNOPSIS 🌸

struct cp_header {
    u64 feature_id :4;
    u64 feature_rev :8;
    u64 ratio_unit :2;
    u64 reserved :50;
 };

like, look at those bitfields. little bitty slivers of a u64. it's giving precision πŸ’…

πŸ¦‹ Members πŸ¦‹

  • feature_id β€” the "which feature even are we" field, and the values are: 0=SST-CP, 1=SST-PP, 2=SST-BF, 3=SST-TF. pick your fighter 😀
  • feature_rev β€” the interface version number for this SST feature. it's the vibe check for how new your interface is ⭐
  • ratio_unit β€” frequency ratio unit. 00 means 100MHz. all others are reserved β€” so like, don't go inventing values, bestie πŸ’€
  • reserved β€” reserved for future use. it's just sitting there, 50 whole bits, waiting for its main character moment 🌈

πŸ‘‘ Description πŸ‘‘

lowkey the whole point: this structure is used to store the SST-CP header. and it's packed to the same format as defined in the specifications β€” so the layout is not a suggestion, it's the spec, periodt ✨

πŸ’œ SEE ALSO πŸ’œ

Kernel file: ./drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c β€” that's the one, that's where it lives 🧚

and then a whole friend group of structs and friends, all linked here:

  • struct sst_header(9)
  • struct pp_header(9)
  • struct feature_offset(9)
  • struct levels_offset(9)
  • struct pp_control_offset(9)
  • struct pp_status_offset(9)
  • struct perf_level(9)
  • struct tpmi_per_power_domain_info(9)
  • struct tpmi_sst_struct(9)
  • struct tpmi_sst_common_struct(9)
  • map_cdies(9)
  • map_partition_power_domain_id(9)

okay that's the whole page, no cap πŸ’– this cutie came out of ./drivers/platform/x86/intel/s... (source/version, yes it's truncated like that in the footer, iconic) and it's dated October 2026, and the footer also reminds us it's all about struct cp_header(9) β€” bye bestie, go read some kernel source πŸ“πŸ”₯

πŸ“¦ where this page comes from