sf: implement service framework enough for ro to work.

This completely re-does the whole interface for ipc servers.
This commit is contained in:
Michael Scire
2019-10-10 23:49:28 -07:00
committed by SciresM
parent bd341d5c00
commit f4dcd1db9b
47 changed files with 3545 additions and 166 deletions

View File

@@ -45,7 +45,7 @@ namespace sts::ro::impl {
return ResultSuccess;
}
Result ValidateNrr(const NrrHeader *header, u64 size, u64 title_id, ModuleType expected_type, bool enforce_type) {
Result ValidateNrr(const NrrHeader *header, u64 size, ncm::TitleId title_id, ModuleType expected_type, bool enforce_type) {
/* Check magic. */
if (!header->IsMagicValid()) {
return ResultRoInvalidNrr;
@@ -68,7 +68,7 @@ namespace sts::ro::impl {
}
/* Check type. */
if (GetRuntimeFirmwareVersion() >= FirmwareVersion_700 && enforce_type) {
if (hos::GetVersion() >= hos::Version_700 && enforce_type) {
if (expected_type != header->GetType()) {
return ResultRoInvalidNrrType;
}
@@ -81,7 +81,7 @@ namespace sts::ro::impl {
}
/* Utilities for working with NRRs. */
Result MapAndValidateNrr(NrrHeader **out_header, u64 *out_mapped_code_address, Handle process_handle, u64 title_id, u64 nrr_heap_address, u64 nrr_heap_size, ModuleType expected_type, bool enforce_type) {
Result MapAndValidateNrr(NrrHeader **out_header, u64 *out_mapped_code_address, Handle process_handle, ncm::TitleId title_id, u64 nrr_heap_address, u64 nrr_heap_size, ModuleType expected_type, bool enforce_type) {
map::MappedCodeMemory nrr_mcm(ResultRoInternalError);
/* First, map the NRR. */