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:
parent
bb776e25a9
commit
ac9755306c
4 changed files with 1 additions and 12 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue