diff options
Diffstat (limited to 'kernel/riscv.h')
-rw-r--r-- | kernel/riscv.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/riscv.h b/kernel/riscv.h index 7d6eb6e..af18972 100644 --- a/kernel/riscv.h +++ b/kernel/riscv.h @@ -355,6 +355,9 @@ typedef uint64 *pagetable_t; // 512 PTEs #define PTE_A (1L << 6) // riscv access bit #define PTE_C (1L << 8) // RSW low bit, use it to mark whether a page is COW + + + // shift a physical address to the right place for a PTE. #define PA2PTE(pa) ((((uint64)pa) >> 12) << 10) |