summaryrefslogtreecommitdiff
path: root/arch/x86/cpu
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-10-10 07:49:16 -0600
committerSimon Glass <sjg@chromium.org>2014-10-23 19:45:28 -0600
commit5dbcaa2128c50b4625f17ab2d9a5a8e5182441ba (patch)
tree9578cb85c300aa67b8dce123c4f5dfb9a4d15806 /arch/x86/cpu
parentfbd72824263dfb48bfee999f8b92ba9cc8abac1b (diff)
downloadu-boot-imx-5dbcaa2128c50b4625f17ab2d9a5a8e5182441ba.zip
u-boot-imx-5dbcaa2128c50b4625f17ab2d9a5a8e5182441ba.tar.gz
u-boot-imx-5dbcaa2128c50b4625f17ab2d9a5a8e5182441ba.tar.bz2
dm: x86: Support pre-reloc malloc()
Add support for this by reserving a block of memory below global_data. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/cpu')
-rw-r--r--arch/x86/cpu/start.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S
index 71cab22..338bab1 100644
--- a/arch/x86/cpu/start.S
+++ b/arch/x86/cpu/start.S
@@ -97,6 +97,13 @@ car_init_ret:
/* Reserve space for global descriptor table */
subl $X86_GDT_SIZE, %esp
+#if defined(CONFIG_SYS_MALLOC_F_LEN)
+ subl $CONFIG_SYS_MALLOC_F_LEN, %esp
+ movl %eax, %edx
+ addl $GD_MALLOC_BASE, %edx
+ movl %esp, (%edx)
+#endif
+
/* Align temporary global descriptor table to 16-byte boundary */
andl $0xfffffff0, %esp