[GH-ISSUE #99] [Compatibility] Palit RTX 3090 / HP Z640 BIOS M60 #70

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

Originally created by @aaruyou on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/windows-GPU-UNLOCK/Windows-GPU-UNLOCK/issues/99

Evidence type

Existing unlock experiment — details below

Reviewed inventory or manually entered hardware

- Motherboard / System: HP Z640 Workstation
- BIOS Version: M60
- GPU: Palit GeForce RTX 3090
- VRAM: 24 GiB
- Host OS: Windows 11 (fully decrypted, BitLocker disabled)
- NVIDIA Driver Version: 617.14

Offline compatibility report (optional)


Physical GPU and VBIOS history

  • Manufacturer / Model: Palit GeForce RTX 3090
  • Reported Device ID: 10de:2204
  • Reported Subsystem ID: 0x22041569 (Vendor 0x1569 = Palit)
  • VROM Verification Target: PROM hash updated to match live measured target (2e45b52536aaa6d222e68e73d611d87e04d4795e81da239299555625f79ef544)
  • VBIOS Flashing History: Stock factory VBIOS (No cross-flashing)

Physical display connection and available adapters

  • Monitor Connection: Connected directly to the RTX 3090.
  • Available Adapters / GPUs: Only the discrete RTX 3090 is present (No active iGPU available on this system/CPU).
  • Pre-boot GOP Topology: The firmware exposes 2 GOPs (1 physical GOP on the RTX 3090 + 1 console aggregator mirroring the framebuffer).
  • Setup: Accepted by restricting to exactly 1 verified physical GOP and ensuring the aggregator mirror handle carries matching resolution/format metrics.

Existing diagnostic or experiment source and build

  • Base Upstream Version: v0.3.0 baseline logic architecture

  • Profile Target: Modified custom profile rooted in the 3090 FE / B650M codebase mindset, adapted for local platform parameters

  • Compiler Version: Clang / lld-link 20.1.8 (as required by current tree validation guidelines)

  • Local Diff Strategy:

    1. Environment-pinned values (Bus 1 -> Bus 2, BAR0 base 0xF5000000 -> 0xF0000000) patched to discovered machine variables.
    2. Updated verification target to match the local card's measured live PROM hash.
    3. Relaxed single-owner isolation checks specifically to handle the shared console aggregator mirror handle topology on this firmware, while strictly preserving the BY_DRIVER drop condition and all Category C/D structural safety boundaries.
  • Local Code Changes (Diff):
    diff --git a/benchmark/compute-benchmark-3090.cu b/benchmark/compute-benchmark-3090.cu
    index 5501739..9f8cd07 100644
    --- a/benchmark/compute-benchmark-3090.cu
    +++ b/benchmark/compute-benchmark-3090.cu
    @@ -56,7 +56,7 @@ int main(int argc, char **argv) {
    if(argc!=1){fprintf(stderr,"Only --inspect-only or no arguments are supported\n");return 2;}
    int devices=0;cuda_check(cudaGetDeviceCount(&devices));int selected=-1;cudaDeviceProp properties={};
    for(int i=0;i<devices;i++) {cudaDeviceProp p;cuda_check(cudaGetDeviceProperties(&p,i));

  • if(!strcmp(p.name,"NVIDIA GeForce RTX 3090") && !p.pciDomainID && p.pciBusID==1 && !p.pciDeviceID){if(selected!=-1)return 2;selected=i;properties=p;}}

  • if(!strcmp(p.name,"NVIDIA GeForce RTX 3090") && !p.pciDomainID && p.pciBusID==2 && !p.pciDeviceID){if(selected!=-1)return 2;selected=i;properties=p;}}
    if(selected<0){fprintf(stderr,"Exact RTX 3090 at 0000:01:00.0 not found\n");return 2;}
    cuda_check(cudaSetDevice(selected));cublasHandle_t handle;blas_check(cublasCreate(&handle));
    int runtime=0,driver=0,blas=0;cuda_check(cudaRuntimeGetVersion(&runtime));cuda_check(cudaDriverGetVersion(&driver));blas_check(cublasGetVersion(handle,&blas));
    diff --git a/benchmark/run-benchmark.ps1 b/benchmark/run-benchmark.ps1
    index b7ac5c5..9641fbc 100644
    --- a/benchmark/run-benchmark.ps1
    +++ b/benchmark/run-benchmark.ps1
    @@ -16,7 +16,7 @@ function Assert-GpuIdle {
    $rows = @(& nvidia-smi --query-gpu=name,pci.bus_id,driver_version,utilization.gpu,memory.used,temperature.gpu --format=csv,noheader,nounits)
    if ($LASTEXITCODE -ne 0 -or $rows.Count -ne 1) { throw 'Expected exactly one NVIDIA GPU' }
    $fields = $rows[0] -split ',' | ForEach-Object { $_.Trim() }
  • if ($fields[0] -ne 'NVIDIA GeForce RTX 3090' -or $fields[1] -notmatch '^0+:01:00.0$') { throw 'Unexpected GPU identity' }
  • if ($fields[0] -ne 'NVIDIA GeForce RTX 3090' -or $fields[1] -notmatch '^0+:02:00.0$') { throw 'Unexpected GPU identity' }
    if ([int]$fields[3] -gt 5 -or [int]$fields[4] -gt 2048) { throw 'GPU is busy. Save and finish ComfyUI/other GPU jobs before benchmarking. Nothing was stopped.' }
    if ([int]$fields[5] -gt 65) { throw 'GPU is still hot. Let it cool before a comparable measurement.' }
    return $rows[0]
    diff --git a/unlock/app.c b/unlock/app.c
    index ee75c63..fe06f47 100644
    --- a/unlock/app.c
    +++ b/unlock/app.c
    @@ -59,21 +59,23 @@ static BOOLEAN AmdGopParent(EFI_DEVICE_PATH_PROTOCOL *Path) {
    EFI_PCI_IO_PROTOCOL *pci=NULL;UINT32 id=0,subsystem=0;UINTN s,b,d,f;
    if(!Gu.bs->LocateDevicePath)return FALSE;
    EFI_STATUS status=Gu.bs->LocateDevicePath(&PciGuid,&remaining,&parent);
  • if(EFI_ERROR(status) || !parent || (UINT8 *)remaining!=(UINT8 *)Path+24)return FALSE;
  • if(EFI_ERROR(status) || !parent)return FALSE;
    status=Gu.bs->HandleProtocol(parent,&PciGuid,(VOID **)&pci);
    if(EFI_ERROR(status) || !pci || !pci->GetLocation || !pci->Pci.Read)return FALSE;
    status=pci->GetLocation(pci,&s,&b,&d,&f);
  • if(EFI_ERROR(status) || s || b!=12 || d || f)return FALSE;
  • if(EFI_ERROR(status) || s || b!=2 || d || f)return FALSE;
    status=pci->Pci.Read(pci,EfiPciIoWidthUint32,0,1,&id);
    if(!EFI_ERROR(status))status=pci->Pci.Read(pci,EfiPciIoWidthUint32,0x2c,1,&subsystem);
    GuLog("AMD GOP PCI parent: status=%#llx id=%#x subsystem=%#x\n",(unsigned long long)status,id,subsystem);
  • return !EFI_ERROR(status) && id==GU_AMD_ID && subsystem==GU_AMD_SUBSYSTEM;
  • return !EFI_ERROR(status) && id==GU_BOARD_ID && subsystem==GU_BOARD_SUBSYSTEM;
    }
    +static BOOLEAN GuReleased=FALSE;
    static BOOLEAN DisplayCheck(VOID) {
    EFI_HANDLE *handles=NULL;UINTN count=0,intel=0;BOOLEAN valid=TRUE;
    EFI_GRAPHICS_OUTPUT_MODE_INFORMATION physical={0},forwarded={0};BOOLEAN forwarding=FALSE;
    EFI_STATUS status=Gu.bs->LocateHandleBuffer(ByProtocol,&GopGuid,NULL,&count,&handles);
    GuLog("GOP enumeration: status=%#llx handles=%zu\n",(unsigned long long)status,(size_t)count);
  • if(GuReleased){BOOLEAN zero=(status==EFI_NOT_FOUND || (!EFI_ERROR(status) && count==0)); GuLog("post-release display: zero_gop=%u\n",(unsigned)zero); if(handles)GuFree(handles); return zero && GuLogReady(); }
    if(EFI_ERROR(status) || !handles || !count || count>16){if(handles)GuFree(handles);return FALSE;}
    for(UINTN i=0;i<count;i++) {
    EFI_GRAPHICS_OUTPUT_PROTOCOL *gop=NULL;EFI_DEVICE_PATH_PROTOCOL *path=NULL;
    @@ -104,7 +106,8 @@ static BOOLEAN DisplayCheck(VOID) {
    }
    if(!mode->Info || mode->SizeOfInfo<sizeof(*mode->Info)){valid=FALSE;break;}
    GopInfoLog(i,mode->Info);
  • if(EFI_ERROR(status) || !path || route!=1 || !AmdGopParent(path) || !mode->FrameBufferBase ||
    
  • if((status==EFI_UNSUPPORTED || status==EFI_NOT_FOUND) && !path && intel==1 &&           mode->Info->Version==physical.Version && mode->Info->PixelFormat==physical.PixelFormat &&           mode->Info->HorizontalResolution==physical.HorizontalResolution &&           mode->Info->VerticalResolution==physical.VerticalResolution &&           mode->Info->PixelsPerScanLine==physical.PixelsPerScanLine) {          GuLog("GOP console mirror accepted\n"); continue;      }
    
  • if(EFI_ERROR(status) || !path || !AmdGopParent(path) || !mode->FrameBufferBase ||
      !mode->FrameBufferSize || mode->Info->PixelFormat>PixelBlueGreenRedReserved8BitPerColor ||
      !mode->Info->HorizontalResolution || !mode->Info->VerticalResolution ||
      mode->Info->PixelsPerScanLine<mode->Info->HorizontalResolution ||
    

@@ -226,7 +229,7 @@ static EFI_STATUS BarCheck(VOID) {
r->AddrRangeMin!=GU_BAR0_BASE || r->AddrLen!=0x1000000 || r->AddrTranslationOffset ||
/* UEFI describes an inclusive end; pinned EDK2 PciBusDxe instead returns
PciBar.Alignment. Both representations describe this exact 16 MiB BAR. */

  •  (r->AddrRangeMax!=0xf5ffffff && r->AddrRangeMax!=0x00ffffff) ||
    
  •  (r->AddrRangeMax!=0xf0ffffff && r->AddrRangeMax!=0x00ffffff) ||
     r->AddrSpaceGranularity!=32 || ((UINT8 *)(r+1))[0]!=ACPI_END_TAG_DESCRIPTOR)status=EFI_UNSUPPORTED;
    
    else {
    UINT8 *raw=(UINT8 *)r,sum=0;
    @@ -305,8 +308,8 @@ static EFI_STATUS PromCheck(VOID) {
    Gu.profile_verified=FALSE;
    VOID *prom=GuAlloc(1048576);if(!prom)return EFI_OUT_OF_RESOURCES;
    GuCopyFromIo(prom,(VOID *)(UINTN)(Gu.bar_base+0x300000),1048576);
  • BOOLEAN good=!Gu.fault && GuHashMatches(prom,1048576,"8ea297373e9e5d3600ff41ad9fae88f2d14c98c017d100669f7333981da673b4");
  • GuFree(prom);Gu.prom_verified=good;GuLog("live PROM hash matched=%u\n",(unsigned)good);return good?EFI_SUCCESS:EFI_CRC_ERROR;
  • VOID GuSha256(const VOID , UINTN, UINT8 ); char promHex[65]; promHex[0]=0; if(!Gu.fault){UINT8 promDigest[32]; const char promHexDigits[]="0123456789abcdef"; GuSha256(prom,1048576,promDigest); for(UINTN i=0;i<32;i++){promHex[i2]=promHexDigits[promDigest[i]>>4]; promHex[i2+1]=promHexDigits[promDigest[i]&15];} promHex[64]=0;} BOOLEAN good=!Gu.fault && GuHashMatches(prom,1048576,"2e45b52536aaa6d222e68e73d611d87e04d4795e81da239299555625f79ef544");
  • GuFree(prom);Gu.prom_verified=good;GuLog("live PROM hash actual=%s\n",promHex);GuLog("live PROM hash matched=%u\n",(unsigned)good);return good?EFI_SUCCESS:EFI_CRC_ERROR;
    }
    static EFI_STATUS Arm(VOID) {
    #if !defined(GU_EXPERIMENTAL_3090)
    @@ -416,7 +419,7 @@ EFI_STATUS EFIAPI efi_main(EFI_HANDLE Image,EFI_SYSTEM_TABLE *St) {
    status=Step(EFI_ERROR(released)?released:EFI_ERROR(refreshed)?refreshed:Gu.pci!=prior?EFI_COMPROMISED_DATA:EFI_SUCCESS);
    if(EFI_ERROR(status))goto finish;
    Stage="ownership-after-release";status=Step(GuClaimController());if(EFI_ERROR(status))goto finish;
  • Stage="display-after-release";Gu.display_ok=DisplayCheck();status=Step(Gu.display_ok?EFI_SUCCESS:EFI_UNSUPPORTED);if(EFI_ERROR(status))goto finish;
  • Stage="display-after-release";GuReleased=TRUE;Gu.display_ok=DisplayCheck();status=Step(Gu.display_ok?EFI_SUCCESS:EFI_UNSUPPORTED);if(EFI_ERROR(status))goto finish;
    Stage="decode-after-release";status=Step(RestoreDecode());if(EFI_ERROR(status))goto finish;
    Stage="config-after-release";status=Step(ConfigCheck(FALSE));if(EFI_ERROR(status))goto finish;
    Stage="bar0-after-release";status=Step(BarCheck());if(EFI_ERROR(status))goto finish;
    diff --git a/unlock/checks.c b/unlock/checks.c
    index df9b5f8..a3ba2b5 100644
    --- a/unlock/checks.c
    +++ b/unlock/checks.c
    @@ -26,7 +26,7 @@ BOOLEAN GuCheckConfig(const UINT32 Config[64], UINTN Segment, UINTN Bus,

if (Out == NULL) return FALSE;
*Out = Caps;

  • if (Config == NULL || Segment != 0 || Bus != 1 || Device != 0 || Function != 0)
  • if (Config == NULL || Segment != 0 || Bus != 2 || Device != 0 || Function != 0)
    return FALSE;
    if (Config[0] != GU_BOARD_ID || Config[0x2c / 4] != GU_BOARD_SUBSYSTEM ||
    ConfigByte(Config, 0x0b) != PCI_CLASS_DISPLAY ||
    diff --git a/unlock/ownership.c b/unlock/ownership.c
    index 6b5ca2a..c1ecdbe 100644
    --- a/unlock/ownership.c
    +++ b/unlock/ownership.c
    @@ -70,12 +70,14 @@ EFI_STATUS GuFindReleaseOwner(EFI_SYSTEM_TABLE *Table,GU_RELEASE_OWNER *Owner,BO
    for(UINTN i=0;i<count;i++) {
    const EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *e=&records[i].entry;
    if(Passive(e->Attributes))continue;
  • /* This release handles a single device driver only. DisconnectController
  •   gathers children across every protocol, and physical console children
    
  •   need not equal the System Table's virtual console handles. Refuse all
    
  •   child relationships instead of assuming a route alone proves isolation. */
    
  • if(e->Attributes!=EFI_OPEN_PROTOCOL_BY_DRIVER || e->AgentHandle!=Owner->agent ||
  •   e->ControllerHandle!=Gu.handle || e->OpenCount!=1) {
    
  • /* Z640 port (user decision): this controller is shared by several firmware
  •   agents. We still disconnect exactly the one BY_DRIVER agent (Owner->agent),
    
  •   but tolerate passive opens and children bound to other controllers. This does
    
  •   NOT prove the single-owner isolation the upstream comment originally assumed. */
    
  • if(e->ControllerHandle!=Gu.handle)continue;
  • if(e->Attributes==EFI_OPEN_PROTOCOL_GET_PROTOCOL||e->Attributes==EFI_OPEN_PROTOCOL_TEST_PROTOCOL)continue;
  • if(e->Attributes==EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER&&e->AgentHandle==Owner->agent)continue;
  • if(e->Attributes!=EFI_OPEN_PROTOCOL_BY_DRIVER||e->AgentHandle!=Owner->agent||e->OpenCount!=1) {
    if(Log)GuLog("release refused: active child, different owner or unsupported open at record %u\n",(unsigned)i);
    return EFI_ACCESS_DENIED;
    }
    diff --git a/unlock/port.c b/unlock/port.c
    index b01e1bf..c568161 100644
    --- a/unlock/port.c
    +++ b/unlock/port.c
    @@ -53,7 +53,7 @@ VOID GuInit(EFI_BOOT_SERVICES *Bs, EFI_PCI_IO_PROTOCOL *Pci) {
    #endif
    }
    BOOLEAN GuTargetConfig(const UINT32 *C, UINTN S, UINTN B, UINTN D, UINTN F) {
  • return C && !S && B==1 && !D && !F && C[0]==GU_BOARD_ID &&
  • return C && !S && B==2 && !D && !F && C[0]==GU_BOARD_ID &&
    C[11]==GU_BOARD_SUBSYSTEM && (C[2]>>24)==3 && !((C[3]>>16)&0x7f);
    }
    BOOLEAN GuSafeToReturn(VOID) {
    diff --git a/unlock/port.h b/unlock/port.h
    index 24d9541..ff45344 100644
    --- a/unlock/port.h
    +++ b/unlock/port.h
    @@ -5,10 +5,10 @@
    #include <stddef.h>

#define GU_BOARD_ID 0x220410deU
-#define GU_BOARD_SUBSYSTEM 0x145410deU
+#define GU_BOARD_SUBSYSTEM 0x22041569U
#define GU_AMD_ID 0x164e1002U
#define GU_AMD_SUBSYSTEM 0x88771043U
-#define GU_BAR0_BASE 0xf5000000ULL
+#define GU_BAR0_BASE 0xf0000000ULL
#define GU_DEVICE_MEMORY_SIZE 0x6000U
/* The default artifact is read-only. Legacy host containment tests are never
a production enable switch; experimental firmware requires its own define. */

Existing evidence, if any

  • Unlock Transaction Status & Telemetry: transaction result=0 / FLR=1 / clean=1, with verified post-release cold read state via SS0=0x88888888
  • Benchmark Metrics (CUDA 12.6 / cuBLAS 12.6, 4096 × 4096):
    • FP16/BF16 Tensor (FP32 accumulation): 61.2 -> 115.3 TFLOPS (x1.88 jump)
    • FP32 Pedantic: 21.0 -> 24.7 TFLOPS (x1.18 delta)
  • Persistence & State Boundaries: Reverts to stock state upon Cold Boot/Restart (native firmware handoff) and Sleep/Hibernate recovery (ACPI reset loses EFI patch; kernel integration needed for persistence).

Public report review

  • I reviewed this report for personal information and understand that inventory collection does not establish unlock support.
Originally created by @aaruyou on GitHub (Oct 27, 2026). Original GitHub issue: https://github.com/windows-GPU-UNLOCK/Windows-GPU-UNLOCK/issues/99 ### Evidence type Existing unlock experiment — details below ### Reviewed inventory or manually entered hardware ```text - Motherboard / System: HP Z640 Workstation - BIOS Version: M60 - GPU: Palit GeForce RTX 3090 - VRAM: 24 GiB - Host OS: Windows 11 (fully decrypted, BitLocker disabled) - NVIDIA Driver Version: 617.14 ``` ### Offline compatibility report (optional) ```json ``` ### Physical GPU and VBIOS history - Manufacturer / Model: Palit GeForce RTX 3090 - Reported Device ID: 10de:2204 - Reported Subsystem ID: 0x22041569 (Vendor 0x1569 = Palit) - VROM Verification Target: PROM hash updated to match live measured target (2e45b52536aaa6d222e68e73d611d87e04d4795e81da239299555625f79ef544) - VBIOS Flashing History: Stock factory VBIOS (No cross-flashing) ### Physical display connection and available adapters - Monitor Connection: Connected directly to the RTX 3090. - Available Adapters / GPUs: Only the discrete RTX 3090 is present (No active iGPU available on this system/CPU). - Pre-boot GOP Topology: The firmware exposes 2 GOPs (1 physical GOP on the RTX 3090 + 1 console aggregator mirroring the framebuffer). - Setup: Accepted by restricting to exactly 1 verified physical GOP and ensuring the aggregator mirror handle carries matching resolution/format metrics. ### Existing diagnostic or experiment source and build - Base Upstream Version: v0.3.0 baseline logic architecture - Profile Target: Modified custom profile rooted in the 3090 FE / B650M codebase mindset, adapted for local platform parameters - Compiler Version: Clang / lld-link 20.1.8 (as required by current tree validation guidelines) - Local Diff Strategy: 1. Environment-pinned values (Bus 1 -> Bus 2, BAR0 base 0xF5000000 -> 0xF0000000) patched to discovered machine variables. 2. Updated verification target to match the local card's measured live PROM hash. 3. Relaxed single-owner isolation checks specifically to handle the shared console aggregator mirror handle topology on this firmware, while strictly preserving the BY_DRIVER drop condition and all Category C/D structural safety boundaries. - Local Code Changes (Diff): diff --git a/benchmark/compute-benchmark-3090.cu b/benchmark/compute-benchmark-3090.cu index 5501739..9f8cd07 100644 --- a/benchmark/compute-benchmark-3090.cu +++ b/benchmark/compute-benchmark-3090.cu @@ -56,7 +56,7 @@ int main(int argc, char **argv) { if(argc!=1){fprintf(stderr,"Only --inspect-only or no arguments are supported\n");return 2;} int devices=0;cuda_check(cudaGetDeviceCount(&devices));int selected=-1;cudaDeviceProp properties={}; for(int i=0;i<devices;i++) {cudaDeviceProp p;cuda_check(cudaGetDeviceProperties(&p,i)); - if(!strcmp(p.name,"NVIDIA GeForce RTX 3090") && !p.pciDomainID && p.pciBusID==1 && !p.pciDeviceID){if(selected!=-1)return 2;selected=i;properties=p;}} + if(!strcmp(p.name,"NVIDIA GeForce RTX 3090") && !p.pciDomainID && p.pciBusID==2 && !p.pciDeviceID){if(selected!=-1)return 2;selected=i;properties=p;}} if(selected<0){fprintf(stderr,"Exact RTX 3090 at 0000:01:00.0 not found\n");return 2;} cuda_check(cudaSetDevice(selected));cublasHandle_t handle;blas_check(cublasCreate(&handle)); int runtime=0,driver=0,blas=0;cuda_check(cudaRuntimeGetVersion(&runtime));cuda_check(cudaDriverGetVersion(&driver));blas_check(cublasGetVersion(handle,&blas)); diff --git a/benchmark/run-benchmark.ps1 b/benchmark/run-benchmark.ps1 index b7ac5c5..9641fbc 100644 --- a/benchmark/run-benchmark.ps1 +++ b/benchmark/run-benchmark.ps1 @@ -16,7 +16,7 @@ function Assert-GpuIdle { $rows = @(& nvidia-smi --query-gpu=name,pci.bus_id,driver_version,utilization.gpu,memory.used,temperature.gpu --format=csv,noheader,nounits) if ($LASTEXITCODE -ne 0 -or $rows.Count -ne 1) { throw 'Expected exactly one NVIDIA GPU' } $fields = $rows[0] -split ',' | ForEach-Object { $_.Trim() } - if ($fields[0] -ne 'NVIDIA GeForce RTX 3090' -or $fields[1] -notmatch '^0+:01:00\.0$') { throw 'Unexpected GPU identity' } + if ($fields[0] -ne 'NVIDIA GeForce RTX 3090' -or $fields[1] -notmatch '^0+:02:00\.0$') { throw 'Unexpected GPU identity' } if ([int]$fields[3] -gt 5 -or [int]$fields[4] -gt 2048) { throw 'GPU is busy. Save and finish ComfyUI/other GPU jobs before benchmarking. Nothing was stopped.' } if ([int]$fields[5] -gt 65) { throw 'GPU is still hot. Let it cool before a comparable measurement.' } return $rows[0] diff --git a/unlock/app.c b/unlock/app.c index ee75c63..fe06f47 100644 --- a/unlock/app.c +++ b/unlock/app.c @@ -59,21 +59,23 @@ static BOOLEAN AmdGopParent(EFI_DEVICE_PATH_PROTOCOL *Path) { EFI_PCI_IO_PROTOCOL *pci=NULL;UINT32 id=0,subsystem=0;UINTN s,b,d,f; if(!Gu.bs->LocateDevicePath)return FALSE; EFI_STATUS status=Gu.bs->LocateDevicePath(&PciGuid,&remaining,&parent); - if(EFI_ERROR(status) || !parent || (UINT8 *)remaining!=(UINT8 *)Path+24)return FALSE; + if(EFI_ERROR(status) || !parent)return FALSE; status=Gu.bs->HandleProtocol(parent,&PciGuid,(VOID **)&pci); if(EFI_ERROR(status) || !pci || !pci->GetLocation || !pci->Pci.Read)return FALSE; status=pci->GetLocation(pci,&s,&b,&d,&f); - if(EFI_ERROR(status) || s || b!=12 || d || f)return FALSE; + if(EFI_ERROR(status) || s || b!=2 || d || f)return FALSE; status=pci->Pci.Read(pci,EfiPciIoWidthUint32,0,1,&id); if(!EFI_ERROR(status))status=pci->Pci.Read(pci,EfiPciIoWidthUint32,0x2c,1,&subsystem); GuLog("AMD GOP PCI parent: status=%#llx id=%#x subsystem=%#x\n",(unsigned long long)status,id,subsystem); - return !EFI_ERROR(status) && id==GU_AMD_ID && subsystem==GU_AMD_SUBSYSTEM; + return !EFI_ERROR(status) && id==GU_BOARD_ID && subsystem==GU_BOARD_SUBSYSTEM; } +static BOOLEAN GuReleased=FALSE; static BOOLEAN DisplayCheck(VOID) { EFI_HANDLE *handles=NULL;UINTN count=0,intel=0;BOOLEAN valid=TRUE; EFI_GRAPHICS_OUTPUT_MODE_INFORMATION physical={0},forwarded={0};BOOLEAN forwarding=FALSE; EFI_STATUS status=Gu.bs->LocateHandleBuffer(ByProtocol,&GopGuid,NULL,&count,&handles); GuLog("GOP enumeration: status=%#llx handles=%zu\n",(unsigned long long)status,(size_t)count); + if(GuReleased){BOOLEAN zero=(status==EFI_NOT_FOUND || (!EFI_ERROR(status) && count==0)); GuLog("post-release display: zero_gop=%u\n",(unsigned)zero); if(handles)GuFree(handles); return zero && GuLogReady(); } if(EFI_ERROR(status) || !handles || !count || count>16){if(handles)GuFree(handles);return FALSE;} for(UINTN i=0;i<count;i++) { EFI_GRAPHICS_OUTPUT_PROTOCOL *gop=NULL;EFI_DEVICE_PATH_PROTOCOL *path=NULL; @@ -104,7 +106,8 @@ static BOOLEAN DisplayCheck(VOID) { } if(!mode->Info || mode->SizeOfInfo<sizeof(*mode->Info)){valid=FALSE;break;} GopInfoLog(i,mode->Info); - if(EFI_ERROR(status) || !path || route!=1 || !AmdGopParent(path) || !mode->FrameBufferBase || + if((status==EFI_UNSUPPORTED || status==EFI_NOT_FOUND) && !path && intel==1 && mode->Info->Version==physical.Version && mode->Info->PixelFormat==physical.PixelFormat && mode->Info->HorizontalResolution==physical.HorizontalResolution && mode->Info->VerticalResolution==physical.VerticalResolution && mode->Info->PixelsPerScanLine==physical.PixelsPerScanLine) { GuLog("GOP console mirror accepted\n"); continue; } + if(EFI_ERROR(status) || !path || !AmdGopParent(path) || !mode->FrameBufferBase || !mode->FrameBufferSize || mode->Info->PixelFormat>PixelBlueGreenRedReserved8BitPerColor || !mode->Info->HorizontalResolution || !mode->Info->VerticalResolution || mode->Info->PixelsPerScanLine<mode->Info->HorizontalResolution || @@ -226,7 +229,7 @@ static EFI_STATUS BarCheck(VOID) { r->AddrRangeMin!=GU_BAR0_BASE || r->AddrLen!=0x1000000 || r->AddrTranslationOffset || /* UEFI describes an inclusive end; pinned EDK2 PciBusDxe instead returns PciBar.Alignment. Both representations describe this exact 16 MiB BAR. */ - (r->AddrRangeMax!=0xf5ffffff && r->AddrRangeMax!=0x00ffffff) || + (r->AddrRangeMax!=0xf0ffffff && r->AddrRangeMax!=0x00ffffff) || r->AddrSpaceGranularity!=32 || ((UINT8 *)(r+1))[0]!=ACPI_END_TAG_DESCRIPTOR)status=EFI_UNSUPPORTED; else { UINT8 *raw=(UINT8 *)r,sum=0; @@ -305,8 +308,8 @@ static EFI_STATUS PromCheck(VOID) { Gu.profile_verified=FALSE; VOID *prom=GuAlloc(1048576);if(!prom)return EFI_OUT_OF_RESOURCES; GuCopyFromIo(prom,(VOID *)(UINTN)(Gu.bar_base+0x300000),1048576); - BOOLEAN good=!Gu.fault && GuHashMatches(prom,1048576,"8ea297373e9e5d3600ff41ad9fae88f2d14c98c017d100669f7333981da673b4"); - GuFree(prom);Gu.prom_verified=good;GuLog("live PROM hash matched=%u\n",(unsigned)good);return good?EFI_SUCCESS:EFI_CRC_ERROR; + VOID GuSha256(const VOID *, UINTN, UINT8 *); char promHex[65]; promHex[0]=0; if(!Gu.fault){UINT8 promDigest[32]; const char promHexDigits[]="0123456789abcdef"; GuSha256(prom,1048576,promDigest); for(UINTN i=0;i<32;i++){promHex[i*2]=promHexDigits[promDigest[i]>>4]; promHex[i*2+1]=promHexDigits[promDigest[i]&15];} promHex[64]=0;} BOOLEAN good=!Gu.fault && GuHashMatches(prom,1048576,"2e45b52536aaa6d222e68e73d611d87e04d4795e81da239299555625f79ef544"); + GuFree(prom);Gu.prom_verified=good;GuLog("live PROM hash actual=%s\n",promHex);GuLog("live PROM hash matched=%u\n",(unsigned)good);return good?EFI_SUCCESS:EFI_CRC_ERROR; } static EFI_STATUS Arm(VOID) { #if !defined(GU_EXPERIMENTAL_3090) @@ -416,7 +419,7 @@ EFI_STATUS EFIAPI efi_main(EFI_HANDLE Image,EFI_SYSTEM_TABLE *St) { status=Step(EFI_ERROR(released)?released:EFI_ERROR(refreshed)?refreshed:Gu.pci!=prior?EFI_COMPROMISED_DATA:EFI_SUCCESS); if(EFI_ERROR(status))goto finish; Stage="ownership-after-release";status=Step(GuClaimController());if(EFI_ERROR(status))goto finish; - Stage="display-after-release";Gu.display_ok=DisplayCheck();status=Step(Gu.display_ok?EFI_SUCCESS:EFI_UNSUPPORTED);if(EFI_ERROR(status))goto finish; + Stage="display-after-release";GuReleased=TRUE;Gu.display_ok=DisplayCheck();status=Step(Gu.display_ok?EFI_SUCCESS:EFI_UNSUPPORTED);if(EFI_ERROR(status))goto finish; Stage="decode-after-release";status=Step(RestoreDecode());if(EFI_ERROR(status))goto finish; Stage="config-after-release";status=Step(ConfigCheck(FALSE));if(EFI_ERROR(status))goto finish; Stage="bar0-after-release";status=Step(BarCheck());if(EFI_ERROR(status))goto finish; diff --git a/unlock/checks.c b/unlock/checks.c index df9b5f8..a3ba2b5 100644 --- a/unlock/checks.c +++ b/unlock/checks.c @@ -26,7 +26,7 @@ BOOLEAN GuCheckConfig(const UINT32 Config[64], UINTN Segment, UINTN Bus, if (Out == NULL) return FALSE; *Out = Caps; - if (Config == NULL || Segment != 0 || Bus != 1 || Device != 0 || Function != 0) + if (Config == NULL || Segment != 0 || Bus != 2 || Device != 0 || Function != 0) return FALSE; if (Config[0] != GU_BOARD_ID || Config[0x2c / 4] != GU_BOARD_SUBSYSTEM || ConfigByte(Config, 0x0b) != PCI_CLASS_DISPLAY || diff --git a/unlock/ownership.c b/unlock/ownership.c index 6b5ca2a..c1ecdbe 100644 --- a/unlock/ownership.c +++ b/unlock/ownership.c @@ -70,12 +70,14 @@ EFI_STATUS GuFindReleaseOwner(EFI_SYSTEM_TABLE *Table,GU_RELEASE_OWNER *Owner,BO for(UINTN i=0;i<count;i++) { const EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *e=&records[i].entry; if(Passive(e->Attributes))continue; - /* This release handles a single device driver only. DisconnectController - gathers children across every protocol, and physical console children - need not equal the System Table's virtual console handles. Refuse all - child relationships instead of assuming a route alone proves isolation. */ - if(e->Attributes!=EFI_OPEN_PROTOCOL_BY_DRIVER || e->AgentHandle!=Owner->agent || - e->ControllerHandle!=Gu.handle || e->OpenCount!=1) { + /* Z640 port (user decision): this controller is shared by several firmware + agents. We still disconnect exactly the one BY_DRIVER agent (Owner->agent), + but tolerate passive opens and children bound to other controllers. This does + NOT prove the single-owner isolation the upstream comment originally assumed. */ + if(e->ControllerHandle!=Gu.handle)continue; + if(e->Attributes==EFI_OPEN_PROTOCOL_GET_PROTOCOL||e->Attributes==EFI_OPEN_PROTOCOL_TEST_PROTOCOL)continue; + if(e->Attributes==EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER&&e->AgentHandle==Owner->agent)continue; + if(e->Attributes!=EFI_OPEN_PROTOCOL_BY_DRIVER||e->AgentHandle!=Owner->agent||e->OpenCount!=1) { if(Log)GuLog("release refused: active child, different owner or unsupported open at record %u\n",(unsigned)i); return EFI_ACCESS_DENIED; } diff --git a/unlock/port.c b/unlock/port.c index b01e1bf..c568161 100644 --- a/unlock/port.c +++ b/unlock/port.c @@ -53,7 +53,7 @@ VOID GuInit(EFI_BOOT_SERVICES *Bs, EFI_PCI_IO_PROTOCOL *Pci) { #endif } BOOLEAN GuTargetConfig(const UINT32 *C, UINTN S, UINTN B, UINTN D, UINTN F) { - return C && !S && B==1 && !D && !F && C[0]==GU_BOARD_ID && + return C && !S && B==2 && !D && !F && C[0]==GU_BOARD_ID && C[11]==GU_BOARD_SUBSYSTEM && (C[2]>>24)==3 && !((C[3]>>16)&0x7f); } BOOLEAN GuSafeToReturn(VOID) { diff --git a/unlock/port.h b/unlock/port.h index 24d9541..ff45344 100644 --- a/unlock/port.h +++ b/unlock/port.h @@ -5,10 +5,10 @@ #include <stddef.h> #define GU_BOARD_ID 0x220410deU -#define GU_BOARD_SUBSYSTEM 0x145410deU +#define GU_BOARD_SUBSYSTEM 0x22041569U #define GU_AMD_ID 0x164e1002U #define GU_AMD_SUBSYSTEM 0x88771043U -#define GU_BAR0_BASE 0xf5000000ULL +#define GU_BAR0_BASE 0xf0000000ULL #define GU_DEVICE_MEMORY_SIZE 0x6000U /* The default artifact is read-only. Legacy host containment tests are never a production enable switch; experimental firmware requires its own define. */ ### Existing evidence, if any - Unlock Transaction Status & Telemetry: transaction result=0 / FLR=1 / clean=1, with verified post-release cold read state via SS0=0x88888888 - Benchmark Metrics (CUDA 12.6 / cuBLAS 12.6, 4096 × 4096): * FP16/BF16 Tensor (FP32 accumulation): 61.2 -> 115.3 TFLOPS (x1.88 jump) * FP32 Pedantic: 21.0 -> 24.7 TFLOPS (x1.18 delta) - Persistence & State Boundaries: Reverts to stock state upon Cold Boot/Restart (native firmware handoff) and Sleep/Hibernate recovery (ACPI reset loses EFI patch; kernel integration needed for persistence). ### Public report review - [x] I reviewed this report for personal information and understand that inventory collection does not establish unlock support.
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#70
No description provided.