From a9dd1eaacd687b64e581bec801a4a6c2f4aa008d Mon Sep 17 00:00:00 2001 From: Aiken Harris Date: Sun, 17 Aug 2025 21:51:43 +0200 Subject: [PATCH] Implement MmpSetPteCaching function for AMD64 architecture --- xtoskrnl/mm/amd64/pmap.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/xtoskrnl/mm/amd64/pmap.c b/xtoskrnl/mm/amd64/pmap.c index 20b9ec1..a776720 100644 --- a/xtoskrnl/mm/amd64/pmap.c +++ b/xtoskrnl/mm/amd64/pmap.c @@ -188,3 +188,29 @@ MmpSetPte(PHARDWARE_PTE PtePointer, PtePointer->Valid = 1; PtePointer->Writable = Writable; } + +/** + * Sets caching attributes for a page table entry (PTE). + * + * @param PtePointer + * Pointer to the page table entry (PTE) to modify. + * + * @param CacheDisable + * Indicates whether caching should be disabled for this page. + * + * @param WriteThrough + * Indicates whether write-through caching should be enabled. + * + * @return This routine does not return any value. + * + * @since XT 1.0 + */ +XTAPI +VOID +MmpSetPteCaching(PHARDWARE_PTE PtePointer, + BOOLEAN CacheDisable, + BOOLEAN WriteThrough) +{ + PtePointer->CacheDisable = CacheDisable; + PtePointer->WriteThrough = WriteThrough; +}