diff mbox

[U-Boot,v2,04/12] x86: fsp: Add comments about U-Boot entering start.S twice

Message ID 1440078028-29464-5-git-send-email-bmeng.cn@gmail.com
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Bin Meng Aug. 20, 2015, 1:40 p.m. UTC
Add some comments in start.S for the fact that with FSP U-Boot
actually enters the code twice. Also change to use fsp_init()
and fsp_continue for accuracy.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

Changes in v2: None

 arch/x86/Kconfig           | 2 +-
 arch/x86/cpu/start.S       | 6 ++++--
 arch/x86/lib/fsp/fsp_car.S | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

Comments

Simon Glass Aug. 21, 2015, 11:27 p.m. UTC | #1
On 20 August 2015 at 07:40, Bin Meng <bmeng.cn@gmail.com> wrote:
> Add some comments in start.S for the fact that with FSP U-Boot
> actually enters the code twice. Also change to use fsp_init()
> and fsp_continue for accuracy.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
> Changes in v2: None
>
>  arch/x86/Kconfig           | 2 +-
>  arch/x86/cpu/start.S       | 6 ++++--
>  arch/x86/lib/fsp/fsp_car.S | 2 +-
>  3 files changed, 6 insertions(+), 4 deletions(-)

Acked-by: Simon Glass <sjg@chromium.org>
Simon Glass Aug. 22, 2015, 4:20 a.m. UTC | #2
On 21 August 2015 at 17:27, Simon Glass <sjg@chromium.org> wrote:
> On 20 August 2015 at 07:40, Bin Meng <bmeng.cn@gmail.com> wrote:
>> Add some comments in start.S for the fact that with FSP U-Boot
>> actually enters the code twice. Also change to use fsp_init()
>> and fsp_continue for accuracy.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> ---
>>
>> Changes in v2: None
>>
>>  arch/x86/Kconfig           | 2 +-
>>  arch/x86/cpu/start.S       | 6 ++++--
>>  arch/x86/lib/fsp/fsp_car.S | 2 +-
>>  3 files changed, 6 insertions(+), 4 deletions(-)
>
> Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-x86, thanks!
diff mbox

Patch

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 687208f..273f08f 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -229,7 +229,7 @@  config FSP_TEMP_RAM_ADDR
 	depends on HAVE_FSP
 	default 0x2000000
 	help
-	  Stack top address which is used in FspInit after DRAM is ready and
+	  Stack top address which is used in fsp_init() after DRAM is ready and
 	  CAR is disabled.
 
 config FSP_SYS_MALLOC_F_LEN
diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S
index e2b5ef4..d072825 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 */
diff --git a/arch/x86/lib/fsp/fsp_car.S b/arch/x86/lib/fsp/fsp_car.S
index afbf3f9..15b3751 100644
--- a/arch/x86/lib/fsp/fsp_car.S
+++ b/arch/x86/lib/fsp/fsp_car.S
@@ -64,7 +64,7 @@  temp_ram_init_ret:
 .global fsp_init_done
 fsp_init_done:
 	/*
-	 * We come here from FspInit with eax pointing to the HOB list.
+	 * We come here from fsp_continue() with eax pointing to the HOB list.
 	 * Save eax to esi temporarily.
 	 */
 	movl	%eax, %esi