From 0c3a9ed409a5efac27df762acb2af6271675b07d Mon Sep 17 00:00:00 2001 From: Tien Fong Chee Date: Wed, 23 Jan 2019 14:20:03 +0800 Subject: spl: Kconfig: Replace CONFIG_SPL_FAT_SUPPORT with CONFIG_SPL_FS_FAT Replace CONFIG_SPL_FAT_SUPPORT with CONFIG_SPL_FS_FAT so obj-$(CONFIG_$(SPL_)FS_FAT) can be used to control the build in both SPL and U-Boot. Signed-off-by: Tien Fong Chee Reviewed-by: Simon Goldschmidt Reviewed-by: Tom Rini --- include/configs/imx6_spl.h | 2 +- include/configs/imx7_spl.h | 2 +- include/configs/socfpga_common.h | 2 +- include/part.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/configs/imx6_spl.h b/include/configs/imx6_spl.h index 720ff045a7..60a925dd06 100644 --- a/include/configs/imx6_spl.h +++ b/include/configs/imx6_spl.h @@ -43,7 +43,7 @@ #endif /* Define the payload for FAT/EXT support */ -#if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT) +#if defined(CONFIG_SPL_FS_FAT) || defined(CONFIG_SPL_EXT_SUPPORT) # ifdef CONFIG_OF_CONTROL # define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img" # else diff --git a/include/configs/imx7_spl.h b/include/configs/imx7_spl.h index 1eb6cd894d..116ea1a920 100644 --- a/include/configs/imx7_spl.h +++ b/include/configs/imx7_spl.h @@ -38,7 +38,7 @@ #endif /* Define the payload for FAT/EXT support */ -#if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT) +#if defined(CONFIG_SPL_FS_FAT) || defined(CONFIG_SPL_EXT_SUPPORT) # ifdef CONFIG_OF_CONTROL # define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img" # else diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index 3b32dd2474..be6750a00a 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -266,7 +266,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void); /* SPL SDMMC boot support */ #ifdef CONFIG_SPL_MMC_SUPPORT -#if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT) +#if defined(CONFIG_SPL_FS_FAT) || defined(CONFIG_SPL_EXT_SUPPORT) #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img" #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 #endif diff --git a/include/part.h b/include/part.h index 0750aee907..388e130133 100644 --- a/include/part.h +++ b/include/part.h @@ -246,7 +246,7 @@ static inline int blk_get_device_part_str(const char *ifname, */ #ifdef CONFIG_SPL_BUILD # define part_print_ptr(x) NULL -# if defined(CONFIG_SPL_EXT_SUPPORT) || defined(CONFIG_SPL_FAT_SUPPORT) || \ +# if defined(CONFIG_SPL_EXT_SUPPORT) || defined(CONFIG_SPL_FS_FAT) || \ defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION) # define part_get_info_ptr(x) x # else -- cgit From f4b409247429affe078a2c42d4c21d90ed2855e4 Mon Sep 17 00:00:00 2001 From: Tien Fong Chee Date: Wed, 23 Jan 2019 14:20:05 +0800 Subject: spl: Kconfig: Replace CONFIG_SPL_EXT_SUPPORT to CONFIG_SPL_FS_EXT4 Replace CONFIG_SPL_EXT_SUPPORT to CONFIG_SPLY_FS_EXT4 so both obj-$(CONFIG_$(SPL_)FS_EXT4) and CONFIG_IS_ENABLED(FS_EXT4) can be used to control the build in both SPL and U-Boot. Signed-off-by: Tien Fong Chee Reviewed-by: Tom Rini --- include/configs/imx6_spl.h | 2 +- include/configs/imx7_spl.h | 2 +- include/configs/socfpga_common.h | 2 +- include/part.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/configs/imx6_spl.h b/include/configs/imx6_spl.h index 60a925dd06..3d9a7dc902 100644 --- a/include/configs/imx6_spl.h +++ b/include/configs/imx6_spl.h @@ -43,7 +43,7 @@ #endif /* Define the payload for FAT/EXT support */ -#if defined(CONFIG_SPL_FS_FAT) || defined(CONFIG_SPL_EXT_SUPPORT) +#if defined(CONFIG_SPL_FS_FAT) || defined(CONFIG_SPL_FS_EXT4) # ifdef CONFIG_OF_CONTROL # define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img" # else diff --git a/include/configs/imx7_spl.h b/include/configs/imx7_spl.h index 116ea1a920..aca32dbabd 100644 --- a/include/configs/imx7_spl.h +++ b/include/configs/imx7_spl.h @@ -38,7 +38,7 @@ #endif /* Define the payload for FAT/EXT support */ -#if defined(CONFIG_SPL_FS_FAT) || defined(CONFIG_SPL_EXT_SUPPORT) +#if defined(CONFIG_SPL_FS_FAT) || defined(CONFIG_SPL_FS_EXT4) # ifdef CONFIG_OF_CONTROL # define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img" # else diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index be6750a00a..ea992fa81b 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -266,7 +266,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void); /* SPL SDMMC boot support */ #ifdef CONFIG_SPL_MMC_SUPPORT -#if defined(CONFIG_SPL_FS_FAT) || defined(CONFIG_SPL_EXT_SUPPORT) +#if defined(CONFIG_SPL_FS_FAT) || defined(CONFIG_SPL_FS_EXT4) #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img" #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 #endif diff --git a/include/part.h b/include/part.h index 388e130133..ebca546db5 100644 --- a/include/part.h +++ b/include/part.h @@ -246,7 +246,7 @@ static inline int blk_get_device_part_str(const char *ifname, */ #ifdef CONFIG_SPL_BUILD # define part_print_ptr(x) NULL -# if defined(CONFIG_SPL_EXT_SUPPORT) || defined(CONFIG_SPL_FS_FAT) || \ +# if defined(CONFIG_SPL_FS_EXT4) || defined(CONFIG_SPL_FS_FAT) || \ defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION) # define part_get_info_ptr(x) x # else -- cgit From 9cc2323feebdde500f50f7abb855045dbde765cb Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Sat, 26 Jan 2019 22:13:04 +0100 Subject: lmb: handle more than one DRAM BANK This fixes the automatic lmb initialization and reservation for boards with more than one DRAM bank. This fixes the CVE-2018-18439 and -18440 fixes that only allowed to load files into the firs DRAM bank from fs and via tftp. Found-by: Heinrich Schuchardt Signed-off-by: Simon Goldschmidt Tested-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- include/lmb.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/lmb.h b/include/lmb.h index e87c0b0ada..3b338dfee0 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -4,6 +4,8 @@ #ifdef __KERNEL__ #include +#include + /* * Logical memory blocks. * @@ -29,8 +31,9 @@ struct lmb { }; extern void lmb_init(struct lmb *lmb); -extern void lmb_init_and_reserve(struct lmb *lmb, phys_addr_t base, - phys_size_t size, void *fdt_blob); +extern void lmb_init_and_reserve(struct lmb *lmb, bd_t *bd, void *fdt_blob); +extern void lmb_init_and_reserve_range(struct lmb *lmb, phys_addr_t base, + phys_size_t size, void *fdt_blob); extern long lmb_add(struct lmb *lmb, phys_addr_t base, phys_size_t size); extern long lmb_reserve(struct lmb *lmb, phys_addr_t base, phys_size_t size); extern phys_addr_t lmb_alloc(struct lmb *lmb, phys_size_t size, ulong align); -- cgit From dc146ca111873b1eabb9d0249ce0c1ec44e82a26 Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Fri, 18 Jan 2019 12:52:49 +0530 Subject: Kconfig: Migrate CONFIG_BUILD_TARGET Migrate CONFIG_BUILD_TARGET into Kconfig. Signed-off-by: Jagan Teki --- include/configs/SBx81LIFKW.h | 1 - include/configs/SBx81LIFXCAT.h | 1 - include/configs/ib62x0.h | 3 --- include/configs/mv-plug-common.h | 3 --- include/configs/nsa310s.h | 3 --- include/configs/rcar-gen3-common.h | 1 - include/configs/socfpga_common.h | 3 --- include/configs/sunxi-common.h | 1 - 8 files changed, 16 deletions(-) (limited to 'include') diff --git a/include/configs/SBx81LIFKW.h b/include/configs/SBx81LIFKW.h index 07b65f89f9..d62fd35e81 100644 --- a/include/configs/SBx81LIFKW.h +++ b/include/configs/SBx81LIFKW.h @@ -13,7 +13,6 @@ #define CONFIG_KW88F6281 1 /* SOC Name */ #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage.cfg -#define CONFIG_BUILD_TARGET "u-boot.kwb" /* additions for new ARM relocation support */ #define CONFIG_SYS_SDRAM_BASE 0x00000000 diff --git a/include/configs/SBx81LIFXCAT.h b/include/configs/SBx81LIFXCAT.h index d73752c7f9..3c8c216d89 100644 --- a/include/configs/SBx81LIFXCAT.h +++ b/include/configs/SBx81LIFXCAT.h @@ -13,7 +13,6 @@ #define CONFIG_KW88F6281 1 /* SOC Name */ #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage.cfg -#define CONFIG_BUILD_TARGET "u-boot.kwb" /* additions for new ARM relocation support */ #define CONFIG_SYS_SDRAM_BASE 0x00000000 diff --git a/include/configs/ib62x0.h b/include/configs/ib62x0.h index f8d3c3b63f..5e54441c73 100644 --- a/include/configs/ib62x0.h +++ b/include/configs/ib62x0.h @@ -15,9 +15,6 @@ #define CONFIG_KW88F6281 /* SOC Name */ #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ -/* Add target to build it automatically upon "make" */ -#define CONFIG_BUILD_TARGET "u-boot.kwb" - /* * Compression configuration */ diff --git a/include/configs/mv-plug-common.h b/include/configs/mv-plug-common.h index f424e2cc6c..486650f183 100644 --- a/include/configs/mv-plug-common.h +++ b/include/configs/mv-plug-common.h @@ -13,9 +13,6 @@ #define CONFIG_KW88F6281 1 /* SOC Name */ #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ -/* Add target to build it automatically upon "make" */ -#define CONFIG_BUILD_TARGET "u-boot.kwb" - /* * mv-common.h should be defined after CMD configs since it used them * to enable certain macros diff --git a/include/configs/nsa310s.h b/include/configs/nsa310s.h index 1ca9a01754..eb465e0690 100644 --- a/include/configs/nsa310s.h +++ b/include/configs/nsa310s.h @@ -15,9 +15,6 @@ #define CONFIG_KW88F6702 1 /* SOC Name */ #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ -/* add target to build it automatically upon "make" */ -#define CONFIG_BUILD_TARGET "u-boot.kwb" - /* compression configuration */ #define CONFIG_BZIP2 diff --git a/include/configs/rcar-gen3-common.h b/include/configs/rcar-gen3-common.h index 6c2fa6a63c..06d5d3219c 100644 --- a/include/configs/rcar-gen3-common.h +++ b/include/configs/rcar-gen3-common.h @@ -12,7 +12,6 @@ #include #define CONFIG_REMAKE_ELF -#define CONFIG_BUILD_TARGET "u-boot-elf.srec" /* boot option */ diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index ea992fa81b..c9cbf8f5e3 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -14,9 +14,6 @@ #define CONFIG_TIMESTAMP /* Print image info with timestamp */ -/* add target to build it automatically upon "make" */ -#define CONFIG_BUILD_TARGET "u-boot-with-spl.sfp" - /* * Memory configurations */ diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index ed0cfc24f5..b01d1c3c84 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -32,7 +32,6 @@ #endif #ifdef CONFIG_ARM64 -#define CONFIG_BUILD_TARGET "u-boot.itb" #define CONFIG_SYS_BOOTM_LEN (32 << 20) #endif -- cgit