linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Query: ARM Cortex A9: Is invalidating L1 data cache mandatory before usage
@ 2010-04-17  9:56 Shiraz HASHIM
  2010-04-17 10:07 ` Shilimkar, Santosh
  2010-04-17 18:14 ` Russell King - ARM Linux
  0 siblings, 2 replies; 7+ messages in thread
From: Shiraz HASHIM @ 2010-04-17  9:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

I am trying to port Linux on ARM Cortex A9 based platform and what
I see is that if I don't invalidate the data cache before enabling
and using it (in arch/arm/boot/compressed/head.S) the system crashes.

I need to do the same for second core before calling secondary_startup.

Is it normal? Why then other platforms (cortex A9 based) are not doing
this. What am I missing?

thanks for your help.

regards
Shira

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Query: ARM Cortex A9: Is invalidating L1 data cache mandatory before usage
  2010-04-17  9:56 Query: ARM Cortex A9: Is invalidating L1 data cache mandatory before usage Shiraz HASHIM
@ 2010-04-17 10:07 ` Shilimkar, Santosh
  2010-04-17 10:28   ` Shiraz HASHIM
  2010-04-17 18:14 ` Russell King - ARM Linux
  1 sibling, 1 reply; 7+ messages in thread
From: Shilimkar, Santosh @ 2010-04-17 10:07 UTC (permalink / raw)
  To: linux-arm-kernel

> -----Original Message-----
> From: linux-arm-kernel-bounces at lists.infradead.org [mailto:linux-arm-kernel-
> bounces at lists.infradead.org] On Behalf Of Shiraz HASHIM
> Sent: Saturday, April 17, 2010 3:26 PM
> To: linux-arm-kernel at lists.infradead.org
> Subject: Query: ARM Cortex A9: Is invalidating L1 data cache mandatory before usage
> 
> Hello,
> 
> I am trying to port Linux on ARM Cortex A9 based platform and what
> I see is that if I don't invalidate the data cache before enabling
> and using it (in arch/arm/boot/compressed/head.S) the system crashes.

Are you enabling $L1 D in your bootloader before jumping into the kernel??

> I need to do the same for second core before calling secondary_startup.
> 
> Is it normal? Why then other platforms (cortex A9 based) are not doing
> this. What am I missing?
> 
> thanks for your help.
> 
> regards
> Shira
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Query: ARM Cortex A9: Is invalidating L1 data cache mandatory before usage
  2010-04-17 10:07 ` Shilimkar, Santosh
@ 2010-04-17 10:28   ` Shiraz HASHIM
  0 siblings, 0 replies; 7+ messages in thread
From: Shiraz HASHIM @ 2010-04-17 10:28 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Santosh,

On 4/17/2010 3:37 PM, Shilimkar, Santosh wrote:
>> -----Original Message-----
>> From: linux-arm-kernel-bounces at lists.infradead.org [mailto:linux-arm-kernel-
>> bounces at lists.infradead.org] On Behalf Of Shiraz HASHIM
>> Sent: Saturday, April 17, 2010 3:26 PM
>> To: linux-arm-kernel at lists.infradead.org
>> Subject: Query: ARM Cortex A9: Is invalidating L1 data cache mandatory before usage
>>
>> Hello,
>>
>> I am trying to port Linux on ARM Cortex A9 based platform and what
>> I see is that if I don't invalidate the data cache before enabling
>> and using it (in arch/arm/boot/compressed/head.S) the system crashes.
> 
> Are you enabling $L1 D in your bootloader before jumping into the kernel??

No. uboot is not enabling data cache. The first time it gets enabled is
in head.S before Linux decompression.

>> I need to do the same for second core before calling secondary_startup.
>>
>> Is it normal? Why then other platforms (cortex A9 based) are not doing
>> this. What am I missing?
>>
>> thanks for your help.

regards
Shiraz

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Query: ARM Cortex A9: Is invalidating L1 data cache mandatory before usage
  2010-04-17  9:56 Query: ARM Cortex A9: Is invalidating L1 data cache mandatory before usage Shiraz HASHIM
  2010-04-17 10:07 ` Shilimkar, Santosh
@ 2010-04-17 18:14 ` Russell King - ARM Linux
  2010-04-18 14:35   ` shiraz hashim
  2010-04-18 15:43   ` shiraz hashim
  1 sibling, 2 replies; 7+ messages in thread
From: Russell King - ARM Linux @ 2010-04-17 18:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Apr 17, 2010 at 03:26:13PM +0530, Shiraz HASHIM wrote:
> Hello,
> 
> I am trying to port Linux on ARM Cortex A9 based platform and what
> I see is that if I don't invalidate the data cache before enabling
> and using it (in arch/arm/boot/compressed/head.S) the system crashes.
> 
> I need to do the same for second core before calling secondary_startup.
> 
> Is it normal? Why then other platforms (cortex A9 based) are not doing
> this. What am I missing?

Yes, it's required.  See:

http://www.arm.linux.org.uk/developer/booting.php

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Query: ARM Cortex A9: Is invalidating L1 data cache mandatory before usage
  2010-04-17 18:14 ` Russell King - ARM Linux
