Skip to content

Commit 48ced39

Browse files
committed
The second stage-4 argument is no longer needed
1 parent c1d01d6 commit 48ced39

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

bios/stage-3/src/main.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ pub fn enter_long_mode_and_jump_to_stage_4(info: &mut BiosInfo) {
3737
// push arguments (extended to 64 bit)
3838
"push 0",
3939
"push {info:e}",
40-
// push entry point address (extended to 64 bit)
41-
"push 0",
42-
"push {entry_point:e}",
4340
info = in(reg) info as *const _ as u32,
44-
entry_point = in(reg) info.stage_4.start as u32,
4541
);
4642
asm!("ljmp $0x8, $2f", "2:", options(att_syntax));
4743
asm!(
@@ -54,14 +50,13 @@ pub fn enter_long_mode_and_jump_to_stage_4(info: &mut BiosInfo) {
5450
"mov ss, bx",
5551

5652
// jump to 4th stage
57-
"pop rax",
5853
"pop rdi",
5954
"call rax",
6055

6156
// enter endless loop in case 4th stage returns
6257
"2:",
6358
"jmp 2b",
64-
out("eax") _,
59+
out("rdi") _,
6560
);
6661
}
6762
}

0 commit comments

Comments
 (0)