read_template_version(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

read_template_version β€” Read the template version from the AFU. This is read_template_version(9), part of the Kernel API Manual, and it's giving "small but iconic kernel page" energy 🫢.

πŸ¦‹ SYNOPSIS πŸ¦‹

Okay so the signature is literally:

       int read_template_version (struct pci_dev *dev , struct ocxl_fn_config
       *fn , u16 *len , u16 *version );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device for the AFU. The main-character device, no cap πŸ’….
  • fn β€” the AFU offsets. Yes, "fn" is the offsets here; stay with me πŸ¦‹.
  • len β€” outputs the template length. It's an output, so it's gonna hold the template length 🌸.
  • version β€” outputs the major<<8,minor version. Exactly that combo, periodt ⭐.

✨ DESCRIPTION ✨

Returns 0 on success, negative on failure. That's it, that's the whole vibe check β€” success is 0, failure is negative 😭.

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/misc/ocxl/config.c has the related lore, plus these function references: get_function_0(9), get_dvsec_vendor0(9), and read_afu_lpc_memory_info(9) πŸ‘‘.


Signed off with πŸ’– from ./drivers/misc/ocxl, dated October 2026, for read_template_version(9). Bye bestie, go read those template versions 🧚✨.

πŸ“¦ where this page comes from