2015-10-04 19:13:55 +02:00
|
|
|
/**
|
|
|
|
* @file pm.h
|
|
|
|
* @brief PM (Process Manager) service.
|
|
|
|
*/
|
2014-10-27 06:17:47 +01:00
|
|
|
#pragma once
|
|
|
|
|
2015-10-05 07:27:43 +02:00
|
|
|
/// Initializes PM.
|
2015-09-06 18:13:31 +02:00
|
|
|
Result pmInit(void);
|
2014-10-27 06:17:47 +01:00
|
|
|
|
2015-10-05 07:27:43 +02:00
|
|
|
/// Exits PM.
|
2015-11-07 01:25:31 +01:00
|
|
|
void pmExit(void);
|
2014-10-27 06:17:47 +01:00
|
|
|
|
2015-10-04 19:13:55 +02:00
|
|
|
/**
|
|
|
|
* @brief Launches a title.
|
|
|
|
* @param mediatype Mediatype of the title.
|
|
|
|
* @param titleid ID of the title.
|
|
|
|
* @param launch_flags Flags to launch the title with.
|
|
|
|
*/
|
2014-12-13 17:20:54 +01:00
|
|
|
Result PM_LaunchTitle(u8 mediatype, u64 titleid, u32 launch_flags);
|
2014-10-27 06:17:47 +01:00
|
|
|
|
2015-10-04 19:13:55 +02:00
|
|
|
/**
|
|
|
|
* @brief Gets launch flags from a title's exheader.
|
|
|
|
* @param mediatype Mediatype of the title.
|
|
|
|
* @param titleid ID of the title.
|
|
|
|
* @param out Pointer to write the launch flags to.
|
|
|
|
*/
|
2014-10-27 06:17:47 +01:00
|
|
|
Result PM_GetTitleExheaderFlags(u8 mediatype, u64 titleid, u8* out);
|
|
|
|
|
2015-10-04 19:13:55 +02:00
|
|
|
/**
|
|
|
|
* @brief Sets the current FIRM launch parameters.
|
|
|
|
* @param size Size of the FIRM launch parameter buffer.
|
2015-10-05 07:27:43 +02:00
|
|
|
* @param in Buffer to retrieve the launch parameters from.
|
2015-10-04 19:13:55 +02:00
|
|
|
*/
|
2014-10-27 06:17:47 +01:00
|
|
|
Result PM_SetFIRMLaunchParams(u32 size, u8* in);
|
|
|
|
|
2015-10-04 19:13:55 +02:00
|
|
|
/**
|
|
|
|
* @brief Gets the current FIRM launch parameters.
|
|
|
|
* @param size Size of the FIRM launch parameter buffer.
|
|
|
|
* @param out Buffer to write the launch parameters to.
|
|
|
|
*/
|
2014-10-27 06:17:47 +01:00
|
|
|
Result PM_GetFIRMLaunchParams(u32 size, u8* out);
|
|
|
|
|
2015-10-04 19:13:55 +02:00
|
|
|
/**
|
|
|
|
* @brief Sets the current FIRM launch parameters.
|
|
|
|
* @param firm_titleid_low Low Title ID of the FIRM title to launch.
|
|
|
|
* @param size Size of the FIRM launch parameter buffer.
|
2015-10-05 07:27:43 +02:00
|
|
|
* @param in Buffer to retrieve the launch parameters from.
|
2015-10-04 19:13:55 +02:00
|
|
|
*/
|
2014-12-13 17:20:54 +01:00
|
|
|
Result PM_LaunchFIRMSetParams(u32 firm_titleid_low, u32 size, u8* in);
|