mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-10 05:07:56 -05:00
core: memory: Add a work-around to allocate and access kernel memory regions by vaddr.
This commit is contained in:
@ -58,6 +58,11 @@ public:
|
||||
Memory(Memory&&) = default;
|
||||
Memory& operator=(Memory&&) = default;
|
||||
|
||||
/**
|
||||
* Resets the state of the Memory system.
|
||||
*/
|
||||
void Reset();
|
||||
|
||||
/**
|
||||
* Changes the currently active page table to that of the given process instance.
|
||||
*
|
||||
@ -116,6 +121,15 @@ public:
|
||||
*/
|
||||
u8* GetPointer(VAddr vaddr);
|
||||
|
||||
/**
|
||||
* Gets a pointer to the start of a kernel heap allocated memory region. Will allocate one if it
|
||||
* does not already exist.
|
||||
*
|
||||
* @param start_vaddr Start virtual address for the memory region.
|
||||
* @param size Size of the memory region.
|
||||
*/
|
||||
u8* GetKernelBuffer(VAddr start_vaddr, size_t size);
|
||||
|
||||
template <typename T>
|
||||
T* GetPointer(VAddr vaddr) {
|
||||
return reinterpret_cast<T*>(GetPointer(vaddr));
|
||||
@ -524,6 +538,8 @@ public:
|
||||
void RasterizerMarkRegionCached(VAddr vaddr, u64 size, bool cached);
|
||||
|
||||
private:
|
||||
Core::System& system;
|
||||
|
||||
struct Impl;
|
||||
std::unique_ptr<Impl> impl;
|
||||
};
|
||||
|
Reference in New Issue
Block a user