The IntelClientImcClock.p module is a proposed read-only PawnIO module designed to provide the Intel client IMC/QCLK clock-ratio for Panther Lake and related Core Ultra platforms. It aims to replace generic hardware access with a safe, high-level operation that returns the ratio, reference clock mode, and gear information, allowing consumers like CapFrameX to calculate the memory clock using their own measured bus clock.
Key Design Principles:
- Narrow API: Exposes a single primary IOCTL for reading clock information.
- Security: Does not expose generic PCI config or arbitrary physical-memory access; all registers and offsets are hardcoded and allowlisted.
- Platform Specificity: Targets Intel x64 client/SoC platforms, specifically validating against Panther Lake (PTL) and Core Ultra variants.
/// Read Intel client IMC/QCLK clock-ratio information.
///
/// @param in_size Must be 0
/// @param out [0] = ABI version, currently 1
/// @param out [1] = source enum
/// @param out [2] = ratio
/// @param out [3] = reference clock mode enum
/// @param out [4] = gear enum or 0 if unknown/not applicable
/// @param out [5] = raw register value low dword
/// @param out [6] = flags
/// @out_size Must be 7
/// @return STATUS_SUCCESS if a supported source produced valid data.
/// STATUS_NOT_SUPPORTED if the CPU/platform/register source is unsupported.
/// Other NTSTATUS on PCI/MMIO read failure.
DEFINE_IOCTL_SIZED(ioctl_read_imc_clock, 0, 7)