Skip to content

Releases: Cyridd/cmpunlocker

CMP 40HX Windows Unlock v2.0.2

Choose a tag to compare

@Cyridd Cyridd released this 04 Oct 19:50
2ddce62

v2.0.2: Gen2 PL0 parity with PZH1gdmu's v3.2.0

This release brings the Windows Gen2 register sequence in line with v3.2.0 release by PZH1gdmu.
It fixes a BSOD during Gen2 bring-up that some users hit with earlier builds (#9).

Background

PZH1gdmu and their repository became unavailable a few days before this release.
The reason is unknown. The v3.2.0 release was obtained from a copy downloaded earlier,
and it is no longer possible to fetch it from the original location.

The PL0 register table used here was recovered by disassembling
main.gen2Main / main.gen2WritePL0 from that v3.2.0 binary
, not taken from
published source. The recovered table, the read-modify-write masks, and the
reconstructed PnP fallback sequence are documented in
windows/tools/inst40hx/gen2_pl0_v2.go. If you still have the original v3.2.0
build, please compare its hash against the one above.

Fixed

  • BSOD during Gen2 bring-up (#9).

Changed

  • PL0 sequence matches 3.2.0.
    • New PL_LINK_RATE (0x8C1C0) write.
    • LINK_CONFIG_0 and PL_LINK_RATE are now read-modify-write with a masked
      readback check. Previously LINK_CONFIG_0 was written as the constant
      0x80085800.
  • BAR0 / BOOT_0 validation on every PL0 write, including after Link Disable
    and PnP recovery, not only once at startup. If the check fails, nothing is
    written and Gen2 aborts safely.
  • Gen2AutoHard now defaults to 0 (off), as in 3.2.0. The GUI policy
    checkbox follows the new default. A manual -hard run is unaffected.
  • New PnP fallback between Stage 1 and Stage 2. If retrain fails, the 40HX
    is disabled/enabled via PnP, the driver is reloaded, and PL0, TLS and retrain
    are redone before Stage 2 is considered. Turn it off with Gen2PnpFallback=0.
    This sequence is reconstructed from the order of calls in 3.2.0, not a
    byte-for-byte copy.

Added

  • -gen2dry: read-only mode. Prints the current PL0 and link registers and
    which bits the fork scheme, the 3.2.0 scheme and the EFI-RMW scheme would
    flip. Writes nothing. Useful for diagnosing before a real run.
  • Log fsync every 100 ms, so the last lines before a BSOD reach the disk.
  • New optional registry switches under HKLM\SOFTWARE\40HXUnlock:
    Gen2WriteLtssmOvr, Gen2WritePlLinkRate, Gen2Pl0EfiRmw
    (the last one is for A/B testing only).

Upgrade notes

  • If you relied on the automatic Link Disable fallback, set
    Gen2AutoHard=1. If the value was already set explicitly, it is kept.
    The key is deleted on uninstall, so a reinstall returns to the new default.
  • With the PnP fallback on, a logon where Stage 1 fails will briefly
    disable/enable the display adapter.
  • Replace your existing 40HXInstaller.exe with the new build. The previous
    binary does not contain these changes.

Credits

CMP 40HX Windows Unlock v2.0.1

Choose a tag to compare

@Cyridd Cyridd released this 26 Sep 12:46
e4b4d46

v2.0.1

Secure Boot coexistence, a runtime boot-manager handoff, ReBAR visibility/control, machine-readable diagnostics, and a new CI pipeline that keeps the shipped EFI provably reproducible.

Highlights

  • Secure Boot can now stay on. Sign the unlock EFI with your own key and the firmware will run it — see the new Secure Boot section.
  • No more separate "Limine" build. The single shipped 40HXUNLK.EFI now honors a runtime --return-to-bootloader load option instead of requiring a special NO_AUTO_CHAINLOAD build.
  • ReBAR is now visible and controllable, not just applied silently — 40HXCheck.exe reports it GPU-Z style, and the installer lets you opt out.
  • 40HXCheck.exe -json for scripting and ticket systems.
  • New CI rebuilds the EFI from source on every push and fails if it doesn't hash-match the committed binary.

Added

  • Secure Boot signing (windows/tools/unlock40x/sign_efi.sh): signs the built EFI with your own db key via sbctl (or sbsign as a fallback), verifies the result actually carries a certificate, and prints the signer so you can confirm it's yours.
  • 40HXInstaller.exe -efi <path> to deploy a signed EFI explicitly; a 40HXUNLK.signed.efi placed next to the installer is also picked up automatically. Deployment now prints the payload's source, SHA-256, and signature state, with an explicit warning if Secure Boot is on and the image is unsigned.
  • PE/Authenticode signature reader (40hxcore/pesign.go, read-only, no WinVerifyTrust dependency) so 40HXCheck.exe can tell you whether the deployed EFI is signed and by whom — including a dedicated secure_boot_blocks_unsigned_efi verdict instead of a generic "not unlocked".
  • --return-to-bootloader EFI load option (aliases --return-to-grub, --return-to-limine) for grub/Limine/rEFInd users: the application applies the unlock and hands control back to your boot manager instead of chainloading Windows.
  • ReBAR reporting and control: 40HXCheck.exe reads the XVE Resizable BAR Control register directly and shows whether the 8 GB resize is in effect (NVIDIA APP/Control Panel never show this for this card). New norebar load option, a "ReBar Unlock" checkbox in the installer GUI, and -rebar/-norebar on the CLI.
  • 40HXCheck.exe -json: a stable, versioned (40hxcheck/v1) machine-readable report with a fixed verdict enum and matching process exit codes (0 = unlocked, 1 = not unlocked, 2 = inconclusive).
  • CI (.github/workflows/ci.yml): builds and vets every Go module on native Windows and via Linux cross-compile, runs unit tests, rebuilds the shipped executables, diffs the generated Windows resource object, and rebuilds the EFI from source inside a pinned toolchain container to confirm 40HXUNLK.EFI still reproduces byte-for-byte.

Changed

  • Replaced the old NO_AUTO_CHAINLOAD=1 build-time experiment (separate binary, never fully reliable) with the runtime load-option handoff above.
  • Installer/checker/uninstaller version bumped to 2.0.1.0.

Upgrade notes

  • Default behavior is unchanged if you don't pass any new options: EFI stays unsigned, Secure Boot must stay off, ReBAR still applies automatically.
  • If you signed your own EFI previously via a custom process, switch to sign_efi.sh + -efi <path> (or the 40HXUNLK.signed.efi sidecar) — the installer now prints the hash/signature state so you can confirm what actually got deployed.

CMP 40HX Windows Unlock v2.0.0

Choose a tag to compare

@Cyridd Cyridd released this 23 Sep 13:15
089d7be

Changes

  • Added English, Russian, and Chinese UI/log translations.
  • Language selection is shared and persisted across the installer, checker, and uninstaller.
  • Fixed duplicate language-change notifications.
  • Added persistent language settings via: HKLM\SOFTWARE\40HXUnlock

CMP 40HX Windows Unlock v1.0.0

Choose a tag to compare

@Cyridd Cyridd released this 20 Sep 12:43
3189ab6

Changes

  • GSP fallback: now hardware-bound to PCI\VEN_10DE&DEV_1F0B, preventing wrong-GPU configuration on multi-GPU systems.
  • UAC elevation: fixed argument quoting/escaping for paths with spaces, quotes, and trailing backslashes.
  • EFI cleanup: standardized CMP40 / CMP40HX naming and clearly marked legacy GA102 data.
  • Installer localization: the Windows installer now supports English, Russian, and Chinese. English is the default language.
  • ReBAR: added CMP 40HX support with 8 GiB BAR1, BAR3 relocation, ACPI-based MMIO placement, mandatory BAR/VRAM verification, and rollback on failure.