skl_pcode_request(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– skl_pcode_request πŸ’–

okay so this is a page from the Kernel API Manual β€” yes bestie, the Kernel API Manual, we're in the big leagues now β€” and it's all about skl_pcode_request, which is literally the function that "sends a PCODE request until acknowledgment". like it just keeps knocking until somebody answers the door πŸšͺ✨


✨ SYNOPSIS ✨

int skl_pcode_request (struct intel_uncore *uncore , u32 mbox , u32
       request , u32 reply_mask , u32 reply , int timeout_base_ms );

that's the whole vibe, no cap. 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • uncore β€” the uncore. that's it, that's the description. iconic minimalism honestly πŸ’…
  • mbox β€” the PCODE mailbox ID that this request is being sent to πŸ“¬
  • request β€” the request ID, like the little name tag on your request 🏷️
  • reply_mask β€” the mask used to check whether the request got acknowledged πŸ”
  • reply β€” the value used to check whether the request got acknowledged βœ…
  • timeout_base_ms β€” the timeout for polling with preemption enabled ⏰

🌸 DESCRIPTION 🌸

so the way this works: it keeps resending the request to mbox until one of three things happens β€” PCODE acknowledges it, PCODE reports an error, or an overall timeout of timeout_base_ms+50 ms expires. 😭

the request counts as acknowledged once the PCODE reply dword equals reply after applying reply_mask. got it? mask first, then compare. that's the whole check, fr fr. ✨

the polling happens in two phases, and this part matters:

  1. first it polls with preemption enabled for timeout_base_ms 🧚
  2. if that times out, it goes for another 50 ms with preemption disabled πŸ’€

and what do you get back?

  • returns 0 on success πŸŽ‰
  • returns -ETIMEDOUT in case of a timeout ⏳
  • returns <0 in case of some other error as reported by PCODE 🚨
no cap, the two-phase polling is real β€” the first round keeps preemption on, and only the extra 50 ms goes preemption-off. don't mix those up bestie 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/gpu/drm/i915/intel_pcode.c β€” go read it, iykyk πŸ“–πŸ”₯

and that's the page!! 🌈 source and version vibes come courtesy of ./drivers/gpu/drm/i915, dated October 2026, and this whole thing is skl_pcode_request(9) β€” slay, bye bestie πŸ’œπŸ¦‹πŸŽ€

πŸ“¦ where this page comes from