Re: HPET and IRQs


Tomasz Bursztyka
 

Hi Zide,

From which log? From kernel's one at least I get this:
[ 0.000000] tsc: Detected 1094.000 MHz processor
[ 0.000054] tsc: Detected 1094.400 MHz TSC, current tsc:18670612749

So far my attempts to tweak the sys clock config option did not change
the result.

Br,

Tomasz

Hi Tomasz,

Additional to Like's comments, to calibrate the timer, if you have
serial HV console, you can get the TSC frequency from the log. For
example:
calibrate_tsc, tsc_khz=1593600

Then you need to change the Zephyr code accordingly. In this example,
set CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=1593600000
https://github.com/zephyrproject-rtos/zephyr/blob/master/boards/x86/acrn/acrn_defconfig#L13

Best Regards,
Zide

-----Original Message-----
From: acrn-users@... <
acrn-users@...> On Behalf Of Tomasz Bursztyka
Sent: Tuesday, April 28, 2020 5:19 AM
To: acrn-users@...
Subject: [acrn-users] HPET and IRQs

Hi,

I am currently trying to fix an issue with Zephyr running as UOS.

The default configuration of Zephyr for acrn enables the LOAPIC
timer,
but there does not seem to be any mention of such timer in acrn.
Unless
I am missing something.
When running zephyr with such timer, the timing get all bogus. 60
seconds looks like 5 seconds, etc... Timings are all off.

As HPET is supported by acrn, I switched the timer to HPET. But now
I
have a new issue, acrn-dm displays:

hpet t0 configured invalid irq 2, allowed_irqs 0xff000000

And nothing proceeds, since acrn defaults to 0, zephyr isr for hpet
is
never called.

Indeed Zephyr sets HPET IRQ to 2, which seems to be wrong then for
acrn
.

Which IRQ should HPET timer be configured to use on UOS side then?


Thanks,

Tomasz



Join acrn-users@lists.projectacrn.org to automatically receive all group messages.