Skip to content

Commit 7d9fae2

Browse files
committed
Move enable_sse call to end of bootloader_main
1 parent e3fc8c3 commit 7d9fae2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/main.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,6 @@ fn bootloader_main(
144144
// Extract required information from the ELF file.
145145
let mut preallocated_space = alloc_stack!([ProgramHeader64; 32]);
146146
let mut segments = FixedVec::new(&mut preallocated_space);
147-
#[cfg(feature = "sse")]
148-
{
149-
sse::enable_sse();
150-
}
151147
let entry_point;
152148
{
153149
let kernel_start_ptr = usize_from(kernel_start.as_u64()) as *const u8;
@@ -350,8 +346,10 @@ fn bootloader_main(
350346
mem::drop(rec_page_table);
351347
}
352348

353-
let entry_point = VirtAddr::new(entry_point);
349+
#[cfg(feature = "sse")]
350+
sse::enable_sse();
354351

352+
let entry_point = VirtAddr::new(entry_point);
355353
unsafe { context_switch(boot_info_addr, entry_point, stack_end) };
356354
}
357355

0 commit comments

Comments
 (0)