Skip to content

rust_binder: fix compilation error due to Owned<Page> allocation - #559

Closed
Neko-0v0 wants to merge 1 commit into
AsahiLinux:asahifrom
Neko-0v0:asahi
Closed

Neko-0v0 wants to merge 1 commit into
AsahiLinux:asahifrom
Neko-0v0:asahi

Conversation

@Neko-0v0

Copy link
Copy Markdown

Commit 34d50740e253 makes Page Ownable and returns Owned<Page> in alloc_page, which is unexpected for rust_binder and causes compilation error when CONFIG_ANDROID_BINDER_IPC_RUST=y.
This patch fixes the problem. Tested on Mac mini M2, Asahi Arch Linux ARM, kernel 7.1.5.

…d50740e253)

Signed-off-by: Neko-0v0 <neko@cytus.xyz>
@jannau

jannau commented Aug 5, 2026

Copy link
Copy Markdown
Member

thanks, I think I just disabled binder (because it's not enabled inn linux distros) and then forgot about it. manually merged, will appear in the next tag

@jannau jannau closed this Aug 5, 2026
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 4, 2026
The job states, streams, barrier and parameter buffer records were in the
firmware's non-cacheable heaps, on the reading that macOS maps all but its
range 8 that way. It does not: its command pools map with options
0x1028800000005 and its SKU encoder buffers with 0x20800000007, both range 8
with bit 41, firmware-cached. The firmware is built for that: it invalidates
a record before reading it and writes back 0x920 B of a TA state and 0xC60 B
of a 3D state at the post-process. Uncached, a TA's executor step took 13.2 us
against 5.5 cached in the firmware's own trace, a 3D's 9.4 against 4.7.

New heaps job and job_fw hold only these records, so that a line of a freed
one meets nothing but another record. A freed record waits for 1024 to 2048
newer ones. macOS's pools hand out elements by a round-robin cursor, 240 per
type (3 x 80), 10,800 barrier records: an address comes back after 240 jobs.
Reused at once, a first form crashed the firmware 29 s after boot: "DAG: Non
Sequential Stamp Updates seen entryIdx 0x68 roots.dag 0x67", on vkbench. The
GPU's times move to macOS's element sizes, 0x940 and 0xC80, off the state's
last line. The notifiers stay non-cacheable, as macOS's.

Kernel AsahiLinux#556 with a runtime switch, one boot, vkbench fill, us a pass, 3 rounds:
64x64 103-126 (uncached) against 90-102 (cached), 756x472 100-124 against 89-92.
A Direct3D 12 game at its Maximum preset, 1080p, without gamemode, one launch,
12 s arms alternated over 4 cycles: 44.3-44.5 fps, 1 % low 23.9-26.4, 73.4-74.8
W against 47.8-48.0 fps, 27.1-28.2, 77.3-80.3 W; 1.65 J a frame against 1.62.

This form, kernel AsahiLinux#559, mesa r288: regress.sh 30 of 30; a tenth of dEQP-VK at 8
jobs, Pass 105,394, ExpectedFail 2, 0 recoveries; the game, one launch, 47.7-47.8
fps, 1 % low 27.2-29.2, 80.0-80.8 W. vkbench fill 87-95 us a pass, macOS's 43.

A job's GPU start and end, which sat past the end of its state, go to a
non-cacheable block of their own: the firmware writes a state back only up to
its end, so cached there they rarely reached memory (1,474,109 jobs untimed
against 383,778 timed; after the move, 1 of 24,000) and the fdinfo GPU time
read a fifth of the truth.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 5, 2026
The job states, streams, barrier and parameter buffer records were in the
firmware's non-cacheable heaps, on the reading that macOS maps all but its
range 8 that way. It does not: its command pools map with options
0x1028800000005 and its SKU encoder buffers with 0x20800000007, both range 8
with bit 41, firmware-cached. The firmware is built for that: it invalidates
a record before reading it and writes back 0x920 B of a TA state and 0xC60 B
of a 3D state at the post-process. Uncached, a TA's executor step took 13.2 us
against 5.5 cached in the firmware's own trace, a 3D's 9.4 against 4.7.

New heaps job and job_fw hold only these records, so that a line of a freed
one meets nothing but another record. A freed record waits for 1024 to 2048
newer ones. macOS's pools hand out elements by a round-robin cursor, 240 per
type (3 x 80), 10,800 barrier records: an address comes back after 240 jobs.
Reused at once, a first form crashed the firmware 29 s after boot: "DAG: Non
Sequential Stamp Updates seen entryIdx 0x68 roots.dag 0x67", on vkbench. The
GPU's times move to macOS's element sizes, 0x940 and 0xC80, off the state's
last line. The notifiers stay non-cacheable, as macOS's.

Kernel AsahiLinux#556 with a runtime switch, one boot, vkbench fill, us a pass, 3 rounds:
64x64 103-126 (uncached) against 90-102 (cached), 756x472 100-124 against 89-92.
A Direct3D 12 game at its Maximum preset, 1080p, without gamemode, one launch,
12 s arms alternated over 4 cycles: 44.3-44.5 fps, 1 % low 23.9-26.4, 73.4-74.8
W against 47.8-48.0 fps, 27.1-28.2, 77.3-80.3 W; 1.65 J a frame against 1.62.

This form, kernel AsahiLinux#559, mesa r288: regress.sh 30 of 30; a tenth of dEQP-VK at 8
jobs, Pass 105,394, ExpectedFail 2, 0 recoveries; the game, one launch, 47.7-47.8
fps, 1 % low 27.2-29.2, 80.0-80.8 W. vkbench fill 87-95 us a pass, macOS's 43.

A job's GPU start and end, which sat past the end of its state, go to a
non-cacheable block of their own: the firmware writes a state back only up to
its end, so cached there they rarely reached memory (1,474,109 jobs untimed
against 383,778 timed; after the move, 1 of 24,000) and the fdinfo GPU time
read a fifth of the truth.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 5, 2026
The job states, streams, barrier and parameter buffer records were in the
firmware's non-cacheable heaps, on the reading that macOS maps all but its
range 8 that way. It does not: its command pools map with options
0x1028800000005 and its SKU encoder buffers with 0x20800000007, both range 8
with bit 41, firmware-cached. The firmware is built for that: it invalidates
a record before reading it and writes back 0x920 B of a TA state and 0xC60 B
of a 3D state at the post-process. Uncached, a TA's executor step took 13.2 us
against 5.5 cached in the firmware's own trace, a 3D's 9.4 against 4.7.

New heaps job and job_fw hold only these records, so that a line of a freed
one meets nothing but another record. A freed record waits for 1024 to 2048
newer ones. macOS's pools hand out elements by a round-robin cursor, 240 per
type (3 x 80), 10,800 barrier records: an address comes back after 240 jobs.
Reused at once, a first form crashed the firmware 29 s after boot: "DAG: Non
Sequential Stamp Updates seen entryIdx 0x68 roots.dag 0x67", on vkbench. The
GPU's times move to macOS's element sizes, 0x940 and 0xC80, off the state's
last line. The notifiers stay non-cacheable, as macOS's.

Kernel AsahiLinux#556 with a runtime switch, one boot, vkbench fill, us a pass, 3 rounds:
64x64 103-126 (uncached) against 90-102 (cached), 756x472 100-124 against 89-92.
A Direct3D 12 game at its Maximum preset, 1080p, without gamemode, one launch,
12 s arms alternated over 4 cycles: 44.3-44.5 fps, 1 % low 23.9-26.4, 73.4-74.8
W against 47.8-48.0 fps, 27.1-28.2, 77.3-80.3 W; 1.65 J a frame against 1.62.

This form, kernel AsahiLinux#559, mesa r288: regress.sh 30 of 30; a tenth of dEQP-VK at 8
jobs, Pass 105,394, ExpectedFail 2, 0 recoveries; the game, one launch, 47.7-47.8
fps, 1 % low 27.2-29.2, 80.0-80.8 W. vkbench fill 87-95 us a pass, macOS's 43.

A job's GPU start and end, which sat past the end of its state, go to a
non-cacheable block of their own: the firmware writes a state back only up to
its end, so cached there they rarely reached memory (1,474,109 jobs untimed
against 383,778 timed; after the move, 1 of 24,000) and the fdinfo GPU time
read a fifth of the truth.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 7, 2026
The job states, streams, barrier and parameter buffer records were in the
firmware's non-cacheable heaps, on the reading that macOS maps all but its
range 8 that way. It does not: its command pools map with options
0x1028800000005 and its SKU encoder buffers with 0x20800000007, both range 8
with bit 41, firmware-cached. The firmware is built for that: it invalidates
a record before reading it and writes back 0x920 B of a TA state and 0xC60 B
of a 3D state at the post-process. Uncached, a TA's executor step took 13.2 us
against 5.5 cached in the firmware's own trace, a 3D's 9.4 against 4.7.

New heaps job and job_fw hold only these records, so that a line of a freed
one meets nothing but another record. A freed record waits for 1024 to 2048
newer ones. macOS's pools hand out elements by a round-robin cursor, 240 per
type (3 x 80), 10,800 barrier records: an address comes back after 240 jobs.
Reused at once, a first form crashed the firmware 29 s after boot: "DAG: Non
Sequential Stamp Updates seen entryIdx 0x68 roots.dag 0x67", on vkbench. The
GPU's times move to macOS's element sizes, 0x940 and 0xC80, off the state's
last line. The notifiers stay non-cacheable, as macOS's.

Kernel AsahiLinux#556 with a runtime switch, one boot, vkbench fill, us a pass, 3 rounds:
64x64 103-126 (uncached) against 90-102 (cached), 756x472 100-124 against 89-92.
A Direct3D 12 game at its Maximum preset, 1080p, without gamemode, one launch,
12 s arms alternated over 4 cycles: 44.3-44.5 fps, 1 % low 23.9-26.4, 73.4-74.8
W against 47.8-48.0 fps, 27.1-28.2, 77.3-80.3 W; 1.65 J a frame against 1.62.

This form, kernel AsahiLinux#559, mesa r288: regress.sh 30 of 30; a tenth of dEQP-VK at 8
jobs, Pass 105,394, ExpectedFail 2, 0 recoveries; the game, one launch, 47.7-47.8
fps, 1 % low 27.2-29.2, 80.0-80.8 W. vkbench fill 87-95 us a pass, macOS's 43.

A job's GPU start and end, which sat past the end of its state, go to a
non-cacheable block of their own: the firmware writes a state back only up to
its end, so cached there they rarely reached memory (1,474,109 jobs untimed
against 383,778 timed; after the move, 1 of 24,000) and the fdinfo GPU time
read a fifth of the truth.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 7, 2026
The job states, streams, barrier and parameter buffer records were in the
firmware's non-cacheable heaps, on the reading that macOS maps all but its
range 8 that way. It does not: its command pools map with options
0x1028800000005 and its SKU encoder buffers with 0x20800000007, both range 8
with bit 41, firmware-cached. The firmware is built for that: it invalidates
a record before reading it and writes back 0x920 B of a TA state and 0xC60 B
of a 3D state at the post-process. Uncached, a TA's executor step took 13.2 us
against 5.5 cached in the firmware's own trace, a 3D's 9.4 against 4.7.

New heaps job and job_fw hold only these records, so that a line of a freed
one meets nothing but another record. A freed record waits for 1024 to 2048
newer ones. macOS's pools hand out elements by a round-robin cursor, 240 per
type (3 x 80), 10,800 barrier records: an address comes back after 240 jobs.
Reused at once, a first form crashed the firmware 29 s after boot: "DAG: Non
Sequential Stamp Updates seen entryIdx 0x68 roots.dag 0x67", on vkbench. The
GPU's times move to macOS's element sizes, 0x940 and 0xC80, off the state's
last line. The notifiers stay non-cacheable, as macOS's.

Kernel AsahiLinux#556 with a runtime switch, one boot, vkbench fill, us a pass, 3 rounds:
64x64 103-126 (uncached) against 90-102 (cached), 756x472 100-124 against 89-92.
A Direct3D 12 game at its Maximum preset, 1080p, without gamemode, one launch,
12 s arms alternated over 4 cycles: 44.3-44.5 fps, 1 % low 23.9-26.4, 73.4-74.8
W against 47.8-48.0 fps, 27.1-28.2, 77.3-80.3 W; 1.65 J a frame against 1.62.

This form, kernel AsahiLinux#559, mesa r288: regress.sh 30 of 30; a tenth of dEQP-VK at 8
jobs, Pass 105,394, ExpectedFail 2, 0 recoveries; the game, one launch, 47.7-47.8
fps, 1 % low 27.2-29.2, 80.0-80.8 W. vkbench fill 87-95 us a pass, macOS's 43.

A job's GPU start and end, which sat past the end of its state, go to a
non-cacheable block of their own: the firmware writes a state back only up to
its end, so cached there they rarely reached memory (1,474,109 jobs untimed
against 383,778 timed; after the move, 1 of 24,000) and the fdinfo GPU time
read a fifth of the truth.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 8, 2026
The job states, streams, barrier and parameter buffer records were in the
firmware's non-cacheable heaps, on the reading that macOS maps all but its
range 8 that way. It does not: its command pools map with options
0x1028800000005 and its SKU encoder buffers with 0x20800000007, both range 8
with bit 41, firmware-cached. The firmware is built for that: it invalidates
a record before reading it and writes back 0x920 B of a TA state and 0xC60 B
of a 3D state at the post-process. Uncached, a TA's executor step took 13.2 us
against 5.5 cached in the firmware's own trace, a 3D's 9.4 against 4.7.

New heaps job and job_fw hold only these records, so that a line of a freed
one meets nothing but another record. A freed record waits for 1024 to 2048
newer ones. macOS's pools hand out elements by a round-robin cursor, 240 per
type (3 x 80), 10,800 barrier records: an address comes back after 240 jobs.
Reused at once, a first form crashed the firmware 29 s after boot: "DAG: Non
Sequential Stamp Updates seen entryIdx 0x68 roots.dag 0x67", on vkbench. The
GPU's times move to macOS's element sizes, 0x940 and 0xC80, off the state's
last line. The notifiers stay non-cacheable, as macOS's.

Kernel AsahiLinux#556 with a runtime switch, one boot, vkbench fill, us a pass, 3 rounds:
64x64 103-126 (uncached) against 90-102 (cached), 756x472 100-124 against 89-92.
A Direct3D 12 game at its Maximum preset, 1080p, without gamemode, one launch,
12 s arms alternated over 4 cycles: 44.3-44.5 fps, 1 % low 23.9-26.4, 73.4-74.8
W against 47.8-48.0 fps, 27.1-28.2, 77.3-80.3 W; 1.65 J a frame against 1.62.

This form, kernel AsahiLinux#559, mesa r288: regress.sh 30 of 30; a tenth of dEQP-VK at 8
jobs, Pass 105,394, ExpectedFail 2, 0 recoveries; the game, one launch, 47.7-47.8
fps, 1 % low 27.2-29.2, 80.0-80.8 W. vkbench fill 87-95 us a pass, macOS's 43.

A job's GPU start and end, which sat past the end of its state, go to a
non-cacheable block of their own: the firmware writes a state back only up to
its end, so cached there they rarely reached memory (1,474,109 jobs untimed
against 383,778 timed; after the move, 1 of 24,000) and the fdinfo GPU time
read a fifth of the truth.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 8, 2026
The job states, streams, barrier and parameter buffer records were in the
firmware's non-cacheable heaps, on the reading that macOS maps all but its
range 8 that way. It does not: its command pools map with options
0x1028800000005 and its SKU encoder buffers with 0x20800000007, both range 8
with bit 41, firmware-cached. The firmware is built for that: it invalidates
a record before reading it and writes back 0x920 B of a TA state and 0xC60 B
of a 3D state at the post-process. Uncached, a TA's executor step took 13.2 us
against 5.5 cached in the firmware's own trace, a 3D's 9.4 against 4.7.

New heaps job and job_fw hold only these records, so that a line of a freed
one meets nothing but another record. A freed record waits for 1024 to 2048
newer ones. macOS's pools hand out elements by a round-robin cursor, 240 per
type (3 x 80), 10,800 barrier records: an address comes back after 240 jobs.
Reused at once, a first form crashed the firmware 29 s after boot: "DAG: Non
Sequential Stamp Updates seen entryIdx 0x68 roots.dag 0x67", on vkbench. The
GPU's times move to macOS's element sizes, 0x940 and 0xC80, off the state's
last line. The notifiers stay non-cacheable, as macOS's.

Kernel AsahiLinux#556 with a runtime switch, one boot, vkbench fill, us a pass, 3 rounds:
64x64 103-126 (uncached) against 90-102 (cached), 756x472 100-124 against 89-92.
A Direct3D 12 game at its Maximum preset, 1080p, without gamemode, one launch,
12 s arms alternated over 4 cycles: 44.3-44.5 fps, 1 % low 23.9-26.4, 73.4-74.8
W against 47.8-48.0 fps, 27.1-28.2, 77.3-80.3 W; 1.65 J a frame against 1.62.

This form, kernel AsahiLinux#559, mesa r288: regress.sh 30 of 30; a tenth of dEQP-VK at 8
jobs, Pass 105,394, ExpectedFail 2, 0 recoveries; the game, one launch, 47.7-47.8
fps, 1 % low 27.2-29.2, 80.0-80.8 W. vkbench fill 87-95 us a pass, macOS's 43.

A job's GPU start and end, which sat past the end of its state, go to a
non-cacheable block of their own: the firmware writes a state back only up to
its end, so cached there they rarely reached memory (1,474,109 jobs untimed
against 383,778 timed; after the move, 1 of 24,000) and the fdinfo GPU time
read a fifth of the truth.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 11, 2026
The job states, streams, barrier and parameter buffer records were in the
firmware's non-cacheable heaps, on the reading that macOS maps all but its
range 8 that way. It does not: its command pools map with options
0x1028800000005 and its SKU encoder buffers with 0x20800000007, both range 8
with bit 41, firmware-cached. The firmware is built for that: it invalidates
a record before reading it and writes back 0x920 B of a TA state and 0xC60 B
of a 3D state at the post-process. Uncached, a TA's executor step took 13.2 us
against 5.5 cached in the firmware's own trace, a 3D's 9.4 against 4.7.

New heaps job and job_fw hold only these records, so that a line of a freed
one meets nothing but another record. A freed record waits for 1024 to 2048
newer ones. macOS's pools hand out elements by a round-robin cursor, 240 per
type (3 x 80), 10,800 barrier records: an address comes back after 240 jobs.
Reused at once, a first form crashed the firmware 29 s after boot: "DAG: Non
Sequential Stamp Updates seen entryIdx 0x68 roots.dag 0x67", on vkbench. The
GPU's times move to macOS's element sizes, 0x940 and 0xC80, off the state's
last line. The notifiers stay non-cacheable, as macOS's.

Kernel AsahiLinux#556 with a runtime switch, one boot, vkbench fill, us a pass, 3 rounds:
64x64 103-126 (uncached) against 90-102 (cached), 756x472 100-124 against 89-92.
A Direct3D 12 game at its Maximum preset, 1080p, without gamemode, one launch,
12 s arms alternated over 4 cycles: 44.3-44.5 fps, 1 % low 23.9-26.4, 73.4-74.8
W against 47.8-48.0 fps, 27.1-28.2, 77.3-80.3 W; 1.65 J a frame against 1.62.

This form, kernel AsahiLinux#559, mesa r288: regress.sh 30 of 30; a tenth of dEQP-VK at 8
jobs, Pass 105,394, ExpectedFail 2, 0 recoveries; the game, one launch, 47.7-47.8
fps, 1 % low 27.2-29.2, 80.0-80.8 W. vkbench fill 87-95 us a pass, macOS's 43.

A job's GPU start and end, which sat past the end of its state, go to a
non-cacheable block of their own: the firmware writes a state back only up to
its end, so cached there they rarely reached memory (1,474,109 jobs untimed
against 383,778 timed; after the move, 1 of 24,000) and the fdinfo GPU time
read a fifth of the truth.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 11, 2026
After a match the SEP updates the matched identity's template in the
background. macOS's kext fetches the result with SBIO 0x21 after each 0x09
and when the SEP's request 3 says it is ready (checkBgOpsResult
0xfffffe0009ac210c, handleSEPMessage case 3 0xfffffe0009abe420); a changed
template list, or 0x09's updated flag at 0x18, marks the catacomb dirty and
biometrickitd saves it (saveCatacombIfDirty). Do the same: request 3 sets
bgops_ready, 0x21 is fetched after each 0x09 and before a save, and a match
saves the user's catacombs when one changed, else the lockout record alone.

