mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-08 18:26:48 +00:00
🔧 启用SSE
This commit is contained in:
parent
d9d83335af
commit
63cc5c2b33
@ -51,10 +51,11 @@ int init_printk(const int char_size_x, const int char_size_y)
|
||||
|
||||
// @todo:将来需要将帧缓冲区物理地址填写到这个地址的页表项中
|
||||
pos.FB_address = 0xa00000;
|
||||
pos.FB_length = info.framebuffer_pitch - info.framebuffer_addr;
|
||||
pos.FB_length = pos.width*pos.height*4;
|
||||
|
||||
pos.x = 0;
|
||||
pos.y = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -453,7 +453,15 @@ SetUp_TSS64:
|
||||
// 装载任务状态段寄存器(已改为在main.c中使用load_TR宏进行装载)
|
||||
// mov $0x50, %ax // 设置起始地址为80
|
||||
// ltr %ax
|
||||
|
||||
|
||||
//now enable SSE and the like
|
||||
movq %cr0, %rax
|
||||
and $0xFFFB, %ax //clear coprocessor emulation CR0.EM
|
||||
or $0x2, %ax //set coprocessor monitoring CR0.MP
|
||||
movq %rax, %cr0
|
||||
movq %cr4, %rax
|
||||
or $(3 << 9), %ax //set CR4.OSFXSR and CR4.OSXMMEXCPT at the same time
|
||||
movq %rax, %cr4
|
||||
|
||||
call Start_Kernel
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user