summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/svc.cpp2
-rw-r--r--src/core/hle/kernel/svc.h4
-rw-r--r--src/core/hle/kernel/vm_manager.cpp5
-rw-r--r--src/core/hle/kernel/vm_manager.h3
-rw-r--r--src/core/hle/service/nvdrv/interface.cpp12
-rw-r--r--src/core/hle/service/nvdrv/interface.h1
6 files changed, 26 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 45da842ef..339374aff 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -314,7 +314,7 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id)
314 *result = g_current_process->allowed_thread_priority_mask; 314 *result = g_current_process->allowed_thread_priority_mask;
315 break; 315 break;
316 case GetInfoType::MapRegionBaseAddr: 316 case GetInfoType::MapRegionBaseAddr:
317 *result = vm_manager.GetAddressSpaceBaseAddr(); 317 *result = vm_manager.GetMapRegionBaseAddr();
318 break; 318 break;
319 case GetInfoType::MapRegionSize: 319 case GetInfoType::MapRegionSize:
320 *result = vm_manager.GetAddressSpaceSize(); 320 *result = vm_manager.GetAddressSpaceSize();
diff --git a/src/core/hle/kernel/svc.h b/src/core/hle/kernel/svc.h
index 42cc41da3..bc471d01e 100644
--- a/src/core/hle/kernel/svc.h
+++ b/src/core/hle/kernel/svc.h
@@ -14,7 +14,11 @@ struct MemoryInfo {
14 u32 type; 14 u32 type;
15 u32 attributes; 15 u32 attributes;
16 u32 permission; 16 u32 permission;
17 u32 device_refcount;
18 u32 ipc_refcount;
19 INSERT_PADDING_WORDS(1);
17}; 20};
21static_assert(sizeof(MemoryInfo) == 0x28, "MemoryInfo has incorrect size.");
18 22
19struct PageInfo { 23struct PageInfo {
20 u64 flags; 24 u64 flags;
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp
index bf261699e..93662a45e 100644
--- a/src/core/hle/kernel/vm_manager.cpp
+++ b/src/core/hle/kernel/vm_manager.cpp
@@ -375,6 +375,11 @@ u64 VMManager::GetAddressSpaceSize() {
375 return MAX_ADDRESS; 375 return MAX_ADDRESS;
376} 376}
377 377
378VAddr VMManager::GetMapRegionBaseAddr() {
379 LOG_WARNING(Kernel, "(STUBBED) called");
380 return Memory::HEAP_VADDR;
381}
382
378VAddr VMManager::GetNewMapRegionBaseAddr() { 383VAddr VMManager::GetNewMapRegionBaseAddr() {
379 LOG_WARNING(Kernel, "(STUBBED) called"); 384 LOG_WARNING(Kernel, "(STUBBED) called");
380 return 0x8000000; 385 return 0x8000000;
diff --git a/src/core/hle/kernel/vm_manager.h b/src/core/hle/kernel/vm_manager.h
index 7a7fee54a..b17385c7c 100644
--- a/src/core/hle/kernel/vm_manager.h
+++ b/src/core/hle/kernel/vm_manager.h
@@ -192,6 +192,9 @@ public:
192 /// Gets the total address space address size, used by svcGetInfo 192 /// Gets the total address space address size, used by svcGetInfo
193 u64 GetAddressSpaceSize(); 193 u64 GetAddressSpaceSize();
194 194
195 /// Gets the map region base address, used by svcGetInfo
196 VAddr GetMapRegionBaseAddr();
197
195 /// Gets the base address for a new memory region, used by svcGetInfo 198 /// Gets the base address for a new memory region, used by svcGetInfo
196 VAddr GetNewMapRegionBaseAddr(); 199 VAddr GetNewMapRegionBaseAddr();
197 200
diff --git a/src/core/hle/service/nvdrv/interface.cpp b/src/core/hle/service/nvdrv/interface.cpp
index 848615fa7..417455200 100644
--- a/src/core/hle/service/nvdrv/interface.cpp
+++ b/src/core/hle/service/nvdrv/interface.cpp
@@ -67,6 +67,17 @@ void NVDRV::Initialize(Kernel::HLERequestContext& ctx) {
67 rb.Push<u32>(0); 67 rb.Push<u32>(0);
68} 68}
69 69
70void NVDRV::SetClientPID(Kernel::HLERequestContext& ctx) {
71 IPC::RequestParser rp{ctx};
72 u64 pid = rp.Pop<u64>();
73 u64 unk = rp.Pop<u64>();
74
75 LOG_WARNING(Service, "(STUBBED) called, pid=0x%llx, unk=0x%llx", pid, unk);
76
77 IPC::RequestBuilder rb{ctx, 2};
78 rb.Push(RESULT_SUCCESS);
79}
80
70NVDRV::NVDRV(std::shared_ptr<Module> nvdrv, const char* name) 81NVDRV::NVDRV(std::shared_ptr<Module> nvdrv, const char* name)
71 : ServiceFramework(name), nvdrv(std::move(nvdrv)) { 82 : ServiceFramework(name), nvdrv(std::move(nvdrv)) {
72 static const FunctionInfo functions[] = { 83 static const FunctionInfo functions[] = {
@@ -74,6 +85,7 @@ NVDRV::NVDRV(std::shared_ptr<Module> nvdrv, const char* name)
74 {1, &NVDRV::Ioctl, "Ioctl"}, 85 {1, &NVDRV::Ioctl, "Ioctl"},
75 {2, &NVDRV::Close, "Close"}, 86 {2, &NVDRV::Close, "Close"},
76 {3, &NVDRV::Initialize, "Initialize"}, 87 {3, &NVDRV::Initialize, "Initialize"},
88 {8, &NVDRV::SetClientPID, "SetClientPID"},
77 }; 89 };
78 RegisterHandlers(functions); 90 RegisterHandlers(functions);
79} 91}
diff --git a/src/core/hle/service/nvdrv/interface.h b/src/core/hle/service/nvdrv/interface.h
index 1b9aa9938..2283f358e 100644
--- a/src/core/hle/service/nvdrv/interface.h
+++ b/src/core/hle/service/nvdrv/interface.h
@@ -22,6 +22,7 @@ private:
22 void Ioctl(Kernel::HLERequestContext& ctx); 22 void Ioctl(Kernel::HLERequestContext& ctx);
23 void Close(Kernel::HLERequestContext& ctx); 23 void Close(Kernel::HLERequestContext& ctx);
24 void Initialize(Kernel::HLERequestContext& ctx); 24 void Initialize(Kernel::HLERequestContext& ctx);
25 void SetClientPID(Kernel::HLERequestContext& ctx);
25 26
26 std::shared_ptr<Module> nvdrv; 27 std::shared_ptr<Module> nvdrv;
27}; 28};