cpu_core: Separate cpu_core and memory

This makes cpu_core and memory being completely independent components inside the system, having a simpler and more understandable initialization process
The thread which casues page table changes in memory will be responsible to notify the cpu_core too
This commit is contained in:
bamsbamx 2019-06-22 18:21:50 +02:00
parent bb776e25a9
commit ac9755306c
4 changed files with 1 additions and 12 deletions

View file

@ -66,22 +66,14 @@ public:
RasterizerCacheMarker cache_marker;
std::vector<PageTable*> page_table_list;
ARM_Interface* cpu = nullptr;
AudioCore::DspInterface* dsp = nullptr;
};
MemorySystem::MemorySystem() : impl(std::make_unique<Impl>()) {}
MemorySystem::~MemorySystem() = default;
void MemorySystem::SetCPU(ARM_Interface& cpu) {
impl->cpu = &cpu;
}
void MemorySystem::SetCurrentPageTable(PageTable* page_table) {
impl->current_page_table = page_table;
if (impl->cpu != nullptr) {
impl->cpu->PageTableChanged();
}
}
PageTable* MemorySystem::GetCurrentPageTable() const {