• Eugeniy Paltsev's avatar
    ARC: U-boot: check arguments paranoidly · 075a1a66
    Eugeniy Paltsev authored
    commit a66f2e57 upstream.
    
    Handle U-boot arguments paranoidly:
     * don't allow to pass unknown tag.
     * try to use external device tree blob only if corresponding tag
       (TAG_DTB) is set.
     * don't check uboot_tag if kernel build with no ARC_UBOOT_SUPPORT.
    
    NOTE:
    If U-boot args are invalid we skip them and try to use embedded device
    tree blob. We can't panic on invalid U-boot args as we really pass
    invalid args due to bug in U-boot code.
    This happens if we don't provide external DTB to U-boot and
    don't set 'bootargs' U-boot environment variable (which is default
    case at least for HSDK board) In that case we will pass
    {r0 = 1 (bootargs in r2); r1 = 0; r2 = 0;} to linux which is invalid.
    
    While I'm at it refactor U-boot arguments handling code.
    
    Cc: stable@vger.kernel.org
    Tested-by: 's avatarCorentin LABBE <clabbe@baylibre.com>
    Signed-off-by: 's avatarEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
    Signed-off-by: 's avatarVineet Gupta <vgupta@synopsys.com>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    075a1a66
Name
Last commit
Last update
Documentation Loading commit data...
LICENSES Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.clang-format Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...