svn commit: r266083 - in head/sys/arm: arm include
Michael Tuexen
tuexen at freebsd.org
Sat May 24 21:29:34 UTC 2014
On 24 May 2014, at 23:02, Andrew Turner <andrew at fubar.geek.nz> wrote:
> On Sat, 24 May 2014 21:09:56 +0200
> Michael Tuexen <tuexen at freebsd.org> wrote:
>
>> On 22 May 2014, at 09:09, Mark R V Murray <markm at FreeBSD.org> wrote:
>>
>>>
>>> On 21 May 2014, at 21:15, Hans Petter Selasky <hps at selasky.org>
>>> wrote:
>>>
>>>> On 05/14/14 21:11, Mark Murray wrote:
>>>>> Author: markm
>>>>> Date: Wed May 14 19:11:15 2014
>>>>> New Revision: 266083
>>>>> URL: http://svnweb.freebsd.org/changeset/base/266083
>>>>>
>>>>> Log:
>>>>> Give suitably-endowed ARMs a register similar to the x86 TSC
>>>>> register.
>>>>>
>>>>
>>>> Hi,
>>>>
>>>> Regression issue:
>>>> This commit prevents RPI-B from booting.
>>>
>>> Thanks, I’ll look at it ASAP.
>> Doesn't the ARM1176 use for example
>> MRC p15, 0, <Rd>, c15, c12, 1 ; Read Cycle Counter Register
>> to read the value, whereas the
>> you use
>> __asm __volatile("mrc p15, 0, %0, c9, c13, 0": "=r" (ccnt));
>
> On ARMv6 there is no guarantee of a cycle count register. On the
> ARM1176 there is one in an implementation defined section of the system
> control coprocessor. This is the c15 section above, and is accessible
> as shown.
>
> On ARMv7 there are optional performance monitor extensions. These are
> in parts of the c9 section of the coprocessor. As it is optional there
> is no requirement for implementers to include this functionality,
> however I would expect the ARM designs to include it, and most non-ARM
> designs are likely aiming for performance so will also include them.
>
> If the ARMv7 processor has the performance extensions the existing code
> appears correct to retrieve it.
The code is #ifdef as
#if defined(CPU_ARM1136) || defined(CPU_ARM1176) \
|| defined(CPU_MV_PJ4B) \
|| defined(CPU_CORTEXA) || defined(CPU_KRAIT)
Isn't the Raspberry Pi defining CPU_ARM1176 and using ARMv6? So can we use
the same code for all plattforms in the #ifdef?
Best regards
Michael
>
> Andrew
>
>
More information about the svn-src-all
mailing list