mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-23 16:01:52 +01:00
Prevent truncation of big page start in GetVaRegions
This commit is contained in:
parent
f650f32bf0
commit
cd0b2636e5
@ -243,6 +243,7 @@ namespace skyline::service::nvdrv::device::nvhost {
|
|||||||
if (!vm.initialised)
|
if (!vm.initialised)
|
||||||
return PosixResult::InvalidArgument;
|
return PosixResult::InvalidArgument;
|
||||||
|
|
||||||
|
bufSize = 2 * sizeof(VaRegion);
|
||||||
vaRegions = std::array<VaRegion, 2> {
|
vaRegions = std::array<VaRegion, 2> {
|
||||||
VaRegion{
|
VaRegion{
|
||||||
.pageSize = VM::PageSize,
|
.pageSize = VM::PageSize,
|
||||||
@ -252,7 +253,7 @@ namespace skyline::service::nvdrv::device::nvhost {
|
|||||||
VaRegion{
|
VaRegion{
|
||||||
.pageSize = vm.bigPageSize,
|
.pageSize = vm.bigPageSize,
|
||||||
.pages = vm.bigPageAllocator->vaLimit - vm.bigPageAllocator->vaStart,
|
.pages = vm.bigPageAllocator->vaLimit - vm.bigPageAllocator->vaStart,
|
||||||
.offset = vm.bigPageAllocator->vaStart << vm.bigPageSizeBits,
|
.offset = static_cast<u64>(vm.bigPageAllocator->vaStart) << vm.bigPageSizeBits,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user