@ 2010-04-18 14:35   ` shiraz hashim
  2010-04-18 15:43   ` shiraz hashim
  1 sibling, 0 replies; 7+ messages in thread
From: shiraz hashim @ 2010-04-18 14:35 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Russell,

On Sat, Apr 17, 2010 at 11:44 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Sat, Apr 17, 2010 at 03:26:13PM +0530, Shiraz HASHIM wrote:
>> Hello,
>>
>> I am trying to port Linux on ARM Cortex A9 based platform and what
>> I see is that if I don't invalidate the data cache before enabling
>> and using it (in arch/arm/boot/compressed/head.S) the system crashes.
>>
>> I need to do the same for second core before calling secondary_startup.
>>
>> Is it normal? Why then other platforms (cortex A9 based) are not doing
>> this. What am I missing?
>
> Yes, it's required. ?See:
>
> http://www.arm.linux.org.uk/developer/booting.php

OK. So it means that the bootloader is expected to do this
invalidation or cleanup,
and for secondary cpus we can do it before calling secondary_startup.
Am I right ?

regards
Shiraz

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Query: ARM Cortex A9: Is invalidating L1 data cache mandatory before usage
  2010-04-17 18:14 ` Russell King - ARM Linux
  2010-04-18 14:35   ` shiraz hashim
@ 2010-04-18 15:43   ` shiraz hashim
  2010-04-18 15:56     ` Russell King - ARM Linux
  1 sibling, 1 reply; 7+ messages in thread
From: shiraz hashim @ 2010-04-18 15:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Apr 17, 2010 at 11:44 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Sat, Apr 17, 2010 at 03:26:13PM +0530, Shiraz HASHIM wrote:
>> Hello,
>>
>> I am trying to port Linux on ARM Cortex A9 based platform and what
>> I see is that if I don't invalidate the data cache before enabling
>> and using it (in arch/arm/boot/compressed/head.S) the system crashes.
>>
>> I need to do the same for second core before calling secondary_startup.
>>
>> Is it normal? Why then other platforms (cortex A9 based) are not doing
>> this. What am I missing?
>
> Yes, it's required. ?See:
>
> http://www.arm.linux.org.uk/developer/booting.php

The only thing which is confusing me is that do we need to invalidate
the data cache, even if it is disabled in bootloader.

regards
Shiraz

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Query: ARM Cortex A9: Is invalidating L1 data cache mandatory before usage
  2010-04-18 15:43   ` shiraz hashim
@ 2010-04-18 15:56     ` Russell King - ARM Linux
  0 siblings, 0 replies; 7+ messages in thread
From: Russell King - ARM Linux @ 2010-04-18 15:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 18, 2010 at 09:13:55PM +0530, shiraz hashim wrote:
> On Sat, Apr 17, 2010 at 11:44 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > On Sat, Apr 17, 2010 at 03:26:13PM +0530, Shiraz HASHIM wrote:
> >> Hello,
> >>
> >> I am trying to port Linux on ARM Cortex A9 based platform and what
> >> I see is that if I don't invalidate the data cache before enabling
> >> and using it (in arch/arm/boot/compressed/head.S) the system crashes.
> >>
> >> I need to do the same for second core before calling secondary_startup.
> >>
> >> Is it normal? Why then other platforms (cortex A9 based) are not doing
> >> this. What am I missing?
> >
> > Yes, it's required. ?See:
> >
> > http://www.arm.linux.org.uk/developer/booting.php
> 
> The only thing which is confusing me is that do we need to invalidate
> the data cache, even if it is disabled in bootloader.

If you don't, the cache will be in an undefined state when it is enabled,
which in turn means that when you enable it, you don't know whether the
instructions you're going to execute come from the cache or from the
memory - and the two may be different.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-04-18 15:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-17  9:56 Query: ARM Cortex A9: Is invalidating L1 data cache mandatory before usage Shiraz HASHIM
2010-04-17 10:07 ` Shilimkar, Santosh
2010-04-17 10:28   ` Shiraz HASHIM
2010-04-17 18:14 ` Russell King - ARM Linux
2010-04-18 14:35   ` shiraz hashim
2010-04-18 15:43   ` shiraz hashim
2010-04-18 15:56     ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).