We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e62a933 commit b0e805eCopy full SHA for b0e805e
1 file changed
bios/stage-3/src/main.rs
@@ -37,7 +37,11 @@ pub fn enter_long_mode_and_jump_to_stage_4(info: &mut BiosInfo) {
37
// push arguments (extended to 64 bit)
38
"push 0",
39
"push {info:e}",
40
+ // push entry point address (extended to 64 bit)
41
+ "push 0",
42
+ "push {entry_point:e}",
43
info = in(reg) info as *const _ as u32,
44
+ entry_point = in(reg) info.stage_4.start as u32,
45
);
46
asm!("ljmp $0x8, $2f", "2:", options(att_syntax));
47
asm!(
@@ -50,13 +54,15 @@ pub fn enter_long_mode_and_jump_to_stage_4(info: &mut BiosInfo) {
50
54
"mov ss, {0}",
51
55
52
56
// jump to 4th stage
57
+ "pop rax",
53
58
"pop rdi",
59
"call rax",
60
61
// enter endless loop in case 4th stage returns
62
"2:",
63
"jmp 2b",
64
out(reg) _,
65
+ out("rax") _,
66
out("rdi") _,
67
68
}
0 commit comments