Reported by rafi rafi, Apr 24, 2012
I'm using chameleon to boot darwin with xnu kernel in a vm using kvm, using last kvm version the detection of the tsc with pit timer is no longer working with chameleon: measure_tsc_frequency() returns 0 => no boot I found that using the old timeRDTSC() coming with legacy kernel (I think it's ANV source), with the only modification of removing the interrupt part (ml_set_interrupt...) is doing the job ok. timeRDTSC() * 20 returns same result as measure_tsc_frequency was. Don't know if it could help you to get more robust code but I wanted to report in case. Bye.
- chameleon_libsaio_cpu_ok.zip - 8.50 kB
Comment 1 by Cosmosis Jones, May 7, 2012
Kvm isn't supplying the FSB correctly to chameleon (most liekely) if this is the case, try to set teh fsb via the plists, otherwise this is a legacy PIC issue w/ KVM.
Comment 2 by Cosmosis Jones, May 7, 2012
please post a diff file instead of the .c .h against the CURRENT revision on the trunk
Comment 3 by rafi rafi, May 7, 2012
Maybe kvm is a little more strict than current hardware but timeRDTSC handle it without problem. You will find the patch file attached, I didn't try to recompile but it should be ok.