]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - Kconfig
riscv: qemu: imply GOLDFISH_RTC
[thirdparty/u-boot.git] / Kconfig
diff --git a/Kconfig b/Kconfig
index 109379a1498a3c4b3ea697a27a80e745a791a8e7..00ed1ecc17367eaa89f8a8441e1afcf8330e1726 100644 (file)
--- a/Kconfig
+++ b/Kconfig
@@ -277,10 +277,17 @@ config SYS_MALLOC_F_LEN
        default 0x10000 if ARCH_IMX8 || ARCH_IMX8M
        default 0x2000
        help
-         Before relocation, memory is very limited on many platforms. Still,
-         we can provide a small malloc() pool if needed. Driver model in
-         particular needs this to operate, so that it can allocate the
-         initial serial device and any others that are needed.
+               Size of the malloc() pool for use before relocation. If
+               this is defined, then a very simple malloc() implementation
+               will become available before relocation. The address is just
+               below the global data, and the stack is moved down to make
+               space.
+
+               This feature allocates regions with increasing addresses
+               within the region. calloc() is supported, but realloc()
+               is not available. free() is supported but does nothing.
+               The memory will be freed (or in fact just forgotten) when
+               U-Boot relocates itself.
 
 config SYS_MALLOC_LEN
        hex "Define memory for Dynamic allocation"
@@ -295,32 +302,49 @@ config SYS_MALLOC_LEN
          This defines memory to be allocated for Dynamic allocation
          TODO: Use for other architectures
 
+config SPL_SYS_MALLOC_F
+       bool "Enable malloc() pool in SPL"
+       depends on SPL_FRAMEWORK && SYS_MALLOC_F && SPL
+       default y
+       help
+         In SPL memory is very limited on many platforms. Still,
+         we can provide a small malloc() pool if needed. Driver model in
+         particular needs this to operate, so that it can allocate the
+         initial serial device and any others that are needed.
+
 config SPL_SYS_MALLOC_F_LEN
        hex "Size of malloc() pool in SPL"
-       depends on SYS_MALLOC_F && SPL
-       default 0x0 if !SPL_FRAMEWORK
+       depends on SPL_SYS_MALLOC_F
        default 0x2800 if RCAR_GEN3
        default 0x2000 if IMX8MQ
        default SYS_MALLOC_F_LEN
        help
-         In SPL memory is very limited on many platforms. Still,
-         we can provide a small malloc() pool if needed. Driver model in
-         particular needs this to operate, so that it can allocate the
-         initial serial device and any others that are needed.
+         Sets the size of the malloc() pool in SPL. This is used for
+         driver model and other features, which must allocate memory for
+         data structures.
 
-         It is possible to enable CFG_SYS_SPL_MALLOC_START to start a new
+         It is possible to enable CFG_SPL_SYS_MALLOC_START to start a new
          malloc() region in SDRAM once it is inited.
 
-config TPL_SYS_MALLOC_F_LEN
-       hex "Size of malloc() pool in TPL"
+config TPL_SYS_MALLOC_F
+       bool "Enable malloc() pool in TPL"
        depends on SYS_MALLOC_F && TPL
-       default SPL_SYS_MALLOC_F_LEN
+       default y if SPL_SYS_MALLOC_F
        help
          In TPL memory is very limited on many platforms. Still,
          we can provide a small malloc() pool if needed. Driver model in
          particular needs this to operate, so that it can allocate the
          initial serial device and any others that are needed.
 
+config TPL_SYS_MALLOC_F_LEN
+       hex "Size of malloc() pool in TPL"
+       depends on TPL_SYS_MALLOC_F
+       default SPL_SYS_MALLOC_F_LEN
+       help
+         Sets the size of the malloc() pool in TPL. This is used for
+         driver model and other features, which must allocate memory for
+         data structures.
+
 config VALGRIND
        bool "Inform valgrind about memory allocations"
        depends on !RISCV
@@ -336,16 +360,25 @@ config VALGRIND
          it can be handled accurately by Valgrind. If you aren't planning on
          using valgrind to debug U-Boot, say 'n'.
 
-config VPL_SYS_MALLOC_F_LEN
-       hex "Size of malloc() pool in VPL before relocation"
+config VPL_SYS_MALLOC_F
+       bool "Enable malloc() pool in VPL"
        depends on SYS_MALLOC_F && VPL
-       default SYS_MALLOC_F_LEN
+       default y if SPL_SYS_MALLOC_F
        help
-         Before relocation, memory is very limited on many platforms. Still,
+         In VPL memory is very limited on many platforms. Still,
          we can provide a small malloc() pool if needed. Driver model in
          particular needs this to operate, so that it can allocate the
          initial serial device and any others that are needed.
 
+config VPL_SYS_MALLOC_F_LEN
+       hex "Size of malloc() pool in VPL before relocation"
+       depends on VPL_SYS_MALLOC_F
+       default SPL_SYS_MALLOC_F_LEN
+       help
+         Sets the size of the malloc() pool in VPL. This is used for
+         driver model and other features, which must allocate memory for
+         data structures.
+
 menuconfig EXPERT
        bool "Configure standard U-Boot features (expert users)"
        default y
@@ -372,6 +405,17 @@ if EXPERT
          When disabling this, please check if malloc calls, maybe
          should be replaced by calloc - if one expects zeroed memory.
 
+config SPL_SYS_MALLOC_CLEAR_ON_INIT
+       bool "Init with zeros the memory reserved for malloc (slow) in SPL"
+       depends on SPL
+       default SYS_MALLOC_CLEAR_ON_INIT
+       help
+         Same as SYS_MALLOC_CLEAR_ON_INIT, but for SPL. It's possible to
+         Enable it without SYS_MALLOC_CLEAR_ON_INIT. It's useful for boards
+         that must have particular memory regions zero'ed before first use.
+         If SYS_SPL_MALLOC_START is configured to be in such region, this
+         option should be enabled.
+
 config SYS_MALLOC_DEFAULT_TO_INIT
        bool "Default malloc to init while reserving the memory for it"
        help