From d1c5e2700add7627e22c49a6021f200f03e8a62b Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 7 Jul 2024 07:05:31 +0300 Subject: add small note about new booting method --- arch/riscv64/kernel/vmem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'arch') 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(); -- cgit v1.3