Tested with the owner's finger (Mac build AsahiLinux#559 on r207, 2026-11-12): four
matches, three with request 3 and 0x21 answering templates updated, the
user's catacomb saved grown from 0x5f0d to 0x65a3 bytes and confirmed.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 14, 2026
After a match the SEP updates the matched identity's template in the
background. macOS's kext fetches the result with SBIO 0x21 after each 0x09
and when the SEP's request 3 says it is ready (checkBgOpsResult
0xfffffe0009ac210c, handleSEPMessage case 3 0xfffffe0009abe420); a changed
template list, or 0x09's updated flag at 0x18, marks the catacomb dirty and
biometrickitd saves it (saveCatacombIfDirty). Do the same: request 3 sets
bgops_ready, 0x21 is fetched after each 0x09 and before a save, and a match
saves the user's catacombs when one changed, else the lockout record alone.

Tested with the owner's finger (Mac build AsahiLinux#559 on r207, 2026-11-12): four
matches, three with request 3 and 0x21 answering templates updated, the
user's catacomb saved grown from 0x5f0d to 0x65a3 bytes and confirmed.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 19, 2026
After a match the SEP updates the matched identity's template in the
background. macOS's kext fetches the result with SBIO 0x21 after each 0x09
and when the SEP's request 3 says it is ready (checkBgOpsResult
0xfffffe0009ac210c, handleSEPMessage case 3 0xfffffe0009abe420); a changed
template list, or 0x09's updated flag at 0x18, marks the catacomb dirty and
biometrickitd saves it (saveCatacombIfDirty). Do the same: request 3 sets
bgops_ready, 0x21 is fetched after each 0x09 and before a save, and a match
saves the user's catacombs when one changed, else the lockout record alone.

