All of lore.kernel.org
 help / color / mirror / Atom feed
* Adding support for device tree and command line
@ 2016-05-23 21:14 Hauke Mehrtens
  2016-05-23 21:34 ` Hauke Mehrtens
  0 siblings, 1 reply; 26+ messages in thread
From: Hauke Mehrtens @ 2016-05-23 21:14 UTC (permalink / raw)
  To: linux-mips, Jonas Gorski; +Cc: Daniel Gimpelevich, Mathias Kresin

Section 3 of this document defines some interfaces how a boot loader
could forward a command line *or* a device tree to the kernel:
http://wiki.prplfoundation.org/w/images/4/42/UHI_Reference_Manual.pdf
This allows only a device tree *or* a command line, not both.

The Linux kernel also supports an appended device tree. In this case the
early code overwrites the fw_args to look like the boot loader added a
device tree. This is done when CONFIG_MIPS_RAW_APPENDED_DTB is activated.

The problem is when we use an appended device tree and the boot loader
adds some important information in the kernel command line. In this case
the command line gets overwritten and we do not get this information.
This is the case for some lantiq devices were the boot loader provides
the mac address to the kernel via the kernel command line.

My proposal to solve this problem is to extend the interface and add a
option to provide the kernel command line *and* a device tree from the
boot loader to the kernel.

a) use fw_arg0 ($a0) = -2 and fill the unused registers fw_arg2 ($a2)
and fw_arg3 ($a3) with argv and envp.

b) add a new boot protocol $a0 = -3 with $a1 = DT address, $a2 = argv
and $a3 = envp.

I would prefer solution b).

This way we would not loose the kernel command line when appending a
device tree and this could also be used by the boot loader if someone
wants to.

Should I send a patch for this?

Hauke

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2016-05-30 17:24 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-23 21:14 Adding support for device tree and command line Hauke Mehrtens
2016-05-23 21:34 ` Hauke Mehrtens
2016-05-23 22:12   ` Daniel Gimpelevich
2016-05-24  5:32     ` [RFC PATCH] " Daniel Gimpelevich
2016-05-24 11:27       ` Antony Pavlov
2016-05-24 15:15         ` Daniel Gimpelevich
2016-05-24 15:27           ` Daniel Gimpelevich
2016-05-24 16:48             ` Antony Pavlov
2016-05-24 17:00               ` Daniel Gimpelevich
2016-05-25  3:31                 ` Antony Pavlov
2016-05-25  3:33                   ` Daniel Gimpelevich
2016-05-27 21:06               ` [PATCH v2] " Daniel Gimpelevich
2016-05-28 10:31                 ` Antony Pavlov
2016-05-28 19:05                   ` Daniel Gimpelevich
2016-05-29  1:23                     ` Daniel Gimpelevich
2016-05-30 17:24                       ` Antony Pavlov
2016-05-29 10:53                 ` Jonas Gorski
2016-05-29 18:38                   ` Daniel Gimpelevich
2016-05-29 19:01                     ` Jonas Gorski
2016-05-29 19:08                       ` Daniel Gimpelevich
2016-05-29 19:22                         ` Jonas Gorski
2016-05-29 19:26                           ` Daniel Gimpelevich
2016-05-29 19:30                             ` Jonas Gorski
2016-05-29 21:19                   ` Daniel Gimpelevich
2016-05-26 16:25       ` [RFC PATCH] " Hauke Mehrtens
2016-05-26 17:24         ` Daniel Gimpelevich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.