Difference between revisions of "SPL services"

From Nintendo Switch Brew
Jump to navigation Jump to search
Line 8: Line 8:
 
| 1 || ||
 
| 1 || ||
 
|-
 
|-
| 2 || [[#ScrambleKeyA]] ||
+
| 2 || [[#KeyGen0]] ||
 
|-
 
|-
 
| 3 || ||
 
| 3 || ||
 
|-
 
|-
| 4 || [[#ScrambleKeyB]] ||
+
| 4 || Aes128Ctr ||
 
|-
 
|-
 
| 5 || [[#SetConfig]] ||
 
| 5 || [[#SetConfig]] ||
Line 24: Line 24:
 
| 11 || [[#GetDevunitFlag]] ||  
 
| 11 || [[#GetDevunitFlag]] ||  
 
|-
 
|-
| 12 || ||  
+
| 12 || KeyGen1 ||  
 
|-
 
|-
 
| 13 || [[#EncDec0]] ||  
 
| 13 || [[#EncDec0]] ||  
 
|-
 
|-
| 14 || ||  
+
| 14 || KeyGen2 ||  
 
|-
 
|-
 
| 15 || ||  
 
| 15 || ||  
Line 34: Line 34:
 
| 16 || ||  
 
| 16 || ||  
 
|-
 
|-
| 17 || ||  
+
| 17 || EncDec1 ||  
 
|-
 
|-
| 18 || ||  
+
| 18 || EncDec2 ||  
 
|-
 
|-
 
| 19 || ||  
 
| 19 || ||  
Line 46: Line 46:
 
| 22 || ||  
 
| 22 || ||  
 
|-
 
|-
| 23 || ||  
+
| 23 || GetSplWaitEvent ||  
 
|}
 
|}
  
Line 55: Line 55:
 
|-
 
|-
 
! ConfigItem || Name
 
! ConfigItem || Name
 +
|-
 +
| 2 || Memory configuration.
 
|-
 
|-
 
| 5 || HardwareType (0=Icosa, 1=Copper)
 
| 5 || HardwareType (0=Icosa, 1=Copper)
Line 61: Line 63:
 
|-
 
|-
 
| 11 || Allow skipping RSA signatures on NRR.
 
| 11 || Allow skipping RSA signatures on NRR.
 +
|-
 +
| 13 || Battery profile?
 
|}
 
|}
  
Line 67: Line 71:
 
[[Loader services|RO]] checks id11, if set then skipping NRR rsa signatures is allowed.
 
[[Loader services|RO]] checks id11, if set then skipping NRR rsa signatures is allowed.
  
== ScrambleKeyA ==
+
== KeyGen0 ==
 
Takes 16-bytes as input and two u32s. Outputs random-looking 16-bytes.
 
Takes 16-bytes as input and two u32s. Outputs random-looking 16-bytes.
  
 
Same input gives same output. Output changes when system is rebooted.
 
Same input gives same output. Output changes when system is rebooted.
 
== ScrambleKeyB ==
 
Behaves similar to [[#ScrambleKeyA]], but with different output.
 
 
Also console unique. This is not the inverse operation of [[#ScrambleKeyA]].
 
  
 
== SetConfig ==
 
== SetConfig ==
Line 84: Line 83:
 
! ConfigItem || Name
 
! ConfigItem || Name
 
|-
 
|-
| 13 || Unknown.
+
| 13 || Battery profile?
 
|}
 
|}
  

Revision as of 19:42, 18 July 2017

spl:

Cmd Name Notes
0 #GetConfig
1
2 #KeyGen0
3
4 Aes128Ctr
5 #SetConfig
7
9
10
11 #GetDevunitFlag
12 KeyGen1
13 #EncDec0
14 KeyGen2
15
16
17 EncDec1
18 EncDec2
19
20
21
22
23 GetSplWaitEvent

GetConfig

Takes an input word (ConfigItem), and returns a u64 with the config params.

ConfigItem Name
2 Memory configuration.
5 HardwareType (0=Icosa, 1=Copper)
8 64bit DeviceId with byte7 clear.
11 Allow skipping RSA signatures on NRR.
13 Battery profile?

Output from this when used by NIM must match the set:cal DeviceId with byte7 cleared, otherwise NIM will panic.

RO checks id11, if set then skipping NRR rsa signatures is allowed.

KeyGen0

Takes 16-bytes as input and two u32s. Outputs random-looking 16-bytes.

Same input gives same output. Output changes when system is rebooted.

SetConfig

Takes two input words, a ConfigItem and the value to set.

ConfigItem Name
13 Battery profile?

GetDevunitFlag

No input params.

Returns an u8 flag for whether the system is devunit. Output flag is 0 on retail.

EncDec0

Last SPL cmd used by SSL-sysmodule for TLS client-privk.