summaryrefslogtreecommitdiff
path: root/src/core/memory.cpp
diff options
context:
space:
mode:
authorGravatar Liam2023-11-28 14:30:39 -0500
committerGravatar Liam2023-12-04 10:37:16 -0500
commit45c87c7e6e841c11def43e5ab25160006dab6d77 (patch)
tree04a3ea0bd8c07389e17741aa28615e3b32ace2f7 /src/core/memory.cpp
parentMerge pull request #12235 from liamwhite/flip-clip (diff)
downloadyuzu-45c87c7e6e841c11def43e5ab25160006dab6d77.tar.gz
yuzu-45c87c7e6e841c11def43e5ab25160006dab6d77.tar.xz
yuzu-45c87c7e6e841c11def43e5ab25160006dab6d77.zip
core: refactor emulated cpu core activation
Diffstat (limited to 'src/core/memory.cpp')
-rw-r--r--src/core/memory.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp
index 5b376b202..169bf4c8c 100644
--- a/src/core/memory.cpp
+++ b/src/core/memory.cpp
@@ -43,13 +43,9 @@ bool AddressSpaceContains(const Common::PageTable& table, const Common::ProcessA
43struct Memory::Impl { 43struct Memory::Impl {
44 explicit Impl(Core::System& system_) : system{system_} {} 44 explicit Impl(Core::System& system_) : system{system_} {}
45 45
46 void SetCurrentPageTable(Kernel::KProcess& process, u32 core_id) { 46 void SetCurrentPageTable(Kernel::KProcess& process) {
47 current_page_table = &process.GetPageTable().GetImpl(); 47 current_page_table = &process.GetPageTable().GetImpl();
48 current_page_table->fastmem_arena = system.DeviceMemory().buffer.VirtualBasePointer(); 48 current_page_table->fastmem_arena = system.DeviceMemory().buffer.VirtualBasePointer();
49
50 const std::size_t address_space_width = process.GetPageTable().GetAddressSpaceWidth();
51
52 system.ArmInterface(core_id).PageTableChanged(*current_page_table, address_space_width);
53 } 49 }
54 50
55 void MapMemoryRegion(Common::PageTable& page_table, Common::ProcessAddress base, u64 size, 51 void MapMemoryRegion(Common::PageTable& page_table, Common::ProcessAddress base, u64 size,
@@ -871,8 +867,8 @@ void Memory::Reset() {
871 impl = std::make_unique<Impl>(system); 867 impl = std::make_unique<Impl>(system);
872} 868}
873 869
874void Memory::SetCurrentPageTable(Kernel::KProcess& process, u32 core_id) { 870void Memory::SetCurrentPageTable(Kernel::KProcess& process) {
875 impl->SetCurrentPageTable(process, core_id); 871 impl->SetCurrentPageTable(process);
876} 872}
877 873
878void Memory::MapMemoryRegion(Common::PageTable& page_table, Common::ProcessAddress base, u64 size, 874void Memory::MapMemoryRegion(Common::PageTable& page_table, Common::ProcessAddress base, u64 size,