Re: [PATCH 2/6] efi_loader: Add device path related functions for initrd via Boot####

2021-03-10 Thread Heinrich Schuchardt
On 3/5/21 11:22 PM, Ilias Apalodimas wrote: On the following patches we allow for an initrd path to be stored in Boot variables. Specifically we encode in the FIlePathList[] of the EFI_LOAD_OPTIONS for each Boot variable. The FilePathList[] array looks like this: kernel - 0xff - VenMedi

Re: [PATCH] fdt_support.c: Allow late kernel cmdline modification

2021-03-10 Thread Niko Mauno
On 2/25/21 6:09 PM, Niko Mauno wrote: On 2/24/21 3:51 PM, Tom Rini wrote: On Tue, Feb 23, 2021 at 08:33:36AM +0200, Niko Mauno wrote: On 2/22/21 10:21 PM, Tom Rini wrote: On Mon, Feb 22, 2021 at 07:18:51PM +, Niko Mauno wrote: By declaring board-specific board_fdt_chosen_bootargs() the k

Re: [PATCH 1/6] efi_selftest: Remove loadfile2 for initrd selftests

2021-03-10 Thread Heinrich Schuchardt
On 3/5/21 11:22 PM, Ilias Apalodimas wrote: We are redefining how u-boot locates the initrd to load via the kernel LoadFile2 protocol. This selftest is not relevant any more, so remove it. A new one will be added later Signed-off-by: Ilias Apalodimas We can use lib/efi_selftest/initrddump.c

[PATCH] pci: layerscape: Change to allocate zeroed memery for struct ls_pcie

2021-03-10 Thread Zhiqiang Hou
From: Hou Zhiqiang As on some incipient Layerscape platforms (LS1043A series) there isn't separate PF control register block, these registers reside in the LUT register block, so when the driver detected there isn't 'ctrl', it will assign the 'lut' address to the ls_pcie->ctrl. The current code

[PATCH v2 4/5] fastboot: Fix possible buffer overrun

2021-03-10 Thread Sean Anderson
This fixes several uses of strn(cpy|cat) which did not terminate their destinations properly. Fixes de1728ce4c ("fastboot: Allow u-boot-style partitions") Reported-by: Coverity Scan Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/fastboot/fb_mmc.c | 6 +++--- 1 file changed, 3 i

[PATCH v2 5/5] checkpatch: Add warnings for using strn(cat|cpy)

2021-03-10 Thread Sean Anderson
strn(cat|cpy) has a bad habit of not nul-terminating the destination, resulting in constructions like strncpy(foo, bar, sizeof(foo) - 1); foo[sizeof(foo) - 1] = '\0'; However, it is very easy to forget about this behavior and accidentally leave a string unterminated. This has show

[PATCH v2 3/5] test: Add test for strlcat

2021-03-10 Thread Sean Anderson
This test is adapted from glibc, which is very concerned about alignment. It also tests strlcpy by dependency. Signed-off-by: Sean Anderson --- Changes in v2: - New test/lib/Makefile | 1 + test/lib/strlcat.c | 126 + 2 files changed, 127 insertio

[PATCH v2 1/5] lib: string: Fix strlcpy return value

2021-03-10 Thread Sean Anderson
strlcpy should always return the number of bytes copied. We were accidentally missing the nul-terminator. We also always used to return a non-zero value, even if we did not actually copy anything. Fixes: 23cd138503 ("Integrate USB gadget layer and USB CDC driver layer") Signed-off-by: Sean Anders

[PATCH v2 2/5] lib: string: Implement strlcat

2021-03-10 Thread Sean Anderson
This introduces strlcat, which provides a safer interface than strncat. It never copies more than its size bytes, including the terminating nul. In addition, it never reads past dest[size - 1], even if dest is not nul-terminated. This also removes the stub for dwc3 now that we have a proper implem

[PATCH v2 0/5] string: strl(cat|cpy)

2021-03-10 Thread Sean Anderson
This series adds support for strl(cat|cpy), and brings their implementations in-line with what is documented in the Linux man pages. It also fixes some potential (actual) fastboot bugs. Lastly, it adds a patman check to suggest using these functions over strn(cat|cpy). I think these functions provi

Re: rk3399-gru-kevin: issues on bringup

2021-03-10 Thread Simon Glass
Hi, On Thu, 13 Aug 2020 at 13:35, Alper Nebi Yasak wrote: > > Hi Simon, Marty, > > I'm interested in getting U-Boot to work with Kevin as well, but don't > have a Servo (or the willingness to open up the case yet), so I've been > trying to boot from depthcharge as in README.chromium-chainload. >

Re: [PATCH] checkpatch: Add warnings for using strn(cat|cpy)

2021-03-10 Thread Sean Anderson
On 3/10/21 9:42 PM, Tom Rini wrote: On Wed, Mar 10, 2021 at 08:45:27PM -0500, Sean Anderson wrote: strn(cat|cpy) has a bad habit of not nul-terminating the destination, resulting in constructions like strncpy(foo, bar, sizeof(foo) - 1); foo[sizeof(foo) - 1] = '\0'; However, i

Re: [PATCH] checkpatch: Add warnings for using strn(cat|cpy)

2021-03-10 Thread Tom Rini
On Wed, Mar 10, 2021 at 08:45:27PM -0500, Sean Anderson wrote: > strn(cat|cpy) has a bad habit of not nul-terminating the destination, > resulting in constructions like > > strncpy(foo, bar, sizeof(foo) - 1); > foo[sizeof(foo) - 1] = '\0'; > > However, it is very easy to forget about

[PATCH v6 6/6] riscv: Enable watchdog for the k210

2021-03-10 Thread Sean Anderson
This enables the necessary config options. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- (no changes since v1) board/sipeed/maix/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/sipeed/maix/Kconfig b/board/sipeed/maix/Kconfig index 2cdea8ea81..adf6abb572 100644

[PATCH v6 4/6] wdt: dw: Free the clock on error

2021-03-10 Thread Sean Anderson
The clock subsystem requires that clk_free be called on clocks obtained via clk_get_*. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- (no changes since v4) Changes in v4: - Fix build error without CONFIG_CLK drivers/watchdog/designware_wdt.c | 18 +- 1 file changed

[PATCH v6 5/6] riscv: Add watchdog bindings for the k210

2021-03-10 Thread Sean Anderson
This adds the necessary bindings. Most of them are already there. Signed-off-by: Sean Anderson Acked-by: Rick Chen --- (no changes since v2) Changes in v2: - Move watchdog enable to k210.dtsi as it does not depend on anything board-specific. arch/riscv/dts/k210.dtsi | 1 - 1 file changed,

[PATCH v6 3/6] wdt: dw: Enable the clock before using it

2021-03-10 Thread Sean Anderson
The watchdog won't work if the clock isn't enabled. Fixes: cf89ef8d10f240554541c20b2e1bdcdd58d1d7e6 Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- (no changes since v1) drivers/watchdog/designware_wdt.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/watchdog/design

[PATCH v6 2/6] wdt: dw: Switch to if(CONFIG()) instead of using #if

2021-03-10 Thread Sean Anderson
This is preferred over #if because the compiler can check syntax even if the feature is disabled. This cannot be used for CONFIG_CLK because CONFIG_DW_WDT_CLOCK_KHZ is not defined on all platforms. Signed-off-by: Sean Anderson Reviewed-by: Heinrich Schuchardt --- (no changes since v1) drivers

[PATCH v6 1/6] wdt: dw: Switch to using fls for log2

2021-03-10 Thread Sean Anderson
log_2_n_round_up is only found in arm. fls performs the same job and is generic. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- (no changes since v2) Changes in v2: - Fix fls being off-by-one when compared to log_2_n_round_up drivers/watchdog/designware_wdt.c | 3 +-- 1 file chang

[PATCH v6 0/6] wdt: Add support for watchdogs on Kendryte K210

2021-03-10 Thread Sean Anderson
Please merge! I don't want to have to keep rebasing. Changes in v6: - Rebase on u-boot/master Changes in v5: - Note dependency on "time: Fix get_ticks being non-monotonic" - Add a few signed-off-bys which were sent for version 1 - Rebase on u-boot/master Changes in v4: - Fix build error withou

Re: [PATCH] doc: icicle: Fix incorrect board name in HSS docs

2021-03-10 Thread Bin Meng
On Thu, Mar 11, 2021 at 9:48 AM Sean Anderson wrote: > > The HSS source uses an "mpfs" prefix with the icicle board name. Change our > documentation to match. > > Signed-off-by: Sean Anderson > --- > > doc/board/microchip/mpfs_icicle.rst | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions

[PATCH v2] riscv: Remove unused define in maix header

2021-03-10 Thread Sean Anderson
This define was left over from a previous revision, and was never used. Signed-off-by: Sean Anderson Reviewed-by: Heinrich Schuchardt Reviewed-by: Bin Meng --- Changes in v2: - Rebase onto u-boot/master include/configs/sipeed-maix.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/inclu

[PATCH] doc: icicle: Fix incorrect board name in HSS docs

2021-03-10 Thread Sean Anderson
The HSS source uses an "mpfs" prefix with the icicle board name. Change our documentation to match. Signed-off-by: Sean Anderson --- doc/board/microchip/mpfs_icicle.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/board/microchip/mpfs_icicle.rst b/doc/board/mic

[PATCH] checkpatch: Add warnings for using strn(cat|cpy)

2021-03-10 Thread Sean Anderson
strn(cat|cpy) has a bad habit of not nul-terminating the destination, resulting in constructions like strncpy(foo, bar, sizeof(foo) - 1); foo[sizeof(foo) - 1] = '\0'; However, it is very easy to forget about this behavior and accidentally leave a string unterminated. This has show

Re: Fastboot

2021-03-10 Thread Jonas Vautherin
Thanks a lot, Sean! >From you answer, it seems like what I am trying to do (i.e. applying that patch to am335x.dts to set dr_mode to "peripheral") makes sense, though for some reason it does not get applied. I have been careful in checking that the dts file disappears after I cleansstate u-boot,

Re: [PATCH v2] spl: Add callback for preprocessing loaded FIT header before parsing

2021-03-10 Thread Farhan Ali
On Wed, Mar 10, 2021 at 11:38 AM Alex G. wrote: > On 3/9/21 5:55 PM, Farhan Ali wrote: > > This change adds a callback for preprocessing the FIT header before > > it is parsed. There are 3 main reasons for this callback: > > > > (1) If a vulnerability is discovered in the FIT parsing/loading code

Re: Fastboot

2021-03-10 Thread Sean Anderson
On 3/10/21 12:43 PM, Jonas Vautherin wrote: Hello! I've made some more tests, but I am stuck and I don't really know what I am missing. Would love to get some insights, if somebody has an idea :-). So my root problem is that I would like to run my pocketbeagle in fastboot mode so that I can flas

Re: [PATCH v2] spl: Add callback for preprocessing loaded FIT header before parsing

2021-03-10 Thread Alex G
On 3/10/21 2:49 PM, Farhan Ali wrote: On Wed, Mar 10, 2021 at 11:38 AM Alex G. This patch describes "how" you're trying to achieve it, but "what" you want to achieve. I'll get later into why I think the "how" is fundamentally flawed. The 'what' is basically this: I want to be able to

Re: Help needed with uboot for CHIP

2021-03-10 Thread Gunjan Gupta
PFA my dts file. I have added the nfc section there as without that U-Boot was giving a message about nfc being disabled in the dts. Regarding trying the default config, I can't really do that as that doesn't support booting from NAND and I want to be able to boot from NAND. Also I don't think hav

