mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-14 00:56:35 +00:00
stratosphere: all in on enum class CommandId
This commit is contained in:
parent
67c0f4527e
commit
18ca8aaf5b
38 changed files with 665 additions and 658 deletions
|
@ -20,15 +20,14 @@
|
||||||
|
|
||||||
#include "../utils.hpp"
|
#include "../utils.hpp"
|
||||||
|
|
||||||
enum BpcAtmosphereCmd : u32 {
|
|
||||||
BpcAtmosphereCmd_RebootToFatalError = 65000,
|
|
||||||
};
|
|
||||||
|
|
||||||
class BpcAtmosphereService : public IServiceObject {
|
class BpcAtmosphereService : public IServiceObject {
|
||||||
|
enum class CommandId {
|
||||||
|
RebootToFatalError = 65000,
|
||||||
|
};
|
||||||
private:
|
private:
|
||||||
Result RebootToFatalError(InBuffer<AtmosphereFatalErrorContext> ctx);
|
Result RebootToFatalError(InBuffer<AtmosphereFatalErrorContext> ctx);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<BpcAtmosphereCmd_RebootToFatalError, &BpcAtmosphereService::RebootToFatalError>(),
|
MAKE_SERVICE_COMMAND_META(BpcAtmosphereService, RebootToFatalError),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,12 +20,12 @@
|
||||||
|
|
||||||
#include "../utils.hpp"
|
#include "../utils.hpp"
|
||||||
|
|
||||||
enum BpcCmd : u32 {
|
|
||||||
BpcCmd_ShutdownSystem = 0,
|
|
||||||
BpcCmd_RebootSystem = 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
class BpcMitmService : public IMitmServiceObject {
|
class BpcMitmService : public IMitmServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
ShutdownSystem = 0,
|
||||||
|
RebootSystem = 1,
|
||||||
|
};
|
||||||
public:
|
public:
|
||||||
BpcMitmService(std::shared_ptr<Service> s, u64 pid) : IMitmServiceObject(s, pid) {
|
BpcMitmService(std::shared_ptr<Service> s, u64 pid) : IMitmServiceObject(s, pid) {
|
||||||
/* ... */
|
/* ... */
|
||||||
|
@ -48,7 +48,7 @@ class BpcMitmService : public IMitmServiceObject {
|
||||||
Result RebootSystem();
|
Result RebootSystem();
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<BpcCmd_ShutdownSystem, &BpcMitmService::ShutdownSystem>(),
|
MAKE_SERVICE_COMMAND_META(BpcMitmService, ShutdownSystem),
|
||||||
MakeServiceCommandMeta<BpcCmd_RebootSystem, &BpcMitmService::RebootSystem>(),
|
MAKE_SERVICE_COMMAND_META(BpcMitmService, RebootSystem),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,11 +18,6 @@
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
#include <stratosphere.hpp>
|
#include <stratosphere.hpp>
|
||||||
|
|
||||||
enum FsIDirectoryCmd : u32 {
|
|
||||||
FsIDirectoryCmd_Read = 0,
|
|
||||||
FsIDirectoryCmd_GetEntryCount = 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
class IDirectory {
|
class IDirectory {
|
||||||
public:
|
public:
|
||||||
virtual ~IDirectory() {}
|
virtual ~IDirectory() {}
|
||||||
|
@ -56,6 +51,11 @@ class IDirectory {
|
||||||
};
|
};
|
||||||
|
|
||||||
class IDirectoryInterface : public IServiceObject {
|
class IDirectoryInterface : public IServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
Read = 0,
|
||||||
|
GetEntryCount = 1,
|
||||||
|
};
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<IDirectory> base_dir;
|
std::unique_ptr<IDirectory> base_dir;
|
||||||
public:
|
public:
|
||||||
|
@ -77,8 +77,8 @@ class IDirectoryInterface : public IServiceObject {
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
/* 1.0.0- */
|
/* 1.0.0- */
|
||||||
MakeServiceCommandMeta<FsIDirectoryCmd_Read, &IDirectoryInterface::Read>(),
|
MAKE_SERVICE_COMMAND_META(IDirectoryInterface, Read),
|
||||||
MakeServiceCommandMeta<FsIDirectoryCmd_GetEntryCount, &IDirectoryInterface::GetEntryCount>(),
|
MAKE_SERVICE_COMMAND_META(IDirectoryInterface, GetEntryCount),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -20,15 +20,6 @@
|
||||||
|
|
||||||
#include "fs_shim.h"
|
#include "fs_shim.h"
|
||||||
|
|
||||||
enum FsIFileCmd : u32 {
|
|
||||||
FsIFileCmd_Read = 0,
|
|
||||||
FsIFileCmd_Write = 1,
|
|
||||||
FsIFileCmd_Flush = 2,
|
|
||||||
FsIFileCmd_SetSize = 3,
|
|
||||||
FsIFileCmd_GetSize = 4,
|
|
||||||
FsIFileCmd_OperateRange = 5,
|
|
||||||
};
|
|
||||||
|
|
||||||
class IFile {
|
class IFile {
|
||||||
public:
|
public:
|
||||||
virtual ~IFile() {}
|
virtual ~IFile() {}
|
||||||
|
@ -106,6 +97,15 @@ class IFile {
|
||||||
};
|
};
|
||||||
|
|
||||||
class IFileInterface : public IServiceObject {
|
class IFileInterface : public IServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
Read = 0,
|
||||||
|
Write = 1,
|
||||||
|
Flush = 2,
|
||||||
|
SetSize = 3,
|
||||||
|
GetSize = 4,
|
||||||
|
OperateRange = 5,
|
||||||
|
};
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<IFile> base_file;
|
std::unique_ptr<IFile> base_file;
|
||||||
public:
|
public:
|
||||||
|
@ -139,14 +139,14 @@ class IFileInterface : public IServiceObject {
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
/* 1.0.0- */
|
/* 1.0.0- */
|
||||||
MakeServiceCommandMeta<FsIFileCmd_Read, &IFileInterface::Read>(),
|
MAKE_SERVICE_COMMAND_META(IFileInterface, Read),
|
||||||
MakeServiceCommandMeta<FsIFileCmd_Write, &IFileInterface::Write>(),
|
MAKE_SERVICE_COMMAND_META(IFileInterface, Write),
|
||||||
MakeServiceCommandMeta<FsIFileCmd_Flush, &IFileInterface::Flush>(),
|
MAKE_SERVICE_COMMAND_META(IFileInterface, Flush),
|
||||||
MakeServiceCommandMeta<FsIFileCmd_SetSize, &IFileInterface::SetSize>(),
|
MAKE_SERVICE_COMMAND_META(IFileInterface, SetSize),
|
||||||
MakeServiceCommandMeta<FsIFileCmd_GetSize, &IFileInterface::GetSize>(),
|
MAKE_SERVICE_COMMAND_META(IFileInterface, GetSize),
|
||||||
|
|
||||||
/* 4.0.0- */
|
/* 4.0.0- */
|
||||||
MakeServiceCommandMeta<FsIFileCmd_OperateRange, &IFileInterface::OperateRange, FirmwareVersion_400>(),
|
MAKE_SERVICE_COMMAND_META(IFileInterface, OperateRange, FirmwareVersion_400),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -26,30 +26,6 @@
|
||||||
#include "fs_ifile.hpp"
|
#include "fs_ifile.hpp"
|
||||||
#include "fs_idirectory.hpp"
|
#include "fs_idirectory.hpp"
|
||||||
|
|
||||||
enum FsIFileSystemCmd : u32 {
|
|
||||||
/* 1.0.0+ */
|
|
||||||
FsIFileSystemCmd_CreateFile = 0,
|
|
||||||
FsIFileSystemCmd_DeleteFile = 1,
|
|
||||||
FsIFileSystemCmd_CreateDirectory = 2,
|
|
||||||
FsIFileSystemCmd_DeleteDirectory = 3,
|
|
||||||
FsIFileSystemCmd_DeleteDirectoryRecursively = 4,
|
|
||||||
FsIFileSystemCmd_RenameFile = 5,
|
|
||||||
FsIFileSystemCmd_RenameDirectory = 6,
|
|
||||||
FsIFileSystemCmd_GetEntryType = 7,
|
|
||||||
FsIFileSystemCmd_OpenFile = 8,
|
|
||||||
FsIFileSystemCmd_OpenDirectory = 9,
|
|
||||||
FsIFileSystemCmd_Commit = 10,
|
|
||||||
FsIFileSystemCmd_GetFreeSpaceSize = 11,
|
|
||||||
FsIFileSystemCmd_GetTotalSpaceSize = 12,
|
|
||||||
|
|
||||||
/* 3.0.0+ */
|
|
||||||
FsIFileSystemCmd_CleanDirectoryRecursively = 13,
|
|
||||||
FsIFileSystemCmd_GetFileTimeStampRaw = 14,
|
|
||||||
|
|
||||||
/* 4.0.0+ */
|
|
||||||
FsIFileSystemCmd_QueryEntry = 15,
|
|
||||||
};
|
|
||||||
|
|
||||||
class IFile;
|
class IFile;
|
||||||
class IDirectory;
|
class IDirectory;
|
||||||
|
|
||||||
|
@ -197,6 +173,30 @@ class IFileSystem {
|
||||||
};
|
};
|
||||||
|
|
||||||
class IFileSystemInterface : public IServiceObject {
|
class IFileSystemInterface : public IServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
/* 1.0.0+ */
|
||||||
|
CreateFile = 0,
|
||||||
|
DeleteFile = 1,
|
||||||
|
CreateDirectory = 2,
|
||||||
|
DeleteDirectory = 3,
|
||||||
|
DeleteDirectoryRecursively = 4,
|
||||||
|
RenameFile = 5,
|
||||||
|
RenameDirectory = 6,
|
||||||
|
GetEntryType = 7,
|
||||||
|
OpenFile = 8,
|
||||||
|
OpenDirectory = 9,
|
||||||
|
Commit = 10,
|
||||||
|
GetFreeSpaceSize = 11,
|
||||||
|
GetTotalSpaceSize = 12,
|
||||||
|
|
||||||
|
/* 3.0.0+ */
|
||||||
|
CleanDirectoryRecursively = 13,
|
||||||
|
GetFileTimeStampRaw = 14,
|
||||||
|
|
||||||
|
/* 4.0.0+ */
|
||||||
|
QueryEntry = 15,
|
||||||
|
};
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<IFileSystem> unique_fs;
|
std::unique_ptr<IFileSystem> unique_fs;
|
||||||
std::shared_ptr<IFileSystem> shared_fs;
|
std::shared_ptr<IFileSystem> shared_fs;
|
||||||
|
@ -342,26 +342,26 @@ class IFileSystemInterface : public IServiceObject {
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
/* 1.0.0- */
|
/* 1.0.0- */
|
||||||
MakeServiceCommandMeta<FsIFileSystemCmd_CreateFile, &IFileSystemInterface::CreateFile>(),
|
MAKE_SERVICE_COMMAND_META(IFileSystemInterface, CreateFile),
|
||||||
MakeServiceCommandMeta<FsIFileSystemCmd_DeleteFile, &IFileSystemInterface::DeleteFile>(),
|
MAKE_SERVICE_COMMAND_META(IFileSystemInterface, DeleteFile),
|
||||||
MakeServiceCommandMeta<FsIFileSystemCmd_CreateDirectory, &IFileSystemInterface::CreateDirectory>(),
|
MAKE_SERVICE_COMMAND_META(IFileSystemInterface, CreateDirectory),
|
||||||
MakeServiceCommandMeta<FsIFileSystemCmd_DeleteDirectory, &IFileSystemInterface::DeleteDirectory>(),
|
MAKE_SERVICE_COMMAND_META(IFileSystemInterface, DeleteDirectory),
|
||||||
MakeServiceCommandMeta<FsIFileSystemCmd_DeleteDirectoryRecursively, &IFileSystemInterface::DeleteDirectoryRecursively>(),
|
MAKE_SERVICE_COMMAND_META(IFileSystemInterface, DeleteDirectoryRecursively),
|
||||||
MakeServiceCommandMeta<FsIFileSystemCmd_RenameFile, &IFileSystemInterface::RenameFile>(),
|
MAKE_SERVICE_COMMAND_META(IFileSystemInterface, RenameFile),
|
||||||
MakeServiceCommandMeta<FsIFileSystemCmd_RenameDirectory, &IFileSystemInterface::RenameDirectory>(),
|
MAKE_SERVICE_COMMAND_META(IFileSystemInterface, RenameDirectory),
|
||||||
MakeServiceCommandMeta<FsIFileSystemCmd_GetEntryType, &IFileSystemInterface::GetEntryType>(),
|
MAKE_SERVICE_COMMAND_META(IFileSystemInterface, GetEntryType),
|
||||||
MakeServiceCommandMeta<FsIFileSystemCmd_OpenFile, &IFileSystemInterface::OpenFile>(),
|
MAKE_SERVICE_COMMAND_META(IFileSystemInterface, OpenFile),
|
||||||
MakeServiceCommandMeta<FsIFileSystemCmd_OpenDirectory, &IFileSystemInterface::OpenDirectory>(),
|
MAKE_SERVICE_COMMAND_META(IFileSystemInterface, OpenDirectory),
|
||||||
MakeServiceCommandMeta<FsIFileSystemCmd_Commit, &IFileSystemInterface::Commit>(),
|
MAKE_SERVICE_COMMAND_META(IFileSystemInterface, Commit),
|
||||||
MakeServiceCommandMeta<FsIFileSystemCmd_GetFreeSpaceSize, &IFileSystemInterface::GetFreeSpaceSize>(),
|
MAKE_SERVICE_COMMAND_META(IFileSystemInterface, GetFreeSpaceSize),
|
||||||
MakeServiceCommandMeta<FsIFileSystemCmd_GetTotalSpaceSize, &IFileSystemInterface::GetTotalSpaceSize>(),
|
MAKE_SERVICE_COMMAND_META(IFileSystemInterface, GetTotalSpaceSize),
|
||||||
|
|
||||||
/* 3.0.0- */
|
/* 3.0.0- */
|
||||||
MakeServiceCommandMeta<FsIFileSystemCmd_CleanDirectoryRecursively, &IFileSystemInterface::CleanDirectoryRecursively, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(IFileSystemInterface, CleanDirectoryRecursively, FirmwareVersion_300),
|
||||||
MakeServiceCommandMeta<FsIFileSystemCmd_GetFileTimeStampRaw, &IFileSystemInterface::GetFileTimeStampRaw, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(IFileSystemInterface, GetFileTimeStampRaw, FirmwareVersion_300),
|
||||||
|
|
||||||
/* 4.0.0- */
|
/* 4.0.0- */
|
||||||
MakeServiceCommandMeta<FsIFileSystemCmd_QueryEntry, &IFileSystemInterface::QueryEntry, FirmwareVersion_400>(),
|
MAKE_SERVICE_COMMAND_META(IFileSystemInterface, QueryEntry, FirmwareVersion_400),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,15 +21,6 @@
|
||||||
|
|
||||||
#include "../debug.hpp"
|
#include "../debug.hpp"
|
||||||
|
|
||||||
enum FsIStorageCmd : u32 {
|
|
||||||
FsIStorageCmd_Read = 0,
|
|
||||||
FsIStorageCmd_Write = 1,
|
|
||||||
FsIStorageCmd_Flush = 2,
|
|
||||||
FsIStorageCmd_SetSize = 3,
|
|
||||||
FsIStorageCmd_GetSize = 4,
|
|
||||||
FsIStorageCmd_OperateRange = 5,
|
|
||||||
};
|
|
||||||
|
|
||||||
class IStorage {
|
class IStorage {
|
||||||
public:
|
public:
|
||||||
virtual ~IStorage();
|
virtual ~IStorage();
|
||||||
|
@ -47,6 +38,15 @@ class IStorage {
|
||||||
};
|
};
|
||||||
|
|
||||||
class IStorageInterface : public IServiceObject {
|
class IStorageInterface : public IServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
Read = 0,
|
||||||
|
Write = 1,
|
||||||
|
Flush = 2,
|
||||||
|
SetSize = 3,
|
||||||
|
GetSize = 4,
|
||||||
|
OperateRange = 5,
|
||||||
|
};
|
||||||
private:
|
private:
|
||||||
IStorage *base_storage;
|
IStorage *base_storage;
|
||||||
public:
|
public:
|
||||||
|
@ -81,14 +81,14 @@ class IStorageInterface : public IServiceObject {
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
/* 1.0.0- */
|
/* 1.0.0- */
|
||||||
MakeServiceCommandMeta<FsIStorageCmd_Read, &IStorageInterface::Read>(),
|
MAKE_SERVICE_COMMAND_META(IStorageInterface, Read),
|
||||||
MakeServiceCommandMeta<FsIStorageCmd_Write, &IStorageInterface::Write>(),
|
MAKE_SERVICE_COMMAND_META(IStorageInterface, Write),
|
||||||
MakeServiceCommandMeta<FsIStorageCmd_Flush, &IStorageInterface::Flush>(),
|
MAKE_SERVICE_COMMAND_META(IStorageInterface, Flush),
|
||||||
MakeServiceCommandMeta<FsIStorageCmd_SetSize, &IStorageInterface::SetSize>(),
|
MAKE_SERVICE_COMMAND_META(IStorageInterface, SetSize),
|
||||||
MakeServiceCommandMeta<FsIStorageCmd_GetSize, &IStorageInterface::GetSize>(),
|
MAKE_SERVICE_COMMAND_META(IStorageInterface, GetSize),
|
||||||
|
|
||||||
/* 4.0.0- */
|
/* 4.0.0- */
|
||||||
MakeServiceCommandMeta<FsIStorageCmd_OperateRange, &IStorageInterface::OperateRange, FirmwareVersion_400>(),
|
MAKE_SERVICE_COMMAND_META(IStorageInterface, OperateRange, FirmwareVersion_400),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -69,8 +69,8 @@ static void StorageCacheSetEntry(u64 title_id, std::shared_ptr<IStorageInterface
|
||||||
|
|
||||||
void FsMitmService::PostProcess(IMitmServiceObject *obj, IpcResponseContext *ctx) {
|
void FsMitmService::PostProcess(IMitmServiceObject *obj, IpcResponseContext *ctx) {
|
||||||
auto this_ptr = static_cast<FsMitmService *>(obj);
|
auto this_ptr = static_cast<FsMitmService *>(obj);
|
||||||
switch ((FspSrvCmd)ctx->cmd_id) {
|
switch (static_cast<CommandId>(ctx->cmd_id)) {
|
||||||
case FspSrvCmd_SetCurrentProcess:
|
case CommandId::SetCurrentProcess:
|
||||||
if (R_SUCCEEDED(ctx->rc)) {
|
if (R_SUCCEEDED(ctx->rc)) {
|
||||||
this_ptr->has_initialized = true;
|
this_ptr->has_initialized = true;
|
||||||
this_ptr->process_id = ctx->request.Pid;
|
this_ptr->process_id = ctx->request.Pid;
|
||||||
|
|
|
@ -21,24 +21,23 @@
|
||||||
#include "fs_ifilesystem.hpp"
|
#include "fs_ifilesystem.hpp"
|
||||||
#include "../utils.hpp"
|
#include "../utils.hpp"
|
||||||
|
|
||||||
enum FspSrvCmd : u32 {
|
|
||||||
FspSrvCmd_OpenFileSystemDeprecated = 0,
|
|
||||||
|
|
||||||
FspSrvCmd_SetCurrentProcess = 1,
|
|
||||||
|
|
||||||
FspSrvCmd_OpenFileSystemWithPatch = 7,
|
|
||||||
FspSrvCmd_OpenFileSystemWithId = 8,
|
|
||||||
|
|
||||||
FspSrvCmd_OpenSdCardFileSystem = 18,
|
|
||||||
|
|
||||||
FspSrvCmd_OpenSaveDataFileSystem = 51,
|
|
||||||
|
|
||||||
FspSrvCmd_OpenBisStorage = 12,
|
|
||||||
FspSrvCmd_OpenDataStorageByCurrentProcess = 200,
|
|
||||||
FspSrvCmd_OpenDataStorageByDataId = 202,
|
|
||||||
};
|
|
||||||
|
|
||||||
class FsMitmService : public IMitmServiceObject {
|
class FsMitmService : public IMitmServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
OpenFileSystemDeprecated = 0,
|
||||||
|
|
||||||
|
SetCurrentProcess = 1,
|
||||||
|
OpenFileSystemWithPatch = 7,
|
||||||
|
OpenFileSystemWithId = 8,
|
||||||
|
|
||||||
|
OpenSdCardFileSystem = 18,
|
||||||
|
|
||||||
|
OpenSaveDataFileSystem = 51,
|
||||||
|
|
||||||
|
OpenBisStorage = 12,
|
||||||
|
OpenDataStorageByCurrentProcess = 200,
|
||||||
|
OpenDataStorageByDataId = 202,
|
||||||
|
};
|
||||||
private:
|
private:
|
||||||
static constexpr const char *AtmosphereHblWebContentDir = "/atmosphere/hbl_html";
|
static constexpr const char *AtmosphereHblWebContentDir = "/atmosphere/hbl_html";
|
||||||
private:
|
private:
|
||||||
|
@ -84,13 +83,13 @@ class FsMitmService : public IMitmServiceObject {
|
||||||
Result OpenDataStorageByDataId(Out<std::shared_ptr<IStorageInterface>> out, u64 data_id, u8 storage_id);
|
Result OpenDataStorageByDataId(Out<std::shared_ptr<IStorageInterface>> out, u64 data_id, u8 storage_id);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
/* TODO MakeServiceCommandMeta<FspSrvCmd_OpenFileSystemDeprecated, &FsMitmService::OpenFileSystemDeprecated>(), */
|
/* TODO MAKE_SERVICE_COMMAND_META(FsMitmService, OpenFileSystemDeprecated), */
|
||||||
MakeServiceCommandMeta<FspSrvCmd_OpenFileSystemWithPatch, &FsMitmService::OpenFileSystemWithPatch, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(FsMitmService, OpenFileSystemWithPatch, FirmwareVersion_200),
|
||||||
MakeServiceCommandMeta<FspSrvCmd_OpenFileSystemWithId, &FsMitmService::OpenFileSystemWithId, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(FsMitmService, OpenFileSystemWithId, FirmwareVersion_200),
|
||||||
MakeServiceCommandMeta<FspSrvCmd_OpenSdCardFileSystem, &FsMitmService::OpenSdCardFileSystem>(),
|
MAKE_SERVICE_COMMAND_META(FsMitmService, OpenSdCardFileSystem),
|
||||||
MakeServiceCommandMeta<FspSrvCmd_OpenSaveDataFileSystem, &FsMitmService::OpenSaveDataFileSystem>(),
|
MAKE_SERVICE_COMMAND_META(FsMitmService, OpenSaveDataFileSystem),
|
||||||
MakeServiceCommandMeta<FspSrvCmd_OpenBisStorage, &FsMitmService::OpenBisStorage>(),
|
MAKE_SERVICE_COMMAND_META(FsMitmService, OpenBisStorage),
|
||||||
MakeServiceCommandMeta<FspSrvCmd_OpenDataStorageByCurrentProcess, &FsMitmService::OpenDataStorageByCurrentProcess>(),
|
MAKE_SERVICE_COMMAND_META(FsMitmService, OpenDataStorageByCurrentProcess),
|
||||||
MakeServiceCommandMeta<FspSrvCmd_OpenDataStorageByDataId, &FsMitmService::OpenDataStorageByDataId>(),
|
MAKE_SERVICE_COMMAND_META(FsMitmService, OpenDataStorageByDataId),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,9 +20,13 @@
|
||||||
|
|
||||||
#include "../utils.hpp"
|
#include "../utils.hpp"
|
||||||
|
|
||||||
#include "nsmitm_service_common.hpp"
|
|
||||||
|
|
||||||
class NsAmMitmService : public IMitmServiceObject {
|
class NsAmMitmService : public IMitmServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
GetApplicationContentPath = 21,
|
||||||
|
ResolveApplicationContentPath = 23,
|
||||||
|
GetRunningApplicationProgramId = 92,
|
||||||
|
};
|
||||||
public:
|
public:
|
||||||
NsAmMitmService(std::shared_ptr<Service> s, u64 pid) : IMitmServiceObject(s, pid) {
|
NsAmMitmService(std::shared_ptr<Service> s, u64 pid) : IMitmServiceObject(s, pid) {
|
||||||
/* ... */
|
/* ... */
|
||||||
|
@ -44,8 +48,8 @@ class NsAmMitmService : public IMitmServiceObject {
|
||||||
Result GetRunningApplicationProgramId(Out<u64> out_tid, u64 app_id);
|
Result GetRunningApplicationProgramId(Out<u64> out_tid, u64 app_id);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<NsSrvCmd_GetApplicationContentPath, &NsAmMitmService::GetApplicationContentPath>(),
|
MAKE_SERVICE_COMMAND_META(NsAmMitmService, GetApplicationContentPath),
|
||||||
MakeServiceCommandMeta<NsSrvCmd_ResolveApplicationContentPath, &NsAmMitmService::ResolveApplicationContentPath>(),
|
MAKE_SERVICE_COMMAND_META(NsAmMitmService, ResolveApplicationContentPath),
|
||||||
MakeServiceCommandMeta<NsSrvCmd_GetRunningApplicationProgramId, &NsAmMitmService::GetRunningApplicationProgramId, FirmwareVersion_600>(),
|
MAKE_SERVICE_COMMAND_META(NsAmMitmService, GetRunningApplicationProgramId, FirmwareVersion_600),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2018-2019 Atmosphère-NX
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms and conditions of the GNU General Public License,
|
|
||||||
* version 2, as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
||||||
* more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
#include <switch.h>
|
|
||||||
#include <stratosphere.hpp>
|
|
||||||
|
|
||||||
#include "../utils.hpp"
|
|
||||||
|
|
||||||
enum NsGetterCmd : u32 {
|
|
||||||
NsGetterCmd_GetDocumentInterface = 7999,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum NsSrvCmd : u32 {
|
|
||||||
NsSrvCmd_GetApplicationContentPath = 21,
|
|
||||||
NsSrvCmd_ResolveApplicationContentPath = 23,
|
|
||||||
NsSrvCmd_GetRunningApplicationProgramId = 92,
|
|
||||||
};
|
|
|
@ -20,10 +20,15 @@
|
||||||
|
|
||||||
#include "../utils.hpp"
|
#include "../utils.hpp"
|
||||||
|
|
||||||
#include "nsmitm_service_common.hpp"
|
|
||||||
#include "ns_shim.h"
|
#include "ns_shim.h"
|
||||||
|
|
||||||
class NsDocumentService : public IServiceObject {
|
class NsDocumentService : public IServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
GetApplicationContentPath = 21,
|
||||||
|
ResolveApplicationContentPath = 23,
|
||||||
|
GetRunningApplicationProgramId = 92,
|
||||||
|
};
|
||||||
private:
|
private:
|
||||||
u64 title_id;
|
u64 title_id;
|
||||||
std::unique_ptr<NsDocumentInterface> srv;
|
std::unique_ptr<NsDocumentInterface> srv;
|
||||||
|
@ -50,13 +55,17 @@ class NsDocumentService : public IServiceObject {
|
||||||
Result GetRunningApplicationProgramId(Out<u64> out_tid, u64 app_id);
|
Result GetRunningApplicationProgramId(Out<u64> out_tid, u64 app_id);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<NsSrvCmd_GetApplicationContentPath, &NsDocumentService::GetApplicationContentPath>(),
|
MAKE_SERVICE_COMMAND_META(NsDocumentService, GetApplicationContentPath),
|
||||||
MakeServiceCommandMeta<NsSrvCmd_ResolveApplicationContentPath, &NsDocumentService::ResolveApplicationContentPath>(),
|
MAKE_SERVICE_COMMAND_META(NsDocumentService, ResolveApplicationContentPath),
|
||||||
MakeServiceCommandMeta<NsSrvCmd_GetRunningApplicationProgramId, &NsDocumentService::GetRunningApplicationProgramId, FirmwareVersion_600>(),
|
MAKE_SERVICE_COMMAND_META(NsDocumentService, GetRunningApplicationProgramId, FirmwareVersion_600),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class NsWebMitmService : public IMitmServiceObject {
|
class NsWebMitmService : public IMitmServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
GetDocumentInterface = 7999,
|
||||||
|
};
|
||||||
public:
|
public:
|
||||||
NsWebMitmService(std::shared_ptr<Service> s, u64 pid) : IMitmServiceObject(s, pid) {
|
NsWebMitmService(std::shared_ptr<Service> s, u64 pid) : IMitmServiceObject(s, pid) {
|
||||||
/* ... */
|
/* ... */
|
||||||
|
@ -76,6 +85,6 @@ class NsWebMitmService : public IMitmServiceObject {
|
||||||
Result GetDocumentInterface(Out<std::shared_ptr<NsDocumentService>> out_intf);
|
Result GetDocumentInterface(Out<std::shared_ptr<NsDocumentService>> out_intf);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<NsGetterCmd_GetDocumentInterface, &NsWebMitmService::GetDocumentInterface, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(NsWebMitmService, GetDocumentInterface, FirmwareVersion_300),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,16 +20,16 @@
|
||||||
|
|
||||||
#include "../utils.hpp"
|
#include "../utils.hpp"
|
||||||
|
|
||||||
enum SetCmd : u32 {
|
|
||||||
SetCmd_GetLanguageCode = 0,
|
|
||||||
SetCmd_GetRegionCode = 4,
|
|
||||||
|
|
||||||
/* Commands for which set:sys *must* act as a passthrough. */
|
|
||||||
/* TODO: Solve the relevant IPC detection problem. */
|
|
||||||
SetCmd_GetAvailableLanguageCodes = 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
class SetMitmService : public IMitmServiceObject {
|
class SetMitmService : public IMitmServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
GetLanguageCode = 0,
|
||||||
|
GetRegionCode = 4,
|
||||||
|
|
||||||
|
/* Commands for which set:sys *must* act as a passthrough. */
|
||||||
|
/* TODO: Solve the relevant IPC detection problem. */
|
||||||
|
GetAvailableLanguageCodes = 1,
|
||||||
|
};
|
||||||
private:
|
private:
|
||||||
HosMutex lock;
|
HosMutex lock;
|
||||||
OverrideLocale locale;
|
OverrideLocale locale;
|
||||||
|
@ -60,9 +60,9 @@ class SetMitmService : public IMitmServiceObject {
|
||||||
Result GetAvailableLanguageCodes(OutPointerWithClientSize<u64> out_language_codes, Out<s32> out_count);
|
Result GetAvailableLanguageCodes(OutPointerWithClientSize<u64> out_language_codes, Out<s32> out_count);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<SetCmd_GetLanguageCode, &SetMitmService::GetLanguageCode>(),
|
MAKE_SERVICE_COMMAND_META(SetMitmService, GetLanguageCode),
|
||||||
MakeServiceCommandMeta<SetCmd_GetRegionCode, &SetMitmService::GetRegionCode>(),
|
MAKE_SERVICE_COMMAND_META(SetMitmService, GetRegionCode),
|
||||||
|
|
||||||
MakeServiceCommandMeta<SetCmd_GetAvailableLanguageCodes, &SetMitmService::GetAvailableLanguageCodes>(),
|
MAKE_SERVICE_COMMAND_META(SetMitmService, GetAvailableLanguageCodes),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,18 +20,18 @@
|
||||||
|
|
||||||
#include "setsys_shim.h"
|
#include "setsys_shim.h"
|
||||||
|
|
||||||
enum SetSysCmd : u32 {
|
|
||||||
SetSysCmd_GetFirmwareVersion = 3,
|
|
||||||
SetSysCmd_GetFirmwareVersion2 = 4,
|
|
||||||
SetSysCmd_GetSettingsItemValueSize = 37,
|
|
||||||
SetSysCmd_GetSettingsItemValue = 38,
|
|
||||||
|
|
||||||
/* Commands for which set:sys *must* act as a passthrough. */
|
|
||||||
/* TODO: Solve the relevant IPC detection problem. */
|
|
||||||
SetSysCmd_GetEdid = 41,
|
|
||||||
};
|
|
||||||
|
|
||||||
class SetSysMitmService : public IMitmServiceObject {
|
class SetSysMitmService : public IMitmServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
GetFirmwareVersion = 3,
|
||||||
|
GetFirmwareVersion2 = 4,
|
||||||
|
GetSettingsItemValueSize = 37,
|
||||||
|
GetSettingsItemValue = 38,
|
||||||
|
|
||||||
|
/* Commands for which set:sys *must* act as a passthrough. */
|
||||||
|
/* TODO: Solve the relevant IPC detection problem. */
|
||||||
|
GetEdid = 41,
|
||||||
|
};
|
||||||
public:
|
public:
|
||||||
SetSysMitmService(std::shared_ptr<Service> s, u64 pid) : IMitmServiceObject(s, pid) {
|
SetSysMitmService(std::shared_ptr<Service> s, u64 pid) : IMitmServiceObject(s, pid) {
|
||||||
/* ... */
|
/* ... */
|
||||||
|
@ -55,11 +55,11 @@ class SetSysMitmService : public IMitmServiceObject {
|
||||||
Result GetEdid(OutPointerWithServerSize<SetSysEdid, 0x1> out);
|
Result GetEdid(OutPointerWithServerSize<SetSysEdid, 0x1> out);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<SetSysCmd_GetFirmwareVersion, &SetSysMitmService::GetFirmwareVersion>(),
|
MAKE_SERVICE_COMMAND_META(SetSysMitmService, GetFirmwareVersion),
|
||||||
MakeServiceCommandMeta<SetSysCmd_GetFirmwareVersion2, &SetSysMitmService::GetFirmwareVersion2>(),
|
MAKE_SERVICE_COMMAND_META(SetSysMitmService, GetFirmwareVersion2),
|
||||||
MakeServiceCommandMeta<SetSysCmd_GetSettingsItemValueSize, &SetSysMitmService::GetSettingsItemValueSize>(),
|
MAKE_SERVICE_COMMAND_META(SetSysMitmService, GetSettingsItemValueSize),
|
||||||
MakeServiceCommandMeta<SetSysCmd_GetSettingsItemValue, &SetSysMitmService::GetSettingsItemValue>(),
|
MAKE_SERVICE_COMMAND_META(SetSysMitmService, GetSettingsItemValue),
|
||||||
|
|
||||||
MakeServiceCommandMeta<SetSysCmd_GetEdid, &SetSysMitmService::GetEdid>(),
|
MAKE_SERVICE_COMMAND_META(SetSysMitmService, GetEdid),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,37 +20,37 @@
|
||||||
|
|
||||||
#include "dmnt_cheat_types.hpp"
|
#include "dmnt_cheat_types.hpp"
|
||||||
|
|
||||||
enum DmntCheatCmd {
|
|
||||||
/* Meta */
|
|
||||||
DmntCheat_Cmd_HasCheatProcess = 65000,
|
|
||||||
DmntCheat_Cmd_GetCheatProcessEvent = 65001,
|
|
||||||
DmntCheat_Cmd_GetCheatProcessMetadata = 65002,
|
|
||||||
DmntCheat_Cmd_ForceOpenCheatProcess = 65003,
|
|
||||||
|
|
||||||
/* Interact with Memory */
|
|
||||||
DmntCheat_Cmd_GetCheatProcessMappingCount = 65100,
|
|
||||||
DmntCheat_Cmd_GetCheatProcessMappings = 65101,
|
|
||||||
DmntCheat_Cmd_ReadCheatProcessMemory = 65102,
|
|
||||||
DmntCheat_Cmd_WriteCheatProcessMemory = 65103,
|
|
||||||
DmntCheat_Cmd_QueryCheatProcessMemory = 65104,
|
|
||||||
|
|
||||||
/* Interact with Cheats */
|
|
||||||
DmntCheat_Cmd_GetCheatCount = 65200,
|
|
||||||
DmntCheat_Cmd_GetCheats = 65201,
|
|
||||||
DmntCheat_Cmd_GetCheatById = 65202,
|
|
||||||
DmntCheat_Cmd_ToggleCheat = 65203,
|
|
||||||
DmntCheat_Cmd_AddCheat = 65204,
|
|
||||||
DmntCheat_Cmd_RemoveCheat = 65205,
|
|
||||||
|
|
||||||
/* Interact with Frozen Addresses */
|
|
||||||
DmntCheat_Cmd_GetFrozenAddressCount = 65300,
|
|
||||||
DmntCheat_Cmd_GetFrozenAddresses = 65301,
|
|
||||||
DmntCheat_Cmd_GetFrozenAddress = 65302,
|
|
||||||
DmntCheat_Cmd_EnableFrozenAddress = 65303,
|
|
||||||
DmntCheat_Cmd_DisableFrozenAddress = 65304,
|
|
||||||
};
|
|
||||||
|
|
||||||
class DmntCheatService final : public IServiceObject {
|
class DmntCheatService final : public IServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
/* Meta */
|
||||||
|
HasCheatProcess = 65000,
|
||||||
|
GetCheatProcessEvent = 65001,
|
||||||
|
GetCheatProcessMetadata = 65002,
|
||||||
|
ForceOpenCheatProcess = 65003,
|
||||||
|
|
||||||
|
/* Interact with Memory */
|
||||||
|
GetCheatProcessMappingCount = 65100,
|
||||||
|
GetCheatProcessMappings = 65101,
|
||||||
|
ReadCheatProcessMemory = 65102,
|
||||||
|
WriteCheatProcessMemory = 65103,
|
||||||
|
QueryCheatProcessMemory = 65104,
|
||||||
|
|
||||||
|
/* Interact with Cheats */
|
||||||
|
GetCheatCount = 65200,
|
||||||
|
GetCheats = 65201,
|
||||||
|
GetCheatById = 65202,
|
||||||
|
ToggleCheat = 65203,
|
||||||
|
AddCheat = 65204,
|
||||||
|
RemoveCheat = 65205,
|
||||||
|
|
||||||
|
/* Interact with Frozen Addresses */
|
||||||
|
GetFrozenAddressCount = 65300,
|
||||||
|
GetFrozenAddresses = 65301,
|
||||||
|
GetFrozenAddress = 65302,
|
||||||
|
EnableFrozenAddress = 65303,
|
||||||
|
DisableFrozenAddress = 65304,
|
||||||
|
};
|
||||||
private:
|
private:
|
||||||
void HasCheatProcess(Out<bool> out);
|
void HasCheatProcess(Out<bool> out);
|
||||||
void GetCheatProcessEvent(Out<CopiedHandle> out_event);
|
void GetCheatProcessEvent(Out<CopiedHandle> out_event);
|
||||||
|
@ -78,28 +78,28 @@ class DmntCheatService final : public IServiceObject {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_HasCheatProcess, &DmntCheatService::HasCheatProcess>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, HasCheatProcess),
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_GetCheatProcessEvent, &DmntCheatService::GetCheatProcessEvent>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, GetCheatProcessEvent),
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_GetCheatProcessMetadata, &DmntCheatService::GetCheatProcessMetadata>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, GetCheatProcessMetadata),
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_ForceOpenCheatProcess, &DmntCheatService::ForceOpenCheatProcess>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, ForceOpenCheatProcess),
|
||||||
|
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_GetCheatProcessMappingCount, &DmntCheatService::GetCheatProcessMappingCount>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, GetCheatProcessMappingCount),
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_GetCheatProcessMappings, &DmntCheatService::GetCheatProcessMappings>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, GetCheatProcessMappings),
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_ReadCheatProcessMemory, &DmntCheatService::ReadCheatProcessMemory>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, ReadCheatProcessMemory),
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_WriteCheatProcessMemory, &DmntCheatService::WriteCheatProcessMemory>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, WriteCheatProcessMemory),
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_QueryCheatProcessMemory, &DmntCheatService::QueryCheatProcessMemory>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, QueryCheatProcessMemory),
|
||||||
|
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_GetCheatCount, &DmntCheatService::GetCheatCount>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, GetCheatCount),
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_GetCheats, &DmntCheatService::GetCheats>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, GetCheats),
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_GetCheatById, &DmntCheatService::GetCheatById>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, GetCheatById),
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_ToggleCheat, &DmntCheatService::ToggleCheat>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, ToggleCheat),
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_AddCheat, &DmntCheatService::AddCheat>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, AddCheat),
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_RemoveCheat, &DmntCheatService::RemoveCheat>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, RemoveCheat),
|
||||||
|
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_GetFrozenAddressCount, &DmntCheatService::GetFrozenAddressCount>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, GetFrozenAddressCount),
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_GetFrozenAddresses, &DmntCheatService::GetFrozenAddresses>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, GetFrozenAddresses),
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_GetFrozenAddress, &DmntCheatService::GetFrozenAddress>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, GetFrozenAddress),
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_EnableFrozenAddress, &DmntCheatService::EnableFrozenAddress>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, EnableFrozenAddress),
|
||||||
MakeServiceCommandMeta<DmntCheat_Cmd_DisableFrozenAddress, &DmntCheatService::DisableFrozenAddress>(),
|
MAKE_SERVICE_COMMAND_META(DmntCheatService, DisableFrozenAddress),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,62 +18,62 @@
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
#include <stratosphere.hpp>
|
#include <stratosphere.hpp>
|
||||||
|
|
||||||
enum DmntCmd {
|
|
||||||
DebugMonitor_Cmd_BreakDebugProcess = 0,
|
|
||||||
DebugMonitor_Cmd_TerminateDebugProcess = 1,
|
|
||||||
DebugMonitor_Cmd_CloseHandle = 2,
|
|
||||||
DebugMonitor_Cmd_LoadImage = 3,
|
|
||||||
DebugMonitor_Cmd_GetProcessId = 4,
|
|
||||||
DebugMonitor_Cmd_GetProcessHandle = 5,
|
|
||||||
DebugMonitor_Cmd_WaitSynchronization = 6,
|
|
||||||
DebugMonitor_Cmd_GetDebugEvent = 7,
|
|
||||||
DebugMonitor_Cmd_GetProcessModuleInfo = 8,
|
|
||||||
DebugMonitor_Cmd_GetProcessList = 9,
|
|
||||||
DebugMonitor_Cmd_GetThreadList = 10,
|
|
||||||
DebugMonitor_Cmd_GetDebugThreadContext = 11,
|
|
||||||
DebugMonitor_Cmd_ContinueDebugEvent = 12,
|
|
||||||
DebugMonitor_Cmd_ReadDebugProcessMemory = 13,
|
|
||||||
DebugMonitor_Cmd_WriteDebugProcessMemory = 14,
|
|
||||||
DebugMonitor_Cmd_SetDebugThreadContext = 15,
|
|
||||||
DebugMonitor_Cmd_GetDebugThreadParam = 16,
|
|
||||||
DebugMonitor_Cmd_InitializeThreadInfo = 17,
|
|
||||||
DebugMonitor_Cmd_SetHardwareBreakPoint = 18,
|
|
||||||
DebugMonitor_Cmd_QueryDebugProcessMemory = 19,
|
|
||||||
DebugMonitor_Cmd_GetProcessMemoryDetails = 20,
|
|
||||||
DebugMonitor_Cmd_AttachByProgramId = 21,
|
|
||||||
DebugMonitor_Cmd_AttachOnLaunch = 22,
|
|
||||||
DebugMonitor_Cmd_GetDebugMonitorProcessId = 23,
|
|
||||||
DebugMonitor_Cmd_GetJitDebugProcessList = 25,
|
|
||||||
DebugMonitor_Cmd_CreateCoreDump = 26,
|
|
||||||
DebugMonitor_Cmd_GetAllDebugThreadInfo = 27,
|
|
||||||
DebugMonitor_Cmd_TargetIO_FileOpen = 29,
|
|
||||||
DebugMonitor_Cmd_TargetIO_FileClose = 30,
|
|
||||||
DebugMonitor_Cmd_TargetIO_FileRead = 31,
|
|
||||||
DebugMonitor_Cmd_TargetIO_FileWrite = 32,
|
|
||||||
DebugMonitor_Cmd_TargetIO_FileSetAttributes = 33,
|
|
||||||
DebugMonitor_Cmd_TargetIO_FileGetInformation = 34,
|
|
||||||
DebugMonitor_Cmd_TargetIO_FileSetTime = 35,
|
|
||||||
DebugMonitor_Cmd_TargetIO_FileSetSize = 36,
|
|
||||||
DebugMonitor_Cmd_TargetIO_FileDelete = 37,
|
|
||||||
DebugMonitor_Cmd_TargetIO_FileMove = 38,
|
|
||||||
DebugMonitor_Cmd_TargetIO_DirectoryCreate = 39,
|
|
||||||
DebugMonitor_Cmd_TargetIO_DirectoryDelete = 40,
|
|
||||||
DebugMonitor_Cmd_TargetIO_DirectoryRename = 41,
|
|
||||||
DebugMonitor_Cmd_TargetIO_DirectoryGetCount = 42,
|
|
||||||
DebugMonitor_Cmd_TargetIO_DirectoryOpen = 43,
|
|
||||||
DebugMonitor_Cmd_TargetIO_DirectoryGetNext = 44,
|
|
||||||
DebugMonitor_Cmd_TargetIO_DirectoryClose = 45,
|
|
||||||
DebugMonitor_Cmd_TargetIO_GetFreeSpace = 46,
|
|
||||||
DebugMonitor_Cmd_TargetIO_GetVolumeInformation = 47,
|
|
||||||
DebugMonitor_Cmd_InitiateCoreDump = 48,
|
|
||||||
DebugMonitor_Cmd_ContinueCoreDump = 49,
|
|
||||||
DebugMonitor_Cmd_AddTTYToCoreDump = 50,
|
|
||||||
DebugMonitor_Cmd_AddImageToCoreDump = 51,
|
|
||||||
DebugMonitor_Cmd_CloseCoreDump = 52,
|
|
||||||
DebugMonitor_Cmd_CancelAttach = 53,
|
|
||||||
};
|
|
||||||
|
|
||||||
class DebugMonitorService final : public IServiceObject {
|
class DebugMonitorService final : public IServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
BreakDebugProcess = 0,
|
||||||
|
TerminateDebugProcess = 1,
|
||||||
|
CloseHandle = 2,
|
||||||
|
LoadImage = 3,
|
||||||
|
GetProcessId = 4,
|
||||||
|
GetProcessHandle = 5,
|
||||||
|
WaitSynchronization = 6,
|
||||||
|
GetDebugEvent = 7,
|
||||||
|
GetProcessModuleInfo = 8,
|
||||||
|
GetProcessList = 9,
|
||||||
|
GetThreadList = 10,
|
||||||
|
GetDebugThreadContext = 11,
|
||||||
|
ContinueDebugEvent = 12,
|
||||||
|
ReadDebugProcessMemory = 13,
|
||||||
|
WriteDebugProcessMemory = 14,
|
||||||
|
SetDebugThreadContext = 15,
|
||||||
|
GetDebugThreadParam = 16,
|
||||||
|
InitializeThreadInfo = 17,
|
||||||
|
SetHardwareBreakPoint = 18,
|
||||||
|
QueryDebugProcessMemory = 19,
|
||||||
|
GetProcessMemoryDetails = 20,
|
||||||
|
AttachByProgramId = 21,
|
||||||
|
AttachOnLaunch = 22,
|
||||||
|
GetDebugMonitorProcessId = 23,
|
||||||
|
GetJitDebugProcessList = 25,
|
||||||
|
CreateCoreDump = 26,
|
||||||
|
GetAllDebugThreadInfo = 27,
|
||||||
|
TargetIO_FileOpen = 29,
|
||||||
|
TargetIO_FileClose = 30,
|
||||||
|
TargetIO_FileRead = 31,
|
||||||
|
TargetIO_FileWrite = 32,
|
||||||
|
TargetIO_FileSetAttributes = 33,
|
||||||
|
TargetIO_FileGetInformation = 34,
|
||||||
|
TargetIO_FileSetTime = 35,
|
||||||
|
TargetIO_FileSetSize = 36,
|
||||||
|
TargetIO_FileDelete = 37,
|
||||||
|
TargetIO_FileMove = 38,
|
||||||
|
TargetIO_DirectoryCreate = 39,
|
||||||
|
TargetIO_DirectoryDelete = 40,
|
||||||
|
TargetIO_DirectoryRename = 41,
|
||||||
|
TargetIO_DirectoryGetCount = 42,
|
||||||
|
TargetIO_DirectoryOpen = 43,
|
||||||
|
TargetIO_DirectoryGetNext = 44,
|
||||||
|
TargetIO_DirectoryClose = 45,
|
||||||
|
TargetIO_GetFreeSpace = 46,
|
||||||
|
TargetIO_GetVolumeInformation = 47,
|
||||||
|
InitiateCoreDump = 48,
|
||||||
|
ContinueCoreDump = 49,
|
||||||
|
AddTTYToCoreDump = 50,
|
||||||
|
AddImageToCoreDump = 51,
|
||||||
|
CloseCoreDump = 52,
|
||||||
|
CancelAttach = 53,
|
||||||
|
};
|
||||||
private:
|
private:
|
||||||
Result BreakDebugProcess(Handle debug_hnd);
|
Result BreakDebugProcess(Handle debug_hnd);
|
||||||
Result TerminateDebugProcess(Handle debug_hnd);
|
Result TerminateDebugProcess(Handle debug_hnd);
|
||||||
|
@ -94,57 +94,57 @@ class DebugMonitorService final : public IServiceObject {
|
||||||
Result TargetIO_FileMove(InBuffer<char> path0, InBuffer<char> path1);
|
Result TargetIO_FileMove(InBuffer<char> path0, InBuffer<char> path1);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<DebugMonitor_Cmd_BreakDebugProcess, &DebugMonitorService::BreakDebugProcess>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, BreakDebugProcess),
|
||||||
MakeServiceCommandMeta<DebugMonitor_Cmd_TerminateDebugProcess, &DebugMonitorService::TerminateDebugProcess>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, TerminateDebugProcess),
|
||||||
MakeServiceCommandMeta<DebugMonitor_Cmd_CloseHandle, &DebugMonitorService::CloseHandle>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, CloseHandle),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_LoadImage, &DebugMonitorService::LoadImage>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, LoadImage),
|
||||||
MakeServiceCommandMeta<DebugMonitor_Cmd_GetProcessId, &DebugMonitorService::GetProcessId>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, GetProcessId),
|
||||||
MakeServiceCommandMeta<DebugMonitor_Cmd_GetProcessHandle, &DebugMonitorService::GetProcessHandle>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, GetProcessHandle),
|
||||||
MakeServiceCommandMeta<DebugMonitor_Cmd_WaitSynchronization, &DebugMonitorService::WaitSynchronization>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, WaitSynchronization),
|
||||||
//MakeServiceCommandMeta<DebugMonitor_Cmd_GetDebugEvent, &DebugMonitorService::GetDebugEvent>(),
|
//MAKE_SERVICE_COMMAND_META(DebugMonitorService, GetDebugEvent),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_GetProcessModuleInfo, &DebugMonitorService::GetProcessModuleInfo>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, GetProcessModuleInfo),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_GetProcessList, &DebugMonitorService::GetProcessList>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, GetProcessList),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_GetThreadList, &DebugMonitorService::GetThreadList>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, GetThreadList),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_GetDebugThreadContext, &DebugMonitorService::GetDebugThreadContext>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, GetDebugThreadContext),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_ContinueDebugEvent, &DebugMonitorService::ContinueDebugEvent>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, ContinueDebugEvent),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_ReadDebugProcessMemory, &DebugMonitorService::ReadDebugProcessMemory>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, ReadDebugProcessMemory),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_WriteDebugProcessMemory, &DebugMonitorService::WriteDebugProcessMemory>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, WriteDebugProcessMemory),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_SetDebugThreadContext, &DebugMonitorService::SetDebugThreadContext>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, SetDebugThreadContext),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_GetDebugThreadParam, &DebugMonitorService::GetDebugThreadParam>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, GetDebugThreadParam),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_InitializeThreadInfo, &DebugMonitorService::InitializeThreadInfo>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, InitializeThreadInfo),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_SetHardwareBreakPoint, &DebugMonitorService::SetHardwareBreakPoint>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, SetHardwareBreakPoint),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_QueryDebugProcessMemory, &DebugMonitorService::QueryDebugProcessMemory>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, QueryDebugProcessMemory),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_GetProcessMemoryDetails, &DebugMonitorService::GetProcessMemoryDetails>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, GetProcessMemoryDetails),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_AttachByProgramId, &DebugMonitorService::AttachByProgramId>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, AttachByProgramId),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_AttachOnLaunch, &DebugMonitorService::AttachOnLaunch>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, AttachOnLaunch),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_GetDebugMonitorProcessId, &DebugMonitorService::GetDebugMonitorProcessId>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, GetDebugMonitorProcessId),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_GetJitDebugProcessList, &DebugMonitorService::GetJitDebugProcessList>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, GetJitDebugProcessList),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_CreateCoreDump, &DebugMonitorService::CreateCoreDump>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, CreateCoreDump),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_GetAllDebugThreadInfo, &DebugMonitorService::GetAllDebugThreadInfo>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, GetAllDebugThreadInfo),
|
||||||
MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_FileOpen, &DebugMonitorService::TargetIO_FileOpen>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_FileOpen),
|
||||||
MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_FileClose, &DebugMonitorService::TargetIO_FileClose>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_FileClose),
|
||||||
MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_FileRead, &DebugMonitorService::TargetIO_FileRead>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_FileRead),
|
||||||
MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_FileWrite, &DebugMonitorService::TargetIO_FileWrite>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_FileWrite),
|
||||||
MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_FileSetAttributes, &DebugMonitorService::TargetIO_FileSetAttributes>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_FileSetAttributes),
|
||||||
MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_FileGetInformation, &DebugMonitorService::TargetIO_FileGetInformation>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_FileGetInformation),
|
||||||
MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_FileSetTime, &DebugMonitorService::TargetIO_FileSetTime>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_FileSetTime),
|
||||||
MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_FileSetSize, &DebugMonitorService::TargetIO_FileSetSize>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_FileSetSize),
|
||||||
MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_FileDelete, &DebugMonitorService::TargetIO_FileDelete>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_FileDelete),
|
||||||
MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_FileMove, &DebugMonitorService::TargetIO_FileMove>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_FileMove),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_DirectoryCreate, &DebugMonitorService::TargetIO_DirectoryCreate>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_DirectoryCreate),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_DirectoryDelete, &DebugMonitorService::TargetIO_DirectoryDelete>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_DirectoryDelete),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_DirectoryRename, &DebugMonitorService::TargetIO_DirectoryRename>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_DirectoryRename),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_DirectoryGetCount, &DebugMonitorService::TargetIO_DirectoryGetCount>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_DirectoryGetCount),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_DirectoryOpen, &DebugMonitorService::TargetIO_DirectoryOpen>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_DirectoryOpen),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_DirectoryGetNext, &DebugMonitorService::TargetIO_DirectoryGetNext>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_DirectoryGetNext),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_DirectoryClose, &DebugMonitorService::TargetIO_DirectoryClose>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_DirectoryClose),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_GetFreeSpace, &DebugMonitorService::TargetIO_GetFreeSpace>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_GetFreeSpace),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_TargetIO_GetVolumeInformation, &DebugMonitorService::TargetIO_GetVolumeInformation>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, TargetIO_GetVolumeInformation),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_InitiateCoreDump, &DebugMonitorService::InitiateCoreDump>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, InitiateCoreDump),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_ContinueCoreDump, &DebugMonitorService::ContinueCoreDump>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, ContinueCoreDump),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_AddTTYToCoreDump, &DebugMonitorService::AddTTYToCoreDump>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, AddTTYToCoreDump),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_AddImageToCoreDump, &DebugMonitorService::AddImageToCoreDump>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, AddImageToCoreDump),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_CloseCoreDump, &DebugMonitorService::CloseCoreDump>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, CloseCoreDump),
|
||||||
// MakeServiceCommandMeta<DebugMonitor_Cmd_CancelAttach, &DebugMonitorService::CancelAttach>(),
|
// MAKE_SERVICE_COMMAND_META(DebugMonitorService, CancelAttach),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,16 +18,16 @@
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
#include <stratosphere.hpp>
|
#include <stratosphere.hpp>
|
||||||
|
|
||||||
enum PrivateCmd {
|
|
||||||
Private_Cmd_GetFatalEvent = 0,
|
|
||||||
};
|
|
||||||
|
|
||||||
class PrivateService final : public IServiceObject {
|
class PrivateService final : public IServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
GetFatalEvent = 0,
|
||||||
|
};
|
||||||
private:
|
private:
|
||||||
/* Actual commands. */
|
/* Actual commands. */
|
||||||
Result GetFatalEvent(Out<CopiedHandle> out_h);
|
Result GetFatalEvent(Out<CopiedHandle> out_h);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<Private_Cmd_GetFatalEvent, &PrivateService::GetFatalEvent>(),
|
MAKE_SERVICE_COMMAND_META(PrivateService, GetFatalEvent),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,13 +20,13 @@
|
||||||
|
|
||||||
#include "fatal_types.hpp"
|
#include "fatal_types.hpp"
|
||||||
|
|
||||||
enum UserCmd {
|
|
||||||
User_Cmd_ThrowFatal = 0,
|
|
||||||
User_Cmd_ThrowFatalWithPolicy = 1,
|
|
||||||
User_Cmd_ThrowFatalWithCpuContext = 2,
|
|
||||||
};
|
|
||||||
|
|
||||||
class UserService final : public IServiceObject {
|
class UserService final : public IServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
ThrowFatal = 0,
|
||||||
|
ThrowFatalWithPolicy = 1,
|
||||||
|
ThrowFatalWithCpuContext = 2,
|
||||||
|
};
|
||||||
private:
|
private:
|
||||||
/* Actual commands. */
|
/* Actual commands. */
|
||||||
Result ThrowFatal(u32 error, PidDescriptor pid_desc);
|
Result ThrowFatal(u32 error, PidDescriptor pid_desc);
|
||||||
|
@ -34,8 +34,8 @@ class UserService final : public IServiceObject {
|
||||||
Result ThrowFatalWithCpuContext(u32 error, PidDescriptor pid_desc, FatalType policy, InBuffer<u8> _ctx);
|
Result ThrowFatalWithCpuContext(u32 error, PidDescriptor pid_desc, FatalType policy, InBuffer<u8> _ctx);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<User_Cmd_ThrowFatal, &UserService::ThrowFatal>(),
|
MAKE_SERVICE_COMMAND_META(UserService, ThrowFatal),
|
||||||
MakeServiceCommandMeta<User_Cmd_ThrowFatalWithPolicy, &UserService::ThrowFatalWithPolicy>(),
|
MAKE_SERVICE_COMMAND_META(UserService, ThrowFatalWithPolicy),
|
||||||
MakeServiceCommandMeta<User_Cmd_ThrowFatalWithCpuContext, &UserService::ThrowFatalWithCpuContext>(),
|
MAKE_SERVICE_COMMAND_META(UserService, ThrowFatalWithCpuContext),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 403f1c7a014c47bf7e907da04df9f9b591b9f89f
|
Subproject commit 3f6df380c8becb4ba0a013cf0533364163a741d8
|
|
@ -56,12 +56,12 @@ namespace sts::ldr {
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMetaEx<CommandId::CreateProcess, &ProcessManagerInterface::CreateProcess, ProcessManagerInterface>(),
|
MAKE_SERVICE_COMMAND_META(ProcessManagerInterface, CreateProcess),
|
||||||
MakeServiceCommandMetaEx<CommandId::GetProgramInfo, &ProcessManagerInterface::GetProgramInfo, ProcessManagerInterface>(),
|
MAKE_SERVICE_COMMAND_META(ProcessManagerInterface, GetProgramInfo),
|
||||||
MakeServiceCommandMetaEx<CommandId::PinTitle, &ProcessManagerInterface::PinTitle, ProcessManagerInterface>(),
|
MAKE_SERVICE_COMMAND_META(ProcessManagerInterface, PinTitle),
|
||||||
MakeServiceCommandMetaEx<CommandId::UnpinTitle, &ProcessManagerInterface::UnpinTitle, ProcessManagerInterface>(),
|
MAKE_SERVICE_COMMAND_META(ProcessManagerInterface, UnpinTitle),
|
||||||
|
|
||||||
MakeServiceCommandMetaEx<CommandId::AtmosphereHasLaunchedTitle, &ProcessManagerInterface::AtmosphereHasLaunchedTitle, ProcessManagerInterface>(),
|
MAKE_SERVICE_COMMAND_META(ProcessManagerInterface, AtmosphereHasLaunchedTitle),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -80,11 +80,11 @@ namespace sts::ldr {
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMetaEx<CommandId::SetTitleArguments, &DebugMonitorInterface::SetTitleArguments, DebugMonitorInterface>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorInterface, SetTitleArguments),
|
||||||
MakeServiceCommandMetaEx<CommandId::ClearArguments, &DebugMonitorInterface::ClearArguments, DebugMonitorInterface>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorInterface, ClearArguments),
|
||||||
MakeServiceCommandMetaEx<CommandId::GetProcessModuleInfo, &DebugMonitorInterface::GetProcessModuleInfo, DebugMonitorInterface>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorInterface, GetProcessModuleInfo),
|
||||||
|
|
||||||
MakeServiceCommandMetaEx<CommandId::AtmosphereHasLaunchedTitle, &DebugMonitorInterface::AtmosphereHasLaunchedTitle, DebugMonitorInterface>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorInterface, AtmosphereHasLaunchedTitle),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -103,11 +103,11 @@ namespace sts::ldr {
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMetaEx<CommandId::SetTitleArguments, &ShellInterface::SetTitleArguments, ShellInterface>(),
|
MAKE_SERVICE_COMMAND_META(ShellInterface, SetTitleArguments),
|
||||||
MakeServiceCommandMetaEx<CommandId::ClearArguments, &ShellInterface::ClearArguments, ShellInterface>(),
|
MAKE_SERVICE_COMMAND_META(ShellInterface, ClearArguments),
|
||||||
|
|
||||||
MakeServiceCommandMetaEx<CommandId::AtmosphereSetExternalContentSource, &ShellInterface::AtmosphereSetExternalContentSource, ShellInterface>(),
|
MAKE_SERVICE_COMMAND_META(ShellInterface, AtmosphereSetExternalContentSource),
|
||||||
MakeServiceCommandMetaEx<CommandId::AtmosphereClearExternalContentSource, &ShellInterface::AtmosphereClearExternalContentSource, ShellInterface>(),
|
MAKE_SERVICE_COMMAND_META(ShellInterface, AtmosphereClearExternalContentSource),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
#include <stratosphere.hpp>
|
#include <stratosphere.hpp>
|
||||||
|
|
||||||
enum BootModeCmd {
|
|
||||||
BootMode_Cmd_GetBootMode = 0,
|
|
||||||
BootMode_Cmd_SetMaintenanceBoot = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
class BootModeService final : public IServiceObject {
|
class BootModeService final : public IServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
GetBootMode = 0,
|
||||||
|
SetMaintenanceBoot = 1,
|
||||||
|
};
|
||||||
private:
|
private:
|
||||||
/* Actual commands. */
|
/* Actual commands. */
|
||||||
void GetBootMode(Out<u32> out);
|
void GetBootMode(Out<u32> out);
|
||||||
|
@ -32,7 +32,7 @@ class BootModeService final : public IServiceObject {
|
||||||
static void SetMaintenanceBootForEmbeddedBoot2();
|
static void SetMaintenanceBootForEmbeddedBoot2();
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<BootMode_Cmd_GetBootMode, &BootModeService::GetBootMode>(),
|
MAKE_SERVICE_COMMAND_META(BootModeService, GetBootMode),
|
||||||
MakeServiceCommandMeta<BootMode_Cmd_SetMaintenanceBoot, &BootModeService::SetMaintenanceBoot>(),
|
MAKE_SERVICE_COMMAND_META(BootModeService, SetMaintenanceBoot),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,30 +20,23 @@
|
||||||
|
|
||||||
#include "pm_registration.hpp"
|
#include "pm_registration.hpp"
|
||||||
|
|
||||||
enum DmntCmd {
|
/* Represents modern DebugMonitorService (5.0.0+) */
|
||||||
Dmnt_Cmd_GetUnknownStub = 0,
|
class DebugMonitorService : public IServiceObject {
|
||||||
Dmnt_Cmd_GetDebugProcessIds = 1,
|
|
||||||
Dmnt_Cmd_LaunchDebugProcess = 2,
|
|
||||||
Dmnt_Cmd_GetTitleProcessId = 3,
|
|
||||||
Dmnt_Cmd_EnableDebugForTitleId = 4,
|
|
||||||
Dmnt_Cmd_GetApplicationProcessId = 5,
|
|
||||||
Dmnt_Cmd_EnableDebugForApplication = 6,
|
|
||||||
|
|
||||||
Dmnt_Cmd_5X_GetDebugProcessIds = 0,
|
|
||||||
Dmnt_Cmd_5X_LaunchDebugProcess = 1,
|
|
||||||
Dmnt_Cmd_5X_GetTitleProcessId = 2,
|
|
||||||
Dmnt_Cmd_5X_EnableDebugForTitleId = 3,
|
|
||||||
Dmnt_Cmd_5X_GetApplicationProcessId = 4,
|
|
||||||
Dmnt_Cmd_5X_EnableDebugForApplication = 5,
|
|
||||||
|
|
||||||
Dmnt_Cmd_6X_DisableDebug = 6,
|
|
||||||
|
|
||||||
Dmnt_Cmd_AtmosphereGetProcessInfo = 65000,
|
|
||||||
Dmnt_Cmd_AtmosphereGetCurrentLimitInfo = 65001,
|
|
||||||
};
|
|
||||||
|
|
||||||
class DebugMonitorService final : public IServiceObject {
|
|
||||||
private:
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
GetDebugProcessIds = 0,
|
||||||
|
LaunchDebugProcess = 1,
|
||||||
|
GetTitleProcessId = 2,
|
||||||
|
EnableDebugForTitleId = 3,
|
||||||
|
GetApplicationProcessId = 4,
|
||||||
|
EnableDebugForApplication = 5,
|
||||||
|
|
||||||
|
DisableDebug = 6,
|
||||||
|
|
||||||
|
AtmosphereGetProcessInfo = 65000,
|
||||||
|
AtmosphereGetCurrentLimitInfo = 65001,
|
||||||
|
};
|
||||||
|
protected:
|
||||||
/* Actual commands. */
|
/* Actual commands. */
|
||||||
Result GetUnknownStub(Out<u32> count, OutBuffer<u8> out_buf, u64 in_unk);
|
Result GetUnknownStub(Out<u32> count, OutBuffer<u8> out_buf, u64 in_unk);
|
||||||
Result GetDebugProcessIds(Out<u32> count, OutBuffer<u64> out_pids);
|
Result GetDebugProcessIds(Out<u32> count, OutBuffer<u64> out_pids);
|
||||||
|
@ -59,28 +52,51 @@ class DebugMonitorService final : public IServiceObject {
|
||||||
Result AtmosphereGetCurrentLimitInfo(Out<u64> cur_val, Out<u64> lim_val, u32 category, u32 resource);
|
Result AtmosphereGetCurrentLimitInfo(Out<u64> cur_val, Out<u64> lim_val, u32 category, u32 resource);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
/* 1.0.0-4.1.0 */
|
|
||||||
MakeServiceCommandMeta<Dmnt_Cmd_GetUnknownStub, &DebugMonitorService::GetUnknownStub, FirmwareVersion_Min, FirmwareVersion_400>(),
|
|
||||||
MakeServiceCommandMeta<Dmnt_Cmd_GetDebugProcessIds, &DebugMonitorService::GetDebugProcessIds, FirmwareVersion_Min, FirmwareVersion_400>(),
|
|
||||||
MakeServiceCommandMeta<Dmnt_Cmd_LaunchDebugProcess, &DebugMonitorService::LaunchDebugProcess, FirmwareVersion_Min, FirmwareVersion_400>(),
|
|
||||||
MakeServiceCommandMeta<Dmnt_Cmd_GetTitleProcessId, &DebugMonitorService::GetTitleProcessId, FirmwareVersion_Min, FirmwareVersion_400>(),
|
|
||||||
MakeServiceCommandMeta<Dmnt_Cmd_EnableDebugForTitleId, &DebugMonitorService::EnableDebugForTitleId, FirmwareVersion_Min, FirmwareVersion_400>(),
|
|
||||||
MakeServiceCommandMeta<Dmnt_Cmd_GetApplicationProcessId, &DebugMonitorService::GetApplicationProcessId, FirmwareVersion_Min, FirmwareVersion_400>(),
|
|
||||||
MakeServiceCommandMeta<Dmnt_Cmd_EnableDebugForApplication, &DebugMonitorService::EnableDebugForApplication, FirmwareVersion_Min, FirmwareVersion_400>(),
|
|
||||||
|
|
||||||
/* 5.0.0-* */
|
/* 5.0.0-* */
|
||||||
MakeServiceCommandMeta<Dmnt_Cmd_5X_GetDebugProcessIds, &DebugMonitorService::GetDebugProcessIds, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, GetDebugProcessIds),
|
||||||
MakeServiceCommandMeta<Dmnt_Cmd_5X_LaunchDebugProcess, &DebugMonitorService::LaunchDebugProcess, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, LaunchDebugProcess),
|
||||||
MakeServiceCommandMeta<Dmnt_Cmd_5X_GetTitleProcessId, &DebugMonitorService::GetTitleProcessId, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, GetTitleProcessId),
|
||||||
MakeServiceCommandMeta<Dmnt_Cmd_5X_EnableDebugForTitleId, &DebugMonitorService::EnableDebugForTitleId, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, EnableDebugForTitleId),
|
||||||
MakeServiceCommandMeta<Dmnt_Cmd_5X_GetApplicationProcessId, &DebugMonitorService::GetApplicationProcessId, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, GetApplicationProcessId),
|
||||||
MakeServiceCommandMeta<Dmnt_Cmd_5X_EnableDebugForApplication, &DebugMonitorService::EnableDebugForApplication, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, EnableDebugForApplication),
|
||||||
|
|
||||||
/* 6.0.0-* */
|
/* 6.0.0-* */
|
||||||
MakeServiceCommandMeta<Dmnt_Cmd_6X_DisableDebug, &DebugMonitorService::DisableDebug, FirmwareVersion_600>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, DisableDebug, FirmwareVersion_600),
|
||||||
|
|
||||||
/* Atmosphere extensions. */
|
/* Atmosphere extensions. */
|
||||||
MakeServiceCommandMeta<Dmnt_Cmd_AtmosphereGetProcessInfo, &DebugMonitorService::AtmosphereGetProcessInfo>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, AtmosphereGetProcessInfo),
|
||||||
MakeServiceCommandMeta<Dmnt_Cmd_AtmosphereGetCurrentLimitInfo, &DebugMonitorService::AtmosphereGetCurrentLimitInfo>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, AtmosphereGetCurrentLimitInfo),
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Represents deprecated DebugMonitorService (1.0.0-4.1.0). */
|
||||||
|
class DebugMonitorServiceDeprecated : public DebugMonitorService {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
GetUnknownStub = 0,
|
||||||
|
GetDebugProcessIds = 1,
|
||||||
|
LaunchDebugProcess = 2,
|
||||||
|
GetTitleProcessId = 3,
|
||||||
|
EnableDebugForTitleId = 4,
|
||||||
|
GetApplicationProcessId = 5,
|
||||||
|
EnableDebugForApplication = 6,
|
||||||
|
|
||||||
|
AtmosphereGetProcessInfo = 65000,
|
||||||
|
AtmosphereGetCurrentLimitInfo = 65001,
|
||||||
|
};
|
||||||
|
public:
|
||||||
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
|
/* 1.0.0-4.1.0 */
|
||||||
|
MAKE_SERVICE_COMMAND_META(DebugMonitorServiceDeprecated, GetUnknownStub),
|
||||||
|
MAKE_SERVICE_COMMAND_META(DebugMonitorServiceDeprecated, GetDebugProcessIds),
|
||||||
|
MAKE_SERVICE_COMMAND_META(DebugMonitorServiceDeprecated, LaunchDebugProcess),
|
||||||
|
MAKE_SERVICE_COMMAND_META(DebugMonitorServiceDeprecated, GetTitleProcessId),
|
||||||
|
MAKE_SERVICE_COMMAND_META(DebugMonitorServiceDeprecated, EnableDebugForTitleId),
|
||||||
|
MAKE_SERVICE_COMMAND_META(DebugMonitorServiceDeprecated, GetApplicationProcessId),
|
||||||
|
MAKE_SERVICE_COMMAND_META(DebugMonitorServiceDeprecated, EnableDebugForApplication),
|
||||||
|
|
||||||
|
/* Atmosphere extensions. */
|
||||||
|
MAKE_SERVICE_COMMAND_META(DebugMonitorServiceDeprecated, AtmosphereGetProcessInfo),
|
||||||
|
MAKE_SERVICE_COMMAND_META(DebugMonitorServiceDeprecated, AtmosphereGetCurrentLimitInfo),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,14 +18,13 @@
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
#include <stratosphere.hpp>
|
#include <stratosphere.hpp>
|
||||||
|
|
||||||
enum InformationCmd {
|
|
||||||
Information_Cmd_GetTitleId = 0,
|
|
||||||
|
|
||||||
Information_Cmd_AtmosphereGetProcessId = 65000,
|
|
||||||
Information_Cmd_AtmosphereHasCreatedTitle = 65001,
|
|
||||||
};
|
|
||||||
|
|
||||||
class InformationService final : public IServiceObject {
|
class InformationService final : public IServiceObject {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
GetTitleId = 0,
|
||||||
|
AtmosphereGetProcessId = 65000,
|
||||||
|
AtmosphereHasLaunchedTitle = 65001,
|
||||||
|
};
|
||||||
private:
|
private:
|
||||||
/* Actual commands. */
|
/* Actual commands. */
|
||||||
Result GetTitleId(Out<u64> tid, u64 pid);
|
Result GetTitleId(Out<u64> tid, u64 pid);
|
||||||
|
@ -35,8 +34,8 @@ class InformationService final : public IServiceObject {
|
||||||
Result AtmosphereHasLaunchedTitle(Out<bool> out, u64 tid);
|
Result AtmosphereHasLaunchedTitle(Out<bool> out, u64 tid);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<Information_Cmd_GetTitleId, &InformationService::GetTitleId>(),
|
MAKE_SERVICE_COMMAND_META(InformationService, GetTitleId),
|
||||||
MakeServiceCommandMeta<Information_Cmd_AtmosphereGetProcessId, &InformationService::AtmosphereGetProcessId>(),
|
MAKE_SERVICE_COMMAND_META(InformationService, AtmosphereGetProcessId),
|
||||||
MakeServiceCommandMeta<Information_Cmd_AtmosphereHasCreatedTitle, &InformationService::AtmosphereHasLaunchedTitle>(),
|
MAKE_SERVICE_COMMAND_META(InformationService, AtmosphereHasLaunchedTitle),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -142,8 +142,13 @@ int main(int argc, char **argv)
|
||||||
static auto s_server_manager = WaitableManager(1);
|
static auto s_server_manager = WaitableManager(1);
|
||||||
|
|
||||||
/* TODO: Create services. */
|
/* TODO: Create services. */
|
||||||
s_server_manager.AddWaitable(new ServiceServer<ShellService>("pm:shell", 3));
|
if (GetRuntimeFirmwareVersion() <= FirmwareVersion_400) {
|
||||||
s_server_manager.AddWaitable(new ServiceServer<DebugMonitorService>("pm:dmnt", 3));
|
s_server_manager.AddWaitable(new ServiceServer<ShellServiceDeprecated>("pm:shell", 3));
|
||||||
|
s_server_manager.AddWaitable(new ServiceServer<DebugMonitorServiceDeprecated>("pm:dmnt", 3));
|
||||||
|
} else {
|
||||||
|
s_server_manager.AddWaitable(new ServiceServer<ShellService>("pm:shell", 3));
|
||||||
|
s_server_manager.AddWaitable(new ServiceServer<DebugMonitorService>("pm:dmnt", 3));
|
||||||
|
}
|
||||||
s_server_manager.AddWaitable(new ServiceServer<BootModeService>("pm:bm", 6));
|
s_server_manager.AddWaitable(new ServiceServer<BootModeService>("pm:bm", 6));
|
||||||
s_server_manager.AddWaitable(new ServiceServer<InformationService>("pm:info", 19));
|
s_server_manager.AddWaitable(new ServiceServer<InformationService>("pm:info", 19));
|
||||||
|
|
||||||
|
|
|
@ -20,35 +20,22 @@
|
||||||
|
|
||||||
#include "pm_registration.hpp"
|
#include "pm_registration.hpp"
|
||||||
|
|
||||||
enum ShellCmd {
|
/* Represents modern ShellService (5.0.0+) */
|
||||||
Shell_Cmd_LaunchProcess = 0,
|
class ShellService : public IServiceObject {
|
||||||
Shell_Cmd_TerminateProcessId = 1,
|
|
||||||
Shell_Cmd_TerminateTitleId = 2,
|
|
||||||
Shell_Cmd_GetProcessWaitEvent = 3,
|
|
||||||
Shell_Cmd_GetProcessEventType = 4,
|
|
||||||
Shell_Cmd_FinalizeExitedProcess = 5,
|
|
||||||
Shell_Cmd_ClearProcessNotificationFlag = 6,
|
|
||||||
Shell_Cmd_NotifyBootFinished = 7,
|
|
||||||
Shell_Cmd_GetApplicationProcessId = 8,
|
|
||||||
Shell_Cmd_BoostSystemMemoryResourceLimit = 9
|
|
||||||
};
|
|
||||||
|
|
||||||
enum ShellCmd_5X {
|
|
||||||
Shell_Cmd_5X_LaunchProcess = 0,
|
|
||||||
Shell_Cmd_5X_TerminateProcessId = 1,
|
|
||||||
Shell_Cmd_5X_TerminateTitleId = 2,
|
|
||||||
Shell_Cmd_5X_GetProcessWaitEvent = 3,
|
|
||||||
Shell_Cmd_5X_GetProcessEventType = 4,
|
|
||||||
Shell_Cmd_5X_NotifyBootFinished = 5,
|
|
||||||
Shell_Cmd_5X_GetApplicationProcessId = 6,
|
|
||||||
Shell_Cmd_5X_BoostSystemMemoryResourceLimit = 7,
|
|
||||||
|
|
||||||
Shell_Cmd_BoostSystemThreadsResourceLimit = 8,
|
|
||||||
Shell_Cmd_GetBootFinishedEvent = 9,
|
|
||||||
};
|
|
||||||
|
|
||||||
class ShellService final : public IServiceObject {
|
|
||||||
private:
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
LaunchProcess = 0,
|
||||||
|
TerminateProcessId = 1,
|
||||||
|
TerminateTitleId = 2,
|
||||||
|
GetProcessWaitEvent = 3,
|
||||||
|
GetProcessEventType = 4,
|
||||||
|
NotifyBootFinished = 5,
|
||||||
|
GetApplicationProcessId = 6,
|
||||||
|
BoostSystemMemoryResourceLimit = 7,
|
||||||
|
BoostSystemThreadsResourceLimit = 8,
|
||||||
|
GetBootFinishedEvent = 9,
|
||||||
|
};
|
||||||
|
protected:
|
||||||
/* Actual commands. */
|
/* Actual commands. */
|
||||||
Result LaunchProcess(Out<u64> pid, Registration::TidSid tid_sid, u32 launch_flags);
|
Result LaunchProcess(Out<u64> pid, Registration::TidSid tid_sid, u32 launch_flags);
|
||||||
Result TerminateProcessId(u64 pid);
|
Result TerminateProcessId(u64 pid);
|
||||||
|
@ -64,34 +51,53 @@ class ShellService final : public IServiceObject {
|
||||||
void GetBootFinishedEvent(Out<CopiedHandle> event);
|
void GetBootFinishedEvent(Out<CopiedHandle> event);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
/* 1.0.0-4.0.0 */
|
|
||||||
MakeServiceCommandMeta<Shell_Cmd_LaunchProcess, &ShellService::LaunchProcess, FirmwareVersion_Min, FirmwareVersion_400>(),
|
|
||||||
MakeServiceCommandMeta<Shell_Cmd_TerminateProcessId, &ShellService::TerminateProcessId, FirmwareVersion_Min, FirmwareVersion_400>(),
|
|
||||||
MakeServiceCommandMeta<Shell_Cmd_TerminateTitleId, &ShellService::TerminateTitleId, FirmwareVersion_Min, FirmwareVersion_400>(),
|
|
||||||
MakeServiceCommandMeta<Shell_Cmd_GetProcessWaitEvent, &ShellService::GetProcessWaitEvent, FirmwareVersion_Min, FirmwareVersion_400>(),
|
|
||||||
MakeServiceCommandMeta<Shell_Cmd_GetProcessEventType, &ShellService::GetProcessEventType, FirmwareVersion_Min, FirmwareVersion_400>(),
|
|
||||||
MakeServiceCommandMeta<Shell_Cmd_FinalizeExitedProcess, &ShellService::FinalizeExitedProcess, FirmwareVersion_Min, FirmwareVersion_400>(),
|
|
||||||
MakeServiceCommandMeta<Shell_Cmd_ClearProcessNotificationFlag, &ShellService::ClearProcessNotificationFlag, FirmwareVersion_Min, FirmwareVersion_400>(),
|
|
||||||
MakeServiceCommandMeta<Shell_Cmd_NotifyBootFinished, &ShellService::NotifyBootFinished, FirmwareVersion_Min, FirmwareVersion_400>(),
|
|
||||||
MakeServiceCommandMeta<Shell_Cmd_GetApplicationProcessId, &ShellService::GetApplicationProcessId, FirmwareVersion_Min, FirmwareVersion_400>(),
|
|
||||||
|
|
||||||
/* 4.0.0-4.0.0 */
|
|
||||||
MakeServiceCommandMeta<Shell_Cmd_BoostSystemMemoryResourceLimit, &ShellService::BoostSystemMemoryResourceLimit, FirmwareVersion_400, FirmwareVersion_400>(),
|
|
||||||
|
|
||||||
/* 5.0.0-* */
|
/* 5.0.0-* */
|
||||||
MakeServiceCommandMeta<Shell_Cmd_5X_LaunchProcess, &ShellService::LaunchProcess, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(ShellService, LaunchProcess),
|
||||||
MakeServiceCommandMeta<Shell_Cmd_5X_TerminateProcessId, &ShellService::TerminateProcessId, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(ShellService, TerminateProcessId),
|
||||||
MakeServiceCommandMeta<Shell_Cmd_5X_TerminateTitleId, &ShellService::TerminateTitleId, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(ShellService, TerminateTitleId),
|
||||||
MakeServiceCommandMeta<Shell_Cmd_5X_GetProcessWaitEvent, &ShellService::GetProcessWaitEvent, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(ShellService, GetProcessWaitEvent),
|
||||||
MakeServiceCommandMeta<Shell_Cmd_5X_GetProcessEventType, &ShellService::GetProcessEventType, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(ShellService, GetProcessEventType),
|
||||||
MakeServiceCommandMeta<Shell_Cmd_5X_NotifyBootFinished, &ShellService::NotifyBootFinished, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(ShellService, NotifyBootFinished),
|
||||||
MakeServiceCommandMeta<Shell_Cmd_5X_GetApplicationProcessId, &ShellService::GetApplicationProcessId, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(ShellService, GetApplicationProcessId),
|
||||||
MakeServiceCommandMeta<Shell_Cmd_5X_BoostSystemMemoryResourceLimit, &ShellService::BoostSystemMemoryResourceLimit, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(ShellService, BoostSystemMemoryResourceLimit),
|
||||||
|
|
||||||
/* 7.0.0-* */
|
/* 7.0.0-* */
|
||||||
MakeServiceCommandMeta<Shell_Cmd_BoostSystemThreadsResourceLimit, &ShellService::BoostSystemThreadsResourceLimit, FirmwareVersion_700>(),
|
MAKE_SERVICE_COMMAND_META(ShellService, BoostSystemThreadsResourceLimit, FirmwareVersion_700),
|
||||||
|
|
||||||
/* 8.0.0-* */
|
/* 8.0.0-* */
|
||||||
MakeServiceCommandMeta<Shell_Cmd_GetBootFinishedEvent, &ShellService::GetBootFinishedEvent, FirmwareVersion_800>(),
|
MAKE_SERVICE_COMMAND_META(ShellService, GetBootFinishedEvent, FirmwareVersion_800),
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Represents deprecated ShellService (1.0.0-4.1.0). */
|
||||||
|
class ShellServiceDeprecated : public ShellService {
|
||||||
|
private:
|
||||||
|
enum class CommandId {
|
||||||
|
LaunchProcess = 0,
|
||||||
|
TerminateProcessId = 1,
|
||||||
|
TerminateTitleId = 2,
|
||||||
|
GetProcessWaitEvent = 3,
|
||||||
|
GetProcessEventType = 4,
|
||||||
|
FinalizeExitedProcess = 5,
|
||||||
|
ClearProcessNotificationFlag = 6,
|
||||||
|
NotifyBootFinished = 7,
|
||||||
|
GetApplicationProcessId = 8,
|
||||||
|
BoostSystemMemoryResourceLimit = 9,
|
||||||
|
};
|
||||||
|
public:
|
||||||
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
|
/* 1.0.0- */
|
||||||
|
MAKE_SERVICE_COMMAND_META(ShellServiceDeprecated, LaunchProcess),
|
||||||
|
MAKE_SERVICE_COMMAND_META(ShellServiceDeprecated, TerminateProcessId),
|
||||||
|
MAKE_SERVICE_COMMAND_META(ShellServiceDeprecated, TerminateTitleId),
|
||||||
|
MAKE_SERVICE_COMMAND_META(ShellServiceDeprecated, GetProcessWaitEvent),
|
||||||
|
MAKE_SERVICE_COMMAND_META(ShellServiceDeprecated, GetProcessEventType),
|
||||||
|
MAKE_SERVICE_COMMAND_META(ShellServiceDeprecated, FinalizeExitedProcess),
|
||||||
|
MAKE_SERVICE_COMMAND_META(ShellServiceDeprecated, ClearProcessNotificationFlag),
|
||||||
|
MAKE_SERVICE_COMMAND_META(ShellServiceDeprecated, NotifyBootFinished),
|
||||||
|
MAKE_SERVICE_COMMAND_META(ShellServiceDeprecated, GetApplicationProcessId),
|
||||||
|
|
||||||
|
/* 4.0.0- */
|
||||||
|
MAKE_SERVICE_COMMAND_META(ShellServiceDeprecated, BoostSystemMemoryResourceLimit, FirmwareVersion_400),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace sts::ro {
|
||||||
Result GetProcessModuleInfo(Out<u32> count, OutBuffer<LoaderModuleInfo> out_infos, u64 pid);
|
Result GetProcessModuleInfo(Out<u32> count, OutBuffer<LoaderModuleInfo> out_infos, u64 pid);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<CommandId::GetProcessModuleInfo, &DebugMonitorService::GetProcessModuleInfo>(),
|
MAKE_SERVICE_COMMAND_META(DebugMonitorService, GetProcessModuleInfo),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -52,12 +52,12 @@ namespace sts::ro {
|
||||||
Result LoadNrrEx(PidDescriptor pid_desc, u64 nrr_address, u64 nrr_size, CopiedHandle process_h);
|
Result LoadNrrEx(PidDescriptor pid_desc, u64 nrr_address, u64 nrr_size, CopiedHandle process_h);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<CommandId::LoadNro, &Service::LoadNro>(),
|
MAKE_SERVICE_COMMAND_META(Service, LoadNro),
|
||||||
MakeServiceCommandMeta<CommandId::UnloadNro, &Service::UnloadNro>(),
|
MAKE_SERVICE_COMMAND_META(Service, UnloadNro),
|
||||||
MakeServiceCommandMeta<CommandId::LoadNrr, &Service::LoadNrr>(),
|
MAKE_SERVICE_COMMAND_META(Service, LoadNrr),
|
||||||
MakeServiceCommandMeta<CommandId::UnloadNrr, &Service::UnloadNrr>(),
|
MAKE_SERVICE_COMMAND_META(Service, UnloadNrr),
|
||||||
MakeServiceCommandMeta<CommandId::Initialize, &Service::Initialize>(),
|
MAKE_SERVICE_COMMAND_META(Service, Initialize),
|
||||||
MakeServiceCommandMeta<CommandId::LoadNrrEx, &Service::LoadNrrEx, FirmwareVersion_700>(),
|
MAKE_SERVICE_COMMAND_META(Service, LoadNrrEx, FirmwareVersion_700),
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,9 +37,9 @@ namespace sts::sm {
|
||||||
virtual void AtmosphereGetRecordSize(Out<u64> record_size);
|
virtual void AtmosphereGetRecordSize(Out<u64> record_size);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<CommandId::AtmosphereGetRecord, &DmntService::AtmosphereGetRecord>(),
|
MAKE_SERVICE_COMMAND_META(DmntService, AtmosphereGetRecord),
|
||||||
MakeServiceCommandMeta<CommandId::AtmosphereListRecords, &DmntService::AtmosphereListRecords>(),
|
MAKE_SERVICE_COMMAND_META(DmntService, AtmosphereListRecords),
|
||||||
MakeServiceCommandMeta<CommandId::AtmosphereGetRecordSize, &DmntService::AtmosphereGetRecordSize>(),
|
MAKE_SERVICE_COMMAND_META(DmntService, AtmosphereGetRecordSize),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -40,11 +40,11 @@ namespace sts::sm {
|
||||||
virtual void AtmosphereHasMitm(Out<bool> out, ServiceName service);
|
virtual void AtmosphereHasMitm(Out<bool> out, ServiceName service);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<CommandId::RegisterProcess, &ManagerService::RegisterProcess>(),
|
MAKE_SERVICE_COMMAND_META(ManagerService, RegisterProcess),
|
||||||
MakeServiceCommandMeta<CommandId::UnregisterProcess, &ManagerService::UnregisterProcess>(),
|
MAKE_SERVICE_COMMAND_META(ManagerService, UnregisterProcess),
|
||||||
|
|
||||||
MakeServiceCommandMeta<CommandId::AtmosphereEndInitDefers, &ManagerService::AtmosphereEndInitDefers>(),
|
MAKE_SERVICE_COMMAND_META(ManagerService, AtmosphereEndInitDefers),
|
||||||
MakeServiceCommandMeta<CommandId::AtmosphereHasMitm, &ManagerService::AtmosphereHasMitm>(),
|
MAKE_SERVICE_COMMAND_META(ManagerService, AtmosphereHasMitm),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -61,18 +61,18 @@ namespace sts::sm {
|
||||||
virtual Result AtmosphereHasService(Out<bool> out, ServiceName service);
|
virtual Result AtmosphereHasService(Out<bool> out, ServiceName service);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<CommandId::Initialize, &UserService::Initialize>(),
|
MAKE_SERVICE_COMMAND_META(UserService, Initialize),
|
||||||
MakeServiceCommandMeta<CommandId::GetService, &UserService::GetService>(),
|
MAKE_SERVICE_COMMAND_META(UserService, GetService),
|
||||||
MakeServiceCommandMeta<CommandId::RegisterService, &UserService::RegisterService>(),
|
MAKE_SERVICE_COMMAND_META(UserService, RegisterService),
|
||||||
MakeServiceCommandMeta<CommandId::UnregisterService, &UserService::UnregisterService>(),
|
MAKE_SERVICE_COMMAND_META(UserService, UnregisterService),
|
||||||
|
|
||||||
MakeServiceCommandMeta<CommandId::AtmosphereInstallMitm, &UserService::AtmosphereInstallMitm>(),
|
MAKE_SERVICE_COMMAND_META(UserService, AtmosphereInstallMitm),
|
||||||
MakeServiceCommandMeta<CommandId::AtmosphereUninstallMitm, &UserService::AtmosphereUninstallMitm>(),
|
MAKE_SERVICE_COMMAND_META(UserService, AtmosphereUninstallMitm),
|
||||||
MakeServiceCommandMeta<CommandId::AtmosphereAssociatePidTidForMitm, &UserService::AtmosphereAssociatePidTidForMitm>(),
|
MAKE_SERVICE_COMMAND_META(UserService, AtmosphereAssociatePidTidForMitm),
|
||||||
MakeServiceCommandMeta<CommandId::AtmosphereAcknowledgeMitmSession, &UserService::AtmosphereAcknowledgeMitmSession>(),
|
MAKE_SERVICE_COMMAND_META(UserService, AtmosphereAcknowledgeMitmSession),
|
||||||
MakeServiceCommandMeta<CommandId::AtmosphereHasMitm, &UserService::AtmosphereHasMitm>(),
|
MAKE_SERVICE_COMMAND_META(UserService, AtmosphereHasMitm),
|
||||||
|
|
||||||
MakeServiceCommandMeta<CommandId::AtmosphereHasService, &UserService::AtmosphereHasService>(),
|
MAKE_SERVICE_COMMAND_META(UserService, AtmosphereHasService),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -40,22 +40,22 @@ namespace sts::spl {
|
||||||
virtual void GetAesKeyslotAvailableEvent(Out<CopiedHandle> out_hnd);
|
virtual void GetAesKeyslotAvailableEvent(Out<CopiedHandle> out_hnd);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMetaEx<CommandId::GetConfig, &CryptoService::GetConfig, CryptoService>(),
|
MAKE_SERVICE_COMMAND_META(CryptoService, GetConfig),
|
||||||
MakeServiceCommandMetaEx<CommandId::ExpMod, &CryptoService::ExpMod, CryptoService>(),
|
MAKE_SERVICE_COMMAND_META(CryptoService, ExpMod),
|
||||||
MakeServiceCommandMetaEx<CommandId::SetConfig, &CryptoService::SetConfig, CryptoService>(),
|
MAKE_SERVICE_COMMAND_META(CryptoService, SetConfig),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateRandomBytes, &CryptoService::GenerateRandomBytes, CryptoService>(),
|
MAKE_SERVICE_COMMAND_META(CryptoService, GenerateRandomBytes),
|
||||||
MakeServiceCommandMetaEx<CommandId::IsDevelopment, &CryptoService::IsDevelopment, CryptoService>(),
|
MAKE_SERVICE_COMMAND_META(CryptoService, IsDevelopment),
|
||||||
MakeServiceCommandMetaEx<CommandId::SetBootReason, &CryptoService::SetBootReason, CryptoService, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(CryptoService, SetBootReason, FirmwareVersion_300),
|
||||||
MakeServiceCommandMetaEx<CommandId::GetBootReason, &CryptoService::GetBootReason, CryptoService, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(CryptoService, GetBootReason, FirmwareVersion_300),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateAesKek, &CryptoService::GenerateAesKek, CryptoService>(),
|
MAKE_SERVICE_COMMAND_META(CryptoService, GenerateAesKek),
|
||||||
MakeServiceCommandMetaEx<CommandId::LoadAesKey, &CryptoService::LoadAesKey, CryptoService>(),
|
MAKE_SERVICE_COMMAND_META(CryptoService, LoadAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateAesKey, &CryptoService::GenerateAesKey, CryptoService>(),
|
MAKE_SERVICE_COMMAND_META(CryptoService, GenerateAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::DecryptAesKey, &CryptoService::DecryptAesKey, CryptoService>(),
|
MAKE_SERVICE_COMMAND_META(CryptoService, DecryptAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::CryptAesCtr, &CryptoService::CryptAesCtr, CryptoService>(),
|
MAKE_SERVICE_COMMAND_META(CryptoService, CryptAesCtr),
|
||||||
MakeServiceCommandMetaEx<CommandId::ComputeCmac, &CryptoService::ComputeCmac, CryptoService>(),
|
MAKE_SERVICE_COMMAND_META(CryptoService, ComputeCmac),
|
||||||
MakeServiceCommandMetaEx<CommandId::AllocateAesKeyslot, &CryptoService::AllocateAesKeyslot, CryptoService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(CryptoService, AllocateAesKeyslot, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::FreeAesKeyslot, &CryptoService::FreeAesKeyslot, CryptoService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(CryptoService, FreeAesKeyslot, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::GetAesKeyslotAvailableEvent, &CryptoService::GetAesKeyslotAvailableEvent, CryptoService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(CryptoService, GetAesKeyslotAvailableEvent, FirmwareVersion_200),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ namespace sts::spl {
|
||||||
GenerateSpecificAesKey = 12,
|
GenerateSpecificAesKey = 12,
|
||||||
DecryptRsaPrivateKey = 13,
|
DecryptRsaPrivateKey = 13,
|
||||||
DecryptAesKey = 14,
|
DecryptAesKey = 14,
|
||||||
|
CryptAesCtrDeprecated = 15,
|
||||||
CryptAesCtr = 15,
|
CryptAesCtr = 15,
|
||||||
ComputeCmac = 16,
|
ComputeCmac = 16,
|
||||||
ImportEsKey = 17,
|
ImportEsKey = 17,
|
||||||
|
@ -86,31 +87,31 @@ namespace sts::spl {
|
||||||
virtual Result GetBootReason(Out<BootReasonValue> out);
|
virtual Result GetBootReason(Out<BootReasonValue> out);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<CommandId::GetConfig, &DeprecatedService::GetConfig>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, GetConfig),
|
||||||
MakeServiceCommandMeta<CommandId::ExpMod, &DeprecatedService::ExpMod>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, ExpMod),
|
||||||
MakeServiceCommandMeta<CommandId::GenerateAesKek, &DeprecatedService::GenerateAesKek>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, GenerateAesKek),
|
||||||
MakeServiceCommandMeta<CommandId::LoadAesKey, &DeprecatedService::LoadAesKey>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, LoadAesKey),
|
||||||
MakeServiceCommandMeta<CommandId::GenerateAesKey, &DeprecatedService::GenerateAesKey>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, GenerateAesKey),
|
||||||
MakeServiceCommandMeta<CommandId::SetConfig, &DeprecatedService::SetConfig>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, SetConfig),
|
||||||
MakeServiceCommandMeta<CommandId::GenerateRandomBytes, &DeprecatedService::GenerateRandomBytes>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, GenerateRandomBytes),
|
||||||
MakeServiceCommandMeta<CommandId::ImportLotusKey, &DeprecatedService::ImportLotusKey>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, ImportLotusKey),
|
||||||
MakeServiceCommandMeta<CommandId::DecryptLotusMessage, &DeprecatedService::DecryptLotusMessage>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, DecryptLotusMessage),
|
||||||
MakeServiceCommandMeta<CommandId::IsDevelopment, &DeprecatedService::IsDevelopment>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, IsDevelopment),
|
||||||
MakeServiceCommandMeta<CommandId::GenerateSpecificAesKey, &DeprecatedService::GenerateSpecificAesKey>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, GenerateSpecificAesKey),
|
||||||
MakeServiceCommandMeta<CommandId::DecryptRsaPrivateKey, &DeprecatedService::DecryptRsaPrivateKey>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, DecryptRsaPrivateKey),
|
||||||
MakeServiceCommandMeta<CommandId::DecryptAesKey, &DeprecatedService::DecryptAesKey>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, DecryptAesKey),
|
||||||
MakeServiceCommandMeta<CommandId::CryptAesCtr, &DeprecatedService::CryptAesCtrDeprecated, FirmwareVersion_100, FirmwareVersion_100>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, CryptAesCtrDeprecated, FirmwareVersion_100, FirmwareVersion_100),
|
||||||
MakeServiceCommandMeta<CommandId::CryptAesCtr, &DeprecatedService::CryptAesCtr, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, CryptAesCtr, FirmwareVersion_200),
|
||||||
MakeServiceCommandMeta<CommandId::ComputeCmac, &DeprecatedService::ComputeCmac>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, ComputeCmac),
|
||||||
MakeServiceCommandMeta<CommandId::ImportEsKey, &DeprecatedService::ImportEsKey>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, ImportEsKey),
|
||||||
MakeServiceCommandMeta<CommandId::UnwrapTitleKey, &DeprecatedService::UnwrapTitleKey>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, UnwrapTitleKey),
|
||||||
MakeServiceCommandMeta<CommandId::LoadTitleKey, &DeprecatedService::LoadTitleKey>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, LoadTitleKey),
|
||||||
MakeServiceCommandMeta<CommandId::UnwrapCommonTitleKey, &DeprecatedService::UnwrapCommonTitleKey, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, UnwrapCommonTitleKey, FirmwareVersion_200),
|
||||||
MakeServiceCommandMeta<CommandId::AllocateAesKeyslot, &DeprecatedService::AllocateAesKeyslot, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, AllocateAesKeyslot, FirmwareVersion_200),
|
||||||
MakeServiceCommandMeta<CommandId::FreeAesKeyslot, &DeprecatedService::FreeAesKeyslot, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, FreeAesKeyslot, FirmwareVersion_200),
|
||||||
MakeServiceCommandMeta<CommandId::GetAesKeyslotAvailableEvent, &DeprecatedService::GetAesKeyslotAvailableEvent, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, GetAesKeyslotAvailableEvent, FirmwareVersion_200),
|
||||||
MakeServiceCommandMeta<CommandId::SetBootReason, &DeprecatedService::SetBootReason, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, SetBootReason, FirmwareVersion_300),
|
||||||
MakeServiceCommandMeta<CommandId::GetBootReason, &DeprecatedService::GetBootReason, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(DeprecatedService, GetBootReason, FirmwareVersion_300),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -38,31 +38,31 @@ namespace sts::spl {
|
||||||
virtual Result LoadElicenseKey(u32 keyslot, AccessKey access_key);
|
virtual Result LoadElicenseKey(u32 keyslot, AccessKey access_key);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMetaEx<CommandId::GetConfig, &EsService::GetConfig, EsService>(),
|
MAKE_SERVICE_COMMAND_META(EsService, GetConfig),
|
||||||
MakeServiceCommandMetaEx<CommandId::ExpMod, &EsService::ExpMod, EsService>(),
|
MAKE_SERVICE_COMMAND_META(EsService, ExpMod),
|
||||||
MakeServiceCommandMetaEx<CommandId::SetConfig, &EsService::SetConfig, EsService>(),
|
MAKE_SERVICE_COMMAND_META(EsService, SetConfig),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateRandomBytes, &EsService::GenerateRandomBytes, EsService>(),
|
MAKE_SERVICE_COMMAND_META(EsService, GenerateRandomBytes),
|
||||||
MakeServiceCommandMetaEx<CommandId::IsDevelopment, &EsService::IsDevelopment, EsService>(),
|
MAKE_SERVICE_COMMAND_META(EsService, IsDevelopment),
|
||||||
MakeServiceCommandMetaEx<CommandId::SetBootReason, &EsService::SetBootReason, EsService, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(EsService, SetBootReason, FirmwareVersion_300),
|
||||||
MakeServiceCommandMetaEx<CommandId::GetBootReason, &EsService::GetBootReason, EsService, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(EsService, GetBootReason, FirmwareVersion_300),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateAesKek, &EsService::GenerateAesKek, EsService>(),
|
MAKE_SERVICE_COMMAND_META(EsService, GenerateAesKek),
|
||||||
MakeServiceCommandMetaEx<CommandId::LoadAesKey, &EsService::LoadAesKey, EsService>(),
|
MAKE_SERVICE_COMMAND_META(EsService, LoadAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateAesKey, &EsService::GenerateAesKey, EsService>(),
|
MAKE_SERVICE_COMMAND_META(EsService, GenerateAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::DecryptAesKey, &EsService::DecryptAesKey, EsService>(),
|
MAKE_SERVICE_COMMAND_META(EsService, DecryptAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::CryptAesCtr, &EsService::CryptAesCtr, EsService>(),
|
MAKE_SERVICE_COMMAND_META(EsService, CryptAesCtr),
|
||||||
MakeServiceCommandMetaEx<CommandId::ComputeCmac, &EsService::ComputeCmac, EsService>(),
|
MAKE_SERVICE_COMMAND_META(EsService, ComputeCmac),
|
||||||
MakeServiceCommandMetaEx<CommandId::AllocateAesKeyslot, &EsService::AllocateAesKeyslot, EsService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(EsService, AllocateAesKeyslot, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::FreeAesKeyslot, &EsService::FreeAesKeyslot, EsService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(EsService, FreeAesKeyslot, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::GetAesKeyslotAvailableEvent, &EsService::GetAesKeyslotAvailableEvent, EsService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(EsService, GetAesKeyslotAvailableEvent, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::DecryptRsaPrivateKey, &EsService::DecryptRsaPrivateKeyDeprecated, EsService, FirmwareVersion_400, FirmwareVersion_400>(),
|
MAKE_SERVICE_COMMAND_META(EsService, DecryptRsaPrivateKey, FirmwareVersion_400, FirmwareVersion_400),
|
||||||
MakeServiceCommandMetaEx<CommandId::DecryptRsaPrivateKey, &EsService::DecryptRsaPrivateKey, EsService, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(EsService, DecryptRsaPrivateKey, FirmwareVersion_500),
|
||||||
MakeServiceCommandMetaEx<CommandId::ImportEsKey, &EsService::ImportEsKey, EsService>(),
|
MAKE_SERVICE_COMMAND_META(EsService, ImportEsKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::UnwrapTitleKey, &EsService::UnwrapTitleKey, EsService>(),
|
MAKE_SERVICE_COMMAND_META(EsService, UnwrapTitleKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::UnwrapCommonTitleKey, &EsService::UnwrapCommonTitleKey, EsService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(EsService, UnwrapCommonTitleKey, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::ImportDrmKey, &EsService::ImportDrmKey, EsService, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(EsService, ImportDrmKey, FirmwareVersion_500),
|
||||||
MakeServiceCommandMetaEx<CommandId::DrmExpMod, &EsService::DrmExpMod, EsService, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(EsService, DrmExpMod, FirmwareVersion_500),
|
||||||
MakeServiceCommandMetaEx<CommandId::UnwrapElicenseKey, &EsService::UnwrapElicenseKey, EsService, FirmwareVersion_600>(),
|
MAKE_SERVICE_COMMAND_META(EsService, UnwrapElicenseKey, FirmwareVersion_600),
|
||||||
MakeServiceCommandMetaEx<CommandId::LoadElicenseKey, &EsService::LoadElicenseKey, EsService, FirmwareVersion_600>(),
|
MAKE_SERVICE_COMMAND_META(EsService, LoadElicenseKey, FirmwareVersion_600),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -36,27 +36,27 @@ namespace sts::spl {
|
||||||
virtual Result GetPackage2Hash(OutPointerWithClientSize<u8> dst);
|
virtual Result GetPackage2Hash(OutPointerWithClientSize<u8> dst);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMetaEx<CommandId::GetConfig, &FsService::GetConfig, FsService>(),
|
MAKE_SERVICE_COMMAND_META(FsService, GetConfig),
|
||||||
MakeServiceCommandMetaEx<CommandId::ExpMod, &FsService::ExpMod, FsService>(),
|
MAKE_SERVICE_COMMAND_META(FsService, ExpMod),
|
||||||
MakeServiceCommandMetaEx<CommandId::SetConfig, &FsService::SetConfig, FsService>(),
|
MAKE_SERVICE_COMMAND_META(FsService, SetConfig),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateRandomBytes, &FsService::GenerateRandomBytes, FsService>(),
|
MAKE_SERVICE_COMMAND_META(FsService, GenerateRandomBytes),
|
||||||
MakeServiceCommandMetaEx<CommandId::IsDevelopment, &FsService::IsDevelopment, FsService>(),
|
MAKE_SERVICE_COMMAND_META(FsService, IsDevelopment),
|
||||||
MakeServiceCommandMetaEx<CommandId::SetBootReason, &FsService::SetBootReason, FsService, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(FsService, SetBootReason, FirmwareVersion_300),
|
||||||
MakeServiceCommandMetaEx<CommandId::GetBootReason, &FsService::GetBootReason, FsService, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(FsService, GetBootReason, FirmwareVersion_300),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateAesKek, &FsService::GenerateAesKek, FsService>(),
|
MAKE_SERVICE_COMMAND_META(FsService, GenerateAesKek),
|
||||||
MakeServiceCommandMetaEx<CommandId::LoadAesKey, &FsService::LoadAesKey, FsService>(),
|
MAKE_SERVICE_COMMAND_META(FsService, LoadAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateAesKey, &FsService::GenerateAesKey, FsService>(),
|
MAKE_SERVICE_COMMAND_META(FsService, GenerateAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::DecryptAesKey, &FsService::DecryptAesKey, FsService>(),
|
MAKE_SERVICE_COMMAND_META(FsService, DecryptAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::CryptAesCtr, &FsService::CryptAesCtr, FsService>(),
|
MAKE_SERVICE_COMMAND_META(FsService, CryptAesCtr),
|
||||||
MakeServiceCommandMetaEx<CommandId::ComputeCmac, &FsService::ComputeCmac, FsService>(),
|
MAKE_SERVICE_COMMAND_META(FsService, ComputeCmac),
|
||||||
MakeServiceCommandMetaEx<CommandId::AllocateAesKeyslot, &FsService::AllocateAesKeyslot, FsService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(FsService, AllocateAesKeyslot, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::FreeAesKeyslot, &FsService::FreeAesKeyslot, FsService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(FsService, FreeAesKeyslot, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::GetAesKeyslotAvailableEvent, &FsService::GetAesKeyslotAvailableEvent, FsService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(FsService, GetAesKeyslotAvailableEvent, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::ImportLotusKey, &FsService::ImportLotusKey, FsService>(),
|
MAKE_SERVICE_COMMAND_META(FsService, ImportLotusKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::DecryptLotusMessage, &FsService::DecryptLotusMessage, FsService>(),
|
MAKE_SERVICE_COMMAND_META(FsService, DecryptLotusMessage),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateSpecificAesKey, &FsService::GenerateSpecificAesKey, FsService>(),
|
MAKE_SERVICE_COMMAND_META(FsService, GenerateSpecificAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::LoadTitleKey, &FsService::LoadTitleKey, FsService>(),
|
MAKE_SERVICE_COMMAND_META(FsService, LoadTitleKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::GetPackage2Hash, &FsService::GetPackage2Hash, FsService, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(FsService, GetPackage2Hash, FirmwareVersion_500),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -80,13 +80,13 @@ namespace sts::spl {
|
||||||
virtual Result GetBootReason(Out<BootReasonValue> out);
|
virtual Result GetBootReason(Out<BootReasonValue> out);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<CommandId::GetConfig, &GeneralService::GetConfig>(),
|
MAKE_SERVICE_COMMAND_META(GeneralService, GetConfig),
|
||||||
MakeServiceCommandMeta<CommandId::ExpMod, &GeneralService::ExpMod>(),
|
MAKE_SERVICE_COMMAND_META(GeneralService, ExpMod),
|
||||||
MakeServiceCommandMeta<CommandId::SetConfig, &GeneralService::SetConfig>(),
|
MAKE_SERVICE_COMMAND_META(GeneralService, SetConfig),
|
||||||
MakeServiceCommandMeta<CommandId::GenerateRandomBytes, &GeneralService::GenerateRandomBytes>(),
|
MAKE_SERVICE_COMMAND_META(GeneralService, GenerateRandomBytes),
|
||||||
MakeServiceCommandMeta<CommandId::IsDevelopment, &GeneralService::IsDevelopment>(),
|
MAKE_SERVICE_COMMAND_META(GeneralService, IsDevelopment),
|
||||||
MakeServiceCommandMeta<CommandId::SetBootReason, &GeneralService::SetBootReason, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(GeneralService, SetBootReason, FirmwareVersion_300),
|
||||||
MakeServiceCommandMeta<CommandId::GetBootReason, &GeneralService::GetBootReason, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(GeneralService, GetBootReason, FirmwareVersion_300),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -33,25 +33,25 @@ namespace sts::spl {
|
||||||
virtual Result ReEncryptRsaPrivateKey(OutPointerWithClientSize<u8> out, InPointer<u8> src, AccessKey access_key_dec, KeySource source_dec, AccessKey access_key_enc, KeySource source_enc, u32 option);
|
virtual Result ReEncryptRsaPrivateKey(OutPointerWithClientSize<u8> out, InPointer<u8> src, AccessKey access_key_dec, KeySource source_dec, AccessKey access_key_enc, KeySource source_enc, u32 option);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMetaEx<CommandId::GetConfig, &ManuService::GetConfig, ManuService>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, GetConfig),
|
||||||
MakeServiceCommandMetaEx<CommandId::ExpMod, &ManuService::ExpMod, ManuService>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, ExpMod),
|
||||||
MakeServiceCommandMetaEx<CommandId::SetConfig, &ManuService::SetConfig, ManuService>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, SetConfig),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateRandomBytes, &ManuService::GenerateRandomBytes, ManuService>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, GenerateRandomBytes),
|
||||||
MakeServiceCommandMetaEx<CommandId::IsDevelopment, &ManuService::IsDevelopment, ManuService>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, IsDevelopment),
|
||||||
MakeServiceCommandMetaEx<CommandId::SetBootReason, &ManuService::SetBootReason, ManuService, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, SetBootReason, FirmwareVersion_300),
|
||||||
MakeServiceCommandMetaEx<CommandId::GetBootReason, &ManuService::GetBootReason, ManuService, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, GetBootReason, FirmwareVersion_300),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateAesKek, &ManuService::GenerateAesKek, ManuService>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, GenerateAesKek),
|
||||||
MakeServiceCommandMetaEx<CommandId::LoadAesKey, &ManuService::LoadAesKey, ManuService>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, LoadAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateAesKey, &ManuService::GenerateAesKey, ManuService>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, GenerateAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::DecryptAesKey, &ManuService::DecryptAesKey, ManuService>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, DecryptAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::CryptAesCtr, &ManuService::CryptAesCtr, ManuService>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, CryptAesCtr),
|
||||||
MakeServiceCommandMetaEx<CommandId::ComputeCmac, &ManuService::ComputeCmac, ManuService>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, ComputeCmac),
|
||||||
MakeServiceCommandMetaEx<CommandId::AllocateAesKeyslot, &ManuService::AllocateAesKeyslot, ManuService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, AllocateAesKeyslot, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::FreeAesKeyslot, &ManuService::FreeAesKeyslot, ManuService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, FreeAesKeyslot, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::GetAesKeyslotAvailableEvent, &ManuService::GetAesKeyslotAvailableEvent, ManuService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, GetAesKeyslotAvailableEvent, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::DecryptRsaPrivateKey, &ManuService::DecryptRsaPrivateKeyDeprecated, ManuService, FirmwareVersion_400, FirmwareVersion_400>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, DecryptRsaPrivateKey, FirmwareVersion_400, FirmwareVersion_400),
|
||||||
MakeServiceCommandMetaEx<CommandId::DecryptRsaPrivateKey, &ManuService::DecryptRsaPrivateKey, ManuService, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, DecryptRsaPrivateKey, FirmwareVersion_500),
|
||||||
MakeServiceCommandMetaEx<CommandId::ReEncryptRsaPrivateKey, &ManuService::ReEncryptRsaPrivateKey, ManuService, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(ManuService, ReEncryptRsaPrivateKey, FirmwareVersion_500),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace sts::spl {
|
||||||
virtual Result GenerateRandomBytes(OutBuffer<u8> out);
|
virtual Result GenerateRandomBytes(OutBuffer<u8> out);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMeta<CommandId::GenerateRandomBytes, &RandomService::GenerateRandomBytes>(),
|
MAKE_SERVICE_COMMAND_META(RandomService, GenerateRandomBytes),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -33,24 +33,24 @@ namespace sts::spl {
|
||||||
virtual Result DecryptRsaPrivateKey(OutPointerWithClientSize<u8> dst, InPointer<u8> src, AccessKey access_key, KeySource key_source);
|
virtual Result DecryptRsaPrivateKey(OutPointerWithClientSize<u8> dst, InPointer<u8> src, AccessKey access_key, KeySource key_source);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMetaEx<CommandId::GetConfig, &RsaService::GetConfig, RsaService>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, GetConfig),
|
||||||
MakeServiceCommandMetaEx<CommandId::ExpMod, &RsaService::ExpMod, RsaService>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, ExpMod),
|
||||||
MakeServiceCommandMetaEx<CommandId::SetConfig, &RsaService::SetConfig, RsaService>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, SetConfig),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateRandomBytes, &RsaService::GenerateRandomBytes, RsaService>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, GenerateRandomBytes),
|
||||||
MakeServiceCommandMetaEx<CommandId::IsDevelopment, &RsaService::IsDevelopment, RsaService>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, IsDevelopment),
|
||||||
MakeServiceCommandMetaEx<CommandId::SetBootReason, &RsaService::SetBootReason, RsaService, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, SetBootReason, FirmwareVersion_300),
|
||||||
MakeServiceCommandMetaEx<CommandId::GetBootReason, &RsaService::GetBootReason, RsaService, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, GetBootReason, FirmwareVersion_300),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateAesKek, &RsaService::GenerateAesKek, RsaService>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, GenerateAesKek),
|
||||||
MakeServiceCommandMetaEx<CommandId::LoadAesKey, &RsaService::LoadAesKey, RsaService>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, LoadAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateAesKey, &RsaService::GenerateAesKey, RsaService>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, GenerateAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::DecryptAesKey, &RsaService::DecryptAesKey, RsaService>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, DecryptAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::CryptAesCtr, &RsaService::CryptAesCtr, RsaService>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, CryptAesCtr),
|
||||||
MakeServiceCommandMetaEx<CommandId::ComputeCmac, &RsaService::ComputeCmac, RsaService>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, ComputeCmac),
|
||||||
MakeServiceCommandMetaEx<CommandId::AllocateAesKeyslot, &RsaService::AllocateAesKeyslot, RsaService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, AllocateAesKeyslot, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::FreeAesKeyslot, &RsaService::FreeAesKeyslot, RsaService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, FreeAesKeyslot, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::GetAesKeyslotAvailableEvent, &RsaService::GetAesKeyslotAvailableEvent, RsaService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, GetAesKeyslotAvailableEvent, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::DecryptRsaPrivateKey, &RsaService::DecryptRsaPrivateKeyDeprecated, RsaService, FirmwareVersion_400, FirmwareVersion_400>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, DecryptRsaPrivateKey, FirmwareVersion_400, FirmwareVersion_400),
|
||||||
MakeServiceCommandMetaEx<CommandId::DecryptRsaPrivateKey, &RsaService::DecryptRsaPrivateKey, RsaService, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(RsaService, DecryptRsaPrivateKey, FirmwareVersion_500),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -33,26 +33,26 @@ namespace sts::spl {
|
||||||
virtual Result SslExpMod(OutPointerWithClientSize<u8> out, InPointer<u8> base, InPointer<u8> mod);
|
virtual Result SslExpMod(OutPointerWithClientSize<u8> out, InPointer<u8> base, InPointer<u8> mod);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MakeServiceCommandMetaEx<CommandId::GetConfig, &SslService::GetConfig, SslService>(),
|
MAKE_SERVICE_COMMAND_META(SslService, GetConfig),
|
||||||
MakeServiceCommandMetaEx<CommandId::ExpMod, &SslService::ExpMod, SslService>(),
|
MAKE_SERVICE_COMMAND_META(SslService, ExpMod),
|
||||||
MakeServiceCommandMetaEx<CommandId::SetConfig, &SslService::SetConfig, SslService>(),
|
MAKE_SERVICE_COMMAND_META(SslService, SetConfig),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateRandomBytes, &SslService::GenerateRandomBytes, SslService>(),
|
MAKE_SERVICE_COMMAND_META(SslService, GenerateRandomBytes),
|
||||||
MakeServiceCommandMetaEx<CommandId::IsDevelopment, &SslService::IsDevelopment, SslService>(),
|
MAKE_SERVICE_COMMAND_META(SslService, IsDevelopment),
|
||||||
MakeServiceCommandMetaEx<CommandId::SetBootReason, &SslService::SetBootReason, SslService, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(SslService, SetBootReason, FirmwareVersion_300),
|
||||||
MakeServiceCommandMetaEx<CommandId::GetBootReason, &SslService::GetBootReason, SslService, FirmwareVersion_300>(),
|
MAKE_SERVICE_COMMAND_META(SslService, GetBootReason, FirmwareVersion_300),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateAesKek, &SslService::GenerateAesKek, SslService>(),
|
MAKE_SERVICE_COMMAND_META(SslService, GenerateAesKek),
|
||||||
MakeServiceCommandMetaEx<CommandId::LoadAesKey, &SslService::LoadAesKey, SslService>(),
|
MAKE_SERVICE_COMMAND_META(SslService, LoadAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::GenerateAesKey, &SslService::GenerateAesKey, SslService>(),
|
MAKE_SERVICE_COMMAND_META(SslService, GenerateAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::DecryptAesKey, &SslService::DecryptAesKey, SslService>(),
|
MAKE_SERVICE_COMMAND_META(SslService, DecryptAesKey),
|
||||||
MakeServiceCommandMetaEx<CommandId::CryptAesCtr, &SslService::CryptAesCtr, SslService>(),
|
MAKE_SERVICE_COMMAND_META(SslService, CryptAesCtr),
|
||||||
MakeServiceCommandMetaEx<CommandId::ComputeCmac, &SslService::ComputeCmac, SslService>(),
|
MAKE_SERVICE_COMMAND_META(SslService, ComputeCmac),
|
||||||
MakeServiceCommandMetaEx<CommandId::AllocateAesKeyslot, &SslService::AllocateAesKeyslot, SslService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(SslService, AllocateAesKeyslot, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::FreeAesKeyslot, &SslService::FreeAesKeyslot, SslService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(SslService, FreeAesKeyslot, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::GetAesKeyslotAvailableEvent, &SslService::GetAesKeyslotAvailableEvent, SslService, FirmwareVersion_200>(),
|
MAKE_SERVICE_COMMAND_META(SslService, GetAesKeyslotAvailableEvent, FirmwareVersion_200),
|
||||||
MakeServiceCommandMetaEx<CommandId::DecryptRsaPrivateKey, &SslService::DecryptRsaPrivateKeyDeprecated, SslService, FirmwareVersion_400, FirmwareVersion_400>(),
|
MAKE_SERVICE_COMMAND_META(SslService, DecryptRsaPrivateKey, FirmwareVersion_400, FirmwareVersion_400),
|
||||||
MakeServiceCommandMetaEx<CommandId::DecryptRsaPrivateKey, &SslService::DecryptRsaPrivateKey, SslService, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(SslService, DecryptRsaPrivateKey, FirmwareVersion_500),
|
||||||
MakeServiceCommandMetaEx<CommandId::ImportSslKey, &SslService::ImportSslKey, SslService, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(SslService, ImportSslKey, FirmwareVersion_500),
|
||||||
MakeServiceCommandMetaEx<CommandId::SslExpMod, &SslService::SslExpMod, SslService, FirmwareVersion_500>(),
|
MAKE_SERVICE_COMMAND_META(SslService, SslExpMod, FirmwareVersion_500),
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue