cleanup memory_management

This commit is contained in:
georgemoralis 2024-07-26 08:08:47 +03:00
parent a11ac5a687
commit 64d305faeb
2 changed files with 7 additions and 7 deletions

View File

@ -244,7 +244,7 @@ s32 PS4_SYSV_ABI sceKernelBatchMap2(OrbisKernelBatchMapEntry* entries, int numEn
break; // break and assign a value to numEntriesOut. break; // break and assign a value to numEntriesOut.
} }
if (entries[i].operation == MemoryOpTypes::SCE_KERNEL_MAP_OP_MAP_DIRECT) { if (entries[i].operation == MemoryOpTypes::ORBIS_KERNEL_MAP_OP_MAP_DIRECT) {
result = sceKernelMapNamedDirectMemory(&entries[i].start, entries[i].length, result = sceKernelMapNamedDirectMemory(&entries[i].start, entries[i].length,
entries[i].protection, flags, entries[i].protection, flags,
static_cast<s64>(entries[i].offset), 0, ""); static_cast<s64>(entries[i].offset), 0, "");
@ -257,7 +257,7 @@ s32 PS4_SYSV_ABI sceKernelBatchMap2(OrbisKernelBatchMapEntry* entries, int numEn
if (result == 0) if (result == 0)
processed++; processed++;
} else if (entries[i].operation == 1) { } else if (entries[i].operation == MemoryOpTypes::ORBIS_KERNEL_MAP_OP_UNMAP) {
result = sceKernelMunmap(entries[i].start, entries[i].length); result = sceKernelMunmap(entries[i].start, entries[i].length);
LOG_INFO(Kernel_Vmm, "BatchMap: entry = {}, operation = {}, len = {:#x}, result = {}", LOG_INFO(Kernel_Vmm, "BatchMap: entry = {}, operation = {}, len = {:#x}, result = {}",
i, entries[i].operation, entries[i].length, result); i, entries[i].operation, entries[i].length, result);

View File

@ -32,11 +32,11 @@ enum MemoryProtection : u32 {
}; };
enum MemoryOpTypes : u32 { enum MemoryOpTypes : u32 {
SCE_KERNEL_MAP_OP_MAP_DIRECT = 0, ORBIS_KERNEL_MAP_OP_MAP_DIRECT = 0,
SCE_KERNEL_MAP_OP_UNMAP = 1, ORBIS_KERNEL_MAP_OP_UNMAP = 1,
SCE_KERNEL_MAP_OP_PROTECT = 2, ORBIS_KERNEL_MAP_OP_PROTECT = 2,
SCE_KERNEL_MAP_OP_MAP_FLEXIBLE = 3, ORBIS_KERNEL_MAP_OP_MAP_FLEXIBLE = 3,
SCE_KERNEL_MAP_OP_TYPE_PROTECT = 4 ORBIS_KERNEL_MAP_OP_TYPE_PROTECT = 4
}; };
struct OrbisQueryInfo { struct OrbisQueryInfo {