File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,6 +74,9 @@ bool_cmd("apic_timer", opt_apic_timer);
7474bool opt_hpet = false;
7575bool_cmd ("hpet" , opt_hpet );
7676
77+ bool opt_fpu = false;
78+ bool_cmd ("fpu" , opt_fpu );
79+
7780io_port_t __data_rmode com_ports [2 ] = {COM1_PORT , COM2_PORT };
7881
7982boot_flags_t boot_flags ;
@@ -303,6 +306,11 @@ void __noreturn __text_init kernel_start(uint32_t multiboot_magic,
303306 if (opt_keyboard )
304307 init_keyboard (get_bsp_cpu_id ());
305308
309+ if (opt_fpu ) {
310+ printk ("Enabling FPU instructions support\n" );
311+ enable_fpu ();
312+ }
313+
306314#ifdef KTF_PMU
307315 printk ("Initializing PFM library\n" );
308316
Original file line number Diff line number Diff line change @@ -421,7 +421,7 @@ static inline unsigned long ipow(int base, unsigned int exp) {
421421 return result ;
422422}
423423
424- static inline void enable_sse (void ) {
424+ static inline void enable_fpu (void ) {
425425 write_cr0 ((read_cr0 () & ~X86_CR0_EM ) | X86_CR0_MP );
426426 write_cr4 (read_cr4 () | X86_CR4_OSFXSR | X86_CR4_OSXMMEXCPT );
427427}
You can’t perform that action at this time.
0 commit comments