mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-09 22:56:35 +00:00
hos::Version: rename enum members
This commit is contained in:
parent
79b9e07ee9
commit
6719abec65
78 changed files with 304 additions and 302 deletions
|
@ -35,6 +35,7 @@ namespace ams::exosphere {
|
||||||
AMS_DEFINE_TARGET_FIRMWARE_ENUM(810),
|
AMS_DEFINE_TARGET_FIRMWARE_ENUM(810),
|
||||||
AMS_DEFINE_TARGET_FIRMWARE_ENUM(900),
|
AMS_DEFINE_TARGET_FIRMWARE_ENUM(900),
|
||||||
AMS_DEFINE_TARGET_FIRMWARE_ENUM(910),
|
AMS_DEFINE_TARGET_FIRMWARE_ENUM(910),
|
||||||
|
AMS_DEFINE_TARGET_FIRMWARE_ENUM(1000),
|
||||||
};
|
};
|
||||||
#undef AMS_DEFINE_TARGET_FIRMWARE_ENUM
|
#undef AMS_DEFINE_TARGET_FIRMWARE_ENUM
|
||||||
|
|
||||||
|
|
|
@ -54,15 +54,15 @@ namespace ams::erpt::sf {
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MAKE_SERVICE_COMMAND_META(SubmitContext),
|
MAKE_SERVICE_COMMAND_META(SubmitContext),
|
||||||
MAKE_SERVICE_COMMAND_META(CreateReport),
|
MAKE_SERVICE_COMMAND_META(CreateReport),
|
||||||
MAKE_SERVICE_COMMAND_META(SetInitialLaunchSettingsCompletionTime, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(SetInitialLaunchSettingsCompletionTime, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(ClearInitialLaunchSettingsCompletionTime, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(ClearInitialLaunchSettingsCompletionTime, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(UpdatePowerOnTime, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(UpdatePowerOnTime, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(UpdateAwakeTime, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(UpdateAwakeTime, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(SubmitMultipleCategoryContext, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(SubmitMultipleCategoryContext, hos::Version_5_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(UpdateApplicationLaunchTime, hos::Version_600),
|
MAKE_SERVICE_COMMAND_META(UpdateApplicationLaunchTime, hos::Version_6_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(ClearApplicationLaunchTime, hos::Version_600),
|
MAKE_SERVICE_COMMAND_META(ClearApplicationLaunchTime, hos::Version_6_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(SubmitAttachment, hos::Version_800),
|
MAKE_SERVICE_COMMAND_META(SubmitAttachment, hos::Version_8_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(CreateReportWithAttachments, hos::Version_800),
|
MAKE_SERVICE_COMMAND_META(CreateReportWithAttachments, hos::Version_8_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -41,10 +41,10 @@ namespace ams::erpt::sf {
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MAKE_SERVICE_COMMAND_META(GetReportList),
|
MAKE_SERVICE_COMMAND_META(GetReportList),
|
||||||
MAKE_SERVICE_COMMAND_META(GetEvent),
|
MAKE_SERVICE_COMMAND_META(GetEvent),
|
||||||
MAKE_SERVICE_COMMAND_META(CleanupReports, hos::Version_400),
|
MAKE_SERVICE_COMMAND_META(CleanupReports, hos::Version_4_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(DeleteReport, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(DeleteReport, hos::Version_5_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetStorageUsageStatistics, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(GetStorageUsageStatistics, hos::Version_5_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetAttachmentList, hos::Version_800),
|
MAKE_SERVICE_COMMAND_META(GetAttachmentList, hos::Version_8_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace ams::erpt::sf {
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MAKE_SERVICE_COMMAND_META(OpenReport),
|
MAKE_SERVICE_COMMAND_META(OpenReport),
|
||||||
MAKE_SERVICE_COMMAND_META(OpenManager),
|
MAKE_SERVICE_COMMAND_META(OpenManager),
|
||||||
MAKE_SERVICE_COMMAND_META(OpenAttachment, hos::Version_800),
|
MAKE_SERVICE_COMMAND_META(OpenAttachment, hos::Version_8_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ namespace ams::fssrv::impl {
|
||||||
MAKE_SERVICE_COMMAND_META(GetSize),
|
MAKE_SERVICE_COMMAND_META(GetSize),
|
||||||
|
|
||||||
/* 4.0.0- */
|
/* 4.0.0- */
|
||||||
MAKE_SERVICE_COMMAND_META(OperateRange, hos::Version_400),
|
MAKE_SERVICE_COMMAND_META(OperateRange, hos::Version_4_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -181,11 +181,11 @@ namespace ams::fssrv::impl {
|
||||||
MAKE_SERVICE_COMMAND_META(GetTotalSpaceSize),
|
MAKE_SERVICE_COMMAND_META(GetTotalSpaceSize),
|
||||||
|
|
||||||
/* 3.0.0- */
|
/* 3.0.0- */
|
||||||
MAKE_SERVICE_COMMAND_META(CleanDirectoryRecursively, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(CleanDirectoryRecursively, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetFileTimeStampRaw, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(GetFileTimeStampRaw, hos::Version_3_0_0),
|
||||||
|
|
||||||
/* 4.0.0- */
|
/* 4.0.0- */
|
||||||
MAKE_SERVICE_COMMAND_META(QueryEntry, hos::Version_400),
|
MAKE_SERVICE_COMMAND_META(QueryEntry, hos::Version_4_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ namespace ams::fssrv::impl {
|
||||||
MAKE_SERVICE_COMMAND_META(GetSize),
|
MAKE_SERVICE_COMMAND_META(GetSize),
|
||||||
|
|
||||||
/* 4.0.0- */
|
/* 4.0.0- */
|
||||||
MAKE_SERVICE_COMMAND_META(OperateRange, hos::Version_400),
|
MAKE_SERVICE_COMMAND_META(OperateRange, hos::Version_4_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,18 +21,19 @@ namespace ams::hos {
|
||||||
|
|
||||||
enum Version : u16 {
|
enum Version : u16 {
|
||||||
Version_Min = 0,
|
Version_Min = 0,
|
||||||
Version_100 = Version_Min,
|
Version_1_0_0 = Version_Min,
|
||||||
Version_200 = 1,
|
Version_2_0_0 = 1,
|
||||||
Version_300 = 2,
|
Version_3_0_0 = 2,
|
||||||
Version_400 = 3,
|
Version_4_0_0 = 3,
|
||||||
Version_500 = 4,
|
Version_5_0_0 = 4,
|
||||||
Version_600 = 5,
|
Version_6_0_0 = 5,
|
||||||
Version_700 = 6,
|
Version_7_0_0 = 6,
|
||||||
Version_800 = 7,
|
Version_8_0_0 = 7,
|
||||||
Version_810 = 8,
|
Version_8_1_0 = 8,
|
||||||
Version_900 = 9,
|
Version_9_0_0 = 9,
|
||||||
Version_910 = 10,
|
Version_9_1_0 = 10,
|
||||||
Version_Current = Version_910,
|
Version_10_0_0 = 11,
|
||||||
|
Version_Current = Version_10_0_0,
|
||||||
Version_Max = 32,
|
Version_Max = 32,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace ams::lr {
|
||||||
|
|
||||||
Result RegisterAddOnContentStorage(ncm::DataId id, ncm::ApplicationId application_id, ncm::StorageId storage_id) {
|
Result RegisterAddOnContentStorage(ncm::DataId id, ncm::ApplicationId application_id, ncm::StorageId storage_id) {
|
||||||
AMS_ASSERT(this->interface);
|
AMS_ASSERT(this->interface);
|
||||||
if (hos::GetVersion() >= hos::Version_900) {
|
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||||
return this->interface->RegisterAddOnContentStorage(id, application_id, storage_id);
|
return this->interface->RegisterAddOnContentStorage(id, application_id, storage_id);
|
||||||
} else {
|
} else {
|
||||||
return this->interface->RegisterAddOnContentStorageDeprecated(id, storage_id);
|
return this->interface->RegisterAddOnContentStorageDeprecated(id, storage_id);
|
||||||
|
|
|
@ -39,12 +39,12 @@ namespace ams::lr {
|
||||||
virtual Result UnregisterApplicationAddOnContent(ncm::ApplicationId id) = 0;
|
virtual Result UnregisterApplicationAddOnContent(ncm::ApplicationId id) = 0;
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MAKE_SERVICE_COMMAND_META(ResolveAddOnContentPath, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(ResolveAddOnContentPath, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RegisterAddOnContentStorageDeprecated, hos::Version_200, hos::Version_810),
|
MAKE_SERVICE_COMMAND_META(RegisterAddOnContentStorageDeprecated, hos::Version_2_0_0, hos::Version_8_1_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RegisterAddOnContentStorage, hos::Version_900),
|
MAKE_SERVICE_COMMAND_META(RegisterAddOnContentStorage, hos::Version_9_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(UnregisterAllAddOnContentPath, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(UnregisterAllAddOnContentPath, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RefreshApplicationAddOnContent, hos::Version_900),
|
MAKE_SERVICE_COMMAND_META(RefreshApplicationAddOnContent, hos::Version_9_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(UnregisterApplicationAddOnContent, hos::Version_900),
|
MAKE_SERVICE_COMMAND_META(UnregisterApplicationAddOnContent, hos::Version_9_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -88,27 +88,27 @@ namespace ams::lr {
|
||||||
MAKE_SERVICE_COMMAND_META(ResolveApplicationControlPath),
|
MAKE_SERVICE_COMMAND_META(ResolveApplicationControlPath),
|
||||||
MAKE_SERVICE_COMMAND_META(ResolveApplicationHtmlDocumentPath),
|
MAKE_SERVICE_COMMAND_META(ResolveApplicationHtmlDocumentPath),
|
||||||
MAKE_SERVICE_COMMAND_META(ResolveDataPath),
|
MAKE_SERVICE_COMMAND_META(ResolveDataPath),
|
||||||
MAKE_SERVICE_COMMAND_META(RedirectApplicationControlPathDeprecated, hos::Version_100, hos::Version_810),
|
MAKE_SERVICE_COMMAND_META(RedirectApplicationControlPathDeprecated, hos::Version_1_0_0, hos::Version_8_1_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RedirectApplicationControlPath, hos::Version_900),
|
MAKE_SERVICE_COMMAND_META(RedirectApplicationControlPath, hos::Version_9_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RedirectApplicationHtmlDocumentPathDeprecated, hos::Version_100, hos::Version_810),
|
MAKE_SERVICE_COMMAND_META(RedirectApplicationHtmlDocumentPathDeprecated, hos::Version_1_0_0, hos::Version_8_1_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RedirectApplicationHtmlDocumentPath, hos::Version_900),
|
MAKE_SERVICE_COMMAND_META(RedirectApplicationHtmlDocumentPath, hos::Version_9_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(ResolveApplicationLegalInformationPath),
|
MAKE_SERVICE_COMMAND_META(ResolveApplicationLegalInformationPath),
|
||||||
MAKE_SERVICE_COMMAND_META(RedirectApplicationLegalInformationPathDeprecated, hos::Version_100, hos::Version_810),
|
MAKE_SERVICE_COMMAND_META(RedirectApplicationLegalInformationPathDeprecated, hos::Version_1_0_0, hos::Version_8_1_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RedirectApplicationLegalInformationPath, hos::Version_900),
|
MAKE_SERVICE_COMMAND_META(RedirectApplicationLegalInformationPath, hos::Version_9_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(Refresh),
|
MAKE_SERVICE_COMMAND_META(Refresh),
|
||||||
MAKE_SERVICE_COMMAND_META(RedirectApplicationProgramPathDeprecated, hos::Version_500, hos::Version_810),
|
MAKE_SERVICE_COMMAND_META(RedirectApplicationProgramPathDeprecated, hos::Version_5_0_0, hos::Version_8_1_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RedirectApplicationProgramPath, hos::Version_900),
|
MAKE_SERVICE_COMMAND_META(RedirectApplicationProgramPath, hos::Version_9_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(ClearApplicationRedirectionDeprecated, hos::Version_500, hos::Version_810),
|
MAKE_SERVICE_COMMAND_META(ClearApplicationRedirectionDeprecated, hos::Version_5_0_0, hos::Version_8_1_0),
|
||||||
MAKE_SERVICE_COMMAND_META(ClearApplicationRedirection, hos::Version_900),
|
MAKE_SERVICE_COMMAND_META(ClearApplicationRedirection, hos::Version_9_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(EraseProgramRedirection, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(EraseProgramRedirection, hos::Version_5_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(EraseApplicationControlRedirection, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(EraseApplicationControlRedirection, hos::Version_5_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(EraseApplicationHtmlDocumentRedirection, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(EraseApplicationHtmlDocumentRedirection, hos::Version_5_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(EraseApplicationLegalInformationRedirection, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(EraseApplicationLegalInformationRedirection, hos::Version_5_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(ResolveProgramPathForDebug, hos::Version_700),
|
MAKE_SERVICE_COMMAND_META(ResolveProgramPathForDebug, hos::Version_7_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RedirectProgramPathForDebug, hos::Version_700),
|
MAKE_SERVICE_COMMAND_META(RedirectProgramPathForDebug, hos::Version_7_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RedirectApplicationProgramPathForDebugDeprecated, hos::Version_700, hos::Version_810),
|
MAKE_SERVICE_COMMAND_META(RedirectApplicationProgramPathForDebugDeprecated, hos::Version_7_0_0, hos::Version_8_1_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RedirectApplicationProgramPathForDebug, hos::Version_900),
|
MAKE_SERVICE_COMMAND_META(RedirectApplicationProgramPathForDebug, hos::Version_9_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(EraseProgramRedirectionForDebug, hos::Version_700),
|
MAKE_SERVICE_COMMAND_META(EraseProgramRedirectionForDebug, hos::Version_7_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -56,19 +56,19 @@ namespace ams::lr {
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MAKE_SERVICE_COMMAND_META(ResolveProgramPath),
|
MAKE_SERVICE_COMMAND_META(ResolveProgramPath),
|
||||||
MAKE_SERVICE_COMMAND_META(RegisterProgramPathDeprecated, hos::Version_100, hos::Version_810),
|
MAKE_SERVICE_COMMAND_META(RegisterProgramPathDeprecated, hos::Version_1_0_0, hos::Version_8_1_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RegisterProgramPath, hos::Version_900),
|
MAKE_SERVICE_COMMAND_META(RegisterProgramPath, hos::Version_9_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(UnregisterProgramPath),
|
MAKE_SERVICE_COMMAND_META(UnregisterProgramPath),
|
||||||
MAKE_SERVICE_COMMAND_META(RedirectProgramPathDeprecated, hos::Version_100, hos::Version_810),
|
MAKE_SERVICE_COMMAND_META(RedirectProgramPathDeprecated, hos::Version_1_0_0, hos::Version_8_1_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RedirectProgramPath, hos::Version_900),
|
MAKE_SERVICE_COMMAND_META(RedirectProgramPath, hos::Version_9_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(ResolveHtmlDocumentPath, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(ResolveHtmlDocumentPath, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RegisterHtmlDocumentPathDeprecated, hos::Version_200, hos::Version_810),
|
MAKE_SERVICE_COMMAND_META(RegisterHtmlDocumentPathDeprecated, hos::Version_2_0_0, hos::Version_8_1_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RegisterHtmlDocumentPath, hos::Version_900),
|
MAKE_SERVICE_COMMAND_META(RegisterHtmlDocumentPath, hos::Version_9_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(UnregisterHtmlDocumentPath, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(UnregisterHtmlDocumentPath, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RedirectHtmlDocumentPathDeprecated, hos::Version_200, hos::Version_810),
|
MAKE_SERVICE_COMMAND_META(RedirectHtmlDocumentPathDeprecated, hos::Version_2_0_0, hos::Version_8_1_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RedirectHtmlDocumentPath, hos::Version_900),
|
MAKE_SERVICE_COMMAND_META(RedirectHtmlDocumentPath, hos::Version_9_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(Refresh, hos::Version_700),
|
MAKE_SERVICE_COMMAND_META(Refresh, hos::Version_7_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RefreshExcluding, hos::Version_900),
|
MAKE_SERVICE_COMMAND_META(RefreshExcluding, hos::Version_9_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ namespace ams::lr {
|
||||||
|
|
||||||
void RedirectApplicationControlPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
void RedirectApplicationControlPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||||
AMS_ASSERT(this->interface != nullptr);
|
AMS_ASSERT(this->interface != nullptr);
|
||||||
if (hos::GetVersion() >= hos::Version_900) {
|
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||||
R_ABORT_UNLESS(this->interface->RedirectApplicationControlPath(path, id, owner_id));
|
R_ABORT_UNLESS(this->interface->RedirectApplicationControlPath(path, id, owner_id));
|
||||||
} else {
|
} else {
|
||||||
R_ABORT_UNLESS(this->interface->RedirectApplicationControlPathDeprecated(path, id));
|
R_ABORT_UNLESS(this->interface->RedirectApplicationControlPathDeprecated(path, id));
|
||||||
|
@ -77,7 +77,7 @@ namespace ams::lr {
|
||||||
|
|
||||||
void RedirectApplicationHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
void RedirectApplicationHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||||
AMS_ASSERT(this->interface != nullptr);
|
AMS_ASSERT(this->interface != nullptr);
|
||||||
if (hos::GetVersion() >= hos::Version_900) {
|
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||||
R_ABORT_UNLESS(this->interface->RedirectApplicationHtmlDocumentPath(path, id, owner_id));
|
R_ABORT_UNLESS(this->interface->RedirectApplicationHtmlDocumentPath(path, id, owner_id));
|
||||||
} else {
|
} else {
|
||||||
R_ABORT_UNLESS(this->interface->RedirectApplicationHtmlDocumentPathDeprecated(path, id));
|
R_ABORT_UNLESS(this->interface->RedirectApplicationHtmlDocumentPathDeprecated(path, id));
|
||||||
|
@ -91,7 +91,7 @@ namespace ams::lr {
|
||||||
|
|
||||||
void RedirectApplicationLegalInformationPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
void RedirectApplicationLegalInformationPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||||
AMS_ASSERT(this->interface != nullptr);
|
AMS_ASSERT(this->interface != nullptr);
|
||||||
if (hos::GetVersion() >= hos::Version_900) {
|
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||||
R_ABORT_UNLESS(this->interface->RedirectApplicationLegalInformationPath(path, id, owner_id));
|
R_ABORT_UNLESS(this->interface->RedirectApplicationLegalInformationPath(path, id, owner_id));
|
||||||
} else {
|
} else {
|
||||||
R_ABORT_UNLESS(this->interface->RedirectApplicationLegalInformationPathDeprecated(path, id));
|
R_ABORT_UNLESS(this->interface->RedirectApplicationLegalInformationPathDeprecated(path, id));
|
||||||
|
@ -105,7 +105,7 @@ namespace ams::lr {
|
||||||
|
|
||||||
void RedirectApplicationProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
void RedirectApplicationProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||||
AMS_ASSERT(this->interface != nullptr);
|
AMS_ASSERT(this->interface != nullptr);
|
||||||
if (hos::GetVersion() >= hos::Version_900) {
|
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||||
R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPath(path, id, owner_id));
|
R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPath(path, id, owner_id));
|
||||||
} else {
|
} else {
|
||||||
R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPathDeprecated(path, id));
|
R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPathDeprecated(path, id));
|
||||||
|
@ -114,13 +114,13 @@ namespace ams::lr {
|
||||||
|
|
||||||
Result ClearApplicationRedirection() {
|
Result ClearApplicationRedirection() {
|
||||||
AMS_ASSERT(this->interface != nullptr);
|
AMS_ASSERT(this->interface != nullptr);
|
||||||
AMS_ASSERT(hos::GetVersion() < hos::Version_900);
|
AMS_ASSERT(hos::GetVersion() < hos::Version_9_0_0);
|
||||||
return this->ClearApplicationRedirection(nullptr, 0);
|
return this->ClearApplicationRedirection(nullptr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result ClearApplicationRedirection(const ncm::ProgramId *excluding_ids, size_t num_ids) {
|
Result ClearApplicationRedirection(const ncm::ProgramId *excluding_ids, size_t num_ids) {
|
||||||
AMS_ASSERT(this->interface != nullptr);
|
AMS_ASSERT(this->interface != nullptr);
|
||||||
if (hos::GetVersion() >= hos::Version_900) {
|
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||||
return this->interface->ClearApplicationRedirection(sf::InArray<ncm::ProgramId>(excluding_ids, num_ids));
|
return this->interface->ClearApplicationRedirection(sf::InArray<ncm::ProgramId>(excluding_ids, num_ids));
|
||||||
} else {
|
} else {
|
||||||
return this->interface->ClearApplicationRedirectionDeprecated();
|
return this->interface->ClearApplicationRedirectionDeprecated();
|
||||||
|
@ -159,7 +159,7 @@ namespace ams::lr {
|
||||||
|
|
||||||
void RedirectApplicationProgramPathForDebug(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
void RedirectApplicationProgramPathForDebug(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||||
AMS_ASSERT(this->interface != nullptr);
|
AMS_ASSERT(this->interface != nullptr);
|
||||||
if (hos::GetVersion() >= hos::Version_900) {
|
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||||
R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPathForDebug(path, id, owner_id));
|
R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPathForDebug(path, id, owner_id));
|
||||||
} else {
|
} else {
|
||||||
R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPathForDebugDeprecated(path, id));
|
R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPathForDebugDeprecated(path, id));
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace ams::lr {
|
||||||
MAKE_SERVICE_COMMAND_META(OpenLocationResolver),
|
MAKE_SERVICE_COMMAND_META(OpenLocationResolver),
|
||||||
MAKE_SERVICE_COMMAND_META(OpenRegisteredLocationResolver),
|
MAKE_SERVICE_COMMAND_META(OpenRegisteredLocationResolver),
|
||||||
MAKE_SERVICE_COMMAND_META(RefreshLocationResolver),
|
MAKE_SERVICE_COMMAND_META(RefreshLocationResolver),
|
||||||
MAKE_SERVICE_COMMAND_META(OpenAddOnContentLocationResolver, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(OpenAddOnContentLocationResolver, hos::Version_2_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace ams::lr {
|
||||||
|
|
||||||
Result RegisterProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
Result RegisterProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||||
AMS_ASSERT(this->interface);
|
AMS_ASSERT(this->interface);
|
||||||
if (hos::GetVersion() >= hos::Version_900) {
|
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||||
return this->interface->RegisterProgramPath(path, id, owner_id);
|
return this->interface->RegisterProgramPath(path, id, owner_id);
|
||||||
} else {
|
} else {
|
||||||
return this->interface->RegisterProgramPathDeprecated(path, id);
|
return this->interface->RegisterProgramPathDeprecated(path, id);
|
||||||
|
@ -63,7 +63,7 @@ namespace ams::lr {
|
||||||
|
|
||||||
void RedirectProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
void RedirectProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||||
AMS_ASSERT(this->interface);
|
AMS_ASSERT(this->interface);
|
||||||
if (hos::GetVersion() >= hos::Version_900) {
|
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||||
R_ABORT_UNLESS(this->interface->RedirectProgramPath(path, id, owner_id));
|
R_ABORT_UNLESS(this->interface->RedirectProgramPath(path, id, owner_id));
|
||||||
} else {
|
} else {
|
||||||
R_ABORT_UNLESS(this->interface->RedirectProgramPathDeprecated(path, id));
|
R_ABORT_UNLESS(this->interface->RedirectProgramPathDeprecated(path, id));
|
||||||
|
@ -77,7 +77,7 @@ namespace ams::lr {
|
||||||
|
|
||||||
Result RegisterHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
Result RegisterHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||||
AMS_ASSERT(this->interface);
|
AMS_ASSERT(this->interface);
|
||||||
if (hos::GetVersion() >= hos::Version_900) {
|
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||||
return this->interface->RegisterHtmlDocumentPath(path, id, owner_id);
|
return this->interface->RegisterHtmlDocumentPath(path, id, owner_id);
|
||||||
} else {
|
} else {
|
||||||
return this->interface->RegisterHtmlDocumentPathDeprecated(path, id);
|
return this->interface->RegisterHtmlDocumentPathDeprecated(path, id);
|
||||||
|
@ -91,7 +91,7 @@ namespace ams::lr {
|
||||||
|
|
||||||
void RedirectHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
void RedirectHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||||
AMS_ASSERT(this->interface);
|
AMS_ASSERT(this->interface);
|
||||||
if (hos::GetVersion() >= hos::Version_900) {
|
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||||
R_ABORT_UNLESS(this->interface->RedirectHtmlDocumentPath(path, id, owner_id));
|
R_ABORT_UNLESS(this->interface->RedirectHtmlDocumentPath(path, id, owner_id));
|
||||||
} else {
|
} else {
|
||||||
R_ABORT_UNLESS(this->interface->RedirectHtmlDocumentPathDeprecated(path, id));
|
R_ABORT_UNLESS(this->interface->RedirectHtmlDocumentPathDeprecated(path, id));
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace ams::ncm {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ShouldBuildDatabase() const {
|
bool ShouldBuildDatabase() const {
|
||||||
return hos::GetVersion() < hos::Version_400 || this->build_system_database;
|
return hos::GetVersion() < hos::Version_4_0_0 || this->build_system_database;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ShouldImportDatabaseFromSignedSystemPartitionOnSd() const {
|
bool ShouldImportDatabaseFromSignedSystemPartitionOnSd() const {
|
||||||
|
|
|
@ -144,25 +144,25 @@ namespace ams::ncm {
|
||||||
|
|
||||||
Result GetRightsId(ams::fs::RightsId *out_rights_id, PlaceHolderId placeholder_id) {
|
Result GetRightsId(ams::fs::RightsId *out_rights_id, PlaceHolderId placeholder_id) {
|
||||||
AMS_ASSERT(this->interface != nullptr);
|
AMS_ASSERT(this->interface != nullptr);
|
||||||
AMS_ABORT_UNLESS(hos::GetVersion() < hos::Version_300);
|
AMS_ABORT_UNLESS(hos::GetVersion() < hos::Version_3_0_0);
|
||||||
return this->interface->GetRightsIdFromPlaceHolderIdDeprecated(out_rights_id, placeholder_id);
|
return this->interface->GetRightsIdFromPlaceHolderIdDeprecated(out_rights_id, placeholder_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result GetRightsId(ncm::RightsId *out_rights_id, PlaceHolderId placeholder_id) {
|
Result GetRightsId(ncm::RightsId *out_rights_id, PlaceHolderId placeholder_id) {
|
||||||
AMS_ASSERT(this->interface != nullptr);
|
AMS_ASSERT(this->interface != nullptr);
|
||||||
AMS_ABORT_UNLESS(hos::GetVersion() >= hos::Version_300);
|
AMS_ABORT_UNLESS(hos::GetVersion() >= hos::Version_3_0_0);
|
||||||
return this->interface->GetRightsIdFromPlaceHolderId(out_rights_id, placeholder_id);
|
return this->interface->GetRightsIdFromPlaceHolderId(out_rights_id, placeholder_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result GetRightsId(ams::fs::RightsId *out_rights_id, ContentId content_id) {
|
Result GetRightsId(ams::fs::RightsId *out_rights_id, ContentId content_id) {
|
||||||
AMS_ASSERT(this->interface != nullptr);
|
AMS_ASSERT(this->interface != nullptr);
|
||||||
AMS_ABORT_UNLESS(hos::GetVersion() < hos::Version_300);
|
AMS_ABORT_UNLESS(hos::GetVersion() < hos::Version_3_0_0);
|
||||||
return this->interface->GetRightsIdFromContentIdDeprecated(out_rights_id, content_id);
|
return this->interface->GetRightsIdFromContentIdDeprecated(out_rights_id, content_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result GetRightsId(ncm::RightsId *out_rights_id, ContentId content_id) {
|
Result GetRightsId(ncm::RightsId *out_rights_id, ContentId content_id) {
|
||||||
AMS_ASSERT(this->interface != nullptr);
|
AMS_ASSERT(this->interface != nullptr);
|
||||||
AMS_ABORT_UNLESS(hos::GetVersion() >= hos::Version_300);
|
AMS_ABORT_UNLESS(hos::GetVersion() >= hos::Version_3_0_0);
|
||||||
return this->interface->GetRightsIdFromContentId(out_rights_id, content_id);
|
return this->interface->GetRightsIdFromContentId(out_rights_id, content_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,14 +60,14 @@ namespace ams::ncm {
|
||||||
MAKE_SERVICE_COMMAND_META(VerifyContentMetaDatabase),
|
MAKE_SERVICE_COMMAND_META(VerifyContentMetaDatabase),
|
||||||
MAKE_SERVICE_COMMAND_META(OpenContentStorage),
|
MAKE_SERVICE_COMMAND_META(OpenContentStorage),
|
||||||
MAKE_SERVICE_COMMAND_META(OpenContentMetaDatabase),
|
MAKE_SERVICE_COMMAND_META(OpenContentMetaDatabase),
|
||||||
MAKE_SERVICE_COMMAND_META(CloseContentStorageForcibly, hos::Version_100, hos::Version_100),
|
MAKE_SERVICE_COMMAND_META(CloseContentStorageForcibly, hos::Version_1_0_0, hos::Version_1_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(CloseContentMetaDatabaseForcibly, hos::Version_100, hos::Version_100),
|
MAKE_SERVICE_COMMAND_META(CloseContentMetaDatabaseForcibly, hos::Version_1_0_0, hos::Version_1_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(CleanupContentMetaDatabase),
|
MAKE_SERVICE_COMMAND_META(CleanupContentMetaDatabase),
|
||||||
MAKE_SERVICE_COMMAND_META(ActivateContentStorage, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(ActivateContentStorage, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(InactivateContentStorage, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(InactivateContentStorage, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(ActivateContentMetaDatabase, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(ActivateContentMetaDatabase, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(InactivateContentMetaDatabase, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(InactivateContentMetaDatabase, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(InvalidateRightsIdCache, hos::Version_900),
|
MAKE_SERVICE_COMMAND_META(InvalidateRightsIdCache, hos::Version_9_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -88,8 +88,8 @@ namespace ams::ncm {
|
||||||
MAKE_SERVICE_COMMAND_META(HasContent),
|
MAKE_SERVICE_COMMAND_META(HasContent),
|
||||||
MAKE_SERVICE_COMMAND_META(ListContentMetaInfo),
|
MAKE_SERVICE_COMMAND_META(ListContentMetaInfo),
|
||||||
MAKE_SERVICE_COMMAND_META(GetAttributes),
|
MAKE_SERVICE_COMMAND_META(GetAttributes),
|
||||||
MAKE_SERVICE_COMMAND_META(GetRequiredApplicationVersion, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(GetRequiredApplicationVersion, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetContentIdByTypeAndIdOffset, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(GetContentIdByTypeAndIdOffset, hos::Version_5_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -110,20 +110,20 @@ namespace ams::ncm {
|
||||||
MAKE_SERVICE_COMMAND_META(ListContentId),
|
MAKE_SERVICE_COMMAND_META(ListContentId),
|
||||||
MAKE_SERVICE_COMMAND_META(GetSizeFromContentId),
|
MAKE_SERVICE_COMMAND_META(GetSizeFromContentId),
|
||||||
MAKE_SERVICE_COMMAND_META(DisableForcibly),
|
MAKE_SERVICE_COMMAND_META(DisableForcibly),
|
||||||
MAKE_SERVICE_COMMAND_META(RevertToPlaceHolder, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(RevertToPlaceHolder, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(SetPlaceHolderSize, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(SetPlaceHolderSize, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(ReadContentIdFile, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(ReadContentIdFile, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderIdDeprecated, hos::Version_200, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderIdDeprecated, hos::Version_2_0_0, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderId, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderId, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetRightsIdFromContentIdDeprecated, hos::Version_200, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(GetRightsIdFromContentIdDeprecated, hos::Version_2_0_0, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetRightsIdFromContentId, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(GetRightsIdFromContentId, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(WriteContentForDebug, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(WriteContentForDebug, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetFreeSpaceSize, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(GetFreeSpaceSize, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetTotalSpaceSize, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(GetTotalSpaceSize, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(FlushPlaceHolder, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(FlushPlaceHolder, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetSizeFromPlaceHolderId, hos::Version_400),
|
MAKE_SERVICE_COMMAND_META(GetSizeFromPlaceHolderId, hos::Version_4_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(RepairInvalidFileAttribute, hos::Version_400),
|
MAKE_SERVICE_COMMAND_META(RepairInvalidFileAttribute, hos::Version_4_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderIdWithCache, hos::Version_800),
|
MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderIdWithCache, hos::Version_8_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace ams::psc::sf {
|
||||||
MAKE_SERVICE_COMMAND_META(GetRequest),
|
MAKE_SERVICE_COMMAND_META(GetRequest),
|
||||||
MAKE_SERVICE_COMMAND_META(Acknowledge),
|
MAKE_SERVICE_COMMAND_META(Acknowledge),
|
||||||
MAKE_SERVICE_COMMAND_META(Finalize),
|
MAKE_SERVICE_COMMAND_META(Finalize),
|
||||||
MAKE_SERVICE_COMMAND_META(AcknowledgeEx, hos::Version_600), /* TODO: This is really 5.1.0... */
|
MAKE_SERVICE_COMMAND_META(AcknowledgeEx, hos::Version_6_0_0), /* TODO: This is really 5.1.0... */
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -308,7 +308,7 @@ namespace ams::boot2 {
|
||||||
|
|
||||||
/* Wait for other atmosphere mitm modules to initialize. */
|
/* Wait for other atmosphere mitm modules to initialize. */
|
||||||
R_ABORT_UNLESS(sm::mitm::WaitMitm(sm::ServiceName::Encode("set:sys")));
|
R_ABORT_UNLESS(sm::mitm::WaitMitm(sm::ServiceName::Encode("set:sys")));
|
||||||
if (hos::GetVersion() >= hos::Version_200) {
|
if (hos::GetVersion() >= hos::Version_2_0_0) {
|
||||||
R_ABORT_UNLESS(sm::mitm::WaitMitm(sm::ServiceName::Encode("bpc")));
|
R_ABORT_UNLESS(sm::mitm::WaitMitm(sm::ServiceName::Encode("bpc")));
|
||||||
} else {
|
} else {
|
||||||
R_ABORT_UNLESS(sm::mitm::WaitMitm(sm::ServiceName::Encode("bpc:c")));
|
R_ABORT_UNLESS(sm::mitm::WaitMitm(sm::ServiceName::Encode("bpc:c")));
|
||||||
|
@ -337,7 +337,7 @@ namespace ams::boot2 {
|
||||||
if (maintenance) {
|
if (maintenance) {
|
||||||
LaunchList(AdditionalMaintenanceLaunchPrograms, NumAdditionalMaintenanceLaunchPrograms);
|
LaunchList(AdditionalMaintenanceLaunchPrograms, NumAdditionalMaintenanceLaunchPrograms);
|
||||||
/* Starting in 7.0.0, npns is launched during maintenance boot. */
|
/* Starting in 7.0.0, npns is launched during maintenance boot. */
|
||||||
if (hos::GetVersion() >= hos::Version_700) {
|
if (hos::GetVersion() >= hos::Version_7_0_0) {
|
||||||
LaunchProgram(nullptr, ncm::ProgramLocation::Make(ncm::SystemProgramId::Npns, ncm::StorageId::BuiltInSystem), 0);
|
LaunchProgram(nullptr, ncm::ProgramLocation::Make(ncm::SystemProgramId::Npns, ncm::StorageId::BuiltInSystem), 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -33,11 +33,11 @@ namespace ams::cfg {
|
||||||
/* SD card helpers. */
|
/* SD card helpers. */
|
||||||
void GetPrivilegedProcessIdRange(os::ProcessId *out_min, os::ProcessId *out_max) {
|
void GetPrivilegedProcessIdRange(os::ProcessId *out_min, os::ProcessId *out_max) {
|
||||||
os::ProcessId min = os::InvalidProcessId, max = os::InvalidProcessId;
|
os::ProcessId min = os::InvalidProcessId, max = os::InvalidProcessId;
|
||||||
if (hos::GetVersion() >= hos::Version_500) {
|
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||||
/* On 5.0.0+, we can get precise limits from svcGetSystemInfo. */
|
/* On 5.0.0+, we can get precise limits from svcGetSystemInfo. */
|
||||||
R_ABORT_UNLESS(svcGetSystemInfo(reinterpret_cast<u64 *>(&min), SystemInfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Minimum));
|
R_ABORT_UNLESS(svcGetSystemInfo(reinterpret_cast<u64 *>(&min), SystemInfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Minimum));
|
||||||
R_ABORT_UNLESS(svcGetSystemInfo(reinterpret_cast<u64 *>(&max), SystemInfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Maximum));
|
R_ABORT_UNLESS(svcGetSystemInfo(reinterpret_cast<u64 *>(&max), SystemInfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Maximum));
|
||||||
} else if (hos::GetVersion() >= hos::Version_400) {
|
} else if (hos::GetVersion() >= hos::Version_4_0_0) {
|
||||||
/* On 4.0.0-4.1.0, we can get the precise limits from normal svcGetInfo. */
|
/* On 4.0.0-4.1.0, we can get the precise limits from normal svcGetInfo. */
|
||||||
R_ABORT_UNLESS(svcGetInfo(reinterpret_cast<u64 *>(&min), InfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Minimum));
|
R_ABORT_UNLESS(svcGetInfo(reinterpret_cast<u64 *>(&min), InfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Minimum));
|
||||||
R_ABORT_UNLESS(svcGetInfo(reinterpret_cast<u64 *>(&max), InfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Maximum));
|
R_ABORT_UNLESS(svcGetInfo(reinterpret_cast<u64 *>(&max), InfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Maximum));
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace ams::erpt::srv {
|
||||||
R_TRY(fs::GetSaveDataAvailableSize(std::addressof(cur_savedata_size), SystemSaveDataId));
|
R_TRY(fs::GetSaveDataAvailableSize(std::addressof(cur_savedata_size), SystemSaveDataId));
|
||||||
|
|
||||||
if (cur_journal_size < SystemSaveDataJournalSize || cur_savedata_size < SystemSaveDataSize) {
|
if (cur_journal_size < SystemSaveDataJournalSize || cur_savedata_size < SystemSaveDataSize) {
|
||||||
if (hos::GetVersion() >= hos::Version_300) {
|
if (hos::GetVersion() >= hos::Version_3_0_0) {
|
||||||
R_TRY(fs::ExtendSaveData(fs::SaveDataSpaceId::System, SystemSaveDataId, SystemSaveDataSize, SystemSaveDataJournalSize));
|
R_TRY(fs::ExtendSaveData(fs::SaveDataSpaceId::System, SystemSaveDataId, SystemSaveDataSize, SystemSaveDataJournalSize));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ namespace ams::erpt::srv {
|
||||||
|
|
||||||
Result Reporter::CollectUniqueReportFields() {
|
Result Reporter::CollectUniqueReportFields() {
|
||||||
this->occurrence_tick = os::GetSystemTick();
|
this->occurrence_tick = os::GetSystemTick();
|
||||||
if (hos::GetVersion() >= hos::Version_300) {
|
if (hos::GetVersion() >= hos::Version_3_0_0) {
|
||||||
this->steady_clock_internal_offset_seconds = time::GetStandardSteadyClockInternalOffset().GetSeconds();
|
this->steady_clock_internal_offset_seconds = time::GetStandardSteadyClockInternalOffset().GetSeconds();
|
||||||
} else {
|
} else {
|
||||||
this->steady_clock_internal_offset_seconds = 0;
|
this->steady_clock_internal_offset_seconds = 0;
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace ams::fs {
|
||||||
bool IsSignedSystemPartitionOnSdCardValidDeprecated() {
|
bool IsSignedSystemPartitionOnSdCardValidDeprecated() {
|
||||||
/* Ensure we only call with correct version. */
|
/* Ensure we only call with correct version. */
|
||||||
auto version = hos::GetVersion();
|
auto version = hos::GetVersion();
|
||||||
AMS_ABORT_UNLESS(hos::Version_400 <= version && version < hos::Version_800);
|
AMS_ABORT_UNLESS(hos::Version_4_0_0 <= version && version < hos::Version_8_0_0);
|
||||||
|
|
||||||
/* Check that the partition is valid. */
|
/* Check that the partition is valid. */
|
||||||
bool is_valid;
|
bool is_valid;
|
||||||
|
|
|
@ -37,37 +37,37 @@ namespace ams::hos {
|
||||||
|
|
||||||
switch (exosphere::GetApiInfo().GetTargetFirmware()) {
|
switch (exosphere::GetApiInfo().GetTargetFirmware()) {
|
||||||
case exosphere::TargetFirmware_100:
|
case exosphere::TargetFirmware_100:
|
||||||
g_hos_version = hos::Version_100;
|
g_hos_version = hos::Version_1_0_0;
|
||||||
break;
|
break;
|
||||||
case exosphere::TargetFirmware_200:
|
case exosphere::TargetFirmware_200:
|
||||||
g_hos_version = hos::Version_200;
|
g_hos_version = hos::Version_2_0_0;
|
||||||
break;
|
break;
|
||||||
case exosphere::TargetFirmware_300:
|
case exosphere::TargetFirmware_300:
|
||||||
g_hos_version = hos::Version_300;
|
g_hos_version = hos::Version_3_0_0;
|
||||||
break;
|
break;
|
||||||
case exosphere::TargetFirmware_400:
|
case exosphere::TargetFirmware_400:
|
||||||
g_hos_version = hos::Version_400;
|
g_hos_version = hos::Version_4_0_0;
|
||||||
break;
|
break;
|
||||||
case exosphere::TargetFirmware_500:
|
case exosphere::TargetFirmware_500:
|
||||||
g_hos_version = hos::Version_500;
|
g_hos_version = hos::Version_5_0_0;
|
||||||
break;
|
break;
|
||||||
case exosphere::TargetFirmware_600:
|
case exosphere::TargetFirmware_600:
|
||||||
case exosphere::TargetFirmware_620:
|
case exosphere::TargetFirmware_620:
|
||||||
g_hos_version = hos::Version_600;
|
g_hos_version = hos::Version_6_0_0;
|
||||||
break;
|
break;
|
||||||
case exosphere::TargetFirmware_700:
|
case exosphere::TargetFirmware_700:
|
||||||
g_hos_version = hos::Version_700;
|
g_hos_version = hos::Version_7_0_0;
|
||||||
break;
|
break;
|
||||||
case exosphere::TargetFirmware_800:
|
case exosphere::TargetFirmware_800:
|
||||||
g_hos_version = hos::Version_800;
|
g_hos_version = hos::Version_8_0_0;
|
||||||
break;
|
break;
|
||||||
case exosphere::TargetFirmware_810:
|
case exosphere::TargetFirmware_810:
|
||||||
g_hos_version = hos::Version_810;
|
g_hos_version = hos::Version_8_1_0;
|
||||||
break;
|
break;
|
||||||
case exosphere::TargetFirmware_900:
|
case exosphere::TargetFirmware_900:
|
||||||
g_hos_version = hos::Version_900;
|
g_hos_version = hos::Version_9_0_0;
|
||||||
case exosphere::TargetFirmware_910:
|
case exosphere::TargetFirmware_910:
|
||||||
g_hos_version = hos::Version_910;
|
g_hos_version = hos::Version_9_1_0;
|
||||||
break;
|
break;
|
||||||
AMS_UNREACHABLE_DEFAULT_CASE();
|
AMS_UNREACHABLE_DEFAULT_CASE();
|
||||||
}
|
}
|
||||||
|
@ -85,56 +85,56 @@ namespace ams::hos {
|
||||||
void SetVersionForLibnx() {
|
void SetVersionForLibnx() {
|
||||||
u32 major = 0, minor = 0, micro = 0;
|
u32 major = 0, minor = 0, micro = 0;
|
||||||
switch (hos::GetVersion()) {
|
switch (hos::GetVersion()) {
|
||||||
case hos::Version_100:
|
case hos::Version_1_0_0:
|
||||||
major = 1;
|
major = 1;
|
||||||
minor = 0;
|
minor = 0;
|
||||||
micro = 0;
|
micro = 0;
|
||||||
break;
|
break;
|
||||||
case hos::Version_200:
|
case hos::Version_2_0_0:
|
||||||
major = 2;
|
major = 2;
|
||||||
minor = 0;
|
minor = 0;
|
||||||
micro = 0;
|
micro = 0;
|
||||||
break;
|
break;
|
||||||
case hos::Version_300:
|
case hos::Version_3_0_0:
|
||||||
major = 3;
|
major = 3;
|
||||||
minor = 0;
|
minor = 0;
|
||||||
micro = 0;
|
micro = 0;
|
||||||
break;
|
break;
|
||||||
case hos::Version_400:
|
case hos::Version_4_0_0:
|
||||||
major = 4;
|
major = 4;
|
||||||
minor = 0;
|
minor = 0;
|
||||||
micro = 0;
|
micro = 0;
|
||||||
break;
|
break;
|
||||||
case hos::Version_500:
|
case hos::Version_5_0_0:
|
||||||
major = 5;
|
major = 5;
|
||||||
minor = 0;
|
minor = 0;
|
||||||
micro = 0;
|
micro = 0;
|
||||||
break;
|
break;
|
||||||
case hos::Version_600:
|
case hos::Version_6_0_0:
|
||||||
major = 6;
|
major = 6;
|
||||||
minor = 0;
|
minor = 0;
|
||||||
micro = 0;
|
micro = 0;
|
||||||
break;
|
break;
|
||||||
case hos::Version_700:
|
case hos::Version_7_0_0:
|
||||||
major = 7;
|
major = 7;
|
||||||
minor = 0;
|
minor = 0;
|
||||||
micro = 0;
|
micro = 0;
|
||||||
break;
|
break;
|
||||||
case hos::Version_800:
|
case hos::Version_8_0_0:
|
||||||
major = 8;
|
major = 8;
|
||||||
minor = 0;
|
minor = 0;
|
||||||
micro = 0;
|
micro = 0;
|
||||||
break;
|
break;
|
||||||
case hos::Version_810:
|
case hos::Version_8_1_0:
|
||||||
major = 8;
|
major = 8;
|
||||||
minor = 1;
|
minor = 1;
|
||||||
micro = 0;
|
micro = 0;
|
||||||
break;
|
break;
|
||||||
case hos::Version_900:
|
case hos::Version_9_0_0:
|
||||||
major = 9;
|
major = 9;
|
||||||
minor = 0;
|
minor = 0;
|
||||||
micro = 0;
|
micro = 0;
|
||||||
case hos::Version_910:
|
case hos::Version_9_1_0:
|
||||||
major = 9;
|
major = 9;
|
||||||
minor = 1;
|
minor = 1;
|
||||||
micro = 0;
|
micro = 0;
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace ams::lr {
|
||||||
/* Storage for RegisteredData entries by data id. */
|
/* Storage for RegisteredData entries by data id. */
|
||||||
RegisteredStorages<ncm::DataId, 0x800> registered_storages;
|
RegisteredStorages<ncm::DataId, 0x800> registered_storages;
|
||||||
public:
|
public:
|
||||||
AddOnContentLocationResolverImpl() : registered_storages(hos::GetVersion() < hos::Version_900 ? 0x800 : 0x2) { /* ... */ }
|
AddOnContentLocationResolverImpl() : registered_storages(hos::GetVersion() < hos::Version_9_0_0 ? 0x800 : 0x2) { /* ... */ }
|
||||||
|
|
||||||
/* Actual commands. */
|
/* Actual commands. */
|
||||||
virtual Result ResolveAddOnContentPath(sf::Out<Path> out, ncm::DataId id) override;
|
virtual Result ResolveAddOnContentPath(sf::Out<Path> out, ncm::DataId id) override;
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace ams::lr {
|
||||||
|
|
||||||
Result RegisteredLocationResolverImpl::RefreshImpl(const ncm::ProgramId *excluding_ids, size_t num_ids) {
|
Result RegisteredLocationResolverImpl::RefreshImpl(const ncm::ProgramId *excluding_ids, size_t num_ids) {
|
||||||
/* On < 9.0.0, exclusion lists were not supported yet, so simply clear and return. */
|
/* On < 9.0.0, exclusion lists were not supported yet, so simply clear and return. */
|
||||||
if (hos::GetVersion() < hos::Version_900) {
|
if (hos::GetVersion() < hos::Version_9_0_0) {
|
||||||
this->ClearRedirections();
|
this->ClearRedirections();
|
||||||
return ResultSuccess();
|
return ResultSuccess();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace ams::lr {
|
||||||
static_assert(MaxRegisteredLocations >= MaxRegisteredLocationsDeprecated);
|
static_assert(MaxRegisteredLocations >= MaxRegisteredLocationsDeprecated);
|
||||||
private:
|
private:
|
||||||
static ALWAYS_INLINE size_t GetMaxRegisteredLocations() {
|
static ALWAYS_INLINE size_t GetMaxRegisteredLocations() {
|
||||||
if (hos::GetVersion() >= hos::Version_900) {
|
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||||
return MaxRegisteredLocations;
|
return MaxRegisteredLocations;
|
||||||
} else {
|
} else {
|
||||||
return MaxRegisteredLocationsDeprecated;
|
return MaxRegisteredLocationsDeprecated;
|
||||||
|
|
|
@ -163,7 +163,7 @@ namespace ams::map {
|
||||||
R_TRY(svcGetInfo(&out->heap_size, InfoType_HeapRegionSize, process_h, 0));
|
R_TRY(svcGetInfo(&out->heap_size, InfoType_HeapRegionSize, process_h, 0));
|
||||||
R_TRY(svcGetInfo(&out->alias_base, InfoType_AliasRegionAddress, process_h, 0));
|
R_TRY(svcGetInfo(&out->alias_base, InfoType_AliasRegionAddress, process_h, 0));
|
||||||
R_TRY(svcGetInfo(&out->alias_size, InfoType_AliasRegionSize, process_h, 0));
|
R_TRY(svcGetInfo(&out->alias_size, InfoType_AliasRegionSize, process_h, 0));
|
||||||
if (hos::GetVersion() >= hos::Version_200) {
|
if (hos::GetVersion() >= hos::Version_2_0_0) {
|
||||||
R_TRY(svcGetInfo(&out->aslr_base, InfoType_AslrRegionAddress, process_h, 0));
|
R_TRY(svcGetInfo(&out->aslr_base, InfoType_AslrRegionAddress, process_h, 0));
|
||||||
R_TRY(svcGetInfo(&out->aslr_size, InfoType_AslrRegionSize, process_h, 0));
|
R_TRY(svcGetInfo(&out->aslr_size, InfoType_AslrRegionSize, process_h, 0));
|
||||||
} else {
|
} else {
|
||||||
|
@ -184,7 +184,7 @@ namespace ams::map {
|
||||||
}
|
}
|
||||||
|
|
||||||
Result LocateMappableSpace(uintptr_t *out_address, size_t size) {
|
Result LocateMappableSpace(uintptr_t *out_address, size_t size) {
|
||||||
if (hos::GetVersion() >= hos::Version_200) {
|
if (hos::GetVersion() >= hos::Version_2_0_0) {
|
||||||
return LocateMappableSpaceModern(out_address, size);
|
return LocateMappableSpaceModern(out_address, size);
|
||||||
} else {
|
} else {
|
||||||
return LocateMappableSpaceDeprecated(out_address, size);
|
return LocateMappableSpaceDeprecated(out_address, size);
|
||||||
|
@ -192,7 +192,7 @@ namespace ams::map {
|
||||||
}
|
}
|
||||||
|
|
||||||
Result MapCodeMemoryInProcess(MappedCodeMemory &out_mcm, Handle process_handle, uintptr_t base_address, size_t size) {
|
Result MapCodeMemoryInProcess(MappedCodeMemory &out_mcm, Handle process_handle, uintptr_t base_address, size_t size) {
|
||||||
if (hos::GetVersion() >= hos::Version_200) {
|
if (hos::GetVersion() >= hos::Version_2_0_0) {
|
||||||
return MapCodeMemoryInProcessModern(out_mcm, process_handle, base_address, size);
|
return MapCodeMemoryInProcessModern(out_mcm, process_handle, base_address, size);
|
||||||
} else {
|
} else {
|
||||||
return MapCodeMemoryInProcessDeprecated(out_mcm, process_handle, base_address, size);
|
return MapCodeMemoryInProcessDeprecated(out_mcm, process_handle, base_address, size);
|
||||||
|
|
|
@ -101,12 +101,12 @@ namespace ams::ncm {
|
||||||
|
|
||||||
/* Deprecated API. */
|
/* Deprecated API. */
|
||||||
Result CloseContentStorageForcibly(StorageId storage_id) {
|
Result CloseContentStorageForcibly(StorageId storage_id) {
|
||||||
AMS_ABORT_UNLESS(hos::GetVersion() == hos::Version_100);
|
AMS_ABORT_UNLESS(hos::GetVersion() == hos::Version_1_0_0);
|
||||||
return g_content_manager->CloseContentStorageForcibly(storage_id);
|
return g_content_manager->CloseContentStorageForcibly(storage_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result CloseContentMetaDatabaseForcibly(StorageId storage_id) {
|
Result CloseContentMetaDatabaseForcibly(StorageId storage_id) {
|
||||||
AMS_ABORT_UNLESS(hos::GetVersion() == hos::Version_100);
|
AMS_ABORT_UNLESS(hos::GetVersion() == hos::Version_1_0_0);
|
||||||
return g_content_manager->CloseContentMetaDatabaseForcibly(storage_id);
|
return g_content_manager->CloseContentMetaDatabaseForcibly(storage_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,11 +113,11 @@ namespace ams::ncm {
|
||||||
|
|
||||||
ALWAYS_INLINE bool IsSignedSystemPartitionOnSdCardValid(const char *bis_mount_name) {
|
ALWAYS_INLINE bool IsSignedSystemPartitionOnSdCardValid(const char *bis_mount_name) {
|
||||||
/* Signed system partition should never be checked on < 4.0.0, as it did not exist before then. */
|
/* Signed system partition should never be checked on < 4.0.0, as it did not exist before then. */
|
||||||
AMS_ABORT_UNLESS(hos::GetVersion() >= hos::Version_400);
|
AMS_ABORT_UNLESS(hos::GetVersion() >= hos::Version_4_0_0);
|
||||||
|
|
||||||
/* If we're importing from system on SD, make sure that the signed system partition is valid. */
|
/* If we're importing from system on SD, make sure that the signed system partition is valid. */
|
||||||
const auto version = hos::GetVersion();
|
const auto version = hos::GetVersion();
|
||||||
if (version >= hos::Version_800) {
|
if (version >= hos::Version_8_0_0) {
|
||||||
/* On >= 8.0.0, a simpler method was added to check validity. */
|
/* On >= 8.0.0, a simpler method was added to check validity. */
|
||||||
/* This also works on < 4.0.0 (though the system partition will never be on-sd there), */
|
/* This also works on < 4.0.0 (though the system partition will never be on-sd there), */
|
||||||
/* and so this will always return false. */
|
/* and so this will always return false. */
|
||||||
|
@ -156,7 +156,7 @@ namespace ams::ncm {
|
||||||
R_CATCH(fs::ResultTargetNotFound) {
|
R_CATCH(fs::ResultTargetNotFound) {
|
||||||
/* On 1.0.0, not all flags existed. Mask when appropriate. */
|
/* On 1.0.0, not all flags existed. Mask when appropriate. */
|
||||||
constexpr u32 SaveDataFlags100Mask = fs::SaveDataFlags_KeepAfterResettingSystemSaveData;
|
constexpr u32 SaveDataFlags100Mask = fs::SaveDataFlags_KeepAfterResettingSystemSaveData;
|
||||||
const u32 flags = (hos::GetVersion() >= hos::Version_200) ? (info.flags) : (info.flags & SaveDataFlags100Mask);
|
const u32 flags = (hos::GetVersion() >= hos::Version_2_0_0) ? (info.flags) : (info.flags & SaveDataFlags100Mask);
|
||||||
R_TRY(fs::CreateSystemSaveData(info.space_id, info.id, OwnerId, info.size, info.journal_size, flags));
|
R_TRY(fs::CreateSystemSaveData(info.space_id, info.id, OwnerId, info.size, info.journal_size, flags));
|
||||||
R_TRY(fs::MountSystemSaveData(mount_name, info.space_id, info.id));
|
R_TRY(fs::MountSystemSaveData(mount_name, info.space_id, info.id));
|
||||||
}
|
}
|
||||||
|
@ -275,7 +275,7 @@ namespace ams::ncm {
|
||||||
}
|
}
|
||||||
|
|
||||||
Result ContentManagerImpl::BuildContentMetaDatabase(StorageId storage_id) {
|
Result ContentManagerImpl::BuildContentMetaDatabase(StorageId storage_id) {
|
||||||
if (hos::GetVersion() <= hos::Version_400) {
|
if (hos::GetVersion() <= hos::Version_4_0_0) {
|
||||||
/* Temporarily activate the database. */
|
/* Temporarily activate the database. */
|
||||||
R_TRY(this->ActivateContentMetaDatabase(storage_id));
|
R_TRY(this->ActivateContentMetaDatabase(storage_id));
|
||||||
ON_SCOPE_EXIT { this->InactivateContentMetaDatabase(storage_id); };
|
ON_SCOPE_EXIT { this->InactivateContentMetaDatabase(storage_id); };
|
||||||
|
@ -357,7 +357,7 @@ namespace ams::ncm {
|
||||||
/* Ensure correct flags on the BuiltInSystem save data. */
|
/* Ensure correct flags on the BuiltInSystem save data. */
|
||||||
/* NOTE: Nintendo does not check this succeeds, and it does on older system versions. */
|
/* NOTE: Nintendo does not check this succeeds, and it does on older system versions. */
|
||||||
/* We will not check the error, either, even though this kind of defeats the call's purpose. */
|
/* We will not check the error, either, even though this kind of defeats the call's purpose. */
|
||||||
if (hos::GetVersion() >= hos::Version_200) {
|
if (hos::GetVersion() >= hos::Version_2_0_0) {
|
||||||
EnsureBuiltInSystemSaveDataFlags();
|
EnsureBuiltInSystemSaveDataFlags();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -472,7 +472,7 @@ namespace ams::ncm {
|
||||||
ContentStorageRoot *root;
|
ContentStorageRoot *root;
|
||||||
R_TRY(this->GetContentStorageRoot(std::addressof(root), storage_id));
|
R_TRY(this->GetContentStorageRoot(std::addressof(root), storage_id));
|
||||||
|
|
||||||
if (hos::GetVersion() >= hos::Version_200) {
|
if (hos::GetVersion() >= hos::Version_2_0_0) {
|
||||||
/* Obtain the content storage if already active. */
|
/* Obtain the content storage if already active. */
|
||||||
R_UNLESS(root->content_storage, GetContentStorageNotActiveResult(storage_id));
|
R_UNLESS(root->content_storage, GetContentStorageNotActiveResult(storage_id));
|
||||||
} else {
|
} else {
|
||||||
|
@ -493,7 +493,7 @@ namespace ams::ncm {
|
||||||
ContentMetaDatabaseRoot *root;
|
ContentMetaDatabaseRoot *root;
|
||||||
R_TRY(this->GetContentMetaDatabaseRoot(&root, storage_id));
|
R_TRY(this->GetContentMetaDatabaseRoot(&root, storage_id));
|
||||||
|
|
||||||
if (hos::GetVersion() >= hos::Version_200) {
|
if (hos::GetVersion() >= hos::Version_2_0_0) {
|
||||||
/* Obtain the content meta database if already active. */
|
/* Obtain the content meta database if already active. */
|
||||||
R_UNLESS(root->content_meta_database, GetContentMetaDatabaseNotActiveResult(storage_id));
|
R_UNLESS(root->content_meta_database, GetContentMetaDatabaseNotActiveResult(storage_id));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -425,7 +425,7 @@ namespace ams::ncm {
|
||||||
break;
|
break;
|
||||||
case ContentMetaType::Application:
|
case ContentMetaType::Application:
|
||||||
/* As of 9.0.0, applications can be dependent on a specific base application version. */
|
/* As of 9.0.0, applications can be dependent on a specific base application version. */
|
||||||
AMS_ABORT_UNLESS(hos::GetVersion() >= hos::Version_900);
|
AMS_ABORT_UNLESS(hos::GetVersion() >= hos::Version_9_0_0);
|
||||||
required_version = reader.GetExtendedHeader<ApplicationMetaExtendedHeader>()->required_application_version;
|
required_version = reader.GetExtendedHeader<ApplicationMetaExtendedHeader>()->required_application_version;
|
||||||
break;
|
break;
|
||||||
AMS_UNREACHABLE_DEFAULT_CASE();
|
AMS_UNREACHABLE_DEFAULT_CASE();
|
||||||
|
|
|
@ -58,7 +58,7 @@ namespace ams::ncm {
|
||||||
R_SUCCEED_IF(max_level <= 0);
|
R_SUCCEED_IF(max_level <= 0);
|
||||||
|
|
||||||
/* On 1.0.0, NotRequireFileSize was not a valid open mode. */
|
/* On 1.0.0, NotRequireFileSize was not a valid open mode. */
|
||||||
const auto open_dir_mode = hos::GetVersion() >= hos::Version_200 ? (fs::OpenDirectoryMode_All | fs::OpenDirectoryMode_NotRequireFileSize) : (fs::OpenDirectoryMode_All);
|
const auto open_dir_mode = hos::GetVersion() >= hos::Version_2_0_0 ? (fs::OpenDirectoryMode_All | fs::OpenDirectoryMode_NotRequireFileSize) : (fs::OpenDirectoryMode_All);
|
||||||
|
|
||||||
/* Retry traversal upon request. */
|
/* Retry traversal upon request. */
|
||||||
bool retry_dir_read = true;
|
bool retry_dir_read = true;
|
||||||
|
@ -153,7 +153,7 @@ namespace ams::ncm {
|
||||||
}
|
}
|
||||||
|
|
||||||
Result CleanDirectoryRecursively(const PathString &path) {
|
Result CleanDirectoryRecursively(const PathString &path) {
|
||||||
if (hos::GetVersion() >= hos::Version_300) {
|
if (hos::GetVersion() >= hos::Version_3_0_0) {
|
||||||
R_TRY(fs::CleanDirectoryRecursively(path));
|
R_TRY(fs::CleanDirectoryRecursively(path));
|
||||||
} else {
|
} else {
|
||||||
/* CleanDirectoryRecursively didn't exist on < 3.0.0, so we will polyfill it. */
|
/* CleanDirectoryRecursively didn't exist on < 3.0.0, so we will polyfill it. */
|
||||||
|
|
|
@ -35,7 +35,7 @@ namespace ams::ncm {
|
||||||
}
|
}
|
||||||
|
|
||||||
static Result GetRightsId(ncm::RightsId *out_rights_id, const Path &path) {
|
static Result GetRightsId(ncm::RightsId *out_rights_id, const Path &path) {
|
||||||
if (hos::GetVersion() >= hos::Version_300) {
|
if (hos::GetVersion() >= hos::Version_3_0_0) {
|
||||||
R_TRY(fs::GetRightsId(std::addressof(out_rights_id->id), std::addressof(out_rights_id->key_generation), path.str));
|
R_TRY(fs::GetRightsId(std::addressof(out_rights_id->id), std::addressof(out_rights_id->key_generation), path.str));
|
||||||
} else {
|
} else {
|
||||||
R_TRY(fs::GetRightsId(std::addressof(out_rights_id->id), path.str));
|
R_TRY(fs::GetRightsId(std::addressof(out_rights_id->id), path.str));
|
||||||
|
|
|
@ -129,7 +129,7 @@ namespace ams::os::impl {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadManagerHorizonImpl::YieldThread() {
|
void ThreadManagerHorizonImpl::YieldThread() {
|
||||||
if (hos::GetVersion() >= hos::Version_400) {
|
if (hos::GetVersion() >= hos::Version_4_0_0) {
|
||||||
svc::SleepThread(svc::YieldType_WithCoreMigration);
|
svc::SleepThread(svc::YieldType_WithCoreMigration);
|
||||||
} else {
|
} else {
|
||||||
svc::SleepThread(svc::YieldType_WithoutCoreMigration);
|
svc::SleepThread(svc::YieldType_WithoutCoreMigration);
|
||||||
|
|
|
@ -60,7 +60,7 @@ namespace ams::psc {
|
||||||
R_ABORT_UNLESS(res);
|
R_ABORT_UNLESS(res);
|
||||||
R_UNLESS(this->initialized, psc::ResultNotInitialized());
|
R_UNLESS(this->initialized, psc::ResultNotInitialized());
|
||||||
|
|
||||||
if (hos::GetVersion() >= hos::Version_600) {
|
if (hos::GetVersion() >= hos::Version_6_0_0) {
|
||||||
return this->intf->AcknowledgeEx(state);
|
return this->intf->AcknowledgeEx(state);
|
||||||
} else {
|
} else {
|
||||||
return this->intf->Acknowledge();
|
return this->intf->Acknowledge();
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace ams::sf::cmif {
|
||||||
Result impl::ServiceDispatchTableBase::ProcessMessageImpl(ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data, const ServiceCommandMeta *entries, const size_t entry_count) const {
|
Result impl::ServiceDispatchTableBase::ProcessMessageImpl(ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data, const ServiceCommandMeta *entries, const size_t entry_count) const {
|
||||||
/* Get versioning info. */
|
/* Get versioning info. */
|
||||||
const auto hos_version = hos::GetVersion();
|
const auto hos_version = hos::GetVersion();
|
||||||
const u32 max_cmif_version = hos_version >= hos::Version_500 ? 1 : 0;
|
const u32 max_cmif_version = hos_version >= hos::Version_5_0_0 ? 1 : 0;
|
||||||
|
|
||||||
/* Parse the CMIF in header. */
|
/* Parse the CMIF in header. */
|
||||||
const CmifInHeader *in_header = reinterpret_cast<const CmifInHeader *>(in_raw_data.GetPointer());
|
const CmifInHeader *in_header = reinterpret_cast<const CmifInHeader *>(in_raw_data.GetPointer());
|
||||||
|
@ -60,7 +60,7 @@ namespace ams::sf::cmif {
|
||||||
Result impl::ServiceDispatchTableBase::ProcessMessageForMitmImpl(ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data, const ServiceCommandMeta *entries, const size_t entry_count) const {
|
Result impl::ServiceDispatchTableBase::ProcessMessageForMitmImpl(ServiceDispatchContext &ctx, const cmif::PointerAndSize &in_raw_data, const ServiceCommandMeta *entries, const size_t entry_count) const {
|
||||||
/* Get versioning info. */
|
/* Get versioning info. */
|
||||||
const auto hos_version = hos::GetVersion();
|
const auto hos_version = hos::GetVersion();
|
||||||
const u32 max_cmif_version = hos_version >= hos::Version_500 ? 1 : 0;
|
const u32 max_cmif_version = hos_version >= hos::Version_5_0_0 ? 1 : 0;
|
||||||
|
|
||||||
/* Parse the CMIF in header. */
|
/* Parse the CMIF in header. */
|
||||||
const CmifInHeader *in_header = reinterpret_cast<const CmifInHeader *>(in_raw_data.GetPointer());
|
const CmifInHeader *in_header = reinterpret_cast<const CmifInHeader *>(in_raw_data.GetPointer());
|
||||||
|
|
|
@ -146,7 +146,7 @@ namespace ams::mitm {
|
||||||
/* Backup BIS keys. */
|
/* Backup BIS keys. */
|
||||||
{
|
{
|
||||||
u64 key_generation = 0;
|
u64 key_generation = 0;
|
||||||
if (hos::GetVersion() >= hos::Version_500) {
|
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||||
R_ABORT_UNLESS(splGetConfig(SplConfigItem_NewKeyGeneration, &key_generation));
|
R_ABORT_UNLESS(splGetConfig(SplConfigItem_NewKeyGeneration, &key_generation));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace ams::mitm::bpc {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create bpc mitm. */
|
/* Create bpc mitm. */
|
||||||
const sm::ServiceName service_name = (hos::GetVersion() >= hos::Version_200) ? MitmServiceName : DeprecatedMitmServiceName;
|
const sm::ServiceName service_name = (hos::GetVersion() >= hos::Version_2_0_0) ? MitmServiceName : DeprecatedMitmServiceName;
|
||||||
R_ABORT_UNLESS(g_server_manager.RegisterMitmServer<BpcMitmService>(service_name));
|
R_ABORT_UNLESS(g_server_manager.RegisterMitmServer<BpcMitmService>(service_name));
|
||||||
|
|
||||||
/* Loop forever, servicing our services. */
|
/* Loop forever, servicing our services. */
|
||||||
|
|
|
@ -88,8 +88,8 @@ namespace ams::mitm::fs {
|
||||||
Result OpenDataStorageByDataId(sf::Out<std::shared_ptr<IStorageInterface>> out, ncm::DataId data_id, u8 storage_id);
|
Result OpenDataStorageByDataId(sf::Out<std::shared_ptr<IStorageInterface>> out, ncm::DataId data_id, u8 storage_id);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MAKE_SERVICE_COMMAND_META(OpenFileSystemWithPatch, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(OpenFileSystemWithPatch, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(OpenFileSystemWithId, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(OpenFileSystemWithId, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(OpenSdCardFileSystem),
|
MAKE_SERVICE_COMMAND_META(OpenSdCardFileSystem),
|
||||||
MAKE_SERVICE_COMMAND_META(OpenSaveDataFileSystem),
|
MAKE_SERVICE_COMMAND_META(OpenSaveDataFileSystem),
|
||||||
MAKE_SERVICE_COMMAND_META(OpenBisStorage),
|
MAKE_SERVICE_COMMAND_META(OpenBisStorage),
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace ams::mitm::hid {
|
||||||
|
|
||||||
void MitmModule::ThreadFunction(void *arg) {
|
void MitmModule::ThreadFunction(void *arg) {
|
||||||
/* This is only necessary on 9.x+ */
|
/* This is only necessary on 9.x+ */
|
||||||
if (hos::GetVersion() < hos::Version_900) {
|
if (hos::GetVersion() < hos::Version_9_0_0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace ams::mitm::ns {
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MAKE_SERVICE_COMMAND_META(GetApplicationContentPath),
|
MAKE_SERVICE_COMMAND_META(GetApplicationContentPath),
|
||||||
MAKE_SERVICE_COMMAND_META(ResolveApplicationContentPath),
|
MAKE_SERVICE_COMMAND_META(ResolveApplicationContentPath),
|
||||||
MAKE_SERVICE_COMMAND_META(GetRunningApplicationProgramId, hos::Version_600),
|
MAKE_SERVICE_COMMAND_META(GetRunningApplicationProgramId, hos::Version_6_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace ams::mitm::ns {
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
MAKE_SERVICE_COMMAND_META(GetApplicationContentPath),
|
MAKE_SERVICE_COMMAND_META(GetApplicationContentPath),
|
||||||
MAKE_SERVICE_COMMAND_META(ResolveApplicationContentPath),
|
MAKE_SERVICE_COMMAND_META(ResolveApplicationContentPath),
|
||||||
MAKE_SERVICE_COMMAND_META(GetRunningApplicationProgramId, hos::Version_600),
|
MAKE_SERVICE_COMMAND_META(GetRunningApplicationProgramId, hos::Version_6_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace ams::mitm::ns {
|
||||||
mitm::WaitInitialized();
|
mitm::WaitInitialized();
|
||||||
|
|
||||||
/* Create mitm servers. */
|
/* Create mitm servers. */
|
||||||
if (hos::GetVersion() < hos::Version_300) {
|
if (hos::GetVersion() < hos::Version_3_0_0) {
|
||||||
R_ABORT_UNLESS(g_server_manager.RegisterMitmServer<NsAmMitmService>(NsAmMitmServiceName));
|
R_ABORT_UNLESS(g_server_manager.RegisterMitmServer<NsAmMitmService>(NsAmMitmServiceName));
|
||||||
} else {
|
} else {
|
||||||
R_ABORT_UNLESS(g_server_manager.RegisterMitmServer<NsWebMitmService>(NsWebMitmServiceName));
|
R_ABORT_UNLESS(g_server_manager.RegisterMitmServer<NsWebMitmService>(NsWebMitmServiceName));
|
||||||
|
|
|
@ -88,7 +88,7 @@ namespace ams::boot {
|
||||||
g_boot_reason = MakeBootReason(power_intr, rtc_intr & ~rtc_intr_m, nv_erc, ac_ok);
|
g_boot_reason = MakeBootReason(power_intr, rtc_intr & ~rtc_intr_m, nv_erc, ac_ok);
|
||||||
|
|
||||||
/* Set boot reason for SPL. */
|
/* Set boot reason for SPL. */
|
||||||
if (hos::GetVersion() >= hos::Version_300) {
|
if (hos::GetVersion() >= hos::Version_3_0_0) {
|
||||||
BootReasonValue boot_reason_value;
|
BootReasonValue boot_reason_value;
|
||||||
boot_reason_value.power_intr = power_intr;
|
boot_reason_value.power_intr = power_intr;
|
||||||
boot_reason_value.rtc_intr = rtc_intr & ~rtc_intr_m;
|
boot_reason_value.rtc_intr = rtc_intr & ~rtc_intr_m;
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace ams::boot {
|
||||||
|
|
||||||
void SetInitialClockConfiguration() {
|
void SetInitialClockConfiguration() {
|
||||||
/* Write mask to APBDEV_PMC_PWR_DET, then clear APBDEV_PMC_PWR_DET_VAL. */
|
/* Write mask to APBDEV_PMC_PWR_DET, then clear APBDEV_PMC_PWR_DET_VAL. */
|
||||||
const u32 mask = hos::GetVersion() >= hos::Version_600 ? InitialClockOutMask6x : InitialClockOutMask1x;
|
const u32 mask = hos::GetVersion() >= hos::Version_6_0_0 ? InitialClockOutMask6x : InitialClockOutMask1x;
|
||||||
WritePmcRegister(PmcClkOutCntrl, mask, mask);
|
WritePmcRegister(PmcClkOutCntrl, mask, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,11 +45,11 @@ namespace ams::gpio {
|
||||||
const auto hos_ver = hos::GetVersion();
|
const auto hos_ver = hos::GetVersion();
|
||||||
|
|
||||||
/* Choose GPIO map. */
|
/* Choose GPIO map. */
|
||||||
if (hos_ver >= hos::Version_200) {
|
if (hos_ver >= hos::Version_2_0_0) {
|
||||||
switch (hw_type) {
|
switch (hw_type) {
|
||||||
case spl::HardwareType::Icosa:
|
case spl::HardwareType::Icosa:
|
||||||
{
|
{
|
||||||
if (hos_ver >= hos::Version_400) {
|
if (hos_ver >= hos::Version_4_0_0) {
|
||||||
configs = InitialConfigsIcosa4x;
|
configs = InitialConfigsIcosa4x;
|
||||||
num_configs = NumInitialConfigsIcosa4x;
|
num_configs = NumInitialConfigsIcosa4x;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -169,7 +169,7 @@ namespace ams::creport {
|
||||||
this->process_info = d.info.attach_process;
|
this->process_info = d.info.attach_process;
|
||||||
|
|
||||||
/* On 5.0.0+, we want to parse out a dying message from application crashes. */
|
/* On 5.0.0+, we want to parse out a dying message from application crashes. */
|
||||||
if (hos::GetVersion() < hos::Version_500 || !IsApplication()) {
|
if (hos::GetVersion() < hos::Version_5_0_0 || !IsApplication()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ namespace ams::creport {
|
||||||
case svc::DebugException_UserBreak:
|
case svc::DebugException_UserBreak:
|
||||||
this->result = ResultUserBreak();
|
this->result = ResultUserBreak();
|
||||||
/* Try to parse out the user break result. */
|
/* Try to parse out the user break result. */
|
||||||
if (hos::GetVersion() >= hos::Version_500) {
|
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||||
svcReadDebugProcessMemory(&this->result, this->debug_handle, d.info.exception.specific.user_break.address, sizeof(this->result));
|
svcReadDebugProcessMemory(&this->result, this->debug_handle, d.info.exception.specific.user_break.address, sizeof(this->result));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -245,7 +245,7 @@ namespace ams::creport {
|
||||||
|
|
||||||
void CrashReport::ProcessDyingMessage() {
|
void CrashReport::ProcessDyingMessage() {
|
||||||
/* Dying message is only stored starting in 5.0.0. */
|
/* Dying message is only stored starting in 5.0.0. */
|
||||||
if (hos::GetVersion() < hos::Version_500) {
|
if (hos::GetVersion() < hos::Version_5_0_0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ namespace ams::creport {
|
||||||
file.WriteFormat(" Program ID: %016lx\n", this->process_info.program_id);
|
file.WriteFormat(" Program ID: %016lx\n", this->process_info.program_id);
|
||||||
file.WriteFormat(" Process ID: %016lx\n", this->process_info.process_id);
|
file.WriteFormat(" Process ID: %016lx\n", this->process_info.process_id);
|
||||||
file.WriteFormat(" Process Flags: %08x\n", this->process_info.flags);
|
file.WriteFormat(" Process Flags: %08x\n", this->process_info.flags);
|
||||||
if (hos::GetVersion() >= hos::Version_500) {
|
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||||
file.WriteFormat(" User Exception Address: %s\n", this->module_list.GetFormattedAddressString(this->process_info.user_exception_context_address));
|
file.WriteFormat(" User Exception Address: %s\n", this->module_list.GetFormattedAddressString(this->process_info.user_exception_context_address));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -348,7 +348,7 @@ namespace ams::creport {
|
||||||
this->crashed_thread.SaveToFile(file);
|
this->crashed_thread.SaveToFile(file);
|
||||||
|
|
||||||
/* Dying Message. */
|
/* Dying Message. */
|
||||||
if (hos::GetVersion() >= hos::Version_500 && this->dying_message_size != 0) {
|
if (hos::GetVersion() >= hos::Version_5_0_0 && this->dying_message_size != 0) {
|
||||||
file.WriteFormat("Dying Message Info:\n");
|
file.WriteFormat("Dying Message Info:\n");
|
||||||
file.WriteFormat(" Address: 0x%s\n", this->module_list.GetFormattedAddressString(this->dying_message_address));
|
file.WriteFormat(" Address: 0x%s\n", this->module_list.GetFormattedAddressString(this->dying_message_address));
|
||||||
file.WriteFormat(" Size: 0x%016lx\n", this->dying_message_size);
|
file.WriteFormat(" Size: 0x%016lx\n", this->dying_message_size);
|
||||||
|
|
|
@ -116,7 +116,7 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't fatal if we have extra info, or if we're 5.0.0+ and an application crashed. */
|
/* Don't fatal if we have extra info, or if we're 5.0.0+ and an application crashed. */
|
||||||
if (hos::GetVersion() >= hos::Version_500) {
|
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||||
if (g_crash_report.IsApplication()) {
|
if (g_crash_report.IsApplication()) {
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ namespace ams::dmnt::cheat::impl {
|
||||||
}
|
}
|
||||||
|
|
||||||
Result ContinueDebugEvent(Handle debug_handle) {
|
Result ContinueDebugEvent(Handle debug_handle) {
|
||||||
if (hos::GetVersion() >= hos::Version_300) {
|
if (hos::GetVersion() >= hos::Version_3_0_0) {
|
||||||
return svcContinueDebugEvent(debug_handle, 5, nullptr, 0);
|
return svcContinueDebugEvent(debug_handle, 5, nullptr, 0);
|
||||||
} else {
|
} else {
|
||||||
return svcLegacyContinueDebugEvent(debug_handle, 5, 0);
|
return svcLegacyContinueDebugEvent(debug_handle, 5, 0);
|
||||||
|
|
|
@ -67,7 +67,7 @@ void __appInit(void) {
|
||||||
R_ABORT_UNLESS(pminfoInitialize());
|
R_ABORT_UNLESS(pminfoInitialize());
|
||||||
R_ABORT_UNLESS(ldrDmntInitialize());
|
R_ABORT_UNLESS(ldrDmntInitialize());
|
||||||
/* TODO: We provide this on every sysver via ro. Do we need a shim? */
|
/* TODO: We provide this on every sysver via ro. Do we need a shim? */
|
||||||
if (hos::GetVersion() >= hos::Version_300) {
|
if (hos::GetVersion() >= hos::Version_3_0_0) {
|
||||||
R_ABORT_UNLESS(roDmntInitialize());
|
R_ABORT_UNLESS(roDmntInitialize());
|
||||||
}
|
}
|
||||||
R_ABORT_UNLESS(nsdevInitialize());
|
R_ABORT_UNLESS(nsdevInitialize());
|
||||||
|
|
|
@ -81,7 +81,7 @@ void __appInit(void) {
|
||||||
R_ABORT_UNLESS(i2cInitialize());
|
R_ABORT_UNLESS(i2cInitialize());
|
||||||
R_ABORT_UNLESS(bpcInitialize());
|
R_ABORT_UNLESS(bpcInitialize());
|
||||||
|
|
||||||
if (hos::GetVersion() >= hos::Version_800) {
|
if (hos::GetVersion() >= hos::Version_8_0_0) {
|
||||||
R_ABORT_UNLESS(clkrstInitialize());
|
R_ABORT_UNLESS(clkrstInitialize());
|
||||||
} else {
|
} else {
|
||||||
R_ABORT_UNLESS(pcvInitialize());
|
R_ABORT_UNLESS(pcvInitialize());
|
||||||
|
@ -108,7 +108,7 @@ void __appExit(void) {
|
||||||
spsmExit();
|
spsmExit();
|
||||||
psmExit();
|
psmExit();
|
||||||
lblExit();
|
lblExit();
|
||||||
if (hos::GetVersion() >= hos::Version_800) {
|
if (hos::GetVersion() >= hos::Version_8_0_0) {
|
||||||
clkrstExit();
|
clkrstExit();
|
||||||
} else {
|
} else {
|
||||||
pcvExit();
|
pcvExit();
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace ams::fatal::srv {
|
||||||
|
|
||||||
bool IsInRepair() {
|
bool IsInRepair() {
|
||||||
/* Before firmware 3.0.0, this wasn't implemented. */
|
/* Before firmware 3.0.0, this wasn't implemented. */
|
||||||
if (hos::GetVersion() < hos::Version_300) {
|
if (hos::GetVersion() < hos::Version_3_0_0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ namespace ams::fatal::srv {
|
||||||
|
|
||||||
bool NeedsRunTimeReviser() {
|
bool NeedsRunTimeReviser() {
|
||||||
/* Before firmware 5.0.0, this wasn't implemented. */
|
/* Before firmware 5.0.0, this wasn't implemented. */
|
||||||
if (hos::GetVersion() < hos::Version_500) {
|
if (hos::GetVersion() < hos::Version_5_0_0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ namespace ams::fatal::srv {
|
||||||
|
|
||||||
if (!this->context.is_creport) {
|
if (!this->context.is_creport) {
|
||||||
/* On firmware version 2.0.0, use debugging SVCs to collect information. */
|
/* On firmware version 2.0.0, use debugging SVCs to collect information. */
|
||||||
if (hos::GetVersion() >= hos::Version_200) {
|
if (hos::GetVersion() >= hos::Version_2_0_0) {
|
||||||
fatal::srv::TryCollectDebugInformation(&this->context, process_id);
|
fatal::srv::TryCollectDebugInformation(&this->context, process_id);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace ams::fatal::srv {
|
||||||
|
|
||||||
/* Task implementation. */
|
/* Task implementation. */
|
||||||
Result AdjustClockTask::AdjustClockForModule(PcvModule module, u32 hz) {
|
Result AdjustClockTask::AdjustClockForModule(PcvModule module, u32 hz) {
|
||||||
if (hos::GetVersion() >= hos::Version_800) {
|
if (hos::GetVersion() >= hos::Version_8_0_0) {
|
||||||
/* On 8.0.0+, convert to module id + use clkrst API. */
|
/* On 8.0.0+, convert to module id + use clkrst API. */
|
||||||
PcvModuleId module_id;
|
PcvModuleId module_id;
|
||||||
R_TRY(pcvGetModuleId(&module_id, module));
|
R_TRY(pcvGetModuleId(&module_id, module));
|
||||||
|
|
|
@ -93,7 +93,7 @@ namespace ams::fatal::srv {
|
||||||
ON_SCOPE_EXIT { viCloseDisplay(&temp_display); };
|
ON_SCOPE_EXIT { viCloseDisplay(&temp_display); };
|
||||||
|
|
||||||
/* Turn on the screen. */
|
/* Turn on the screen. */
|
||||||
if (hos::GetVersion() >= hos::Version_300) {
|
if (hos::GetVersion() >= hos::Version_3_0_0) {
|
||||||
R_TRY(viSetDisplayPowerState(&temp_display, ViPowerState_On));
|
R_TRY(viSetDisplayPowerState(&temp_display, ViPowerState_On));
|
||||||
} else {
|
} else {
|
||||||
/* Prior to 3.0.0, the ViPowerState enum was different (0 = Off, 1 = On). */
|
/* Prior to 3.0.0, the ViPowerState enum was different (0 = Off, 1 = On). */
|
||||||
|
@ -141,7 +141,7 @@ namespace ams::fatal::srv {
|
||||||
R_TRY(viGetDisplayLogicalResolution(&this->display, &display_width, &display_height));
|
R_TRY(viGetDisplayLogicalResolution(&this->display, &display_width, &display_height));
|
||||||
|
|
||||||
/* viSetDisplayMagnification was added in 3.0.0. */
|
/* viSetDisplayMagnification was added in 3.0.0. */
|
||||||
if (hos::GetVersion() >= hos::Version_300) {
|
if (hos::GetVersion() >= hos::Version_3_0_0) {
|
||||||
R_TRY(viSetDisplayMagnification(&this->display, 0, 0, display_width, display_height));
|
R_TRY(viSetDisplayMagnification(&this->display, 0, 0, display_width, display_height));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace ams::ldr {
|
||||||
|
|
||||||
/* Validate flags. */
|
/* Validate flags. */
|
||||||
u32 mask = ~0x1F;
|
u32 mask = ~0x1F;
|
||||||
if (hos::GetVersion() < hos::Version_700) {
|
if (hos::GetVersion() < hos::Version_7_0_0) {
|
||||||
/* 7.0.0 added 0x10 as a valid bit to NPDM flags, so before that we only check 0xF. */
|
/* 7.0.0 added 0x10 as a valid bit to NPDM flags, so before that we only check 0xF. */
|
||||||
mask = ~0xF;
|
mask = ~0xF;
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ namespace ams::ldr {
|
||||||
Meta *o_meta = &g_original_meta_cache.meta;
|
Meta *o_meta = &g_original_meta_cache.meta;
|
||||||
|
|
||||||
/* Fix pool partition. */
|
/* Fix pool partition. */
|
||||||
if (hos::GetVersion() >= hos::Version_500) {
|
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||||
meta->acid->flags = (meta->acid->flags & 0xFFFFFFC3) | (o_meta->acid->flags & 0x0000003C);
|
meta->acid->flags = (meta->acid->flags & 0xFFFFFFC3) | (o_meta->acid->flags & 0x0000003C);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,22 +84,22 @@ namespace ams::ldr {
|
||||||
|
|
||||||
Result ValidateProgramVersion(ncm::ProgramId program_id, u32 version) {
|
Result ValidateProgramVersion(ncm::ProgramId program_id, u32 version) {
|
||||||
/* No version verification is done before 8.1.0. */
|
/* No version verification is done before 8.1.0. */
|
||||||
R_SUCCEED_IF(hos::GetVersion() < hos::Version_810);
|
R_SUCCEED_IF(hos::GetVersion() < hos::Version_8_1_0);
|
||||||
|
|
||||||
/* Do version-dependent validation, if compiled to do so. */
|
/* Do version-dependent validation, if compiled to do so. */
|
||||||
#ifdef LDR_VALIDATE_PROCESS_VERSION
|
#ifdef LDR_VALIDATE_PROCESS_VERSION
|
||||||
const MinimumProgramVersion *entries = nullptr;
|
const MinimumProgramVersion *entries = nullptr;
|
||||||
size_t num_entries = 0;
|
size_t num_entries = 0;
|
||||||
switch (hos::GetVersion()) {
|
switch (hos::GetVersion()) {
|
||||||
case hos::Version_810:
|
case hos::Version_8_1_0:
|
||||||
entries = g_MinimumProgramVersions810;
|
entries = g_MinimumProgramVersions810;
|
||||||
num_entries = g_MinimumProgramVersionsCount810;
|
num_entries = g_MinimumProgramVersionsCount810;
|
||||||
break;
|
break;
|
||||||
case hos::Version_900:
|
case hos::Version_9_0_0:
|
||||||
entries = g_MinimumProgramVersions900;
|
entries = g_MinimumProgramVersions900;
|
||||||
num_entries = g_MinimumProgramVersionsCount900;
|
num_entries = g_MinimumProgramVersionsCount900;
|
||||||
break;
|
break;
|
||||||
case hos::Version_910:
|
case hos::Version_9_1_0:
|
||||||
entries = g_MinimumProgramVersions910;
|
entries = g_MinimumProgramVersions910;
|
||||||
num_entries = g_MinimumProgramVersionsCount910;
|
num_entries = g_MinimumProgramVersionsCount910;
|
||||||
break;
|
break;
|
||||||
|
@ -264,7 +264,7 @@ namespace ams::ldr {
|
||||||
flags |= svc::CreateProcessFlag_IsApplication;
|
flags |= svc::CreateProcessFlag_IsApplication;
|
||||||
|
|
||||||
/* 7.0.0+: Set OptimizeMemoryAllocation if relevant. */
|
/* 7.0.0+: Set OptimizeMemoryAllocation if relevant. */
|
||||||
if (hos::GetVersion() >= hos::Version_700) {
|
if (hos::GetVersion() >= hos::Version_7_0_0) {
|
||||||
if (meta_flags & Npdm::MetaFlag_OptimizeMemoryAllocation) {
|
if (meta_flags & Npdm::MetaFlag_OptimizeMemoryAllocation) {
|
||||||
flags |= svc::CreateProcessFlag_OptimizeMemoryAllocation;
|
flags |= svc::CreateProcessFlag_OptimizeMemoryAllocation;
|
||||||
}
|
}
|
||||||
|
@ -272,7 +272,7 @@ namespace ams::ldr {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 5.0.0+ Set Pool Partition. */
|
/* 5.0.0+ Set Pool Partition. */
|
||||||
if (hos::GetVersion() >= hos::Version_500) {
|
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||||
switch (GetPoolPartition(meta)) {
|
switch (GetPoolPartition(meta)) {
|
||||||
case Acid::PoolPartition_Application:
|
case Acid::PoolPartition_Application:
|
||||||
if (IsApplet(meta)) {
|
if (IsApplet(meta)) {
|
||||||
|
@ -293,7 +293,7 @@ namespace ams::ldr {
|
||||||
default:
|
default:
|
||||||
return ResultInvalidMeta();
|
return ResultInvalidMeta();
|
||||||
}
|
}
|
||||||
} else if (hos::GetVersion() >= hos::Version_400) {
|
} else if (hos::GetVersion() >= hos::Version_4_0_0) {
|
||||||
/* On 4.0.0+, the corresponding bit was simply "UseSecureMemory". */
|
/* On 4.0.0+, the corresponding bit was simply "UseSecureMemory". */
|
||||||
if (meta->acid->flags & Acid::AcidFlag_DeprecatedUseSecureMemory) {
|
if (meta->acid->flags & Acid::AcidFlag_DeprecatedUseSecureMemory) {
|
||||||
flags |= svc::CreateProcessFlag_DeprecatedUseSecureMemory;
|
flags |= svc::CreateProcessFlag_DeprecatedUseSecureMemory;
|
||||||
|
@ -318,7 +318,7 @@ namespace ams::ldr {
|
||||||
R_TRY(GetCreateProcessFlags(&out->flags, meta, flags));
|
R_TRY(GetCreateProcessFlags(&out->flags, meta, flags));
|
||||||
|
|
||||||
/* 3.0.0+ System Resource Size. */
|
/* 3.0.0+ System Resource Size. */
|
||||||
if (hos::GetVersion() >= hos::Version_300) {
|
if (hos::GetVersion() >= hos::Version_3_0_0) {
|
||||||
/* Validate size is aligned. */
|
/* Validate size is aligned. */
|
||||||
R_UNLESS(util::IsAligned(meta->npdm->system_resource_size, os::MemoryBlockUnitSize), ResultInvalidSize());
|
R_UNLESS(util::IsAligned(meta->npdm->system_resource_size, os::MemoryBlockUnitSize), ResultInvalidSize());
|
||||||
|
|
||||||
|
@ -374,7 +374,7 @@ namespace ams::ldr {
|
||||||
/* Calculate ASLR. */
|
/* Calculate ASLR. */
|
||||||
uintptr_t aslr_start = 0;
|
uintptr_t aslr_start = 0;
|
||||||
uintptr_t aslr_size = 0;
|
uintptr_t aslr_size = 0;
|
||||||
if (hos::GetVersion() >= hos::Version_200) {
|
if (hos::GetVersion() >= hos::Version_2_0_0) {
|
||||||
switch (out_param->flags & svc::CreateProcessFlag_AddressSpaceMask) {
|
switch (out_param->flags & svc::CreateProcessFlag_AddressSpaceMask) {
|
||||||
case svc::CreateProcessFlag_AddressSpace32Bit:
|
case svc::CreateProcessFlag_AddressSpace32Bit:
|
||||||
case svc::CreateProcessFlag_AddressSpace32BitWithoutAlias:
|
case svc::CreateProcessFlag_AddressSpace32BitWithoutAlias:
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace ams::pm::impl {
|
||||||
LaunchFlagsDeprecated_SignalOnStart = (1 << 5),
|
LaunchFlagsDeprecated_SignalOnStart = (1 << 5),
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GET_FLAG_MASK(flag) (hos_version >= hos::Version_500 ? static_cast<u32>(LaunchFlags_##flag) : static_cast<u32>(LaunchFlagsDeprecated_##flag))
|
#define GET_FLAG_MASK(flag) (hos_version >= hos::Version_5_0_0 ? static_cast<u32>(LaunchFlags_##flag) : static_cast<u32>(LaunchFlagsDeprecated_##flag))
|
||||||
|
|
||||||
inline bool ShouldSignalOnExit(u32 launch_flags) {
|
inline bool ShouldSignalOnExit(u32 launch_flags) {
|
||||||
const auto hos_version = hos::GetVersion();
|
const auto hos_version = hos::GetVersion();
|
||||||
|
@ -63,7 +63,7 @@ namespace ams::pm::impl {
|
||||||
|
|
||||||
inline bool ShouldSignalOnStart(u32 launch_flags) {
|
inline bool ShouldSignalOnStart(u32 launch_flags) {
|
||||||
const auto hos_version = hos::GetVersion();
|
const auto hos_version = hos::GetVersion();
|
||||||
if (hos_version < hos::Version_200) {
|
if (hos_version < hos::Version_2_0_0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return launch_flags & GET_FLAG_MASK(SignalOnStart);
|
return launch_flags & GET_FLAG_MASK(SignalOnStart);
|
||||||
|
@ -110,7 +110,7 @@ namespace ams::pm::impl {
|
||||||
};
|
};
|
||||||
|
|
||||||
inline u32 GetProcessEventValue(ProcessEvent event) {
|
inline u32 GetProcessEventValue(ProcessEvent event) {
|
||||||
if (hos::GetVersion() >= hos::Version_500) {
|
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||||
return static_cast<u32>(event);
|
return static_cast<u32>(event);
|
||||||
}
|
}
|
||||||
switch (event) {
|
switch (event) {
|
||||||
|
@ -241,7 +241,7 @@ namespace ams::pm::impl {
|
||||||
inline u32 GetLoaderCreateProcessFlags(u32 launch_flags) {
|
inline u32 GetLoaderCreateProcessFlags(u32 launch_flags) {
|
||||||
u32 ldr_flags = 0;
|
u32 ldr_flags = 0;
|
||||||
|
|
||||||
if (ShouldSignalOnException(launch_flags) || (hos::GetVersion() >= hos::Version_200 && !ShouldStartSuspended(launch_flags))) {
|
if (ShouldSignalOnException(launch_flags) || (hos::GetVersion() >= hos::Version_2_0_0 && !ShouldStartSuspended(launch_flags))) {
|
||||||
ldr_flags |= ldr::CreateProcessFlag_EnableDebug;
|
ldr_flags |= ldr::CreateProcessFlag_EnableDebug;
|
||||||
}
|
}
|
||||||
if (ShouldDisableAslr(launch_flags)) {
|
if (ShouldDisableAslr(launch_flags)) {
|
||||||
|
@ -283,7 +283,7 @@ namespace ams::pm::impl {
|
||||||
cfg::OverrideStatus override_status;
|
cfg::OverrideStatus override_status;
|
||||||
R_TRY(ldr::pm::AtmosphereGetProgramInfo(&program_info, &override_status, args.location));
|
R_TRY(ldr::pm::AtmosphereGetProgramInfo(&program_info, &override_status, args.location));
|
||||||
const bool is_application = (program_info.flags & ldr::ProgramInfoFlag_ApplicationTypeMask) == ldr::ProgramInfoFlag_Application;
|
const bool is_application = (program_info.flags & ldr::ProgramInfoFlag_ApplicationTypeMask) == ldr::ProgramInfoFlag_Application;
|
||||||
const bool allow_debug = (program_info.flags & ldr::ProgramInfoFlag_AllowDebug) || hos::GetVersion() < hos::Version_200;
|
const bool allow_debug = (program_info.flags & ldr::ProgramInfoFlag_AllowDebug) || hos::GetVersion() < hos::Version_2_0_0;
|
||||||
|
|
||||||
/* Ensure we only try to run one application. */
|
/* Ensure we only try to run one application. */
|
||||||
R_UNLESS(!is_application || !HasApplicationProcess(), pm::ResultApplicationRunning());
|
R_UNLESS(!is_application || !HasApplicationProcess(), pm::ResultApplicationRunning());
|
||||||
|
@ -397,7 +397,7 @@ namespace ams::pm::impl {
|
||||||
process_info->ClearSuspended();
|
process_info->ClearSuspended();
|
||||||
process_info->SetSuspendedStateChanged();
|
process_info->SetSuspendedStateChanged();
|
||||||
os::SignalSystemEvent(std::addressof(g_process_event));
|
os::SignalSystemEvent(std::addressof(g_process_event));
|
||||||
} else if (hos::GetVersion() >= hos::Version_200 && process_info->ShouldSignalOnStart()) {
|
} else if (hos::GetVersion() >= hos::Version_2_0_0 && process_info->ShouldSignalOnStart()) {
|
||||||
process_info->SetStartedStateChanged();
|
process_info->SetStartedStateChanged();
|
||||||
process_info->ClearSignalOnStart();
|
process_info->ClearSignalOnStart();
|
||||||
os::SignalSystemEvent(std::addressof(g_process_event));
|
os::SignalSystemEvent(std::addressof(g_process_event));
|
||||||
|
@ -418,11 +418,11 @@ namespace ams::pm::impl {
|
||||||
/* Free process resources, unlink from waitable manager. */
|
/* Free process resources, unlink from waitable manager. */
|
||||||
process_info->Cleanup();
|
process_info->Cleanup();
|
||||||
|
|
||||||
if (hos::GetVersion() < hos::Version_500 && process_info->ShouldSignalOnExit()) {
|
if (hos::GetVersion() < hos::Version_5_0_0 && process_info->ShouldSignalOnExit()) {
|
||||||
os::SignalSystemEvent(std::addressof(g_process_event));
|
os::SignalSystemEvent(std::addressof(g_process_event));
|
||||||
} else {
|
} else {
|
||||||
/* Handle the case where we need to keep the process alive some time longer. */
|
/* Handle the case where we need to keep the process alive some time longer. */
|
||||||
if (hos::GetVersion() >= hos::Version_500 && process_info->ShouldSignalOnExit()) {
|
if (hos::GetVersion() >= hos::Version_5_0_0 && process_info->ShouldSignalOnExit()) {
|
||||||
/* Remove from the living list. */
|
/* Remove from the living list. */
|
||||||
list->Remove(process_info);
|
list->Remove(process_info);
|
||||||
|
|
||||||
|
@ -553,7 +553,7 @@ namespace ams::pm::impl {
|
||||||
out->process_id = process.GetProcessId();
|
out->process_id = process.GetProcessId();
|
||||||
return ResultSuccess();
|
return ResultSuccess();
|
||||||
}
|
}
|
||||||
if (hos::GetVersion() < hos::Version_500 && process.ShouldSignalOnExit() && process.HasTerminated()) {
|
if (hos::GetVersion() < hos::Version_5_0_0 && process.ShouldSignalOnExit() && process.HasTerminated()) {
|
||||||
out->event = GetProcessEventValue(ProcessEvent::Exited);
|
out->event = GetProcessEventValue(ProcessEvent::Exited);
|
||||||
out->process_id = process.GetProcessId();
|
out->process_id = process.GetProcessId();
|
||||||
return ResultSuccess();
|
return ResultSuccess();
|
||||||
|
@ -562,7 +562,7 @@ namespace ams::pm::impl {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for event from exited process. */
|
/* Check for event from exited process. */
|
||||||
if (hos::GetVersion() >= hos::Version_500) {
|
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||||
ProcessListAccessor dead_list(g_dead_process_list);
|
ProcessListAccessor dead_list(g_dead_process_list);
|
||||||
|
|
||||||
if (!dead_list->empty()) {
|
if (!dead_list->empty()) {
|
||||||
|
|
|
@ -184,7 +184,7 @@ namespace ams::pm::resource {
|
||||||
|
|
||||||
/* Adjust resource limits based on hos firmware version. */
|
/* Adjust resource limits based on hos firmware version. */
|
||||||
const auto hos_version = hos::GetVersion();
|
const auto hos_version = hos::GetVersion();
|
||||||
if (hos_version >= hos::Version_400) {
|
if (hos_version >= hos::Version_4_0_0) {
|
||||||
/* 4.0.0 increased the system thread limit. */
|
/* 4.0.0 increased the system thread limit. */
|
||||||
g_resource_limits[ResourceLimitGroup_System][svc::LimitableResource_ThreadCountMax] += ExtraSystemThreadCount400;
|
g_resource_limits[ResourceLimitGroup_System][svc::LimitableResource_ThreadCountMax] += ExtraSystemThreadCount400;
|
||||||
/* 4.0.0 also took memory away from applet and gave it to system, for the Standard and StandardForSystemDev profiles. */
|
/* 4.0.0 also took memory away from applet and gave it to system, for the Standard and StandardForSystemDev profiles. */
|
||||||
|
@ -193,19 +193,19 @@ namespace ams::pm::resource {
|
||||||
g_memory_resource_limits[spl::MemoryArrangement_StandardForSystemDev][ResourceLimitGroup_System] += ExtraSystemMemorySize400;
|
g_memory_resource_limits[spl::MemoryArrangement_StandardForSystemDev][ResourceLimitGroup_System] += ExtraSystemMemorySize400;
|
||||||
g_memory_resource_limits[spl::MemoryArrangement_StandardForSystemDev][ResourceLimitGroup_Applet] -= ExtraSystemMemorySize400;
|
g_memory_resource_limits[spl::MemoryArrangement_StandardForSystemDev][ResourceLimitGroup_Applet] -= ExtraSystemMemorySize400;
|
||||||
}
|
}
|
||||||
if (hos_version >= hos::Version_500) {
|
if (hos_version >= hos::Version_5_0_0) {
|
||||||
/* 5.0.0 took more memory away from applet and gave it to system, for the Standard and StandardForSystemDev profiles. */
|
/* 5.0.0 took more memory away from applet and gave it to system, for the Standard and StandardForSystemDev profiles. */
|
||||||
g_memory_resource_limits[spl::MemoryArrangement_Standard][ResourceLimitGroup_System] += ExtraSystemMemorySize500;
|
g_memory_resource_limits[spl::MemoryArrangement_Standard][ResourceLimitGroup_System] += ExtraSystemMemorySize500;
|
||||||
g_memory_resource_limits[spl::MemoryArrangement_Standard][ResourceLimitGroup_Applet] -= ExtraSystemMemorySize500;
|
g_memory_resource_limits[spl::MemoryArrangement_Standard][ResourceLimitGroup_Applet] -= ExtraSystemMemorySize500;
|
||||||
g_memory_resource_limits[spl::MemoryArrangement_StandardForSystemDev][ResourceLimitGroup_System] += ExtraSystemMemorySize500;
|
g_memory_resource_limits[spl::MemoryArrangement_StandardForSystemDev][ResourceLimitGroup_System] += ExtraSystemMemorySize500;
|
||||||
g_memory_resource_limits[spl::MemoryArrangement_StandardForSystemDev][ResourceLimitGroup_Applet] -= ExtraSystemMemorySize500;
|
g_memory_resource_limits[spl::MemoryArrangement_StandardForSystemDev][ResourceLimitGroup_Applet] -= ExtraSystemMemorySize500;
|
||||||
}
|
}
|
||||||
if (hos_version >= hos::Version_600) {
|
if (hos_version >= hos::Version_6_0_0) {
|
||||||
/* 6.0.0 increased the system event and session limits. */
|
/* 6.0.0 increased the system event and session limits. */
|
||||||
g_resource_limits[ResourceLimitGroup_System][svc::LimitableResource_EventCountMax] += ExtraSystemEventCount600;
|
g_resource_limits[ResourceLimitGroup_System][svc::LimitableResource_EventCountMax] += ExtraSystemEventCount600;
|
||||||
g_resource_limits[ResourceLimitGroup_System][svc::LimitableResource_SessionCountMax] += ExtraSystemSessionCount600;
|
g_resource_limits[ResourceLimitGroup_System][svc::LimitableResource_SessionCountMax] += ExtraSystemSessionCount600;
|
||||||
}
|
}
|
||||||
if (hos_version >= hos::Version_900) {
|
if (hos_version >= hos::Version_9_0_0) {
|
||||||
/* 9.2.0 increased the system session limit. */
|
/* 9.2.0 increased the system session limit. */
|
||||||
/* NOTE: We don't currently support detection of minor version, so we will provide this increase on 9.0.0+. */
|
/* NOTE: We don't currently support detection of minor version, so we will provide this increase on 9.0.0+. */
|
||||||
/* This shouldn't impact any existing behavior in undesirable ways. */
|
/* This shouldn't impact any existing behavior in undesirable ways. */
|
||||||
|
@ -213,7 +213,7 @@ namespace ams::pm::resource {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 7.0.0+: Calculate the number of extra application threads available. */
|
/* 7.0.0+: Calculate the number of extra application threads available. */
|
||||||
if (hos::GetVersion() >= hos::Version_700) {
|
if (hos::GetVersion() >= hos::Version_7_0_0) {
|
||||||
/* See how many threads we have available. */
|
/* See how many threads we have available. */
|
||||||
s64 total_threads_available = 0;
|
s64 total_threads_available = 0;
|
||||||
R_ABORT_UNLESS(svc::GetResourceLimitLimitValue(&total_threads_available, GetResourceLimitHandle(ResourceLimitGroup_System), svc::LimitableResource_ThreadCountMax));
|
R_ABORT_UNLESS(svc::GetResourceLimitLimitValue(&total_threads_available, GetResourceLimitHandle(ResourceLimitGroup_System), svc::LimitableResource_ThreadCountMax));
|
||||||
|
@ -231,7 +231,7 @@ namespace ams::pm::resource {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Choose and initialize memory arrangement. */
|
/* Choose and initialize memory arrangement. */
|
||||||
if (hos_version >= hos::Version_600) {
|
if (hos_version >= hos::Version_6_0_0) {
|
||||||
/* 6.0.0 retrieves memory limit information from the kernel, rather than using a hardcoded profile. */
|
/* 6.0.0 retrieves memory limit information from the kernel, rather than using a hardcoded profile. */
|
||||||
g_memory_arrangement = spl::MemoryArrangement_Dynamic;
|
g_memory_arrangement = spl::MemoryArrangement_Dynamic;
|
||||||
|
|
||||||
|
@ -259,9 +259,9 @@ namespace ams::pm::resource {
|
||||||
/* We take memory away from applet normally, but away from application on < 3.0.0 to avoid a rare hang on boot. */
|
/* We take memory away from applet normally, but away from application on < 3.0.0 to avoid a rare hang on boot. */
|
||||||
/* NOTE: On Version 5.0.0+, we cannot set the pools so simply. We must instead modify the kernel, which we do */
|
/* NOTE: On Version 5.0.0+, we cannot set the pools so simply. We must instead modify the kernel, which we do */
|
||||||
/* via patches in fusee-secondary. */
|
/* via patches in fusee-secondary. */
|
||||||
if (hos_version < hos::Version_600) {
|
if (hos_version < hos::Version_6_0_0) {
|
||||||
const size_t extra_memory_size = hos_version == hos::Version_500 ? ExtraSystemMemorySizeAtmosphere500 : ExtraSystemMemorySizeAtmosphere;
|
const size_t extra_memory_size = hos_version == hos::Version_5_0_0 ? ExtraSystemMemorySizeAtmosphere500 : ExtraSystemMemorySizeAtmosphere;
|
||||||
const auto src_group = hos_version >= hos::Version_300 ? ResourceLimitGroup_Applet : ResourceLimitGroup_Application;
|
const auto src_group = hos_version >= hos::Version_3_0_0 ? ResourceLimitGroup_Applet : ResourceLimitGroup_Application;
|
||||||
for (size_t i = 0; i < spl::MemoryArrangement_Count; i++) {
|
for (size_t i = 0; i < spl::MemoryArrangement_Count; i++) {
|
||||||
g_memory_resource_limits[i][ResourceLimitGroup_System] += extra_memory_size;
|
g_memory_resource_limits[i][ResourceLimitGroup_System] += extra_memory_size;
|
||||||
g_memory_resource_limits[i][src_group] -= extra_memory_size;
|
g_memory_resource_limits[i][src_group] -= extra_memory_size;
|
||||||
|
@ -288,7 +288,7 @@ namespace ams::pm::resource {
|
||||||
{
|
{
|
||||||
std::scoped_lock lk(g_resource_limit_lock);
|
std::scoped_lock lk(g_resource_limit_lock);
|
||||||
|
|
||||||
if (hos::GetVersion() >= hos::Version_500) {
|
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||||
/* Starting in 5.0.0, PM does not allow for only one of the sets to fail. */
|
/* Starting in 5.0.0, PM does not allow for only one of the sets to fail. */
|
||||||
if (boost_size < g_system_memory_boost_size) {
|
if (boost_size < g_system_memory_boost_size) {
|
||||||
R_TRY(svc::SetUnsafeLimit(boost_size));
|
R_TRY(svc::SetUnsafeLimit(boost_size));
|
||||||
|
@ -338,7 +338,7 @@ namespace ams::pm::resource {
|
||||||
void WaitResourceAvailable(const ldr::ProgramInfo *info) {
|
void WaitResourceAvailable(const ldr::ProgramInfo *info) {
|
||||||
if (GetResourceLimitGroup(info) == ResourceLimitGroup_Application) {
|
if (GetResourceLimitGroup(info) == ResourceLimitGroup_Application) {
|
||||||
WaitResourceAvailable(ResourceLimitGroup_Application);
|
WaitResourceAvailable(ResourceLimitGroup_Application);
|
||||||
if (hos::GetVersion() >= hos::Version_500) {
|
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||||
WaitApplicationMemoryAvailable();
|
WaitApplicationMemoryAvailable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ namespace ams::pm::dmnt {
|
||||||
MAKE_SERVICE_COMMAND_META(HookToCreateApplicationProcess),
|
MAKE_SERVICE_COMMAND_META(HookToCreateApplicationProcess),
|
||||||
|
|
||||||
/* 6.0.0-* */
|
/* 6.0.0-* */
|
||||||
MAKE_SERVICE_COMMAND_META(ClearHook, hos::Version_600),
|
MAKE_SERVICE_COMMAND_META(ClearHook, hos::Version_6_0_0),
|
||||||
|
|
||||||
/* Atmosphere extensions. */
|
/* Atmosphere extensions. */
|
||||||
MAKE_SERVICE_COMMAND_META(AtmosphereGetProcessInfo),
|
MAKE_SERVICE_COMMAND_META(AtmosphereGetProcessInfo),
|
||||||
|
|
|
@ -190,7 +190,7 @@ int main(int argc, char **argv)
|
||||||
/* Create Services. */
|
/* Create Services. */
|
||||||
/* NOTE: Extra sessions have been added to pm:bm and pm:info to facilitate access by the rest of stratosphere. */
|
/* NOTE: Extra sessions have been added to pm:bm and pm:info to facilitate access by the rest of stratosphere. */
|
||||||
/* Also Note: PM was rewritten in 5.0.0, so the shell and dmnt services are different before/after. */
|
/* Also Note: PM was rewritten in 5.0.0, so the shell and dmnt services are different before/after. */
|
||||||
if (hos::GetVersion() >= hos::Version_500) {
|
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||||
R_ABORT_UNLESS((g_server_manager.RegisterServer<pm::shell::ShellService>(ShellServiceName, ShellMaxSessions)));
|
R_ABORT_UNLESS((g_server_manager.RegisterServer<pm::shell::ShellService>(ShellServiceName, ShellMaxSessions)));
|
||||||
R_ABORT_UNLESS((g_server_manager.RegisterServer<pm::dmnt::DebugMonitorService>(DebugMonitorServiceName, DebugMonitorMaxSessions)));
|
R_ABORT_UNLESS((g_server_manager.RegisterServer<pm::dmnt::DebugMonitorService>(DebugMonitorServiceName, DebugMonitorMaxSessions)));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -63,10 +63,10 @@ namespace ams::pm::shell {
|
||||||
MAKE_SERVICE_COMMAND_META(BoostSystemMemoryResourceLimit),
|
MAKE_SERVICE_COMMAND_META(BoostSystemMemoryResourceLimit),
|
||||||
|
|
||||||
/* 7.0.0-* */
|
/* 7.0.0-* */
|
||||||
MAKE_SERVICE_COMMAND_META(BoostApplicationThreadResourceLimit, hos::Version_700),
|
MAKE_SERVICE_COMMAND_META(BoostApplicationThreadResourceLimit, hos::Version_7_0_0),
|
||||||
|
|
||||||
/* 8.0.0-* */
|
/* 8.0.0-* */
|
||||||
MAKE_SERVICE_COMMAND_META(GetBootFinishedEventHandle, hos::Version_800),
|
MAKE_SERVICE_COMMAND_META(GetBootFinishedEventHandle, hos::Version_8_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ namespace ams::pm::shell {
|
||||||
MAKE_SERVICE_COMMAND_META(GetApplicationProcessIdForShell),
|
MAKE_SERVICE_COMMAND_META(GetApplicationProcessIdForShell),
|
||||||
|
|
||||||
/* 4.0.0-4.1.0 */
|
/* 4.0.0-4.1.0 */
|
||||||
MAKE_SERVICE_COMMAND_META(BoostSystemMemoryResourceLimit, hos::Version_400),
|
MAKE_SERVICE_COMMAND_META(BoostSystemMemoryResourceLimit, hos::Version_4_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ namespace ams::ro::impl {
|
||||||
/* Helper functions. */
|
/* Helper functions. */
|
||||||
|
|
||||||
Result GetCertificationModulus(const u8 **out, u32 key_generation) {
|
Result GetCertificationModulus(const u8 **out, u32 key_generation) {
|
||||||
if (hos::GetVersion() >= hos::Version_910) {
|
if (hos::GetVersion() >= hos::Version_9_1_0) {
|
||||||
R_UNLESS(key_generation <= KeyGenerationMax910, ro::ResultNotAuthorized());
|
R_UNLESS(key_generation <= KeyGenerationMax910, ro::ResultNotAuthorized());
|
||||||
} else {
|
} else {
|
||||||
R_UNLESS(key_generation <= KeyGenerationMax100, ro::ResultNotAuthorized());
|
R_UNLESS(key_generation <= KeyGenerationMax100, ro::ResultNotAuthorized());
|
||||||
|
@ -182,7 +182,7 @@ namespace ams::ro::impl {
|
||||||
R_UNLESS(header->GetProgramId() == program_id, ResultInvalidNrr());
|
R_UNLESS(header->GetProgramId() == program_id, ResultInvalidNrr());
|
||||||
|
|
||||||
/* Check type. */
|
/* Check type. */
|
||||||
if (hos::GetVersion() >= hos::Version_700 && enforce_type) {
|
if (hos::GetVersion() >= hos::Version_7_0_0 && enforce_type) {
|
||||||
R_UNLESS(header->GetType() == expected_type, ResultInvalidNrrType());
|
R_UNLESS(header->GetType() == expected_type, ResultInvalidNrrType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ namespace ams::ro::impl {
|
||||||
}
|
}
|
||||||
|
|
||||||
ncm::ProgramId program_id = ncm::InvalidProgramId;
|
ncm::ProgramId program_id = ncm::InvalidProgramId;
|
||||||
if (hos::GetVersion() >= hos::Version_300) {
|
if (hos::GetVersion() >= hos::Version_3_0_0) {
|
||||||
/* 3.0.0+: Use svcGetInfo. */
|
/* 3.0.0+: Use svcGetInfo. */
|
||||||
R_ABORT_UNLESS(svcGetInfo(&program_id.value, InfoType_ProgramId, process_h, 0));
|
R_ABORT_UNLESS(svcGetInfo(&program_id.value, InfoType_ProgramId, process_h, 0));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -64,7 +64,7 @@ void __appInit(void) {
|
||||||
R_ABORT_UNLESS(setsysInitialize());
|
R_ABORT_UNLESS(setsysInitialize());
|
||||||
R_ABORT_UNLESS(fsInitialize());
|
R_ABORT_UNLESS(fsInitialize());
|
||||||
R_ABORT_UNLESS(splInitialize());
|
R_ABORT_UNLESS(splInitialize());
|
||||||
if (hos::GetVersion() < hos::Version_300) {
|
if (hos::GetVersion() < hos::Version_3_0_0) {
|
||||||
R_ABORT_UNLESS(pminfoInitialize());
|
R_ABORT_UNLESS(pminfoInitialize());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -76,7 +76,7 @@ void __appInit(void) {
|
||||||
|
|
||||||
void __appExit(void) {
|
void __appExit(void) {
|
||||||
fsExit();
|
fsExit();
|
||||||
if (hos::GetVersion() < hos::Version_300) {
|
if (hos::GetVersion() < hos::Version_3_0_0) {
|
||||||
pminfoExit();
|
pminfoExit();
|
||||||
}
|
}
|
||||||
setsysExit();
|
setsysExit();
|
||||||
|
@ -119,7 +119,7 @@ int main(int argc, char **argv)
|
||||||
R_ABORT_UNLESS((g_server_manager.RegisterServer<ro::DebugMonitorService>(DebugMonitorServiceName, DebugMonitorMaxSessions)));
|
R_ABORT_UNLESS((g_server_manager.RegisterServer<ro::DebugMonitorService>(DebugMonitorServiceName, DebugMonitorMaxSessions)));
|
||||||
|
|
||||||
R_ABORT_UNLESS((g_server_manager.RegisterServer<ro::Service, +MakeRoServiceForSelf>(ForSelfServiceName, ForSelfMaxSessions)));
|
R_ABORT_UNLESS((g_server_manager.RegisterServer<ro::Service, +MakeRoServiceForSelf>(ForSelfServiceName, ForSelfMaxSessions)));
|
||||||
if (hos::GetVersion() >= hos::Version_700) {
|
if (hos::GetVersion() >= hos::Version_7_0_0) {
|
||||||
R_ABORT_UNLESS((g_server_manager.RegisterServer<ro::Service, +MakeRoServiceForOthers>(ForOthersServiceName, ForOthersMaxSessions)));
|
R_ABORT_UNLESS((g_server_manager.RegisterServer<ro::Service, +MakeRoServiceForOthers>(ForOthersServiceName, ForOthersMaxSessions)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace ams::ro {
|
||||||
MAKE_SERVICE_COMMAND_META(LoadNrr),
|
MAKE_SERVICE_COMMAND_META(LoadNrr),
|
||||||
MAKE_SERVICE_COMMAND_META(UnloadNrr),
|
MAKE_SERVICE_COMMAND_META(UnloadNrr),
|
||||||
MAKE_SERVICE_COMMAND_META(Initialize),
|
MAKE_SERVICE_COMMAND_META(Initialize),
|
||||||
MAKE_SERVICE_COMMAND_META(LoadNrrEx, hos::Version_700),
|
MAKE_SERVICE_COMMAND_META(LoadNrrEx, hos::Version_7_0_0),
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -479,7 +479,7 @@ namespace ams::sm::impl {
|
||||||
/* that will never register. Thus, in the interest of not breaking every single piece of homebrew */
|
/* that will never register. Thus, in the interest of not breaking every single piece of homebrew */
|
||||||
/* we will provide a little first class help. */
|
/* we will provide a little first class help. */
|
||||||
constexpr ServiceName ApmP = ServiceName::Encode("apm:p");
|
constexpr ServiceName ApmP = ServiceName::Encode("apm:p");
|
||||||
R_UNLESS((hos::GetVersion() < hos::Version_800) || (service != ApmP), sm::ResultNotAllowed());
|
R_UNLESS((hos::GetVersion() < hos::Version_8_0_0) || (service != ApmP), sm::ResultNotAllowed());
|
||||||
|
|
||||||
/* Check that the process is registered and allowed to get the service. */
|
/* Check that the process is registered and allowed to get the service. */
|
||||||
if (!IsInitialProcess(process_id)) {
|
if (!IsInitialProcess(process_id)) {
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace ams::spl::impl {
|
||||||
|
|
||||||
/* Max Keyslots helper. */
|
/* Max Keyslots helper. */
|
||||||
inline size_t GetMaxKeyslots() {
|
inline size_t GetMaxKeyslots() {
|
||||||
return (hos::GetVersion() >= hos::Version_600) ? MaxAesKeyslots : MaxAesKeyslotsDeprecated;
|
return (hos::GetVersion() >= hos::Version_6_0_0) ? MaxAesKeyslots : MaxAesKeyslotsDeprecated;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Type definitions. */
|
/* Type definitions. */
|
||||||
|
@ -203,7 +203,7 @@ namespace ams::spl::impl {
|
||||||
/* Internal Keyslot utility. */
|
/* Internal Keyslot utility. */
|
||||||
Result ValidateAesKeyslot(u32 keyslot, const void *owner) {
|
Result ValidateAesKeyslot(u32 keyslot, const void *owner) {
|
||||||
R_UNLESS(keyslot < GetMaxKeyslots(), spl::ResultInvalidKeyslot());
|
R_UNLESS(keyslot < GetMaxKeyslots(), spl::ResultInvalidKeyslot());
|
||||||
R_UNLESS((g_keyslot_owners[keyslot] == owner || hos::GetVersion() == hos::Version_100), spl::ResultInvalidKeyslot());
|
R_UNLESS((g_keyslot_owners[keyslot] == owner || hos::GetVersion() == hos::Version_1_0_0), spl::ResultInvalidKeyslot());
|
||||||
return ResultSuccess();
|
return ResultSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ namespace ams::spl::impl {
|
||||||
|
|
||||||
armDCacheFlush(layout, sizeof(*layout));
|
armDCacheFlush(layout, sizeof(*layout));
|
||||||
smc::Result smc_res;
|
smc::Result smc_res;
|
||||||
if (hos::GetVersion() >= hos::Version_500) {
|
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||||
smc_res = smc::DecryptOrImportRsaPrivateKey(layout->data, src_size, access_key, key_source, static_cast<smc::DecryptOrImportMode>(option));
|
smc_res = smc::DecryptOrImportRsaPrivateKey(layout->data, src_size, access_key, key_source, static_cast<smc::DecryptOrImportMode>(option));
|
||||||
} else {
|
} else {
|
||||||
smc_res = smc::ImportSecureExpModKey(layout->data, src_size, access_key, key_source, option);
|
smc_res = smc::ImportSecureExpModKey(layout->data, src_size, access_key, key_source, option);
|
||||||
|
@ -582,7 +582,7 @@ namespace ams::spl::impl {
|
||||||
}
|
}
|
||||||
|
|
||||||
Result AllocateAesKeyslot(u32 *out_keyslot, const void *owner) {
|
Result AllocateAesKeyslot(u32 *out_keyslot, const void *owner) {
|
||||||
if (hos::GetVersion() <= hos::Version_100) {
|
if (hos::GetVersion() <= hos::Version_1_0_0) {
|
||||||
/* On 1.0.0, keyslots were kind of a wild west. */
|
/* On 1.0.0, keyslots were kind of a wild west. */
|
||||||
*out_keyslot = 0;
|
*out_keyslot = 0;
|
||||||
return ResultSuccess();
|
return ResultSuccess();
|
||||||
|
@ -601,7 +601,7 @@ namespace ams::spl::impl {
|
||||||
}
|
}
|
||||||
|
|
||||||
Result FreeAesKeyslot(u32 keyslot, const void *owner) {
|
Result FreeAesKeyslot(u32 keyslot, const void *owner) {
|
||||||
if (hos::GetVersion() <= hos::Version_100) {
|
if (hos::GetVersion() <= hos::Version_1_0_0) {
|
||||||
/* On 1.0.0, keyslots were kind of a wild west. */
|
/* On 1.0.0, keyslots were kind of a wild west. */
|
||||||
return ResultSuccess();
|
return ResultSuccess();
|
||||||
}
|
}
|
||||||
|
@ -636,7 +636,7 @@ namespace ams::spl::impl {
|
||||||
|
|
||||||
smc::Result smc_res;
|
smc::Result smc_res;
|
||||||
size_t copy_size = 0;
|
size_t copy_size = 0;
|
||||||
if (hos::GetVersion() >= hos::Version_500) {
|
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||||
copy_size = std::min(dst_size, src_size - RsaPrivateKeyMetaSize);
|
copy_size = std::min(dst_size, src_size - RsaPrivateKeyMetaSize);
|
||||||
smc_res = smc::DecryptOrImportRsaPrivateKey(layout->data, src_size, access_key, key_source, static_cast<smc::DecryptOrImportMode>(option));
|
smc_res = smc::DecryptOrImportRsaPrivateKey(layout->data, src_size, access_key, key_source, static_cast<smc::DecryptOrImportMode>(option));
|
||||||
} else {
|
} else {
|
||||||
|
@ -663,7 +663,7 @@ namespace ams::spl::impl {
|
||||||
|
|
||||||
/* ES */
|
/* ES */
|
||||||
Result ImportEsKey(const void *src, size_t src_size, const AccessKey &access_key, const KeySource &key_source, u32 option) {
|
Result ImportEsKey(const void *src, size_t src_size, const AccessKey &access_key, const KeySource &key_source, u32 option) {
|
||||||
if (hos::GetVersion() >= hos::Version_500) {
|
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||||
return ImportSecureExpModKey(src, src_size, access_key, key_source, option);
|
return ImportSecureExpModKey(src, src_size, access_key, key_source, option);
|
||||||
} else {
|
} else {
|
||||||
struct ImportEsKeyLayout {
|
struct ImportEsKeyLayout {
|
||||||
|
|
|
@ -40,17 +40,17 @@ namespace ams::spl {
|
||||||
MAKE_SERVICE_COMMAND_META(SetConfig),
|
MAKE_SERVICE_COMMAND_META(SetConfig),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateRandomBytes),
|
MAKE_SERVICE_COMMAND_META(GenerateRandomBytes),
|
||||||
MAKE_SERVICE_COMMAND_META(IsDevelopment),
|
MAKE_SERVICE_COMMAND_META(IsDevelopment),
|
||||||
MAKE_SERVICE_COMMAND_META(SetBootReason, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(SetBootReason, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetBootReason, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(GetBootReason, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateAesKek),
|
MAKE_SERVICE_COMMAND_META(GenerateAesKek),
|
||||||
MAKE_SERVICE_COMMAND_META(LoadAesKey),
|
MAKE_SERVICE_COMMAND_META(LoadAesKey),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateAesKey),
|
MAKE_SERVICE_COMMAND_META(GenerateAesKey),
|
||||||
MAKE_SERVICE_COMMAND_META(DecryptAesKey),
|
MAKE_SERVICE_COMMAND_META(DecryptAesKey),
|
||||||
MAKE_SERVICE_COMMAND_META(CryptAesCtr),
|
MAKE_SERVICE_COMMAND_META(CryptAesCtr),
|
||||||
MAKE_SERVICE_COMMAND_META(ComputeCmac),
|
MAKE_SERVICE_COMMAND_META(ComputeCmac),
|
||||||
MAKE_SERVICE_COMMAND_META(AllocateAesKeyslot, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(AllocateAesKeyslot, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(FreeAesKeyslot, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(FreeAesKeyslot, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetAesKeyslotAvailableEvent, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(GetAesKeyslotAvailableEvent, hos::Version_2_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -103,26 +103,26 @@ namespace ams::spl {
|
||||||
MAKE_SERVICE_COMMAND_META(DecryptRsaPrivateKey),
|
MAKE_SERVICE_COMMAND_META(DecryptRsaPrivateKey),
|
||||||
MAKE_SERVICE_COMMAND_META(DecryptAesKey),
|
MAKE_SERVICE_COMMAND_META(DecryptAesKey),
|
||||||
|
|
||||||
MAKE_SERVICE_COMMAND_META(CryptAesCtrDeprecated, hos::Version_100, hos::Version_100),
|
MAKE_SERVICE_COMMAND_META(CryptAesCtrDeprecated, hos::Version_1_0_0, hos::Version_1_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(CryptAesCtr, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(CryptAesCtr, hos::Version_2_0_0),
|
||||||
|
|
||||||
MAKE_SERVICE_COMMAND_META(ComputeCmac),
|
MAKE_SERVICE_COMMAND_META(ComputeCmac),
|
||||||
MAKE_SERVICE_COMMAND_META(ImportEsKey),
|
MAKE_SERVICE_COMMAND_META(ImportEsKey),
|
||||||
|
|
||||||
MAKE_SERVICE_COMMAND_META(UnwrapTitleKeyDeprecated, hos::Version_100, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(UnwrapTitleKeyDeprecated, hos::Version_1_0_0, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(UnwrapTitleKey, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(UnwrapTitleKey, hos::Version_3_0_0),
|
||||||
|
|
||||||
MAKE_SERVICE_COMMAND_META(LoadTitleKey),
|
MAKE_SERVICE_COMMAND_META(LoadTitleKey),
|
||||||
|
|
||||||
MAKE_SERVICE_COMMAND_META(UnwrapCommonTitleKeyDeprecated, hos::Version_200, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(UnwrapCommonTitleKeyDeprecated, hos::Version_2_0_0, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(UnwrapCommonTitleKey, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(UnwrapCommonTitleKey, hos::Version_3_0_0),
|
||||||
|
|
||||||
MAKE_SERVICE_COMMAND_META(AllocateAesKeyslot, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(AllocateAesKeyslot, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(FreeAesKeyslot, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(FreeAesKeyslot, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetAesKeyslotAvailableEvent, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(GetAesKeyslotAvailableEvent, hos::Version_2_0_0),
|
||||||
|
|
||||||
MAKE_SERVICE_COMMAND_META(SetBootReason, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(SetBootReason, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetBootReason, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(GetBootReason, hos::Version_3_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -39,27 +39,27 @@ namespace ams::spl {
|
||||||
MAKE_SERVICE_COMMAND_META(SetConfig),
|
MAKE_SERVICE_COMMAND_META(SetConfig),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateRandomBytes),
|
MAKE_SERVICE_COMMAND_META(GenerateRandomBytes),
|
||||||
MAKE_SERVICE_COMMAND_META(IsDevelopment),
|
MAKE_SERVICE_COMMAND_META(IsDevelopment),
|
||||||
MAKE_SERVICE_COMMAND_META(SetBootReason, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(SetBootReason, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetBootReason, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(GetBootReason, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateAesKek),
|
MAKE_SERVICE_COMMAND_META(GenerateAesKek),
|
||||||
MAKE_SERVICE_COMMAND_META(LoadAesKey),
|
MAKE_SERVICE_COMMAND_META(LoadAesKey),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateAesKey),
|
MAKE_SERVICE_COMMAND_META(GenerateAesKey),
|
||||||
MAKE_SERVICE_COMMAND_META(DecryptAesKey),
|
MAKE_SERVICE_COMMAND_META(DecryptAesKey),
|
||||||
MAKE_SERVICE_COMMAND_META(CryptAesCtr),
|
MAKE_SERVICE_COMMAND_META(CryptAesCtr),
|
||||||
MAKE_SERVICE_COMMAND_META(ComputeCmac),
|
MAKE_SERVICE_COMMAND_META(ComputeCmac),
|
||||||
MAKE_SERVICE_COMMAND_META(AllocateAesKeyslot, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(AllocateAesKeyslot, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(FreeAesKeyslot, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(FreeAesKeyslot, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetAesKeyslotAvailableEvent, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(GetAesKeyslotAvailableEvent, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(DecryptRsaPrivateKeyDeprecated, hos::Version_400, hos::Version_400),
|
MAKE_SERVICE_COMMAND_META(DecryptRsaPrivateKeyDeprecated, hos::Version_4_0_0, hos::Version_4_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(DecryptRsaPrivateKey, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(DecryptRsaPrivateKey, hos::Version_5_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(ImportEsKeyDeprecated, hos::Version_400, hos::Version_400),
|
MAKE_SERVICE_COMMAND_META(ImportEsKeyDeprecated, hos::Version_4_0_0, hos::Version_4_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(ImportEsKey, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(ImportEsKey, hos::Version_5_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(UnwrapTitleKey),
|
MAKE_SERVICE_COMMAND_META(UnwrapTitleKey),
|
||||||
MAKE_SERVICE_COMMAND_META(UnwrapCommonTitleKey, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(UnwrapCommonTitleKey, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(ImportDrmKey, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(ImportDrmKey, hos::Version_5_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(DrmExpMod, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(DrmExpMod, hos::Version_5_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(UnwrapElicenseKey, hos::Version_600),
|
MAKE_SERVICE_COMMAND_META(UnwrapElicenseKey, hos::Version_6_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(LoadElicenseKey, hos::Version_600),
|
MAKE_SERVICE_COMMAND_META(LoadElicenseKey, hos::Version_6_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -37,23 +37,23 @@ namespace ams::spl {
|
||||||
MAKE_SERVICE_COMMAND_META(SetConfig),
|
MAKE_SERVICE_COMMAND_META(SetConfig),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateRandomBytes),
|
MAKE_SERVICE_COMMAND_META(GenerateRandomBytes),
|
||||||
MAKE_SERVICE_COMMAND_META(IsDevelopment),
|
MAKE_SERVICE_COMMAND_META(IsDevelopment),
|
||||||
MAKE_SERVICE_COMMAND_META(SetBootReason, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(SetBootReason, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetBootReason, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(GetBootReason, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateAesKek),
|
MAKE_SERVICE_COMMAND_META(GenerateAesKek),
|
||||||
MAKE_SERVICE_COMMAND_META(LoadAesKey),
|
MAKE_SERVICE_COMMAND_META(LoadAesKey),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateAesKey),
|
MAKE_SERVICE_COMMAND_META(GenerateAesKey),
|
||||||
MAKE_SERVICE_COMMAND_META(DecryptAesKey),
|
MAKE_SERVICE_COMMAND_META(DecryptAesKey),
|
||||||
MAKE_SERVICE_COMMAND_META(CryptAesCtr),
|
MAKE_SERVICE_COMMAND_META(CryptAesCtr),
|
||||||
MAKE_SERVICE_COMMAND_META(ComputeCmac),
|
MAKE_SERVICE_COMMAND_META(ComputeCmac),
|
||||||
MAKE_SERVICE_COMMAND_META(AllocateAesKeyslot, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(AllocateAesKeyslot, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(FreeAesKeyslot, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(FreeAesKeyslot, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetAesKeyslotAvailableEvent, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(GetAesKeyslotAvailableEvent, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(ImportLotusKeyDeprecated, hos::Version_400, hos::Version_400),
|
MAKE_SERVICE_COMMAND_META(ImportLotusKeyDeprecated, hos::Version_4_0_0, hos::Version_4_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(ImportLotusKey, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(ImportLotusKey, hos::Version_5_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(DecryptLotusMessage),
|
MAKE_SERVICE_COMMAND_META(DecryptLotusMessage),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateSpecificAesKey),
|
MAKE_SERVICE_COMMAND_META(GenerateSpecificAesKey),
|
||||||
MAKE_SERVICE_COMMAND_META(LoadTitleKey),
|
MAKE_SERVICE_COMMAND_META(LoadTitleKey),
|
||||||
MAKE_SERVICE_COMMAND_META(GetPackage2Hash, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(GetPackage2Hash, hos::Version_5_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -85,8 +85,8 @@ namespace ams::spl {
|
||||||
MAKE_SERVICE_COMMAND_META(SetConfig),
|
MAKE_SERVICE_COMMAND_META(SetConfig),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateRandomBytes),
|
MAKE_SERVICE_COMMAND_META(GenerateRandomBytes),
|
||||||
MAKE_SERVICE_COMMAND_META(IsDevelopment),
|
MAKE_SERVICE_COMMAND_META(IsDevelopment),
|
||||||
MAKE_SERVICE_COMMAND_META(SetBootReason, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(SetBootReason, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetBootReason, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(GetBootReason, hos::Version_3_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -134,13 +134,13 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
/* Create services. */
|
/* Create services. */
|
||||||
R_ABORT_UNLESS(g_server_manager.RegisterServer<spl::RandomService>(RandomServiceName, RandomMaxSessions));
|
R_ABORT_UNLESS(g_server_manager.RegisterServer<spl::RandomService>(RandomServiceName, RandomMaxSessions));
|
||||||
if (hos::GetVersion() >= hos::Version_400) {
|
if (hos::GetVersion() >= hos::Version_4_0_0) {
|
||||||
R_ABORT_UNLESS(g_server_manager.RegisterServer<spl::GeneralService>(GeneralServiceName, GeneralMaxSessions));
|
R_ABORT_UNLESS(g_server_manager.RegisterServer<spl::GeneralService>(GeneralServiceName, GeneralMaxSessions));
|
||||||
R_ABORT_UNLESS(g_server_manager.RegisterServer<spl::CryptoService>(CryptoServiceName, CryptoMaxSessions));
|
R_ABORT_UNLESS(g_server_manager.RegisterServer<spl::CryptoService>(CryptoServiceName, CryptoMaxSessions));
|
||||||
R_ABORT_UNLESS(g_server_manager.RegisterServer<spl::SslService>(SslServiceName, SslMaxSessions));
|
R_ABORT_UNLESS(g_server_manager.RegisterServer<spl::SslService>(SslServiceName, SslMaxSessions));
|
||||||
R_ABORT_UNLESS(g_server_manager.RegisterServer<spl::EsService>(EsServiceName, EsMaxSessions));
|
R_ABORT_UNLESS(g_server_manager.RegisterServer<spl::EsService>(EsServiceName, EsMaxSessions));
|
||||||
R_ABORT_UNLESS(g_server_manager.RegisterServer<spl::FsService>(FsServiceName, FsMaxSessions));
|
R_ABORT_UNLESS(g_server_manager.RegisterServer<spl::FsService>(FsServiceName, FsMaxSessions));
|
||||||
if (hos::GetVersion() >= hos::Version_500) {
|
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||||
R_ABORT_UNLESS(g_server_manager.RegisterServer<spl::ManuService>(ManuServiceName, ManuMaxSessions));
|
R_ABORT_UNLESS(g_server_manager.RegisterServer<spl::ManuService>(ManuServiceName, ManuMaxSessions));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -33,20 +33,20 @@ namespace ams::spl {
|
||||||
MAKE_SERVICE_COMMAND_META(SetConfig),
|
MAKE_SERVICE_COMMAND_META(SetConfig),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateRandomBytes),
|
MAKE_SERVICE_COMMAND_META(GenerateRandomBytes),
|
||||||
MAKE_SERVICE_COMMAND_META(IsDevelopment),
|
MAKE_SERVICE_COMMAND_META(IsDevelopment),
|
||||||
MAKE_SERVICE_COMMAND_META(SetBootReason, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(SetBootReason, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetBootReason, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(GetBootReason, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateAesKek),
|
MAKE_SERVICE_COMMAND_META(GenerateAesKek),
|
||||||
MAKE_SERVICE_COMMAND_META(LoadAesKey),
|
MAKE_SERVICE_COMMAND_META(LoadAesKey),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateAesKey),
|
MAKE_SERVICE_COMMAND_META(GenerateAesKey),
|
||||||
MAKE_SERVICE_COMMAND_META(DecryptAesKey),
|
MAKE_SERVICE_COMMAND_META(DecryptAesKey),
|
||||||
MAKE_SERVICE_COMMAND_META(CryptAesCtr),
|
MAKE_SERVICE_COMMAND_META(CryptAesCtr),
|
||||||
MAKE_SERVICE_COMMAND_META(ComputeCmac),
|
MAKE_SERVICE_COMMAND_META(ComputeCmac),
|
||||||
MAKE_SERVICE_COMMAND_META(AllocateAesKeyslot, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(AllocateAesKeyslot, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(FreeAesKeyslot, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(FreeAesKeyslot, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetAesKeyslotAvailableEvent, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(GetAesKeyslotAvailableEvent, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(DecryptRsaPrivateKeyDeprecated, hos::Version_400, hos::Version_400),
|
MAKE_SERVICE_COMMAND_META(DecryptRsaPrivateKeyDeprecated, hos::Version_4_0_0, hos::Version_4_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(DecryptRsaPrivateKey, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(DecryptRsaPrivateKey, hos::Version_5_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(ReEncryptRsaPrivateKey, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(ReEncryptRsaPrivateKey, hos::Version_5_0_0),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -33,21 +33,21 @@ namespace ams::spl {
|
||||||
MAKE_SERVICE_COMMAND_META(SetConfig),
|
MAKE_SERVICE_COMMAND_META(SetConfig),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateRandomBytes),
|
MAKE_SERVICE_COMMAND_META(GenerateRandomBytes),
|
||||||
MAKE_SERVICE_COMMAND_META(IsDevelopment),
|
MAKE_SERVICE_COMMAND_META(IsDevelopment),
|
||||||
MAKE_SERVICE_COMMAND_META(SetBootReason, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(SetBootReason, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetBootReason, hos::Version_300),
|
MAKE_SERVICE_COMMAND_META(GetBootReason, hos::Version_3_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateAesKek),
|
MAKE_SERVICE_COMMAND_META(GenerateAesKek),
|
||||||
MAKE_SERVICE_COMMAND_META(LoadAesKey),
|
MAKE_SERVICE_COMMAND_META(LoadAesKey),
|
||||||
MAKE_SERVICE_COMMAND_META(GenerateAesKey),
|
MAKE_SERVICE_COMMAND_META(GenerateAesKey),
|
||||||
MAKE_SERVICE_COMMAND_META(DecryptAesKey),
|
MAKE_SERVICE_COMMAND_META(DecryptAesKey),
|
||||||
MAKE_SERVICE_COMMAND_META(CryptAesCtr),
|
MAKE_SERVICE_COMMAND_META(CryptAesCtr),
|
||||||
MAKE_SERVICE_COMMAND_META(ComputeCmac),
|
MAKE_SERVICE_COMMAND_META(ComputeCmac),
|
||||||
MAKE_SERVICE_COMMAND_META(AllocateAesKeyslot, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(AllocateAesKeyslot, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(FreeAesKeyslot, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(FreeAesKeyslot, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(GetAesKeyslotAvailableEvent, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(GetAesKeyslotAvailableEvent, hos::Version_2_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(DecryptRsaPrivateKeyDeprecated, hos::Version_400, hos::Version_400),
|
MAKE_SERVICE_COMMAND_META(DecryptRsaPrivateKeyDeprecated, hos::Version_4_0_0, hos::Version_4_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(DecryptRsaPrivateKey, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(DecryptRsaPrivateKey, hos::Version_5_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(ImportSslKey, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(ImportSslKey, hos::Version_5_0_0),
|
||||||
MAKE_SERVICE_COMMAND_META(SslExpMod, hos::Version_500),
|
MAKE_SERVICE_COMMAND_META(SslExpMod, hos::Version_5_0_0),
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue