From 5f2d5915f8ea4785bc2b8a26955e176a7898c15b Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 12 Apr 2022 21:00:43 +0100 Subject: image-fdt: save name of FIT configuration in '/chosen' node It can be useful for the OS (Linux) to know which configuration has been chosen by U-Boot when launching a FIT image. Store the name of the FIT configuration node used in a new string property called 'u-boot,bootconf' in the '/chosen' node in device tree. Signed-off-by: Daniel Golle Reviewed-by: Tom Rini --- boot/image-fdt.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/boot/image-fdt.c b/boot/image-fdt.c index 692a9ad3e42..fdb69926a26 100644 --- a/boot/image-fdt.c +++ b/boot/image-fdt.c @@ -601,6 +601,12 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, goto err; } + /* Store name of configuration node as u-boot,bootconf in /chosen node */ + if (images->fit_uname_cfg) + fdt_find_and_setprop(blob, "/chosen", "u-boot,bootconf", + images->fit_uname_cfg, + strlen(images->fit_uname_cfg) + 1, 1); + /* Update ethernet nodes */ fdt_fixup_ethernet(blob); #if CONFIG_IS_ENABLED(CMD_PSTORE) -- cgit v1.2.3 From fcbdd7a070687d68e589cdaa752e2043d45ef9db Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 14 Apr 2022 15:50:46 +0200 Subject: .mailmap: Start to use new amd.com email address Xilinx has been acquired by AMD that's why emails should be also updated. The patch is updating .mailmap file and also MAINTAINERS files as was done by commit 5cd1ecb99490 ("ppc: qemu: Update MAINTAINERS for correct email address"). The rest of my emails are not going to change. Signed-off-by: Michal Simek Signed-off-by: Michal Simek --- .mailmap | 1 + MAINTAINERS | 8 ++++---- board/xilinx/versal/MAINTAINERS | 2 +- board/xilinx/zynqmp/MAINTAINERS | 2 +- board/xilinx/zynqmp_r5/MAINTAINERS | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.mailmap b/.mailmap index 1f88ea953ce..3910e056f0d 100644 --- a/.mailmap +++ b/.mailmap @@ -43,6 +43,7 @@ Marek Vasut Markus Klotzbuecher Masahiro Yamada Masahiro Yamada +Michal Simek Michal Simek Michal Simek Michal Simek diff --git a/MAINTAINERS b/MAINTAINERS index 34446127d4c..f7665fccf7a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -594,7 +594,7 @@ F: configs/uniphier_*_defconfig N: uniphier ARM VERSAL -M: Michal Simek +M: Michal Simek S: Maintained T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git F: arch/arm/mach-versal/ @@ -639,7 +639,7 @@ F: tools/zynqimage.c N: zynq ARM ZYNQMP -M: Michal Simek +M: Michal Simek S: Maintained T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git F: arch/arm/mach-zynqmp/ @@ -676,7 +676,7 @@ N: ultra96 N: zynqmp ARM ZYNQMP R5 -M: Michal Simek +M: Michal Simek S: Maintained T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git F: arch/arm/mach-zynqmp-r5/ @@ -852,7 +852,7 @@ F: net/fastboot.c F: test/dm/fastboot.c FPGA -M: Michal Simek +M: Michal Simek S: Maintained T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git F: drivers/fpga/ diff --git a/board/xilinx/versal/MAINTAINERS b/board/xilinx/versal/MAINTAINERS index bbab0513666..a13b6566164 100644 --- a/board/xilinx/versal/MAINTAINERS +++ b/board/xilinx/versal/MAINTAINERS @@ -1,5 +1,5 @@ XILINX_VERSAL BOARDS -M: Michal Simek +M: Michal Simek S: Maintained T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git F: arch/arm/dts/versal* diff --git a/board/xilinx/zynqmp/MAINTAINERS b/board/xilinx/zynqmp/MAINTAINERS index 56c637943f6..17a2766413c 100644 --- a/board/xilinx/zynqmp/MAINTAINERS +++ b/board/xilinx/zynqmp/MAINTAINERS @@ -1,5 +1,5 @@ XILINX_ZYNQMP BOARDS -M: Michal Simek +M: Michal Simek S: Maintained T: git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git F: arch/arm/dts/zynqmp-* diff --git a/board/xilinx/zynqmp_r5/MAINTAINERS b/board/xilinx/zynqmp_r5/MAINTAINERS index ac267649781..aa50e6dae5f 100644 --- a/board/xilinx/zynqmp_r5/MAINTAINERS +++ b/board/xilinx/zynqmp_r5/MAINTAINERS @@ -1,5 +1,5 @@ XILINX_ZYNQMP_R5 BOARDS -M: Michal Simek +M: Michal Simek S: Maintained F: arch/arm/dts/zynqmp-r5* F: board/xilinx/zynqmp_r5/ -- cgit v1.2.3 From 0b93b7fed6df12ea89b65ef138e724e402587c32 Mon Sep 17 00:00:00 2001 From: Ilias Apalodimas Date: Wed, 13 Apr 2022 00:16:44 +0300 Subject: configs: Enable EXT4 and ISO partitions for the DeveloperBox Since this box is SystemReady compliant enable ISO_PARTITION which is needed to start some installers (e.g Fedora). While at it enable EXT4 as well which is a common filesystem for targets Signed-off-by: Ilias Apalodimas Acked-by: Masami Hiramatsu --- configs/synquacer_developerbox_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/synquacer_developerbox_defconfig b/configs/synquacer_developerbox_defconfig index 6deb6f38933..1078ad60d94 100644 --- a/configs/synquacer_developerbox_defconfig +++ b/configs/synquacer_developerbox_defconfig @@ -37,6 +37,7 @@ CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_CMD_MTDPARTS=y CONFIG_CMD_LOG=y +CONFIG_ISO_PARTITION=y CONFIG_PARTITION_TYPE_GUID=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y @@ -85,6 +86,7 @@ CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_PCI=y CONFIG_USB_STORAGE=y +CONFIG_FS_EXT4=y CONFIG_EFI_SET_TIME=y CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y CONFIG_EFI_CAPSULE_ON_DISK=y -- cgit v1.2.3 From fe2f284270718c6cfbe7f87e7e1f378c2b172bf5 Mon Sep 17 00:00:00 2001 From: Billy Tsai Date: Wed, 13 Apr 2022 13:34:51 +0800 Subject: gpio: aspeed: Fix incorrect offset of read back register. The offset of the current read back register is the value of the gpio pin, not the value written for the gpio output. This patch fix it to avoid the other gpio output value controlled by the same register being set incorrectly. Fixes: 7ad889b0f37a ("gpio: Add Aspeed GPIO driver") Signed-off-by: Billy Tsai --- drivers/gpio/gpio-aspeed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c index a8a2afcb5c8..2c5415c671d 100644 --- a/drivers/gpio/gpio-aspeed.c +++ b/drivers/gpio/gpio-aspeed.c @@ -211,7 +211,7 @@ static int aspeed_gpio_direction_output(struct udevice *dev, unsigned int offset struct aspeed_gpio_priv *priv = dev_get_priv(dev); const struct aspeed_gpio_bank *bank = to_bank(offset); u32 dir = readl(bank_reg(priv, bank, reg_dir)); - u32 output = readl(bank_reg(priv, bank, reg_val)); + u32 output = readl(bank_reg(priv, bank, reg_rdata)); dir |= GPIO_BIT(offset); writel(dir, bank_reg(priv, bank, reg_dir)); @@ -239,7 +239,7 @@ aspeed_gpio_set_value(struct udevice *dev, unsigned int offset, int value) { struct aspeed_gpio_priv *priv = dev_get_priv(dev); const struct aspeed_gpio_bank *bank = to_bank(offset); - u32 data = readl(bank_reg(priv, bank, reg_val)); + u32 data = readl(bank_reg(priv, bank, reg_rdata)); if (value) data |= GPIO_BIT(offset); -- cgit v1.2.3 From 7ffc66e7dbdd2c82b6b544574d39af6412a16b6e Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Mon, 11 Apr 2022 20:08:03 +0200 Subject: image-fit: don't check free() argument * free() checks if its argument is NULL. Remove duplicate checks. * Remove duplicate free(ovcopy). Signed-off-by: Heinrich Schuchardt --- boot/image-fit.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/boot/image-fit.c b/boot/image-fit.c index 6610035d0ad..f57d97f5522 100644 --- a/boot/image-fit.c +++ b/boot/image-fit.c @@ -1887,8 +1887,7 @@ int fit_conf_get_node(const void *fit, const char *conf_uname) conf_uname, fdt_strerror(noffset)); } - if (conf_uname_copy) - free(conf_uname_copy); + free(conf_uname_copy); return noffset; } @@ -2422,9 +2421,6 @@ int boot_get_fdt_fit(bootm_headers_t *images, ulong addr, } fdt_pack(base); len = fdt_totalsize(base); - - free(ovcopy); - ovcopy = NULL; } #else printf("config with overlays but CONFIG_OF_LIBFDT_OVERLAY not set\n"); @@ -2442,11 +2438,9 @@ out: *fit_uname_configp = fit_uname_config; #ifdef CONFIG_OF_LIBFDT_OVERLAY - if (ovcopy) - free(ovcopy); + free(ovcopy); #endif - if (fit_uname_config_copy) - free(fit_uname_config_copy); + free(fit_uname_config_copy); return fdt_noffset; } #endif -- cgit v1.2.3 From 9bd89bbd71b12030294210be7c54da4b7cc77f00 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Mon, 11 Apr 2022 22:54:44 +0200 Subject: fs/squashfs: simplify sqfs_read() * Don't check argument of free(). Free does this itself. * Reduce scope of data_buffer. Remove duplicate free(). * Avoid superfluous NULL assignment. Signed-off-by: Heinrich Schuchardt Reviewed-by: Miquel Raynal --- fs/squashfs/sqfs.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c index 5d9c52af80b..b07c41e9117 100644 --- a/fs/squashfs/sqfs.c +++ b/fs/squashfs/sqfs.c @@ -1310,7 +1310,7 @@ static int sqfs_get_lregfile_info(struct squashfs_lreg_inode *lreg, int sqfs_read(const char *filename, void *buf, loff_t offset, loff_t len, loff_t *actread) { - char *dir = NULL, *fragment_block, *datablock = NULL, *data_buffer = NULL; + char *dir = NULL, *fragment_block, *datablock = NULL; char *fragment = NULL, *file = NULL, *resolved, *data; u64 start, n_blks, table_size, data_offset, table_offset, sparse_size; int ret, j, i_number, datablk_count = 0; @@ -1440,6 +1440,8 @@ int sqfs_read(const char *filename, void *buf, loff_t offset, loff_t len, } for (j = 0; j < datablk_count; j++) { + char *data_buffer; + start = data_offset / ctxt.cur_dev->blksz; table_size = SQFS_BLOCK_SIZE(finfo.blk_sizes[j]); table_offset = data_offset - (start * ctxt.cur_dev->blksz); @@ -1501,9 +1503,7 @@ int sqfs_read(const char *filename, void *buf, loff_t offset, loff_t len, } data_offset += table_size; - if (data_buffer) - free(data_buffer); - data_buffer = NULL; + free(data_buffer); if (*actread >= len) break; } @@ -1563,10 +1563,7 @@ int sqfs_read(const char *filename, void *buf, loff_t offset, loff_t len, out: free(fragment); - if (datablk_count) { - free(data_buffer); - free(datablock); - } + free(datablock); free(file); free(dir); free(finfo.blk_sizes); -- cgit v1.2.3 From bdf9831226788aaefab820e2feb054eb8f29fa1f Mon Sep 17 00:00:00 2001 From: Du Huanpeng Date: Thu, 7 Apr 2022 17:37:49 +0800 Subject: tools: add boot/ to .gitignore /tools/boot/ is a build product. Add it to .gitignore Signed-off-by: Du Huanpeng --- tools/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/.gitignore b/tools/.gitignore index a88453f64da..d3a93ff294a 100644 --- a/tools/.gitignore +++ b/tools/.gitignore @@ -36,3 +36,4 @@ /update_octeon_header /version.h /xway-swap-bytes +/boot -- cgit v1.2.3 From 24c904f309f820f8aef4d6364e7bf584d70c0cad Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 6 Apr 2022 10:33:32 -0400 Subject: Convert CONFIG_SYS_MEM_TOP_HIDE to Kconfig This converts the following to Kconfig: CONFIG_SYS_MEM_TOP_HIDE Signed-off-by: Tom Rini --- Kconfig | 11 +++++++++++ README | 21 --------------------- board/samsung/common/board.c | 4 ++-- common/board_f.c | 2 +- configs/odroid-xu3_defconfig | 1 + configs/odroid_defconfig | 1 + configs/origen_defconfig | 1 + configs/s5pc210_universal_defconfig | 1 + configs/theadorable_debug_defconfig | 1 + configs/trats2_defconfig | 1 + configs/trats_defconfig | 1 + include/configs/odroid.h | 3 --- include/configs/odroid_xu3.h | 3 --- include/configs/origen.h | 2 -- include/configs/s5pc210_universal.h | 2 -- include/configs/theadorable.h | 3 --- include/configs/trats.h | 2 -- include/configs/trats2.h | 2 -- 18 files changed, 21 insertions(+), 41 deletions(-) diff --git a/Kconfig b/Kconfig index b45e60a75b9..e269856f7ef 100644 --- a/Kconfig +++ b/Kconfig @@ -489,6 +489,17 @@ config STACK_SIZE by the UEFI sub-system. On some boards initrd_high is calculated as base stack pointer minus this stack size. +config SYS_MEM_TOP_HIDE + hex "Exclude some memory from U-Boot / OS information" + default 0x0 + help + If set, this specified memory area will get subtracted from the top + (end) of RAM and won't get "touched" at all by U-Boot. By fixing up + gd->ram_size the OS / next stage should gets passed the now + "corrected" memory size and won't touch it either. + WARNING: Please make sure that this value is a multiple of the OS + page size. + config SYS_HAS_SRAM bool default y if TARGET_PIC32MZDASK diff --git a/README b/README index d503357f3be..1967961eea0 100644 --- a/README +++ b/README @@ -1876,27 +1876,6 @@ Configuration Settings: the RAM base is not zero, or RAM is divided into banks, this variable needs to be recalcuated to get the address. -- CONFIG_SYS_MEM_TOP_HIDE: - If CONFIG_SYS_MEM_TOP_HIDE is defined in the board config header, - this specified memory area will get subtracted from the top - (end) of RAM and won't get "touched" at all by U-Boot. By - fixing up gd->ram_size the Linux kernel should gets passed - the now "corrected" memory size and won't touch it either. - This should work for arch/ppc and arch/powerpc. Only Linux - board ports in arch/powerpc with bootwrapper support that - recalculate the memory size from the SDRAM controller setup - will have to get fixed in Linux additionally. - - This option can be used as a workaround for the 440EPx/GRx - CHIP 11 errata where the last 256 bytes in SDRAM shouldn't - be touched. - - WARNING: Please make sure that this value is a multiple of - the Linux page size (normally 4k). If this is not the case, - then the end address of the Linux memory will be located at a - non page size aligned address and this could cause major - problems. - - CONFIG_SYS_LOADS_BAUD_CHANGE: Enable temporary baudrate change while serial download diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index 97791aaeffe..ff178b7fe67 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -107,9 +107,9 @@ int board_init(void) } boot_temp_check(); #endif -#ifdef CONFIG_TZSW_RESERVED_DRAM_SIZE +#if CONFIG_VAL(SYS_MEM_TOP_HIDE) /* The last few MB of memory can be reserved for secure firmware */ - ulong size = CONFIG_TZSW_RESERVED_DRAM_SIZE; + ulong size = CONFIG_SYS_MEM_TOP_HIDE; gd->ram_size -= size; gd->bd->bi_dram[CONFIG_NR_DRAM_BANKS - 1].size -= size; diff --git a/common/board_f.c b/common/board_f.c index 5b655ad6efe..4d7e40013e1 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -327,7 +327,7 @@ static int setup_dest_addr(void) * Ram is setup, size stored in gd !! */ debug("Ram size: %08lX\n", (ulong)gd->ram_size); -#if defined(CONFIG_SYS_MEM_TOP_HIDE) +#if CONFIG_VAL(SYS_MEM_TOP_HIDE) /* * Subtract specified amount of memory to hide so that it won't * get "touched" at all by U-Boot. By fixing up gd->ram_size diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig index d7f9c208bb0..250c0b4b3da 100644 --- a/configs/odroid-xu3_defconfig +++ b/configs/odroid-xu3_defconfig @@ -13,6 +13,7 @@ CONFIG_IDENT_STRING=" for ODROID-XU3/XU4/HC1/HC2" CONFIG_SYS_LOAD_ADDR=0x43e00000 CONFIG_DISTRO_DEFAULTS=y # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_SYS_MEM_TOP_HIDE=0x01600000 CONFIG_FIT=y CONFIG_FIT_BEST_MATCH=y CONFIG_SILENT_CONSOLE=y diff --git a/configs/odroid_defconfig b/configs/odroid_defconfig index 9f5688e039d..058e7dc3177 100644 --- a/configs/odroid_defconfig +++ b/configs/odroid_defconfig @@ -14,6 +14,7 @@ CONFIG_DEFAULT_DEVICE_TREE="exynos4412-odroid" CONFIG_SYS_LOAD_ADDR=0x43e00000 CONFIG_DISTRO_DEFAULTS=y # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_SYS_MEM_TOP_HIDE=0x00100000 CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_USE_BOOTARGS=y diff --git a/configs/origen_defconfig b/configs/origen_defconfig index 6ffec862cd9..b4b0d8b1464 100644 --- a/configs/origen_defconfig +++ b/configs/origen_defconfig @@ -16,6 +16,7 @@ CONFIG_SPL=y CONFIG_IDENT_STRING=" for ORIGEN" CONFIG_SYS_LOAD_ADDR=0x43e00000 CONFIG_DISTRO_DEFAULTS=y +CONFIG_SYS_MEM_TOP_HIDE=0x100000 CONFIG_BOOTCOMMAND="if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadbootscript; then run bootscript; fi; fi;load mmc ${mmcdev} ${loadaddr} uImage; bootm ${loadaddr} " CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_INFO_QUIET=y diff --git a/configs/s5pc210_universal_defconfig b/configs/s5pc210_universal_defconfig index 8a34908e85c..e70ce25b099 100644 --- a/configs/s5pc210_universal_defconfig +++ b/configs/s5pc210_universal_defconfig @@ -13,6 +13,7 @@ CONFIG_ENV_OFFSET=0x7000 CONFIG_DEFAULT_DEVICE_TREE="exynos4210-universal_c210" CONFIG_SYS_LOAD_ADDR=0x44800000 CONFIG_DISTRO_DEFAULTS=y +CONFIG_SYS_MEM_TOP_HIDE=0x100000 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="Please use defined boot" CONFIG_BOOTCOMMAND="run mmcboot" diff --git a/configs/theadorable_debug_defconfig b/configs/theadorable_debug_defconfig index 64ae29113e3..230c086617a 100644 --- a/configs/theadorable_debug_defconfig +++ b/configs/theadorable_debug_defconfig @@ -20,6 +20,7 @@ CONFIG_DEBUG_UART_CLOCK=250000000 CONFIG_SYS_LOAD_ADDR=0x800000 CONFIG_DEBUG_UART=y # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_SYS_MEM_TOP_HIDE=0x80000 CONFIG_FIT=y CONFIG_BOOTDELAY=3 CONFIG_USE_PREBOOT=y diff --git a/configs/trats2_defconfig b/configs/trats2_defconfig index b38ee99371b..690cdef4c4a 100644 --- a/configs/trats2_defconfig +++ b/configs/trats2_defconfig @@ -13,6 +13,7 @@ CONFIG_DEFAULT_DEVICE_TREE="exynos4412-trats2" CONFIG_SYS_LOAD_ADDR=0x43e00000 CONFIG_DISTRO_DEFAULTS=y # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_SYS_MEM_TOP_HIDE=0x100000 CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_USE_BOOTARGS=y diff --git a/configs/trats_defconfig b/configs/trats_defconfig index d0689444f98..18890799535 100644 --- a/configs/trats_defconfig +++ b/configs/trats_defconfig @@ -12,6 +12,7 @@ CONFIG_ENV_OFFSET=0x7000 CONFIG_DEFAULT_DEVICE_TREE="exynos4210-trats" CONFIG_SYS_LOAD_ADDR=0x44800000 CONFIG_DISTRO_DEFAULTS=y +CONFIG_SYS_MEM_TOP_HIDE=0x100000 CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_USE_BOOTARGS=y diff --git a/include/configs/odroid.h b/include/configs/odroid.h index 42031bb9934..b8b47af4712 100644 --- a/include/configs/odroid.h +++ b/include/configs/odroid.h @@ -21,9 +21,6 @@ #define CONFIG_SYS_SDRAM_BASE 0x40000000 #define SDRAM_BANK_SIZE (256 << 20) /* 256 MB */ #define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE -/* Reserve the last 1 MiB for the secure firmware */ -#define CONFIG_SYS_MEM_TOP_HIDE (1UL << 20UL) -#define CONFIG_TZSW_RESERVED_DRAM_SIZE CONFIG_SYS_MEM_TOP_HIDE #include diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index 616f25eafd3..eb35d7b4ae2 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -15,9 +15,6 @@ #define TZPC_BASE_OFFSET 0x10000 #define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */ -/* Reserve the last 22 MiB for the secure firmware */ -#define CONFIG_SYS_MEM_TOP_HIDE (22UL << 20UL) -#define CONFIG_TZSW_RESERVED_DRAM_SIZE CONFIG_SYS_MEM_TOP_HIDE #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000) diff --git a/include/configs/origen.h b/include/configs/origen.h index 278c204ded8..c4f5997c3de 100644 --- a/include/configs/origen.h +++ b/include/configs/origen.h @@ -19,8 +19,6 @@ #define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE #define SDRAM_BANK_SIZE (256 << 20) /* 256 MB */ -#define CONFIG_SYS_MEM_TOP_HIDE (1 << 20) /* ram console */ - /* Power Down Modes */ #define S5P_CHECK_SLEEP 0x00000BAD #define S5P_CHECK_DIDLE 0xBAD00000 diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h index 8cbdbc733c0..ae56c66e15c 100644 --- a/include/configs/s5pc210_universal.h +++ b/include/configs/s5pc210_universal.h @@ -24,8 +24,6 @@ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \ - GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_MEM_TOP_HIDE (1 << 20) /* ram console */ - /* Actual modem binary size is 16MiB. Add 2MiB for bad block handling */ #define NORMAL_MTDPARTS_DEFAULT CONFIG_MTDPARTS_DEFAULT diff --git a/include/configs/theadorable.h b/include/configs/theadorable.h index 14817b165cf..fdf048b27b3 100644 --- a/include/configs/theadorable.h +++ b/include/configs/theadorable.h @@ -43,9 +43,6 @@ /* SATA support */ #define CONFIG_LBA48 -/* Enable LCD and reserve 512KB from top of memory*/ -#define CONFIG_SYS_MEM_TOP_HIDE 0x80000 - /* FPGA programming support */ #define CONFIG_FPGA_STRATIX_V diff --git a/include/configs/trats.h b/include/configs/trats.h index 41ac6090c27..910fc150b18 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -28,8 +28,6 @@ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \ - GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_MEM_TOP_HIDE (1 << 20) /* ram console */ - /* Tizen - partitions definitions */ #define PARTS_CSA "csa-mmc" #define PARTS_BOOT "boot" diff --git a/include/configs/trats2.h b/include/configs/trats2.h index a980e6c47d1..3e121bc6909 100644 --- a/include/configs/trats2.h +++ b/include/configs/trats2.h @@ -27,8 +27,6 @@ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \ - GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_MEM_TOP_HIDE (1 << 20) /* ram console */ - /* Tizen - partitions definitions */ #define PARTS_CSA "csa-mmc" #define PARTS_BOOT "boot" -- cgit v1.2.3 From 9dc775aabb73b1d587c7fcfca2ed7b0559576807 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Wed, 6 Apr 2022 14:36:35 -0400 Subject: IOMUX: Fix access past end of console_devices We should only access console_devices[file][i] once we have checked that i < cd_count[file]. Otherwise, we will access uninitialized memory at the end of the loop. console_devices[file][i] should not be NULL, but putting the assignment in the loop condition allows us to ensure that i is checked beforehand. This isn't a bug, but it does make valgrind stop complaining. Fixes: 400797cad3 ("IOMUX: Split out for_each_console_dev() helper macro") Signed-off-by: Sean Anderson Reviewed-by: Andrew Scull Acked-by: Andy Shevchenko --- include/iomux.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/iomux.h b/include/iomux.h index 37f5f6dee69..35caa697ebf 100644 --- a/include/iomux.h +++ b/include/iomux.h @@ -24,10 +24,10 @@ extern struct stdio_dev **console_devices[MAX_FILES]; */ extern int cd_count[MAX_FILES]; -#define for_each_console_dev(i, file, dev) \ - for (i = 0, dev = console_devices[file][i]; \ - i < cd_count[file]; \ - i++, dev = console_devices[file][i]) +#define for_each_console_dev(i, file, dev) \ + for (i = 0; \ + i < cd_count[file] && (dev = console_devices[file][i]); \ + i++) int iomux_match_device(struct stdio_dev **, const int, struct stdio_dev *); int iomux_doenv(const int, const char *); -- cgit v1.2.3 From c4bbbed3718330acfe50a599b4851cbec62b7b66 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Thu, 7 Apr 2022 14:51:03 +0200 Subject: btrfs: Fix compilation on big endian systems Fix following two compile errors on big endian systems: CC fs/btrfs/btrfs.o In file included from include/linux/byteorder/big_endian.h:107, from ./arch/powerpc/include/asm/byteorder.h:82, from ./arch/powerpc/include/asm/bitops.h:8, from include/linux/bitops.h:152, from include/uuid.h:9, from fs/btrfs/btrfs.c:10: fs/btrfs/conv-funcs.h: In function ‘btrfs_key_to_disk’: include/linux/byteorder/generic.h:90:21: error: ‘__cpu_to_le16’ undeclared (first use in this function); did you mean ‘__cpu_to_le16p’? #define cpu_to_le16 __cpu_to_le16 ^~~~~~~~~~~~~ fs/btrfs/conv-funcs.h:79:10: note: in expansion of macro ‘cpu_to_le16’ __u16: cpu_to_le16, \ ^~~~~~~~~~~ CC fs/btrfs/compression.o In file included from ./arch/powerpc/include/asm/unaligned.h:9, from fs/btrfs/compression.c:16: include/linux/unaligned/access_ok.h:6:19: error: redefinition of ‘get_unaligned_le16’ static inline u16 get_unaligned_le16(const void *p) ^~~~~~~~~~~~~~~~~~ In file included from fs/btrfs/ctree.h:16, from fs/btrfs/btrfs.h:12, from fs/btrfs/compression.c:8: include/linux/unaligned/le_byteshift.h:40:19: note: previous definition of ‘get_unaligned_le16’ was here static inline u16 get_unaligned_le16(const void *p) ^~~~~~~~~~~~~~~~~~ Include file asm/unaligned.h contains arch specific macros and functions for unaligned access as opposite to linux/unaligned le_byteshift.h which contains macros and functions specific to little endian systems only. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún Reviewed-by: Qu Wenruo --- fs/btrfs/btrfs.h | 2 +- fs/btrfs/ctree.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/btrfs.h b/fs/btrfs/btrfs.h index 7d8b395b264..a52587e0637 100644 --- a/fs/btrfs/btrfs.h +++ b/fs/btrfs/btrfs.h @@ -9,7 +9,7 @@ #define __BTRFS_BTRFS_H__ #include -#include "conv-funcs.h" +#include "ctree.h" extern struct btrfs_info btrfs_info; extern struct btrfs_fs_info *current_fs_info; diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 219c410b189..55112318a33 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include "kernel-shared/btrfs_tree.h" #include "crypto/hash.h" -- cgit v1.2.3 From b8a79164674230f401f696f7eb09315ad02199b5 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Thu, 7 Apr 2022 14:53:25 +0200 Subject: fs: Allow to compile FS_BTRFS when SPL is enabled Currently there is no btrfs support in SPL. But macro CONFIG_FS_BTRFS is defined also when building SPL. When both FS_BTRFS and SPL are enabled then build process throw compile error. Fix check for btrfs code in fstypes[] to allow compiling FS_BTRFS only in proper U-Boot. Signed-off-by: Pali Rohár --- fs/fs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/fs.c b/fs/fs.c index c67a1c7876a..97d47916f38 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -288,6 +288,7 @@ static struct fstype_info fstypes[] = { }, #endif #endif +#ifndef CONFIG_SPL_BUILD #ifdef CONFIG_FS_BTRFS { .fstype = FS_TYPE_BTRFS, @@ -307,6 +308,7 @@ static struct fstype_info fstypes[] = { .ln = fs_ln_unsupported, }, #endif +#endif #if IS_ENABLED(CONFIG_FS_SQUASHFS) { .fstype = FS_TYPE_SQUASHFS, -- cgit v1.2.3