Crash on memcpy (movsb) ?
Posted: Sun Dec 17, 2006 12:20 pm
Hello,
Well, I recently tried to run my OS on vmware (I was always using qemu), and I found that it crashes when loading the OS in memory. I did various tests, and I found that the error happens while loading the kernel into memory (at 0x100000)...
Error message from VMWare :
*** Virtual machine kernel stack fault (hardware reset) ***
The virtual machine just suffered a stack fault in kernel mode. On a real computer, this would amount to a reset of the processor. It can be caused by an incorrect configuration of the virtual machine, a bug in the operating system, or a problem in the VMware Workstation software. Press OK to reboot virtual machine or Cancel to shut it down.
I tried to use my printf() function to see where it crashes, and I found that the problem happens while calling memcpy() (it's just a simple memcpy I coded, which use movsb, and works well on qemu).
If anyone knows why it happens, I'd be happy to have an explanation (seems that I'm able to write directly in this part of the memory, and read, etc...).
I also tried with a simple copy-loop (for+*(mem++)=buf) and I got the same result.
Well, I recently tried to run my OS on vmware (I was always using qemu), and I found that it crashes when loading the OS in memory. I did various tests, and I found that the error happens while loading the kernel into memory (at 0x100000)...
Error message from VMWare :
*** Virtual machine kernel stack fault (hardware reset) ***
The virtual machine just suffered a stack fault in kernel mode. On a real computer, this would amount to a reset of the processor. It can be caused by an incorrect configuration of the virtual machine, a bug in the operating system, or a problem in the VMware Workstation software. Press OK to reboot virtual machine or Cancel to shut it down.
I tried to use my printf() function to see where it crashes, and I found that the problem happens while calling memcpy() (it's just a simple memcpy I coded, which use movsb, and works well on qemu).
If anyone knows why it happens, I'd be happy to have an explanation (seems that I'm able to write directly in this part of the memory, and read, etc...).
I also tried with a simple copy-loop (for+*(mem++)=buf) and I got the same result.