Tested with the owner's finger (Mac build AsahiLinux#559 on r207, 2026-11-12): four
matches, three with request 3 and 0x21 answering templates updated, the
user's catacomb saved grown from 0x5f0d to 0x65a3 bytes and confirmed.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 19, 2026
The job states, streams, barrier and parameter buffer records were in the
firmware's non-cacheable heaps, on the reading that macOS maps all but its
range 8 that way. It does not: its command pools map with options
0x1028800000005 and its SKU encoder buffers with 0x20800000007, both range 8
with bit 41, firmware-cached. The firmware is built for that: it invalidates
a record before reading it and writes back 0x920 B of a TA state and 0xC60 B
of a 3D state at the post-process. Uncached, a TA's executor step took 13.2 us
against 5.5 cached in the firmware's own trace, a 3D's 9.4 against 4.7.

New heaps job and job_fw hold only these records, so that a line of a freed
one meets nothing but another record. A freed record waits for 1024 to 2048
newer ones. macOS's pools hand out elements by a round-robin cursor, 240 per
type (3 x 80), 10,800 barrier records: an address comes back after 240 jobs.
Reused at once, a first form crashed the firmware 29 s after boot: "DAG: Non
Sequential Stamp Updates seen entryIdx 0x68 roots.dag 0x67", on vkbench. The
GPU's times move to macOS's element sizes, 0x940 and 0xC80, off the state's
last line. The notifiers stay non-cacheable, as macOS's.

