Add semantic Intel bi-directional PROCHOT control - #96
celsonaemen wants to merge 2 commits into
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. |
|
@namazso @hexawyz I recovered the local orchestration log and Windows events for the September 1 unrestricted-driver attempt. Here is the verified result (times are UTC-03:00):
Therefore, this particular attempt was blocked at driver loading; it does not constitute successful validation of the unsigned AMX or its ioctls. The earlier MSR-backend results remain separate from PawnIO module validation. I also experienced a blue screen around the broader testing/reboot period. I have not established its cause or matched it conclusively to this attempt. Windows contains earlier bugcheck records as well, and dump-writing failures were logged; no crash dump was found in the locations checked. I cannot attribute that blue screen to PawnIO or this module. Could you recommend the supported setup/build and signing prerequisites for testing the unrestricted driver on this Windows 11 x64 / Ice Lake system? I am keeping the PR in draft pending actual module validation and the model-qualified lock detection / independent PROCHOT-log clearing work discussed above. |
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.