aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv64/kernel
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-07-07 07:05:31 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-07-07 07:05:31 +0300
commitd1c5e2700add7627e22c49a6021f200f03e8a62b (patch)
tree8e2df615cc30a9a9b3384381439db65175b44c59 /arch/riscv64/kernel
parentb97967ab660243b723f246db03c2e4a82e125f3f (diff)
downloadkmi-d1c5e2700add7627e22c49a6021f200f03e8a62b.tar.gz
kmi-d1c5e2700add7627e22c49a6021f200f03e8a62b.zip
add small note about new booting method
Diffstat (limited to 'arch/riscv64/kernel')
-rw-r--r--arch/riscv64/kernel/vmem.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/riscv64/kernel/vmem.c b/arch/riscv64/kernel/vmem.c
index b97082f..0aa35cc 100644
--- a/arch/riscv64/kernel/vmem.c
+++ b/arch/riscv64/kernel/vmem.c
@@ -464,10 +464,12 @@ void destroy_vmem(struct vmem *b)
static void map_kernel(struct vmem *b)
{
+ /* slightly worried about this not being guaranteed to be pc relative,
+ * but seems to work at the moment at least. */
intptr_t addr = (pm_t)&kvmem;
- /* virtual memory is negative, unsure if this applies everywhere but I
- * guess it's good enough for us */
+ /* virtual memory is negative, unsure if this is really portable but I
+ * guess it's good enough for us for now */
if (addr < 0)
addr = addr - VM_KERNEL + get_load_addr();