summaryrefslogtreecommitdiff
path: root/kernel/memlayout.h
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2019-07-22 13:32:33 -0400
committerFrans Kaashoek <[email protected]>2019-07-22 13:32:33 -0400
commitc5d48db0456472d4edb3ac47763b23141839ca47 (patch)
tree16b76ce07dba7d4c4b6634b0a313f848eac56d99 /kernel/memlayout.h
parent328204d9cc3995a44bb3cce2f5206e392a8601a7 (diff)
parent06109901c9c12733e86fb1b264dabef60655de04 (diff)
downloadxv6-labs-c5d48db0456472d4edb3ac47763b23141839ca47.tar.gz
xv6-labs-c5d48db0456472d4edb3ac47763b23141839ca47.tar.bz2
xv6-labs-c5d48db0456472d4edb3ac47763b23141839ca47.zip
Merge branch 'riscv-kstack' into riscv
Diffstat (limited to 'kernel/memlayout.h')
-rw-r--r--kernel/memlayout.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/memlayout.h b/kernel/memlayout.h
index 219c308..13d1705 100644
--- a/kernel/memlayout.h
+++ b/kernel/memlayout.h
@@ -53,3 +53,4 @@
// map the trampoline page to the highest address,
// in both user and kernel space.
#define TRAMPOLINE (MAXVA - PGSIZE)
+#define KSTACK(p) ((TRAMPOLINE-PGSIZE)-p*2*PGSIZE)