Pass page table address range to HULK on boot
This commit is contained in:
parent
f904ec2b48
commit
3bdc5bccdd
@ -414,6 +414,8 @@ extern (C) EFI_STATUS efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE * st)
|
|||||||
console.writeln("Welcome to 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);
|
console.writeln("Firmware vendor: '%S', version: 0x%x", st.FirmwareVendor, st.FirmwareVendor);
|
||||||
|
|
||||||
|
bootinfo().pt_phys = cast(ulong)scratch.current();
|
||||||
|
|
||||||
if (!set_graphics_mode())
|
if (!set_graphics_mode())
|
||||||
{
|
{
|
||||||
console.wait_key();
|
console.wait_key();
|
||||||
@ -447,6 +449,7 @@ extern (C) EFI_STATUS efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE * st)
|
|||||||
bootinfo().hulk_phys = hulk_bin_phys();
|
bootinfo().hulk_phys = hulk_bin_phys();
|
||||||
bootinfo().bss_phys = bss_phys;
|
bootinfo().bss_phys = bss_phys;
|
||||||
bootinfo().stack_phys = stack_phys;
|
bootinfo().stack_phys = stack_phys;
|
||||||
|
bootinfo().pt_size = cast(ulong)scratch.current() - bootinfo().pt_phys;
|
||||||
|
|
||||||
jump_to_hulk();
|
jump_to_hulk();
|
||||||
|
|
||||||
|
@ -67,4 +67,10 @@ struct BootInfo
|
|||||||
|
|
||||||
/* Physical address of stack while jumping to HULK. */
|
/* Physical address of stack while jumping to HULK. */
|
||||||
ulong stack_phys;
|
ulong stack_phys;
|
||||||
|
|
||||||
|
/* Physical address of page tables while jumping to HULK. */
|
||||||
|
ulong pt_phys;
|
||||||
|
|
||||||
|
/* Size of page tables while jumping to HULK. */
|
||||||
|
ulong pt_size;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user