1. 30 5月, 2018 1 次提交
  2. 26 5月, 2018 3 次提交
    • M
      tpm: prepare support for TPMv2.x commands · ff32245b
      Miquel Raynal 提交于
      Choice between v1 and v2 compliant functions is done with the
      configuration.
      
      Create the various files that will receive TPMv2-only code on the same
      scheme as for the TPMv1 code.
      Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      ff32245b
    • M
      tpm: disociate TPMv1.x specific and generic code · d677bfe2
      Miquel Raynal 提交于
      There are no changes in this commit but a new organization of the code
      as follow.
      
      * cmd/ directory:
              > move existing code from cmd/tpm.c in cmd/tpm-common.c
      	> move specific code in cmd/tpm-v1.c
      	> create a specific header file with generic definitions for
      	  commands only called cmd/tpm-user-utils.h
      
      * lib/ directory:
              > move existing code from lib/tpm.c in lib/tpm-common.c
      	> move specific code in lib/tpm-v1.c
      	> create a specific header file with generic definitions for
      	  the library itself called lib/tpm-utils.h
      
      * include/ directory:
              > move existing code from include/tpm.h in include/tpm-common.h
      	> move specific code in include/tpm-v1.h
      
      Code designated as 'common' is compiled if TPM are used. Code designated
      as 'specific' is compiled only if the right specification has been
      selected.
      
      All files include tpm-common.h.
      Files in cmd/ include tpm-user-utils.h.
      Files in lib/ include tpm-utils.h.
      Depending on the specification, files may include either (not both)
      tpm-v1.h or tpm-v2.h.
      Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      [trini: Fix a few more cases of tpm.h -> tpm-v1.h, some Kconfig logic]
      Signed-off-by: NTom Rini <trini@konsulko.com>
      d677bfe2
    • M
      tpm: prepare introduction of TPMv2.x support in Kconfig · 9f9ce3c3
      Miquel Raynal 提交于
      Because both major revisions are not compatible at all, let's make them
      mutually exclusive in Kconfig. This way we will be sure, when using a
      command or a library function that it is supported by the right
      revision.
      
      Current drivers are currently prefixed by "tpm_", we will prefix TPMv2.x
      files by "tpm2_" to make the distinction without moving everything.
      
      The Kconfig menu about TPM drivers is now divided into two sections, one
      for each specification. Compliant drivers with one specification will
      only show up if this specification _only_ has been selected, otherwise a
      comment is displayed.
      
      Once a driver is selected by the user, it selects automatically a
      boolean value, that is needed in order to activate the TPM commands.
      Selecting the TPM commands will automatically select the right
      command/library files.
      Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      [trini: Rework deps as TPM_V1 and TPM_V2 depend on TPM,
              drop TPM_DRIVER_SELECTED]
      Signed-off-by: NTom Rini <trini@konsulko.com>
      9f9ce3c3
  3. 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
  4. 29 4月, 2018 1 次提交
    • A
      spl: Split sprintf, strto* from SPL serial in Kconfig · 14ad44ab
      Alex Kiernan 提交于
      When SPL serial is disabled, callers who need sprintf or strtoul fail
      because their inclusion is guarded by CONFIG_SPL_SERIAL_SUPPORT/
      CONFIG_TPL_SERIAL_SUPPORT.
      
      Split printf, sprintf and strto into their own entries and then select
      all of them if SERIAL_SUPPORT is enabled to match the current behaviour.
      
      Include panic.o unconditionally as it can be called from anywhere which
      uses BUG_ON().
      Signed-off-by: NAlex Kiernan <alex.kiernan@gmail.com>
      14ad44ab
  5. 20 3月, 2018 1 次提交
    • B
      optee: Add lib entries for sharing OPTEE code across ports · 32ce6179
      Bryan O'Donoghue 提交于
      This patch adds code to lib to enable sharing of useful OPTEE code between
      board-ports and architectures. The code on lib/optee/optee.c comes from the
      TI omap2 port. Eventually the OMAP2 code will be patched to include the
      shared code. The intention here is to add more useful OPTEE specific code
      as more functionality gets added.
      Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Cc: Harinarayan Bhatta <harinarayan@ti.com>
      Cc: Andrew F. Davis <afd@ti.com>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Kever Yang <kever.yang@rock-chips.com>
      Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
      Cc: Peng Fan <peng.fan@nxp.com>
      Tested-by: NPeng Fan <peng.fan@nxp.com>
      32ce6179
  6. 23 1月, 2018 1 次提交
    • H
      efi_driver: EFI block driver · 05ef48a2
      Heinrich Schuchardt 提交于
      This patch provides
      * a uclass for EFI drivers
      * a EFI driver for block devices
      
      For each EFI driver the uclass
      * creates a handle
      * adds the driver binding protocol
      
      The uclass provides the bind, start, and stop entry points for the driver
      binding protocol.
      
      In bind() and stop() it checks if the controller implements the protocol
      supported by the EFI driver. In the start() function it calls the bind()
      function of the EFI driver. In the stop() function it destroys the child
      controllers.
      
      The EFI block driver binds to controllers implementing the block io
      protocol.
      
      When the bind function of the EFI block driver is called it creates a
      new U-Boot block device. It installs child handles for all partitions and
      installs the simple file protocol on these.
      
      The read and write functions of the EFI block driver delegate calls to the
      controller that it is bound to.
      
      A usage example is as following:
      
      U-Boot loads the iPXE snp.efi executable. iPXE connects an iSCSI drive and
      exposes a handle with the block IO protocol. It calls ConnectController.
      
      Now the EFI block driver installs the partitions with the simple file
      protocol.
      
      iPXE uses the simple file protocol to load Grub or the Linux Kernel.
      Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
      [agraf: add comment on calloc len]
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      05ef48a2
  7. 06 10月, 2017 1 次提交
  8. 03 10月, 2017 1 次提交
  9. 19 9月, 2017 1 次提交
    • H
      efi_selftest: provide an EFI selftest application · 623b3a57
      Heinrich Schuchardt 提交于
      A testing framework for the EFI API is provided.
      It can be executed with the 'bootefi selftest' command.
      
      It is coded in a way that at a later stage we may turn it
      into a standalone EFI application. The current build system
      does not allow this yet.
      
      All tests use a driver model and are run in three phases:
      setup, execute, teardown.
      
      A test may be setup and executed at boottime,
      it may be setup at boottime and executed at runtime,
      or it may be setup and executed at runtime.
      
      After executing all tests the system is reset.
      Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      623b3a57
  10. 15 9月, 2017 1 次提交
  11. 13 9月, 2017 1 次提交
  12. 11 9月, 2017 1 次提交
  13. 13 8月, 2017 1 次提交
  14. 01 6月, 2017 1 次提交
  15. 22 5月, 2017 1 次提交
    • T
      lib: move hash CONFIG options to Kconfig · 089df18b
      Tom Rini 提交于
      Commit 94e3c8c4 ("crypto/fsl - Add progressive hashing support
      using hardware acceleration.") created entries for CONFIG_SHA1,
      CONFIG_SHA256, CONFIG_SHA_HW_ACCEL, and CONFIG_SHA_PROG_HW_ACCEL.
      However, no defconfig has migrated to it.  Complete the move by first
      adding additional logic to various Kconfig files to select this when
      required and then use the moveconfig tool.  In many cases we can select
      these because they are required to implement other drivers.  We also
      correct how we include the various hashing algorithms in SPL.
      
      This commit was generated as follows (after Kconfig additions):
      
      [1] tools/moveconfig.py -y SHA1 SHA256 SHA_HW_ACCEL
      [2] tools/moveconfig.py -y SHA_PROG_HW_ACCEL
      
      Note:
      We cannot move SHA_HW_ACCEL and SHA_PROG_HW_ACCEL simultaneously
      because there is dependency between them.
      
      Cc: Poonam Aggrwal <poonam.aggrwal@freescale.com>
      Cc: Naveen Burmi <NaveenBurmi@freescale.com>
      Cc: Po Liu <po.liu@freescale.com>
      Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com>
      Cc: Priyanka Jain <Priyanka.Jain@freescale.com>
      Cc: Shaohui Xie <Shaohui.Xie@freescale.com>
      Cc: Chunhe Lan <Chunhe.Lan@freescale.com>
      Cc: Chander Kashyap <k.chander@samsung.com>
      Cc: Steve Rae <steve.rae@raedomain.com>
      Cc: Dirk Eibach <eibach@gdsys.de>
      Cc: Feng Li <feng.li_2@nxp.com>
      Cc: Alison Wang <alison.wang@freescale.com>
      Cc: Sumit Garg <sumit.garg@nxp.com>
      Cc: Mingkai Hu <Mingkai.Hu@freescale.com>
      Cc: York Sun <york.sun@nxp.com>
      Cc: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Cc: Akshay Saraswat <akshay.s@samsung.com>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Jagan Teki <jagan@amarulasolutions.com>
      Signed-off-by: NTom Rini <trini@konsulko.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Signed-off-by: NTom Rini <trini@konsulko.com>
      089df18b
  16. 19 10月, 2016 2 次提交
  17. 08 10月, 2016 1 次提交
    • B
      spl: saveenv: adding saveenv support in SPL · d2d9bdfc
      B, Ravi 提交于
      By default saveenv option is not supported for SPL. This patch
      enable the support for save environment variable for SPL build.
      
      Enable save environment support in SPL after setenv. By default
      the saveenv option is not provided in SPL, but some boards need
      this support in 'Falcon' boot, where SPL need to boot from
      different images based on environment variable set by OS. For
      example OS may set "reboot_image" environment variable to
      "recovery" inorder to boot recovery image by SPL. The SPL read
      "reboot_image" and act accordingly and change the reboot_image
      to default mode using setenv and save the environemnt.
      Signed-off-by: NRavi Babu <ravibabu@ti.com>
      Reviewed-by: NSimon Glass <sig@chromium.org>
      
      change in v1:
      	- dropped SUPPORT, use CONFIG_SPL_SAVEENV
      	- updates the comments in mmc_private.h
      d2d9bdfc
  18. 17 9月, 2016 1 次提交
    • S
      Use separate options for TPL support · 76f1f388
      Simon Glass 提交于
      At present TPL uses the same options as SPL support. In a few cases the board
      config enables or disables the SPL options depending on whether
      CONFIG_TPL_BUILD is defined.
      
      With the move to Kconfig, options are determined for the whole build and
      (without a hack like an #undef in a header file) cannot be controlled in this
      way.
      
      Create new TPL options for these and update users. This will allow Kconfig
      conversion to proceed for these boards.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      76f1f388
  19. 15 7月, 2016 1 次提交
  20. 13 6月, 2016 1 次提交
  21. 07 6月, 2016 1 次提交
  22. 16 3月, 2016 1 次提交
  23. 15 3月, 2016 1 次提交
    • S
      fdt: Allow libfdt to be used in SPL · aa34fbc0
      Simon Glass 提交于
      Add an option to enable libfdt in SPL. This can be useful when decoding
      FIT files in SPL.
      
      We need to make sure this option is not enabled in SPL by this change.
      Also this option needs to be enabled in host builds. Si add a new
      IMAGE_USE_LIBFDT #define which can be used in files that are built on the
      host but must also build for U-Boot and SPL.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      aa34fbc0
  24. 16 2月, 2016 1 次提交
    • S
      Makefile: remove BUILD_TAG from KBUILD_CFLAGS · 15b51878
      Stephen Warren 提交于
      If BUILD_TAG is part of KBUILD_CFLAGS, then any time the value changes,
      all files get rebuilt. In a continuous integration environment, the value
      will change every build. This wastes time, assuming that incremental
      builds would otherwise occur.
      
      To solve this, remove BUILD_TAG from KBUILD_CFLAGS and add it to CFLAGS
      for just the one file that uses it. This does have the disadvantage that
      if any other files want to use the flag, we'll need to duplicate this
      custom CFLAGS setup logic. However, it seems unlikely we'll need this.
      
      An alternative would be to add BUILD_TAG to the "local version" and remove
      the special case code from display_options.c. However, that would affect
      the format of the U-Boot signon message, which may negatively affect
      people looking for specific data there. The approach of using
      file-specific CFLAGS was suggested by Masahiro Yamada.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      Reviewed-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NSimon Glass <sjg@chromium.org>
      15b51878
  25. 14 12月, 2015 2 次提交
  26. 23 11月, 2015 1 次提交
    • S
      lib/tiny-printf.c: Add tiny printf function for space limited environments · 7d9cde10
      Stefan Roese 提交于
      This patch adds a small printf() version that supports all basic formats.
      Its intented to be used in U-Boot SPL versions on platforms with very
      limited internal RAM sizes.
      
      To enable it, just define CONFIG_USE_TINY_PRINTF in your defconfig. This
      will result in the SPL using this tiny function and the main U-Boot
      still using the full-blown printf() function.
      
      This code was copied from:
      http://www.sparetimelabs.com/printfrevisited
      With mostly only coding style related changes so that its checkpatch
      clean.
      
      The size reduction is about 2.5KiB. Here a comparison for the db-mv784mp-gp
      (Marvell AXP) SPL:
      
      Without this patch:
        58963   18536    1928   79427   13643 ./spl/u-boot-spl
      
      With this patch:
        56542   18536    1956   77034   12cea ./spl/u-boot-spl
      
      Note:
      To make it possible to compile tiny-printf.c instead of vsprintf.c when
      CONFIG_USE_TINY_PRINTF is defined, the functions printf() and vprintf() are
      moved from common/console.c into vsprintf.c in this patch.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      7d9cde10
  27. 20 11月, 2015 1 次提交
  28. 12 10月, 2015 1 次提交
    • J
      Add support for LZ4 decompression algorithm · 027b728d
      Julius Werner 提交于
      This patch adds support for LZ4-compressed FIT image contents. This
      algorithm has a slightly worse compression ration than LZO while being
      nearly twice as fast to decompress. When loading images from a fast
      storage medium this usually results in a boot time win.
      
      Sandbox-tested only since I don't have a U-Boot development system set
      up right now. The code was imported unchanged from coreboot where it's
      proven to work, though. I'm mostly interested in getting this recognized
      by mkImage for use in a downstream project.
      Signed-off-by: NJulius Werner <jwerner@chromium.org>
      Acked-by: NSimon Glass <sjg@chromium.org>
      027b728d
  29. 19 8月, 2015 2 次提交
  30. 05 8月, 2015 1 次提交
  31. 22 7月, 2015 3 次提交
  32. 23 4月, 2015 1 次提交
  33. 12 12月, 2014 1 次提交
    • P
      lib: errno: introduce errno_str(): returns errno related message · 59345b1f
      Przemyslaw Marczak 提交于
      The functions error's numbers are standarized - but the error
      messages are not.
      
      The errors are often handled with unclear error messages,
      so why not use an errno standarized messages.
      
      Advantages:
      - This could decrease the binary size.
      - Appended with a detailed information,
        the error message will be clear.
      
      This commit introduces new function:
      - const char *errno_to_str(int errno)
      
      The functions returns a pointer to the errno corresponding text message:
      - if errno is null or positive number - a pointer to "Success" message
      - if errno is negative - a pointer to errno related message
      Signed-off-by: NPrzemyslaw Marczak <p.marczak@samsung.com>
      Reviewed-by: NTom Rini <trini@ti.com>
      59345b1f