1. 24 4月, 2019 1 次提交
    • E
      fdt: boot_get_fdt: remove redundant zeroing out · d9313efc
      Eugeniu Rosca 提交于
      Paranoid programming [1] lies at the foundation of proper software
      development, but the repetitive zeroing-out of output arguments in the
      context of the same function rather clutters the code and inhibits
      further refactoring/optimization than is doing any good.
      
      In boot_get_fdt(), we already perform zero/NULL-initialization of
      *of_flat_tree and *of_size at the beginning of the function, so doing
      the same at function error-out is redundant/superfluous.
      
      Moreover, keeping the code unchanged might encourage the developers to
      update *of_flat_tree and *of_size during some interim computations,
      which is against the current design of boot_get_fdt(). Currently,
      writing useful data into these arguments happens just before
      successfully returning from boot_get_fdt() and it should better stay so.
      
      [1] https://blog.regehr.org/archives/1106Signed-off-by: NEugeniu Rosca <erosca@de.adit-jv.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      d9313efc
  2. 09 3月, 2019 1 次提交
  3. 09 2月, 2019 1 次提交
  4. 17 1月, 2019 1 次提交
  5. 15 1月, 2019 1 次提交
  6. 26 9月, 2018 1 次提交
    • A
      sandbox: Fix set_working_fdt_addr users · eaac4fb2
      Alexander Graf 提交于
      When running sandbox with the new pointer sanitization we just recently
      introduced, we're running into a case with FIT images where we end up
      interpreting pointers as addresses.
      
      What happened is that most callers of set_working_fdt_addr() simply
      convert pointers into addresses without taking into account that they
      might be 2 separate address spaces. Fix the callers up to map their
      pointers into addresses.
      
      This makes sandbox tests pass for me again.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      eaac4fb2
  7. 07 5月, 2018 1 次提交
    • T
      SPDX: Convert all of our single license tags to Linux Kernel style · 83d290c5
      Tom Rini 提交于
      When U-Boot started using SPDX tags we were among the early adopters and
      there weren't a lot of other examples to borrow from.  So we picked the
      area of the file that usually had a full license text and replaced it
      with an appropriate SPDX-License-Identifier: entry.  Since then, the
      Linux Kernel has adopted SPDX tags and they place it as the very first
      line in a file (except where shebangs are used, then it's second line)
      and with slightly different comment styles than us.
      
      In part due to community overlap, in part due to better tag visibility
      and in part for other minor reasons, switch over to that style.
      
      This commit changes all instances where we have a single declared
      license in the tag as both the before and after are identical in tag
      contents.  There's also a few places where I found we did not have a tag
      and have introduced one.
      Signed-off-by: NTom Rini <trini@konsulko.com>
      83d290c5
  8. 01 4月, 2018 1 次提交
  9. 05 3月, 2018 1 次提交
  10. 19 2月, 2018 1 次提交
    • A
      fdt: Implement weak arch_fixup_fdt() · 4280342a
      Alexey Brodkin 提交于
      Only ARM and in some configs MIPS really implement arch_fixup_fdt().
      Others just use the same boilerplate which is not good by itself,
      but what's worse if we try to build with disabled CONFIG_CMD_BOOTM
      and enabled CONFIG_OF_LIBFDT we'll hit an unknown symbol which was
      apparently implemented in arch/xxx/lib/bootm.c.
      
      Now with weak arch_fixup_fdt() right in image-fdt.c where it is
      used we get both items highlighted above fixed.
      Signed-off-by: NAlexey Brodkin <abrodkin@synopsys.com>
      Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: York Sun <york.sun@nxp.com>
      Cc: Stefan Roese <sr@denx.de>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      Reviewed-by: NDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
      4280342a
  11. 16 10月, 2017 1 次提交
  12. 15 9月, 2017 1 次提交
  13. 16 8月, 2017 2 次提交
  14. 01 5月, 2017 1 次提交
    • T
      fdt: Move fdt_fixup_ethernet to a common place · 26d61195
      Tom Rini 提交于
      With 3f66149d we no longer have a common call fdt_fixup_ethernet.
      This was fine to do on PowerPC as they largely had calls already in
      ft_cpu_fixup.  On ARM however we largely relied on this call.  Rather
      than introduce a large number of changes to ft_cpu_fixup /
      ft_board_fixup we recognize that this is a common enough call that we
      should be doing it in a central location.  Do it early enough that we
      can do any further updates in ft_cpu_fixup / ft_board_fixup.
      
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Chen-Yu Tsai <wens@csie.org>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Thomas Chou <thomas@wytron.com.tw> (maintainer:NIOS)
      Cc: York Sun <york.sun@nxp.com> (maintainer:POWERPC MPC85XX)
      Cc: Stefan Roese <sr@denx.de> (maintainer:POWERPC PPC4XX)
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
      Fixes: 3f66149d ("Remove extra fdt_fixup_ethernet() call")
      Signed-off-by: NTom Rini <trini@konsulko.com>
      Acked-by: NStefan Roese <sr@denx.de>
      Acked-by: NYork Sun <york.sun@nxp.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      26d61195
  15. 08 4月, 2017 1 次提交
  16. 03 12月, 2016 1 次提交
  17. 14 10月, 2016 1 次提交
  18. 22 9月, 2016 1 次提交
    • P
      image-fit: Fix fit_get_node_from_config semantics · bd86ef11
      Paul Burton 提交于
      Commit bac17b78 ("image-fit: switch ENOLINK to ENOENT") changed
      fit_get_node_from_config to return -ENOENT when a property doesn't
      exist, but didn't change any of its callers which check return values.
      Notably it didn't change boot_get_ramdisk, which leads to U-Boot failing
      to boot FIT images which don't include ramdisks with the following
      message:
      
        Ramdisk image is corrupt or invalid
      
      It also didn't take into account that by returning -ENOENT to denote the
      lack of a property we lost the ability to determine from the return
      value of fit_get_node_from_config whether it was the property or the
      configuration node that was missing, which may potentially lead callers
      to accept invalid FIT images.
      
      Fix this by having fit_get_node_from_config return -EINVAL when the
      configuration node isn't found and -ENOENT when the property isn't
      found, which seems to make semantic sense. Callers that previously
      checked for -ENOLINK are adjusted to check for -ENOENT, which fixes the
      breakage introduced by commit bac17b78 ("image-fit: switch ENOLINK
      to ENOENT").
      
      The only other user of the return fit_get_node_from_config return value,
      indirectly, is bootm_find_os which already checked for -ENOENT. From a
      read-through of the code I suspect it ought to have been checking for
      -ENOLINK prior to bac17b78 ("image-fit: switch ENOLINK to ENOENT")
      anyway, which would make it right after this patch, but this would be
      good to get verified by someone who knows this x86 code or is able to
      test it.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: Jonathan Gray <jsg@jsg.id.au>
      Cc: Marek Vasut <marex@denx.de>
      Acked-by: NMarek Vasut <marex@denx.de>
      Acked-by: NStefan Roese <sr@denx.de>
      Acked-by: NGeorge McCollister <george.mccollister@gmail.com>
      Tested-by: NGeorge McCollister <george.mccollister@gmail.com>
      bd86ef11
  19. 01 8月, 2016 1 次提交
  20. 16 3月, 2016 1 次提交
    • A
      efi_loader: Call fdt preparation functions · dea2174d
      Alexander Graf 提交于
      We have a nice framework around image fils to prepare a device tree
      for OS execution. That one patches in missing device tree nodes and
      fixes up the memory range bits.
      
      We need to call that one from the EFI boot path too to get all those
      nice fixups. This patch adds the call.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      dea2174d
  21. 15 3月, 2016 1 次提交
    • S
      Kconfig: Move CONFIG_FIT and related options to Kconfig · 73223f0e
      Simon Glass 提交于
      There are already two FIT options in Kconfig but the CONFIG options are
      still in the header files. We need to do a proper move to fix this.
      
      Move these options to Kconfig and tidy up board configuration:
      
         CONFIG_FIT
         CONFIG_OF_BOARD_SETUP
         CONFIG_OF_SYSTEM_SETUP
         CONFIG_FIT_SIGNATURE
         CONFIG_FIT_BEST_MATCH
         CONFIG_FIT_VERBOSE
         CONFIG_OF_STDOUT_VIA_ALIAS
         CONFIG_RSA
      
      Unfortunately the first one is a little complicated. We need to make sure
      this option is not enabled in SPL by this change. Also this option is
      enabled automatically in the host builds by defining CONFIG_FIT in the
      image.h file. To solve this, add a new IMAGE_USE_FIT #define which can
      be used in files that are built on the host but must also build for U-Boot
      and SPL.
      
      Note: Masahiro's moveconfig.py script is amazing.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      [trini: Add microblaze change, various configs/ re-applies]
      Signed-off-by: NTom Rini <trini@konsulko.com>
      73223f0e
  22. 06 2月, 2016 1 次提交
  23. 06 12月, 2015 1 次提交
    • P
      common: image-fdt: correct fdt_blob for IMAGE_FORMAT_LEGACY · 2ea47be0
      Peng Fan 提交于
      If condition of "(load == image_start || load == image_data)" is true,
      should use "fdt_addr = load;", but not "fdt_blob = (char *)image_data;",
      or fdt_blob will be overridden by "fdt_blob = map_sysmem(fdt_addr, 0);"
      at the end of the switch case.
      Signed-off-by: NPeng Fan <Peng.Fan@freescale.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Joe Hershberger <joe.hershberger@ni.com>
      Cc: Max Krummenacher <max.krummenacher@toradex.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Suriyan Ramasami <suriyan.r@gmail.com>
      Cc: Paul Kocialkowski <contact@paulk.fr>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      2ea47be0
  24. 13 8月, 2015 1 次提交
  25. 05 6月, 2015 1 次提交
    • P
      fdt: Pass the device serial number through devicetree · 10be5b5d
      Paul Kocialkowski 提交于
      Before device-tree, the device serial number used to be passed to the kernel
      using ATAGs (on ARM). This is now deprecated and all the handover to the kernel
      should now be done using device-tree. Thus, this passes the serial-number
      property to the kernel using the serial-number property of the root node, as
      expected by the kernel.
      
      The serial number is a string that somewhat represents the device's serial
      number. It might come from some form of storage (e.g. an eeprom) and be
      programmed at factory-time by the manufacturer or come from identification
      bits available in e.g. the SoC.
      Signed-off-by: NPaul Kocialkowski <contact@paulk.fr>
      Reviewed-by: NSimon Glass <sgj@chromium.org>
      10be5b5d
  26. 19 4月, 2015 1 次提交
  27. 18 2月, 2015 1 次提交
  28. 08 12月, 2014 1 次提交
  29. 04 12月, 2014 1 次提交
  30. 21 11月, 2014 2 次提交
  31. 08 11月, 2014 1 次提交
  32. 09 8月, 2014 1 次提交
  33. 28 7月, 2014 1 次提交
  34. 26 7月, 2014 1 次提交
  35. 19 6月, 2014 3 次提交
  36. 06 6月, 2014 1 次提交
    • H
      bootm: make use of legacy image format configurable · 21d29f7f
      Heiko Schocher 提交于
      make the use of legacy image format configurable through
      the config define CONFIG_IMAGE_FORMAT_LEGACY.
      
      When relying on signed FIT images with required signature check
      the legacy image format should be disabled. Therefore introduce
      this new define and enable legacy image format if CONFIG_FIT_SIGNATURE
      is not set. If CONFIG_FIT_SIGNATURE is set disable per default
      the legacy image format.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Lars Steubesand <lars.steubesand@philips.com>
      Cc: Mike Pearce <mike@kaew.be>
      Cc: Wolfgang Denk <wd@denx.de>
      Cc: Tom Rini <trini@ti.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Acked-by: NSimon Glass <sjg@chromium.org>
      21d29f7f