[PATCH] sandbox: dtsi: add rng

2021-03-10 Thread Vincent Stehlé
Having an rng in the sandbox is useful not only for tests but also for e.g. UEFI. Therefore, copy the rng node from test.dts to sandbox.dtsi. In the case of UEFI, it can then be verified with `efidebug dh' that a "Random Number Generator" protocol is indeed present. This also fixes the following

Re: Help needed with uboot for CHIP

2021-03-10 Thread Alexandre GRIVEAUX
Le 10/03/2021 à 18:32, Gunjan Gupta a écrit : Hi Alexandre, I saw your patch on the U-boot mailing list. I am trying to get the latest U-boot working on the CHIP with Hynix NAND and need your help with the same. I am using al

Re: [PATCH 4/4 v6] Test the ESRT creation within an existing pytest.

2021-03-10 Thread Heinrich Schuchardt
On 3/8/21 12:29 PM, Jose Marinho wrote: This commit slightly extends test_efi_capsule_fw3. In order to run the test the following must be added to sandbox_defconfig: +CONFIG_CMD_SF=y +CONFIG_CMD_MEMORY=y +CONFIG_CMD_FAT=y +CONFIG_DFU=y The ESRT is printed in the u-boot shell b

Re: [PATCH 3/4 v6] efi: ESRT creation tests

2021-03-10 Thread Heinrich Schuchardt
On 3/8/21 12:29 PM, Jose Marinho wrote: This commmit exercises the ESRT creation in a EFI selftest. A fake FMP, with TEST_ESRT_NUM_ENTRIES FW images, is installed in the system leading to the corresponding ESRT entries being populated. The ESRT entries are checked against the datastructure

Re: [PATCH 2/4 v6] cmd: efi: ESRT table debug print

2021-03-10 Thread Heinrich Schuchardt
On 3/8/21 12:29 PM, Jose Marinho wrote: This commit enables the ESRT printing from the u-boot shell by invoking: - efidebug capsule esrt CC: Heinrich Schuchardt CC: Sughosh Ganu CC: AKASHI Takahiro CC: Ilias Apalodimas CC: Andre Przywara CC: Alexander Graf CC: n...@arm.com Signed-off-by: J

Re: [PATCH v2] spl: Add callback for preprocessing loaded FIT header before parsing

2021-03-10 Thread Alex G.
On 3/9/21 5:55 PM, Farhan Ali wrote: This change adds a callback for preprocessing the FIT header before it is parsed. There are 3 main reasons for this callback: (1) If a vulnerability is discovered in the FIT parsing/loading code, or libfdt, this callback allows users to scan the FIT header fo

Re: [PATCH v5 1/2] gpio: i2c-gpio: Drop use of dm_gpio_set_dir()

2021-03-10 Thread Simon Glass
Hi Harm, On Mon, 8 Mar 2021 at 14:07, Harm Berntsen wrote: > > The dm_gpio_set_dir_flags does a bitwise OR with the new flags. This > means that the i2c driver cannot switch the pin from input to output or > vice versa. check_dir_flags fails here: > > check_dir_flags: flags 0x6 has GPIOD_IS_OUT a

[PATCH 6/7] Kconfig: Document the limitations of the simple SPL_LOAD_FIT path

2021-03-10 Thread Alexandru Gagniuc
The "simple" SPL_LOAD_FIT path is the most compliant with the format documented in doc/uImage.FIT/source_file_format.txt. The other two paths to load a FIT are SPL_LOAD_FIT_FULL and the "bootm" command. Since the Kconfig menu is the most likely place for a new user to see these options, it seems l

[PATCH 7/7] doc: FIT image: Update FPGA example to make use of "loadables"

2021-03-10 Thread Alexandru Gagniuc
The new correct way to load an FPGA image is to declare it in the list of "loadables". multi-with-fpga.its used the now deprecated "fpga" property. Since this example most likely intended to use u-boot's generic FPGA loading code, compatible = "u-boot,fpga-legacy" is also appropriate here. Signed-

[PATCH 5/7] spl: fit: Support loading FPGA images from list of "loadables"

2021-03-10 Thread Alexandru Gagniuc
Commit 4afc4f37c70e ("doc: FIT image: Clarify format and simplify syntax") and delegated FPGA images to be added via the list of "loadables" in lieu of the "fpga" property. Now actually implement this in code. Note that the "compatible" property is ignored for the time being, as implementing "comp

[PATCH 3/7] spl: fit: Move FPGA loading code to separate functions

2021-03-10 Thread Alexandru Gagniuc
The FPGA loading code in spl_simple_fit_read() can easily be separated from the rest of the logic. It is split into two functions instead of one because spl_fit_upload_fpga() is used in a subsequent patch. Signed-off-by: Alexandru Gagniuc --- common/spl/spl_fit.c | 69 +++

[PATCH 4/7] spl: fit: Warn if FIT contains "fpga" property in config node

2021-03-10 Thread Alexandru Gagniuc
Commit 4afc4f37c70e ("doc: FIT image: Clarify format and simplify syntax") requires that FPGA images be referenced through the "loadables" in the config node. This means that "fpga" properties in config nodes are deprecated. Given that there are likely FIT images which use "fpga", let's not break

[PATCH 2/7] doc: FIT image: Introduce "u-boot,fpga-legacy" property

2021-03-10 Thread Alexandru Gagniuc
Commit 4afc4f37c70e ("doc: FIT image: Clarify format and simplify syntax") introduced a "compatible" property for loadable images. It did not define its contents. Use "u-boot,fpga-legacy" compatible string to specify that fpga_load() should be used to load the image. Signed-off-by: Alexandru Gagni

[PATCH 1/7] spl: fit: Don't overwrite previous loadable if "load" is missing

2021-03-10 Thread Alexandru Gagniuc
spl_load_fit_image() will try to load an image at the address given in the "load" property. Absent such property, it uses image_info->load_addr Correct use of this is demonstrated in spl_fit_append_fdt(), which resets the 'load_addr' before each spl_load_fit_image() call. On the other ha

[PATCH 0/7] SPL: FIT: Bring the SPL_LOAD_FIT path in line with documentation

2021-03-10 Thread Alexandru Gagniuc
When I wrote commit 4afc4f37c70e ("doc: FIT image: Clarify format and simplify syntax"), I did not expect it to go through without objection. I didn't also write the code to go along with it. This series fixes that by updating one of the three FIT code paths to be compliant. There are three code p

Re: Fastboot

2021-03-10 Thread Jonas Vautherin
Hello! I've made some more tests, but I am stuck and I don't really know what I am missing. Would love to get some insights, if somebody has an idea :-). So my root problem is that I would like to run my pocketbeagle in fastboot mode so that I can flash an image from my laptop over USB (it's a lea

[PATCH 1/1] mtd: spi_flash_free()

2021-03-10 Thread Heinrich Schuchardt
dfu_free_entities() invoking dfu_free_entity_sf() has let to segementation faults due to double freeing the same device. spi_flash_free() is not relevant for the driver model but exists only for compatibility with old drivers. We must not remove any device here: * The device may still be referen

Re: [PATCHv5 0/6] SCP03 control, documentation and tests.

2021-03-10 Thread Jorge Ramirez-Ortiz, Foundries
On 14/02/21, Jorge Ramirez-Ortiz wrote: > Simply adding the reviewed-by tags to the v5 series. why has this not been merged yet? > > Igor Opaniuk (2): > sandbox: imply SCP03 and CMD_SCP03 > test: py: add initial coverage for scp03 cmd > > Jorge Ramirez-Ortiz (4): > common: SCP03 control (

Re: [PATCH] sandbox: dtsi: add rng

2021-03-10 Thread Heinrich Schuchardt
On 10.03.21 15:33, Vincent Stehlé wrote: > Having an rng in the sandbox is useful not only for tests but also for e.g. > UEFI. Therefore, copy the rng node from test.dts to sandbox.dtsi. > > In the case of UEFI, it can then be verified with `efidebug dh' that a > "Random Number Generator" protocol

[PATCH v2] tee: optee: Change printing during optee_probe

2021-03-10 Thread Ilias Apalodimas
Right now the error messages when optee has a version mismatch or shared memory is not configured are done with a debug(). That's not very convenient since you have to enable debugging to figure out what's going on, although this is an actual error. So let's switch the debug() -> dev_err() and rep

Re: [PATCH] tee: optee: Change printing during optee_probe

2021-03-10 Thread Ilias Apalodimas
On Wed, Mar 10, 2021 at 02:28:20PM +0100, Patrick DELAUNAY wrote: > Hi Ilias > > On 3/10/21 12:01 PM, Ilias Apalodimas wrote: > > Right now the error messages when optee has a version mismatch or shared > > memory is not configured are done with a debug(). > > That's not very convenient since you

Re: [PATCH] tee: optee: Change printing during optee_probe

2021-03-10 Thread Patrick DELAUNAY
Hi Ilias On 3/10/21 12:01 PM, Ilias Apalodimas wrote: Right now the error messages when optee has a version mismatch or shared memory is not configured are done with a debug(). That's not very convenient since you have to enable debugging to figure out what's going on, although this is an actual

[PATCH] xilinx: Sync DTs with Linux kernel

2021-03-10 Thread Michal Simek
There are several changes which happen in mainline kernel which should get also to U-Boot. Here is the list of patches from the kernel: - ARM: zynq: Fix leds subnode name for zc702/zybo-z7 - arm64: dts: zynqmp: Fix leds subnode name for zcu100/ultra96 v1 - arm64: dts: zynqmp: Fix u48 si5382 chip o

