KBL Param

The sysroot buffer is a  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.

Experimental point of view
- No AC connected + No POWER Button pressed: 0x0 ex: rebooting by software PSVita when AC is not connected

- No AC connected + POWER Button pressed: 0x4 ex: booting PSVita by pressing POWER button when AC is not connected

- AC connected + No POWER Button pressed: 0x8 ex: rebooting by software PSVita when AC is connected ex: autobooting PSTV/IDU PSVita by pluging AC

- AC connected + POWER Button pressed: 0xC ex: powering off by software PSTV then booting it by pressing POWER button ex: booting PSVita by pressing POWER button when AC is connected

Flags
At offset  there is a 8 byte flags field.

DIP Switches
To convert the bit number to the offset and bit: ,

CP Information
Bits  is a 32-bit integer of the current time on the devkit CP clock. This is duplicated in bits.

Bits  is a 16-bit integer of the CP version and bits   is a 16-bit integer of the CP build ID. All integers are little-endian. On non-devkits, these fields are zero. Bits  are also usable as general purpose switches exposed with ,  , and   but they do not change anything in hardware (only cached values are overwritten).

User Flags
Bits  does not seem to be used in the kernel.

DevKit Boot Parameters
Bits  are used to store DevKit flags. It does not appear to be used in other models.

Shell Flags
Bits  are used for SceShell flags.

Debug Flags
Bits  are for various debugging options.

System Flags
Bits  are used for various system options.