Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Although | don't have to use "movabs",I cannot prevent the gcc/g++........
I have not encountered this situation before,I searched google but it didn't help me......
alexfru wrote:The intent is clear, the instruction itself should work. I suspect something's wrong with the address, e.g. how you obtain it (linker issue?).
OTOH, it could be that you're missing or having an extra indirection. Do you really need a star in there?
But wherever I put this code,it doesn't work at all.
windows8 wrote:The Virtual Machine reboot at once.
Yes,I am in long mode.
This is contradicting.
To enter long mode properly you need exception handlers. This should give a trace instead of "reboot at once".
Also, bochs should have said something when it reboot (due to triple fault I believe).
windows8 wrote:The Virtual Machine reboot at once.
Yes,I am in long mode.
This is contradicting.
To enter long mode properly you need exception handlers. This should give a trace instead of "reboot at once".
Also, bochs should have said something when it reboot (due to triple fault I believe).
It happens when I just entered long mode (in /arch/boot/boot.s),"callq kmain" (to /kernel/init/main.cpp) is not executed.
Is it really necessary to set exception handlers here?
It seems I found the reason,I set GDT to a wrong value....
It is, strictly speaking, not essential to have exception handlers. But, if you don't, it causes so many problems that it is foolish not to do so.
I don't know about others, but I would really appreciate it if people who can't be bothered to write simple exception handlers didn't waste forum space by asking why their code isn't working. You've got to help yourself just a little bit before relying upon others to do your debugging for you.
See Posting Checklist. The biggest problem here is the total lack of logs, even after several screens worth of debate going nowhere because of just this. Having interrupt handlers are nice, but you need to be able to get them running in the first place.
My crystal ball can't seem to decide on his addressing scheme being screwed up, or not being in long mode at all.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]