mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:57:34 +00:00
Kernel/riscv64: Take the memory map from the FDT and dump it
For this the BootInfo struct was made architecture specific
This commit is contained in:
parent
21a21c6a11
commit
d3f6b03733
10 changed files with 368 additions and 119 deletions
|
@ -22,17 +22,16 @@
|
|||
#ifdef __cplusplus
|
||||
namespace Kernel {
|
||||
|
||||
# if ARCH(X86_64)
|
||||
struct [[gnu::packed]] BootInfo {
|
||||
u32 start_of_prekernel_image;
|
||||
u32 end_of_prekernel_image;
|
||||
u64 physical_to_virtual_offset;
|
||||
u64 kernel_mapping_base;
|
||||
u64 kernel_load_base;
|
||||
# if ARCH(X86_64)
|
||||
u32 gdt64ptr;
|
||||
u16 code64_sel;
|
||||
u32 boot_pml4t;
|
||||
# endif
|
||||
u32 boot_pdpt;
|
||||
u32 boot_pd0;
|
||||
u32 boot_pd_kernel;
|
||||
|
@ -50,5 +49,14 @@ struct [[gnu::packed]] BootInfo {
|
|||
u8 multiboot_framebuffer_bpp;
|
||||
u8 multiboot_framebuffer_type;
|
||||
};
|
||||
# elif ARCH(AARCH64)
|
||||
struct BootInfo { };
|
||||
# elif ARCH(RISCV64)
|
||||
struct BootInfo {
|
||||
FlatPtr mhartid;
|
||||
PhysicalPtr fdt_phys_addr;
|
||||
};
|
||||
# endif
|
||||
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue