linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rafael Wysocki <rjw@rjwysocki.net>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Rob Herring <robh@kernel.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	rnayak@codeaurora.org, Shiraz Hashim <shashim@codeaurora.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC 0/5] drivers: Add boot constraints core
Date: Thu, 29 Jun 2017 13:49:09 +0100	[thread overview]
Message-ID: <20170629124908.GV4902@n2100.armlinux.org.uk> (raw)
In-Reply-To: <cover.1498642745.git.viresh.kumar@linaro.org>

On Wed, Jun 28, 2017 at 03:56:33PM +0530, Viresh Kumar wrote:
> A typical example of that can be the LCD controller, which is used by
> the bootloaders to show image(s) while the machine is booting into
> Linux. The LCD controller can be using some resources, like clk,
> regulators, etc, that are shared between several devices. These shared
> resources should be programmed so that all the users of them are
> satisfied. If a user (X) driver gets probed before the LCD controller
> driver in this case, then it may end up reconfiguring these resources to
> ranges satisfying the current users (only user X) and that can make the
> LCD screen unstable.

The thing that concerns me most about this is that typically the LCD
controller will be performing DMA to system RAM.

The location of the frame buffer is unknown to the decompressor - and
as the decompressor self-relocates itself (using purely assembly code),
it could relocate itself on top of the frame buffer, causing the "nice"
image to become very colourful.

The decompressor doesn't have the information from DT at that point to
know what are safe locations, so it's up to the boot loader to place
the frame buffer somewhere out of the way.  (If people want to write
a DT parser in position independent ARM assembly code that may change.)

As long as people realise this, then it's not a problem, but given the
number of problems that we've already encountered with boot loaders and
memory space layout, I don't trust them to get this right.

Right now, the ARM kernel booting document requires:

- Quiesce all DMA capable devices so that memory does not get
  corrupted by bogus network packets or disk data. This will save
  you many hours of debug.

so we would need to modify that to make an exception for LCD controllers.
However, we definitely can't have devices left enabled which are capable
of writing to system memory, or which changing system memory is likely
to cause bad effects (eg, packet ring buffers, USB buffers etc, which is
really what the above requirement is about.)

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

  parent reply	other threads:[~2017-06-29 12:49 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 10:26 [RFC 0/5] drivers: Add boot constraints core Viresh Kumar
2017-06-28 10:26 ` [RFC 1/5] " Viresh Kumar
2017-06-28 15:55   ` Randy Dunlap
2017-06-29  3:51     ` Viresh Kumar
2017-06-29 12:50       ` Russell King - ARM Linux
2017-06-29 14:49         ` Viresh Kumar
2017-06-28 10:26 ` [RFC 2/5] drivers: boot_constraint: Add support for supply constraints Viresh Kumar
2017-06-28 10:26 ` [RFC 3/5] drivers: boot_constraint: Add boot_constraints_disable kernel parameter Viresh Kumar
2017-06-28 15:51   ` Randy Dunlap
2017-06-28 10:26 ` [RFC 4/5] drivers: boot_constraint: Add debugfs support Viresh Kumar
2017-06-28 15:46   ` Randy Dunlap
2017-06-29  4:11     ` Viresh Kumar
2017-06-28 10:26 ` [RFC 5/5] drivers: Code to test boot constraints Viresh Kumar
2017-06-29 12:40 ` [RFC 0/5] drivers: Add boot constraints core Enrico Weigelt, metux IT consult
2017-06-29 14:47   ` Viresh Kumar
2017-06-29 15:06     ` Enrico Weigelt, metux IT consult
2017-06-30  3:16       ` Viresh Kumar
2017-06-30  3:33         ` Chen-Yu Tsai
2017-06-30  3:55           ` Viresh Kumar
2017-06-30  4:05             ` Chen-Yu Tsai
2017-06-30  4:12               ` Viresh Kumar
2017-06-30  4:22                 ` Chen-Yu Tsai
2017-06-30  5:12                   ` Viresh Kumar
2017-06-30  6:36                     ` Chen-Yu Tsai
2017-06-30  8:43                       ` Viresh Kumar
2017-06-30 12:10                         ` Mark Brown
2017-07-03  6:15                           ` Viresh Kumar
2017-07-03 15:07                             ` Mark Brown
2017-07-04  6:45                               ` Viresh Kumar
2017-06-30 12:12                   ` Mark Brown
2017-06-29 12:49 ` Russell King - ARM Linux [this message]
2017-06-29 13:05   ` Enrico Weigelt, metux IT consult
2017-06-29 14:58   ` Viresh Kumar
2017-06-29 15:43     ` Russell King - ARM Linux
2017-06-29 21:00       ` Stephen Boyd
2017-07-05 22:07         ` Rob Clark
2017-07-07 22:39           ` Stephen Boyd

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=20170629124908.GV4902@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rnayak@codeaurora.org \
    --cc=robh@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=shashim@codeaurora.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.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).