Kernel AsahiLinux#556 with a runtime switch, one boot, vkbench fill, us a pass, 3 rounds:
64x64 103-126 (uncached) against 90-102 (cached), 756x472 100-124 against 89-92.
A Direct3D 12 game at its Maximum preset, 1080p, without gamemode, one launch,
12 s arms alternated over 4 cycles: 44.3-44.5 fps, 1 % low 23.9-26.4, 73.4-74.8
W against 47.8-48.0 fps, 27.1-28.2, 77.3-80.3 W; 1.65 J a frame against 1.62.

This form, kernel AsahiLinux#559, mesa r288: regress.sh 30 of 30; a tenth of dEQP-VK at 8
jobs, Pass 105,394, ExpectedFail 2, 0 recoveries; the game, one launch, 47.7-47.8
fps, 1 % low 27.2-29.2, 80.0-80.8 W. vkbench fill 87-95 us a pass, macOS's 43.

A job's GPU start and end, which sat past the end of its state, go to a
non-cacheable block of their own: the firmware writes a state back only up to
its end, so cached there they rarely reached memory (1,474,109 jobs untimed
against 383,778 timed; after the move, 1 of 24,000) and the fdinfo GPU time
read a fifth of the truth.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 19, 2026
After a match the SEP updates the matched identity's template in the
background. macOS's kext fetches the result with SBIO 0x21 after each 0x09
and when the SEP's request 3 says it is ready (checkBgOpsResult
0xfffffe0009ac210c, handleSEPMessage case 3 0xfffffe0009abe420); a changed
template list, or 0x09's updated flag at 0x18, marks the catacomb dirty and
biometrickitd saves it (saveCatacombIfDirty). Do the same: request 3 sets
bgops_ready, 0x21 is fetched after each 0x09 and before a save, and a match
saves the user's catacombs when one changed, else the lockout record alone.

