From dafed58e9874b28de0395a251dac716c4664f59c Mon Sep 17 00:00:00 2001 From: gibbed Date: Mon, 19 Nov 2018 22:04:44 -0600 Subject: [PATCH] [Kernel] Implement MmAllocatePhysicalMemory. --- src/xenia/kernel/xboxkrnl/xboxkrnl_memory.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_memory.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_memory.cc index 0ef461683..899704404 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_memory.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_memory.cc @@ -347,6 +347,14 @@ dword_result_t MmAllocatePhysicalMemoryEx(dword_t flags, dword_t region_size, DECLARE_XBOXKRNL_EXPORT(MmAllocatePhysicalMemoryEx, ExportTag::kImplemented | ExportTag::kMemory); +dword_result_t MmAllocatePhysicalMemory(dword_t flags, dword_t region_size, + dword_t protect_bits) { + return MmAllocatePhysicalMemoryEx(flags, region_size, protect_bits, 0, + 0xFFFFFFFFu, 0); +} +DECLARE_XBOXKRNL_EXPORT(MmAllocatePhysicalMemory, + ExportTag::kImplemented | ExportTag::kMemory); + void MmFreePhysicalMemory(dword_t type, dword_t base_address) { // base_address = result of MmAllocatePhysicalMemory.