File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,11 @@ pub fn enter_long_mode_and_jump_to_stage_4(info: &mut BiosInfo) {
37
37
// push arguments (extended to 64 bit)
38
38
"push 0" ,
39
39
"push {info:e}" ,
40
+ // push entry point address (extended to 64 bit)
41
+ "push 0" ,
42
+ "push {entry_point:e}" ,
40
43
info = in( reg) info as * const _ as u32 ,
44
+ entry_point = in( reg) info. stage_4. start as u32 ,
41
45
) ;
42
46
asm ! ( "ljmp $0x8, $2f" , "2:" , options( att_syntax) ) ;
43
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" ,
54
59
"call rax" ,
55
60
56
61
// enter endless loop in case 4th stage returns
57
62
"2:" ,
58
63
"jmp 2b" ,
59
64
out( reg) _,
65
+ out( "rax" ) _,
60
66
out( "rdi" ) _,
61
67
) ;
62
68
}
You can’t perform that action at this time.
0 commit comments