[PR #72] gfw_eval: keep polling on PRI-error samples #139

Open
opened 2026-10-26 16:41:10 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Zagitta/gpu-unlock/pull/72
Author: @rafaellm2
Created: 10/25/2026
Status: 🔄 Open

Base: main ← Head: gfw-reject-pri-errors


📝 Commits (1)

  • 1cb357f gfw_eval: keep polling on PRI-error samples

📊 Changes

2 files changed (+9 additions, -0 deletions)

View changed files

📝 kernel/gpu_unlock/gfw_eval.c (+5 -0)
📝 tests/test_gfw_eval.c (+4 -0)

📄 Description

Fixes #42.

gpu_unlock_gfw_assess() rejects all-ones reads but accepts 0xbadfxxxx
PRI-error values when they happen to pass the bit tests: plm=0xbadf0001 boot=0xbadf00ff cpuctl=0xbadf0010 is reported as complete. inaccessible()
in unlock_610.c already treats that family as unreadable.

Such samples now return -EAGAIN, so the initial wait in
unlock_transaction_gfw() keeps polling and ends in -ETIMEDOUT if they
persist.

-EAGAIN rather than the -ENODEV the issue suggests: wait_post_flr_gfw()
already maps inaccessible samples to -EAGAIN, and the boot scratch register
is PL-protected until GFW opens it, so a PRI error there can be transient on a
card that is still booting. All-ones handling is unchanged.

Testing: a new case in tests/test_gfw_eval.c fails before and passes after.
make test with generated firmware (full mocked unlock included) passes.
Not tested on hardware.

Disclosure: the patch and its testing were done with an AI assistant (Claude).


🔄 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/Zagitta/gpu-unlock/pull/72 **Author:** [@rafaellm2](https://github.com/rafaellm2) **Created:** 10/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `gfw-reject-pri-errors` --- ### 📝 Commits (1) - [`1cb357f`](https://github.com/Zagitta/gpu-unlock/commit/1cb357f62336adb0537ebcc933ec89c3fe636baf) gfw_eval: keep polling on PRI-error samples ### 📊 Changes **2 files changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `kernel/gpu_unlock/gfw_eval.c` (+5 -0) 📝 `tests/test_gfw_eval.c` (+4 -0) </details> ### 📄 Description Fixes #42. `gpu_unlock_gfw_assess()` rejects all-ones reads but accepts `0xbadfxxxx` PRI-error values when they happen to pass the bit tests: `plm=0xbadf0001 boot=0xbadf00ff cpuctl=0xbadf0010` is reported as complete. `inaccessible()` in unlock_610.c already treats that family as unreadable. Such samples now return `-EAGAIN`, so the initial wait in `unlock_transaction_gfw()` keeps polling and ends in `-ETIMEDOUT` if they persist. `-EAGAIN` rather than the `-ENODEV` the issue suggests: `wait_post_flr_gfw()` already maps inaccessible samples to `-EAGAIN`, and the boot scratch register is PL-protected until GFW opens it, so a PRI error there can be transient on a card that is still booting. All-ones handling is unchanged. Testing: a new case in tests/test_gfw_eval.c fails before and passes after. `make test` with generated firmware (full mocked unlock included) passes. Not tested on hardware. Disclosure: the patch and its testing were done with an AI assistant (Claude). --- <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
Zagitta/gpu-unlock#139
No description provided.