service/boss: Migrate to ServiceFramework (#3998)

* service/boss: Migrate to ServiceFramework

* service/boss: Addressed comments

* service/boss: Added TODO: verify ResetType
This commit is contained in:
NarcolepticK 2018-07-27 09:07:23 -04:00 committed by Weiyi Wang
parent 5a4ed10982
commit 5c52c6e64a
7 changed files with 1836 additions and 1787 deletions

File diff suppressed because it is too large Load Diff

View File

@ -4,36 +4,45 @@
#pragma once
#include "core/hle/kernel/event.h"
#include "core/hle/service/service.h"
namespace Service {
namespace BOSS {
class Module final {
public:
Module();
~Module() = default;
class Interface : public ServiceFramework<Interface> {
public:
Interface(std::shared_ptr<Module> boss, const char* name, u32 max_session);
~Interface() = default;
protected:
/**
* BOSS::InitializeSession service function
* Inputs:
* 0 : Header Code[0x00010082]
* 1 : u32 lower 64bit value
* 2 : u32 higher 64bit value
* 3 : 0x20
* 4 : u32 unknown value
* 1-2 : programID, normally zero for using the programID determined from the input PID
* 3 : 0x20, ARM11-kernel processID translate-header.
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void InitializeSession(Service::Interface* self);
void InitializeSession(Kernel::HLERequestContext& ctx);
/**
* BOSS::RegisterStorage service function
* Inputs:
* 0 : Header Code[0x00020010]
* 1 : u32 unknown1
* 2 : u32 unknown2
* 3 : u32 unknown3
* 4 : u8 unknown_flag
* 0 : Header Code[0x00020100]
* 1-2 : u64 extdataID
* 3 : u32 boss_size
* 4 : u8 extdata_type: 0 = NAND, 1 = SD
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void RegisterStorage(Service::Interface* self);
void SetStorageInfo(Kernel::HLERequestContext& ctx);
/**
* BOSS::UnregisterStorage service function
@ -42,7 +51,7 @@ void RegisterStorage(Service::Interface* self);
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void UnregisterStorage(Service::Interface* self);
void UnregisterStorage(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetStorageInfo service function
@ -52,13 +61,13 @@ void UnregisterStorage(Service::Interface* self);
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u32 unknown value
*/
void GetStorageInfo(Service::Interface* self);
void GetStorageInfo(Kernel::HLERequestContext& ctx);
/**
* BOSS::RegisterPrivateRootCa service function
* Inputs:
* 0 : Header Code[0x00050042]
* 1 : u32 unknown value
* 1 : u32 Size
* 2 : MappedBufferDesc(permission = R)
* 3 : u32 buff_addr
* Outputs:
@ -66,14 +75,14 @@ void GetStorageInfo(Service::Interface* self);
* 2 : buff_size << 4 | 0xA
* 3 : u32 buff_addr
*/
void RegisterPrivateRootCa(Service::Interface* self);
void RegisterPrivateRootCa(Kernel::HLERequestContext& ctx);
/**
* BOSS::RegisterPrivateClientCert service function
* Inputs:
* 0 : Header Code[0x00060084]
* 1 : u32 unknown value
* 2 : u32 unknown value
* 1 : u32 buffer 1 size
* 2 : u32 buffer 2 size
* 3 : MappedBufferDesc1(permission = R)
* 4 : u32 buff_addr1
* 5 : MappedBufferDesc2(permission = R)
@ -85,7 +94,7 @@ void RegisterPrivateRootCa(Service::Interface* self);
* 4 : buff2_size << 4 | 0xA
* 5 : u32 buff_addr2
*/
void RegisterPrivateClientCert(Service::Interface* self);
void RegisterPrivateClientCert(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetNewArrivalFlag service function
@ -95,7 +104,7 @@ void RegisterPrivateClientCert(Service::Interface* self);
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u8 flag
*/
void GetNewArrivalFlag(Service::Interface* self);
void GetNewArrivalFlag(Kernel::HLERequestContext& ctx);
/**
* BOSS::RegisterNewArrivalEvent service function
@ -106,7 +115,7 @@ void GetNewArrivalFlag(Service::Interface* self);
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void RegisterNewArrivalEvent(Service::Interface* self);
void RegisterNewArrivalEvent(Kernel::HLERequestContext& ctx);
/**
* BOSS::SetOptoutFlag service function
@ -116,7 +125,7 @@ void RegisterNewArrivalEvent(Service::Interface* self);
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void SetOptoutFlag(Service::Interface* self);
void SetOptoutFlag(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetOptoutFlag service function
@ -126,15 +135,15 @@ void SetOptoutFlag(Service::Interface* self);
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u8 output_flag
*/
void GetOptoutFlag(Service::Interface* self);
void GetOptoutFlag(Kernel::HLERequestContext& ctx);
/**
* BOSS::RegisterTask service function
* Inputs:
* 0 : Header Code[0x000B00C2]
* 1 : u32 unknown value
* 2 : u8 unknown value
* 3 : u8 unknown value
* 1 : TaskID buffer size
* 2 : u8 unknown value, Usually zero, regardless of HTTP GET/POST.
* 3 : u8 unknown value, Usually zero, regardless of HTTP GET/POST.
* 4 : MappedBufferDesc1(permission = R)
* 5 : buff_addr
* Outputs:
@ -142,13 +151,13 @@ void GetOptoutFlag(Service::Interface* self);
* 2 : buff_size << 4 | 0xA
* 3 : u32 buff_addr
*/
void RegisterTask(Service::Interface* self);
void RegisterTask(Kernel::HLERequestContext& ctx);
/**
* BOSS::UnregisterTask service function
* Inputs:
* 0 : Header Code[0x000C0082]
* 1 : u32 unknown value
* 1 : TaskID buffer size
* 2 : u8 unknown value
* 3 : MappedBufferDesc1(permission = R)
* 4 : buff_addr
@ -157,13 +166,13 @@ void RegisterTask(Service::Interface* self);
* 2 : buff_size << 4 | 0xA
* 3 : u32 buff_addr
*/
void UnregisterTask(Service::Interface* self);
void UnregisterTask(Kernel::HLERequestContext& ctx);
/**
* BOSS::ReconfigureTask service function
* Inputs:
* 0 : Header Code[0x000D0082]
* 1 : u32 unknown value
* 1 : TaskID buffer size
* 2 : u8 unknown value
* 3 : MappedBufferDesc1(permission = R)
* 4 : buff_addr
@ -172,7 +181,7 @@ void UnregisterTask(Service::Interface* self);
* 2 : buff_size << 4 | 0xA
* 3 : u32 buff_addr
*/
void ReconfigureTask(Service::Interface* self);
void ReconfigureTask(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetTaskIdList service function
@ -181,12 +190,13 @@ void ReconfigureTask(Service::Interface* self);
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void GetTaskIdList(Service::Interface* self);
void GetTaskIdList(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetStepIdList service function
* Inputs:
* 0 : Header Code[0x000F0042]
* 1 : u32 buffer size
* 2 : MappedBufferDesc(permission = R)
* 3 : u32 buff_addr
*
@ -195,89 +205,91 @@ void GetTaskIdList(Service::Interface* self);
* 2 : buff_size << 4 | 0xA
* 3 : u32 buff_addr
*/
void GetStepIdList(Service::Interface* self);
void GetStepIdList(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetNsDataIdList service function
* Inputs:
* 0 : Header Code[0x00100102]
* 1 : u32 unknown1
* 2 : u32 unknown2
* 3 : u32 unknown3
* 4 : u32 unknown4
* 1 : u32 filter
* 2 : u32 Buffer size in words(max entries)
* 3 : u16, starting word-index in the internal NsDataId list
* 4 : u32, start_NsDataId
* 5 : MappedBufferDesc(permission = W)
* 6 : u32 buff_addr
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u16 unknown value
* 3 : u16 unknown value
* 2 : u16 Actual number of output entries
* 3 : u16 Last word-index copied to output in the internal NsDataId list
* 4 : buff_size << 4 | 0xC
* 5 : u32 buff_addr
*/
void GetNsDataIdList(Service::Interface* self);
void GetNsDataIdList(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetOwnNsDataIdList service function
* BOSS::GetNsDataIdList1 service function
* Inputs:
* 0 : Header Code[0x00110102]
* 1 : u32 unknown1
* 2 : u32 unknown2
* 3 : u32 unknown3
* 4 : u32 unknown4
* 1 : u32 filter
* 2 : u32 Buffer size in words(max entries)
* 3 : u16, starting word-index in the internal NsDataId list
* 4 : u32, start_NsDataId
* 5 : MappedBufferDesc(permission = W)
* 6 : u32 buff_addr
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u16 unknown value
* 3 : u16 unknown value
* 2 : u16 Actual number of output entries
* 3 : u16 Last word-index copied to output in the internal NsDataId list
* 4 : buff_size << 4 | 0xC
* 5 : u32 buff_addr
*/
void GetOwnNsDataIdList(Service::Interface* self);
void GetNsDataIdList1(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetNewDataNsDataIdList service function
* BOSS::GetNsDataIdList2 service function
* Inputs:
* 0 : Header Code[0x00120102]
* 1 : u32 unknown1
* 2 : u32 unknown2
* 3 : u32 unknown3
* 4 : u32 unknown4
* 1 : u32 filter
* 2 : u32 Buffer size in words(max entries)
* 3 : u16, starting word-index in the internal NsDataId list
* 4 : u32, start_NsDataId
* 5 : MappedBufferDesc(permission = W)
* 6 : u32 buff_addr
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u16 unknown value
* 3 : u16 unknown value
* 2 : u16 Actual number of output entries
* 3 : u16 Last word-index copied to output in the internal NsDataId list
* 4 : buff_size << 4 | 0xC
* 5 : u32 buff_addr
*/
void GetNewDataNsDataIdList(Service::Interface* self);
void GetNsDataIdList2(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetOwnNewDataNsDataIdList service function
* BOSS::GetNsDataIdList3 service function
* Inputs:
* 0 : Header Code[0x00130102]
* 1 : u32 unknown1
* 2 : u32 unknown2
* 3 : u32 unknown3
* 4 : u32 unknown4
* 1 : u32 filter
* 2 : u32 Buffer size in words(max entries)
* 3 : u16, starting word-index in the internal NsDataId list
* 4 : u32, start_NsDataId
* 5 : MappedBufferDesc(permission = W)
* 6 : u32 buff_addr
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u16 unknown value
* 3 : u16 unknown value
* 2 : u16 Actual number of output entries
* 3 : u16 Last word-index copied to output in the internal NsDataId list
* 4 : buff_size << 4 | 0xC
* 5 : u32 buff_addr
*/
void GetOwnNewDataNsDataIdList(Service::Interface* self);
void GetNsDataIdList3(Kernel::HLERequestContext& ctx);
/**
* BOSS::SendProperty service function
* Inputs:
* 0 : Header Code[0x00140082]
* 1 : u16 unknown value
* 2 : u32 unknown value
* 1 : u16 PropertyID
* 2 : u32 size
* 3 : MappedBufferDesc(permission = R)
* 4 : u32 buff_addr
* Outputs:
@ -285,38 +297,35 @@ void GetOwnNewDataNsDataIdList(Service::Interface* self);
* 2 : buff_size << 4 | 0xA
* 3 : u32 buff_addr
*/
void SendProperty(Service::Interface* self);
void SendProperty(Kernel::HLERequestContext& ctx);
/**
* BOSS::SendPropertyHandle service function
* Inputs:
* 0 : Header Code[0x00150042]
* 2 : u8 unknown value
* 3 : MappedBufferDesc(permission = R)
* 4 : u32 buff_addr
* 2 : u16 PropertyID
* 3 : 0x0
* 4 : Handle
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : buff_size << 4 | 0xA
* 3 : u32 buff_addr
*/
void SendPropertyHandle(Service::Interface* self);
void SendPropertyHandle(Kernel::HLERequestContext& ctx);
/**
* BOSS::ReceiveProperty service function
* Inputs:
* 0 : Header Code[0x00160082]
* 1 : u16 unknown1
* 2 : u32 buff_size
* 1 : u16 PropertyID
* 2 : u32 Size
* 3 : MappedBufferDesc(permission = W)
* 4 : u32 buff addr
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u32 unknown value
* 3 : u16 unknown value
* 2 : Actual read size
* 4 : buff_size << 4 | 0xC
* 5 : u32 buff_addr
*/
void ReceiveProperty(Service::Interface* self);
void ReceiveProperty(Kernel::HLERequestContext& ctx);
/**
* BOSS::UpdateTaskInterval service function
@ -331,7 +340,7 @@ void ReceiveProperty(Service::Interface* self);
* 2 : buff_size << 4 | 0xA
* 3 : u32 buff_addr
*/
void UpdateTaskInterval(Service::Interface* self);
void UpdateTaskInterval(Kernel::HLERequestContext& ctx);
/**
* BOSS::UpdateTaskCount service function
@ -346,13 +355,13 @@ void UpdateTaskInterval(Service::Interface* self);
* 2 : buff_size << 4 | 0xA
* 3 : u32 buff_addr
*/
void UpdateTaskCount(Service::Interface* self);
void UpdateTaskCount(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetTaskInterval service function
* Inputs:
* 0 : Header Code[0x00190042]
* 1 : u32 unknown value
* 1 : u32 size
* 2 : MappedBufferDesc(permission = R)
* 3 : u32 buff_addr
* Outputs:
@ -361,13 +370,13 @@ void UpdateTaskCount(Service::Interface* self);
* 3 : buff_size << 4 | 0xA
* 4 : u32 buff_addr
*/
void GetTaskInterval(Service::Interface* self);
void GetTaskInterval(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetTaskCount service function
* Inputs:
* 0 : Header Code[0x001A0042]
* 1 : u32 unknown value
* 1 : u32 size
* 2 : MappedBufferDesc(permission = R)
* 3 : u32 buff_addr
* Outputs:
@ -376,13 +385,13 @@ void GetTaskInterval(Service::Interface* self);
* 3 : buff_size << 4 | 0xA
* 4 : u32 buff_addr
*/
void GetTaskCount(Service::Interface* self);
void GetTaskCount(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetTaskServiceStatus service function
* Inputs:
* 0 : Header Code[0x001B0042]
* 1 : u32 unknown value
* 1 : u32 size
* 2 : MappedBufferDesc(permission = R)
* 3 : u32 buff_addr
* Outputs:
@ -391,13 +400,13 @@ void GetTaskCount(Service::Interface* self);
* 3 : buff_size << 4 | 0xA
* 4 : u32 buff_addr
*/
void GetTaskServiceStatus(Service::Interface* self);
void GetTaskServiceStatus(Kernel::HLERequestContext& ctx);
/**
* BOSS::StartTask service function
* Inputs:
* 0 : Header Code[0x001C0042]
* 1 : u32 unknown value
* 1 : TaskID buffer size
* 2 : MappedBufferDesc(permission = R)
* 3 : u32 buff_addr
* Outputs:
@ -405,13 +414,13 @@ void GetTaskServiceStatus(Service::Interface* self);
* 2 : buff_size << 4 | 0xA
* 3 : u32 buff_addr
*/
void StartTask(Service::Interface* self);
void StartTask(Kernel::HLERequestContext& ctx);
/**
* BOSS::StartTaskImmediate service function
* Inputs:
* 0 : Header Code[0x001D0042]
* 1 : u32 unknown value
* 1 : TaskID buffer size
* 2 : MappedBufferDesc(permission = R)
* 3 : u32 buff_addr
* Outputs:
@ -419,13 +428,13 @@ void StartTask(Service::Interface* self);
* 2 : buff_size << 4 | 0xA
* 3 : u32 buff_addr
*/
void StartTaskImmediate(Service::Interface* self);
void StartTaskImmediate(Kernel::HLERequestContext& ctx);
/**
* BOSS::CancelTask service function
* Inputs:
* 0 : Header Code[0x001E0042]
* 1 : u32 unknown value
* 1 : TaskID buffer size
* 2 : MappedBufferDesc(permission = R)
* 3 : u32 buff_addr
* Outputs:
@ -433,7 +442,7 @@ void StartTaskImmediate(Service::Interface* self);
* 2 : buff_size << 4 | 0xA
* 3 : u32 buff_addr
*/
void CancelTask(Service::Interface* self);
void CancelTask(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetTaskFinishHandle service function
@ -441,34 +450,34 @@ void CancelTask(Service::Interface* self);
* 0 : Header Code[0x001F0000]
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : 0
* 2 : 0x0
* 3 : Task Finish Handle
*/
void GetTaskFinishHandle(Service::Interface* self);
void GetTaskFinishHandle(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetTaskState service function
* Inputs:
* 0 : Header Code[0x00200082]
* 1 : u32 buff_size
* 2 : u8 unknown value
* 1 : TaskID buffer size
* 2 : u8 state
* 3 : MappedBufferDesc(permission = R)
* 4 : u32 buff_addr
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u8 unknown value
* 3 : u32 unknown value
* 2 : u8 TaskStatus
* 3 : u32 Current state value for task PropertyID 0x4
* 4 : u8 unknown value
* 5 : buff_size << 4 | 0xA
* 6 : u32 buff_addr
*/
void GetTaskState(Service::Interface* self);
void GetTaskState(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetTaskResult service function
* Inputs:
* 0 : Header Code[0x00210042]
* 1 : u32 unknown value
* 1 : u32 size
* 2 : MappedBufferDesc(permission = R)
* 3 : u32 buff_addr
* Outputs:
@ -479,13 +488,13 @@ void GetTaskState(Service::Interface* self);
* 5 : buff_size << 4 | 0xA
* 6 : u32 buff_addr
*/
void GetTaskResult(Service::Interface* self);
void GetTaskResult(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetTaskCommErrorCode service function
* Inputs:
* 0 : Header Code[0x00220042]
* 1 : u32 unknown value
* 1 : u32 size
* 2 : MappedBufferDesc(permission = R)
* 3 : u32 buff_addr
* Outputs:
@ -496,13 +505,13 @@ void GetTaskResult(Service::Interface* self);
* 5 : buff_size << 4 | 0xA
* 6 : u32 buff_addr
*/
void GetTaskCommErrorCode(Service::Interface* self);
void GetTaskCommErrorCode(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetTaskStatus service function
* Inputs:
* 0 : Header Code[0x002300C2]
* 1 : u32 unknown value
* 1 : u32 size
* 2 : u8 unknown value
* 3 : u8 unknown value
* 4 : MappedBufferDesc(permission = R)
@ -513,13 +522,13 @@ void GetTaskCommErrorCode(Service::Interface* self);
* 3 : buff_size << 4 | 0xA
* 4 : u32 buff_addr
*/
void GetTaskStatus(Service::Interface* self);
void GetTaskStatus(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetTaskError service function
* Inputs:
* 0 : Header Code[0x00240082]
* 1 : u32 unknown value
* 1 : u32 size
* 2 : u8 unknown value
* 3 : MappedBufferDesc(permission = R)
* 4 : u32 buff_addr
@ -529,13 +538,13 @@ void GetTaskStatus(Service::Interface* self);
* 3 : buff_size << 4 | 0xA
* 4 : u32 buff_addr
*/
void GetTaskError(Service::Interface* self);
void GetTaskError(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetTaskInfo service function
* Inputs:
* 0 : Header Code[0x00250082]
* 1 : u32 unknown value
* 1 : u32 size
* 2 : u8 unknown value
* 3 : MappedBufferDesc(permission = R)
* 4 : u32 buff_addr
@ -544,52 +553,51 @@ void GetTaskError(Service::Interface* self);
* 2 : buff_size << 4 | 0xA
* 3 : u32 buff_addr
*/
void GetTaskInfo(Service::Interface* self);
void GetTaskInfo(Kernel::HLERequestContext& ctx);
/**
* BOSS::DeleteNsData service function
* Inputs:
* 0 : Header Code[0x00260040]
* 1 : u32 unknown value
* 1 : u32 NsDataID
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void DeleteNsData(Service::Interface* self);
void DeleteNsData(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetNsDataHeaderInfo service function
* Inputs:
* 0 : Header Code[0x002700C2]
* 1 : u32 unknown value
* 2 : u8 unknown value
* 3 : u32 unknown value
* 1 : u32, NsDataID
* 2 : u8, type
* 3 : u32, Size
* 4 : MappedBufferDesc(permission = W)
* 5 : u32 buff_addr
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : buff_size << 4 | 0xC
* 3 : u32 buff_addr
* 3 : u32, buff_addr
*/
void GetNsDataHeaderInfo(Service::Interface* self);
void GetNsDataHeaderInfo(Kernel::HLERequestContext& ctx);
/**
* BOSS::ReadNsData service function
* Inputs:
* 0 : Header Code[0x00280102]
* 1 : u32 unknown value
* 2 : u32 unknown value
* 3 : u32 unknown value
* 4 : u32 unknown value
* 1 : u32, NsDataID
* 2-3 : u64, offset
* 4 : u32, Size
* 5 : MappedBufferDesc(permission = W)
* 6 : u32 buff_addr
* 6 : u32, buff_addr
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u32 unknown value
* 3 : u32 unknown value
* 2 : u32 Actual read size
* 3 : u32, unknown value
* 4 : buff_size << 4 | 0xC
* 5 : u32 buff_addr
* 5 : u32, buff_addr
*/
void ReadNsData(Service::Interface* self);
void ReadNsData(Kernel::HLERequestContext& ctx);
/**
* BOSS::SetNsDataAdditionalInfo service function
@ -600,7 +608,7 @@ void ReadNsData(Service::Interface* self);
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void SetNsDataAdditionalInfo(Service::Interface* self);
void SetNsDataAdditionalInfo(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetNsDataAdditionalInfo service function
@ -611,7 +619,7 @@ void SetNsDataAdditionalInfo(Service::Interface* self);
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u32 unknown value
*/
void GetNsDataAdditionalInfo(Service::Interface* self);
void GetNsDataAdditionalInfo(Kernel::HLERequestContext& ctx);
/**
* BOSS::SetNsDataNewFlag service function
@ -622,7 +630,7 @@ void GetNsDataAdditionalInfo(Service::Interface* self);
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void SetNsDataNewFlag(Service::Interface* self);
void SetNsDataNewFlag(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetNsDataNewFlag service function
@ -633,7 +641,7 @@ void SetNsDataNewFlag(Service::Interface* self);
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u8 flag
*/
void GetNsDataNewFlag(Service::Interface* self);
void GetNsDataNewFlag(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetNsDataLastUpdate service function
@ -645,18 +653,18 @@ void GetNsDataNewFlag(Service::Interface* self);
* 2 : u32 unknown value
* 3 : u32 unknown value
*/
void GetNsDataLastUpdate(Service::Interface* self);
void GetNsDataLastUpdate(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetErrorCode service function
* Inputs:
* 0 : Header Code[0x002E0040]
* 1 : u8 unknown value
* 1 : u8 input
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u32 unknown value
*/
void GetErrorCode(Service::Interface* self);
void GetErrorCode(Kernel::HLERequestContext& ctx);
/**
* BOSS::RegisterStorageEntry service function
@ -670,7 +678,7 @@ void GetErrorCode(Service::Interface* self);
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void RegisterStorageEntry(Service::Interface* self);
void RegisterStorageEntry(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetStorageEntryInfo service function
@ -681,7 +689,7 @@ void RegisterStorageEntry(Service::Interface* self);
* 2 : u32 unknown value
* 3 : u16 unknown value
*/
void GetStorageEntryInfo(Service::Interface* self);
void GetStorageEntryInfo(Kernel::HLERequestContext& ctx);
/**
* BOSS::SetStorageOption service function
@ -694,7 +702,7 @@ void GetStorageEntryInfo(Service::Interface* self);
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void SetStorageOption(Service::Interface* self);
void SetStorageOption(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetStorageOption service function
@ -707,42 +715,42 @@ void SetStorageOption(Service::Interface* self);
* 4 : u16 unknown value
* 5 : u16 unknown value
*/
void GetStorageOption(Service::Interface* self);
void GetStorageOption(Kernel::HLERequestContext& ctx);
/**
* BOSS::StartBgImmediate service function
* Inputs:
* 0 : Header Code[0x00330042]
* 1 : u32 unknown value
* 1 : TaskID buffer size
* 2 : MappedBufferDesc(permission = R)
* 3 : u32 buff_addr
* 3 : u32, buff_addr
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : buff_size << 4 | 0xA
* 3 : u32 buff_addr
* 3 : u32, buff_addr
*/
void StartBgImmediate(Service::Interface* self);
void StartBgImmediate(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetTaskActivePriority service function
* BOSS::GetTaskProperty0 service function
* Inputs:
* 0 : Header Code[0x00340042]
* 1 : u32 unknown value
* 1 : u32 size
* 2 : MappedBufferDesc(permission = R)
* 3 : u32 buff_addr
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u8 unknown value
* 2 : u8 current state
* 3 : buff_size << 4 | 0xA
* 4 : u32 buff_addr
*/
void GetTaskActivePriority(Service::Interface* self);
void GetTaskProperty0(Kernel::HLERequestContext& ctx);
/**
* BOSS::RegisterImmediateTask service function
* Inputs:
* 0 : Header Code[0x003500C2]
* 1 : u32 unknown value
* 1 : u32 size
* 2 : u8 unknown value
* 3 : u8 unknown value
* 4 : MappedBufferDesc(permission = R)
@ -752,14 +760,14 @@ void GetTaskActivePriority(Service::Interface* self);
* 2 : buff_size << 4 | 0xA
* 3 : u32 buff_addr
*/
void RegisterImmediateTask(Service::Interface* self);
void RegisterImmediateTask(Kernel::HLERequestContext& ctx);
/**
* BOSS::SetTaskQuery service function
* Inputs:
* 0 : Header Code[0x00360084]
* 1 : u32 unknown value
* 2 : u32 unknown value
* 1 : u32 buffer1 size
* 2 : u32 buffer2 size
* 3 : MappedBufferDesc1(permission = R)
* 4 : u32 buff1_addr
* 5 : MappedBufferDesc2(permission = R)
@ -771,14 +779,14 @@ void RegisterImmediateTask(Service::Interface* self);
* 4 : buff2_size << 4 | 0xA
* 5 : u32 buff2_addr
*/
void SetTaskQuery(Service::Interface* self);
void SetTaskQuery(Kernel::HLERequestContext& ctx);
/**
* BOSS::GetTaskQuery service function
* Inputs:
* 0 : Header Code[0x00370084]
* 1 : u32 unknown value
* 2 : u32 unknown value
* 1 : u32 buffer1 size
* 2 : u32 buffer2 size
* 3 : MappedBufferDesc1(permission = R)
* 4 : u32 buff1_addr
* 5 : MappedBufferDesc2(permission = W)
@ -790,13 +798,170 @@ void SetTaskQuery(Service::Interface* self);
* 4 : buff2_size << 4 | 0xC
* 5 : u32 buff2_addr
*/
void GetTaskQuery(Service::Interface* self);
void GetTaskQuery(Kernel::HLERequestContext& ctx);
/// Initialize BOSS service(s)
void Init();
/**
* BOSS_P::InitializeSessionPrivileged service function
* Inputs:
* 0 : Header Code[0x04010082]
* 1-2 : programID, normally zero for using the programID determined from the input PID
* 3 : 0x20, ARM11-kernel processID translate-header.
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void InitializeSessionPrivileged(Kernel::HLERequestContext& ctx);
/// Shutdown BOSS service(s)
void Shutdown();
/**
* BOSS_P::GetAppNewFlag service function
* Inputs:
* 0 : Header Code[0x04040080]
* 1-2 : u64 ProgramID
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u8 flag, 0 = nothing new, 1 = new content
*/
void GetAppNewFlag(Kernel::HLERequestContext& ctx);
/**
* BOSS_P::GetNsDataIdListPrivileged service function
* Inputs:
* 0 : Header Code[0x040D0182]
* 1-2 : u64 ProgramID
* 3 : u32 filter
* 4 : u32 Buffer size in words(max entries)
* 5 : u16, starting word-index in the internal NsDataId list
* 6 : u32, start_NsDataId
* 7 : MappedBufferDesc(permission = W)
* 8 : u32 buff_addr
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u16 Actual number of output entries
* 3 : u16 Last word-index copied to output in the internal NsDataId list
* 4 : buff_size << 4 | 0xC
* 5 : u32 buff_addr
*/
void GetNsDataIdListPrivileged(Kernel::HLERequestContext& ctx);
/**
* BOSS_P::GetNsDataIdListPrivileged1 service function
* Inputs:
* 0 : Header Code[0x040E0182]
* 1-2 : u64 ProgramID
* 3 : u32 filter
* 4 : u32 Buffer size in words(max entries)
* 5 : u16, starting word-index in the internal NsDataId list
* 6 : u32, start_NsDataId
* 7 : MappedBufferDesc(permission = W)
* 8 : u32 buff_addr
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u16 Actual number of output entries
* 3 : u16 Last word-index copied to output in the internal NsDataId list
* 4 : buff_size << 4 | 0xC
* 5 : u32 buff_addr
*/
void GetNsDataIdListPrivileged1(Kernel::HLERequestContext& ctx);
/**
* BOSS_P::SendPropertyPrivileged service function
* Inputs:
* 0 : Header Code[0x04130082]
* 1 : u16 PropertyID
* 2 : u32 size
* 3 : MappedBufferDesc(permission = R)
* 4 : u32 buff_addr
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : buff_size << 4 | 0xA
* 3 : u32 buff_addr
*/
void SendPropertyPrivileged(Kernel::HLERequestContext& ctx);
/**
* BOSS_P::DeleteNsDataPrivileged service function
* Inputs:
* 0 : Header Code[0x041500C0]
* 1-2 : u64 ProgramID
* 3 : u32 NsDataID
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void DeleteNsDataPrivileged(Kernel::HLERequestContext& ctx);
/**
* BOSS_P::GetNsDataHeaderInfoPrivileged service function
* Inputs:
* 0 : Header Code[0x04160142]
* 1-2 : u64 ProgramID
* 3 : u32, NsDataID
* 4 : u8, type
* 5 : u32, Size
* 6 : MappedBufferDesc(permission = W)
* 7 : u32 buff_addr
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : buff_size << 4 | 0xC
* 3 : u32, buff_addr
*/
void GetNsDataHeaderInfoPrivileged(Kernel::HLERequestContext& ctx);
/**
* BOSS_P::ReadNsDataPrivileged service function
* Inputs:
* 0 : Header Code[0x04170182]
* 1-2 : u64 ProgramID
* 3 : u32, NsDataID
* 4-5 : u64, offset
* 6 : u32, Size
* 7 : MappedBufferDesc(permission = W)
* 8 : u32, buff_addr
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u32 Actual read size
* 3 : u32, unknown value
* 4 : buff_size << 4 | 0xC
* 5 : u32, buff_addr
*/
void ReadNsDataPrivileged(Kernel::HLERequestContext& ctx);
/**
* BOSS_P::SetNsDataNewFlagPrivileged service function
* Inputs:
* 0 : Header Code[0x041A0100]
* 1-2 : u64 ProgramID
* 3 : u32 unknown value
* 4 : u8 flag
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void SetNsDataNewFlagPrivileged(Kernel::HLERequestContext& ctx);
/**
* BOSS_P::GetNsDataNewFlagPrivileged service function
* Inputs:
* 0 : Header Code[0x041B00C0]
* 1-2 : u64 ProgramID
* 3 : u32 unknown value
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
* 2 : u8 flag
*/
void GetNsDataNewFlagPrivileged(Kernel::HLERequestContext& ctx);
private:
std::shared_ptr<Module> boss;
u8 new_arrival_flag;
u8 ns_data_new_flag;
u8 ns_data_new_flag_privileged;
u8 output_flag;
};
private:
Kernel::SharedPtr<Kernel::Event> task_finish_event;
};
void InstallInterfaces(SM::ServiceManager& service_manager);
} // namespace BOSS
} // namespace Service

View File

@ -2,84 +2,86 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "core/hle/service/boss/boss.h"
#include "core/hle/service/boss/boss_p.h"
namespace Service {
namespace BOSS {
const Interface::FunctionInfo FunctionTable[] = {
BOSS_P::BOSS_P(std::shared_ptr<Module> boss)
: Module::Interface(std::move(boss), "boss:P", DefaultMaxSessions) {
static const FunctionInfo functions[] = {
// boss:u shared commands
{0x00010082, InitializeSession, "InitializeSession"},
{0x00020100, RegisterStorage, "RegisterStorage"},
{0x00030000, UnregisterStorage, "UnregisterStorage"},
{0x00040000, GetStorageInfo, "GetStorageInfo"},
{0x00050042, RegisterPrivateRootCa, "RegisterPrivateRootCa"},
{0x00060084, RegisterPrivateClientCert, "RegisterPrivateClientCert"},
{0x00070000, GetNewArrivalFlag, "GetNewArrivalFlag"},
{0x00080002, RegisterNewArrivalEvent, "RegisterNewArrivalEvent"},
{0x00090040, SetOptoutFlag, "SetOptoutFlag"},
{0x000A0000, GetOptoutFlag, "GetOptoutFlag"},
{0x000B00C2, RegisterTask, "RegisterTask"},
{0x000C0082, UnregisterTask, "UnregisterTask"},
{0x000D0082, ReconfigureTask, "ReconfigureTask"},
{0x000E0000, GetTaskIdList, "GetTaskIdList"},
{0x000F0042, GetStepIdList, "GetStepIdList"},
{0x00100102, GetNsDataIdList, "GetNsDataIdList"},
{0x00110102, GetOwnNsDataIdList, "GetOwnNsDataIdList"},
{0x00120102, GetNewDataNsDataIdList, "GetNewDataNsDataIdList"},
{0x00130102, GetOwnNewDataNsDataIdList, "GetOwnNewDataNsDataIdList"},
{0x00140082, SendProperty, "SendProperty"},
{0x00150042, SendPropertyHandle, "SendPropertyHandle"},
{0x00160082, ReceiveProperty, "ReceiveProperty"},
{0x00170082, UpdateTaskInterval, "UpdateTaskInterval"},
{0x00180082, UpdateTaskCount, "UpdateTaskCount"},
{0x00190042, GetTaskInterval, "GetTaskInterval"},
{0x001A0042, GetTaskCount, "GetTaskCount"},
{0x001B0042, GetTaskServiceStatus, "GetTaskServiceStatus"},
{0x001C0042, StartTask, "StartTask"},
{0x001D0042, StartTaskImmediate, "StartTaskImmediate"},
{0x001E0042, CancelTask, "CancelTask"},
{0x001F0000, GetTaskFinishHandle, "GetTaskFinishHandle"},
{0x00200082, GetTaskState, "GetTaskState"},
{0x00210042, GetTaskResult, "GetTaskResult"},
{0x00220042, GetTaskCommErrorCode, "GetTaskCommErrorCode"},
{0x002300C2, GetTaskStatus, "GetTaskStatus"},
{0x00240082, GetTaskError, "GetTaskError"},
{0x00250082, GetTaskInfo, "GetTaskInfo"},
{0x00260040, DeleteNsData, "DeleteNsData"},
{0x002700C2, GetNsDataHeaderInfo, "GetNsDataHeaderInfo"},
{0x00280102, ReadNsData, "ReadNsData"},
{0x00290080, SetNsDataAdditionalInfo, "SetNsDataAdditionalInfo"},
{0x002A0040, GetNsDataAdditionalInfo, "GetNsDataAdditionalInfo"},
{0x002B0080, SetNsDataNewFlag, "SetNsDataNewFlag"},
{0x002C0040, GetNsDataNewFlag, "GetNsDataNewFlag"},
{0x002D0040, GetNsDataLastUpdate, "GetNsDataLastUpdate"},
{0x002E0040, GetErrorCode, "GetErrorCode"},
{0x002F0140, RegisterStorageEntry, "RegisterStorageEntry"},
{0x00300000, GetStorageEntryInfo, "GetStorageEntryInfo"},
{0x00310100, SetStorageOption, "SetStorageOption"},
{0x00320000, GetStorageOption, "GetStorageOption"},
{0x00330042, StartBgImmediate, "StartBgImmediate"},
{0x00340042, GetTaskActivePriority, "GetTaskActivePriority"},
{0x003500C2, RegisterImmediateTask, "RegisterImmediateTask"},
{0x00360084, SetTaskQuery, "SetTaskQuery"},
{0x00370084, GetTaskQuery, "GetTaskQuery"},
// clang-format off
{0x00010082, &BOSS_P::InitializeSession, "InitializeSession"},
{0x00020100, &BOSS_P::SetStorageInfo, "RegisterStorage"},
{0x00030000, &BOSS_P::UnregisterStorage, "UnregisterStorage"},
{0x00040000, &BOSS_P::GetStorageInfo, "GetStorageInfo"},
{0x00050042, &BOSS_P::RegisterPrivateRootCa, "RegisterPrivateRootCa"},
{0x00060084, &BOSS_P::RegisterPrivateClientCert, "RegisterPrivateClientCert"},
{0x00070000, &BOSS_P::GetNewArrivalFlag, "GetNewArrivalFlag"},
{0x00080002, &BOSS_P::RegisterNewArrivalEvent, "RegisterNewArrivalEvent"},
{0x00090040, &BOSS_P::SetOptoutFlag, "SetOptoutFlag"},
{0x000A0000, &BOSS_P::GetOptoutFlag, "GetOptoutFlag"},
{0x000B00C2, &BOSS_P::RegisterTask, "RegisterTask"},
{0x000C0082, &BOSS_P::UnregisterTask, "UnregisterTask"},
{0x000D0082, &BOSS_P::ReconfigureTask, "ReconfigureTask"},
{0x000E0000, &BOSS_P::GetTaskIdList, "GetTaskIdList"},
{0x000F0042, &BOSS_P::GetStepIdList, "GetStepIdList"},
{0x00100102, &BOSS_P::GetNsDataIdList, "GetNsDataIdList"},
{0x00110102, &BOSS_P::GetNsDataIdList1, "GetNsDataIdList1"},
{0x00120102, &BOSS_P::GetNsDataIdList2, "GetNsDataIdList2"},
{0x00130102, &BOSS_P::GetNsDataIdList3, "GetNsDataIdList3"},
{0x00140082, &BOSS_P::SendProperty, "SendProperty"},
{0x00150042, &BOSS_P::SendPropertyHandle, "SendPropertyHandle"},
{0x00160082, &BOSS_P::ReceiveProperty, "ReceiveProperty"},
{0x00170082, &BOSS_P::UpdateTaskInterval, "UpdateTaskInterval"},
{0x00180082, &BOSS_P::UpdateTaskCount, "UpdateTaskCount"},
{0x00190042, &BOSS_P::GetTaskInterval, "GetTaskInterval"},
{0x001A0042, &BOSS_P::GetTaskCount, "GetTaskCount"},
{0x001B0042, &BOSS_P::GetTaskServiceStatus, "GetTaskServiceStatus"},
{0x001C0042, &BOSS_P::StartTask, "StartTask"},
{0x001D0042, &BOSS_P::StartTaskImmediate, "StartTaskImmediate"},
{0x001E0042, &BOSS_P::CancelTask, "CancelTask"},
{0x001F0000, &BOSS_P::GetTaskFinishHandle, "GetTaskFinishHandle"},
{0x00200082, &BOSS_P::GetTaskState, "GetTaskState"},
{0x00210042, &BOSS_P::GetTaskResult, "GetTaskResult"},
{0x00220042, &BOSS_P::GetTaskCommErrorCode, "GetTaskCommErrorCode"},
{0x002300C2, &BOSS_P::GetTaskStatus, "GetTaskStatus"},
{0x00240082, &BOSS_P::GetTaskError, "GetTaskError"},
{0x00250082, &BOSS_P::GetTaskInfo, "GetTaskInfo"},
{0x00260040, &BOSS_P::DeleteNsData, "DeleteNsData"},
{0x002700C2, &BOSS_P::GetNsDataHeaderInfo, "GetNsDataHeaderInfo"},
{0x00280102, &BOSS_P::ReadNsData, "ReadNsData"},
{0x00290080, &BOSS_P::SetNsDataAdditionalInfo, "SetNsDataAdditionalInfo"},
{0x002A0040, &BOSS_P::GetNsDataAdditionalInfo, "GetNsDataAdditionalInfo"},
{0x002B0080, &BOSS_P::SetNsDataNewFlag, "SetNsDataNewFlag"},
{0x002C0040, &BOSS_P::GetNsDataNewFlag, "GetNsDataNewFlag"},
{0x002D0040, &BOSS_P::GetNsDataLastUpdate, "GetNsDataLastUpdate"},
{0x002E0040, &BOSS_P::GetErrorCode, "GetErrorCode"},
{0x002F0140, &BOSS_P::RegisterStorageEntry, "RegisterStorageEntry"},
{0x00300000, &BOSS_P::GetStorageEntryInfo, "GetStorageEntryInfo"},
{0x00310100, &BOSS_P::SetStorageOption, "SetStorageOption"},
{0x00320000, &BOSS_P::GetStorageOption, "GetStorageOption"},
{0x00330042, &BOSS_P::StartBgImmediate, "StartBgImmediate"},
{0x00340042, &BOSS_P::GetTaskProperty0, "GetTaskProperty0"},
{0x003500C2, &BOSS_P::RegisterImmediateTask, "RegisterImmediateTask"},
{0x00360084, &BOSS_P::SetTaskQuery, "SetTaskQuery"},
{0x00370084, &BOSS_P::GetTaskQuery, "GetTaskQuery"},
// boss:p
{0x04010082, nullptr, "InitializeSessionPrivileged"},
{0x04040080, nullptr, "GetAppNewFlag"},
{0x040D0182, nullptr, "GetNsDataIdListPrivileged"},
{0x040E0182, nullptr, "GetNsDataIdListPrivileged1"},
{0x04130082, nullptr, "SendPropertyPrivileged"},
{0x041500C0, nullptr, "DeleteNsDataPrivileged"},
{0x04160142, nullptr, "GetNsDataHeaderInfoPrivileged"},
{0x04170182, nullptr, "ReadNsDataPrivileged"},
{0x041A0100, nullptr, "SetNsDataNewFlagPrivileged"},
{0x041B00C0, nullptr, "GetNsDataNewFlagPrivileged"},
{0x04010082, &BOSS_P::InitializeSessionPrivileged, "InitializeSessionPrivileged"},
{0x04040080, &BOSS_P::GetAppNewFlag, "GetAppNewFlag"},
{0x040D0182, &BOSS_P::GetNsDataIdListPrivileged, "GetNsDataIdListPrivileged"},
{0x040E0182, &BOSS_P::GetNsDataIdListPrivileged1, "GetNsDataIdListPrivileged1"},
{0x04130082, &BOSS_P::SendPropertyPrivileged, "SendPropertyPrivileged"},
{0x041500C0, &BOSS_P::DeleteNsDataPrivileged, "DeleteNsDataPrivileged"},
{0x04160142, &BOSS_P::GetNsDataHeaderInfoPrivileged, "GetNsDataHeaderInfoPrivileged"},
{0x04170182, &BOSS_P::ReadNsDataPrivileged, "ReadNsDataPrivileged"},
{0x041A0100, &BOSS_P::SetNsDataNewFlagPrivileged, "SetNsDataNewFlagPrivileged"},
{0x041B00C0, &BOSS_P::GetNsDataNewFlagPrivileged, "GetNsDataNewFlagPrivileged"},
// clang-format on
};
BOSS_P_Interface::BOSS_P_Interface() {
Register(FunctionTable);
RegisterHandlers(functions);
}
} // namespace BOSS

View File

@ -4,18 +4,14 @@
#pragma once
#include "core/hle/service/service.h"
#include "core/hle/service/boss/boss.h"
namespace Service {
namespace BOSS {
class BOSS_P_Interface : public Service::Interface {
class BOSS_P final : public Module::Interface {
public:
BOSS_P_Interface();
std::string GetPortName() const override {
return "boss:P";
}
explicit BOSS_P(std::shared_ptr<Module> boss);
};
} // namespace BOSS

View File

@ -2,72 +2,74 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "core/hle/service/boss/boss.h"
#include "core/hle/service/boss/boss_u.h"
namespace Service {
namespace BOSS {
const Interface::FunctionInfo FunctionTable[] = {
{0x00010082, InitializeSession, "InitializeSession"},
{0x00020100, RegisterStorage, "RegisterStorage"},
{0x00030000, UnregisterStorage, "UnregisterStorage"},
{0x00040000, GetStorageInfo, "GetStorageInfo"},
{0x00050042, RegisterPrivateRootCa, "RegisterPrivateRootCa"},
{0x00060084, RegisterPrivateClientCert, "RegisterPrivateClientCert"},
{0x00070000, GetNewArrivalFlag, "GetNewArrivalFlag"},
{0x00080002, RegisterNewArrivalEvent, "RegisterNewArrivalEvent"},
{0x00090040, SetOptoutFlag, "SetOptoutFlag"},
{0x000A0000, GetOptoutFlag, "GetOptoutFlag"},
{0x000B00C2, RegisterTask, "RegisterTask"},
{0x000C0082, UnregisterTask, "UnregisterTask"},
{0x000D0082, ReconfigureTask, "ReconfigureTask"},
{0x000E0000, GetTaskIdList, "GetTaskIdList"},
{0x000F0042, GetStepIdList, "GetStepIdList"},
{0x00100102, GetNsDataIdList, "GetNsDataIdList"},
{0x00110102, GetOwnNsDataIdList, "GetOwnNsDataIdList"},
{0x00120102, GetNewDataNsDataIdList, "GetNewDataNsDataIdList"},
{0x00130102, GetOwnNewDataNsDataIdList, "GetOwnNewDataNsDataIdList"},
{0x00140082, SendProperty, "SendProperty"},
{0x00150042, SendPropertyHandle, "SendPropertyHandle"},
{0x00160082, ReceiveProperty, "ReceiveProperty"},
{0x00170082, UpdateTaskInterval, "UpdateTaskInterval"},
{0x00180082, UpdateTaskCount, "UpdateTaskCount"},
{0x00190042, GetTaskInterval, "GetTaskInterval"},
{0x001A0042, GetTaskCount, "GetTaskCount"},
{0x001B0042, GetTaskServiceStatus, "GetTaskServiceStatus"},
{0x001C0042, StartTask, "StartTask"},
{0x001D0042, StartTaskImmediate, "StartTaskImmediate"},
{0x001E0042, CancelTask, "CancelTask"},
{0x001F0000, GetTaskFinishHandle, "GetTaskFinishHandle"},
{0x00200082, GetTaskState, "GetTaskState"},
{0x00210042, GetTaskResult, "GetTaskResult"},
{0x00220042, GetTaskCommErrorCode, "GetTaskCommErrorCode"},
{0x002300C2, GetTaskStatus, "GetTaskStatus"},
{0x00240082, GetTaskError, "GetTaskError"},
{0x00250082, GetTaskInfo, "GetTaskInfo"},
{0x00260040, DeleteNsData, "DeleteNsData"},
{0x002700C2, GetNsDataHeaderInfo, "GetNsDataHeaderInfo"},
{0x00280102, ReadNsData, "ReadNsData"},
{0x00290080, SetNsDataAdditionalInfo, "SetNsDataAdditionalInfo"},
{0x002A0040, GetNsDataAdditionalInfo, "GetNsDataAdditionalInfo"},
{0x002B0080, SetNsDataNewFlag, "SetNsDataNewFlag"},
{0x002C0040, GetNsDataNewFlag, "GetNsDataNewFlag"},
{0x002D0040, GetNsDataLastUpdate, "GetNsDataLastUpdate"},
{0x002E0040, GetErrorCode, "GetErrorCode"},
{0x002F0140, RegisterStorageEntry, "RegisterStorageEntry"},
{0x00300000, GetStorageEntryInfo, "GetStorageEntryInfo"},
{0x00310100, SetStorageOption, "SetStorageOption"},
{0x00320000, GetStorageOption, "GetStorageOption"},
{0x00330042, StartBgImmediate, "StartBgImmediate"},
{0x00340042, GetTaskActivePriority, "GetTaskActivePriority"},
{0x003500C2, RegisterImmediateTask, "RegisterImmediateTask"},
{0x00360084, SetTaskQuery, "SetTaskQuery"},
{0x00370084, GetTaskQuery, "GetTaskQuery"},
BOSS_U::BOSS_U(std::shared_ptr<Module> boss)
: Module::Interface(std::move(boss), "boss:U", DefaultMaxSessions) {
static const FunctionInfo functions[] = {
// clang-format off
{0x00010082, &BOSS_U::InitializeSession, "InitializeSession"},
{0x00020100, &BOSS_U::SetStorageInfo, "SetStorageInfo"},
{0x00030000, &BOSS_U::UnregisterStorage, "UnregisterStorage"},
{0x00040000, &BOSS_U::GetStorageInfo, "GetStorageInfo"},
{0x00050042, &BOSS_U::RegisterPrivateRootCa, "RegisterPrivateRootCa"},
{0x00060084, &BOSS_U::RegisterPrivateClientCert, "RegisterPrivateClientCert"},
{0x00070000, &BOSS_U::GetNewArrivalFlag, "GetNewArrivalFlag"},
{0x00080002, &BOSS_U::RegisterNewArrivalEvent, "RegisterNewArrivalEvent"},
{0x00090040, &BOSS_U::SetOptoutFlag, "SetOptoutFlag"},
{0x000A0000, &BOSS_U::GetOptoutFlag, "GetOptoutFlag"},
{0x000B00C2, &BOSS_U::RegisterTask, "RegisterTask"},
{0x000C0082, &BOSS_U::UnregisterTask, "UnregisterTask"},
{0x000D0082, &BOSS_U::ReconfigureTask, "ReconfigureTask"},
{0x000E0000, &BOSS_U::GetTaskIdList, "GetTaskIdList"},
{0x000F0042, &BOSS_U::GetStepIdList, "GetStepIdList"},
{0x00100102, &BOSS_U::GetNsDataIdList, "GetNsDataIdList"},
{0x00110102, &BOSS_U::GetNsDataIdList1, "GetNsDataIdList1"},
{0x00120102, &BOSS_U::GetNsDataIdList2, "GetNsDataIdList2"},
{0x00130102, &BOSS_U::GetNsDataIdList3, "GetNsDataIdList3"},
{0x00140082, &BOSS_U::SendProperty, "SendProperty"},
{0x00150042, &BOSS_U::SendPropertyHandle, "SendPropertyHandle"},
{0x00160082, &BOSS_U::ReceiveProperty, "ReceiveProperty"},
{0x00170082, &BOSS_U::UpdateTaskInterval, "UpdateTaskInterval"},
{0x00180082, &BOSS_U::UpdateTaskCount, "UpdateTaskCount"},
{0x00190042, &BOSS_U::GetTaskInterval, "GetTaskInterval"},
{0x001A0042, &BOSS_U::GetTaskCount, "GetTaskCount"},
{0x001B0042, &BOSS_U::GetTaskServiceStatus, "GetTaskServiceStatus"},
{0x001C0042, &BOSS_U::StartTask, "StartTask"},
{0x001D0042, &BOSS_U::StartTaskImmediate, "StartTaskImmediate"},
{0x001E0042, &BOSS_U::CancelTask, "CancelTask"},
{0x001F0000, &BOSS_U::GetTaskFinishHandle, "GetTaskFinishHandle"},
{0x00200082, &BOSS_U::GetTaskState, "GetTaskState"},
{0x00210042, &BOSS_U::GetTaskResult, "GetTaskResult"},
{0x00220042, &BOSS_U::GetTaskCommErrorCode, "GetTaskCommErrorCode"},
{0x002300C2, &BOSS_U::GetTaskStatus, "GetTaskStatus"},
{0x00240082, &BOSS_U::GetTaskError, "GetTaskError"},
{0x00250082, &BOSS_U::GetTaskInfo, "GetTaskInfo"},
{0x00260040, &BOSS_U::DeleteNsData, "DeleteNsData"},
{0x002700C2, &BOSS_U::GetNsDataHeaderInfo, "GetNsDataHeaderInfo"},
{0x00280102, &BOSS_U::ReadNsData, "ReadNsData"},
{0x00290080, &BOSS_U::SetNsDataAdditionalInfo, "SetNsDataAdditionalInfo"},
{0x002A0040, &BOSS_U::GetNsDataAdditionalInfo, "GetNsDataAdditionalInfo"},
{0x002B0080, &BOSS_U::SetNsDataNewFlag, "SetNsDataNewFlag"},
{0x002C0040, &BOSS_U::GetNsDataNewFlag, "GetNsDataNewFlag"},
{0x002D0040, &BOSS_U::GetNsDataLastUpdate, "GetNsDataLastUpdate"},
{0x002E0040, &BOSS_U::GetErrorCode, "GetErrorCode"},
{0x002F0140, &BOSS_U::RegisterStorageEntry, "RegisterStorageEntry"},
{0x00300000, &BOSS_U::GetStorageEntryInfo, "GetStorageEntryInfo"},
{0x00310100, &BOSS_U::SetStorageOption, "SetStorageOption"},
{0x00320000, &BOSS_U::GetStorageOption, "GetStorageOption"},
{0x00330042, &BOSS_U::StartBgImmediate, "StartBgImmediate"},
{0x00340042, &BOSS_U::GetTaskProperty0, "GetTaskProperty0"},
{0x003500C2, &BOSS_U::RegisterImmediateTask, "RegisterImmediateTask"},
{0x00360084, &BOSS_U::SetTaskQuery, "SetTaskQuery"},
{0x00370084, &BOSS_U::GetTaskQuery, "GetTaskQuery"},
// clang-format on
};
BOSS_U_Interface::BOSS_U_Interface() {
Register(FunctionTable);
RegisterHandlers(functions);
}
} // namespace BOSS

View File

@ -4,18 +4,14 @@
#pragma once
#include "core/hle/service/service.h"
#include "core/hle/service/boss/boss.h"
namespace Service {
namespace BOSS {
class BOSS_U_Interface : public Service::Interface {
class BOSS_U final : public Module::Interface {
public:
BOSS_U_Interface();
std::string GetPortName() const override {
return "boss:U";
}
explicit BOSS_U(std::shared_ptr<Module> boss);
};
} // namespace BOSS

View File

@ -239,7 +239,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
ACT::InstallInterfaces(*sm);
AM::InstallInterfaces(*sm);
APT::InstallInterfaces(*sm);
BOSS::Init();
BOSS::InstallInterfaces(*sm);
CAM::InstallInterfaces(*sm);
CECD::InstallInterfaces(*sm);
CFG::InstallInterfaces(*sm);
@ -269,7 +269,6 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
/// Shutdown ServiceManager
void Shutdown() {
BOSS::Shutdown();
FS::ArchiveShutdown();
g_kernel_named_ports.clear();