mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-11 04:35:05 +01:00
Memory: remove GetMMIOHandler with current process
This commit is contained in:
parent
7308b8d294
commit
d4ba87d90a
@ -110,12 +110,6 @@ static MMIORegionPointer GetMMIOHandler(const PageTable& page_table, VAddr vaddr
|
||||
return nullptr; // Should never happen
|
||||
}
|
||||
|
||||
static MMIORegionPointer GetMMIOHandler(VAddr vaddr) {
|
||||
const PageTable& page_table =
|
||||
Core::System::GetInstance().Kernel().GetCurrentProcess()->vm_manager.page_table;
|
||||
return GetMMIOHandler(page_table, vaddr);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T ReadMMIO(MMIORegionPointer mmio_handler, VAddr addr);
|
||||
|
||||
@ -148,7 +142,7 @@ T Read(const VAddr vaddr) {
|
||||
return value;
|
||||
}
|
||||
case PageType::Special:
|
||||
return ReadMMIO<T>(GetMMIOHandler(vaddr), vaddr);
|
||||
return ReadMMIO<T>(GetMMIOHandler(*current_page_table, vaddr), vaddr);
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
@ -184,7 +178,7 @@ void Write(const VAddr vaddr, const T data) {
|
||||
break;
|
||||
}
|
||||
case PageType::Special:
|
||||
WriteMMIO<T>(GetMMIOHandler(vaddr), vaddr, data);
|
||||
WriteMMIO<T>(GetMMIOHandler(*current_page_table, vaddr), vaddr, data);
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
|
Loading…
Reference in New Issue
Block a user