[PR #153] feat(experimental): add universal in-RAM multi-GPU unlock engine (Ampere & Ada) #153

Open
opened 2026-10-31 07:02:15 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/windows-GPU-UNLOCK/Windows-GPU-UNLOCK/pull/153
Author: @LightEssence
Created: 10/30/2026
Status: 🔄 Open

Base: main ← Head: feat/universal-inram-engine


📝 Commits (3)

  • 67b0353 feat(experimental): add universal in-RAM multi-GPU unlock engine (Ampere & Ada)
  • dc557e2 fix(safety): implement fail-closed error handling, validate capability/ownership, and fix device path construction
  • 4609f51 fix(safety): resolve cold unlock latch order, enforce VBIOS FWSEC evidence, and compose full UEFI device path for Windows handoff

📊 Changes

120 files changed (+34857 additions, -0 deletions)

View changed files

➕ experimental/.gitattributes (+9 -0)
➕ experimental/.gitignore (+18 -0)
➕ experimental/README.md (+132 -0)
➕ experimental/README_EN.md (+132 -0)
➕ experimental/UNIVERSAL-ASSETS/NVIDIA-LICENSE (+416 -0)
➕ experimental/build.py (+116 -0)
➕ experimental/compat/compat.h (+120 -0)
➕ experimental/compat/linux/aperture.h (+1 -0)
➕ experimental/compat/linux/delay.h (+1 -0)
➕ experimental/compat/linux/dma-mapping.h (+1 -0)
➕ experimental/compat/linux/errno.h (+1 -0)
➕ experimental/compat/linux/firmware.h (+1 -0)
➕ experimental/compat/linux/io.h (+1 -0)
➕ experimental/compat/linux/module.h (+1 -0)
➕ experimental/compat/linux/pci.h (+1 -0)
➕ experimental/compat/linux/printk.h (+1 -0)
➕ experimental/compat/linux/slab.h (+1 -0)
➕ experimental/compat/linux/string.h (+1 -0)
➕ experimental/compat/linux/timekeeping.h (+1 -0)
➕ experimental/compat/linux/types.h (+1 -0)

...and 80 more files

📄 Description

Overview

This pull request introduces an experimental, standalone Universal In-RAM Multi-GPU Windows Unlock Engine located under the experimental/ directory.

The engine provides an autonomous UEFI pre-boot implementation designed to eliminate hardcoded device/subsystem checks, support heterogeneous multi-GPU systems, and unlock tensor cores across both Ampere (RTX 30xx) and Ada Lovelace (RTX 40xx) architectures prior to Windows boot manager execution.


Key Architectural Features

  1. Volatile In-RAM Safety:

    • Performs all modifications strictly in host DRAM and GPU MMIO BAR0 registers.
    • Zero SPI flash writes: hardware remains 100% factory-stock upon rebooting without the bootloader.
  2. Recursive Multi-Bus & Multi-GPU Scanning:

    • Traverses PCI-to-PCI bridges recursively, resolving the limitation where secondary GPUs located on buses other than Bus 1 (such as Bus 5 over OCuLink or Bus 130 on secondary NUMA nodes) were rejected.
    • Operates across multi-socket workstation platforms (e.g. Dual Xeon / Intel X99 / C612).
  3. Dynamic Subsystem Matching:

    • Matches installed GPUs by Device ID ranges rather than rigid, static Subsystem ID tables, allowing cards across varied vendor implementations to pass initialization cleanly.
  4. Architecture-Decoupled Execution Pipeline:

    • Supports both Ada Lovelace (AD102/AD103/AD104/AD106/AD107) and Ampere (GA102/GA104/GA106) in a single unified BOOTX64.EFI binary.
    • Gates architecture-specific verification loops (such as Ada's 4-PLM SEC2 booter check) to ensure Ampere cards latch SS0=0x88888888 and SS1=0x8 without triggering spurious aborts.
  5. Safe Display & GOP Detachment:

    • Separates display adapters from headless compute cards.
    • Detaches UEFI GOP protocols cleanly using standard controller disconnection and restores PCIe command state prior to handing off execution to bootmgfw.efi.
  6. Deployment Automation:

    • dump_vbios.bat / dump_vbios.ps1: Automated discovery and VBIOS extraction named by PCI Subsystem ID.
    • copy_to_usb.bat / copy_to_usb.ps1: Automated FAT32 flash drive deployment.
    • enable_laptop_hybrid.bat / enable_laptop_hybrid.ps1: Prevents aggressive D3cold transitions on hybrid laptop and external GPU setups.

Directory Organization

experimental/
├── build.py                     # Standalone UEFI build script (GCC toolchain)
├── copy_to_usb.bat              # 1-click deployment to FAT32 USB
├── dump_vbios.bat               # Windows VBIOS dumper
├── enable_laptop_hybrid.bat     # D3cold power management configuration
├── include/                     # Engine header definitions
├── src/                         # Core implementation (PCI scanning, GOP detachment, runtime)
├── vendor/                      # Microcode execution & EDK II protocol headers
├── tools/                       # Multi-GPU benchmarking and packaging scripts
└── dist/EFI/BOOT/BOOTX64.EFI    # Prebuilt standalone UEFI application

Hardware Verification

  • Dual-GPU System Tested:
    • GPU 0: NVIDIA GeForce RTX 4070 Ti 12GB (Ada AD104, 60 SMs, Bus 3)
    • GPU 1: NVIDIA GeForce RTX 3060 12GB (Ampere GA106, 28 SMs, Bus 130)
    • Host: Dual Intel Xeon E5-2696 v3, Huananzhi X99-F8D Plus, Windows 11 Pro 24H2.
  • Measured GEMM Performance:
    • RTX 4070 Ti: Dense BF16 throughput: 75.0 TFLOPS stock -> 146.9 TFLOPS unlocked (+95.9%).
    • RTX 3060: Dense BF16 throughput: 25.6 TFLOPS stock -> 49.5 TFLOPS unlocked (+93.6%).
    • 24-hour continuous runtime verified on Windows 11 without selector revert or stability degradation.


Safety Hardening & Community Audit Updates (Commits 4609f51, dc557e2)

Following CPU-mocked fault injection and static safety audits, the engine incorporates the following hardening guarantees:

  1. Option ROM & PCIR Hardware Signature Validation (ValidateVbiosEvidence):
    • Validates Option ROM signature header (0x55, 0xAA) and verifies the PCIR structure offset and 'PCIR' header.
    • Enforces strict matching between PCIR Vendor/Device ID (0x10de:<device_id>) and the target physical GPU before any selector latching or transaction staging.
    • Validates NVIDIA production FWSEC descriptors via gpu_unlock_vbios_fwsec().
  2. Pre-Latch Verification Sequencing:
    • Resolves latch-ordering dependencies: establishes Gu.prom_verified = TRUE strictly upon cryptographic and PCIR verification, satisfying GuLatchEntrySelectors() preconditions without bypassing the fail-closed safety gate.
  3. Active PCIe Memory Decode & Bus Master Verification (CheckGpuDisplayAndOwnershipOk):
    • Replaced unconditional display release stubs with live PCI Command Register query (cmd & 0x0002 active memory decode; cmd & 0x0004 disabled bus master DMA).
  4. Full Composite UEFI Device Path Synthesis for Windows Boot Manager:
    • Synthesizes fully-qualified composite device path ([vol_dp] + [MEDIA_FILEPATH_DP] + [END]) bound to the discovered Windows volume.
    • Strictly conforms to UEFI 2.10 Spec (§7.4) by passing gImageHandle (caller's image handle) as ParentImageHandle in gBS->LoadImage.

Disclaimer: This report was prepared with the assistance of Antigravity IDE, so there may be minor inaccuracies in the description of internal processes. / Отчёт подготовлен при помощи Antigravity IDE, поэтому могут быть неточности в описании процессов.


🔄 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/153 **Author:** [@LightEssence](https://github.com/LightEssence) **Created:** 10/30/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/universal-inram-engine` --- ### 📝 Commits (3) - [`67b0353`](https://github.com/windows-GPU-UNLOCK/Windows-GPU-UNLOCK/commit/67b03538cd1b9688d4ab0574f56db0d934f87181) feat(experimental): add universal in-RAM multi-GPU unlock engine (Ampere & Ada) - [`dc557e2`](https://github.com/windows-GPU-UNLOCK/Windows-GPU-UNLOCK/commit/dc557e26c30c1b7913318ee2f15a802587222b7d) fix(safety): implement fail-closed error handling, validate capability/ownership, and fix device path construction - [`4609f51`](https://github.com/windows-GPU-UNLOCK/Windows-GPU-UNLOCK/commit/4609f51609a7679dd16d7981dc730c9bd684bbf5) fix(safety): resolve cold unlock latch order, enforce VBIOS FWSEC evidence, and compose full UEFI device path for Windows handoff ### 📊 Changes **120 files changed** (+34857 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `experimental/.gitattributes` (+9 -0) ➕ `experimental/.gitignore` (+18 -0) ➕ `experimental/README.md` (+132 -0) ➕ `experimental/README_EN.md` (+132 -0) ➕ `experimental/UNIVERSAL-ASSETS/NVIDIA-LICENSE` (+416 -0) ➕ `experimental/build.py` (+116 -0) ➕ `experimental/compat/compat.h` (+120 -0) ➕ `experimental/compat/linux/aperture.h` (+1 -0) ➕ `experimental/compat/linux/delay.h` (+1 -0) ➕ `experimental/compat/linux/dma-mapping.h` (+1 -0) ➕ `experimental/compat/linux/errno.h` (+1 -0) ➕ `experimental/compat/linux/firmware.h` (+1 -0) ➕ `experimental/compat/linux/io.h` (+1 -0) ➕ `experimental/compat/linux/module.h` (+1 -0) ➕ `experimental/compat/linux/pci.h` (+1 -0) ➕ `experimental/compat/linux/printk.h` (+1 -0) ➕ `experimental/compat/linux/slab.h` (+1 -0) ➕ `experimental/compat/linux/string.h` (+1 -0) ➕ `experimental/compat/linux/timekeeping.h` (+1 -0) ➕ `experimental/compat/linux/types.h` (+1 -0) _...and 80 more files_ </details> ### 📄 Description ### Overview This pull request introduces an experimental, standalone **Universal In-RAM Multi-GPU Windows Unlock Engine** located under the `experimental/` directory. The engine provides an autonomous UEFI pre-boot implementation designed to eliminate hardcoded device/subsystem checks, support heterogeneous multi-GPU systems, and unlock tensor cores across both Ampere (RTX 30xx) and Ada Lovelace (RTX 40xx) architectures prior to Windows boot manager execution. --- ### Key Architectural Features 1. **Volatile In-RAM Safety:** - Performs all modifications strictly in host DRAM and GPU MMIO BAR0 registers. - Zero SPI flash writes: hardware remains 100% factory-stock upon rebooting without the bootloader. 2. **Recursive Multi-Bus & Multi-GPU Scanning:** - Traverses PCI-to-PCI bridges recursively, resolving the limitation where secondary GPUs located on buses other than Bus 1 (such as Bus 5 over OCuLink or Bus 130 on secondary NUMA nodes) were rejected. - Operates across multi-socket workstation platforms (e.g. Dual Xeon / Intel X99 / C612). 3. **Dynamic Subsystem Matching:** - Matches installed GPUs by Device ID ranges rather than rigid, static Subsystem ID tables, allowing cards across varied vendor implementations to pass initialization cleanly. 4. **Architecture-Decoupled Execution Pipeline:** - Supports both Ada Lovelace (AD102/AD103/AD104/AD106/AD107) and Ampere (GA102/GA104/GA106) in a single unified `BOOTX64.EFI` binary. - Gates architecture-specific verification loops (such as Ada's 4-PLM SEC2 booter check) to ensure Ampere cards latch `SS0=0x88888888` and `SS1=0x8` without triggering spurious aborts. 5. **Safe Display & GOP Detachment:** - Separates display adapters from headless compute cards. - Detaches UEFI GOP protocols cleanly using standard controller disconnection and restores PCIe command state prior to handing off execution to `bootmgfw.efi`. 6. **Deployment Automation:** - `dump_vbios.bat` / `dump_vbios.ps1`: Automated discovery and VBIOS extraction named by PCI Subsystem ID. - `copy_to_usb.bat` / `copy_to_usb.ps1`: Automated FAT32 flash drive deployment. - `enable_laptop_hybrid.bat` / `enable_laptop_hybrid.ps1`: Prevents aggressive D3cold transitions on hybrid laptop and external GPU setups. --- ### Directory Organization ```text experimental/ ├── build.py # Standalone UEFI build script (GCC toolchain) ├── copy_to_usb.bat # 1-click deployment to FAT32 USB ├── dump_vbios.bat # Windows VBIOS dumper ├── enable_laptop_hybrid.bat # D3cold power management configuration ├── include/ # Engine header definitions ├── src/ # Core implementation (PCI scanning, GOP detachment, runtime) ├── vendor/ # Microcode execution & EDK II protocol headers ├── tools/ # Multi-GPU benchmarking and packaging scripts └── dist/EFI/BOOT/BOOTX64.EFI # Prebuilt standalone UEFI application ``` --- ### Hardware Verification - **Dual-GPU System Tested:** - GPU 0: NVIDIA GeForce RTX 4070 Ti 12GB (Ada AD104, 60 SMs, Bus 3) - GPU 1: NVIDIA GeForce RTX 3060 12GB (Ampere GA106, 28 SMs, Bus 130) - Host: Dual Intel Xeon E5-2696 v3, Huananzhi X99-F8D Plus, Windows 11 Pro 24H2. - **Measured GEMM Performance:** - RTX 4070 Ti: Dense BF16 throughput: 75.0 TFLOPS stock -> 146.9 TFLOPS unlocked (+95.9%). - RTX 3060: Dense BF16 throughput: 25.6 TFLOPS stock -> 49.5 TFLOPS unlocked (+93.6%). - 24-hour continuous runtime verified on Windows 11 without selector revert or stability degradation. --- --- ### Safety Hardening & Community Audit Updates (Commits 4609f51, dc557e2) Following CPU-mocked fault injection and static safety audits, the engine incorporates the following hardening guarantees: 1. **Option ROM & PCIR Hardware Signature Validation (`ValidateVbiosEvidence`)**: - Validates Option ROM signature header (`0x55, 0xAA`) and verifies the PCIR structure offset and `'PCIR'` header. - Enforces strict matching between PCIR Vendor/Device ID (`0x10de:<device_id>`) and the target physical GPU before any selector latching or transaction staging. - Validates NVIDIA production FWSEC descriptors via `gpu_unlock_vbios_fwsec()`. 2. **Pre-Latch Verification Sequencing**: - Resolves latch-ordering dependencies: establishes `Gu.prom_verified = TRUE` strictly upon cryptographic and PCIR verification, satisfying `GuLatchEntrySelectors()` preconditions without bypassing the fail-closed safety gate. 3. **Active PCIe Memory Decode & Bus Master Verification (`CheckGpuDisplayAndOwnershipOk`)**: - Replaced unconditional display release stubs with live PCI Command Register query (`cmd & 0x0002` active memory decode; `cmd & 0x0004` disabled bus master DMA). 4. **Full Composite UEFI Device Path Synthesis for Windows Boot Manager**: - Synthesizes fully-qualified composite device path (`[vol_dp] + [MEDIA_FILEPATH_DP] + [END]`) bound to the discovered Windows volume. - Strictly conforms to UEFI 2.10 Spec (§7.4) by passing `gImageHandle` (caller's image handle) as `ParentImageHandle` in `gBS->LoadImage`. --- > **Disclaimer:** This report was prepared with the assistance of Antigravity IDE, so there may be minor inaccuracies in the description of internal processes. / *Отчёт подготовлен при помощи Antigravity IDE, поэтому могут быть неточности в описании процессов.* --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#153
No description provided.