mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
Kernel: Reintroduce ScopedAddressSpaceSwitcher to aarch64 build
This commit is contained in:
committed by
Linus Groh
parent
2db73f2171
commit
c962cfdc28
@@ -13,15 +13,23 @@ namespace Kernel {
|
||||
ScopedAddressSpaceSwitcher::ScopedAddressSpaceSwitcher(Process& process)
|
||||
{
|
||||
VERIFY(Thread::current() != nullptr);
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
m_previous_cr3 = read_cr3();
|
||||
#elif ARCH(AARC64)
|
||||
TODO_AARCH64();
|
||||
#endif
|
||||
Memory::MemoryManager::enter_process_address_space(process);
|
||||
}
|
||||
|
||||
ScopedAddressSpaceSwitcher::~ScopedAddressSpaceSwitcher()
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
Thread::current()->regs().cr3 = m_previous_cr3;
|
||||
write_cr3(m_previous_cr3);
|
||||
#elif ARCH(AARC64)
|
||||
TODO_AARCH64();
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user