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:
2024-08-22 14:20:51 +03:00
parent abc788c756
commit fb35f06cf5
10 changed files with 40 additions and 12 deletions

View File

@@ -66,6 +66,8 @@ namespace Kernel
memcpy(&g_boot_info.rsdp, &rsdp, BAN::Math::min<uint32_t>(rsdp.length, sizeof(g_boot_info.rsdp)));
}
}
g_boot_info.kernel_paddr = 0;
}
static BAN::StringView get_early_boot_command_line_multiboot2(uint32_t info)
@@ -104,6 +106,8 @@ namespace Kernel
g_boot_info.memory_map_entries[i].length = mmap_entry.length;
g_boot_info.memory_map_entries[i].type = mmap_entry.type;
}
g_boot_info.kernel_paddr = banan_bootloader_info.kernel_paddr;
}
static BAN::StringView get_early_boot_command_line_banan_bootloader(uint32_t info)