Repository navigation
Port to Windows #328
pilasolucoes-collab
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey Zagitta, thanks for
gpu-unlockv2.0.0 and the detailed Ampere write-up!I put together an experimental Windows port on a local
windows-portbranch and wanted to share the approach and see if you'd ever want this upstream (or if you prefer keeping this repo Linux-only).Approach: Pre-boot UEFI application (
gpu_unlock.efi)Instead of a kernel driver (which would require WDK and
testsigning onon Windows), the port runs as an x86_64 UEFI application before\EFI\Microsoft\Boot\bootmgfw.efiandnvlddmkm.sysinitializeWPR2:recipes.c,payload.c,prep_610.c,vbios_610.c,layout_610.c,gfw_eval.c, andfalcon.cdirectly fromkernel/gpu_unlock/, with minimal#ifdef __KERNEL__guards only indiagnostic.h,falcon.h, andfalcon.cdelegating towindows/uefi/gu_pal.h.unlock_610.c, LinuxMakefile/Kbuild,README.md, anddocs/How Ampere was unlocked.mdwere left untouched.windows/uefi/): Ported the state machine intogu_unlock.covergu_hal.h+gu_hal_efi.cusing freestanding MSVC headers (cl.exe+link.exe, no EDK2/WDK needed):EFI_PCI_IO_PROTOCOLMMIO/config access andAttributes()(Memory/BusMaster)< 4 GiBDMA viaAllocateBuffer/Mapwith anAllocatePages(AllocateMaxAddress)identity fallbackDisconnectController+ console mute (so resetting a primary display GPU doesn't hangConOut)PMCSR,LnkCtl2, and Resizable BAR (0x0015) restored beforeBAR0..BAR5.cfg, disk.log, multi-volume FAT32 asset search, and Windows chainloadwindows/):zstandardfallback infirmware/extract_gsp.pywhen thezstdCLI isn't installed, pluswindows/Prepare-Firmware.ps1Install-GpuUnlockEfi.ps1/Uninstall-GpuUnlockEfi.ps1) that creates a separatefwbootmgrentry without overwritingbootmgfw.efi, auto-selects the detected GPU family to fit in 100 MB Windows ESPs (or builds a bootable FAT32 USB via-UsbDrive), and cleans up orphan BCD entries on uninstallCurrent status / honesty note
.efibuild via MSVC (/Brepro, 0 warnings, 0 DLL imports, W^X sections), 12 C unit + mock BAR0/PCI/ReBAR/FLR tests (coveringTU102,GA102,AD102, fault/retention paths), 4 Python extractor tests, and 15 PowerShell installer/BCD-parsing checks all pass.SS0/SS1until reboot/cold boot, Secure Boot needs to be off (or custom-signed), and BitLocker users should suspend protection before adding pre-OS boot entries.Let me know if you have any feedback on the UEFI approach (especially around primary GOP / ReBAR / FLR edge cases) or if you'd be open to a PR once bare-metal logs look good.
All reactions