Tested with the owner's finger (Mac build AsahiLinux#559 on r207, 2026-11-12): four
matches, three with request 3 and 0x21 answering templates updated, the
user's catacomb saved grown from 0x5f0d to 0x65a3 bytes and confirmed.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 20, 2026
The job states, streams, barrier and parameter buffer records were in the
firmware's non-cacheable heaps, on the reading that macOS maps all but its
range 8 that way. It does not: its command pools map with options
0x1028800000005 and its SKU encoder buffers with 0x20800000007, both range 8
with bit 41, firmware-cached. The firmware is built for that: it invalidates
a record before reading it and writes back 0x920 B of a TA state and 0xC60 B
of a 3D state at the post-process. Uncached, a TA's executor step took 13.2 us
against 5.5 cached in the firmware's own trace, a 3D's 9.4 against 4.7.

New heaps job and job_fw hold only these records, so that a line of a freed
one meets nothing but another record. A freed record waits for 1024 to 2048
newer ones. macOS's pools hand out elements by a round-robin cursor, 240 per
type (3 x 80), 10,800 barrier records: an address comes back after 240 jobs.
Reused at once, a first form crashed the firmware 29 s after boot: "DAG: Non
Sequential Stamp Updates seen entryIdx 0x68 roots.dag 0x67", on vkbench. The
GPU's times move to macOS's element sizes, 0x940 and 0xC80, off the state's
last line. The notifiers stay non-cacheable, as macOS's.

