[PATCH] ARM: move memory layout sanity checking before meminfo initialization
Colin Cross
ccross at google.com
Fri Jul 15 16:58:37 EDT 2011
On Fri, Jul 15, 2011 at 11:13 AM, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Fri, Jul 15, 2011 at 10:35:14AM -0700, Colin Cross wrote:
>> CMDLINE_EXTEND solves a real problem, and when it's not solved in the
>> kernel, it ends up getting solved in every bootloader. Every
>> kernel/board requires some command line options (like "console="), and
>> every bootloader ends up passing some special options.
>
> And yet again, if you have a kernel with a built-in console= setting,
> there is _no_ _way_ to disable that console via the kernel command
> line.
>
> So what if some of your platforms need one console, others need a different
> console, but must not use the first one...
>
> Do we need nomem= and noconsole= options too? Or do we just do the
> sane thing and get rid of CMDLINE_EXTEND - or insist that stuff like
> console= and mem= options are never built-in ?
>
The source of the problem is that there are two kinds of options mixed
together into one command line:
1. Options that are specific to the kernel and board (console, mem, etc.)
2. Options that tell the kernel information that only the bootloader
knows (Tegra needs to know where the bootloader put signed resume code
to be executed by a slave processor, some devices need to get a MAC
address from the bootloader)
For kernels that are designed to run on a single board, the kernel
options can go into the built-in command line, the bootloader options
can be concatenated with CONFIG_CMDLINE_EXTEND, and everything works
great (unless I forget to remove the mem= option from the bootloader
options). That doesn't work as well for multi-board kernels, where
CMDLINE_EXTEND removes the ability for the bootloader to override the
kernel, requiring the kernel built-in command line to only have the
options that are guaranteed to work on all boards (or leave
CMDLINE_EXTEND=n).
If there was a second way to pass options from the bootloader that
didn't override the built-in kernel options, bootloader options could
go there, while allowing the builtin command line to be replaced if
necessary. A new ATAG_CMDLINE_EXTEND? Move all the bootloader
options into ATAGs?
More information about the linux-arm-kernel
mailing list