mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-09 19:36:47 +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:将来需要将帧缓冲区物理地址填写到这个地址的页表项中
|
// @todo:将来需要将帧缓冲区物理地址填写到这个地址的页表项中
|
||||||
pos.FB_address = 0xa00000;
|
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.x = 0;
|
||||||
pos.y = 0;
|
pos.y = 0;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -453,7 +453,15 @@ SetUp_TSS64:
|
|||||||
// 装载任务状态段寄存器(已改为在main.c中使用load_TR宏进行装载)
|
// 装载任务状态段寄存器(已改为在main.c中使用load_TR宏进行装载)
|
||||||
// mov $0x50, %ax // 设置起始地址为80
|
// mov $0x50, %ax // 设置起始地址为80
|
||||||
// ltr %ax
|
// 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
|
call Start_Kernel
|
||||||
|
|
||||||
|
2
run.sh
2
run.sh
@ -93,7 +93,7 @@ if [ $flag_can_run -eq 1 ]; then
|
|||||||
bochs -q -f ${bochsrc} -rc ./tools/bochsinit
|
bochs -q -f ${bochsrc} -rc ./tools/bochsinit
|
||||||
else
|
else
|
||||||
qemu-system-x86_64 -cdrom ${iso} -m 128M \
|
qemu-system-x86_64 -cdrom ${iso} -m 128M \
|
||||||
-monitor telnet::2333,server,nowait -serial stdio
|
-monitor telnet::2333,server,nowait -serial stdio -s
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "不满足运行条件"
|
echo "不满足运行条件"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user