Xrpc call list
From t-hack.com - Hack X300T / X301T
(Created page with '== XRPC_ID_GETSERIAL (0)== returns the chip serial number. {| border="1" !!! param0 !! param1 !! param2 !! param3 !! param4 |- ! input | 0 || 0 || 0 || 0 || 0 |- ! output | SN[0...') |
|||
Line 1: | Line 1: | ||
== XRPC_ID_GETSERIAL (0)== | == XRPC_ID_GETSERIAL (0)== | ||
− | + | Returns the chip serial number. | |
{| border="1" | {| border="1" | ||
!!! param0 !! param1 !! param2 !! param3 !! param4 | !!! param0 !! param1 !! param2 !! param3 !! param4 | ||
Line 8: | Line 8: | ||
|- | |- | ||
! output | ! output | ||
− | | | + | | serial number [0..31](LSB) || [32..63] || [64..91] || [92..127](MSB) || 0 |
|} | |} | ||
== XRPC_ID_GETRANDOM (2) == | == XRPC_ID_GETRANDOM (2) == | ||
− | + | Returns a random number generated by the chip hardware, this xrpc takes about ~10ms | |
{| border="1" | {| border="1" | ||
!!! param0 !! param1 !! param2 !! param3 !! param4 | !!! param0 !! param1 !! param2 !! param3 !! param4 | ||
Line 23: | Line 23: | ||
|} | |} | ||
− | == XRPC_ID_GETBONDINGCOMMENT == | + | == XRPC_ID_GETBONDINGCOMMENT (3)== |
− | + | Returns the chip bonding option string in param0 and param1, "developA" for development chips (ES4/ES5/ES6/ES7) or "productA" for production chips (revA/revB/revC/..) | |
{| border="1" | {| border="1" | ||
!!! param0 !! param1 !! param2 !! param3 !! param4 | !!! param0 !! param1 !! param2 !! param3 !! param4 | ||
Line 33: | Line 33: | ||
! output | ! output | ||
| Bonding comment [0..31] (LSB) || Bonding comment [32..63] (MSB) || 0 || 0 || 0 | | Bonding comment [0..31] (LSB) || Bonding comment [32..63] (MSB) || 0 || 0 || 0 | ||
+ | |} | ||
+ | |||
+ | == XRPC_ID_SHA1XOS (4)== | ||
+ | Returns the SHA1 hash of the xos currently in serial flash. | ||
+ | |||
+ | For 'M' versions of xos (development versions), the last 3 hex digits of the hash are normally equal to the release version (since xosM7d), this is not true for 'P' (production) versions of xos. | ||
+ | {| border="1" | ||
+ | !!! param0 !! param1 !! param2 !! param3 !! param4 | ||
+ | |- | ||
+ | ! input | ||
+ | | 0 || 0 || 0 || 0 || 0 | ||
+ | |- | ||
+ | ! output | ||
+ | | xos SHA1 hash [0..31] (LSB) || [32..63] || [64..91] || [92..127] || [128..159](MSB) | ||
+ | |} | ||
+ | |||
+ | == XRPC_ID_XLOAD (5) == | ||
+ | Load a secure binary in xload format (payload) | ||
+ | {| border="1" | ||
+ | !!! param0 !! param1 !! param2 !! param3 !! param4 | ||
+ | |- | ||
+ | ! input | ||
+ | | Size || Depends on xload cert type || 0 || 0 || 0 | ||
+ | |- | ||
+ | ! output | ||
+ | | Depends on xload cert type || 0 || 0 || 0 ||0 | ||
+ | |} | ||
+ | |||
+ | * Param0 is the size of the xload payload, '''before''' encryption and formatting, not the size of the xload packet ! | ||
+ | * For zboot/cpu type xloads, param1 is the load address. | ||
+ | * For xtasks and ucode type xloads, and from xos version >= D0, param1 is the dram controller to load the xtask too. | ||
+ | * Otherwise param1 is reserved (should be 0). | ||
+ | |||
+ | == XRPC_ID_XUNLOAD (17) == | ||
+ | Unload an xtask image previously loaded (payload is the corresponding xunload file) | ||
+ | {| border="1" | ||
+ | !!! param0 !! param1 !! param2 !! param3 !! param4 | ||
+ | |- | ||
+ | ! input | ||
+ | | Size of xunload payload|| image number to unload || 0 || 0 || 0 | ||
+ | |- | ||
+ | ! output | ||
+ | | 0 || 0 || 0 || 0 ||0 | ||
|} | |} |