linux-mips
[Top] [All Lists]

[RFC] [IP22] parsing PROM variables at startup

To: Linux-MIPS <linux-mips@linux-mips.org>
Subject: [RFC] [IP22] parsing PROM variables at startup
From: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Date: Tue, 13 Oct 2009 20:55:12 +0300
Cc: Ralf Baechle <ralf@linux-mips.org>, davem@davemloft.net
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=7vdUarBnYv/rnjhQ2mXk9f6qC4xd1MkvKQG4Pe0r8hk=; b=YyA/l+czt+gfdM+xUyyf4qVPbwy1RiKy73K1sL5AWCnFCYyJ0mrohLN8Az3UUqtyMI +DhxNikgiezxYcJsJTtGrvr5TJ3LloLFE26g+0YmcWB7iXxTbZzeHrdCLVbnGuuIAOB6 qAkHKeyJseNrh1gYW34H1WiqJFRK/EwGZWz7M=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=ZUhmhy+jPhAFCyC4r2mkUhiiRJR/BDxMHVVzsvYUyfVEMTev7PU7Yoeo0Z/Tqtrr1z 2uJUE6nlOq1C1IzoFCrPJnb97Uk9dfrpTzcPHpiT5Domc5UxQ+qc1wqzvzYcftKaVkZd nSOuTXbgePlKWQU7JvbsrNFbJ3mIIKTmtMeCk=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Hi,

I tried booting a few kernels, ranging from 2.2.1 to the current Linus
Git, on my IP22s using an ecoff image directly, without the help of
arcboot or tip22. It turns out that during many years (at least, since
the times of late 2.4 series) the sizes of ecoff images have been so
big that ARCS was not capable of reading the kernel images. Therefore,
I'd like to claim that it's safe to assume that at least from now on,
nobody is ever going to boot ecoffs on IP22 whatsoever, and arcboot
and tip22 remain the only way to load Linux on an IP22 machine.

I'm leading to the following thing. Currently we have the
arch/mips/fw/arc/cmdline.c, which assumes that the kernel could
receive command-line parameters directly from PROM, including such
variables as OSLoadPartition, OSLoadFilename, etc. Both arcboot and
tip22 handle those parameters by themselves, never exposing them to
the kernel. The latter fact is easy to see from the sources of the
arcboot and tip22 loaders. That said, I would like to simplify
arch/mips/fw/arc/cmdline.c::prom_init_cmdline() so that the PROM
variables do not get any special treatment.

Are you asking me why did I start touching the 13-years-old code?

There is an unpleasant bug in the current PROM command line handler.
Namely, the CONFIG_CMDLINE, if set, is overwritten when
prom_init_cmdline() tries to strip off some of the PROM variables, and
it's easy to see from the code of that function. So, I thought of
fixing that, and, simultaneously, of simplifying the overall logic by
assuming that we never ever have to special-case the PROM variables at
all.

Could anyone see any drawbacks in the discourse above? If not, I'll
start making a patch.

Thanks,
Dmitri

<Prev in Thread] Current Thread [Next in Thread>