diff options
| author | 2023-07-14 21:43:15 -0400 | |
|---|---|---|
| committer | 2023-07-14 21:43:15 -0400 | |
| commit | a85ce8ea563dfdd0ea61b22a80ffcf7ff66861cb (patch) | |
| tree | 40f818c29a9e19dbc2c7aeb352d7892c59d7e858 /src/core/memory.cpp | |
| parent | file_sys/content_archive: Detect compressed NCAs (#11047) (diff) | |
| download | yuzu-a85ce8ea563dfdd0ea61b22a80ffcf7ff66861cb.tar.gz yuzu-a85ce8ea563dfdd0ea61b22a80ffcf7ff66861cb.tar.xz yuzu-a85ce8ea563dfdd0ea61b22a80ffcf7ff66861cb.zip | |
k_process: PageTable -> GetPageTable
Diffstat (limited to 'src/core/memory.cpp')
| -rw-r--r-- | src/core/memory.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 805963178..e1fbe8e00 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp | |||
| @@ -31,10 +31,10 @@ struct Memory::Impl { | |||
| 31 | explicit Impl(Core::System& system_) : system{system_} {} | 31 | explicit Impl(Core::System& system_) : system{system_} {} |
| 32 | 32 | ||
| 33 | void SetCurrentPageTable(Kernel::KProcess& process, u32 core_id) { | 33 | void SetCurrentPageTable(Kernel::KProcess& process, u32 core_id) { |
| 34 | current_page_table = &process.PageTable().PageTableImpl(); | 34 | current_page_table = &process.GetPageTable().PageTableImpl(); |
| 35 | current_page_table->fastmem_arena = system.DeviceMemory().buffer.VirtualBasePointer(); | 35 | current_page_table->fastmem_arena = system.DeviceMemory().buffer.VirtualBasePointer(); |
| 36 | 36 | ||
| 37 | const std::size_t address_space_width = process.PageTable().GetAddressSpaceWidth(); | 37 | const std::size_t address_space_width = process.GetPageTable().GetAddressSpaceWidth(); |
| 38 | 38 | ||
| 39 | system.ArmInterface(core_id).PageTableChanged(*current_page_table, address_space_width); | 39 | system.ArmInterface(core_id).PageTableChanged(*current_page_table, address_space_width); |
| 40 | } | 40 | } |
| @@ -186,7 +186,7 @@ struct Memory::Impl { | |||
| 186 | void WalkBlock(const Kernel::KProcess& process, const Common::ProcessAddress addr, | 186 | void WalkBlock(const Kernel::KProcess& process, const Common::ProcessAddress addr, |
| 187 | const std::size_t size, auto on_unmapped, auto on_memory, auto on_rasterizer, | 187 | const std::size_t size, auto on_unmapped, auto on_memory, auto on_rasterizer, |
| 188 | auto increment) { | 188 | auto increment) { |
| 189 | const auto& page_table = process.PageTable().PageTableImpl(); | 189 | const auto& page_table = process.GetPageTable().PageTableImpl(); |
| 190 | std::size_t remaining_size = size; | 190 | std::size_t remaining_size = size; |
| 191 | std::size_t page_index = addr >> YUZU_PAGEBITS; | 191 | std::size_t page_index = addr >> YUZU_PAGEBITS; |
| 192 | std::size_t page_offset = addr & YUZU_PAGEMASK; | 192 | std::size_t page_offset = addr & YUZU_PAGEMASK; |
| @@ -808,7 +808,7 @@ void Memory::UnmapRegion(Common::PageTable& page_table, Common::ProcessAddress b | |||
| 808 | 808 | ||
| 809 | bool Memory::IsValidVirtualAddress(const Common::ProcessAddress vaddr) const { | 809 | bool Memory::IsValidVirtualAddress(const Common::ProcessAddress vaddr) const { |
| 810 | const Kernel::KProcess& process = *system.ApplicationProcess(); | 810 | const Kernel::KProcess& process = *system.ApplicationProcess(); |
| 811 | const auto& page_table = process.PageTable().PageTableImpl(); | 811 | const auto& page_table = process.GetPageTable().PageTableImpl(); |
| 812 | const size_t page = vaddr >> YUZU_PAGEBITS; | 812 | const size_t page = vaddr >> YUZU_PAGEBITS; |
| 813 | if (page >= page_table.pointers.size()) { | 813 | if (page >= page_table.pointers.size()) { |
| 814 | return false; | 814 | return false; |