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.
I'm programming the PIT following the JamesM tutorial.
On bochs it works fine (apart the bochs bug, time is 1000000000 time faster).
As I send the divisor split in two parts tho the port 0x40, VMWare sends me a warning:
The host high-resolution timer device (/dev/rtc) cannot be opened (Device or resource busy). It appears that some other application is using the device. Without this device, the guest operating system can fail to keep time correctly. To avoid this problem, stop the conflicting application. If that is not possible, see http://www.vmware.com/info?id=34.
Then the time runs like on bochs.
Can anyone help me?
try checking in the edit setting tab for the VM
as if there is any other VM using the same device you will need to keep explicite setting so that it can be shared
see if any other app is using the rtc. Its not your os's fault. I think if you run lsof as root and see what program has /dev/rtc opened, you can end that program and it should work.
VMware uses two different time sources - normal host ticks (Linux HZ, which could be 100hz or 1000hz depending on your kernel) and /dev/rtc for higher-resolution time. It doesn't set up the higher-resolution mode unless the PIT is programmed to be faster than the host kernel tick rate (HZ + HZ/16 actually).
So, either program the PIT for something less frequent, or arrange for VMware's kernel module to get exclusive access to the PIT so that it can go that fast.
If you are feeling like Linux kernel internals, all the code is in hostif.c, which is shipped as source code for the vmmon driver when you download VMware.