Compare commits
2 Commits
cb31e36e90
...
f236a64b21
Author | SHA1 | Date | |
---|---|---|---|
f236a64b21 | |||
1225e98276 |
@ -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)
|
||||
{
|
||||
@ -347,7 +350,7 @@ extern (C) EFI_STATUS efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE * st)
|
||||
|
||||
console.clear();
|
||||
|
||||
console.writeln("HELLO, HOS EFI Lightweight LOader, v0.1.0");
|
||||
console.writeln("Welcome to HELLO, HOS EFI Lightweight LOader, v0.1.0");
|
||||
console.writeln("Firmware vendor: '%S', version: 0x%x", st.FirmwareVendor, st.FirmwareVendor);
|
||||
|
||||
if (!set_graphics_mode())
|
||||
|
@ -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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user