1. 21 11月, 2014 1 次提交
    • S
      dm: Split the simple malloc() implementation into its own file · c9356be3
      Simon Glass 提交于
      The simple malloc() implementation is used when memory is tight. It provides
      a simple buffer with an incrementing pointer.
      
      At present the implementation is inside dlmalloc. Move it into its own file
      so that it is easier to find.
      
      Rather than using relocation as a signal that the full malloc() is
      available, add a special GD_FLG_FULL_MALLOC_INIT flag. This signals that the
      simple malloc() should no longer be used.
      
      In some cases, such as SPL, even the code space used by the full malloc() is
      wasteful. Add a CONFIG_SYS_MALLOC_SIMPLE option to provide only the simple
      malloc. In this case the full malloc is not available at all. It saves about
      1KB of code space and about 0.5KB of data on Thumb 2.
      Acked-by: NTom Rini <trini@ti.com>
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      c9356be3
  2. 25 10月, 2014 2 次提交
  3. 23 10月, 2014 1 次提交
  4. 10 10月, 2014 2 次提交
  5. 11 9月, 2014 2 次提交
    • S
      dm: Make driver model available before board_init() · 9fb02491
      Simon Glass 提交于
      For some boards board_init() will change GPIOs, so we need to have driver
      model available before then. Adjust the board init to arrange this, but
      enable it for driver model only, just to be safe.
      
      This does create additional #ifdef logic, but it is safer than trying to
      make a pervasive change which may cause some boards to break.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      9fb02491
    • S
      Set up stdio earlier when using driver model · 294b91a5
      Simon Glass 提交于
      Since driver model registers itself with the stdio subsystem, and we
      want to avoid delayed registration and other complexity associated with
      the current serial console, move the stdio subsystem init earlier when
      driver model is used for serial.
      
      This simplifies the implementation. Should there be any problems with
      this approach they can be dealt with as boards are converted over to
      use driver model for serial.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      294b91a5
  6. 09 9月, 2014 1 次提交
  7. 24 8月, 2014 1 次提交
  8. 09 8月, 2014 1 次提交
  9. 23 7月, 2014 3 次提交
    • S
      dm: Support driver model prior to relocation · ab7cd627
      Simon Glass 提交于
      Initialise devices marked 'pre-reloc' and make them available prior to
      relocation. Note that this requires pre-reloc malloc() to be available.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      ab7cd627
    • S
      dm: Allow drivers to be marked 'before relocation' · 00606d7e
      Simon Glass 提交于
      Driver model currently only operates after relocation is complete. In this
      state U-Boot typically has a small amount of memory available. In adding
      support for driver model prior to relocation we must try to use as little
      memory as possible.
      
      In addition, on some machines the memory has not be inited and/or the CPU
      is not running at full speed or the data cache is off. These can reduce
      execution performance, so the less initialisation that is done before
      relocation the better.
      
      An immediately-obvious improvement is to only initialise drivers which are
      actually going to be used before relocation. On many boards the only such
      driver is a serial UART, so this provides a very large potential benefit.
      
      Allow drivers to mark themselves as 'pre-reloc' which means that they will
      be initialised prior to relocation. This can be done either with a driver
      flag or with a 'dm,pre-reloc' device tree property.
      
      To support this, the various dm scanning function now take a 'pre_reloc_only'
      parameter which indicates that only drivers marked pre-reloc should be
      bound.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      00606d7e
    • S
      Add a simple malloc() implementation for pre-relocation · d59476b6
      Simon Glass 提交于
      If we are to have driver model before relocation we need to support some
      way of calling memory allocation routines.
      
      The standard malloc() is pretty complicated:
      
      1. It uses some BSS memory for its state, and BSS is not available before
      relocation
      
      2. It supports algorithms for reducing memory fragmentation and improving
      performace of free(). Before relocation we could happily just not support
      free().
      
      3. It includes about 4KB of code (Thumb 2) and 1KB of data. However since
      this has been loaded anyway this is not really a problem.
      
      The simplest way to support pre-relocation malloc() is to reserve an area
      of memory and allocate it in increasing blocks as needed. This
      implementation does this.
      
      To enable it, you need to define the size of the malloc() pool as described
      in the README. It will be located above the pre-relocation stack on
      supported architectures.
      
      Note that this implementation is only useful on machines which have some
      memory available before dram_init() is called - this includes those that
      do no DRAM init (like tegra) and those that do it in SPL (quite a few
      boards). Enabling driver model preior to relocation for the rest of the
      boards is left for a later exercise.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      d59476b6
  10. 22 7月, 2014 1 次提交
    • I
      board_r: run scsi init() on ARM too · 2c997e7a
      Ian Campbell 提交于
      This has been disabled for ARM in initr_scsi since that function was
      introduced. However it works fine for me on Cubieboard and Cubietruck (with the
      upcoming AHCI glue patch).
      
      I also tested on two random ARM platforms which seem to define CONFIG_CMD_SCSI:
       - highbank worked fine (on midway hardware)
       - omap5_uevm built OK and I confirmed using objdump that things were as
         expected (i.e. the default weak scsi_init nop was used).
      
      While there remove the mismatched comment from the #endif (omitting the comment
      seems to be the prevailing style in this file).
      Signed-off-by: NIan Campbell <ijc@hellion.org.uk>
      Acked-by: NSimon Glass <sjg@chromium.org>
      2c997e7a
  11. 30 5月, 2014 1 次提交
  12. 18 4月, 2014 1 次提交
  13. 05 3月, 2014 1 次提交
  14. 27 2月, 2014 1 次提交
  15. 27 1月, 2014 1 次提交
    • A
      board_r - fixup functions table after relocation · 7395398a
      Alexey Brodkin 提交于
      This is only required for "PIC" relocation and doesn't apply to modern
      "PIE" relocation which does data relocation as well as code.
      
      "init_sequence_r" is just an array that consists of compile-time
      adresses of init functions. Since this is basically an array of integers
      (pointers to "void" to be more precise) it won't be modified during
      relocation - it will be just copied to new location as it is.
      
      As a consequence on execution after relocation "initcall_run_list" will
      be jumping to pre-relocation addresses. As long as we don't overwrite
      pre-relocation memory area init calls are executed correctly. But still
      it is dangerous because after relocation we don't expect initially used
      memory to stay untouched.
      
      Cc: Tom Rini <trini@ti.com>
      Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
      Cc: Doug Anderson <dianders@chromium.org>
      Cc: Thomas Langer <thomas.langer@lantiq.com>
      Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
      Acked-by: NSimon Glass <sjg@chromium.org>
      Signed-off-by: NAlexey Brodkin <abrodkin@synopsys.com>
      7395398a
  16. 24 7月, 2013 1 次提交
  17. 26 6月, 2013 1 次提交
    • S
      Add trace support to generic board · 71c52dba
      Simon Glass 提交于
      Add hooks for tracing to generic board, including:
      
      - allow early tracing to start early as possible in U-Boot
      - reserve memory for trace buffer
      - copy early trace buffer to main trace buffer after relocation
      - setup full tracing support after relocation
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      71c52dba
  18. 08 6月, 2013 1 次提交
    • M
      generic_board: reduce the redundancy of gd_t struct members · a0ba279a
      Masahiro Yamada 提交于
      This commit refactors common/board_f.c and common/board_r.c
      in order to delete the dest_addr and dest_addr_sp from
      gd_t struct.
      
      As mentioned as follows in include/asm-generic/global_data.h,
      
        /* TODO: is this the same as relocaddr, or something else? */
        unsigned long dest_addr;        /* Post-relocation address of U-Boot */
      
      dest_addr is the same as relocaddr.
      Likewise, dest_addr_sp is the same as start_addr_sp.
      
      It seemed dest_addr/dest_addr_sp was used only as a scratch variable
      to calculate relocaddr/start_addr_sp, respectively.
      
      With a little refactoring, we can delete dest_addr and dest_addr_sp.
      Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com>
      Cc: Simon Glass <sjg@chromium.org>
      a0ba279a
  19. 14 5月, 2013 1 次提交
  20. 01 5月, 2013 1 次提交
  21. 16 4月, 2013 1 次提交
    • S
      x86: Allow setup code to manage its own global data · 7525c2da
      Simon Glass 提交于
      Currently x86 has its own means of managing the global data and board data
      (bd_t), and this code resides in start.S. With generic board, we need to
      ensure that we leave this alone - i.e. don't clear it as we do on other
      archs.
      
      This fixes a problem where the memory init data is cleared which causes
      the video driver to operate very slowly.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      7525c2da
  22. 16 3月, 2013 4 次提交