From a3a1cf9889bda1467f0326984af3560aa5c3ec01 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 1 Jun 2025 21:31:31 -0400 Subject: kernel/amd64: pmap: Add PTE dirty bit handling Add support for managing the page table entry dirty bit. This will allow vm(9) to know when to page-out data to backing store, among other things. Signed-off-by: Ian Moffett --- sys/include/vm/pmap.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sys/include/vm') diff --git a/sys/include/vm/pmap.h b/sys/include/vm/pmap.h index 9eed184..e1f3f89 100644 --- a/sys/include/vm/pmap.h +++ b/sys/include/vm/pmap.h @@ -75,6 +75,17 @@ int pmap_map(struct vas vas, vaddr_t va, paddr_t pa, vm_prot_t prot); */ int pmap_unmap(struct vas vas, vaddr_t va); +/* + * Returns true if the page is clean (modified), otherwise + * returns false. + */ +bool pmap_is_clean(struct vas vas, vaddr_t va); + +/* + * Marks a page as clean (unmodified) + */ +void pmap_mark_clean(struct vas vas, vaddr_t va); + /* * Mark a virtual address with a specific * caching type. -- cgit v1.2.3