mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-31 14:58:22 -04:00
Loader: Start work on LoadNRR, Add AutoCloseMap
This commit is contained in:
parent
b34b9ba0e4
commit
1d73bd0a12
5 changed files with 105 additions and 26 deletions
|
@ -104,6 +104,26 @@ void Registration::AddNsoInfo(u64 index, u64 base_address, u64 size, const unsig
|
|||
}
|
||||
|
||||
|
||||
Result Registration::AddNrrInfo(u64 index, u64 base_address, u64 size, u64 code_memory_address, u64 loader_address) {
|
||||
Registration::Process *target_process = GetProcess(index);
|
||||
if (target_process == NULL) {
|
||||
/* TODO: panic() */
|
||||
return 0x7009;
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < NSO_INFO_MAX; i++) {
|
||||
if (!target_process->nrr_infos[i].in_use) {
|
||||
target_process->nrr_infos[i].info.base_address = base_address;
|
||||
target_process->nrr_infos[i].info.size = size;
|
||||
target_process->nrr_infos[i].info.code_memory_address = code_memory_address;
|
||||
target_process->nrr_infos[i].info.loader_address = loader_address;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 0x7009;
|
||||
}
|
||||
|
||||
|
||||
Result Registration::GetNsoInfosForProcessId(Registration::NsoInfo *out, u32 max_out, u64 process_id, u32 *num_written) {
|
||||
Registration::Process *target_process = GetProcessByProcessId(process_id);
|
||||
if (target_process == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue