All of lore.kernel.org
 help / color / mirror / Atom feed
From: slash.tmp@free.fr (Mason)
To: linux-arm-kernel@lists.infradead.org
Subject: l2c: Kernel panic in l2c310_enable() in non-secure mode
Date: Wed, 14 Oct 2015 22:28:31 +0200	[thread overview]
Message-ID: <561EBAEF.8030603@free.fr> (raw)
In-Reply-To: <20151014174721.GR32532@n2100.arm.linux.org.uk>

On 14/10/2015 19:47, Russell King - ARM Linux wrote:
> On Wed, Oct 14, 2015 at 04:47:59PM +0200, Marc Gonzalez wrote:
>> Just to be sure, I changed set_auxcr() to a NOP. The kernel does not
>> panic with that setup, and I can see the boot messages:
>>
>> [    0.000000] l2x0_of_init: FOO
>> [    0.000000] L2C-310 enabling early BRESP for Cortex-A9
>> [    0.000000] L2C-310: enabling full line of zeros but not enabled in Cortex-A9
>> [    0.000000] reg=0x104 val=0x66460801
>> [    0.000000] reg=0x100 val=0x1
>> [    0.000000] L2C-310 I prefetch enabled, offset 1 lines
>> [    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
>> [    0.000000] L2C-310 cache controller enabled, 8 ways, 512 kB
>> [    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x62460801
>>
>> The "reg=0x%x val=0x%lx\n" lines are from tango_l2c_write_sec()
>>
>> It seems the firmware forgot to enable FLOZ.
> 
> Wrong.  Do _not_ enable FLZ in the Cortex-A9.  FLZ needs the L2 cache
> enabled _before_ the Cortex A9.  This is not something you can do in
> firmware/boot loader/etc.  It has to be done by the kernel when the L2
> cache is initialised.
> 
> If your firmware prevents this, sorry, you can't ever use FLZ.

Is FLZ just a performance optimization?

I can ask the firmware author not to enable bit 0 in L2CC AUXCTRL.

Then Linux won't try to write CP15 ACTRL, IIUC.

Regards.

  reply	other threads:[~2015-10-14 20:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 14:17 l2c: Kernel panic in l2c310_enable() in non-secure mode Marc Gonzalez
2015-10-14 14:47 ` Marc Gonzalez
2015-10-14 17:06   ` Rob Herring
2015-10-15  8:56     ` Marc Gonzalez
2015-10-15  9:09       ` Russell King - ARM Linux
2015-10-14 17:47   ` Russell King - ARM Linux
2015-10-14 20:28     ` Mason [this message]
2015-10-15 10:00     ` Marc Gonzalez
2015-10-15 11:07       ` Marc Gonzalez
2015-10-16  9:51         ` Mason
2015-10-14 17:45 ` Russell King - ARM Linux
2015-10-14 19:34   ` Mason
2015-10-14 20:19   ` Peter Maydell
2015-10-14 21:08     ` Russell King - ARM Linux
2015-10-15  8:27   ` Marc Gonzalez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=561EBAEF.8030603@free.fr \
    --to=slash.tmp@free.fr \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.