forked from xt-sys/exectos
Prepare for architecture-specific paging initialization
This commit is contained in:
@@ -9,6 +9,20 @@
|
||||
#include <xtos.h>
|
||||
|
||||
|
||||
/**
|
||||
* Detects if eXtended Physical Addressing (XPA) is enabled and initializes page map support.
|
||||
*
|
||||
* @return This routine does not return any value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
VOID
|
||||
MmInitializePageMapSupport(VOID)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the address of the PDE (Page Directory Entry), that maps given address.
|
||||
*
|
||||
@@ -102,18 +116,3 @@ MmpInitializeArchitecture(VOID)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if LA57 (PML5) is enabled.
|
||||
*
|
||||
* @return This routine returns TRUE if LA57 is enabled, or FALSE otherwise.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
BOOLEAN
|
||||
MmpMemoryExtensionEnabled(VOID)
|
||||
{
|
||||
/* Check if LA57 (PML5) is enabled */
|
||||
return ((ArReadControlRegister(4) & CR4_LA57) != 0) ? TRUE : FALSE;
|
||||
}
|
||||
|
25
xtoskrnl/mm/amd64/pmap.c
Normal file
25
xtoskrnl/mm/amd64/pmap.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* PROJECT: ExectOS
|
||||
* COPYRIGHT: See COPYING.md in the top level directory
|
||||
* FILE: xtoskrnl/mm/amd64/pmap.c
|
||||
* DESCRIPTION: Low-level support for AMD64 page map manipulation
|
||||
* DEVELOPERS: Aiken Harris <harraiken91@gmail.com>
|
||||
*/
|
||||
|
||||
#include <xtos.h>
|
||||
|
||||
|
||||
/**
|
||||
* Checks if eXtended Physical Addressing (XPA) is enabled.
|
||||
*
|
||||
* @return This routine returns TRUE if LA57 is enabled, or FALSE otherwise.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
BOOLEAN
|
||||
MmpGetExtendedPhysicalAddressingStatus(VOID)
|
||||
{
|
||||
/* Check if LA57 is enabled */
|
||||
return ((ArReadControlRegister(4) & CR4_LA57) != 0) ? TRUE : FALSE;
|
||||
}
|
@@ -9,6 +9,20 @@
|
||||
#include <xtos.h>
|
||||
|
||||
|
||||
/**
|
||||
* Detects if eXtended Physical Addressing (XPA) is enabled and initializes page map support.
|
||||
*
|
||||
* @return This routine does not return any value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
VOID
|
||||
MmInitializePageMapSupport(VOID)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the address of the PDE (Page Directory Entry), that maps given address.
|
||||
*
|
||||
@@ -64,18 +78,3 @@ MmpInitializeArchitecture(VOID)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if PAE (Physical Address Extension) is enabled.
|
||||
*
|
||||
* @return This routine returns TRUE if PAE is enabled, or FALSE otherwise.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
BOOLEAN
|
||||
MmpMemoryExtensionEnabled(VOID)
|
||||
{
|
||||
/* Check if PAE is enabled */
|
||||
return ((ArReadControlRegister(4) & CR4_PAE) != 0) ? TRUE : FALSE;
|
||||
}
|
||||
|
25
xtoskrnl/mm/i686/pmap.c
Normal file
25
xtoskrnl/mm/i686/pmap.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* PROJECT: ExectOS
|
||||
* COPYRIGHT: See COPYING.md in the top level directory
|
||||
* FILE: xtoskrnl/mm/i686/pmap.c
|
||||
* DESCRIPTION: Low-level support for i686 page map manipulation
|
||||
* DEVELOPERS: Aiken Harris <harraiken91@gmail.com>
|
||||
*/
|
||||
|
||||
#include <xtos.h>
|
||||
|
||||
|
||||
/**
|
||||
* Checks if eXtended Physical Addressing (XPA) is enabled.
|
||||
*
|
||||
* @return This routine returns TRUE if PAE is enabled, or FALSE otherwise.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
BOOLEAN
|
||||
MmpGetExtendedPhysicalAddressingStatus(VOID)
|
||||
{
|
||||
/* Check if PAE is enabled */
|
||||
return ((ArReadControlRegister(4) & CR4_PAE) != 0) ? TRUE : FALSE;
|
||||
}
|
Reference in New Issue
Block a user