[PATCH 2/2] net: jr2: Fix Serdes6G configuration

2021-03-10 Thread Horatiu Vultur
Sometimes no traffic was getting out on the ports, the root cause was a wrong configuration of the Serdes6G, which is used on jr2 pcb111. This patch fixes this issue by applying the correct configuration. Fixes: 5e1d417bec92ac ("net: Add MSCC Jaguar2 network driver.") Signed-off-by: Horatiu Vultur

[PATCH 0/2] net: jr2: Fix for jr2 switch

2021-03-10 Thread Horatiu Vultur
This patch series contains two patches. The first patch resets the switch at probe time while the second one fixes an issue with the serdes6g configuration which is used on jr2_pcb111 board Horatiu Vultur (2): net: jr2: Reset switch net: jr2: Fix Serdes6G configuration arch/mips/dts/mscc,jr2

[PATCH 1/2] net: jr2: Reset switch

2021-03-10 Thread Horatiu Vultur
Make sure to reset the switch core at probe time. Signed-off-by: Horatiu Vultur --- arch/mips/dts/mscc,jr2.dtsi | 6 -- drivers/net/mscc_eswitch/jr2_switch.c | 16 +++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/arch/mips/dts/mscc,jr2.dtsi b/arch/m

Re: [IMPORTANT] gitlab relocation / rename

2021-03-10 Thread Henning Schild
Am Wed, 10 Mar 2021 08:56:48 +0100 schrieb Wolfgang Denk : > Dear Henning, > > In message <20210308083457.76db0...@md1za8fc.ad001.siemens.net> you > wrote: > > > > I do not understand why this is not just gitlab (proper) or github. > > I hope this discussion was held with the communities of the a

[PATCH v2 1/8] lmb: move CONFIG_LMB in Kconfig

2021-03-10 Thread Patrick Delaunay
Migrate CONFIG_LMB in Kconfig. Signed-off-by: Patrick Delaunay --- (no changes since v1) arch/arc/include/asm/config.h| 2 -- arch/arm/include/asm/config.h| 1 - arch/m68k/include/asm/config.h | 1 - arch/microblaze/include/asm/config.h | 2 -- arch/mips/include/asm/confi

[PATCH v2 0/8] lmb: Add config for the number of memory and reserved regions

2021-03-10 Thread Patrick Delaunay
Hi, It is the V2 of [1] I propose a update of the lmb library to allow the configuration with Kconfig of the number of memory regions and of reserved regions in lmb library with: - CONFIG_LMB_RESERVED_REGIONS - CONFIG_LMB_MEMORY_REGIONS This serie avoids issue on stm32mp15 platform, as the ker

[PULL] u-boot-usb/master

2021-03-10 Thread Marek Vasut
The following changes since commit b764bf21e60901133fd5eec6a003409c581dd519: Merge https://source.denx.de/u-boot/custodians/u-boot-x86 (2021-03-09 07:21:51 -0500) are available in the Git repository at: git://source.denx.de/u-boot-usb.git master for you to fetch changes up to 044d7003a71

[PATCH 2/2] terminal: only serial_reinit_all if available

2021-03-10 Thread Asherah Connor
serial_reinit_all() is only available if CONFIG_SERIAL is defined (i.e. !CONFIG_DM_SERIAL). Signed-off-by: Asherah Connor --- cmd/terminal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/terminal.c b/cmd/terminal.c index 733701e059..9e32a4191e 100644 --- a/cmd/term

[PATCH 0/2] terminal: get this compiling again

