[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] PPC440 bus frequencies and timers

From: BALATON Zoltan
Subject: Re: [Qemu-ppc] PPC440 bus frequencies and timers
Date: Tue, 13 Mar 2018 23:13:08 +0100 (CET)
User-agent: Alpine 2.21 (BSF 202 2017-01-01)

On Tue, 13 Mar 2018, luigi burdo wrote:
check in the patched uboot if this utility is included. i found this

I could not find this command either in the old u-boot but also not in the newer 2015.a version so I'm not sure where is it. But u-boot has bdinfo command which prints some frequencies.

message in mos forum

Edit: Acube has a nice utility to check the reference clock (checkbaseclock). It's included with the new version of uboot. I just executed this utility again, and indeed it says my sam has a 50 Mhz. clock.

I think we emulate a 50MHz clock as we have this line now:

ppc_booke_timers_init(cpu, 50000000, 0);

Which matches CONFIG_SYS_CLK_FREQ in u-boot Sam460ex_config.

The other part of this forum thread (https://morph.zone/modules/newbb_plus/viewtopic.php?topic_id=11840&forum=11) says:

"My sam runs at 1115 Mhz but, showconfig says it runs at 1265 Mhz.
The boot screen also says it runs at 1265 Mhz."

"1265 MHz is indeed wrong and that is what causes your timing/clock issues. There have been some Sam460 boards which use a different onboard reference clock, namely 50Mhz instead of 55Mhz. The [MorphOS] 3.9 boot.img assumes a 55MHz clock which causes the off by factor 1.1 result."

But I don't see a timing problem of 1.1 times off but more like a 20-30 times slowdown with clock multipliers set to values that result in u-boot printing 1115 MHz clock. Without the multipliers (SDR0_STRP0 set to 0) it prints 50 MHz system clock in bdinfo command and seconds advance normally so I think problem may be with some multipliers but I don't know anything about this hardware and its registers so some help from someone with more knowledge would be welcome.

AROS also seems to have 55 MHz hardcoded in arch/ppc-sam440/kernel/kernel_startup.c:SetupClocking460() so maybe these should be changed in U-Boot and QEMU to match the expectation from at least two guests but I don't think this alone will resolve the timing problem with multipliers or 20-30 times slower clock in AROS so maybe something else is also needed.

I don't have time for this now but anyone is welcome to test and submit patches that improve this machine model.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]