aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruser <user@clank>2026-09-25 15:12:12 +0200
committeruser <user@clank>2026-09-25 15:12:12 +0200
commit4bc6a2bbf283edf752fba19187e8a4cfb2082ed5 (patch)
tree831006d42b490ceccf20498c126e1d156f3ffe78
parentDecode the sink boundary (svc 0x7b ABI); ASD refuses display commands in isol... (diff)
downloadamd-psp-re-4bc6a2bbf283edf752fba19187e8a4cfb2082ed5.tar.gz
amd-psp-re-4bc6a2bbf283edf752fba19187e8a4cfb2082ed5.tar.xz
amd-psp-re-4bc6a2bbf283edf752fba19187e8a4cfb2082ed5.zip
Locate ASD's 0x7: the loader's module-registration RPC, which ASD declines
bl_load_ta_image's status comes from an RPC the loader makes INTO the module it just loaded: 002047ae ldr r0, =0xffff0002 ; request word 002047b2 str r0, [sp] 002047b4 mov r0, r6 ; dest = the module's own service id 002047b6 svc #0xf2 ; returns 7 for ASD 002047b8 movs r4, r0 ; r4 = the load status So after placing an image the loader hands it a 0xffff0002 request -- the initialisation/registration handshake -- and ASD answers 7. That is the whole of LOAD_TA asd failing, and it explains why dest 2 never appears in sOS's service table, since registration is what this call performs. The preceding cmp r6,#1 and cmp r6,#3 skip the RPC for those two service ids. Found after eliminating two candidate classes: none of the 29 bl sites in the function returns 7, and of the 38 svc sites exactly two do -- svc 0x52 at 0x204736, whose result goes to uxtb r4,r0 and is compared against 0xff so it is a slot id, and svc 0xf2 at 0x2047b6, whose value becomes the status. Earlier constant scans could never have found it because the 7 is not a constant anywhere; it is another module's return value. Also eliminated the neatest hypothesis by direct measurement: hooking all 135 of ASD's svc 0x7b sites during the load shows ZERO register reads while ASD handles the registration request, so ASD is not failing for want of display hardware and modelling the sink would not fix it. Next step is entirely inside ASD: trace its handling of request 0xffff0002 and find where it returns 7, using the method that located RAS's nibble check and ASD 0x308's hardcoded a6. No hardware, no display, no emulator plumbing in the way.
-rw-r--r--psp_out/ANGLE-DISPLAY-SINK-INPUT-SURFACE.md47
1 files changed, 47 insertions, 0 deletions
diff --git a/psp_out/ANGLE-DISPLAY-SINK-INPUT-SURFACE.md b/psp_out/ANGLE-DISPLAY-SINK-INPUT-SURFACE.md
index 9b8e54b..59ce850 100644
--- a/psp_out/ANGLE-DISPLAY-SINK-INPUT-SURFACE.md
+++ b/psp_out/ANGLE-DISPLAY-SINK-INPUT-SURFACE.md
@@ -435,3 +435,50 @@ Honest status of "go and model it": the **boundary is identified and decoded**
(`svc 0x7b`, ABI known, candidate register addresses in hand), and the model is a
few lines. What is missing is a running ASD to attach it to, and that is the
open loader question -- not a modelling problem.
+
+---
+
+# The 7 located: the loader's module-registration RPC, declined by ASD
+
+`bl_load_ta_image`'s status comes from an **RPC the loader makes into the module
+it has just loaded**:
+
+ 002047ae ldr r0, =0xffff0002 ; request word
+ 002047b2 str r0, [sp] ; req[0] = 0xffff0002
+ 002047b4 mov r0, r6 ; dest = the module's own service id
+ 002047b6 svc #0xf2 ; -> returns 7 for ASD
+ 002047b8 movs r4, r0 ; r4 = the load status
+
+So after placing an image, the loader hands it a `0xffff0002` request — the
+module's initialisation/registration handshake — and **ASD answers 7**. That is
+the whole of `LOAD_TA asd` failing, and it is also why dest 2 never appears in
+sOS's service table: registration is exactly what this call performs.
+
+Note `cmp r6,#1 / beq` and `cmp r6,#3 / beq` immediately before skip the RPC, so
+it fires only for service ids other than 1 and 3.
+
+## How it was found, after two wrong candidate classes
+
+* 29 `bl` sites inside the function: **none** returns 7.
+* 38 `svc` sites: exactly two return 7 — `svc 0x52` at `0x204736` and `svc 0xf2`
+ at `0x2047b6`. The `0x52` result goes to `uxtb r4, r0` and is immediately
+ compared against `0xff` (a slot id, not a status), so `0xf2` is the one whose
+ value becomes the load status.
+
+Earlier constant scans missed it because the 7 is not a constant anywhere — it is
+a *return value* from another module.
+
+## And it is NOT a display-register dependency
+
+Hooked all 135 of ASD's `svc 0x7b` sites during the load: **zero register reads**
+occur while ASD handles the registration request. So ASD is not failing for want
+of display hardware, and modelling the sink would not fix it. That kills the
+neatest hypothesis (ASD needs a live display to initialise) with a direct
+measurement.
+
+## Next step, now inside ASD
+
+Trace ASD's handling of request `0xffff0002` and find where it returns 7 — the
+same method that located RAS's `sub_402ed0` nibble check and ASD 0x308's
+hardcoded `a6`. The question is now entirely inside a module whose code we hold,
+with no hardware, no display, and no unresolved emulator plumbing in the way.