Skip to content
Snippets Groups Projects
  1. Mar 02, 2021
    • Patrick Delaunay's avatar
      arm: remove TTB_SECT_XN_MASK in DCACHE_WRITETHROUGH · 342e1abd
      Patrick Delaunay authored
      
      The normal memory (other that DCACHE_OFF) should be executable by default,
      only the device memory (DCACHE_OFF) used for peripheral access should have
      the bit execute never (TTB_SECT_XN_MASK).
      
      Signed-off-by: default avatarPatrick Delaunay <patrick.delaunay@foss.st.com>
      342e1abd
    • Patrick Delaunay's avatar
      stm32mp: update the mmu configuration for SPL and prereloc · aad84147
      Patrick Delaunay authored
      
      Overidde the weak function dram_bank_mmu_setup() to set the DDR
      (preloc case) or the SYSRAM (in SPL case) executable before to enable
      the MMU and configure DACR.
      
      This weak function is called in dcache_enable/mmu_setup.
      
      This patchs avoids a permission access issue when the DDR is marked
      executable (by calling mmu_set_region_dcache_behaviour with
      DCACHE_DEFAULT_OPTION) after MMU setup and domain access permission
      activation with DACR in dcache_enable.
      
      Signed-off-by: default avatarPatrick Delaunay <patrick.delaunay@foss.st.com>
      aad84147
    • Patrick Delaunay's avatar
      stm32mp: update MMU config before the relocation · 1419e5b5
      Patrick Delaunay authored
      
      Mark the top of ram, used for relocated U-Boot as a normal memory
      (cacheable and executable) to avoid permission access issue when
      U-Boot jumps to this relocated code.
      
      When MMU is activated in pre-reloc stage; only the beginning of
      DDR is marked executable.
      
      This patch avoids access issue when DACR is correctly managed.
      
      Signed-off-by: default avatarPatrick Delaunay <patrick.delaunay@foss.st.com>
      1419e5b5
    • Harald Seiler's avatar
      reset: Remove addr parameter from reset_cpu() · 35b65dd8
      Harald Seiler authored
      
      Historically, the reset_cpu() function had an `addr` parameter which was
      meant to pass in an address of the reset vector location, where the CPU
      should reset to.  This feature is no longer used anywhere in U-Boot as
      all reset_cpu() implementations now ignore the passed value.  Generic
      code has been added which always calls reset_cpu() with `0` which means
      this feature can no longer be used easily anyway.
      
      Over time, many implementations seem to have "misunderstood" the
      existence of this parameter as a way to customize/parameterize the reset
      (e.g.  COLD vs WARM resets).  As this is not properly supported, the
      code will almost always not do what it is intended to (because all
      call-sites just call reset_cpu() with 0).
      
      To avoid confusion and to clean up the codebase from unused left-overs
      of the past, remove the `addr` parameter entirely.  Code which intends
      to support different kinds of resets should be rewritten as a sysreset
      driver instead.
      
      This transformation was done with the following coccinelle patch:
      
          @@
          expression argvalue;
          @@
          - reset_cpu(argvalue)
          + reset_cpu()
      
          @@
          identifier argname;
          type argtype;
          @@
          - reset_cpu(argtype argname)
          + reset_cpu(void)
          { ... }
      
      Signed-off-by: default avatarHarald Seiler <hws@denx.de>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      35b65dd8
    • Harald Seiler's avatar
      Revert "lpc32xx: cpu: add support for soft reset" · 3394f398
      Harald Seiler authored
      
      This reverts commit 576007ae.
      
      The parameter passed to reset_cpu() no longer holds a meaning as all
      call-sites now pass the value 0.  Thus, branching on it is essentially
      dead code and will just confuse future readers.
      
      Revert soft-reset support and just always perform a hard-reset for now.
      This is a preparation for removal of the reset_cpu() parameter across
      the entire tree in a later patch.
      
      Fixes: 576007ae ("lpc32xx: cpu: add support for soft reset")
      Cc: Sylvain Lemieux <slemieux@tycoint.com>
      Signed-off-by: default avatarHarald Seiler <hws@denx.de>
      3394f398
    • Harald Seiler's avatar
      board: ns3: Remove superfluous reset logic · 10b86ef9
      Harald Seiler authored
      
      The current implementation of reset_cpu() in the ns3 board code does not
      archieve what it is supposed to (according to the comments), due to
      a number of reasons:
      
       1. The argument to reset_cpu() is _not_ actually passed from the
          `reset` command, but is set to 0 in all call-sites (in this
          specific case, see arch/arm/lib/reset.c).  Thus, performing
          different kinds of resets based on its value will not work as
          expected.
      
       2. Contrary to its documentation, the passed argument is not
          interpreted, but a static `L3_RESET` define is used.  The other
          comment properly notes that this will always perform a L3 reset,
          though.
      
       3. The "parsing" of the static `L3_RESET` value is not even using the
          upper and lower nibble as stated in the comment, but uses the last
          two decimal digits of the value.
      
      This is currently one of the only implementations left in U-Boot, which
      make "use" of the value passed to reset_cpu().  As this is done under
      false assumption (the value does not have any meaning anymore), it makes
      sense to bring it into line with the rest and start ignoring the
      parameter.
      
      This is a preparation for removal of the reset_cpu() parameter across
      the entire tree in a later patch.
      
      Fixes: b5a152e7 ("board: ns3: default reset type to L3")
      Cc: Bharat Gooty <bharat.gooty@broadcom.com>
      Cc: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
      Signed-off-by: default avatarHarald Seiler <hws@denx.de>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      10b86ef9
    • Harald Seiler's avatar
      nds32: Remove dead reset_cpu() implementation · 5075bf28
      Harald Seiler authored
      
      nds32 is one of the only architectures which still have a reset_cpu()
      implementation that makes use of the `addr` parameter.  The rest of
      U-Boot now ignores it and passes 0 everywhere.  It turns out that even
      here, reset_cpu() is no longer referenced anywhere; reset is either not
      implemented (e.g. ae3xx) or realized using a WDT (e.g. ag101).
      
      Remove this left-over implementation in preparation for the removal of
      the `addr` parameter in the entire tree.
      
      Cc: Rick Chen <rick@andestech.com>
      Signed-off-by: default avatarHarald Seiler <hws@denx.de>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarRick Chen <rick@andestech.com>
      5075bf28
    • Tom Rini's avatar
      Prepare v2021.04-rc3 · c5219c4a
      Tom Rini authored
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      c5219c4a
  2. Mar 01, 2021
    • Heinrich Schuchardt's avatar
      log: convert pr_*() to logging · e86ad666
      Heinrich Schuchardt authored
      
      In drivers we use a family of printing functions including pr_err() and
      pr_cont(). CONFIG_LOGLEVEL is used to control which of these lead to output
      via printf().
      
      Our logging functions allow finer grained control of output. So replace
      printf() by the matching logging functions. The usage of CONFIG_LOGLEVEL
      remains unchanged.
      
      Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      e86ad666
    • Marek Behún's avatar
      fs: btrfs: do not fail when offset of a ROOT_ITEM is not -1 · 1afb9f22
      Marek Behún authored
      
      When the btrfs_read_fs_root() function is searching a ROOT_ITEM with
      location key offset other than -1, it currently fails via BUG_ON.
      
      The offset can have other value than -1, though. This can happen for
      example if a subvolume is renamed:
      
        $ btrfs subvolume create X && sync
        Create subvolume './X'
        $ btrfs inspect-internal dump-tree /dev/root | grep -B 2 'name: X$
              location key (270 ROOT_ITEM 18446744073709551615) type DIR
              transid 283 data_len 0 name_len 1
              name: X
        $ mv X Y && sync
        $ btrfs inspect-internal dump-tree /dev/root | grep -B 2 'name: Y$
              location key (270 ROOT_ITEM 0) type DIR
              transid 285 data_len 0 name_len 1
              name: Y
      
      As can be seen the offset changed from -1ULL to 0.
      
      Do not fail in this case.
      
      Signed-off-by: default avatarMarek Behún <marek.behun@nic.cz>
      Cc: David Sterba <dsterba@suse.com>
      Cc: Qu Wenruo <wqu@suse.com>
      Cc: Tom Rini <trini@konsulko.com>
      1afb9f22
  3. Feb 28, 2021
  4. Feb 27, 2021
  5. Feb 26, 2021
Loading