Kernel: Add better support for bootloaders loading the kernel
Before I assumed that bootloaders loaded the kernel at physical address 0, but this patch kinda allows loading to different addresses. This still doesn't fully work as kernel bootstrap paging relies on kernel being loaded at 0
This commit is contained in:
@@ -10,9 +10,6 @@
|
||||
#error
|
||||
#endif
|
||||
|
||||
#define V2P(vaddr) (((vaddr_t)(vaddr)) - KERNEL_OFFSET)
|
||||
#define P2V(paddr) (((paddr_t)(paddr)) + KERNEL_OFFSET)
|
||||
|
||||
#define PAGE_SIZE ((uintptr_t)4096)
|
||||
#define PAGE_SIZE_SHIFT 12
|
||||
#define PAGE_ADDR_MASK (~(uintptr_t)0xFFF)
|
||||
|
||||
Reference in New Issue
Block a user