summaryrefslogtreecommitdiff
path: root/arch/x86/lib/fsp
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/lib/fsp')
-rw-r--r--arch/x86/lib/fsp/fsp_car.S26
-rw-r--r--arch/x86/lib/fsp/fsp_common.c8
-rw-r--r--arch/x86/lib/fsp/fsp_support.c3
3 files changed, 16 insertions, 21 deletions
diff --git a/arch/x86/lib/fsp/fsp_car.S b/arch/x86/lib/fsp/fsp_car.S
index 5e09568..afbf3f9 100644
--- a/arch/x86/lib/fsp/fsp_car.S
+++ b/arch/x86/lib/fsp/fsp_car.S
@@ -56,28 +56,10 @@ temp_ram_init_ret:
/* stack grows down from top of CAR */
movl %edx, %esp
+ subl $4, %esp
- /*
- * TODO:
- *
- * According to FSP architecture spec, the fsp_init() will not return
- * to its caller, instead it requires the bootloader to provide a
- * so-called continuation function to pass into the FSP as a parameter
- * of fsp_init, and fsp_init() will call that continuation function
- * directly.
- *
- * The call to fsp_init() may need to be moved out of the car_init()
- * to cpu_init_f() with the help of some inline assembly codes.
- * Note there is another issue that fsp_init() will setup another stack
- * using the fsp_init parameter stack_top after DRAM is initialized,
- * which means any data on the previous stack (on the CAR) gets lost
- * (ie: U-Boot global_data). FSP is supposed to support such scenario,
- * however it does not work. This should be revisited in the future.
- */
- movl $CONFIG_FSP_TEMP_RAM_ADDR, %eax
- xorl %edx, %edx
- xorl %ecx, %ecx
- call fsp_init
+ xor %esi, %esi
+ jmp car_init_done
.global fsp_init_done
fsp_init_done:
@@ -86,6 +68,8 @@ fsp_init_done:
* Save eax to esi temporarily.
*/
movl %eax, %esi
+
+car_init_done:
/*
* Re-initialize the ebp (BIST) to zero, as we already reach here
* which means we passed BIST testing before.
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c
index 001494d..5b25632 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp/fsp_common.c
@@ -46,3 +46,11 @@ void board_final_cleanup(void)
return;
}
+
+int x86_fsp_init(void)
+{
+ if (!gd->arch.hob_list)
+ fsp_init(CONFIG_FSP_TEMP_RAM_ADDR, BOOT_FULL_CONFIG, NULL);
+
+ return 0;
+}
diff --git a/arch/x86/lib/fsp/fsp_support.c b/arch/x86/lib/fsp/fsp_support.c
index 5809235..4585166 100644
--- a/arch/x86/lib/fsp/fsp_support.c
+++ b/arch/x86/lib/fsp/fsp_support.c
@@ -173,6 +173,9 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
post_code(POST_PRE_MRC);
+ /* Load GDT for FSP */
+ setup_fsp_gdt();
+
/*
* Use ASM code to ensure the register value in EAX & ECX
* will be passed into BlContinuationFunc