u-boot/arch/x86/lib/fsp
Bin Meng 002610f620 x86: fsp: Load GDT before calling FspInitEntry
Currently the FSP execution environment GDT is setup by U-Boot in
arch/x86/cpu/start16.S, which works pretty well. But if we try to
move the FspInitEntry call a little bit later to better fit into
U-Boot's initialization sequence, FSP will fail to bring up the AP
due to #GP fault as AP's GDT is duplicated from BSP whose GDT is
now moved into CAR, and unfortunately FSP calls AP initialization
after it disables the CAR. So basically the BSP's GDT still refers
to the one in the CAR, whose content is no longer available, so
when AP starts up and loads its segment register, it blows up.

To resolve this, we load GDT before calling into FspInitEntry.
The GDT is the same one used in arch/x86/cpu/start16.S, which is
in the ROM and exists forever.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Andrew Bradford <andrew.bradford@kodakalaris.com>
Tested-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
2015-07-14 18:03:15 -06:00
..
fsp_car.S x86: Make CAR and DRAM FSP code common 2015-02-05 22:16:44 -07:00
fsp_common.c x86: fsp: Use reset_cpu() 2015-04-29 21:02:32 -06:00
fsp_dram.c x86: Make CAR and DRAM FSP code common 2015-02-05 22:16:44 -07:00
fsp_support.c x86: fsp: Load GDT before calling FspInitEntry 2015-07-14 18:03:15 -06:00
Makefile x86: mmc: Move common FSP functions into a common file 2015-02-06 12:07:36 -07:00