added GSP heap memory allocation
This commit is contained in:
parent
33e7d97d46
commit
b2baafaf8b
3 changed files with 76 additions and 1 deletions
|
@ -4,6 +4,10 @@
|
|||
|
||||
#include <map>
|
||||
|
||||
#include "core/mem_map.h"
|
||||
|
||||
#include "core/hw/hw_lcd.h"
|
||||
|
||||
#include "core/hle/function_wrappers.h"
|
||||
#include "core/hle/syscall.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
@ -13,6 +17,26 @@
|
|||
|
||||
namespace Syscall {
|
||||
|
||||
/// Map application or GSP heap memory
|
||||
Result ControlMemory(void* outaddr, u32 addr0, u32 addr1, u32 size, u32 operation, u32 permissions) {
|
||||
u32 virtual_address = 0x00000000;
|
||||
|
||||
switch (operation) {
|
||||
|
||||
// Map GSP heap memory?
|
||||
case 0x00010003:
|
||||
virtual_address = Memory::MapBlock_HeapGSP(size, operation, permissions);
|
||||
break;
|
||||
|
||||
// Unknown ControlMemory operation
|
||||
default:
|
||||
ERROR_LOG(OSHLE, "Unknown ControlMemory operation %08X", operation);
|
||||
}
|
||||
|
||||
Core::g_app_core->SetReg(1, Memory::MapBlock_HeapGSP(size, operation, permissions));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// Connect to an OS service given the port name, returns the handle to the port to out
|
||||
Result ConnectToPort(void* out, const char* port_name) {
|
||||
Service::Interface* service = Service::g_manager->FetchFromPortName(port_name);
|
||||
|
@ -41,7 +65,7 @@ Result WaitSynchronization1(Handle handle, s64 nanoseconds) {
|
|||
|
||||
const HLE::FunctionDef Syscall_Table[] = {
|
||||
{0x00, NULL, "Unknown"},
|
||||
{0x01, NULL, "ControlMemory"},
|
||||
{0x01, WrapI_VUUUUU<ControlMemory>, "ControlMemory"},
|
||||
{0x02, NULL, "QueryMemory"},
|
||||
{0x03, NULL, "ExitProcess"},
|
||||
{0x04, NULL, "GetProcessAffinityMask"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue