Changes

Jump to navigation Jump to search
286 bytes added ,  01:58, 6 June 2020
no edit summary
Line 1: Line 1: −
Depending on the F00D SELF that is currently loaded, different commands are handled.
+
Depending on the [[SM]] that is currently loaded, different commands are handled.
    
== Request Buffer ==
 
== Request Buffer ==
   −
Each request that is made sends a page aligned buffer that has a max size of a page. After as 64 byte header common to all commands, the data afterwards is specific to each command. The documentation for each command below specifies the data that goes after the header. The special command id of -1 (<code>0xFFFFFFFF</code>) is used to shut down the currently loaded F00D SELF.
+
Each request that is made sends a page aligned buffer that has a max size of a page. After as 64 byte header common to all commands, the data afterwards is specific to each command. The documentation for each command below specifies the data that goes after the header. The special command id of -1 (<code>0xFFFFFFFF</code>) is used to stop the current loaded [[SM]].
   −
{| class="wikitable"
+
Command buffer structure (as seen on FWs 3.60-3.73):
 +
 
 +
{| class='wikitable'
 
|-
 
|-
! Offset !! Size !! Description
+
! Offset
 +
! Size
 +
! Description
 
|-
 
|-
| 0x0 || 0x4 || Size of buffer
+
| 0x0
 +
| 0x4
 +
| Size of the structure (header + data)
 
|-
 
|-
| 0x4 || 0x4 || Command ID
+
| 0x4
 +
| 0x4
 +
| Command ID
 
|-
 
|-
| 0x8 || 0x4 || Return value (output)
+
| 0x8
 +
| 0x4
 +
| Command return value is written here by the SM
 
|-
 
|-
| 0xC || 0x34 || Unknown/Unused
+
| 0xC
 +
| 0x4
 +
| unk2
 
|-
 
|-
| 0x40 || Variable (max 0xFC0) || Command specific buffer
+
| 0x10
 +
| 0x30
 +
| padding
 
|-
 
|-
 +
| 0x40
 +
| variable, chosen by NS Kernel, max=0x1000-0x40
 +
| data buffer
 
|}
 
|}
   −
=== Physical Address List ===
+
On FW 0.931, and maybe in later prototype FWs, the data buffer is located at offset 0x10 instead of 0x40. Thus we can ask why they added the 0x30 bytes padding.
 +
 
 +
=== Physical Address Range ===
    
A common format used in these requests is a list of physical address and size. This simple structure is defined below. See [[SceSysmem#sceKernelVARangeToPARangeForDriver|sceKernelVARangeToPARangeForDriver]] for information on creating this list.
 
A common format used in these requests is a list of physical address and size. This simple structure is defined below. See [[SceSysmem#sceKernelVARangeToPARangeForDriver|sceKernelVARangeToPARangeForDriver]] for information on creating this list.
Line 32: Line 51:  
|-
 
|-
 
| 0x4 || 0x4 || Size
 
| 0x4 || 0x4 || Size
|-
   
|}
 
|}
   −
This data format is used when passing large buffers of data to F00D. This is because the memory manager in kernel could allocate contiguous virtual addresses that corresponds to varying physical addresses.
+
This data format is used when passing large buffers of data to [[F00D]]. This is because the memory manager in kernel could allocate contiguous virtual addresses that corresponds to varying physical addresses.
    
== kprx_auth_sm.self ==
 
== kprx_auth_sm.self ==
   −
This is a special SELF that is found in the boot [[SLB2]] partition. The raw (encrypted) SELF is found in secure world memory (placed there by an early bootloader). It is used to decrypt SELFs for ARM. The SELF header is passed into a page aligned buffer and a [[F00D Commands#Physical Address List|paddr list]] is generated from it.
+
This is a special SM found in the [[SLB2]] partition. The raw (encrypted) SELF is stored in [[Secure World]] memory. It is placed there by an early bootloader.
 +
 
 +
kprx_auth_sm is used to decrypt SELF and SPSFO files for ARM. The CF header is passed into a page aligned buffer and a [[F00D Commands#Physical Address Range|PA range]] is generated from it.
    
=== 0x10001 - sceSblAuthMgrAuthHeader ===
 
=== 0x10001 - sceSblAuthMgrAuthHeader ===
5,761

edits

Navigation menu