Kernel AsahiLinux#556 with a runtime switch, one boot, vkbench fill, us a pass, 3 rounds:
64x64 103-126 (uncached) against 90-102 (cached), 756x472 100-124 against 89-92.
A Direct3D 12 game at its Maximum preset, 1080p, without gamemode, one launch,
12 s arms alternated over 4 cycles: 44.3-44.5 fps, 1 % low 23.9-26.4, 73.4-74.8
W against 47.8-48.0 fps, 27.1-28.2, 77.3-80.3 W; 1.65 J a frame against 1.62.

This form, kernel AsahiLinux#559, mesa r288: regress.sh 30 of 30; a tenth of dEQP-VK at 8
jobs, Pass 105,394, ExpectedFail 2, 0 recoveries; the game, one launch, 47.7-47.8
fps, 1 % low 27.2-29.2, 80.0-80.8 W. vkbench fill 87-95 us a pass, macOS's 43.

A job's GPU start and end, which sat past the end of its state, go to a
non-cacheable block of their own: the firmware writes a state back only up to
its end, so cached there they rarely reached memory (1,474,109 jobs untimed
against 383,778 timed; after the move, 1 of 24,000) and the fdinfo GPU time
read a fifth of the truth.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 20, 2026
After a match the SEP updates the matched identity's template in the
background. macOS's kext fetches the result with SBIO 0x21 after each 0x09
and when the SEP's request 3 says it is ready (checkBgOpsResult
0xfffffe0009ac210c, handleSEPMessage case 3 0xfffffe0009abe420); a changed
template list, or 0x09's updated flag at 0x18, marks the catacomb dirty and
biometrickitd saves it (saveCatacombIfDirty). Do the same: request 3 sets
bgops_ready, 0x21 is fetched after each 0x09 and before a save, and a match
saves the user's catacombs when one changed, else the lockout record alone.