2021-03-10 Thread Asherah Connor
`terminal' has not compiled in 7 years. We should fix it, per this series or something similar, or remove it. I've been trying to use it locally with a secondary UART on a RISC-V dev board (to no avail, but that's my own problem). P.S. Let me know if I'm sending too many patches, I realise I alr

[PATCH 1/2] terminal: correct stdio_dev invocations

2021-03-10 Thread Asherah Connor
stdio_dev methods have taken a pointer to themselves since 709ea543 (nearly 7 years ago). Signed-off-by: Asherah Connor --- cmd/terminal.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/terminal.c b/cmd/terminal.c index f6e4d2539e..733701e059 100644 --- a/c

Re: [PATCH] dfu: dfu_mtd: remove the mtd_block_op error when mtd_lock is not supported

2021-03-10 Thread Sughosh Ganu
On Wed, 10 Mar 2021 at 14:57, Patrick Delaunay wrote: > Fix the result of DFU_OP_WRITE operation in mtd_block_op function > when mtd_lock is not supported (-EOPNOTSUPP) to avoid DFU stack > error on the DFU manifestation of the MTD device, when > dfu_flush_medium_mtd is called. > > Without this p

[BUG] double free in dfu_free_entities()

2021-03-10 Thread Heinrich Schuchardt
Hello Lukasz, Jose and I have observed segmentation violations when dfu_free_entities() is called. In our scenario we have: dfu_alt_info= sf 0:0=u-boot-bin raw 0x10 0x5;u-boot-env raw 0x15 0x20 dfu_free_entities() is called with these entries in dfu: u-boot-env: dfu->data.sf.

[PATCH] tee: optee: Change printing during optee_probe

2021-03-10 Thread Ilias Apalodimas
Right now the error messages when optee has a version mismatch or shared memory is not configured are done with a debug(). That's not very convenient since you have to enable debugging to figure out what's going on, although this is an actual error. So let's switch the debug() -> log_err() and rep

Re: [PATCH v2] usb: ehci-hcd: Add IAA handshake for removing async QH

2021-03-10 Thread Marek Vasut
On 3/9/21 4:26 AM, Ye Li wrote: According to EHCI spec, software needs to do handshake with HC for safely removing QH from async list. This handshake is implemented by setting IAAD (Interrupt on Async Advance Doorbell) bit in USB_USBCMD register and poll the IAA (Interrupt on Async Advance bit) i

[PATCH v2] usb: ehci-hcd: Add IAA handshake for removing async QH

2021-03-10 Thread Ye Li
According to EHCI spec, software needs to do handshake with HC for safely removing QH from async list. This handshake is implemented by setting IAAD (Interrupt on Async Advance Doorbell) bit in USB_USBCMD register and poll the IAA (Interrupt on Async Advance bit) in the USB_USBSTS to ensure the HC

[PATCH] dfu: dfu_mtd: remove the mtd_block_op error when mtd_lock is not supported

2021-03-10 Thread Patrick Delaunay
Fix the result of DFU_OP_WRITE operation in mtd_block_op function when mtd_lock is not supported (-EOPNOTSUPP) to avoid DFU stack error on the DFU manifestation of the MTD device, when dfu_flush_medium_mtd is called. Without this patch, dfu-util failed on dfuERROR state at the end of the write ope

[PATCH v2 5/8] lmb: correct size of the regions array

2021-03-10 Thread Patrick Delaunay
As in lmb_region, cnt < max and in the lmb library use region[i] only with i in 0...cnt, this region array size can be reduced by 1 element without overflow. This patch allows to reduce the struct lmb size. Signed-off-by: Patrick Delaunay --- Changes in v2: - new in V2: reduce size impact by co

[PATCH v2 8/8] configs: stm32mp15: increase the number of reserved memory region in lmb

2021-03-10 Thread Patrick Delaunay
For the latest kernel device tree the max number of reserved regions in lmb library is reached: 8 with 5 reserved regions in device tree. When a new region is added, the lmb allocation for the device tree relocation failed and boot with ramdisk failed. This patch avoids this issue by increasing t

[PATCH v2 7/8] lmb: Add 2 config to define the max number of regions

2021-03-10 Thread Patrick Delaunay
Add 2 configs CONFIG_LMB_MEMORY_REGIONS and CONFIG_LMB_RESERVED_REGIONS to change independently the max number of the regions in lmb library. When CONFIG_LMB_USE_MAX_REGIONS=y, move the lmb property arrays to struct lmb and manage the array size with the element 'max' of struct lmb_region; their a

[PATCH v2 4/8] lmb: move MAX_LMB_REGIONS value in Kconfig

2021-03-10 Thread Patrick Delaunay
Move MAX_LMB_REGIONS value in Kconfig, the max number of the regions in lmb library. Signed-off-by: Patrick Delaunay --- Changes in v2: - new in v2: introduced MAX_LMB_REGIONS include/lmb.h | 4 +--- lib/Kconfig | 10 +- lib/lmb.c | 4 ++-- 3 files changed, 12 insertions(+), 6

[PATCH v2 3/8] lmb: add a max parameter in the struct lmb_region

2021-03-10 Thread Patrick Delaunay
Add a max parameter in lmb_region struct to handle test in lmb_add_region without using the MAX_LMB_REGIONS define. This patch allows to modify these size independently for memory of reserved regions in the next patches. Signed-off-by: Patrick Delaunay --- Changes in v2: - add a max parameter e

[PATCH v2 6/8] test: lmb: add test for overflow protection in lmb_add_region

2021-03-10 Thread Patrick Delaunay
Add test for max number of memory regions and in reserved regions. Signed-off-by: Patrick Delaunay --- Changes in v2: - new in V2: add test for overflow protection in lmb libary test/lib/lmb.c | 64 ++ 1 file changed, 64 insertions(+) diff --git

[PATCH v2 2/8] lmb: remove lmb_region.size

2021-03-10 Thread Patrick Delaunay
Remove the unused field size of struct lmb_region as it is initialized to 0 and never used after in lmb library. See Linux kernel commit 4734b594c6ca ("memblock: Remove memblock_type.size and add memblock.memory_size instead") Signed-off-by: Patrick Delaunay --- (no changes since v1) include/