diff options
Diffstat (limited to 'arch')
76 files changed, 371 insertions, 145 deletions
diff --git a/arch/arc/cpu/u-boot.lds b/arch/arc/cpu/u-boot.lds index 9f2973da65..6a52ce461e 100644 --- a/arch/arc/cpu/u-boot.lds +++ b/arch/arc/cpu/u-boot.lds @@ -10,7 +10,7 @@ OUTPUT_ARCH(arc) ENTRY(_start) SECTIONS { - . = CONFIG_SYS_TEXT_BASE; + . = CONFIG_TEXT_BASE; __image_copy_start = .; . = ALIGN(1024); __ivt_start = .; diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 8bc9aaf010..710f171f87 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -93,7 +93,7 @@ config LNX_KRNL_IMG_TEXT_OFFSET_BASE depends on LINUX_KERNEL_IMAGE_HEADER hex help - The value subtracted from CONFIG_SYS_TEXT_BASE to calculate the + The value subtracted from CONFIG_TEXT_BASE to calculate the TEXT_OFFSET value written to the Linux kernel image header. config GICV2 diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S index 1402924684..5a1536539d 100644 --- a/arch/arm/cpu/arm1176/start.S +++ b/arch/arm/cpu/arm1176/start.S @@ -88,7 +88,7 @@ cpu_init_crit: /* Prepare to disable the MMU */ adr r2, mmu_disable_phys - sub r2, r2, #(CONFIG_SYS_PHY_UBOOT_BASE - CONFIG_SYS_TEXT_BASE) + sub r2, r2, #(CONFIG_SYS_PHY_UBOOT_BASE - CONFIG_TEXT_BASE) b mmu_disable .align 5 diff --git a/arch/arm/cpu/arm926ejs/mxs/Makefile b/arch/arm/cpu/arm926ejs/mxs/Makefile index f60e61e434..1638ef8fd8 100644 --- a/arch/arm/cpu/arm926ejs/mxs/Makefile +++ b/arch/arm/cpu/arm926ejs/mxs/Makefile @@ -60,14 +60,14 @@ spl/u-boot-spl.ivt: spl/u-boot-spl.bin u-boot.ivt: u-boot.bin $(call if_changed,mkalign_mxs) - $(call if_changed,mkivt_mxs,$(CONFIG_SYS_TEXT_BASE),\ + $(call if_changed,mkivt_mxs,$(CONFIG_TEXT_BASE),\ 0x40001000,0x40001040) spl/u-boot-spl.csf: spl/u-boot-spl.ivt spl/u-boot-spl.bin board/$(VENDOR)/$(BOARD)/sign/u-boot-spl.csf $(call if_changed,mkcsfreq_mxs,$(CONFIG_SPL_TEXT_BASE),0x8000) u-boot.csf: u-boot.ivt u-boot.bin board/$(VENDOR)/$(BOARD)/sign/u-boot.csf - $(call if_changed,mkcsfreq_mxs,$(CONFIG_SYS_TEXT_BASE),0x40001000) + $(call if_changed,mkcsfreq_mxs,$(CONFIG_TEXT_BASE),0x40001000) %.sig: %.csf $(call if_changed,mkcst_mxs) diff --git a/arch/arm/cpu/armv7/ls102xa/fdt.c b/arch/arm/cpu/armv7/ls102xa/fdt.c index e63a905eda..83f9882d0b 100644 --- a/arch/arm/cpu/armv7/ls102xa/fdt.c +++ b/arch/arm/cpu/armv7/ls102xa/fdt.c @@ -146,9 +146,9 @@ void ft_cpu_setup(void *blob, struct bd_info *bd) * Since second uboot binary has a head, that space need to be * reserved either(assuming its size is less than 0x1000). */ - off = fdt_add_mem_rsv(blob, CONFIG_SYS_TEXT_BASE - UBOOT_HEAD_LEN, - CONFIG_SYS_MONITOR_LEN + CONFIG_SYS_SPL_MALLOC_SIZE + - UBOOT_HEAD_LEN); + off = fdt_add_mem_rsv(blob, CONFIG_TEXT_BASE - UBOOT_HEAD_LEN, + CONFIG_SYS_MONITOR_LEN + + CONFIG_SYS_SPL_MALLOC_SIZE + UBOOT_HEAD_LEN); if (off < 0) printf("Failed to reserve memory for SD boot deep sleep: %s\n", fdt_strerror(off)); diff --git a/arch/arm/cpu/armv8/linux-kernel-image-header-vars.h b/arch/arm/cpu/armv8/linux-kernel-image-header-vars.h index b4220e4936..b6394aee16 100644 --- a/arch/arm/cpu/armv8/linux-kernel-image-header-vars.h +++ b/arch/arm/cpu/armv8/linux-kernel-image-header-vars.h @@ -69,7 +69,7 @@ (__HEAD_FLAG_PAGE_SIZE << 1) | \ (__HEAD_FLAG_PHYS_BASE << 3)) -#define TEXT_OFFSET (CONFIG_SYS_TEXT_BASE - \ +#define TEXT_OFFSET (CONFIG_TEXT_BASE - \ CONFIG_LNX_KRNL_IMG_TEXT_OFFSET_BASE) /* diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S index 28f0df13f0..f3ea858577 100644 --- a/arch/arm/cpu/armv8/start.S +++ b/arch/arm/cpu/armv8/start.S @@ -35,7 +35,7 @@ _start: .globl _TEXT_BASE _TEXT_BASE: - .quad CONFIG_SYS_TEXT_BASE + .quad CONFIG_TEXT_BASE /* * These are defined in the linker script. diff --git a/arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi b/arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi index 2dcb3c2a58..08e7231793 100644 --- a/arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi +++ b/arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi @@ -36,7 +36,7 @@ os = "u-boot"; arch = "arm"; compression = "none"; - load = <CONFIG_SYS_TEXT_BASE>; + load = <CONFIG_TEXT_BASE>; u-boot-nodtb { }; diff --git a/arch/arm/dts/imx8mm-u-boot.dtsi b/arch/arm/dts/imx8mm-u-boot.dtsi index f792b421e8..a5e30f7994 100644 --- a/arch/arm/dts/imx8mm-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-u-boot.dtsi @@ -90,7 +90,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)"; - load = <CONFIG_SYS_TEXT_BASE>; + load = <CONFIG_TEXT_BASE>; type = "standalone"; uboot-blob { diff --git a/arch/arm/dts/imx8mn-u-boot.dtsi b/arch/arm/dts/imx8mn-u-boot.dtsi index 327d4070fc..95f45ad252 100644 --- a/arch/arm/dts/imx8mn-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-u-boot.dtsi @@ -152,7 +152,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)"; - load = <CONFIG_SYS_TEXT_BASE>; + load = <CONFIG_TEXT_BASE>; type = "standalone"; uboot-blob { diff --git a/arch/arm/dts/imx8mp-u-boot.dtsi b/arch/arm/dts/imx8mp-u-boot.dtsi index adb24cccc3..b5d640df7e 100644 --- a/arch/arm/dts/imx8mp-u-boot.dtsi +++ b/arch/arm/dts/imx8mp-u-boot.dtsi @@ -113,7 +113,7 @@ type = "standalone"; arch = "arm64"; compression = "none"; - load = <CONFIG_SYS_TEXT_BASE>; + load = <CONFIG_TEXT_BASE>; uboot_blob: blob-ext { filename = "u-boot-nodtb.bin"; diff --git a/arch/arm/dts/imx8mq-cm-u-boot.dtsi b/arch/arm/dts/imx8mq-cm-u-boot.dtsi index cb4e36c387..354f911a8a 100644 --- a/arch/arm/dts/imx8mq-cm-u-boot.dtsi +++ b/arch/arm/dts/imx8mq-cm-u-boot.dtsi @@ -77,7 +77,7 @@ type = "standalone"; arch = "arm64"; compression = "none"; - load = <CONFIG_SYS_TEXT_BASE>; + load = <CONFIG_TEXT_BASE>; uboot_blob: blob-ext { filename = "u-boot-nodtb.bin"; diff --git a/arch/arm/dts/imx8mq-u-boot.dtsi b/arch/arm/dts/imx8mq-u-boot.dtsi index e8b5f83706..c69c6cc58b 100644 --- a/arch/arm/dts/imx8mq-u-boot.dtsi +++ b/arch/arm/dts/imx8mq-u-boot.dtsi @@ -105,7 +105,7 @@ arch = "arm64"; compression = "none"; description = "U-Boot (64-bit)"; - load = <CONFIG_SYS_TEXT_BASE>; + load = <CONFIG_TEXT_BASE>; type = "standalone"; uboot-blob { diff --git a/arch/arm/dts/rockchip-optee.dtsi b/arch/arm/dts/rockchip-optee.dtsi index cde9b81b26..328ba90845 100644 --- a/arch/arm/dts/rockchip-optee.dtsi +++ b/arch/arm/dts/rockchip-optee.dtsi @@ -21,7 +21,7 @@ os = "U-Boot"; arch = "arm"; compression = "none"; - load = <CONFIG_SYS_TEXT_BASE>; + load = <CONFIG_TEXT_BASE>; u-boot-nodtb { }; diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi index 0f573e6d7a..2028d5b6a9 100644 --- a/arch/arm/dts/sunxi-u-boot.dtsi +++ b/arch/arm/dts/sunxi-u-boot.dtsi @@ -47,7 +47,7 @@ os = "u-boot"; arch = "arm64"; compression = "none"; - load = <CONFIG_SYS_TEXT_BASE>; + load = <CONFIG_TEXT_BASE>; u-boot-nodtb { }; diff --git a/arch/arm/dts/tegra-u-boot.dtsi b/arch/arm/dts/tegra-u-boot.dtsi index fe19619919..b3d0dec775 100644 --- a/arch/arm/dts/tegra-u-boot.dtsi +++ b/arch/arm/dts/tegra-u-boot.dtsi @@ -1,7 +1,7 @@ #include <config.h> #ifdef CONFIG_SPL_TEXT_BASE -#define U_BOOT_OFFSET (CONFIG_SYS_TEXT_BASE - CONFIG_SPL_TEXT_BASE) +#define U_BOOT_OFFSET (CONFIG_TEXT_BASE - CONFIG_SPL_TEXT_BASE) #else #define U_BOOT_OFFSET 0 #endif diff --git a/arch/arm/include/asm/arch-mxs/sys_proto.h b/arch/arm/include/asm/arch-mxs/sys_proto.h index 20ee863ac7..17afd1b29e 100644 --- a/arch/arm/include/asm/arch-mxs/sys_proto.h +++ b/arch/arm/include/asm/arch-mxs/sys_proto.h @@ -85,7 +85,7 @@ static const struct mxs_pair mxs_boot_modes[] = { #define MXS_BM_SDMMC1_3V3 0x0a #define MXS_BM_SDMMC1_1V8 0x1a -#define MXS_SPL_DATA ((struct mxs_spl_data *)(CONFIG_SYS_TEXT_BASE - 0x200)) +#define MXS_SPL_DATA ((struct mxs_spl_data *)(CONFIG_TEXT_BASE - 0x200)) struct mxs_spl_data { uint8_t boot_mode_idx; diff --git a/arch/arm/include/asm/arch-sunxi/boot0.h b/arch/arm/include/asm/arch-sunxi/boot0.h index e8e8e38f05..46b7e073b5 100644 --- a/arch/arm/include/asm/arch-sunxi/boot0.h +++ b/arch/arm/include/asm/arch-sunxi/boot0.h @@ -47,7 +47,7 @@ #ifdef CONFIG_SPL_BUILD .word CONFIG_SPL_TEXT_BASE #else - .word CONFIG_SYS_TEXT_BASE + .word CONFIG_TEXT_BASE #endif .word fel_stash - . #else diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S index fe6b4472b9..6d566dca5c 100644 --- a/arch/arm/lib/crt0.S +++ b/arch/arm/lib/crt0.S @@ -144,7 +144,7 @@ ENTRY(_main) adr r0, _main ldr r1, _start_ofs add r0, r1 - ldr r1, =CONFIG_SYS_TEXT_BASE + ldr r1, =CONFIG_TEXT_BASE sub r1, r0 add lr, r1 #endif diff --git a/arch/arm/lib/relocate_64.S b/arch/arm/lib/relocate_64.S index 72e91f2704..495a5f03ba 100644 --- a/arch/arm/lib/relocate_64.S +++ b/arch/arm/lib/relocate_64.S @@ -37,7 +37,7 @@ ENTRY(relocate_code) * correctly apply relocations, we need to know the linked value. * * Linked &__image_copy_start, which we know was at - * CONFIG_SYS_TEXT_BASE, which is stored in _TEXT_BASE, as a non- + * CONFIG_TEXT_BASE, which is stored in _TEXT_BASE, as a non- * relocated value, since it isn't a symbol reference. */ ldr x1, _TEXT_BASE /* x1 <- Linked &__image_copy_start */ diff --git a/arch/arm/mach-apple/Kconfig b/arch/arm/mach-apple/Kconfig index 75ee21e0f4..294690ec0e 100644 --- a/arch/arm/mach-apple/Kconfig +++ b/arch/arm/mach-apple/Kconfig @@ -1,6 +1,6 @@ if ARCH_APPLE -config SYS_TEXT_BASE +config TEXT_BASE default 0x00000000 config SYS_CONFIG_NAME @@ -16,6 +16,6 @@ config SYS_MALLOC_F_LEN default 0x4000 config LNX_KRNL_IMG_TEXT_OFFSET_BASE - default SYS_TEXT_BASE + default TEXT_BASE endif diff --git a/arch/arm/mach-aspeed/Kconfig b/arch/arm/mach-aspeed/Kconfig index 9a725f195a..1e7dc10e17 100644 --- a/arch/arm/mach-aspeed/Kconfig +++ b/arch/arm/mach-aspeed/Kconfig @@ -6,7 +6,7 @@ config SYS_ARCH config SYS_SOC default "aspeed" -config SYS_TEXT_BASE +config TEXT_BASE default 0x00000000 choice diff --git a/arch/arm/mach-at91/arm920t/lowlevel_init.S b/arch/arm/mach-at91/arm920t/lowlevel_init.S index 5e3cce03b7..57e51c8105 100644 --- a/arch/arm/mach-at91/arm920t/lowlevel_init.S +++ b/arch/arm/mach-at91/arm920t/lowlevel_init.S @@ -22,9 +22,9 @@ _MTEXT_BASE: #undef START_FROM_MEM #ifdef START_FROM_MEM - .word CONFIG_SYS_TEXT_BASE-PHYS_FLASH_1 + .word CONFIG_TEXT_BASE-PHYS_FLASH_1 #else - .word CONFIG_SYS_TEXT_BASE + .word CONFIG_TEXT_BASE #endif .globl lowlevel_init diff --git a/arch/arm/mach-at91/arm926ejs/lowlevel_init.S b/arch/arm/mach-at91/arm926ejs/lowlevel_init.S index 994f42eb4a..c51eee2f17 100644 --- a/arch/arm/mach-at91/arm926ejs/lowlevel_init.S +++ b/arch/arm/mach-at91/arm926ejs/lowlevel_init.S @@ -32,7 +32,7 @@ lowlevel_init: POS1: adr r5, POS1 /* r5 = POS1 run time */ ldr r0, =POS1 /* r0 = POS1 compile */ - sub r5, r5, r0 /* r0 = CONFIG_SYS_TEXT_BASE-1 */ + sub r5, r5, r0 /* r0 = CONFIG_TEXT_BASE-1 */ /* memory control configuration 1 */ ldr r0, =SMRDATA diff --git a/arch/arm/mach-exynos/spl_boot.c b/arch/arm/mach-exynos/spl_boot.c index 93fea9c749..f518539057 100644 --- a/arch/arm/mach-exynos/spl_boot.c +++ b/arch/arm/mach-exynos/spl_boot.c @@ -251,7 +251,7 @@ void copy_uboot_to_ram(void) #ifdef CONFIG_SPI_BOOTING case BOOT_MODE_SERIAL: /* Customised function to copy u-boot from SF */ - exynos_spi_copy(param->uboot_size, CONFIG_SYS_TEXT_BASE); + exynos_spi_copy(param->uboot_size, CONFIG_TEXT_BASE); break; #endif case BOOT_MODE_SD: @@ -267,7 +267,7 @@ void copy_uboot_to_ram(void) copy_bl2_from_emmc = get_irom_func(EMMC44_INDEX); end_bootop_from_emmc = get_irom_func(EMMC44_END_INDEX); - copy_bl2_from_emmc(BL2_SIZE_BLOC_COUNT, CONFIG_SYS_TEXT_BASE); + copy_bl2_from_emmc(BL2_SIZE_BLOC_COUNT, CONFIG_TEXT_BASE); end_bootop_from_emmc(); break; #endif @@ -279,7 +279,7 @@ void copy_uboot_to_ram(void) */ is_cr_z_set = config_branch_prediction(0); usb_copy = get_irom_func(USB_INDEX); - usb_copy(0, (u32 *)CONFIG_SYS_TEXT_BASE); + usb_copy(0, (u32 *)CONFIG_TEXT_BASE); config_branch_prediction(is_cr_z_set); break; #endif @@ -288,7 +288,7 @@ void copy_uboot_to_ram(void) } if (copy_bl2) - copy_bl2(offset, size, CONFIG_SYS_TEXT_BASE); + copy_bl2(offset, size, CONFIG_TEXT_BASE); } void memzero(void *s, size_t n) @@ -329,7 +329,7 @@ void board_init_f(unsigned long bootflag) copy_uboot_to_ram(); /* Jump to U-Boot image */ - uboot = (void *)CONFIG_SYS_TEXT_BASE; + uboot = (void *)CONFIG_TEXT_BASE; (*uboot)(); /* Never returns Here */ } diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 80c497e6d8..61b4f4f8cd 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -126,7 +126,7 @@ DEPFILE_EXISTS := 0 endif MKIMAGEFLAGS_u-boot.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) \ - -T $(IMAGE_TYPE) -e $(CONFIG_SYS_TEXT_BASE) + -T $(IMAGE_TYPE) -e $(CONFIG_TEXT_BASE) u-boot.imx: MKIMAGEOUTPUT = u-boot.imx.log u-boot.imx: u-boot.bin u-boot.cfgout $(PLUGIN).bin FORCE @@ -134,7 +134,7 @@ u-boot.imx: u-boot.bin u-boot.cfgout $(PLUGIN).bin FORCE ifeq ($(CONFIG_MULTI_DTB_FIT),y) MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) \ - -T $(IMAGE_TYPE) -e $(CONFIG_SYS_TEXT_BASE) + -T $(IMAGE_TYPE) -e $(CONFIG_TEXT_BASE) u-boot-dtb.imx: MKIMAGEOUTPUT = u-boot-dtb.imx.log u-boot-dtb.imx: u-boot-fit-dtb.bin u-boot-dtb.cfgout $(PLUGIN).bin FORCE @@ -143,7 +143,7 @@ ifeq ($(DEPFILE_EXISTS),0) endif else ifeq ($(CONFIG_OF_SEPARATE),y) MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) \ - -T $(IMAGE_TYPE) -e $(CONFIG_SYS_TEXT_BASE) + -T $(IMAGE_TYPE) -e $(CONFIG_TEXT_BASE) u-boot-dtb.imx: MKIMAGEOUTPUT = u-boot-dtb.imx.log u-boot-dtb.imx: u-boot-dtb.bin u-boot-dtb.cfgout $(PLUGIN).bin FORCE @@ -207,8 +207,8 @@ SPL: MKIMAGEOUTPUT = SPL.log SPL: spl/u-boot-spl.bin spl/u-boot-spl.cfgout $(PLUGIN).bin FORCE $(call if_changed,mkimage) -MKIMAGEFLAGS_u-boot.uim = -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \ - -e $(CONFIG_SYS_TEXT_BASE) -C none -T firmware +MKIMAGEFLAGS_u-boot.uim = -A arm -O U-Boot -a $(CONFIG_TEXT_BASE) \ + -e $(CONFIG_TEXT_BASE) -C none -T firmware u-boot.uim: u-boot.bin FORCE $(call if_changed,mkimage) diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c index 936c8f865a..be1f4edded 100644 --- a/arch/arm/mach-imx/imx8/cpu.c +++ b/arch/arm/mach-imx/imx8/cpu.c @@ -313,8 +313,8 @@ phys_size_t get_effective_memsize(void) /* Find the memory region runs the U-Boot */ if (start >= phys_sdram_1_start && start <= end1 && - (start <= CONFIG_SYS_TEXT_BASE && - end >= CONFIG_SYS_TEXT_BASE)) { + (start <= CONFIG_TEXT_BASE && + end >= CONFIG_TEXT_BASE)) { if ((end + 1) <= ((sc_faddr_t)phys_sdram_1_start + phys_sdram_1_size)) diff --git a/arch/arm/mach-imx/mx7/Kconfig b/arch/arm/mach-imx/mx7/Kconfig index 4f9f51c9b0..3c388183bc 100644 --- a/arch/arm/mach-imx/mx7/Kconfig +++ b/arch/arm/mach-imx/mx7/Kconfig @@ -16,7 +16,7 @@ config MX7D select ROM_UNIFIED_SECTIONS imply CMD_FUSE -config SYS_TEXT_BASE +config TEXT_BASE default 0x87800000 config SPL_TEXT_BASE diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index ef00969a5e..6b8f4115c4 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -341,7 +341,7 @@ void *board_spl_fit_buffer_addr(ulong fit_size, int sectors, int bl_len) if (bl_len < 512) bl_len = 512; - return (void *)((CONFIG_SYS_TEXT_BASE - fit_size - bl_len - + return (void *)((CONFIG_TEXT_BASE - fit_size - bl_len - align_len) & ~align_len); } #endif diff --git a/arch/arm/mach-ipq40xx/Kconfig b/arch/arm/mach-ipq40xx/Kconfig index 4eef80e935..f9db55c42a 100644 --- a/arch/arm/mach-ipq40xx/Kconfig +++ b/arch/arm/mach-ipq40xx/Kconfig @@ -6,7 +6,7 @@ config SYS_SOC config SYS_MALLOC_F_LEN default 0x2000 -config SYS_TEXT_BASE +config TEXT_BASE default 0x87300000 config NR_DRAM_BANKS diff --git a/arch/arm/mach-k3/config_secure.mk b/arch/arm/mach-k3/config_secure.mk index 6d63c57665..9cc1f9eb24 100644 --- a/arch/arm/mach-k3/config_secure.mk +++ b/arch/arm/mach-k3/config_secure.mk @@ -30,7 +30,7 @@ tispl.bin_HS: $(obj)/u-boot-spl-nodtb.bin_HS $(patsubst %,$(obj)/dts/%.dtb_HS,$( $(call if_changed,mkfitimage) MKIMAGEFLAGS_u-boot.img_HS = -f auto -A $(ARCH) -T firmware -C none -O u-boot \ - -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \ + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \ -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \ $(patsubst %,-b arch/$(ARCH)/dts/%.dtb_HS,$(subst ",,$(CONFIG_OF_LIST))) diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c index aea640b570..c4c5c37110 100644 --- a/arch/arm/mach-k3/sysfw-loader.c +++ b/arch/arm/mach-k3/sysfw-loader.c @@ -91,7 +91,7 @@ static void *sysfw_load_address; struct legacy_img_hdr *spl_get_load_buffer(ssize_t offset, size_t size) { if (sysfw_loaded) - return (struct legacy_img_hdr *)(CONFIG_SYS_TEXT_BASE + offset); + return (struct legacy_img_hdr *)(CONFIG_TEXT_BASE + offset); else if (sysfw_load_address) return sysfw_load_address; else diff --git a/arch/arm/mach-keystone/config.mk b/arch/arm/mach-keystone/config.mk index 5a16891f23..8eccbdb301 100644 --- a/arch/arm/mach-keystone/config.mk +++ b/arch/arm/mach-keystone/config.mk @@ -27,7 +27,7 @@ u-boot-spi.gph: spl/u-boot-spl.gph u-boot.img FORCE ifndef CONFIG_SPL_BUILD MKIMAGEFLAGS_MLO = -A $(ARCH) -T gpimage -C none \ - -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -n U-Boot + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_TEXT_BASE) -n U-Boot MLO: u-boot.bin FORCE $(call if_changed,mkimage) @dd if=/dev/zero bs=8 count=1 2>/dev/null >> $@ diff --git a/arch/arm/mach-nexell/include/mach/boot0.h b/arch/arm/mach-nexell/include/mach/boot0.h index e05c07ece6..29f37d3ba4 100644 --- a/arch/arm/mach-nexell/include/mach/boot0.h +++ b/arch/arm/mach-nexell/include/mach/boot0.h @@ -5,7 +5,7 @@ * The NSIH (first 512 Bytes of u-boot.bin) is necessary for the * 2nd-Bootloader to get information like load address of U-Boot. * - * 0x400 must be added to CONFIG_SYS_TEXT_BASE to have the actual load and + * 0x400 must be added to CONFIG_TEXT_BASE to have the actual load and * start address because 2nd-Bootloader loads with an offset of 0x400 * (NSIH + 0x200 bytes are not loaded into RAM). * @@ -23,9 +23,9 @@ .word (_end - _start) + 20 * 1024 /* 0x50: load size * (bin + 20k for DTB) */ .space 0x4 - .word CONFIG_SYS_TEXT_BASE + 0x400 /* 0x58: load address */ + .word CONFIG_TEXT_BASE + 0x400 /* 0x58: load address */ .word 0x00000000 - .word CONFIG_SYS_TEXT_BASE + 0x400 /* 0x60: start address */ + .word CONFIG_TEXT_BASE + 0x400 /* 0x60: start address */ .space 0x198 .byte 'N' /* 0x1FC: "NSIH" signature */ .byte 'S' diff --git a/arch/arm/mach-npcm/Kconfig b/arch/arm/mach-npcm/Kconfig index 7f2f9ac097..24bd2ad423 100644 --- a/arch/arm/mach-npcm/Kconfig +++ b/arch/arm/mach-npcm/Kconfig @@ -3,7 +3,7 @@ if ARCH_NPCM config SYS_ARCH default "arm" -config SYS_TEXT_BASE +config TEXT_BASE default 0x8000 choice diff --git a/arch/arm/mach-octeontx/cpu.c b/arch/arm/mach-octeontx/cpu.c index 7bd74fe4f6..aa5f4585c6 100644 --- a/arch/arm/mach-octeontx/cpu.c +++ b/arch/arm/mach-octeontx/cpu.c @@ -46,7 +46,7 @@ struct mm_region *mem_map = otx_mem_map; void mem_map_fill(void) { int banks = OTX_MEM_MAP_USED; - u32 dram_start = CONFIG_SYS_TEXT_BASE; + u32 dram_start = CONFIG_TEXT_BASE; if (otx_is_soc(CN83XX)) { otx_mem_map[banks].virt = 0x8c0000000000UL; diff --git a/arch/arm/mach-octeontx2/cpu.c b/arch/arm/mach-octeontx2/cpu.c index afa458c09b..723deef719 100644 --- a/arch/arm/mach-octeontx2/cpu.c +++ b/arch/arm/mach-octeontx2/cpu.c @@ -51,7 +51,7 @@ struct mm_region *mem_map = otx2_mem_map; void mem_map_fill(void) { int banks = OTX2_MEM_MAP_USED; - u32 dram_start = CONFIG_SYS_TEXT_BASE; + u32 dram_start = CONFIG_TEXT_BASE; for (int i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { otx2_mem_map[banks].virt = dram_start; diff --git a/arch/arm/mach-omap2/config_secure.mk b/arch/arm/mach-omap2/config_secure.mk index 0629afd0ee..f76262bb0c 100644 --- a/arch/arm/mach-omap2/config_secure.mk +++ b/arch/arm/mach-omap2/config_secure.mk @@ -10,7 +10,7 @@ cmd_mkomapsecimg = $(TI_SECURE_DEV_PKG)/scripts/create-boot-image.sh \ $(if $(KBUILD_VERBOSE:1=), >/dev/null) else cmd_mkomapsecimg = $(TI_SECURE_DEV_PKG)/scripts/create-boot-image.sh \ - $(patsubst u-boot_HS_%,%,$(@F)) $< $@ $(CONFIG_SYS_TEXT_BASE) \ + $(patsubst u-boot_HS_%,%,$(@F)) $< $@ $(CONFIG_TEXT_BASE) \ $(if $(KBUILD_VERBOSE:1=), >/dev/null) endif else @@ -102,7 +102,7 @@ u-boot_HS_XIP_X-LOADER: $(obj)/u-boot.bin FORCE ifdef CONFIG_SPL_LOAD_FIT MKIMAGEFLAGS_u-boot_HS.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \ - -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \ + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \ -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \ $(patsubst %,-b arch/$(ARCH)/dts/%.dtb_HS,$(subst ",,$(CONFIG_OF_LIST))) diff --git a/arch/arm/mach-owl/Kconfig b/arch/arm/mach-owl/Kconfig index cde2ade30b..76d3998884 100644 --- a/arch/arm/mach-owl/Kconfig +++ b/arch/arm/mach-owl/Kconfig @@ -14,7 +14,7 @@ config MACH_S700 endchoice -config SYS_TEXT_BASE +config TEXT_BASE default 0x11000000 config SYS_CONFIG_NAME diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index b46cea2f91..69d51ff378 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -431,7 +431,7 @@ config ROCKCHIP_SPI_IMAGE is built by binman. U-Boot sits near the start of the image. config LNX_KRNL_IMG_TEXT_OFFSET_BASE - default SYS_TEXT_BASE + default TEXT_BASE source "arch/arm/mach-rockchip/px30/Kconfig" source "arch/arm/mach-rockchip/rk3036/Kconfig" diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig index df44530e83..503c82d388 100644 --- a/arch/arm/mach-socfpga/Kconfig +++ b/arch/arm/mach-socfpga/Kconfig @@ -40,7 +40,7 @@ config SYS_MALLOC_F_LEN default 0x2000 if TARGET_SOCFPGA_ARRIA10 default 0x2000 if TARGET_SOCFPGA_GEN5 -config SYS_TEXT_BASE +config TEXT_BASE default 0x01000040 if TARGET_SOCFPGA_ARRIA10 default 0x01000040 if TARGET_SOCFPGA_GEN5 diff --git a/arch/arm/mach-stm32mp/Kconfig.13x b/arch/arm/mach-stm32mp/Kconfig.13x index 5fc000986e..acc02a5a18 100644 --- a/arch/arm/mach-stm32mp/Kconfig.13x +++ b/arch/arm/mach-stm32mp/Kconfig.13x @@ -19,7 +19,7 @@ config TARGET_ST_STM32MP13x endchoice -config SYS_TEXT_BASE +config TEXT_BASE default 0xC0000000 config PRE_CON_BUF_ADDR diff --git a/arch/arm/mach-stm32mp/Kconfig.15x b/arch/arm/mach-stm32mp/Kconfig.15x index 5bd9b53a5d..1d32f8bf33 100644 --- a/arch/arm/mach-stm32mp/Kconfig.15x +++ b/arch/arm/mach-stm32mp/Kconfig.15x @@ -93,7 +93,7 @@ config SPL_STM32MP15_PWR This config enables implementation of driver-model pmic and regulator uclass features for access to STM32MP15x PWR in SPL. -config SYS_TEXT_BASE +config TEXT_BASE default 0xC0100000 config PRE_CON_BUF_ADDR diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index 220ed80ba7..86233637bf 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -363,7 +363,7 @@ __weak void sunxi_sram_init(void) static bool sunxi_valid_emmc_boot(struct mmc *mmc) { struct blk_desc *bd = mmc_get_blk_desc(mmc); - uint32_t *buffer = (void *)(uintptr_t)CONFIG_SYS_TEXT_BASE; + u32 *buffer = (void *)(uintptr_t)CONFIG_TEXT_BASE; struct boot_file_head *egon_head = (void *)buffer; int bootpart = EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config); uint32_t spl_size, emmc_checksum, chksum = 0; diff --git a/arch/arm/mach-sunxi/spl_spi_sunxi.c b/arch/arm/mach-sunxi/spl_spi_sunxi.c index 520f14e515..81159cfee6 100644 --- a/arch/arm/mach-sunxi/spl_spi_sunxi.c +++ b/arch/arm/mach-sunxi/spl_spi_sunxi.c @@ -341,7 +341,7 @@ static int spl_spi_load_image(struct spl_image_info *spl_image, struct legacy_img_hdr *header; uint32_t load_offset = sunxi_get_spl_size(); - header = (struct legacy_img_hdr *)CONFIG_SYS_TEXT_BASE; + header = (struct legacy_img_hdr *)CONFIG_TEXT_BASE; load_offset = max_t(uint32_t, load_offset, CONFIG_SYS_SPI_U_BOOT_OFFS); spi0_init(); diff --git a/arch/arm/mach-zynqmp/mkimage_fit_atf.sh b/arch/arm/mach-zynqmp/mkimage_fit_atf.sh index 40ed23b0ba..cdecb1c1d3 100755 --- a/arch/arm/mach-zynqmp/mkimage_fit_atf.sh +++ b/arch/arm/mach-zynqmp/mkimage_fit_atf.sh @@ -26,7 +26,7 @@ TEE_LOAD_ADDR_LOW=`printf 0x%x $((TEE_LOAD_ADDR & 0xffffffff))` TEE_LOAD_ADDR_HIGH=`printf 0x%x $((TEE_LOAD_ADDR >> 32))` if [ -z "$BL33_LOAD_ADDR" ];then - BL33_LOAD_ADDR=`awk '/CONFIG_SYS_TEXT_BASE/ { print $3 }' include/generated/autoconf.h` + BL33_LOAD_ADDR=`awk '/CONFIG_TEXT_BASE/ { print $3 }' include/generated/autoconf.h` fi BL33_LOAD_ADDR_LOW=`printf 0x%x $((BL33_LOAD_ADDR & 0xffffffff))` BL33_LOAD_ADDR_HIGH=`printf 0x%x $((BL33_LOAD_ADDR >> 32))` diff --git a/arch/m68k/cpu/mcf52x2/start.S b/arch/m68k/cpu/mcf52x2/start.S index 4488a6e4c7..6dddbe76f3 100644 --- a/arch/m68k/cpu/mcf52x2/start.S +++ b/arch/m68k/cpu/mcf52x2/start.S @@ -35,8 +35,8 @@ */ _vectors: .long 0x00000000 /* Flash offset is 0 until we setup CS0 */ -#if defined(CONFIG_M5282) && (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) -.long _start - CONFIG_SYS_TEXT_BASE +#if defined(CONFIG_M5282) && (CONFIG_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) +.long _start - CONFIG_TEXT_BASE #else .long _START #endif @@ -83,7 +83,7 @@ _vectors: #if defined(CONFIG_SYS_INT_FLASH_BASE) && \ (defined(CONFIG_M5282) || defined(CONFIG_M5281)) -#if (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) +#if (CONFIG_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) .long 0x55AA55AA,0xAA55AA55 /* CFM Backdoorkey */ .long 0xFFFFFFFF /* all sectors protected */ .long 0x00000000 /* supervisor/User restriction */ @@ -130,7 +130,7 @@ _start: movec %d0, %RAMBAR1 #if defined(CONFIG_M5282) -#if (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) +#if (CONFIG_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) /* * Setup code in SRAM to initialize FLASHBAR, * if start from internal Flash @@ -156,7 +156,7 @@ _after_flashbar_copy: /* Setup code to initialize FLASHBAR, if start from external Memory */ move.l #(CONFIG_SYS_INT_FLASH_BASE + CONFIG_SYS_INT_FLASH_ENABLE), %d0 movec %d0, %FLASHBAR -#endif /* (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) */ +#endif /* (CONFIG_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) */ #endif #endif @@ -165,7 +165,7 @@ _after_flashbar_copy: * therefore no VBR to set */ #if !defined(CONFIG_MONITOR_IS_IN_RAM) -#if defined(CONFIG_M5282) && (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) +#if defined(CONFIG_M5282) && (CONFIG_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) move.l #CONFIG_SYS_INT_FLASH_BASE, %d0 #else move.l #CONFIG_SYS_FLASH_BASE, %d0 diff --git a/arch/m68k/cpu/mcf530x/start.S b/arch/m68k/cpu/mcf530x/start.S index 287e8e7873..644c372bdd 100644 --- a/arch/m68k/cpu/mcf530x/start.S +++ b/arch/m68k/cpu/mcf530x/start.S @@ -39,8 +39,8 @@ _vectors: /* Flash offset is 0 until we setup CS0 */ .long 0x00000000 #if defined(CONFIG_M5307) && \ - (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) -.long _start - CONFIG_SYS_TEXT_BASE + (CONFIG_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) +.long _start - CONFIG_TEXT_BASE #else .long _START #endif diff --git a/arch/m68k/cpu/mcf5445x/start.S b/arch/m68k/cpu/mcf5445x/start.S index 27bcd40c5c..aea8f3090f 100644 --- a/arch/m68k/cpu/mcf5445x/start.S +++ b/arch/m68k/cpu/mcf5445x/start.S @@ -26,10 +26,10 @@ rte; #if defined(CONFIG_SERIAL_BOOT) -#define ASM_DRAMINIT (asm_dram_init - CONFIG_SYS_TEXT_BASE + \ +#define ASM_DRAMINIT (asm_dram_init - CONFIG_TEXT_BASE + \ CONFIG_SYS_INIT_RAM_ADDR) -#define ASM_DRAMINIT_N (asm_dram_init - CONFIG_SYS_TEXT_BASE) -#define ASM_SBF_IMG_HDR (asm_sbf_img_hdr - CONFIG_SYS_TEXT_BASE + \ +#define ASM_DRAMINIT_N (asm_dram_init - CONFIG_TEXT_BASE) +#define ASM_SBF_IMG_HDR (asm_sbf_img_hdr - CONFIG_TEXT_BASE + \ CONFIG_SYS_INIT_RAM_ADDR) #endif @@ -116,7 +116,7 @@ vector192_255: asm_sbf_img_hdr: .long 0x00000000 /* checksum, not yet implemented */ .long 0x00040000 /* image length */ - .long CONFIG_SYS_TEXT_BASE /* image to be relocated at */ + .long CONFIG_TEXT_BASE /* image to be relocated at */ asm_dram_init: move.w #0x2700,%sr /* Mask off Interrupt */ @@ -271,7 +271,7 @@ asm_dspi_rd_loop2: jsr asm_dspi_rd_status /* jump to memory and execute */ - move.l #(CONFIG_SYS_TEXT_BASE + 0x400), %a0 + move.l #(CONFIG_TEXT_BASE + 0x400), %a0 jmp (%a0) asm_dspi_wr_status: @@ -298,7 +298,7 @@ asm_dspi_rd_status: /* copy 4 boot pages to dram as soon as possible */ /* each page is 996 bytes (1056 total with 60 ECC bytes */ move.l #0x00000000, %a1 /* src */ - move.l #CONFIG_SYS_TEXT_BASE, %a2 /* dst */ + move.l #CONFIG_TEXT_BASE, %a2 /* dst */ move.l #0x3E0, %d0 /* sz in long */ asm_boot_nand_copy: @@ -381,7 +381,7 @@ asm_nand_init: move.l #4, %d2 /* start at 4 */ move.l #0xFC0FFF04, %a0 /* cmd2 */ move.l #0xFC0FFF0C, %a1 /* rar */ - move.l #(CONFIG_SYS_TEXT_BASE + 0xF80), %a2 + move.l #(CONFIG_TEXT_BASE + 0xF80), %a2 asm_nand_read: move.l #0x11000000, %d0 /* rar */ @@ -419,7 +419,7 @@ asm_nand_copy: bgt asm_nand_read /* jump to memory and execute */ - move.l #(CONFIG_SYS_TEXT_BASE + 0x400), %a0 + move.l #(CONFIG_TEXT_BASE + 0x400), %a0 jmp (%a0) #endif /* CONFIG_SYS_NAND_BOOT */ diff --git a/arch/microblaze/cpu/relocate.c b/arch/microblaze/cpu/relocate.c index b00d02b1df..7a15fb2ec3 100644 --- a/arch/microblaze/cpu/relocate.c +++ b/arch/microblaze/cpu/relocate.c @@ -19,7 +19,7 @@ * @rela_start: rela section start * @rela_end: rela section end * @dyn_start: dynamic section start - * @origin_addr: address where u-boot starts(doesn't need to be CONFIG_SYS_TEXT_BASE) + * @origin_addr: address where u-boot starts(doesn't need to be CONFIG_TEXT_BASE) */ void mb_fix_rela(u32 reloc_addr, u32 verbose, u32 rela_start, u32 rela_end, u32 dyn_start, u32 origin_addr) @@ -29,9 +29,9 @@ void mb_fix_rela(u32 reloc_addr, u32 verbose, u32 rela_start, /* * Return in case u-boot.elf is used directly. * Skip it when u-boot.bin is loaded to different address than - * CONFIG_SYS_TEXT_BASE. In this case relocation is necessary to run. + * CONFIG_TEXT_BASE. In this case relocation is necessary to run. */ - if (reloc_addr == CONFIG_SYS_TEXT_BASE) { + if (reloc_addr == CONFIG_TEXT_BASE) { debug_cond(verbose, "Relocation address is the same - skip relocation\n"); return; diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S index a877db305e..7079d9e170 100644 --- a/arch/microblaze/cpu/start.S +++ b/arch/microblaze/cpu/start.S @@ -55,15 +55,15 @@ uboot_sym_start: add r6, r0, r0 lwi r7, r20, ALIGNMENT_ADDR - addi r7, r7, -CONFIG_SYS_TEXT_BASE + addi r7, r7, -CONFIG_TEXT_BASE add r7, r7, r5 lwi r8, r20, ALIGNMENT_ADDR + 0x4 - addi r8, r8, -CONFIG_SYS_TEXT_BASE + addi r8, r8, -CONFIG_TEXT_BASE add r8, r8, r5 lwi r9, r20, ALIGNMENT_ADDR + 0x8 - addi r9, r9, -CONFIG_SYS_TEXT_BASE + addi r9, r9, -CONFIG_TEXT_BASE add r9, r9, r5 - addi r10, r0, CONFIG_SYS_TEXT_BASE + addi r10, r0, CONFIG_TEXT_BASE brlid r15, mb_fix_rela nop diff --git a/arch/mips/mach-jz47xx/jz4780/jz4780.c b/arch/mips/mach-jz47xx/jz4780/jz4780.c index 4c40bd86fd..cff98b0a77 100644 --- a/arch/mips/mach-jz47xx/jz4780/jz4780.c +++ b/arch/mips/mach-jz47xx/jz4780/jz4780.c @@ -58,7 +58,7 @@ void board_init_f(ulong dummy) if (ret) hang(); - header = (struct legacy_img_hdr *)(CONFIG_SYS_TEXT_BASE - + header = (struct legacy_img_hdr *)(CONFIG_TEXT_BASE - sizeof(struct legacy_img_hdr)); count = blk_dread(mmc_get_blk_desc(mmc), @@ -68,7 +68,7 @@ void board_init_f(ulong dummy) hang(); image_entry_noargs_t image_entry = - (image_entry_noargs_t)CONFIG_SYS_TEXT_BASE; + (image_entry_noargs_t)CONFIG_TEXT_BASE; image_entry(); diff --git a/arch/mips/mach-mscc/lowlevel_init.S b/arch/mips/mach-mscc/lowlevel_init.S index 91f29ae252..0c24cb5f22 100644 --- a/arch/mips/mach-mscc/lowlevel_init.S +++ b/arch/mips/mach-mscc/lowlevel_init.S @@ -21,7 +21,7 @@ LEAF(lowlevel_init) /* Modify ra/s0 such we return to physical NOR location */ li t0, 0x0fffffff - li t1, CONFIG_SYS_TEXT_BASE + li t1, CONFIG_TEXT_BASE and s0, ra, t0 add s0, s0, t1 diff --git a/arch/mips/mach-mtmips/Kconfig b/arch/mips/mach-mtmips/Kconfig index d46be503a2..15b2792e61 100644 --- a/arch/mips/mach-mtmips/Kconfig +++ b/arch/mips/mach-mtmips/Kconfig @@ -28,7 +28,7 @@ config SYS_ICACHE_LINE_SIZE config SYS_SCACHE_LINE_SIZE default 32 if SOC_MT7621 -config SYS_TEXT_BASE +config TEXT_BASE default 0x9c000000 if !SPL && !SOC_MT7621 default 0x80200000 if SPL || SOC_MT7621 diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c index 1bba216371..8d629d3b96 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c @@ -30,7 +30,7 @@ void setup_ifc(void) _mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(15); _mas1 = MAS1_VALID | MAS1_TID(0) | MAS1_TS | MAS1_IPROT | MAS1_TSIZE(BOOKE_PAGESZ_4M); - _mas2 = FSL_BOOKE_MAS2(CONFIG_SYS_TEXT_BASE, MAS2_I|MAS2_G); + _mas2 = FSL_BOOKE_MAS2(CONFIG_TEXT_BASE, MAS2_I | MAS2_G); _mas3 = FSL_BOOKE_MAS3(flash_phys, 0, MAS3_SW|MAS3_SR|MAS3_SX); _mas7 = FSL_BOOKE_MAS7(flash_phys); @@ -58,7 +58,7 @@ void setup_ifc(void) MAS0_ESEL(CONFIG_SYS_PPC_E500_DEBUG_TLB); _mas1 = MAS1_VALID | MAS1_TID(0) | MAS1_IPROT | MAS1_TSIZE(BOOKE_PAGESZ_4M); - _mas2 = FSL_BOOKE_MAS2(CONFIG_SYS_TEXT_BASE, MAS2_I|MAS2_G); + _mas2 = FSL_BOOKE_MAS2(CONFIG_TEXT_BASE, MAS2_I | MAS2_G); _mas3 = FSL_BOOKE_MAS3(flash_phys, 0, MAS3_SW|MAS3_SR|MAS3_SX); _mas7 = FSL_BOOKE_MAS7(flash_phys); diff --git a/arch/powerpc/cpu/mpc85xx/u-boot.lds b/arch/powerpc/cpu/mpc85xx/u-boot.lds index c766f20cb0..fa3aa954cb 100644 --- a/arch/powerpc/cpu/mpc85xx/u-boot.lds +++ b/arch/powerpc/cpu/mpc85xx/u-boot.lds @@ -18,7 +18,7 @@ SECTIONS { /* Optional boot sector */ #if defined(CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR) && !defined(CONFIG_SPL) - .bootsect CONFIG_SYS_TEXT_BASE - CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA * 512 : { + .bootsect CONFIG_TEXT_BASE - CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA * 512 : { KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootsect)) . = CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA * 512; } diff --git a/arch/powerpc/dts/kmcent2-u-boot.dtsi b/arch/powerpc/dts/kmcent2-u-boot.dtsi index eeaa688b65..28f303b749 100644 --- a/arch/powerpc/dts/kmcent2-u-boot.dtsi +++ b/arch/powerpc/dts/kmcent2-u-boot.dtsi @@ -77,13 +77,13 @@ binman { filename = "u-boot.bin"; - skip-at-start = <CONFIG_SYS_TEXT_BASE>; + skip-at-start = <CONFIG_TEXT_BASE>; sort-by-offset; pad-byte = <0xff>; size = <CONFIG_SYS_MONITOR_LEN>; u-boot-with-ucode-ptr { - offset = <CONFIG_SYS_TEXT_BASE>; + offset = <CONFIG_TEXT_BASE>; optional-ucode; }; diff --git a/arch/powerpc/dts/u-boot.dtsi b/arch/powerpc/dts/u-boot.dtsi index 6588bb7fa5..b4b5257362 100644 --- a/arch/powerpc/dts/u-boot.dtsi +++ b/arch/powerpc/dts/u-boot.dtsi @@ -10,13 +10,13 @@ / { binman { filename = "u-boot.bin"; - skip-at-start = <CONFIG_SYS_TEXT_BASE>; + skip-at-start = <CONFIG_TEXT_BASE>; sort-by-offset; pad-byte = <0xff>; size = <CONFIG_SYS_MONITOR_LEN>; u-boot-with-ucode-ptr { - offset = <CONFIG_SYS_TEXT_BASE>; + offset = <CONFIG_TEXT_BASE>; optional-ucode; }; diff --git a/arch/riscv/dts/binman.dtsi b/arch/riscv/dts/binman.dtsi index 5757ef65ea..b8fc8f7f35 100644 --- a/arch/riscv/dts/binman.dtsi +++ b/arch/riscv/dts/binman.dtsi @@ -27,7 +27,7 @@ os = "U-Boot"; arch = "riscv"; compression = "none"; - load = <CONFIG_SYS_TEXT_BASE>; + load = <CONFIG_TEXT_BASE>; uboot_blob: blob-ext { filename = "u-boot-nodtb.bin"; diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c index 1d49a9bd10..0faf34cc00 100644 --- a/arch/sandbox/cpu/spl.c +++ b/arch/sandbox/cpu/spl.c @@ -49,13 +49,14 @@ void board_init_f(ulong flag) preloader_console_init(); } -u32 spl_boot_device(void) +void board_boot_order(u32 *spl_boot_list) { - return BOOT_DEVICE_BOARD; + spl_boot_list[0] = BOOT_DEVICE_VBE; + spl_boot_list[1] = BOOT_DEVICE_BOARD; } -static int spl_board_load_image(struct spl_image_info *spl_image, - struct spl_boot_device *bootdev) +static int spl_board_load_file(struct spl_image_info *spl_image, + struct spl_boot_device *bootdev) { char fname[256]; int ret; @@ -74,10 +75,52 @@ static int spl_board_load_image(struct spl_image_info *spl_image, if (!spl_image->arg) return log_msg_ret("exec", -ENOMEM); strcpy(spl_image->arg, fname); + spl_image->flags = SPL_SANDBOXF_ARG_IS_FNAME; return 0; } -SPL_LOAD_IMAGE_METHOD("sandbox", 9, BOOT_DEVICE_BOARD, spl_board_load_image); +SPL_LOAD_IMAGE_METHOD("sandbox_file", 9, BOOT_DEVICE_BOARD, + spl_board_load_file); + +static int load_from_image(struct spl_image_info *spl_image, + struct spl_boot_device *bootdev) +{ + struct sandbox_state *state = state_get_current(); + enum u_boot_phase next_phase; + const char *fname; + ulong pos, size; + int full_size; + void *buf; + int ret; + + if (!IS_ENABLED(CONFIG_SANDBOX_VPL)) + return -ENOENT; + + next_phase = spl_next_phase(); + pos = spl_get_image_pos(); + size = spl_get_image_size(); + if (pos == BINMAN_SYM_MISSING || size == BINMAN_SYM_MISSING) { + log_debug("No image found\n"); + return -ENOENT; + } + log_info("Reading from pos %lx size %lx\n", pos, size); + + /* + * Set up spl_image to boot from jump_to_image_no_args(). Allocate this + * outside the RAM buffer (i.e. don't use strdup()). + */ + fname = state->prog_fname ? state->prog_fname : state->argv[0]; + ret = os_read_file(fname, &buf, &full_size); + if (ret) + return log_msg_ret("rd", -ENOMEM); + spl_image->flags = SPL_SANDBOXF_ARG_IS_BUF; + spl_image->arg = buf; + spl_image->offset = pos; + spl_image->size = size; + + return 0; +} +SPL_LOAD_IMAGE_METHOD("sandbox_image", 7, BOOT_DEVICE_BOARD, load_from_image); void spl_board_init(void) { @@ -89,20 +132,37 @@ void spl_board_init(void) int ret; ret = ut_run_list("spl", NULL, tests, count, - state->select_unittests, 1); + state->select_unittests, 1, false); /* continue execution into U-Boot */ } } void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) { - const char *fname = spl_image->arg; + switch (spl_image->flags) { + case SPL_SANDBOXF_ARG_IS_FNAME: { + const char *fname = spl_image->arg; + + if (fname) { + os_fd_restore(); + os_spl_to_uboot(fname); + } else { + log_err("No filename provided for U-Boot\n"); + } + break; + } + case SPL_SANDBOXF_ARG_IS_BUF: { + int ret; - if (fname) { - os_fd_restore(); - os_spl_to_uboot(fname); - } else { - printf("No filename provided for U-Boot\n"); + ret = os_jump_to_image(spl_image->arg + spl_image->offset, + spl_image->size); + if (ret) + log_err("Failed to load image\n"); + break; + } + default: + log_err("Invalid flags\n"); + break; } hang(); } diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index 642be164a3..622df41f54 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -244,6 +244,36 @@ static int sandbox_cmdline_cb_jump(struct sandbox_state *state, } SANDBOX_CMDLINE_OPT_SHORT(jump, 'j', 1, "Jumped from previous U-Boot"); +static int sandbox_cmdline_cb_program(struct sandbox_state *state, + const char *arg) +{ + /* + * Record the program name to use when jumping to future phases. This + * is the original executable which holds all the phases. We need to + * use this instead of argv[0] since each phase is started by + * extracting a particular binary from the full program, then running + * it. Therefore in that binary, argv[0] contains only the + * current-phase executable. + * + * For example, sandbox TPL may be started using image file: + * + * ./image.bin + * + * but then TPL needs to run VPL, which it does by extracting the VPL + * image from the image.bin file. + * + * ./temp-vpl + * + * When VPL runs it needs access to the original image.bin so it can + * extract the next phase (SPL). This works if we use '-f image.bin' + * when starting the original image.bin file. + */ + state->prog_fname = arg; + + return 0; +} +SANDBOX_CMDLINE_OPT_SHORT(program, 'p', 1, "U-Boot program name"); + static int sandbox_cmdline_cb_memory(struct sandbox_state *state, const char *arg) { diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c index fcc4a337e5..a681e472ab 100644 --- a/arch/sandbox/cpu/state.c +++ b/arch/sandbox/cpu/state.c @@ -470,7 +470,7 @@ int state_uninit(void) int err; if (state->write_ram_buf || state->write_state) - log_info("Writing sandbox state\n"); + log_debug("Writing sandbox state\n"); state = &main_state; /* Finish the bloblist, so that it is correct before writing memory */ diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts index 21f00fcab5..1b60914a01 100644 --- a/arch/sandbox/dts/sandbox.dts +++ b/arch/sandbox/dts/sandbox.dts @@ -21,6 +21,9 @@ spi0 = &spi; }; + binman: binman { + }; + memory { reg = <0 CONFIG_SYS_SDRAM_SIZE>; }; @@ -103,3 +106,7 @@ #include "sandbox.dtsi" #include "cros-ec-keyboard.dtsi" #include "sandbox_pmic.dtsi" + +#ifdef CONFIG_SANDBOX_VPL +#include "sandbox_vpl.dtsi" +#endif diff --git a/arch/sandbox/dts/sandbox_vpl.dtsi b/arch/sandbox/dts/sandbox_vpl.dtsi new file mode 100644 index 0000000000..1fba537f13 --- /dev/null +++ b/arch/sandbox/dts/sandbox_vpl.dtsi @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Devicetree file for VPL (Verifying Program Loader) + */ + +&binman { + u-boot-tpl-elf { + no-expanded; + }; + u-boot-vpl-elf { + no-expanded; + }; + fw-update { + type = "section"; + + /* + * provide plenty of space for ELF files with debug info so that + * gdb can be used + */ + offset = <0x400000>; + size = <0xdffc00>; + + fit { + fit,external-offset = <0>; + description = "AP firmware"; + images { + spl { + description = "U-Boot SPL"; + type = "firmware"; + phase = "spl"; + arch = "sandbox"; + os = "u-boot"; + compression = "none"; + + hash-1 { + algo = "sha256"; + }; + + u-boot-spl-elf { + }; + }; + u-boot { + description = "U-Boot"; + type = "firmware"; + phase = "u-boot"; + arch = "sandbox"; + os = "u-boot"; + compression = "none"; + + hash-1 { + algo = "sha256"; + }; + + u-boot-elf { + }; + }; + }; + + configurations { + conf-1 { + compatible = "sandbox"; + description = "AP Firmware v1"; + firmware = "spl", "u-boot"; + signature { + algo = "sha1,rsa2048"; + key-name-hint = "dev"; + sign-images = "firmware"; + }; + }; + }; + }; + }; + state { + type = "fill"; + size = <0x200>; + }; + version { + type = "text"; + text = "1.2.3"; + size = <0x200>; + }; + fdtmap { + }; +}; diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index db72c64b1e..25fd2bcab8 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -37,6 +37,8 @@ i2c0 = "/i2c@0"; mmc0 = "/mmc0"; mmc1 = "/mmc1"; + mmc2 = "/mmc2"; + mmc3 = "/mmc3"; pci0 = &pci0; pci1 = &pci1; pci2 = &pci2; @@ -64,7 +66,7 @@ osd0 = "/osd"; }; - binman { + binman: binman { }; config { @@ -78,6 +80,7 @@ }; bootstd { + u-boot,dm-vpl; compatible = "u-boot,boot-std"; filename-prefixes = "/", "/boot/"; @@ -90,6 +93,46 @@ efi { compatible = "u-boot,distro-efi"; }; + + /* + * This is used for the VBE OS-request tests. A FAT filesystem + * created in a partition with the VBE information appearing + * before the parititon starts + */ + firmware0 { + u-boot,dm-vpl; + compatible = "fwupd,vbe-simple"; + storage = "mmc1"; + skip-offset = <0x200>; + area-start = <0x400>; + area-size = <0x1000>; + state-offset = <0x400>; + state-size = <0x40>; + version-offset = <0x800>; + version-size = <0x100>; + }; + + /* + * This is used for the VBE VPL tests. The MMC device holds the + * binman image.bin file. The test progresses through each phase + * of U-Boot, loading each in turn from MMC. + * + * Note that the test enables this node (and mmc3) before + * running U-Boot + */ + firmware1 { + u-boot,dm-vpl; + status = "disabled"; + compatible = "fwupd,vbe-simple"; + storage = "mmc3"; + skip-offset = <0x400000>; + area-start = <0>; + area-size = <0xe00000>; + state-offset = <0xdffc00>; + state-size = <0x40>; + version-offset = <0xdffe00>; + version-size = <0x100>; + }; }; fuzzing-engine { @@ -962,6 +1005,14 @@ compatible = "sandbox,mmc"; }; + /* This is used for VBE VPL tests */ + mmc3 { + status = "disabled"; + compatible = "sandbox,mmc"; + filename = "image.bin"; + non-removable; + }; + pch { compatible = "sandbox,pch"; }; @@ -1404,21 +1455,6 @@ compatible = "denx,u-boot-fdt-test"; reg = <9 1>; }; - - fwupd { - compatible = "simple-bus"; - firmware0 { - compatible = "fwupd,vbe-simple"; - storage = "mmc1"; - area-start = <0x400>; - area-size = <0x1000>; - skip-offset = <0x200>; - state-offset = <0x400>; - state-size = <0x40>; - version-offset = <0x800>; - version-size = <0x100>; - }; - }; }; translation-test@8000 { @@ -1708,3 +1744,7 @@ #include "sandbox_pmic.dtsi" #include "cros-ec-keyboard.dtsi" + +#ifdef CONFIG_SANDBOX_VPL +#include "sandbox_vpl.dtsi" +#endif diff --git a/arch/sandbox/include/asm/spl.h b/arch/sandbox/include/asm/spl.h index bf5a585622..2f8b5fcfcf 100644 --- a/arch/sandbox/include/asm/spl.h +++ b/arch/sandbox/include/asm/spl.h @@ -7,7 +7,11 @@ #define __asm_spl_h enum { + BOOT_DEVICE_MMC1, + BOOT_DEVICE_MMC2, + BOOT_DEVICE_MMC2_2, BOOT_DEVICE_BOARD, + BOOT_DEVICE_VBE, }; /** diff --git a/arch/sandbox/include/asm/state.h b/arch/sandbox/include/asm/state.h index fd42daad51..49ea483d33 100644 --- a/arch/sandbox/include/asm/state.h +++ b/arch/sandbox/include/asm/state.h @@ -71,7 +71,8 @@ struct sandbox_state { const char *parse_err; /* Error to report from parsing */ int argc; /* Program arguments */ char **argv; /* Command line arguments */ - const char *jumped_fname; /* Jumped from previous U_Boot */ + const char *jumped_fname; /* Jumped from previous U-Boot */ + const char *prog_fname; /* U-Boot executable filename */ uint8_t *ram_buf; /* Emulated RAM buffer */ unsigned long ram_size; /* Size of RAM buffer */ const char *ram_buf_fname; /* Filename to use for RAM buffer */ diff --git a/arch/sh/cpu/u-boot.lds b/arch/sh/cpu/u-boot.lds index ff80ce78f3..85ee547b4a 100644 --- a/arch/sh/cpu/u-boot.lds +++ b/arch/sh/cpu/u-boot.lds @@ -25,7 +25,7 @@ ENTRY(_start) SECTIONS { - . = CONFIG_SYS_TEXT_BASE; + . = CONFIG_TEXT_BASE; reloc_dst = .; PROVIDE (_ftext = .); diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index a2da080eae..93f1c77be3 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -924,8 +924,8 @@ config CACHE_QOS_SIZE_PER_BIT config X86_OFFSET_U_BOOT hex "Offset of U-Boot in ROM image" - depends on HAVE_SYS_TEXT_BASE - default SYS_TEXT_BASE + depends on HAVE_TEXT_BASE + default TEXT_BASE config X86_OFFSET_SPL hex "Offset of SPL in ROM image" diff --git a/arch/x86/cpu/apollolake/spl.c b/arch/x86/cpu/apollolake/spl.c index f2d25734c6..6078d5a200 100644 --- a/arch/x86/cpu/apollolake/spl.c +++ b/arch/x86/cpu/apollolake/spl.c @@ -118,7 +118,7 @@ static int spl_fast_spi_load_image(struct spl_image_info *spl_image, spl_image->size = CONFIG_SYS_MONITOR_LEN; /* We don't know SPL size */ spl_image->entry_point = spl_phase() == PHASE_TPL ? - CONFIG_SPL_TEXT_BASE : CONFIG_SYS_TEXT_BASE; + CONFIG_SPL_TEXT_BASE : CONFIG_TEXT_BASE; spl_image->load_addr = spl_image->entry_point; spl_image->os = IH_OS_U_BOOT; spl_image->name = "U-Boot"; diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c index e016fae04f..0a1fbb34d4 100644 --- a/arch/x86/cpu/quark/quark.c +++ b/arch/x86/cpu/quark/quark.c @@ -49,7 +49,7 @@ static void quark_setup_mtrr(void) /* variable range MTRR#0: ROM area */ mask = ~(CONFIG_SYS_MONITOR_LEN - 1); - base = CONFIG_SYS_TEXT_BASE & mask; + base = CONFIG_TEXT_BASE & mask; msg_port_write(MSG_PORT_HOST_BRIDGE, MTRR_VAR_PHYBASE(MTRR_VAR_ROM), base | MTRR_TYPE_WRBACK); msg_port_write(MSG_PORT_HOST_BRIDGE, MTRR_VAR_PHYMASK(MTRR_VAR_ROM), diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S index 897fd926c0..0ef27cc5a0 100644 --- a/arch/x86/cpu/start.S +++ b/arch/x86/cpu/start.S @@ -237,15 +237,15 @@ multiboot_header: /* checksum */ .long -0x1BADB002 - (1 << 16) /* header addr */ - .long multiboot_header - _x86boot_start + CONFIG_SYS_TEXT_BASE + .long multiboot_header - _x86boot_start + CONFIG_TEXT_BASE /* load addr */ - .long CONFIG_SYS_TEXT_BASE + .long CONFIG_TEXT_BASE /* load end addr */ .long 0 /* bss end addr */ .long 0 /* entry addr */ - .long CONFIG_SYS_TEXT_BASE + .long CONFIG_TEXT_BASE #ifdef CONFIG_X86_LOAD_FROM_32_BIT /* diff --git a/arch/x86/cpu/u-boot-64.lds b/arch/x86/cpu/u-boot-64.lds index 53c56043a9..d0398ff00d 100644 --- a/arch/x86/cpu/u-boot-64.lds +++ b/arch/x86/cpu/u-boot-64.lds @@ -15,8 +15,8 @@ SECTIONS /DISCARD/ : { *(__u_boot_list_2_cmd_*) } #endif -#ifdef CONFIG_SYS_TEXT_BASE - . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */ +#ifdef CONFIG_TEXT_BASE + . = CONFIG_TEXT_BASE; /* Location of bootcode in flash */ #endif __text_start = .; diff --git a/arch/x86/cpu/u-boot.lds b/arch/x86/cpu/u-boot.lds index 7c87209834..a31f4220a0 100644 --- a/arch/x86/cpu/u-boot.lds +++ b/arch/x86/cpu/u-boot.lds @@ -15,7 +15,7 @@ SECTIONS /DISCARD/ : { *(__u_boot_list_2_cmd_*) } #endif - . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */ + . = CONFIG_TEXT_BASE; /* Location of bootcode in flash */ __text_start = .; .text.start : { *(.text.start); } diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c index 9060d19d46..5b1b420a64 100644 --- a/arch/x86/lib/relocate.c +++ b/arch/x86/lib/relocate.c @@ -162,10 +162,10 @@ int do_elf_reloc_fixups(void) if (re_src == re_end) panic("No relocation data"); -#ifdef CONFIG_SYS_TEXT_BASE - text_base = CONFIG_SYS_TEXT_BASE; +#ifdef CONFIG_TEXT_BASE + text_base = CONFIG_TEXT_BASE; #else - panic("No CONFIG_SYS_TEXT_BASE"); + panic("No CONFIG_TEXT_BASE"); #endif #if CONFIG_IS_ENABLED(X86_64) do_elf_reloc_fixups64(text_base, size, re_src, re_end); diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index 2d50c62964..34ef68f2bb 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -66,7 +66,7 @@ static int x86_spl_init(void) * TODO(sjg@chromium.org): We use this area of RAM for the stack * and global_data in SPL. Once U-Boot starts up and releocates it * is not needed. We could make this a CONFIG option or perhaps - * place it immediately below CONFIG_SYS_TEXT_BASE. + * place it immediately below CONFIG_TEXT_BASE. */ __maybe_unused char *ptr = (char *)0x110000; #else @@ -209,8 +209,8 @@ static int spl_board_load_image(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) { spl_image->size = CONFIG_SYS_MONITOR_LEN; - spl_image->entry_point = CONFIG_SYS_TEXT_BASE; - spl_image->load_addr = CONFIG_SYS_TEXT_BASE; + spl_image->entry_point = CONFIG_TEXT_BASE; + spl_image->load_addr = CONFIG_TEXT_BASE; spl_image->os = IH_OS_U_BOOT; spl_image->name = "U-Boot"; |