Skip to content
Snippets Groups Projects
  1. Feb 10, 2023
  2. Feb 08, 2023
  3. Feb 06, 2023
    • Sjoerd Simons's avatar
      lmb: Set correct lmb flags for EFI memory map entries · c5279ea1
      Sjoerd Simons authored and Tom Rini's avatar Tom Rini committed
      
      When adding reserved memory areas from the EFI memory map set the NOMAP
      flag when applicable. When this isn't done adding "no-map" flagged entries
      from the fdt after receiving the same from the EFI memory map fails due
      to non-matching flags.
      
      Signed-off-by: default avatarSjoerd Simons <sjoerd@collabora.com>
      c5279ea1
    • Tom Rini's avatar
      lmb: Default to not-LMB_USE_MAX_REGIONS · 007ae5d1
      Tom Rini authored
      
      The LMB code allows for picking a hard limit on the number of regions it
      can know of, or to dynamically allocate these regions. The reason for
      this choice is to allow for the compiler to perform a size optimization
      in the common case. This optimization however, is very small, ranging
      from 196 bytes to 15 bytes saved, or in some cases, being larger. Now
      that we also have more regions covered by LMB (in order to protect
      various parts of our self at run time), the default of 8 is also much
      easier to hit and leads to non-obvious error messages (which imply that
      an area is protected, not that we're out of areas to add to the list).
      
      Switch to the dynamic use as the default.
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      007ae5d1
  4. Jan 27, 2023
  5. Jan 23, 2023
    • Simon Glass's avatar
      efi: Improve logging in efi_disk · 3722cc97
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      When this fails it can be time-consuming to debug. Add some debugging
      to help with this. Also try to return error codes instead of just using
      -1.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      3722cc97
    • Simon Glass's avatar
      lib: Support printing an error string · 7f331941
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      It is often useful to show an error code to give the user a clue as to
      what went wrong. When error strings are compiled into U-Boot it is
      possible to show a message as well.
      
      But at present it is not very convenient, since code must check if the
      error strings are present, then obtain the error string and use it in
      a printf() string.
      
      Add a %dE option which shows an error code along with an error string,
      if available. This makes it easy to show one or both.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      7f331941
    • Simon Glass's avatar
      lib: Add a function to split a string into substrings · 3e96ed44
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Some environment variables provide a space-separated list of strings. It
      is easier to process these when they are broken out into an array of
      strings.
      
      Add a utility function to handle this.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      3e96ed44
  6. Jan 20, 2023
  7. Jan 19, 2023
    • Brandon Maier's avatar
      lib: zstd: update to latest Linux zstd 1.5.2 · 4b9b25d9
      Brandon Maier authored and Tom Rini's avatar Tom Rini committed
      Update the zstd implementation to match Linux zstd 1.5.2 from commit
      2aa14b1ab2.
      
      This was motivated by running into decompression corruption issues when
      trying to uncompress files compressed with newer versions of zstd. zstd
      users also claim significantly improved decompression times with newer
      zstd versions which is a side benefit.
      
      Original zstd code was copied from Linux commit 2aa14b1ab2 which is a
      custom-built implementation based on zstd 1.3.1. Linux switched to an
      implementation that is a copy of the upstream zstd code in Linux commit
      e0c1b49f5b, this results in a large code diff. However this should make
      future updates easier along with other benefits[1].
      
      This commit is a straight mirror of the Linux zstd code, except to:
      - update a few #include that do not translate cleanly
        - linux/swab.h -> asm/byteorder.h
        - linux/limits.h -> linux/kernel.h
        - linux/module.h -> linux/compat.h
      - remove assert() from debug.h so it doesn't conflict with u-boot's
        assert()
      - strip out the compressor code as was done in the previous u-boot zstd
      - update existing zstd users to the new Linux zstd API
      - change the #define for MEM_STATIC to use INLINE_KEYWORD for codesize
      - add a new KConfig option that sets zstd build options to minify code
        based on zstd's ZSTD_LIB_MINIFY[2].
      
      These changes were tested by booting a zstd 1.5.2 compressed kernel inside a
      FIT. And the squashfs changes by loading a file from zstd compressed squashfs
      with sqfsload. buildman was used to compile test other boards and check for
      binary bloat, as follows:
      
      > $ buildman -b zstd2 --boards dh_imx6,m53menlo,mvebu_espressobin-88f3720,sandbox,sandbox64,stm32mp15_dhcom_basic,stm32mp15_dhcor_basic,turris_mox,turris_omnia -sS
      > Summary of 6 commits for 9 boards (8 threads, 1 job per thread)
      > 01: Merge branch '2023-01-10-platform-updates'
      >        arm:  w+   m53menlo dh_imx6
      > 02: lib: zstd: update to latest Linux zstd 1.5.2
      >    aarch64: (for 2/2 boards) all -3186.0 rodata +920.0 text -4106.0
      >        arm: (for 5/5 boards) all +1254.4 rodata +940.0 text +314.4
      >    sandbox: (for 2/2 boards) all -4452.0 data -16.0 rodata +640.0 text -5076.0
      
      [1] https://github.com/torvalds/linux/commit/e0c1b49f5b674cca7b10549c53b3791d0bbc90a8
      [2] https://github.com/facebook/zstd/blob/f302ad8811643c428c4e3498e28f53a0578020d3/lib/libzstd.mk#L31
      
      
      
      Signed-off-by: default avatarBrandon Maier <brandon.maier@collins.com>
      [trini: Set ret to -EINVAL for the error of "failed to detect
      compressed" to fix warning, drop ZSTD_SRCSIZEHINT_MAX for non-Linux host
      tool builds]
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      4b9b25d9
  8. Jan 18, 2023
  9. Jan 16, 2023
  10. Jan 13, 2023
  11. Jan 12, 2023
    • Harald Seiler's avatar
      Revert "time: add weak annotation to timer_read_counter declaration" · ea3d28ec
      Harald Seiler authored and Tom Rini's avatar Tom Rini committed
      This reverts commit 65ba7add.
      
      A weak extern is a nasty sight to behold: If the symbol is never
      defined, on ARM, the linker will replace the function call with a NOP.
      This behavior isn't well documented but there are at least some hints
      to it [1].
      
      When timer_read_counter() is not defined, this obviously does the wrong
      thing here and it does so silently.  The consequence is that a board
      without timer_read_counter() will sleep for random amounts and generally
      have erratic get_ticks() values.
      
      Drop the __weak annotation of the extern so a linker error is raised
      when timer_read_counter() is not defined.  This is okay, the original
      reason for the reverted change - breaking the sandbox build - no longer
      applies.
      
      Final sidenote:  This was the only weak extern in the entire tree at
      this time as far as I can tell.  I guess we should avoid introduction of
      them again as they are obviously a very big footgun.
      
      [1]: https://stackoverflow.com/questions/31203402/gcc-behavior-for-unresolved-weak-functions
      
      
      
      Fixes: 65ba7add ("time: add weak annotation to timer_read_counter declaration")
      Reported-by: default avatarSerge Bazanski <q3k@q3k.org>
      Signed-off-by: Harald Seiler's avatarHarald Seiler <hws@denx.de>
      ea3d28ec
  12. Jan 11, 2023
  13. Jan 06, 2023
Loading