Add semantic Intel bi-directional PROCHOT control - #96
Conversation
|
I'm quite interested in this, as I was myself considering adding something to fix the recurring PROCHOT issues in Intel laptops. From my understanding, it is no longer possible to disable BD_PROCHOT on recent hardware, as the firmware will lock it. This will be reflected in e.g. ThrottleStop UI.
|
|
I'm interested in the answers to @hexawyz's questions too. Also, I changed this to draft, please test it on the unrestricted driver (you'll have to use 2.1.0 or your own builds because 2.2.0 accidentally shipped with signature verification enabled on the unrestricted driver as well) before marking it as ready. |
|
Thanks @hexawyz and @namazso . I reran the verification and will keep this PR in draft until the unrestricted-driver test is complete. The complete module source is IntelBidirProchot.p, split across these two commits: Fresh build with the repository include files and Pawn 4.1.7152: pawncc IntelBidirProchot.p -iinclude -C64 -;+ -(+ -p Hardware validation performed so far Target machine:
I also built a companion hardware-validation harness. It pins the thread to each logical processor, reads The relevant policy and assertion are: csharp AssertEqual(originalClockModulation, verifiedClockModulation); Results: Controller build: succeeded, 0 warnings, 0 errors Verified readback on logical processors 0..3: Observed recovery event on this laptop: Important scope distinction: those hardware results were obtained through the existing pinned MSR-driver backend, not by loading this Pawn module. They validate the exact read/modify/write policy on the target laptop, but they are not a substitute for the PawnIO unrestricted-driver test requested here. Answers to the three questions
Remaining PawnIO-specific test This system currently has PawnIO 2.2.0. The freshly compiled unsigned AMX is rejected with I will test the AMX with PawnIO 2.1.0 unrestricted (or a locally built unrestricted driver), capture each ioctl result/readback, and only then mark the PR ready. |
Summary
Adds a semantic module for reading and controlling the Intel bi-directional PROCHOT input response without exposing arbitrary MSR writes.
Intel documents bit 0 of MSR_POWER_CTL (0x1FC) as ENABLE_BIDIR_PROCHOT. Clearing that bit makes the processor ignore an externally asserted PROCHOT input; it does not disable the processor's internal adaptive thermal monitor or THERMTRIP protection.
Intel SDM Volume 4 reference:
https://cdrdv2-public.intel.com/874253/335592-090-sdm-vol-4.pdf
Intel bi-directional PROCHOT behavior:
https://edc.intel.com/content/www/us/en/design/products/platforms/details/meteor-lake-u-p/core-ultra-processor-datasheet-volume-1-of-2/002/bi-directional-prochot/
Exposed operations
ioctl_bidir_prochot_statusreads the current/saved response state, raw MSR_POWER_CTL, IA32_THERM_STATUS and IA32_PACKAGE_THERM_STATUS.ioctl_set_bidir_prochotchanges only ENABLE_BIDIR_PROCHOT and verifies readback.ioctl_keep_bidir_offdisables the response, verifies readback, and intentionally preserves the disabled state when the module unloads. Firmware or a processor reset may initialize the MSR again, so callers can reapply this policy at boot/resume.ioctl_restore_bidir_prochotexplicitly restores the response state captured when the module loaded and restores the normal unload behavior.ioctl_keep_bidir_off.Safety properties
Validation
Compiled with the bundled Pawn 4.1.7152 compiler and repository CI flags:
Completed successfully with zero warnings.
The main review questions are whether the family-6 plus successful-MSR-read gate is sufficiently conservative and whether the explicit persistent operation is preferable to requiring clients to keep a module handle open.