mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:17:35 +00:00
Kernel: Implement ScopedAddressSpaceSwitcher using PageDirectory
This makes the code architecture independent, and thus makes it work for aarch64.
This commit is contained in:
parent
6a8581855d
commit
7440112cd9
2 changed files with 6 additions and 12 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2023, Timon Kruiper <timonkruiper@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -7,6 +8,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Arch/PageDirectory.h>
|
||||
#include <Kernel/Forward.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
@ -17,7 +19,7 @@ public:
|
|||
~ScopedAddressSpaceSwitcher();
|
||||
|
||||
private:
|
||||
u32 m_previous_cr3 { 0 };
|
||||
LockRefPtr<Memory::PageDirectory> m_previous_page_directory;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue