1. 20 Apr, 2019 1 commit
    • Eugeniy Paltsev's avatar
      ARC: u-boot args: check that magic number is correct · 8232cdfd
      Eugeniy Paltsev authored
      [ Upstream commit edb64bca ]
      
      In case of devboards we really often disable bootloader and load
      Linux image in memory via JTAG. Even if kernel tries to verify
      uboot_tag and uboot_arg there is sill a chance that we treat some
      garbage in registers as valid u-boot arguments in JTAG case.
      E.g. it is enough to have '1' in r0 to treat any value in r2 as
      a boot command line.
      
      So check that magic number passed from u-boot is correct and drop
      u-boot arguments otherwise. That helps to reduce the possibility
      of using garbage as u-boot arguments in JTAG case.
      
      We can safely check U-boot magic value (0x0) in linux passed via
      r1 register as U-boot pass it from the beginning. So there is no
      backward-compatibility issues.
      Signed-off-by: default avatarEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      8232cdfd
  2. 17 Apr, 2019 39 commits