Chameleon

Issue 246: tsc detection problem

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.

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.
Status: AwaitingInformation

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.

Comment 4 by rafi rafi, May 7, 2012

here it is

Comment 5 by Cosmosis Jones, May 8, 2012

committed on rev 1944
Status: Fixed
Owner: cosmo1t

Created: 11 years 10 months ago by rafi rafi

Updated: 11 years 10 months ago

Status: Fixed

Owner: Cosmosis Jones

Followed by: 1 person

Labels:
Priority:Medium
Type:Defect