mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-25 01:15:36 +00:00
GPU: Don't write to invalid memory locations when handling ioctls that don't have an output.
This commit is contained in:
parent
f362cf46ee
commit
0c8b7c00e8
|
@ -39,7 +39,6 @@ u32 nvhost_as_gpu::InitalizeEx(const std::vector<u8>& input, std::vector<u8>& ou
|
||||||
IoctlInitalizeEx params{};
|
IoctlInitalizeEx params{};
|
||||||
std::memcpy(¶ms, input.data(), input.size());
|
std::memcpy(¶ms, input.data(), input.size());
|
||||||
NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, big_page_size={:#X}", params.big_page_size);
|
NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, big_page_size={:#X}", params.big_page_size);
|
||||||
std::memcpy(output.data(), ¶ms, output.size());
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +134,6 @@ u32 nvhost_as_gpu::BindChannel(const std::vector<u8>& input, std::vector<u8>& ou
|
||||||
std::memcpy(¶ms, input.data(), input.size());
|
std::memcpy(¶ms, input.data(), input.size());
|
||||||
NGLOG_DEBUG(Service_NVDRV, "called, fd={:X}", params.fd);
|
NGLOG_DEBUG(Service_NVDRV, "called, fd={:X}", params.fd);
|
||||||
channel = params.fd;
|
channel = params.fd;
|
||||||
std::memcpy(output.data(), ¶ms, output.size());
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,6 @@ u32 nvhost_gpu::SetNVMAPfd(const std::vector<u8>& input, std::vector<u8>& output
|
||||||
std::memcpy(¶ms, input.data(), input.size());
|
std::memcpy(¶ms, input.data(), input.size());
|
||||||
NGLOG_DEBUG(Service_NVDRV, "called, fd={}", params.nvmap_fd);
|
NGLOG_DEBUG(Service_NVDRV, "called, fd={}", params.nvmap_fd);
|
||||||
nvmap_fd = params.nvmap_fd;
|
nvmap_fd = params.nvmap_fd;
|
||||||
std::memcpy(output.data(), ¶ms, output.size());
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +57,6 @@ u32 nvhost_gpu::SetClientData(const std::vector<u8>& input, std::vector<u8>& out
|
||||||
IoctlClientData params{};
|
IoctlClientData params{};
|
||||||
std::memcpy(¶ms, input.data(), input.size());
|
std::memcpy(¶ms, input.data(), input.size());
|
||||||
user_data = params.data;
|
user_data = params.data;
|
||||||
std::memcpy(output.data(), ¶ms, output.size());
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +89,6 @@ u32 nvhost_gpu::SetErrorNotifier(const std::vector<u8>& input, std::vector<u8>&
|
||||||
u32 nvhost_gpu::SetChannelPriority(const std::vector<u8>& input, std::vector<u8>& output) {
|
u32 nvhost_gpu::SetChannelPriority(const std::vector<u8>& input, std::vector<u8>& output) {
|
||||||
std::memcpy(&channel_priority, input.data(), input.size());
|
std::memcpy(&channel_priority, input.data(), input.size());
|
||||||
NGLOG_DEBUG(Service_NVDRV, "(STUBBED) called, priority={:X}", channel_priority);
|
NGLOG_DEBUG(Service_NVDRV, "(STUBBED) called, priority={:X}", channel_priority);
|
||||||
std::memcpy(output.data(), &channel_priority, output.size());
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue