x86: Use the existing stack when chain-loading
authorSimon Glass <sjg@chromium.org>
Sun, 26 Apr 2020 15:13:00 +0000 (09:13 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Thu, 30 Apr 2020 09:48:17 +0000 (17:48 +0800)
commit86ee14f58b9aff105c1f58aaab9a117664bd5618
treee57c9ec9dff24118076fe16c7f8dd051137f184e
parentcfe7a1068b4b84768dca82e81118d8bac9c4b8d5
x86: Use the existing stack when chain-loading

With chromebook_coral we normally run TPL->SPL->U-Boot. This is the
'bare metal' case.

When running from coreboot we put u-boot.bin in the RW_LEGACY portion
of the image, e.g. with:

   cbfstool image-coral.serial.bin add-flat-binary -r RW_LEGACY \
-f /tmp/b/chromebook_coral/u-boot.bin -n altfw/u-boot \
-c lzma -l 0x1110000 -e 0x1110000

In this case U-Boot is run from coreboot (actually Depthcharge, its
payload) so we cannot access CAR. Use the existing stack instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/cpu/start_from_spl.S