[PR #11] [MERGED] Per-machine pipeline: generic probe -> local profile -> tests -> USB stick #118

Closed
opened 2026-10-31 07:01:54 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/windows-GPU-UNLOCK/Windows-GPU-UNLOCK/pull/11
Author: @pavel-shpilev
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @impacifist

Base: main ← Head: feat/per-machine-pipeline


📝 Commits (3)

  • bf07af5 Per-machine pipeline: generic probe -> local profile -> tests -> USB stick
  • 738c606 Merge current profiles and hardened main before reviewing the local pipeline
  • 7c6fc0d Harden local profile capture, image bounds and source-bound staging evidence

📊 Changes

33 files changed (+1879 additions, -55 deletions)

View changed files

📝 .gitignore (+3 -0)
📝 CHANGES.md (+41 -0)
📝 README.ko.md (+6 -0)
📝 README.md (+7 -1)
➕ docs/NEW-MACHINE.en.md (+125 -0)
📝 docs/PORTABILITY.en.md (+2 -2)
📝 internal-boot/boot/diagnostic.c (+7 -4)
📝 internal-boot/boot/diagnostic.h (+2 -0)
📝 internal-boot/boot/full-release.c (+7 -0)
📝 internal-boot/boot/handoff.c (+8 -5)
📝 internal-boot/boot/probe.c (+136 -25)
📝 internal-boot/boot/test-cold-precheck.ps1 (+2 -2)
📝 internal-boot/boot/test-diagnostic.ps1 (+5 -1)
📝 internal-boot/boot/test_cold_precheck.c (+9 -0)
📝 internal-boot/boot/test_probe.c (+2 -2)
➕ internal-boot/boot/test_probe_generic.c (+132 -0)
📝 internal-boot/unlock/build.ps1 (+19 -5)
➕ internal-boot/unlock/local-profile.ps1 (+163 -0)
📝 internal-boot/unlock/machine-profile.h (+16 -3)
📝 internal-boot/unlock/tests/test_3090_experimental.c (+2 -0)

...and 13 more files

📄 Description

Depends on #8, #9 and #10. This branch contains those commits, so the diff here includes them until they merge. The pipeline is the last commit.

Every machine needs its own compile-time profile today, and building one by hand means reading captures, hashing driver images and pinning tests. This PR turns that into a pipeline a machine owner can run. It ends in a local profile that is never committed and is write-eligible only after that machine's own host tests pass. It does not add hardware support. Each local profile is still mock-tested only until someone runs it and reports back.

One command

research/profile/new-machine.ps1 -Drive D -WindowsEspGuid … -Assets …. Run it several times; each run does the next step:

  1. Probe: builds the generic read-only probe and copies it to the USB stick. The user boots it twice, each time after a full shutdown.
  2. Profile, tests and package: turns those captures into a local profile, runs that machine's host tests and builds the headless USB package.
  3. Stick: only with -StageUnlock does it copy the package to the stick.

It changes files only: no partitions, boot entries or firmware settings. Booting is always manual.

Pieces

  • Generic probe (-DGU_PROBE_GENERIC, research/profile/build-probe.ps1)
    • Records every NVIDIA display controller instead of one known card, and writes the PROM to PROM.BIN.
    • Fails to compile in anything but a read-only diagnostic build (no unlock code).
    • -DGU_USB_PROBE lets the diagnostic log to the stick it booted from, the same rule as GU_USB_MEDIA.
  • Generator (research/profile/make-profile.py)
    • Derives every machine-profile.h constant from the captures' own driver-ownership data, driver image dumps and PROM. fwsec-locate runs the production VBIOS parser on the host to find FWSEC-FRTS.
    • Refuses anything outside research/profile/proven.json, and there is no override. Today that allows only:
      • a GA102 card with 0x6000 or 0x5ff4 MiB
      • one RTX at 01:00.0, plus an integrated GPU
      • a non-aggregate ConOut
      • an nvgop-ga1xx build that has already run cleanly on hardware
      • a GPU in its power-on state
      • at least two captures that agree with each other
    • Widening proven.json should be a reviewed change backed by hardware evidence.
  • -DGU_PROFILE_LOCAL / -HardwareProfile local
    • Includes the git-ignored internal-boot/unlock/profile-local.h, and only if the generator wrote it.
    • Write builds (unlock/build.ps1, build-usb.ps1) and stage-usb.ps1 require research/profile/local/test-results.json. That file is bound to the exact header bytes, the fixtures and a fingerprint of the sources, tests, generator and proven.json (internal-boot/unlock/local-profile.ps1).
    • A local profile can only build the headless USB version. Diagnostic builds need no evidence.
  • Generic tests (research/profile/test-profile.ps1)
    • The reviewed-profile host jobs, run against the local profile: 19 jobs, including the production transaction against the card's real PROM and the stock assets, with all EFI simulated.
    • A reviewed profile for another card must reject this machine's config and console graph.
    • Plus test_make_profile.py: 15 refusal cases built by changing one value at a time in the machine's own captures.
  • Test pins for the local profile, .gitignore entries and docs/NEW-MACHINE.en.md.

Verification (on the X870 / RTX 3090 Ti from #10)

  • The generator reproduces all 25 hand-written X870 constants and both test fixtures byte for byte.
  • 15/15 refusal tests and 19/19 host tests pass.
  • The gate refuses:
    • an edited header, fixture, unlock source file, test or proven.json
    • missing test results
    • an internal-ESP write build
  • build-usb.ps1 -HardwareProfile local produces a pair byte-identical to the hardware-verified one: wrapper 19a145a2…, child 6ffe6165….
  • The reviewed x870-3090ti build is unchanged. test-cold-precheck.ps1 passes for all four profiles.

Not verified

  • The generic probe has not been run on hardware.
  • new-machine.ps1 has not been run end to end against a real stick; its stages were run separately. It passes the PowerShell 5.1 parser.
  • The Korean docs are not updated.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/windows-GPU-UNLOCK/Windows-GPU-UNLOCK/pull/11 **Author:** [@pavel-shpilev](https://github.com/pavel-shpilev) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@impacifist](https://github.com/impacifist) **Base:** `main` ← **Head:** `feat/per-machine-pipeline` --- ### 📝 Commits (3) - [`bf07af5`](https://github.com/windows-GPU-UNLOCK/Windows-GPU-UNLOCK/commit/bf07af5115fa1aebb93850c8c9a99afa802d7652) Per-machine pipeline: generic probe -> local profile -> tests -> USB stick - [`738c606`](https://github.com/windows-GPU-UNLOCK/Windows-GPU-UNLOCK/commit/738c6068fc163638f446510af648d10918fc3cd9) Merge current profiles and hardened main before reviewing the local pipeline - [`7c6fc0d`](https://github.com/windows-GPU-UNLOCK/Windows-GPU-UNLOCK/commit/7c6fc0d5a8c2771e8dce2b9e02dfe71c8ddf0c33) Harden local profile capture, image bounds and source-bound staging evidence ### 📊 Changes **33 files changed** (+1879 additions, -55 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+3 -0) 📝 `CHANGES.md` (+41 -0) 📝 `README.ko.md` (+6 -0) 📝 `README.md` (+7 -1) ➕ `docs/NEW-MACHINE.en.md` (+125 -0) 📝 `docs/PORTABILITY.en.md` (+2 -2) 📝 `internal-boot/boot/diagnostic.c` (+7 -4) 📝 `internal-boot/boot/diagnostic.h` (+2 -0) 📝 `internal-boot/boot/full-release.c` (+7 -0) 📝 `internal-boot/boot/handoff.c` (+8 -5) 📝 `internal-boot/boot/probe.c` (+136 -25) 📝 `internal-boot/boot/test-cold-precheck.ps1` (+2 -2) 📝 `internal-boot/boot/test-diagnostic.ps1` (+5 -1) 📝 `internal-boot/boot/test_cold_precheck.c` (+9 -0) 📝 `internal-boot/boot/test_probe.c` (+2 -2) ➕ `internal-boot/boot/test_probe_generic.c` (+132 -0) 📝 `internal-boot/unlock/build.ps1` (+19 -5) ➕ `internal-boot/unlock/local-profile.ps1` (+163 -0) 📝 `internal-boot/unlock/machine-profile.h` (+16 -3) 📝 `internal-boot/unlock/tests/test_3090_experimental.c` (+2 -0) _...and 13 more files_ </details> ### 📄 Description > **Depends on #8, #9 and #10.** This branch contains those commits, so the diff here includes them until they merge. The pipeline is the last commit. Every machine needs its own compile-time profile today, and building one by hand means reading captures, hashing driver images and pinning tests. This PR turns that into a pipeline a machine owner can run. It ends in a **local profile** that is never committed and is write-eligible only after that machine's own host tests pass. It does not add hardware support. Each local profile is still mock-tested only until someone runs it and reports back. ### One command `research/profile/new-machine.ps1 -Drive D -WindowsEspGuid … -Assets …`. Run it several times; each run does the next step: 1. **Probe:** builds the generic read-only probe and copies it to the USB stick. The user boots it twice, each time after a full shutdown. 2. **Profile, tests and package:** turns those captures into a local profile, runs that machine's host tests and builds the headless USB package. 3. **Stick:** only with `-StageUnlock` does it copy the package to the stick. It changes files only: no partitions, boot entries or firmware settings. Booting is always manual. ### Pieces - **Generic probe** (`-DGU_PROBE_GENERIC`, `research/profile/build-probe.ps1`) - Records every NVIDIA display controller instead of one known card, and writes the PROM to `PROM.BIN`. - Fails to compile in anything but a read-only diagnostic build (no unlock code). - `-DGU_USB_PROBE` lets the diagnostic log to the stick it booted from, the same rule as `GU_USB_MEDIA`. - **Generator** (`research/profile/make-profile.py`) - Derives every `machine-profile.h` constant from the captures' own driver-ownership data, driver image dumps and PROM. `fwsec-locate` runs the production VBIOS parser on the host to find FWSEC-FRTS. - Refuses anything outside `research/profile/proven.json`, and there is no override. Today that allows only: - a GA102 card with `0x6000` or `0x5ff4` MiB - one RTX at `01:00.0`, plus an integrated GPU - a non-aggregate `ConOut` - an `nvgop-ga1xx` build that has already run cleanly on hardware - a GPU in its power-on state - at least two captures that agree with each other - Widening `proven.json` should be a reviewed change backed by hardware evidence. - **`-DGU_PROFILE_LOCAL` / `-HardwareProfile local`** - Includes the git-ignored `internal-boot/unlock/profile-local.h`, and only if the generator wrote it. - Write builds (`unlock/build.ps1`, `build-usb.ps1`) and `stage-usb.ps1` require `research/profile/local/test-results.json`. That file is bound to the exact header bytes, the fixtures and a fingerprint of the sources, tests, generator and `proven.json` (`internal-boot/unlock/local-profile.ps1`). - A local profile can only build the headless USB version. Diagnostic builds need no evidence. - **Generic tests** (`research/profile/test-profile.ps1`) - The reviewed-profile host jobs, run against the local profile: 19 jobs, including the production transaction against the card's real PROM and the stock assets, with all EFI simulated. - A reviewed profile for another card must reject this machine's config and console graph. - Plus `test_make_profile.py`: 15 refusal cases built by changing one value at a time in the machine's own captures. - Test pins for the local profile, `.gitignore` entries and `docs/NEW-MACHINE.en.md`. ### Verification (on the X870 / RTX 3090 Ti from #10) - The generator reproduces **all 25 hand-written X870 constants and both test fixtures byte for byte**. - 15/15 refusal tests and 19/19 host tests pass. - The gate refuses: - an edited header, fixture, unlock source file, test or `proven.json` - missing test results - an internal-ESP write build - `build-usb.ps1 -HardwareProfile local` produces a pair **byte-identical to the hardware-verified one**: wrapper `19a145a2…`, child `6ffe6165…`. - The reviewed `x870-3090ti` build is unchanged. `test-cold-precheck.ps1` passes for all four profiles. ### Not verified - The generic probe has not been run on hardware. - `new-machine.ps1` has not been run end to end against a real stick; its stages were run separately. It passes the PowerShell 5.1 parser. - The Korean docs are not updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 07:01:54 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
windows-GPU-UNLOCK/Windows-GPU-UNLOCK#118
No description provided.