Loader: is_64_bit -> is_64_bit_addspace

This commit is contained in:
Michael Scire 2018-04-26 14:53:33 -06:00
parent 82d9728372
commit 1ec3eb1ace
3 changed files with 8 additions and 8 deletions

View File

@ -174,13 +174,13 @@ Result ProcessCreation::CreateProcess(Handle *out_process_h, u64 index, char *nc
/* Update the list of registered processes with the new process. */
svcGetProcessId(&process_id, process_h);
bool is_64_bit;
bool is_64_bit_addspace;
if (kernelAbove200()) {
is_64_bit = (((npdm_info.header->mmu_flags >> 1) & 5) | 2) == 3;
is_64_bit_addspace = (((npdm_info.header->mmu_flags >> 1) & 5) | 2) == 3;
} else {
is_64_bit = (npdm_info.header->mmu_flags & 0xE) == 0x2;
is_64_bit_addspace = (npdm_info.header->mmu_flags & 0xE) == 0x2;
}
Registration::set_process_id_tid_min_and_is_64_bit(index, process_id, npdm_info.aci0->title_id, is_64_bit);
Registration::set_process_id_tid_min_and_is_64_bit_addspace(index, process_id, npdm_info.aci0->title_id, is_64_bit_addspace);
for (unsigned int i = 0; i < NSO_NUM_MAX; i++) {
if (NsoUtils::IsNsoPresent(i)) {
Registration::add_nso_info(index, nso_extents.nso_addresses[i], nso_extents.nso_sizes[i], NsoUtils::GetNsoBuildId(i));

View File

@ -75,7 +75,7 @@ Result Registration::get_registered_tid_sid(u64 index, Registration::TidSid *out
return 0;
}
void Registration::set_process_id_tid_min_and_is_64_bit(u64 index, u64 process_id, u64 tid_min, bool is_64_bit) {
void Registration::set_process_id_tid_min_and_is_64_bit_addspace(u64 index, u64 process_id, u64 tid_min, bool is_64_bit_addspace) {
Registration::Process *target_process = get_process(index);
if (target_process == NULL) {
return;
@ -83,7 +83,7 @@ void Registration::set_process_id_tid_min_and_is_64_bit(u64 index, u64 process_i
target_process->process_id = process_id;
target_process->title_id_min = tid_min;
target_process->is_64_bit = is_64_bit;
target_process->is_64_bit_addspace = is_64_bit_addspace;
}
void Registration::add_nso_info(u64 index, u64 base_address, u64 size, const unsigned char *build_id) {

View File

@ -25,7 +25,7 @@ class Registration {
struct Process {
bool in_use;
bool is_64_bit;
bool is_64_bit_addspace;
u64 index;
u64 process_id;
u64 title_id_min;
@ -45,7 +45,7 @@ class Registration {
static Result get_registered_tid_sid(u64 index, Registration::TidSid *out);
static bool register_tid_sid(const TidSid *tid_sid, u64 *out_index);
static bool unregister_index(u64 index);
static void set_process_id_tid_min_and_is_64_bit(u64 index, u64 process_id, u64 tid_min, bool is_64_bit);
static void set_process_id_tid_min_and_is_64_bit_addspace(u64 index, u64 process_id, u64 tid_min, bool is_64_bit_addspace);
static void add_nso_info(u64 index, u64 base_address, u64 size, const unsigned char *build_id);
static Result get_nso_infos_for_process_id(NsoInfo *out, u32 max_out, u64 process_id, u32 *num_written);
};