cowtest fixed and try to finish usertests

This commit is contained in:
2025-07-03 10:13:07 +08:00
parent bc8921a77f
commit 66657d1ca0
4 changed files with 98 additions and 15 deletions

View File

@@ -362,6 +362,7 @@ typedef uint64 *pagetable_t; // 512 PTEs
#define PTE_W (1L << 2)
#define PTE_X (1L << 3)
#define PTE_U (1L << 4) // user can access
#define PTE_COW (1L << 8) // 使用RSW位标记COW
// shift a physical address to the right place for a PTE.
#define PA2PTE(pa) ((((uint64)pa) >> 12) << 10)