Tested with the owner's finger (Mac build AsahiLinux#559 on r207, 2026-11-12): four
matches, three with request 3 and 0x21 answering templates updated, the
user's catacomb saved grown from 0x5f0d to 0x65a3 bytes and confirmed.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 20, 2026
The job states, streams, barrier and parameter buffer records were in the
firmware's non-cacheable heaps, on the reading that macOS maps all but its
range 8 that way. It does not: its command pools map with options
0x1028800000005 and its SKU encoder buffers with 0x20800000007, both range 8
with bit 41, firmware-cached. The firmware is built for that: it invalidates
a record before reading it and writes back 0x920 B of a TA state and 0xC60 B
of a 3D state at the post-process. Uncached, a TA's executor step took 13.2 us
against 5.5 cached in the firmware's own trace, a 3D's 9.4 against 4.7.

New heaps job and job_fw hold only these records, so that a line of a freed
one meets nothing but another record. A freed record waits for 1024 to 2048
newer ones. macOS's pools hand out elements by a round-robin cursor, 240 per
type (3 x 80), 10,800 barrier records: an address comes back after 240 jobs.
Reused at once, a first form crashed the firmware 29 s after boot: "DAG: Non
Sequential Stamp Updates seen entryIdx 0x68 roots.dag 0x67", on vkbench. The
GPU's times move to macOS's element sizes, 0x940 and 0xC80, off the state's
last line. The notifiers stay non-cacheable, as macOS's.

