In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Difference between revisions of "ES"

From WiiBrew
Jump to navigation Jump to search
(→‎Title import context: end is actually AES IV that happens to start with content[4])
(Added a startup section)
Line 1: Line 1:
 
This page serves to document the various structs, etc. used by [[ES]].
 
This page serves to document the various structs, etc. used by [[ES]].
 +
 +
== Startup ==
 +
After initializing the /dev/es device, ES calls the get_kernel_flavor syscall; if the flavor is below 3 (only happens for [[boot2]] which uses 0), it checks for [[:/sys/boot.sys]] on the [[NAND]] and finishes the Boot2 update it is present. After this, it calls the GetBusSpeed syscall to determine whether to load [[MIOS]] or the [[System Menu]]
 +
 +
When the kernel flavor is greater than or equal to 3, ES checks for [[:/sys/launch.sys]] and calls ES_LaunchTitle with the info in that file. If that file is absent, newer versions of ES check for [[:/sys/disc.sys]] and set the access rights accordingly.
  
 
== Title import context ==
 
== Title import context ==

Revision as of 22:00, 21 March 2022

This page serves to document the various structs, etc. used by ES.

Startup

After initializing the /dev/es device, ES calls the get_kernel_flavor syscall; if the flavor is below 3 (only happens for boot2 which uses 0), it checks for /sys/boot.sys on the NAND and finishes the Boot2 update it is present. After this, it calls the GetBusSpeed syscall to determine whether to load MIOS or the System Menu

When the kernel flavor is greater than or equal to 3, ES checks for /sys/launch.sys and calls ES_LaunchTitle with the info in that file. If that file is absent, newer versions of ES check for /sys/disc.sys and set the access rights accordingly.

Title import context

struct ESImportContext {
	struct TMD *tmd; // 0
	u32 tmdSize; // 4
	u32 unknown; // 8
	u32 unknown2; // 0xc; possibly error
	u32 index; // 0x10
	u32 unknown3[3];
	u32 signatureLength; // 0x20
	u32 unknown4[0x20];
	u32 aesIv[0x10]; // 0xa0
}