pmt_telem_read(9)
π pmt_telem_read β like, the kernel manual, but make it make sense
okay bestie, welcome to pmt_telem_read(9) from the Kernel API Manual, section 9, no cap. this is the one that reads qwords out of counter sram using a sample id, and honestly? it's giving "short function, big responsibilities" π
β¨ NAME β¨
pmt_telem_read β read qwords from counter sram using the sample id π§
πΈ SYNOPSIS πΈ
int pmt_telem_read (struct telem_endpoint *ep , u32 id , u64 *data , u32 count );
π¦ ARGUMENTS π¦
epβ the telemetry endpoint you're reading from, that's the whole vibe of the call πidβ the beginning sample id of the metric(s) you want read, like the starting point of the gossipdataβ an allocated qword buffer, you gotta bring your own container bestie, we just fill itcountβ how many qwords you're asking for, exactly how many, don't be greedy
π DESCRIPTION π
so here's the tea: callers must ensure reads are aligned β that's on you, not us. periodt. π₯
and when the call returns -ENODEV, that means the device has been removed, and callers should unregister the telemetry endpoint. like, it's gone gone. go clean up your endpoint, bestie π
β RETURN β
0β Success π slay, the read worked, we ate-ENODEVβ The device is not present. it left the chat π-EINVALβ The offset is out bounds π you asked for a spot that doesn't exist, awkward-EPIPEβ The device was removed during the read. Data written but should be considered invalid. π¨ so yes, bytes got written β but do not trust them, they're lowkey cursed, treat them as invalid fr fr
π SEE ALSO π
- Kernel file
./drivers/platform/x86/intel/pmt/telemetry.hβ the source of truth, go read it iykyk pmt_telem_get_next_endpoint(9)pmt_telem_register_endpoint(9)pmt_telem_unregister_endpoint(9)pmt_telem_get_endpoint_info(9)pmt_telem_find_and_register_endpoint(9)pmt_telem_read32(9)β yeah there's a 32-bit one too, we're inclusive π«Ά
gentle reminder bestie: if you get -EPIPE, the data is written but it's invalid β don't build your whole personality on it, okay? π
and that's the whole page! π this gem lives in ./drivers/platform/x86/intel/pmt, it's dated October 2026, and it's the pmt_telem_read(9) page. mwah, thanks for reading, go align your reads πβ¨πΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms