mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-24 19:54:22 -04:00
Loader: Implement ldr:ro->LoadNRR(). NOTE: No sigchecks, at the moment.
This commit is contained in:
parent
789afe7929
commit
8524f284fd
6 changed files with 143 additions and 25 deletions
|
@ -1,6 +1,8 @@
|
|||
#pragma once
|
||||
#include <switch.h>
|
||||
|
||||
#include "ldr_map.hpp"
|
||||
|
||||
#define REGISTRATION_LIST_MAX (0x40)
|
||||
|
||||
#define NSO_INFO_MAX (0x20)
|
||||
|
@ -19,18 +21,6 @@ class Registration {
|
|||
NsoInfo info;
|
||||
};
|
||||
|
||||
struct NrrInfo {
|
||||
u64 base_address;
|
||||
u64 size;
|
||||
u64 code_memory_address;
|
||||
u64 loader_address;
|
||||
};
|
||||
|
||||
struct NrrInfoHolder {
|
||||
bool in_use;
|
||||
NrrInfo info;
|
||||
};
|
||||
|
||||
struct TidSid {
|
||||
u64 title_id;
|
||||
FsStorageId storage_id;
|
||||
|
@ -44,7 +34,7 @@ class Registration {
|
|||
u64 title_id_min;
|
||||
Registration::TidSid tid_sid;
|
||||
Registration::NsoInfoHolder nso_infos[NSO_INFO_MAX];
|
||||
Registration::NrrInfoHolder nrr_infos[NRR_INFO_MAX];
|
||||
MappedCodeMemory nrr_infos[NRR_INFO_MAX];
|
||||
void *owner_ro_service;
|
||||
};
|
||||
|
||||
|
@ -61,6 +51,6 @@ class Registration {
|
|||
static bool UnregisterIndex(u64 index);
|
||||
static void SetProcessIdTidMinAndIs64BitAddressSpace(u64 index, u64 process_id, u64 tid_min, bool is_64_bit_addspace);
|
||||
static void AddNsoInfo(u64 index, u64 base_address, u64 size, const unsigned char *build_id);
|
||||
static Result AddNrrInfo(u64 index, u64 base_address, u64 size, u64 code_memory_address, u64 loader_address);
|
||||
static Result AddNrrInfo(u64 index, MappedCodeMemory *nrr_info);
|
||||
static Result GetNsoInfosForProcessId(NsoInfo *out, u32 max_out, u64 process_id, u32 *num_written);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue