mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Added a function to get the current address space pointer.
This commit is contained in:
parent
d59c0cb3ed
commit
ebc0b064c3
4 changed files with 17 additions and 11 deletions
|
@ -56,6 +56,7 @@ namespace Sortix
|
|||
void InvalidatePage(addr_t addr);
|
||||
void Flush();
|
||||
addr_t Fork();
|
||||
addr_t GetAddressSpace();
|
||||
addr_t SwitchAddressSpace(addr_t addrspace);
|
||||
void DestroyAddressSpace();
|
||||
bool Map(addr_t physical, addr_t mapto, int prot);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/******************************************************************************
|
||||
/*******************************************************************************
|
||||
|
||||
COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2011.
|
||||
COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2011, 2012.
|
||||
|
||||
This file is part of Sortix.
|
||||
|
||||
|
@ -14,13 +14,13 @@
|
|||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with Sortix. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
Sortix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
memorymanagement.cpp
|
||||
Handles memory for the x64 architecture.
|
||||
|
||||
******************************************************************************/
|
||||
*******************************************************************************/
|
||||
|
||||
#include <sortix/kernel/platform.h>
|
||||
#include <libmaxsi/memory.h>
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace Sortix
|
|||
|
||||
namespace Memory
|
||||
{
|
||||
addr_t currentdir;
|
||||
addr_t currentdir = 0;
|
||||
|
||||
void InitCPU();
|
||||
void AllocateKernelPMLs();
|
||||
|
@ -411,6 +411,11 @@ namespace Sortix
|
|||
asm volatile("mov %0, %%cr3":: "r"(currentdir));
|
||||
}
|
||||
|
||||
addr_t GetAddressSpace()
|
||||
{
|
||||
return currentdir;
|
||||
}
|
||||
|
||||
addr_t SwitchAddressSpace(addr_t addrspace)
|
||||
{
|
||||
// Have fun debugging this.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/******************************************************************************
|
||||
/*******************************************************************************
|
||||
|
||||
COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2011.
|
||||
COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2011, 2012.
|
||||
|
||||
This file is part of Sortix.
|
||||
|
||||
|
@ -14,13 +14,13 @@
|
|||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with Sortix. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
Sortix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
memorymanagement.cpp
|
||||
Handles memory for the x86 architecture.
|
||||
|
||||
******************************************************************************/
|
||||
*******************************************************************************/
|
||||
|
||||
#include <sortix/kernel/platform.h>
|
||||
#include <libmaxsi/memory.h>
|
||||
|
|
Loading…
Add table
Reference in a new issue