Port-amigappc archive

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

Re: amigappc test kernel for CSPPC and BPPC



Radoslaw Kujawa wrote:

>> You will use the on-chip timebase or decrementer register to measure
>> the amount of buscycles passed during a defined amount of time.
>
> Looks like I have to do the mftb asm magic. I checked arch/powerpc/ and
> it seems we don't have any generic functions to access timebase
> register. 

Yes. Usually you will access the timebase only in few situations, until
timecounter(9) is set up.


>> - reset CIA timer
>> - reset timebase
>> - start CIA timer, running for 1 second
>> after 1 second (or a shorter value, to reduce the delay during
>> configure()): - read timebase
>
> Sounds good, but... how does one reset the timebase? I thought that
> it's only possible to read from it.

In user mode. But in OEA mode you can also write to it.


>> The timebase * 4 now represents the number of bus clock cycles during
>> this time.
>
> Does always timebase frequency = busclock/4 ?

Probably. I have seen more ports than amigappc using this equation.


>  Is it PowerUP specific?

Using a CIA-timer definitely is. So it doesn't matter. :)


> eclockfreq is 709kHz only on PAL models. Should not be problematic, as
> bootloader always passes the correct value. 

True.


> Out of curiosity: Is it possible to use PMC instead of timebase
> register to achieve the same thing?

Sure. It is used in powerpc/oea/cpu_subr.c to determine the clock frequency
for some CPUs.


> Anyway, PMC is available only on 604 and newer CPUs.

Which disqualifies this method here.


> Btw. today I cvs up'ed the source and GENERIC kernel does not boot
> anymore (even without my pll.patch, so I suppose that's not the
> problem). Can anyone confirm this? :(

Fortunately (or unfortunately?) not. I have just updated an hour ago and a
generic kernel still boots on my CSPPC.

Do not update while in the middle of some development! ;)

-- 
Frank Wille



Home | Main Index | Thread Index | Old Index