From f722ba16048ac71b5eb7c8aad04355bf02259423 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 19 Apr 2024 13:37:45 +0200 Subject: event: typo arguemnts %s/arguemnts/arguments/ Signed-off-by: Heinrich Schuchardt --- include/event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/event.h b/include/event.h index a8f046d..fb353ad 100644 --- a/include/event.h +++ b/include/event.h @@ -316,7 +316,7 @@ static inline const char *event_spy_id(struct evspy_info *spy) __used ll_entry_declare(struct evspy_info, _type ## _3_ ## _func, \ evspy_info) = _ESPY_REC(_type, _func) -/* Simple spy with no function arguemnts */ +/* Simple spy with no function arguments */ #define EVENT_SPY_SIMPLE(_type, _func) \ __used ll_entry_declare(struct evspy_info_simple, \ _type ## _3_ ## _func, \ -- cgit v1.1 From d881da3b424c1b8c6e7fa1b832264800a5b03c4f Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 19 Apr 2024 13:37:46 +0200 Subject: tools: typo arguemnts %s/arguemnts/arguemnts/ Signed-off-by: Heinrich Schuchardt --- tools/buildman/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/buildman/test.py b/tools/buildman/test.py index bdd3d84..f92add7 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -195,7 +195,7 @@ class TestBuild(unittest.TestCase): Args: echo_lines: True to echo lines to the terminal to aid test development - kwdisplay_args: Dict of arguemnts to pass to + kwdisplay_args: Dict of arguments to pass to Builder.SetDisplayOptions() Returns: -- cgit v1.1 From 8024d577897d57d0b9ec2dd92449e06e7f74f0e0 Mon Sep 17 00:00:00 2001 From: Kishan Dudhatra Date: Mon, 22 Apr 2024 23:47:33 +0530 Subject: cmd: gpt: initialize partition table Change in v2: - Fix applies to all block devices, not just MMC. If partition init is not completed within the gpt write, the gpt partition list will not be updated. Signed-off-by: Kishan Dudhatra --- cmd/gpt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/gpt.c b/cmd/gpt.c index d7e9652..7aaf188 100644 --- a/cmd/gpt.c +++ b/cmd/gpt.c @@ -643,6 +643,10 @@ static int gpt_default(struct blk_desc *blk_dev_desc, const char *str_part) free(str_disk_guid); free(partitions); + /* initialize partition table */ + if (blk_enabled()) + part_init(blk_dev_desc); + return ret; } -- cgit v1.1 From 914b766a2a6b0f746b2e6fe3bf3d70881e6da610 Mon Sep 17 00:00:00 2001 From: Jim Liu Date: Tue, 23 Apr 2024 14:38:42 +0800 Subject: spi: npcm_pspi: Reset HW in driver probe Reset HW to clear old status and use default data mode(8-bit). Signed-off-by: Jim Liu --- drivers/spi/npcm_pspi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/spi/npcm_pspi.c b/drivers/spi/npcm_pspi.c index eb14185..c944130 100644 --- a/drivers/spi/npcm_pspi.c +++ b/drivers/spi/npcm_pspi.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -194,6 +195,7 @@ static int npcm_pspi_probe(struct udevice *bus) { struct npcm_pspi_priv *priv = dev_get_priv(bus); int node = dev_of_offset(bus); + struct reset_ctl reset; int ret; ret = clk_get_by_index(bus, 0, &priv->clk); @@ -205,6 +207,14 @@ static int npcm_pspi_probe(struct udevice *bus) gpio_request_by_name_nodev(offset_to_ofnode(node), "cs-gpios", 0, &priv->cs_gpio, GPIOD_IS_OUT| GPIOD_ACTIVE_LOW); + /* Reset HW */ + ret = reset_get_by_index(bus, 0, &reset); + if (!ret) { + reset_assert(&reset); + udelay(5); + reset_deassert(&reset); + } + return 0; } -- cgit v1.1 From e69b187486e3b8124af966d2f20c55c8605ea1ae Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 23 Apr 2024 09:09:44 +0200 Subject: net: consider option-length when parsing NIS domain When parsing option 40 (network information service domain) the option length is in variable 'oplen' and not in 'size'. Addresses-Coverity-ID: 492765 Uninitialized variables (UNINIT) Fixes: 8ab388bfdbcf ("net: add support to parse the NIS domain for the dhcp options") Signed-off-by: Heinrich Schuchardt --- net/bootp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bootp.c b/net/bootp.c index c15472f..86c5680 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -886,7 +886,7 @@ static void dhcp_process_options(uchar *popt, uchar *end) case 40: /* NIS Domain name */ if (net_nis_domain[0] == 0) { size = truncate_sz("NIS Domain Name", - sizeof(net_nis_domain), size); + sizeof(net_nis_domain), oplen); memcpy(&net_nis_domain, popt + 2, size); net_nis_domain[size] = 0; } -- cgit v1.1 From ceec9c9d291bf76ccc9338ded89e1b5156313db1 Mon Sep 17 00:00:00 2001 From: Jim Liu Date: Tue, 23 Apr 2024 15:22:08 +0800 Subject: Arm: npcm: fix npcm7xx boot to kernel error Add mem and console env information and modify the wrong earlycon env. Signed-off-by: Jim Liu --- board/nuvoton/poleg_evb/poleg_evb.c | 27 ++++++++++++++++++++------- include/configs/poleg.h | 4 ++-- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/board/nuvoton/poleg_evb/poleg_evb.c b/board/nuvoton/poleg_evb/poleg_evb.c index 7421911..e69bca9 100644 --- a/board/nuvoton/poleg_evb/poleg_evb.c +++ b/board/nuvoton/poleg_evb/poleg_evb.c @@ -21,7 +21,6 @@ int board_init(void) int dram_init(void) { - char value[32]; struct npcm_gcr *gcr = (struct npcm_gcr *)NPCM_GCR_BA; int ramsize = (readl(&gcr->intcr3) >> 8) & 0x7; @@ -47,17 +46,31 @@ int dram_init(void) break; } - if (gd->ram_size > 0) { - sprintf(value, "%ldM", (gd->ram_size / 0x100000)); - env_set("mem", value); - } - return 0; } int last_stage_init(void) { - board_set_console(); + + char value[32]; + struct udevice *dev = gd->cur_serial_dev; + + if (gd->ram_size > 0) { + sprintf(value, "%ldM", (gd->ram_size / 0x100000)); + env_set("mem", value); + } + + if (dev && (dev->seq_ >= 0)) { + void *addr; + addr = dev_read_addr_ptr(dev); + if (addr) { + sprintf(value, "uart8250,mmio32,0x%x", (u32)addr); + env_set("earlycon", value); + } + sprintf(value, "ttyS%d,115200n8", dev->seq_); + env_set("console", value); + board_set_console(); + } return 0; } diff --git a/include/configs/poleg.h b/include/configs/poleg.h index 2a2d85c..14ead16 100644 --- a/include/configs/poleg.h +++ b/include/configs/poleg.h @@ -30,9 +30,9 @@ "eth2addr=00:00:F7:A0:00:FE\0" \ "eth3addr=00:00:F7:A0:00:FF\0" \ "console=ttyS0,115200n8\0" \ - "earlycon=uart8250,mmio32,0xf0000000\0" \ + "earlycon=uart8250,mmio32,0xf0001000\0" \ "common_bootargs=setenv bootargs earlycon=${earlycon} root=/dev/ram " \ - "console=${console} mem=${mem} ramdisk_size=48000 basemac=${ethaddr}\0" \ + "console=${console} mem=${mem} ramdisk_size=48000 basemac=${ethaddr} oops=panic panic=20\0" \ "sd_prog=fatload mmc 0 10000000 image-bmc; cp.b 10000000 80000000 ${filesize}\0" \ "sd_run=fatload mmc 0 10000000 image-bmc; bootm 10200000\0" \ "\0" -- cgit v1.1 From e7c3948ec51d6dd2d31525c8207b5e8ccceb496a Mon Sep 17 00:00:00 2001 From: Jim Liu Date: Tue, 23 Apr 2024 15:22:09 +0800 Subject: configs: arbel: increase u-boot mapping size When u-boot enable CONFIG_SYS_BOOT_RAMDISK_HIGH, rootfs image relocated from FIU address space to memory address before jump to kernel. Since Arbel reserved memory from 0x00000000 to 0x06200000 for tip image, and rootfs image may too large that cannot found a suitable location before 128MB(0x8000000), so increase mapping size from 128MB to 192MB. Signed-off-by: Jim Liu --- include/configs/arbel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/configs/arbel.h b/include/configs/arbel.h index 576ee37..d8ccc45 100644 --- a/include/configs/arbel.h +++ b/include/configs/arbel.h @@ -7,7 +7,7 @@ #define __CONFIG_ARBEL_H #define CFG_SYS_SDRAM_BASE 0x0 -#define CFG_SYS_BOOTMAPSZ (128 << 20) +#define CFG_SYS_BOOTMAPSZ (192 << 20) #define CFG_SYS_BOOTM_LEN (20 << 20) #define CFG_SYS_INIT_RAM_ADDR CFG_SYS_SDRAM_BASE #define CFG_SYS_INIT_RAM_SIZE 0x8000 -- cgit v1.1 From b3c0b94f2e3872959ba29c450059221bb3697588 Mon Sep 17 00:00:00 2001 From: Jim Liu Date: Tue, 23 Apr 2024 15:22:10 +0800 Subject: board: arbel: Limit the dram effective size to bank0 maximal size For 4GB dram size, the dram is divided into 2 banks and the address space of these 2 banks are not concatenated. Limit the gd->ram_top to not exceed bank0 top to prevent accessing invalid memory region. Signed-off-by: Jim Liu --- board/nuvoton/arbel_evb/arbel_evb.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/board/nuvoton/arbel_evb/arbel_evb.c b/board/nuvoton/arbel_evb/arbel_evb.c index 8fc56c1..53c931c 100644 --- a/board/nuvoton/arbel_evb/arbel_evb.c +++ b/board/nuvoton/arbel_evb/arbel_evb.c @@ -27,6 +27,15 @@ int board_init(void) return 0; } +phys_size_t get_effective_memsize(void) +{ + /* Use bank0 only */ + if (gd->ram_size > DRAM_2GB_SIZE) + return DRAM_2GB_SIZE; + + return gd->ram_size; +} + int dram_init(void) { struct npcm_gcr *gcr = (struct npcm_gcr *)NPCM_GCR_BA; @@ -70,21 +79,16 @@ int dram_init_banksize(void) gd->bd->bi_dram[1].start = DRAM_4GB_SIZE; gd->bd->bi_dram[1].size = DRAM_2GB_SIZE - (DRAM_4GB_SIZE - DRAM_4GB_ECC_SIZE); - /* use bank0 only */ - gd->ram_size = DRAM_2GB_SIZE; break; case DRAM_4GB_SIZE: gd->bd->bi_dram[0].size = DRAM_2GB_SIZE; gd->bd->bi_dram[1].start = DRAM_4GB_SIZE; gd->bd->bi_dram[1].size = DRAM_2GB_SIZE; - /* use bank0 only */ - gd->ram_size = DRAM_2GB_SIZE; break; default: gd->bd->bi_dram[0].size = DRAM_1GB_SIZE; gd->bd->bi_dram[1].start = 0; gd->bd->bi_dram[1].size = 0; - gd->ram_size = DRAM_1GB_SIZE; break; } -- cgit v1.1 From 38d88f1db3b13c4a7cc9662e2078b5fe33866a89 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Fri, 26 Apr 2024 00:54:08 +0200 Subject: binman: Fix typo in mkimage etype description Fix a typo, no functional change. Signed-off-by: Marek Vasut Reviewed-by: Quentin Schulz --- tools/binman/btool/mkimage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/binman/btool/mkimage.py b/tools/binman/btool/mkimage.py index d5b407c..39a4c8c 100644 --- a/tools/binman/btool/mkimage.py +++ b/tools/binman/btool/mkimage.py @@ -11,7 +11,7 @@ class Bintoolmkimage(bintool.Bintool): """Image generation for U-Boot This bintool supports running `mkimage` with some basic parameters as - neeed by binman. + needed by binman. Normally binman uses the mkimage built by U-Boot. But when run outside the U-Boot build system, binman can use the version installed in your system. -- cgit v1.1 From 8c1019bec85a8d06883638548d34b39aba116630 Mon Sep 17 00:00:00 2001 From: Judith Mendez Date: Mon, 29 Apr 2024 16:49:36 -0500 Subject: configs: am62x_evm_r5: Increase size of malloc_simple heap after relocation On AM62x SK we can see a boot failure with signature "alloc space exhausted", so fix by increasing size of SPL_STACK_R_MALLOC_SIMPLE_LEN. Fixes: 128f81290b ("arm: dts: k3: binman: am625: add support for signing TIFSSTUB Images") Signed-off-by: Judith Mendez Tested-by: Alexander Sverdlin Reviewed-by: Bryan Brattlof --- configs/am62x_evm_r5_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/am62x_evm_r5_defconfig b/configs/am62x_evm_r5_defconfig index 4b2e57b..6482414 100644 --- a/configs/am62x_evm_r5_defconfig +++ b/configs/am62x_evm_r5_defconfig @@ -26,6 +26,7 @@ CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x43c3b000 CONFIG_SPL_BSS_MAX_SIZE=0x3000 CONFIG_SPL_STACK_R=y +CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x200000 CONFIG_SPL_SIZE_LIMIT=0x3A7F0 CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x3500 CONFIG_SPL_FS_FAT=y -- cgit v1.1 From 3c15780f2d2689b7e892f203393d89d7aef8ac38 Mon Sep 17 00:00:00 2001 From: William Zhang Date: Thu, 2 May 2024 22:23:43 -0700 Subject: MAINTAINERS: update Broadcom BCMBCA maintainer Joel is no longer with Broadcom. Remove his email from bcmbca maintainer list and replace him with myself for stack protection maintainer. Signed-off-by: William Zhang --- MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 921ce05..7a3b4d3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -224,7 +224,6 @@ ARM BROADCOM BCMBCA M: Anand Gore M: William Zhang M: Kursad Oney -M: Joel Peshkin M: Philippe Reynes S: Maintained F: arch/arm/mach-bcmbca/ @@ -1568,7 +1567,7 @@ F: cmd/sqfs.c F: test/py/tests/test_fs/test_squashfs/ STACKPROTECTOR -M: Joel Peshkin +M: William Zhang S: Maintained F: common/stackprot.c F: cmd/stackprot_test.c -- cgit v1.1