aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruser <user@clank>2026-09-24 13:51:38 +0200
committeruser <user@clank>2026-09-24 13:51:38 +0200
commit097706f2cb09f8a8ee05539b3fc2b052149653b6 (patch)
tree901af29cb88f7e0b497e9a72ed4772bad6e5f5ef
parentNarrow RAS's 0xffff000b: not the image loader, and two hypotheses refuted (diff)
downloadamd-psp-re-097706f2cb09f8a8ee05539b3fc2b052149653b6.tar.gz
amd-psp-re-097706f2cb09f8a8ee05539b3fc2b052149653b6.tar.xz
amd-psp-re-097706f2cb09f8a8ee05539b3fc2b052149653b6.zip
Trace RAS's 0xffff000b to the TA init handshake, not the loader
Continuing past 0x202CF2, tee_load_ta's sl == 2 arm checks a typeword against 0x4154, then sends command 3 (init/create) via ta_send_command at 0x202D4C and takes its return as the status. Measured for both TAs: HDCP typeword 0x4154 ok, ta_send_command -> 0x0 ring 0x00000000 RAS typeword 0x4154 ok, ta_send_command -> 0xffff000b ring 0xffff000b Both pass the gate, both reach the send; the host's status is that return verbatim. Full chain: ring LOAD_TA -> tee_cmd_dispatch (tbb @0x202922, cmd 1 -> 0x2029AC) -> tee_load_ta @0x202C24 -> bl_load_ta_image SUCCEEDS for both, r4 == 0 -> ta_send_command(cmd 3) HDCP 0x0, RAS 0xffff000b <- origin So RAS's image loads and verifies fine and the failure is the init handshake with the loaded TA. That agrees with the independent observation in this same harness that RAS's init gate at VA 0x4060E0 reads 0x00 while HDCP's reads 0x90. The remaining question is therefore not "why does LOAD_TA reject RAS" but "why does the RAS TA fail its init", a TA-side environment question -- the load trace shows sysdrv_rpc_3104/3105/1005 involvement. Recorded one caveat rather than glossing it: ta_send_command returning 0xffff000b does not prove the TA authored that code; it may be a timeout. The cheap discriminator is whether RAS's command handler executes during the send. Suite green.
-rw-r--r--psp_out/FINDING-RING-LOADTA-WORKS-RAS-SPECIFIC-FAILURE.md52
1 files changed, 52 insertions, 0 deletions
diff --git a/psp_out/FINDING-RING-LOADTA-WORKS-RAS-SPECIFIC-FAILURE.md b/psp_out/FINDING-RING-LOADTA-WORKS-RAS-SPECIFIC-FAILURE.md
index 86c9148..c3ab586 100644
--- a/psp_out/FINDING-RING-LOADTA-WORKS-RAS-SPECIFIC-FAILURE.md
+++ b/psp_out/FINDING-RING-LOADTA-WORKS-RAS-SPECIFIC-FAILURE.md
@@ -100,3 +100,55 @@ through `0x202CF2`, with `sl == 2` selecting a different arm than HDCP's
Next step is narrow and concrete: instrument `tee_load_ta` from `0x202CF2`
onward and find the site that sets 0xb, with `sl` as the discriminator.
+
+---
+
+# Chain complete: the rejection is the TA-side init handshake
+
+Continuing past `0x202CF2`, `tee_load_ta`'s `sl == 2` arm reaches:
+
+ 00202d14 sub.w r1, r0, #0x4100 ; typeword must be 0x4154
+ 00202d18 subs r1, #0x54
+ 00202d1a bne #0x202d7e
+ ...
+ 00202d46 movs r2, #3 ; command 3 = init/create
+ 00202d4c bl #0x201848 -> ta_send_command
+ 00202d50 movs r7, r0 ; <- THIS becomes the ring status
+ 00202d52 beq #0x202d62
+
+Measured for both TAs:
+
+| | typeword @0x202D14 | `ta_send_command` | ring status |
+| --- | --- | --- | --- |
+| HDCP | `0x4154` (ok) | called, returns **`0x0`** | `0x00000000` |
+| RAS | `0x4154` (ok) | called, returns **`0xffff000b`** | `0xffff000b` |
+
+Both pass the typeword gate, both reach the send. The status the host sees is
+`ta_send_command`'s return, verbatim.
+
+## What this means
+
+The full chain is now traced end to end:
+
+ ring LOAD_TA
+ -> tee_cmd_dispatch, tbb [pc,r6] @0x202922, cmd 1 -> 0x2029AC
+ -> tee_load_ta @0x202C24
+ -> bl_load_ta_image SUCCEEDS for both (r4 == 0)
+ -> ta_send_command(cmd 3) HDCP 0x0, RAS 0xffff000b <== origin
+
+So **RAS's image loads and verifies fine**; what fails is the init/create
+handshake with the loaded TA. That is consistent with the independent
+observation in this same harness that RAS's init gate at VA `0x4060E0` reads
+`0x00` (closed) while HDCP's reads `0x90` — the RAS TA is not completing its
+init in this environment.
+
+This reframes the remaining question. It is not "why does LOAD_TA reject RAS"
+but "why does the RAS TA fail its init handshake", which is a TA-side question
+about RAS's environment (its RPC dependencies, `sysdrv_rpc_3104/3105/1005`
+appear in the load trace) rather than a loader question.
+
+Note also that `0xffff000b` may be a timeout rather than a TA-authored code:
+`ta_send_command` returning it does not prove the TA replied with it. Deciding
+between "RAS replied with an error" and "RAS never replied" is the next
+discriminator, and it is cheap — check whether RAS's command handler executes
+during the send.