diff options
| author | 2023-11-11 09:45:29 -0500 | |
|---|---|---|
| committer | 2023-11-11 09:45:29 -0500 | |
| commit | 40d4e9543b5792dfa761b44d4c6017d5692f77a3 (patch) | |
| tree | 019cb6ca42ee3b89b400bb624e933abf695e150c /src/core/memory.cpp | |
| parent | Merge pull request #11981 from lucasreis1/patch (diff) | |
| parent | k_page_table: fix shutdown (diff) | |
| download | yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.gz yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.xz yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.zip | |
Merge pull request #11914 from liamwhite/newer-kpagetable
kernel: add KPageTableBase
Diffstat (limited to 'src/core/memory.cpp')
| -rw-r--r-- | src/core/memory.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index fa5273402..84b60a928 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp | |||
| @@ -41,7 +41,7 @@ struct Memory::Impl { | |||
| 41 | explicit Impl(Core::System& system_) : system{system_} {} | 41 | explicit Impl(Core::System& system_) : system{system_} {} |
| 42 | 42 | ||
| 43 | void SetCurrentPageTable(Kernel::KProcess& process, u32 core_id) { | 43 | void SetCurrentPageTable(Kernel::KProcess& process, u32 core_id) { |
| 44 | current_page_table = &process.GetPageTable().PageTableImpl(); | 44 | current_page_table = &process.GetPageTable().GetImpl(); |
| 45 | current_page_table->fastmem_arena = system.DeviceMemory().buffer.VirtualBasePointer(); | 45 | current_page_table->fastmem_arena = system.DeviceMemory().buffer.VirtualBasePointer(); |
| 46 | 46 | ||
| 47 | const std::size_t address_space_width = process.GetPageTable().GetAddressSpaceWidth(); | 47 | const std::size_t address_space_width = process.GetPageTable().GetAddressSpaceWidth(); |
| @@ -195,7 +195,7 @@ struct Memory::Impl { | |||
| 195 | 195 | ||
| 196 | bool WalkBlock(const Common::ProcessAddress addr, const std::size_t size, auto on_unmapped, | 196 | bool WalkBlock(const Common::ProcessAddress addr, const std::size_t size, auto on_unmapped, |
| 197 | auto on_memory, auto on_rasterizer, auto increment) { | 197 | auto on_memory, auto on_rasterizer, auto increment) { |
| 198 | const auto& page_table = system.ApplicationProcess()->GetPageTable().PageTableImpl(); | 198 | const auto& page_table = system.ApplicationProcess()->GetPageTable().GetImpl(); |
| 199 | std::size_t remaining_size = size; | 199 | std::size_t remaining_size = size; |
| 200 | std::size_t page_index = addr >> YUZU_PAGEBITS; | 200 | std::size_t page_index = addr >> YUZU_PAGEBITS; |
| 201 | std::size_t page_offset = addr & YUZU_PAGEMASK; | 201 | std::size_t page_offset = addr & YUZU_PAGEMASK; |
| @@ -826,7 +826,7 @@ void Memory::UnmapRegion(Common::PageTable& page_table, Common::ProcessAddress b | |||
| 826 | 826 | ||
| 827 | bool Memory::IsValidVirtualAddress(const Common::ProcessAddress vaddr) const { | 827 | bool Memory::IsValidVirtualAddress(const Common::ProcessAddress vaddr) const { |
| 828 | const Kernel::KProcess& process = *system.ApplicationProcess(); | 828 | const Kernel::KProcess& process = *system.ApplicationProcess(); |
| 829 | const auto& page_table = process.GetPageTable().PageTableImpl(); | 829 | const auto& page_table = process.GetPageTable().GetImpl(); |
| 830 | const size_t page = vaddr >> YUZU_PAGEBITS; | 830 | const size_t page = vaddr >> YUZU_PAGEBITS; |
| 831 | if (page >= page_table.pointers.size()) { | 831 | if (page >= page_table.pointers.size()) { |
| 832 | return false; | 832 | return false; |