diff --git a/src/hello/hello.d b/src/hello/hello.d index 424a1fa..8d18573 100644 --- a/src/hello/hello.d +++ b/src/hello/hello.d @@ -264,6 +264,7 @@ private void map_hulk(PageTableEntry * pt_base) { ulong virt = HULK_VIRTUAL_START; ulong hulk_bin_phys_start = cast(ulong)&hulk_bin_start; + bootinfo.hulk_phys = hulk_bin_phys_start; ulong hulk_bin_phys_end = cast(ulong)&hulk_bin_end; ulong phys_iter = hulk_bin_phys_start; while (phys_iter < hulk_bin_phys_end) @@ -278,6 +279,8 @@ private void map_hulk(PageTableEntry * pt_base) size_t hulk_bin_phys_size = hulk_bin_phys_end - hulk_bin_phys_end; size_t bss_size = cast(size_t)hulk_header.total_size - hulk_bin_phys_size; ulong bss_phys = alloc_hulk_bss(bss_size); + bootinfo.bss_phys = bss_phys; + bootinfo.bss_size = bss_size; ulong bss_phys_end = bss_phys + bss_size; while (bss_phys < bss_phys_end) { diff --git a/src/hulk/bootinfo.d b/src/hulk/bootinfo.d index d152bc9..80950b8 100644 --- a/src/hulk/bootinfo.d +++ b/src/hulk/bootinfo.d @@ -46,6 +46,15 @@ struct BootInfo /* Number of memory map entries. */ size_t memory_map_count; + + /* Physical address of HULK. */ + ulong hulk_phys; + + /* Physical address used for HULK bss section. */ + ulong bss_phys; + + /* Size of HULK bss region. */ + ulong bss_size; } /** HULK base virtual address. */