]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: Add an option to control the position of SPL
authorSimon Glass <sjg@chromium.org>
Sat, 7 Dec 2019 04:42:30 +0000 (21:42 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Sun, 15 Dec 2019 03:44:19 +0000 (11:44 +0800)
For Apollo Lake SPL is run from CAR (cache-as-RAM) which is in a different
location from where SPL must be placed in ROM. In other words, although
SPL runs before SDRAM is set up, it is not execute-in-place (XIP).

Add a Kconfig option for the ROM position.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/Kconfig
arch/x86/dts/u-boot.dtsi

index 9d7ff3c07a2648ab9c57b406913bb5f7e7ef4f02..1d08cb24fb5bcca9838ed46d15397ebd31d971d7 100644 (file)
@@ -904,4 +904,9 @@ config X86_OFFSET_U_BOOT
        depends on HAVE_SYS_TEXT_BASE
        default SYS_TEXT_BASE
 
+config X86_OFFSET_SPL
+       hex "Offset of SPL in ROM image"
+       depends on SPL && X86
+       default SPL_TEXT_BASE
+
 endmenu
index d84c64880a8a3b65b936e70ac63b70b4453f7d93..fad3e7c951604ff6421236fca8b19174490d5d50 100644 (file)
@@ -45,7 +45,7 @@
        };
 #endif
        u-boot-spl {
-               offset = <CONFIG_SPL_TEXT_BASE>;
+               offset = <CONFIG_X86_OFFSET_SPL>;
        };
        u-boot-spl-dtb {
        };
@@ -54,7 +54,7 @@
        };
 #elif defined(CONFIG_SPL)
        u-boot-spl-with-ucode-ptr {
-               offset = <CONFIG_SPL_TEXT_BASE>;
+               offset = <CONFIG_X86_OFFSET_SPL>;
        };
        u-boot-dtb-with-ucode2 {
                type = "u-boot-dtb-with-ucode";