Rename Rust entrypoint

This commit is contained in:
Zhang Junyang 2023-07-21 12:02:41 +08:00 committed by Tate, Hongliang Tian
parent e96884b72d
commit 41d8e4228f
2 changed files with 3 additions and 2 deletions

View File

@ -280,7 +280,8 @@ long_mode:
// Clear the frame pointer to stop backtracing here.
xor rbp, rbp
lea rax, [rip + boot] // jump into Rust code
.extern __multiboot2_entry
lea rax, [rip + __multiboot2_entry] // jump into Rust code
call rax
// In case boot() returns.

View File

@ -186,7 +186,7 @@ extern "Rust" {
#[no_mangle]
/// The entry point of Rust code called by inline asm.
unsafe extern "C" fn boot(boot_magic: u32, boot_params: u64) -> ! {
unsafe extern "C" fn __multiboot2_entry(boot_magic: u32, boot_params: u64) -> ! {
assert_eq!(boot_magic, 0x36d76289_u32);
MB2_INFO.call_once(|| unsafe {
BootInformation::load(boot_params as *const BootInformationHeader).unwrap()