From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Kirkwood: Add support for Excito Bubba B3
Date: Fri, 10 Jan 2014 12:44:37 -0700 [thread overview]
Message-ID: <20140110194437.GJ18269@obsidianresearch.com> (raw)
In-Reply-To: <20140110192032.GQ19878@titan.lakedaemon.net>
On Fri, Jan 10, 2014 at 02:20:32PM -0500, Jason Cooper wrote:
> > Jason C: What do you think about applying this [untested]?
>
> I'm of the opinion that the kernel shouldn't assume the state of the
> system when it begins execution. Sure it's nice to point fingers at the
> bootloader (especially since it's obviously wrong in this situation),
> but we need Linux to boot on systems with non-upgradeable bootloaders
> which may be broken. I'm specifically thinking about hobbyists
> modifying boxes they bought at $bigbox stores.
I liked the idea of your impedance matcher fixing up bootloader
problems. It would be pretty easy to have a feroceon specific path in
the impedance matcher to disable the L2.
> So, I'd prefer to handle this more gracefully. I don't have much
> experience at the low-level init of the caches, couldn't we enable and
> flush rather than throwing the error?
It cannot be solved in cache-feroceon-l2.c.
In many cases you won't even get that far:
- It will blow up in head.S when the cache is off: decompressor wrote
writeback data to into the L2 and uncached fetches see memory
content prior to decompression
- It will blow up after head.S enables the L1: decompressor wrote
data into the L2 but the relocation writes done with the L1 off
made changes to memory that were not captured in the L2.
So to solve it gracefully it has to be done before the decompressor
enables the L1. Which leaves the bootloader, impedance matcher or
decompressor startup code as possible places.
The code required is a flush invalidate and then disable of the L2
cache, which is only about 5 instructions, but they must be
conditionalized somehow on the CPU type :(
The purpose of my patch is to highlight the problem to the bootloader
people. If you luck out and successfully boot with the L2 cache
enabled you can at least see the message that the bootloader is wrong.
Jason
next prev parent reply other threads:[~2014-01-10 19:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-28 16:12 [PATCH] ARM: Kirkwood: Add support for Excito Bubba B3 Andrew Lunn
2013-12-28 17:01 ` Jason Cooper
2013-12-28 20:59 ` Andrew Lunn
2013-12-28 21:25 ` Jason Cooper
2014-01-02 19:49 ` Jason Gunthorpe
2014-01-02 22:36 ` Ian Campbell
2014-01-02 23:08 ` Jason Gunthorpe
2014-01-03 0:44 ` Andrew Lunn
2014-01-10 19:20 ` Jason Cooper
2014-01-10 19:44 ` Jason Gunthorpe [this message]
2014-01-10 19:54 ` Jason Cooper
2014-01-10 23:02 ` Andrew Lunn
2014-01-11 0:19 ` Jason Gunthorpe
2014-01-11 15:59 ` Russell King - ARM Linux
2014-01-13 14:44 ` Jason Cooper
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=20140110194437.GJ18269@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--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 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).