mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
Kernel: Reintroduce ScopedAddressSpaceSwitcher
to aarch64 build
This commit is contained in:
parent
2db73f2171
commit
c962cfdc28
2 changed files with 9 additions and 0 deletions
|
@ -532,6 +532,7 @@ else()
|
||||||
Memory/RegionTree.cpp
|
Memory/RegionTree.cpp
|
||||||
Memory/RingBuffer.cpp
|
Memory/RingBuffer.cpp
|
||||||
Memory/ScatterGatherList.cpp
|
Memory/ScatterGatherList.cpp
|
||||||
|
Memory/ScopedAddressSpaceSwitcher.cpp
|
||||||
Memory/SharedInodeVMObject.cpp
|
Memory/SharedInodeVMObject.cpp
|
||||||
Memory/VirtualRange.cpp
|
Memory/VirtualRange.cpp
|
||||||
Memory/VMObject.cpp
|
Memory/VMObject.cpp
|
||||||
|
|
|
@ -13,15 +13,23 @@ namespace Kernel {
|
||||||
ScopedAddressSpaceSwitcher::ScopedAddressSpaceSwitcher(Process& process)
|
ScopedAddressSpaceSwitcher::ScopedAddressSpaceSwitcher(Process& process)
|
||||||
{
|
{
|
||||||
VERIFY(Thread::current() != nullptr);
|
VERIFY(Thread::current() != nullptr);
|
||||||
|
#if ARCH(I386) || ARCH(X86_64)
|
||||||
m_previous_cr3 = read_cr3();
|
m_previous_cr3 = read_cr3();
|
||||||
|
#elif ARCH(AARC64)
|
||||||
|
TODO_AARCH64();
|
||||||
|
#endif
|
||||||
Memory::MemoryManager::enter_process_address_space(process);
|
Memory::MemoryManager::enter_process_address_space(process);
|
||||||
}
|
}
|
||||||
|
|
||||||
ScopedAddressSpaceSwitcher::~ScopedAddressSpaceSwitcher()
|
ScopedAddressSpaceSwitcher::~ScopedAddressSpaceSwitcher()
|
||||||
{
|
{
|
||||||
InterruptDisabler disabler;
|
InterruptDisabler disabler;
|
||||||
|
#if ARCH(I386) || ARCH(X86_64)
|
||||||
Thread::current()->regs().cr3 = m_previous_cr3;
|
Thread::current()->regs().cr3 = m_previous_cr3;
|
||||||
write_cr3(m_previous_cr3);
|
write_cr3(m_previous_cr3);
|
||||||
|
#elif ARCH(AARC64)
|
||||||
|
TODO_AARCH64();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue