diff options
author | bunnei <bunneidev@gmail.com> | 2018-01-19 20:48:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-19 20:48:08 +0100 |
commit | 0f363d37e6b9e124b70e667ce0b1e9b8674aba64 (patch) | |
tree | ddc9c1e4342264d884a3125aeb51ffb3fb49424b /src/core | |
parent | Merge pull request #97 from bunnei/time-stub (diff) | |
parent | nvdrv: Stub SetClientPID. (diff) | |
download | yuzu-0f363d37e6b9e124b70e667ce0b1e9b8674aba64.tar yuzu-0f363d37e6b9e124b70e667ce0b1e9b8674aba64.tar.gz yuzu-0f363d37e6b9e124b70e667ce0b1e9b8674aba64.tar.bz2 yuzu-0f363d37e6b9e124b70e667ce0b1e9b8674aba64.tar.lz yuzu-0f363d37e6b9e124b70e667ce0b1e9b8674aba64.tar.xz yuzu-0f363d37e6b9e124b70e667ce0b1e9b8674aba64.tar.zst yuzu-0f363d37e6b9e124b70e667ce0b1e9b8674aba64.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 2 | ||||
-rw-r--r-- | src/core/hle/kernel/svc.h | 4 | ||||
-rw-r--r-- | src/core/hle/kernel/vm_manager.cpp | 5 | ||||
-rw-r--r-- | src/core/hle/kernel/vm_manager.h | 3 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/interface.cpp | 12 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/interface.h | 1 |
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) *result = g_current_process->allowed_thread_priority_mask; break; case GetInfoType::MapRegionBaseAddr: - *result = vm_manager.GetAddressSpaceBaseAddr(); + *result = vm_manager.GetMapRegionBaseAddr(); break; case GetInfoType::MapRegionSize: *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 { u32 type; u32 attributes; u32 permission; + u32 device_refcount; + u32 ipc_refcount; + INSERT_PADDING_WORDS(1); }; +static_assert(sizeof(MemoryInfo) == 0x28, "MemoryInfo has incorrect size."); struct PageInfo { 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() { return MAX_ADDRESS; } +VAddr VMManager::GetMapRegionBaseAddr() { + LOG_WARNING(Kernel, "(STUBBED) called"); + return Memory::HEAP_VADDR; +} + VAddr VMManager::GetNewMapRegionBaseAddr() { LOG_WARNING(Kernel, "(STUBBED) called"); 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: /// Gets the total address space address size, used by svcGetInfo u64 GetAddressSpaceSize(); + /// Gets the map region base address, used by svcGetInfo + VAddr GetMapRegionBaseAddr(); + /// Gets the base address for a new memory region, used by svcGetInfo VAddr GetNewMapRegionBaseAddr(); 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) { rb.Push<u32>(0); } +void NVDRV::SetClientPID(Kernel::HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + u64 pid = rp.Pop<u64>(); + u64 unk = rp.Pop<u64>(); + + LOG_WARNING(Service, "(STUBBED) called, pid=0x%llx, unk=0x%llx", pid, unk); + + IPC::RequestBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); +} + NVDRV::NVDRV(std::shared_ptr<Module> nvdrv, const char* name) : ServiceFramework(name), nvdrv(std::move(nvdrv)) { static const FunctionInfo functions[] = { @@ -74,6 +85,7 @@ NVDRV::NVDRV(std::shared_ptr<Module> nvdrv, const char* name) {1, &NVDRV::Ioctl, "Ioctl"}, {2, &NVDRV::Close, "Close"}, {3, &NVDRV::Initialize, "Initialize"}, + {8, &NVDRV::SetClientPID, "SetClientPID"}, }; RegisterHandlers(functions); } 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: void Ioctl(Kernel::HLERequestContext& ctx); void Close(Kernel::HLERequestContext& ctx); void Initialize(Kernel::HLERequestContext& ctx); + void SetClientPID(Kernel::HLERequestContext& ctx); std::shared_ptr<Module> nvdrv; }; |