XSetgv 在我的裸机软件中崩溃 [英] XSetgv crashes in my bare metal software

查看:22
本文介绍了XSetgv 在我的裸机软件中崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个裸机程序.平台是x86,32位,保护模式,我在0环.我想使用xsetgv指令启用AVX.CR4 的第 18 位为 1,如果我使用 xgetgv 则不会发生任何错误,但是 xsetgv 崩溃(virtualbox 报告致命错误).有问题的代码如下:

I am developing a bare metal program. The platform is x86, 32 bit, protected mode, I am at ring 0. I would like to enable AVX by using xsetgv instruction. 18th bit of CR4 is 1, if I use xgetgv then nothing wrong happens, but the xsetgv crashes (the virtualbox reports fatal error). The problematic code is the following:

mov ecx, 0
mov eax, 0x7
mov edx, 0
xsetbv

有什么问题?

推荐答案

问题是虚拟机有问题,我的代码在真实硬件和最新的虚拟机上运行良好.

The problem was the bugy virtual box, my code works greatly on a real hardware, and the newest virtualbox.

这篇关于XSetgv 在我的裸机软件中崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