summaryrefslogtreecommitdiff
path: root/include/kernel/riscv.h
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-01-03 02:19:57 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-01-03 02:19:57 +0800
commit210025560c80b48af4875af199f183ad709e3bf0 (patch)
treeeb11aeb7b641187f207e3b572c5184cf3526b463 /include/kernel/riscv.h
parentbde87490d61135dcaa94d9b1489ff6c39876d169 (diff)
parent10614e04929a6d109a5e90524e446b637aaf0c13 (diff)
downloadlume-210025560c80b48af4875af199f183ad709e3bf0.tar.gz
lume-210025560c80b48af4875af199f183ad709e3bf0.tar.xz
Merge pull request #4 from Richard-Qin-001/dev/shell
Rebuilt the system's underlying structure; it is now stable enough to merge. The system now supports a read-only file system and has a simple shell implemented.
Diffstat (limited to 'include/kernel/riscv.h')
-rw-r--r--include/kernel/riscv.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/kernel/riscv.h b/include/kernel/riscv.h
index 4b3d323..0c586a9 100644
--- a/include/kernel/riscv.h
+++ b/include/kernel/riscv.h
@@ -79,6 +79,7 @@ w_sip(uint64 x)
// Supervisor Interrupt Enable
#define SIE_SEIE (1L << 9) // external
#define SIE_STIE (1L << 5) // timer
+#define SIE_SSIE (1L << 1) // software
static inline uint64
r_sie()
{
@@ -375,7 +376,8 @@ typedef uint64 *pagetable_t; // 512 PTEs
#define PTE_X (1L << 3)
#define PTE_U (1L << 4) // user can access
-
+// COW Flag (PTE bit 8)
+#define PTE_COW (1L << 8)
#if defined(LAB_MMAP) || defined(LAB_PGTBL) || defined(LAB_COW)
#define PTE_LEAF(pte) (((pte) & PTE_R) | ((pte) & PTE_W) | ((pte) & PTE_X))