From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: Merging code with arch condition into head.S
Date: Thu, 18 Aug 2016 15:47:22 +0200 [thread overview]
Message-ID: <20160818134722.GA13458@lunn.ch> (raw)
In-Reply-To: <CACna6rw1eTiqijo24SiGAYi_XeEGWb-C1L5diYUzpyA3o7e+qw@mail.gmail.com>
On Thu, Aug 18, 2016 at 03:23:41PM +0200, Rafa?? Mi??ecki wrote:
> On 18 August 2016 at 12:47, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> > On 18 August 2016 at 12:35, Rafa?? Mi??ecki <zajec5@gmail.com> wrote:
> >> I'd like to ask for help with writing my arcm/arm/boot/compressed/head-foo.S.
> >>
> >> There is probably a bug in bootloader on *a lot* market-available
> >> devices that needs a very early fix executed during decompression. If
> >> we don't implement it, Broadcom Northstar devices hang in 25% of tries
> >> and BCM53573 devices don't boot at all.
> >>
> >
> > Could you elaborate on the nature of the fix?
>
> I'm not ARM expert and I don't have any Broadcom datasheets, so I have
> a very little view of the issue. It seems that to make booting
> reliable, I have to clear 2 following bits in the SCTLR register:
> #define CR_M (1 << 0) /* MMU enable */
> #define CR_C (1 << 2) /* Dcache enable */
> and then invalidate the cache.
So it leaves the caches enabled?
Been there, done that. This is violating the boot loader contract to
the kernel at start time. There are a couple of Marvell Kirkwood
systems what have this problem, and it was extensively discussed at
the time. Basically, it is too late to fix by the time the kernel has
started running. The kernel is already corrupt.
https://lists.debian.org/debian-arm/2012/08/msg00128.html
https://patchwork.kernel.org/patch/3427771/
You need to find another solution, e.g. in intermediate boot loader,
or do what Debian does and append a few instructions to the kernel
when it is installed on a hardware with this issue.
Andrew
next prev parent reply other threads:[~2016-08-18 13:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-18 10:35 Merging code with arch condition into head.S Rafał Miłecki
2016-08-18 10:47 ` Ard Biesheuvel
2016-08-18 13:23 ` Rafał Miłecki
2016-08-18 13:47 ` Andrew Lunn [this message]
2016-08-18 14:19 ` Rafał Miłecki
2016-08-18 14:44 ` Andrew Lunn
2016-08-18 14:55 ` 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=20160818134722.GA13458@lunn.ch \
--to=andrew@lunn.ch \
--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