amd64: enable SSE
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
d6e8e6af62
commit
bbf23100fc
4 changed files with 19 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include <drivers/tty.h>
|
||||
#include <drivers/serial.h>
|
||||
#include <lib/stdio.h>
|
||||
#include "arch/reg.h"
|
||||
#include "descriptor.h"
|
||||
|
||||
static struct tty tty_early = {0};
|
||||
|
|
@ -22,6 +23,11 @@ void _panic()
|
|||
|
||||
void arch_early_init()
|
||||
{
|
||||
/* enable SSE: CR4.OSFXSR (bit 9) + CR4.OSXMMEXCPT (bit 10) */
|
||||
u64 cr4 = cr4_read();
|
||||
cr4 |= (1 << 9) | (1 << 10);
|
||||
cr4_write(cr4);
|
||||
|
||||
tty_early.serial_ops = &tty_early_ops;
|
||||
tty_early.priv = (void *)COM1;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue