diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-05 19:38:11 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-05 19:38:11 +0300 |
| commit | e09edb5d54e39bd9509a1dc450df5ab320759f97 (patch) | |
| tree | 78e050b0db87df3a3ddfbb6570d44513ac34e02a /include/arch/vmem.h | |
| parent | 98f21e694a6b0964d6d08196cb6bfbc1c2ae2ff4 (diff) | |
| download | kmi-e09edb5d54e39bd9509a1dc450df5ab320759f97.tar.gz kmi-e09edb5d54e39bd9509a1dc450df5ab320759f97.zip | |
allow booting with Qemu's -kernel flag directly
+ Took some fairly significant changes, for one the kernel is no longer
relocated at the start of a boot, instead it sits wherever the user
decides the kernel should sit. Similarly, the initial kernel stack and
page table are stored within the binary, slightly bloating the size
but making it much safer to boot since there's really no chance of us
overwriting the fdt or initrd in memory.
Diffstat (limited to 'include/arch/vmem.h')
| -rw-r--r-- | include/arch/vmem.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/arch/vmem.h b/include/arch/vmem.h index 118e6ff..238b12a 100644 --- a/include/arch/vmem.h +++ b/include/arch/vmem.h @@ -140,6 +140,8 @@ struct vmem *init_vmem(void *fdt); vm_t setup_kernel_io(struct vmem *b, vm_t paddr); #endif +struct vmem *direct_mapping(); + /** * Create new virtual memory space. * @@ -171,4 +173,7 @@ stat_t destroy_vmem(struct vmem *b); */ void clone_uvmem(struct vmem * restrict r, struct vmem * restrict b); +__noreturn void to_kernelspace(void *fdt, uintptr_t load_addr, + struct vmem *direct_mapping, pm_t ram_base, + pm_t dmap); #endif /* KMI_ARCH_PAGES_H */ |
