Introduce page fault handling infrastructure
All checks were successful
Builds / ExectOS (amd64, release) (push) Successful in 28s
Builds / ExectOS (amd64, debug) (push) Successful in 36s
Builds / ExectOS (i686, release) (push) Successful in 26s
Builds / ExectOS (i686, debug) (push) Successful in 35s

This commit is contained in:
2025-12-29 14:52:04 +01:00
parent c1514557f6
commit 0d2d41dcda
5 changed files with 89 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
/**
* PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory
* FILE: xtoskrnl/mm/i686/pfault.cc
* DESCRIPTION: Page fault support for i686 architecture
* DEVELOPERS: Aiken Harris <harraiken91@gmail.com>
*/
#include <xtos.hh>
/**
* Evaluates the PDE for for paged pool and per-session mappings.
*
* @param VirtualAddress
* Specifies the virtual address to verify.
*
* @return This routine returns ACCESS_VIOLATION on PML3 or status code on PML2.
*/
XTFASTCALL
XTSTATUS
MM::PageFault::CheckPdeForPagedPool(IN PVOID VirtualAddress)
{
/* Check if XPA is enabled */
if(MM::Paging::GetXpaStatus())
{
/* Access violation for PML3 */
return STATUS_ACCESS_VIOLATION;
}
/* Unimplemented path for PML2 */
UNIMPLEMENTED;
/* Temporarily, just return access violation */
return STATUS_ACCESS_VIOLATION;
}