diff options
| author | 2020-02-24 22:04:12 -0400 | |
|---|---|---|
| committer | 2020-06-27 11:35:06 -0400 | |
| commit | e31425df3877636c098ec7426ebd2067920715cb (patch) | |
| tree | 5c0fc518a4ebb8413c491b43a9fdd99450c7bd80 /src/core/memory.cpp | |
| parent | Merge pull request #3396 from FernandoS27/prometheus-1 (diff) | |
| download | yuzu-e31425df3877636c098ec7426ebd2067920715cb.tar.gz yuzu-e31425df3877636c098ec7426ebd2067920715cb.tar.xz yuzu-e31425df3877636c098ec7426ebd2067920715cb.zip | |
General: Recover Prometheus project from harddrive failure
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host
Timing, Reworks the Kernel's Scheduler, Introduce Idle State and
Suspended State, Recreates the bootmanager, Initializes Multicore
system.
Diffstat (limited to 'src/core/memory.cpp')
| -rw-r--r-- | src/core/memory.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 9d87045a0..66634596d 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp | |||
| @@ -29,15 +29,12 @@ namespace Core::Memory { | |||
| 29 | struct Memory::Impl { | 29 | struct Memory::Impl { |
| 30 | explicit Impl(Core::System& system_) : system{system_} {} | 30 | explicit Impl(Core::System& system_) : system{system_} {} |
| 31 | 31 | ||
| 32 | void SetCurrentPageTable(Kernel::Process& process) { | 32 | void SetCurrentPageTable(Kernel::Process& process, u32 core_id) { |
| 33 | current_page_table = &process.PageTable().PageTableImpl(); | 33 | current_page_table = &process.PageTable().PageTableImpl(); |
| 34 | 34 | ||
| 35 | const std::size_t address_space_width = process.PageTable().GetAddressSpaceWidth(); | 35 | const std::size_t address_space_width = process.PageTable().GetAddressSpaceWidth(); |
| 36 | 36 | ||
| 37 | system.ArmInterface(0).PageTableChanged(*current_page_table, address_space_width); | 37 | system.ArmInterface(core_id).PageTableChanged(*current_page_table, address_space_width); |
| 38 | system.ArmInterface(1).PageTableChanged(*current_page_table, address_space_width); | ||
| 39 | system.ArmInterface(2).PageTableChanged(*current_page_table, address_space_width); | ||
| 40 | system.ArmInterface(3).PageTableChanged(*current_page_table, address_space_width); | ||
| 41 | } | 38 | } |
| 42 | 39 | ||
| 43 | void MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size, PAddr target) { | 40 | void MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size, PAddr target) { |
| @@ -689,8 +686,8 @@ struct Memory::Impl { | |||
| 689 | Memory::Memory(Core::System& system) : impl{std::make_unique<Impl>(system)} {} | 686 | Memory::Memory(Core::System& system) : impl{std::make_unique<Impl>(system)} {} |
| 690 | Memory::~Memory() = default; | 687 | Memory::~Memory() = default; |
| 691 | 688 | ||
| 692 | void Memory::SetCurrentPageTable(Kernel::Process& process) { | 689 | void Memory::SetCurrentPageTable(Kernel::Process& process, u32 core_id) { |
| 693 | impl->SetCurrentPageTable(process); | 690 | impl->SetCurrentPageTable(process, core_id); |
| 694 | } | 691 | } |
| 695 | 692 | ||
| 696 | void Memory::MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size, PAddr target) { | 693 | void Memory::MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size, PAddr target) { |