• Eugeniy Paltsev's avatar
    ARC: U-boot: check arguments paranoidly · a66f2e57
    Eugeniy Paltsev authored
    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>
    a66f2e57
Name
Last commit
Last update
..
.gitignore Loading commit data...
Makefile Loading commit data...
arc_hostlink.c Loading commit data...
arcksyms.c Loading commit data...
asm-offsets.c Loading commit data...
ctx_sw.c Loading commit data...
ctx_sw_asm.S Loading commit data...
devtree.c Loading commit data...
disasm.c Loading commit data...
entry-arcv2.S Loading commit data...
entry-compact.S Loading commit data...
entry.S Loading commit data...
fpu.c Loading commit data...
head.S Loading commit data...
intc-arcv2.c Loading commit data...
intc-compact.c Loading commit data...
irq.c Loading commit data...
kgdb.c Loading commit data...
kprobes.c Loading commit data...
mcip.c Loading commit data...
module.c Loading commit data...
perf_event.c Loading commit data...
process.c Loading commit data...
ptrace.c Loading commit data...
reset.c Loading commit data...
setup.c Loading commit data...
signal.c Loading commit data...
smp.c Loading commit data...
stacktrace.c Loading commit data...
sys.c Loading commit data...
traps.c Loading commit data...
troubleshoot.c Loading commit data...
unaligned.c Loading commit data...
unwind.c Loading commit data...
vmlinux.lds.S Loading commit data...