Changes

Jump to navigation Jump to search
2,792 bytes added ,  23:05, 18 June 2016
no edit summary
The sysroot buffer is a <code>0x100</code> sized buffer passed to the secure kernel bootloader in the scratch space and contains all sorts of flags and system parameters. This buffer is copied to the secure kernel, the non-secure kernel loader, and the non-secure kernel and is used by many functions to check for features that are enabled for the system.

{| class="wikitable"
|-
! Offset !! Size !! Description
|-
| 0x2C || 0x8 || Bitfield flags 1
|-
| 0x40 || 0x20 || Bitfield flags 2 (DIP switches)
|-
| 0x60 || 0x4 || DRAM base paddr
|-
| 0x64 || 0x4 || DRAM size
|-
| 0x6C || 0x4 || Boot type indicator (0x20000 on resume), 0x1 = no suspend/boot logo
|-
| 0x90 || 0x4 || <code>kprx_auth_sm.self</code> raw data paddr
|-
| 0x94 || 0x4 || <code>kprx_auth_sm.self</code> size
|-
| 0x98 || 0x4 || <code>prog_rvk.srvk</code> raw data paddr
|-
| 0x9C || 0x4 || <code>prog_rvk.srvk</code> size
|-
| 0xA0 || 0x2 || Unknown
|-
| 0xA2 || 0x2 || Device type
|-
| 0xA4 || 0x4 || Unknown
|-
| 0xC4 || 0x4 || Boot type indicator (0x80 on resume)
|-
| 0xD0 || 0x4 || [[Suspend|Saved context]] paddr
|-
| 0xF8 || 0x4 || BootLoader Revision
|-
|}

== Bitfield Flags ==

=== DIP Switches ===
To convert the bit number to the offset and bit: <code>offset = start_offset + (bit_num / 32) * 4</code>, <code>bit = (bit_num % 32) << 1</code>

==== CP Information ====
Bits <code>0-31</code> is a 32-bit integer of the current time on the devkit CP clock. This is duplicated in bits <code>64-95</code>. Bits <code>32-47</code> is a 16-bit integer of the CP version and bits <code>48-63</code> is a 16-bit integer of the CP build ID. All integers are little-endian. On non-devkits, these fields are zero. Bits <code>0-63</code> are also usable as general purpose switches exposed with <code>sceKernelSetDipsw</code>, <code>sceKernelClearDipsw</code>, and <code>sceKernelCheckDipsw</code> but they do not change anything in hardware (only cached values are overwritten).

==== User Flags ====
Bits <code>96-127</code> does not seem to be used in the kernel.

==== SDK Flags ====
Bits <code>128-159</code> are used to store devkit flags. It does not appear to be used in other models.

{| class="wikitable"
|-
! Bit !! Description
|-
| 159 || Devkit in Development Mode
|-
|}

==== Shell Flags ====
Bits <code>160-191</code> are used for [[SceShell]] flags.

{| class="wikitable"
|-
! Bit !! Description
|-
|}

==== Debug Flags ====
Bits <code>192-223</code> are for various debugging options.

{| class="wikitable"
|-
! Bit !! Description
|-
| 197 || Enable kernel console logging
|-
| 211 || Enable user UART console logging
|-
|}

==== System Flags ====
Bits <code>224-255</code> are used for various system options.

{| class="wikitable"
|-
! Bit !! Description
|-
|}

[[Category:Startup]]
[[Category:Kernel]]

Navigation menu