Error while using x86_64::shared::control_regs.
There was no `shared` in x86_64.
Thanks for the help. :)
{% raw %}
Error while using x86_64::shared::control_regs.
There was no `shared` in x86_64.
Thanks for the help. :)
Thanks for reporting! Fixed in #301.
Trying to get this to work, my code looks identical to yours, save for the occasional twist for aesthetics, or different variable name, but after enabling the nxe bit, when according to you it should boot successfully, it crashes for me.
A bit of sleuthing on my part deduced the issue, I'm getting a double fault when I try to write to the cr3 register. A bit more debugging helped me find the culprit, when I write to cr3 in the switch method, something happens and the CPU double faults.
The exact instruction that the pc points to in the register dump is "add $0x18, %rsp"
Thanks in advance for helping me resolve this.
Hmm, sounds like your CPU somehow thinks that you set a reserved bit. If it works fine before setting the NXE bit, it could be caused by:
IA32_EFER)1 << 11)Hope this helps!
Note on the footnote: I paste in your "most useful GDB command", and it tells me "syntax error in expression, near `int*)0xfffffffffffff000)@512' "
This issue is merged: https://github.com/rust-lang/rust/issues/16012#issuecomment-160380183
There is some discussion on hacker news, /r/rust, and /r/programming.