File tree Expand file tree Collapse file tree 2 files changed +3
-19
lines changed Expand file tree Collapse file tree 2 files changed +3
-19
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -30,15 +30,15 @@ global_asm!(include_str!("stage_1.s"));
30
30
global_asm ! ( include_str!( "stage_2.s" ) ) ;
31
31
global_asm ! ( include_str!( "e820.s" ) ) ;
32
32
global_asm ! ( include_str!( "stage_3.s" ) ) ;
33
- global_asm ! ( include_str!( "context_switch.s" ) ) ;
34
33
35
34
#[ cfg( feature = "vga_320x200" ) ]
36
35
global_asm ! ( include_str!( "video_mode/vga_320x200.s" ) ) ;
37
36
#[ cfg( not( feature = "vga_320x200" ) ) ]
38
37
global_asm ! ( include_str!( "video_mode/vga_text_80x25.s" ) ) ;
39
38
40
- extern "C" {
41
- fn context_switch ( boot_info : VirtAddr , entry_point : VirtAddr , stack_pointer : VirtAddr ) -> !;
39
+ unsafe fn context_switch ( boot_info : VirtAddr , entry_point : VirtAddr , stack_pointer : VirtAddr ) -> ! {
40
+ asm ! ( "jmp $1; .spin: jmp spin" :: "{rsp}" ( stack_pointer) , "r" ( entry_point) , "{rdi}" ( boot_info) :: "intel" ) ;
41
+ :: core:: hint:: unreachable_unchecked ( )
42
42
}
43
43
44
44
mod boot_info;
You can’t perform that action at this time.
0 commit comments