x86: implement demand paging APIs

All arch_ APIs and macros are implemented, and the page fault
handling code will call into the core kernel.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2020-12-09 10:37:52 -08:00 committed by Anas Nashif
commit ed22064e27
5 changed files with 206 additions and 0 deletions

View file

@ -24,6 +24,14 @@
#define Z_X86_MMU_XD 0
#endif
/* For these we'll just use the same bits in the PTE */
#define ARCH_DATA_PAGE_DIRTY ((uintptr_t)BIT(6))
#define ARCH_DATA_PAGE_LOADED ((uintptr_t)BIT(0))
#define ARCH_DATA_PAGE_ACCESSED ((uintptr_t)BIT(5))
/* Use an PAT bit for this one since it's never set in a mapped PTE */
#define ARCH_DATA_PAGE_NOT_MAPPED ((uintptr_t)BIT(7))
/* Always true with 32-bit page tables, don't enable
* CONFIG_EXECUTE_XOR_WRITE and expect it to work for you
*/