Kernel AsahiLinux#556 with a runtime switch, one boot, vkbench fill, us a pass, 3 rounds:
64x64 103-126 (uncached) against 90-102 (cached), 756x472 100-124 against 89-92.
A Direct3D 12 game at its Maximum preset, 1080p, without gamemode, one launch,
12 s arms alternated over 4 cycles: 44.3-44.5 fps, 1 % low 23.9-26.4, 73.4-74.8
W against 47.8-48.0 fps, 27.1-28.2, 77.3-80.3 W; 1.65 J a frame against 1.62.

This form, kernel AsahiLinux#559, mesa r288: regress.sh 30 of 30; a tenth of dEQP-VK at 8
jobs, Pass 105,394, ExpectedFail 2, 0 recoveries; the game, one launch, 47.7-47.8
fps, 1 % low 27.2-29.2, 80.0-80.8 W. vkbench fill 87-95 us a pass, macOS's 43.

A job's GPU start and end, which sat past the end of its state, go to a
non-cacheable block of their own: the firmware writes a state back only up to
its end, so cached there they rarely reached memory (1,474,109 jobs untimed
against 383,778 timed; after the move, 1 of 24,000) and the fdinfo GPU time
read a fifth of the truth.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 20, 2026
After a match the SEP updates the matched identity's template in the
background. macOS's kext fetches the result with SBIO 0x21 after each 0x09
and when the SEP's request 3 says it is ready (checkBgOpsResult
0xfffffe0009ac210c, handleSEPMessage case 3 0xfffffe0009abe420); a changed
template list, or 0x09's updated flag at 0x18, marks the catacomb dirty and
biometrickitd saves it (saveCatacombIfDirty). Do the same: request 3 sets
bgops_ready, 0x21 is fetched after each 0x09 and before a save, and a match
saves the user's catacombs when one changed, else the lockout record alone.

Tested with the owner's finger (Mac build AsahiLinux#559 on r207, 2026-11-12): four
matches, three with request 3 and 0x21 answering templates updated, the
user's catacomb saved grown from 0x5f0d to 0x65a3 bytes and confirmed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants