diff options
| author | 2020-04-17 16:33:08 -0400 | |
|---|---|---|
| committer | 2020-04-17 16:33:08 -0400 | |
| commit | b8f5c71f2d7f819821acf036175cce65ab1ae12c (patch) | |
| tree | 151d7ed4e47536dc0e149a7117387b6a502d7da6 /src/core/memory.h | |
| parent | Merge pull request #3682 from lioncash/uam (diff) | |
| parent | core: hle: Address various feedback & code cleanup. (diff) | |
| download | yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.tar.gz yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.tar.xz yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.zip | |
Merge pull request #3666 from bunnei/new-vmm
Implement a new virtual memory manager
Diffstat (limited to 'src/core/memory.h')
| -rw-r--r-- | src/core/memory.h | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/core/memory.h b/src/core/memory.h index b92d678a4..9292f3b0a 100644 --- a/src/core/memory.h +++ b/src/core/memory.h | |||
| @@ -23,7 +23,7 @@ class PhysicalMemory; | |||
| 23 | class Process; | 23 | class Process; |
| 24 | } // namespace Kernel | 24 | } // namespace Kernel |
| 25 | 25 | ||
| 26 | namespace Memory { | 26 | namespace Core::Memory { |
| 27 | 27 | ||
| 28 | /** | 28 | /** |
| 29 | * Page size used by the ARM architecture. This is the smallest granularity with which memory can | 29 | * Page size used by the ARM architecture. This is the smallest granularity with which memory can |
| @@ -67,19 +67,6 @@ public: | |||
| 67 | void SetCurrentPageTable(Kernel::Process& process); | 67 | void SetCurrentPageTable(Kernel::Process& process); |
| 68 | 68 | ||
| 69 | /** | 69 | /** |
| 70 | * Maps an physical buffer onto a region of the emulated process address space. | ||
| 71 | * | ||
| 72 | * @param page_table The page table of the emulated process. | ||
| 73 | * @param base The address to start mapping at. Must be page-aligned. | ||
| 74 | * @param size The amount of bytes to map. Must be page-aligned. | ||
| 75 | * @param memory Physical buffer with the memory backing the mapping. Must be of length | ||
| 76 | * at least `size + offset`. | ||
| 77 | * @param offset The offset within the physical memory. Must be page-aligned. | ||
| 78 | */ | ||
| 79 | void MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size, | ||
| 80 | Kernel::PhysicalMemory& memory, VAddr offset); | ||
| 81 | |||
| 82 | /** | ||
| 83 | * Maps an allocated buffer onto a region of the emulated process address space. | 70 | * Maps an allocated buffer onto a region of the emulated process address space. |
| 84 | * | 71 | * |
| 85 | * @param page_table The page table of the emulated process. | 72 | * @param page_table The page table of the emulated process. |
| @@ -88,7 +75,7 @@ public: | |||
| 88 | * @param target Buffer with the memory backing the mapping. Must be of length at least | 75 | * @param target Buffer with the memory backing the mapping. Must be of length at least |
| 89 | * `size`. | 76 | * `size`. |
| 90 | */ | 77 | */ |
| 91 | void MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size, u8* target); | 78 | void MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size, PAddr target); |
| 92 | 79 | ||
| 93 | /** | 80 | /** |
| 94 | * Maps a region of the emulated process address space as a IO region. | 81 | * Maps a region of the emulated process address space as a IO region. |
| @@ -503,4 +490,4 @@ private: | |||
| 503 | /// Determines if the given VAddr is a kernel address | 490 | /// Determines if the given VAddr is a kernel address |
| 504 | bool IsKernelVirtualAddress(VAddr vaddr); | 491 | bool IsKernelVirtualAddress(VAddr vaddr); |
| 505 | 492 | ||
| 506 | } // namespace Memory | 493 | } // namespace Core::Memory |