From eb6dd2be2cb81c65af6011493ae58fdd3b5f30a8 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Mon, 13 Jan 2025 16:33:30 +0100 Subject: [PATCH] PTE flag comments --- kernel/riscv.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kernel/riscv.h b/kernel/riscv.h index c934309..47d5397 100644 --- a/kernel/riscv.h +++ b/kernel/riscv.h @@ -429,6 +429,16 @@ typedef u64 *pagetable_t; // 512 PTEs /** * Page Table Entry Flags */ +/** Valid */ +#define PTE_V (1L << 0) +/** Readable */ +#define PTE_R (1L << 1) +/** Writable */ +#define PTE_W (1L << 2) +/** Executable */ +#define PTE_X (1L << 3) +/** User-accessible */ +#define PTE_U (1L << 4) #define PTE_V (1L << 0) /** PTE Valid */ #define PTE_R (1L << 1) /** PTE Readable */