mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 10:51:50 -05:00
NvServices: Correct Ioctl Remap.
This commit corrects a padding value in Ioctl Remap that was actually an offset to the mapping address.
This commit is contained in:
parent
5619d24377
commit
a5bb1ac6e3
2 changed files with 5 additions and 3 deletions
|
@ -104,10 +104,12 @@ u32 nvhost_as_gpu::Remap(const std::vector<u8>& input, std::vector<u8>& output)
|
||||||
|
|
||||||
ASSERT(object->status == nvmap::Object::Status::Allocated);
|
ASSERT(object->status == nvmap::Object::Status::Allocated);
|
||||||
|
|
||||||
u64 size = static_cast<u64>(entry.pages) << 0x10;
|
const u64 size = static_cast<u64>(entry.pages) << 0x10;
|
||||||
ASSERT(size <= object->size);
|
ASSERT(size <= object->size);
|
||||||
|
const u64 map_offset = static_cast<u64>(entry.map_offset) << 0x10;
|
||||||
|
|
||||||
GPUVAddr returned = gpu.MemoryManager().MapBufferEx(object->addr, offset, size);
|
const GPUVAddr returned =
|
||||||
|
gpu.MemoryManager().MapBufferEx(object->addr + map_offset, offset, size);
|
||||||
ASSERT(returned == offset);
|
ASSERT(returned == offset);
|
||||||
}
|
}
|
||||||
std::memcpy(output.data(), entries.data(), output.size());
|
std::memcpy(output.data(), entries.data(), output.size());
|
||||||
|
|
|
@ -62,7 +62,7 @@ private:
|
||||||
u16_le flags;
|
u16_le flags;
|
||||||
u16_le kind;
|
u16_le kind;
|
||||||
u32_le nvmap_handle;
|
u32_le nvmap_handle;
|
||||||
INSERT_PADDING_WORDS(1);
|
u32_le map_offset;
|
||||||
u32_le offset;
|
u32_le offset;
|
||||||
u32_le pages;
|
u32_le pages;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue