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/core.cpp | |
| 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/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 3bd90d79f..f9f8a3000 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include "core/core_manager.h" | 14 | #include "core/core_manager.h" |
| 15 | #include "core/core_timing.h" | 15 | #include "core/core_timing.h" |
| 16 | #include "core/cpu_manager.h" | 16 | #include "core/cpu_manager.h" |
| 17 | #include "core/device_memory.h" | ||
| 17 | #include "core/file_sys/bis_factory.h" | 18 | #include "core/file_sys/bis_factory.h" |
| 18 | #include "core/file_sys/card_image.h" | 19 | #include "core/file_sys/card_image.h" |
| 19 | #include "core/file_sys/mode.h" | 20 | #include "core/file_sys/mode.h" |
| @@ -140,6 +141,8 @@ struct System::Impl { | |||
| 140 | ResultStatus Init(System& system, Frontend::EmuWindow& emu_window) { | 141 | ResultStatus Init(System& system, Frontend::EmuWindow& emu_window) { |
| 141 | LOG_DEBUG(HW_Memory, "initialized OK"); | 142 | LOG_DEBUG(HW_Memory, "initialized OK"); |
| 142 | 143 | ||
| 144 | device_memory = std::make_unique<Core::DeviceMemory>(system); | ||
| 145 | |||
| 143 | core_timing.Initialize(); | 146 | core_timing.Initialize(); |
| 144 | kernel.Initialize(); | 147 | kernel.Initialize(); |
| 145 | cpu_manager.Initialize(); | 148 | cpu_manager.Initialize(); |
| @@ -276,6 +279,7 @@ struct System::Impl { | |||
| 276 | telemetry_session.reset(); | 279 | telemetry_session.reset(); |
| 277 | perf_stats.reset(); | 280 | perf_stats.reset(); |
| 278 | gpu_core.reset(); | 281 | gpu_core.reset(); |
| 282 | device_memory.reset(); | ||
| 279 | 283 | ||
| 280 | // Close all CPU/threading state | 284 | // Close all CPU/threading state |
| 281 | cpu_manager.Shutdown(); | 285 | cpu_manager.Shutdown(); |
| @@ -346,7 +350,8 @@ struct System::Impl { | |||
| 346 | std::unique_ptr<Loader::AppLoader> app_loader; | 350 | std::unique_ptr<Loader::AppLoader> app_loader; |
| 347 | std::unique_ptr<Tegra::GPU> gpu_core; | 351 | std::unique_ptr<Tegra::GPU> gpu_core; |
| 348 | std::unique_ptr<Hardware::InterruptManager> interrupt_manager; | 352 | std::unique_ptr<Hardware::InterruptManager> interrupt_manager; |
| 349 | Memory::Memory memory; | 353 | std::unique_ptr<Core::DeviceMemory> device_memory; |
| 354 | Core::Memory::Memory memory; | ||
| 350 | CpuManager cpu_manager; | 355 | CpuManager cpu_manager; |
| 351 | bool is_powered_on = false; | 356 | bool is_powered_on = false; |
| 352 | bool exit_lock = false; | 357 | bool exit_lock = false; |
| @@ -472,6 +477,14 @@ Kernel::Process* System::CurrentProcess() { | |||
| 472 | return impl->kernel.CurrentProcess(); | 477 | return impl->kernel.CurrentProcess(); |
| 473 | } | 478 | } |
| 474 | 479 | ||
| 480 | Core::DeviceMemory& System::DeviceMemory() { | ||
| 481 | return *impl->device_memory; | ||
| 482 | } | ||
| 483 | |||
| 484 | const Core::DeviceMemory& System::DeviceMemory() const { | ||
| 485 | return *impl->device_memory; | ||
| 486 | } | ||
| 487 | |||
| 475 | const Kernel::Process* System::CurrentProcess() const { | 488 | const Kernel::Process* System::CurrentProcess() const { |
| 476 | return impl->kernel.CurrentProcess(); | 489 | return impl->kernel.CurrentProcess(); |
| 477 | } | 490 | } |
| @@ -505,7 +518,7 @@ Memory::Memory& System::Memory() { | |||
| 505 | return impl->memory; | 518 | return impl->memory; |
| 506 | } | 519 | } |
| 507 | 520 | ||
| 508 | const Memory::Memory& System::Memory() const { | 521 | const Core::Memory::Memory& System::Memory() const { |
| 509 | return impl->memory; | 522 | return impl->memory; |
| 510 | } | 523 | } |
| 511 | 524 | ||