diff options
author | bunnei <bunneidev@gmail.com> | 2020-01-18 03:03:48 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-18 03:03:48 -0500 |
commit | 278264b9e584d197ef4fcc15051190149e243a95 (patch) | |
tree | 9ac5f757fb4dbb26272c2b169e0a33bc6164d4e9 /src/core/memory.h | |
parent | 9bf4850f7492bf9370acedb6135a79b944eb942f (diff) | |
parent | 56672b8c9809d8f5585d208f5b85549bc3fe2a0e (diff) |
Merge pull request #3314 from degasus/physical_mem
core/hle/kernel: Simplify PhysicalMemory usages.
Diffstat (limited to 'src/core/memory.h')
-rw-r--r-- | src/core/memory.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/core/memory.h b/src/core/memory.h index 1428a6d60..8913a9da4 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -19,8 +19,9 @@ class System; } namespace Kernel { +class PhysicalMemory; class Process; -} +} // namespace Kernel namespace Memory { @@ -66,6 +67,19 @@ public: void SetCurrentPageTable(Kernel::Process& process); /** + * Maps an physical buffer onto a region of the emulated process address space. + * + * @param page_table The page table of the emulated process. + * @param base The address to start mapping at. Must be page-aligned. + * @param size The amount of bytes to map. Must be page-aligned. + * @param memory Physical buffer with the memory backing the mapping. Must be of length + * at least `size + offset`. + * @param offset The offset within the physical memory. Must be page-aligned. + */ + void MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size, + Kernel::PhysicalMemory& memory, VAddr offset); + + /** * Maps an allocated buffer onto a region of the emulated process address space. * * @param page_table The page table of the emulated process. |