X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=arch%2Fx86%2Fcpu%2Fstart.S;h=d072825bcdd92f304689fb46a9d580238b9dc04f;hb=bccdf1de75708fe4138a00cc05d8fde8b35476ac;hp=e94ddc45ddb78475eefa3e306b9f352d1f378755;hpb=632093b566569329bc6e5b0893bdca01de905314;p=u-boot diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S index e94ddc45dd..d072825bcd 100644 --- a/arch/x86/cpu/start.S +++ b/arch/x86/cpu/start.S @@ -115,8 +115,10 @@ car_init_ret: #endif #else /* - * When we get here after car_init(), esp points to a temporary stack - * and esi holds the HOB list address returned by the FSP. + * U-Boot enters here twice. For the first time it comes from + * car_init_done() with esp points to a temporary stack and esi + * set to zero. For the second time it comes from fsp_init_done() + * with esi holding the HOB list address returned by the FSP. */ #endif /* Set up global data */ @@ -141,6 +143,14 @@ car_init_ret: jz skip_hob movl %esi, GD_HOB_LIST(%edx) + /* + * After fsp_init() returns, the stack has already been switched to a + * place within system memory as defined by CONFIG_FSP_TEMP_RAM_ADDR. + * Enlarge the size of malloc() pool before relocation since we have + * plenty of memory now. + */ + subl $CONFIG_FSP_SYS_MALLOC_F_LEN, %esp + movl %esp, GD_MALLOC_BASE(%edx) skip_hob: #else /* Store table pointer */