Skip to content
Snippets Groups Projects
  1. Jul 23, 2014
    • Simon Glass's avatar
      Add a simple malloc() implementation for pre-relocation · d59476b6
      Simon Glass authored
      
      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: default avatarSimon Glass <sjg@chromium.org>
      d59476b6
    • Simon Glass's avatar
      sandbox: Set up global data before board_init_f() · 4d94dfa0
      Simon Glass authored
      
      At present sandbox defines CONFIG_SYS_GENERIC_GLOBAL_DATA, meaning that
      the global_data pointer is set up in board_init_f().
      
      If we set up and zero the global data before calling board_init_f() then we
      don't need to define CONFIG_SYS_GENERIC_GLOBAL_DATA.
      
      Make this change to simplify the init process.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      4d94dfa0
    • Simon Glass's avatar
      Remove form-feeds from dlmalloc.c · d93041a4
      Simon Glass authored
      
      These don't really serve any purpose in the modern age. On the other hand
      they show up as annoying control characters in my editor, which then happily
      removes them.
      
      I believe we can drop these characters from the file.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      d93041a4
  2. Jul 22, 2014
  3. Jul 21, 2014
  4. Jul 18, 2014
Loading