diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-07 07:05:31 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-07 07:05:31 +0300 |
| commit | d1c5e2700add7627e22c49a6021f200f03e8a62b (patch) | |
| tree | 8e2df615cc30a9a9b3384381439db65175b44c59 /arch/riscv64 | |
| parent | b97967ab660243b723f246db03c2e4a82e125f3f (diff) | |
| download | kmi-d1c5e2700add7627e22c49a6021f200f03e8a62b.tar.gz kmi-d1c5e2700add7627e22c49a6021f200f03e8a62b.zip | |
add small note about new booting method
Diffstat (limited to 'arch/riscv64')
| -rw-r--r-- | arch/riscv64/kernel/vmem.c | 6 |
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(); |
