Re: [RFC 01/22] part: call part_init() in blk_get_device_by_str() only for MMC

2021-09-30 Thread Heinrich Schuchardt
On 10/1/21 7:01 AM, AKASHI Takahiro wrote: In blk_get_device_by_str(), the comment says: "Updates the partition table for the specified hw partition." Since hw partition is supported only on MMC, it makes no sense to do so for other devices. Signed-off-by: AKASHI Takahiro --- disk/part.c |

Re: [PATCH u-boot-marvell v3 39/39] MAINTAINERS: Add entry for kwbimage / kwboot tools

2021-09-30 Thread Stefan Roese
On 24.09.21 23:07, Marek Behún wrote: From: Marek Behún Add entry for these tools with Marek, Pali and Stefan as maintainers. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINER

Re: [PATCH u-boot-marvell v3 38/39] doc/kwboot.1: Update man page

2021-09-30 Thread Stefan Roese
On 24.09.21 23:07, Marek Behún wrote: From: Marek Behún Update man page for the kwboot utility. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- doc/kwboot.1 | 60 ++-- 1 file changed, 39 insertions(+), 21 deletio

Re: [PATCH u-boot-marvell v3 37/39] tools: kwboot: Add Pali and Marek as authors

2021-09-30 Thread Stefan Roese
On 24.09.21 23:07, Marek Behún wrote: From: Pali Rohár Add Pali and Marek as another authors of the kwboot utility. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/

Re: [PATCH u-boot-marvell v3 36/39] tools: kwboot: Update file header

2021-09-30 Thread Stefan Roese
On 24.09.21 23:07, Marek Behún wrote: From: Marek Behún Mention all supported platforms in file header. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwboot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/kwboot.c b/tools/

Re: [PATCH u-boot-marvell v3 35/39] tools: kwboot: Avoid code repetition in kwboot_img_patch()

2021-09-30 Thread Stefan Roese
On 24.09.21 23:07, Marek Behún wrote: From: Marek Behún Change kwboot_img_patch() to avoid code repetition of setting errno to EINVAL. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwboot.c | 55 ++ 1 fil

Re: [PATCH u-boot-marvell v3 34/39] tools: kwboot: Cosmetic fix

2021-09-30 Thread Stefan Roese
On 24.09.21 23:07, Marek Behún wrote: From: Marek Behún Add spaces around the | operator. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwboot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c i

Re: [PATCH u-boot-marvell v3 32/39] tools: kwboot: Disable tty interbyte timeout

2021-09-30 Thread Stefan Roese
On 24.09.21 23:07, Marek Behún wrote: From: Pali Rohár Function kwboot_tty_recv() has its own handling of read timeout, we don't need to do set it in tty settings. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwboot.c | 2 +-

Re: [PATCH u-boot-marvell v3 31/39] tools: kwboot: Fix initializing tty device

2021-09-30 Thread Stefan Roese
On 24.09.21 23:07, Marek Behún wrote: From: Pali Rohár Retrieve current terminal settings via tcgetattr(), set to raw mode with cfmakeraw(), enable receiver via CREAD and ignore modem control lines via CLOCAL. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Reviewed-by: Stefan Roese

Re: [PATCH u-boot-marvell v3 30/39] tools: kwboot: Check whether baudrate was set to requested value

2021-09-30 Thread Stefan Roese
On 24.09.21 23:07, Marek Behún wrote: From: Marek Behún The tcsetattr() function can return 0 even if baudrate was not changed. Check whether baudrate was changed to requested value, and in case of arbitrary baudrate, check whether the set value is within 3% tolerance. Signed-off-by: Marek Beh

Re: [PATCH u-boot-marvell v3 29/39] tools: kwboot: Allow any baudrate on Linux

2021-09-30 Thread Stefan Roese
On 24.09.21 23:07, Marek Behún wrote: From: Pali Rohár The A38x platform supports more baudrates than just those defined by the Bn constants, and some of them are higher than the highest Bn baudrate (the highest is 4 MBd while A38x support 5.15 MBd). On Linux, add support for arbitrary baudrat

Re: [PATCH u-boot-marvell v3 28/39] tools: kwboot: Support higher baudrates when booting via UART

2021-09-30 Thread Stefan Roese
On 24.09.21 23:07, Marek Behún wrote: From: Pali Rohár Add support for uploading the boot image (the data part only) at higher baudrate than the standard one. The kwboot utility already has -B option, but choosing other baudrate than the standard one (115200 Bd) can only work for debug mode, n

Re: [PATCH u-boot-marvell v3 27/39] tools: kwboot: Explicitly check against size of struct main_hdr_v1

2021-09-30 Thread Stefan Roese
On 24.09.21 23:07, Marek Behún wrote: From: Marek Behún Explicitly check the image size against size of struct main_hdr_v1. This way the check is more readable, since the `hdrsz` variable may semantically contain another value. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks,

Re: [PATCH u-boot-marvell v3 26/39] tools: kwboot: Round up header size to 128 B when patching

2021-09-30 Thread Stefan Roese
On 24.09.21 23:07, Marek Behún wrote: From: Pali Rohár The beginning of image data must be sent in a separate xmodem block; the block must not contain end of header with the beginning of data. Therefore we need to ensure that the image header size is a multiple of xmodem block size (which is 1

Re: [PATCH u-boot-marvell v3 25/39] tools: kwbimage: Update comments describing kwbimage v1 structures

2021-09-30 Thread Stefan Roese
On 24.09.21 23:07, Marek Behún wrote: From: Pali Rohár These structures are relevant for several other platforms, mention them all. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwbimage.c | 3 ++- tools/kwbimage.h | 6 +++---

Re: [PATCH u-boot-marvell v3 24/39] tools: kwbimage: Refactor kwbimage header size determination

2021-09-30 Thread Stefan Roese
On 24.09.21 23:07, Marek Behún wrote: From: Marek Behún Add functions kwbheader_size() and kwbheader_size_for_csum(). Refactor code determining header size to use these functions. Refactor header checksum determining function. Remove stuff that is not needed anymore. This simplifies the cod

Re: [PATCH u-boot-marvell v3 23/39] tools: kwbimage: Refactor image_version()

2021-09-30 Thread Stefan Roese
On 24.09.21 23:07, Marek Behún wrote: From: Marek Behún Rename this function to kwbimage_version() and don't cast argument if not needed. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwbimage.c | 8 tools/kwbimage.h | 4 ++-- tools/kwboot.c

Re: [PATCH u-boot-marvell v3 22/39] tools: kwboot: Patch destination address to DDR area for SPI image

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Pali Rohár SPI/NOR kwbimage may have destination address set to 0x, which means that the image is not downloaded to DDR but rather it is executed directly from SPI/NOR. In this case execution address is set to SPI/NOR area. When patching imag

Re: [PATCH u-boot-marvell v3 21/39] tools: kwboot: Patch source address in image header

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Pali Rohár Some image types have source address in non-bytes unit; for example for SATA images, it is in 512 B units. We need to multiply by unit size when patching image type to UART. Signed-off-by: Pali Rohár [ refactored ] Signed-off-by: Marek B

Re: [PATCH u-boot-marvell v3 18/39] tools: kwboot: Always call kwboot_img_patch_hdr()

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Pali Rohár The kwboot_img_patch_hdr() function already decides if header patching is needed. Always call this function and deprecate the unneeded command line option `-p`. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún Reviewed-by: Stefan Roe

Re: [PATCH u-boot-marvell v3 17/39] tools: kwboot: Properly finish xmodem transfer

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Pali Rohár After kwboot sends EOT, BootROM sends back ACK. Add code for handling this and retry sending EOT on error. Signed-off-by: Pali Rohár [ refactored ] Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwb

Re: [PATCH u-boot-marvell v3 16/39] tools: kwboot: Prevent waiting indefinitely if no xmodem reply is received

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Marek Behún Currently if BootROM fails to respond with ACK/NAK to a xmodem block, we will be waiting indefinitely for such response. Make sure that we only wait at most 1 second (blk_rsp_timeo) for ACK/NAK for each block in case non-xmodem text outpu

Re: [PATCH u-boot-marvell v3 15/39] tools: kwboot: Allow greater timeout when executing header code

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Marek Behún When executing header code (which contains U-Boot SPL in most cases), wait 10s after every non-xmodem character received (i.e. printed by U-Boot SPL) before timing out. Sometimes DDR training, which runs in SPL, may be slow. Signed-off-b

Re: [PATCH u-boot-marvell v3 14/39] tools: kwboot: Print new line after SPL output

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Marek Behún There is no separation between output from the code from binary header (U-Boot SPL in most cases) and subsequent kwboot output. Print '\n' to make distinguishing these two easier. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese

Re: [PATCH u-boot-marvell v3 13/39] tools: kwboot: Allow non-xmodem text output from BootROM only in a specific case

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Pali Rohár When sending image header / image data, BootROM does not send any non-xmodem text output. We should therefore interpret unknown bytes in the xmodem protocol as errors and resend current packet. This should improve the transfer in case there

Re: [PATCH u-boot-marvell v3 12/39] tools: kwboot: Use a function to check whether received byte is a Xmodem reply

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Marek Behún This is a non-functional change that should make the code more readable. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwboot.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) di

Re: [PATCH u-boot-marvell v3 11/39] tools: kwboot: Split sending image into header and data stages

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Pali Rohár This change is required to implement other features in kwboot. Split sending header and data parts of the image into two stages. Signed-off-by: Pali Rohár [ refactored ] Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, S

Re: [PATCH u-boot-marvell v3 10/39] tools: kwboot: Print newline on error when progress was not completed

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Pali Rohár When progress was not completed, current terminal position is in progress bar. So print newline before printing error message to make error message more readable. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún Reviewed-by: Stefan R

Re: [PATCH u-boot-marvell v3 09/39] tools: kwboot: Fix printing progress

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Pali Rohár Ensure that `pos` is still in range up to the `width` so printing 100% works also for bigger images. After printing 100% progress reset it to zero, so that next progressbar can be started. Signed-off-by: Pali Rohár Reviewed-by: Marek Behú

Re: [PATCH u-boot-marvell v3 08/39] tools: kwboot: Fix comparison of integers with different size

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Marek Behún The compiler complains that we are comparing int with size_t when compiled with -W. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwboot.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

Re: [PATCH u-boot-marvell v3 07/39] tools: kwboot: Fix return type of kwboot_xm_makeblock() function

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Pali Rohár Function kwboot_xm_makeblock() always returns length of xmodem block. It is always non-negative and calculated from variable with size_t type. Set return type of this function to size_t and remove dead code which checks for negative value.

Re: [PATCH u-boot-marvell v3 06/39] tools: kwboot: Fix kwboot_xm_sendblock() function when kwboot_tty_recv() fails

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Pali Rohár When kwboot_tty_recv() fails or times out, it does not set the `c` variable to NAK. The variable is then compared, while it holds either an undefined value or a value from previous iteration. Set `c` to NAK so that the other side will try t

Re: [PATCH u-boot-marvell v3 05/39] tools: kwboot: Print version information header

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Pali Rohár Print kwboot's (U-Boot's) version when printing usage. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/kw

Re: [PATCH u-boot-marvell v3 04/39] tools: kwboot: Refactor and fix writing buffer

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Marek Behún There are 3 instances in kwboot.c where we need to write() a given buffer whole (iteratively writing until all data are written), and 2 of those instances are wrong, for they do not increment the buffer pointer. Refactor the code into a n

Re: [PATCH u-boot-marvell v3 03/39] tools: kwboot: Make the quit sequence buffer const

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Marek Behún This buffer is never written to. Make it const. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwboot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/kwboot.c b/tool

Re: [PATCH u-boot-marvell v3 02/39] tools: kwboot: Fix buffer overflow in kwboot_terminal()

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Marek Behún The `in` variable is set to -1 in kwboot_terminal() if stdin is not a tty. In this case we should not look whether -1 is set in fd_set, for it can lead to a buffer overflow, which can be reproduced with echo "xyz" | ./tools/kwboot -t /d

Re: [PATCH u-boot-marvell v3 01/39] tools: kwbimage: Fix printf format warning

2021-09-30 Thread Stefan Roese
On 24.09.21 23:06, Marek Behún wrote: From: Marek Behún On 32-bit ARM the compiler complains: tools/kwbimage.c:547: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ F

[RFC 22/22] efi_selftest: block device: adjust dp for a test disk

2021-09-30 Thread AKASHI Takahiro
Due to efi_disk-dm integration, the resultant device path for a test disk got slightly changed, with efi_root contained as the first component. Signed-off-by: AKASHI Takahiro --- lib/efi_selftest/efi_selftest_block_device.c | 26 ++-- 1 file changed, 24 insertions(+), 2 deletions

[RFC 22/22] (TEST) let dm-tree unchanged after block_io testing is done

2021-09-30 Thread AKASHI Takahiro
--- lib/efi_selftest/efi_selftest_block_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/efi_selftest/efi_selftest_block_device.c b/lib/efi_selftest/efi_selftest_block_device.c index cac76249e6b4..358797d224dc 100644 --- a/lib/efi_selftest/efi_selftest_block_device.c +++ b/lib/e

[RFC 21/22] efi_selftest: block device: adjust dp for a test disk

2021-09-30 Thread AKASHI Takahiro
Due to efi_disk-dm integration, the resultant device path for a test disk got slightly changed, with efi_root contained as the first component. Signed-off-by: AKASHI Takahiro --- lib/efi_selftest/efi_selftest_block_device.c | 26 ++-- 1 file changed, 24 insertions(+), 2 deletions

[RFC 21/22] efi_driver: cleanup after efi_disk-dm integration

2021-09-30 Thread AKASHI Takahiro
efi_driver-specific binding will be no longer needed now that efi_disk- dm integration takes care of efi_driver case as well. Signed-off-by: AKASHI Takahiro --- lib/efi_driver/efi_block_device.c | 24 1 file changed, 24 deletions(-) diff --git a/lib/efi_driver/efi_block

[RFC 20/22] efi_driver: cleanup after efi_disk-dm integration

2021-09-30 Thread AKASHI Takahiro
efi_driver-specific binding will be no longer needed now that efi_disk- dm integration takes care of efi_driver case as well. Signed-off-by: AKASHI Takahiro --- lib/efi_driver/efi_block_device.c | 24 1 file changed, 24 deletions(-) diff --git a/lib/efi_driver/efi_block

[RFC 20/22] efi_driver: align with efi_disk-dm integration

2021-09-30 Thread AKASHI Takahiro
Signed-off-by: AKASHI Takahiro --- lib/efi_driver/efi_block_device.c | 6 ++ lib/efi_loader/efi_device_path.c | 29 + lib/efi_loader/efi_disk.c | 12 +++- 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/lib/efi_driver/efi_block_devi

[RFC 19/22] efi_driver: align with efi_disk-dm integration

2021-09-30 Thread AKASHI Takahiro
Signed-off-by: AKASHI Takahiro --- lib/efi_driver/efi_block_device.c | 6 ++ lib/efi_loader/efi_device_path.c | 29 + lib/efi_loader/efi_disk.c | 12 +++- 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/lib/efi_driver/efi_block_devi

[RFC 19/22] dm: blk: call efi's device-removal hook

2021-09-30 Thread AKASHI Takahiro
Adding the callback function, efi_disk_delete(), in block devices's pre_remove hook will allows for automatically deleting efi_disk objects per block device. This will eliminate any improper efi_disk objects which hold a link to non-existing udevice structures when associated block devices are phy

[RFC 18/22] efi_loader: efi_disk: a helper function to delete efi_disk objects

2021-09-30 Thread AKASHI Takahiro
This function is expected to be called, in particular from dm's pre_remove hook, when associated block devices no longer exist. Signed-off-by: AKASHI Takahiro --- include/efi_loader.h | 2 ++ lib/efi_loader/efi_disk.c | 54 +++ 2 files changed, 56 insert

[RFC 18/22] dm: blk: call efi's device-removal hook

2021-09-30 Thread AKASHI Takahiro
Adding the callback function, efi_disk_delete(), in block devices's pre_remove hook will allows for automatically deleting efi_disk objects per block device. This will eliminate any improper efi_disk objects which hold a link to non-existing udevice structures when associated block devices are phy

[RFC 17/22] efi_loader: efi_disk: a helper function to delete efi_disk objects

2021-09-30 Thread AKASHI Takahiro
This function is expected to be called, in particular from dm's pre_remove hook, when associated block devices no longer exist. Signed-off-by: AKASHI Takahiro --- include/efi_loader.h | 2 ++ lib/efi_loader/efi_disk.c | 54 +++ 2 files changed, 56 insert

[RFC 17/22] efi_loader: add efi_remove_handle()

2021-09-30 Thread AKASHI Takahiro
This function is a counterpart of efi_add_handle() and will be used in order to remove an efi_disk object in a later patch. Signed-off-by: AKASHI Takahiro --- include/efi_loader.h | 2 ++ lib/efi_loader/efi_boottime.c | 8 2 files changed, 10 insertions(+) diff --git a/include

[RFC 16/22] efi_loader: cleanup after efi_disk-dm integration

2021-09-30 Thread AKASHI Takahiro
efi_disk_register() will be no longer needed now that all efi_disks are set to be created with device model thanks to efi_disk-dm integration. Signed-off-by: AKASHI Takahiro --- include/efi_loader.h | 2 - lib/efi_loader/efi_disk.c | 102 - lib/efi_lo

[RFC 16/22] efi_loader: add efi_remove_handle()

2021-09-30 Thread AKASHI Takahiro
This function is a counterpart of efi_add_handle() and will be used in order to remove an efi_disk object in a later patch. Signed-off-by: AKASHI Takahiro --- include/efi_loader.h | 2 ++ lib/efi_loader/efi_boottime.c | 8 2 files changed, 10 insertions(+) diff --git a/include

[RFC 15/22] efi_loader: cleanup after efi_disk-dm integration

2021-09-30 Thread AKASHI Takahiro
efi_disk_register() will be no longer needed now that all efi_disks are set to be created with device model thanks to efi_disk-dm integration. Signed-off-by: AKASHI Takahiro --- include/efi_loader.h | 2 - lib/efi_loader/efi_disk.c | 102 - lib/efi_lo

[RFC 15/22] dm: blk: call efi's device-probe hook

2021-09-30 Thread AKASHI Takahiro
Adding this callback function, efi_disk_create() in block devices's post_probe hook will allows for automatically creating efi_disk objects per block device. This will end up not only eliminating efi_disk_register() called in UEFI initialization, but also enabling detections of new block devices e

[RFC 14/22] efi_loader: disk: a helper function to create efi_disk objects from udevice

2021-09-30 Thread AKASHI Takahiro
Add efi_disk_create() function. Any UEFI handle created by efi_disk_create() can be treated as a efi_disk object, the udevice is either a UCLASS_BLK (a whole raw disk) or UCLASS_PARTITION (a disk partition). So this function is expected to be called every time such an udevice is detected and acti

[RFC 14/22] dm: blk: call efi's device-probe hook

2021-09-30 Thread AKASHI Takahiro
Adding this callback function, efi_disk_create() in block devices's post_probe hook will allows for automatically creating efi_disk objects per block device. This will end up not only eliminating efi_disk_register() called in UEFI initialization, but also enabling detections of new block devices e

[RFC 13/22] efi_loader: remove !CONFIG_BLK code from efi_disk

2021-09-30 Thread AKASHI Takahiro
The change in this patch will probably have been covered by other guy's patch. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_disk.c | 49 --- 1 file changed, 49 deletions(-) diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index dfa6

[RFC 13/22] efi_loader: disk: a helper function to create efi_disk objects from udevice

2021-09-30 Thread AKASHI Takahiro
Add efi_disk_create() function. Any UEFI handle created by efi_disk_create() can be treated as a efi_disk object, the udevice is either a UCLASS_BLK (a whole raw disk) or UCLASS_PARTITION (a disk partition). So this function is expected to be called every time such an udevice is detected and acti

[RFC 12/22] efi_loader: remove !CONFIG_BLK code from efi_disk

2021-09-30 Thread AKASHI Takahiro
The change in this patch will probably have been covered by other guy's patch. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_disk.c | 49 --- 1 file changed, 49 deletions(-) diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index dfa6

[RFC 12/22] dm: add a hidden link to efi object

2021-09-30 Thread AKASHI Takahiro
This member field in udevice will be used to dereference from udevice to efi_object (or efi_handle). Signed-off-by: AKASHI Takahiro --- include/dm/device.h | 4 1 file changed, 4 insertions(+) diff --git a/include/dm/device.h b/include/dm/device.h index 0a9718a5b81a..33b09a836f06 100644 --

[RFC 11/22] efi_loader: disk: use udevice instead of blk_desc

2021-09-30 Thread AKASHI Takahiro
In most of all usages, we can avoid accessing blk_desc which is eventually an internal data structure to be hided outside block device drivers. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_disk.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --g

[RFC 11/22] dm: add a hidden link to efi object

2021-09-30 Thread AKASHI Takahiro
This member field in udevice will be used to dereference from udevice to efi_object (or efi_handle). Signed-off-by: AKASHI Takahiro --- include/dm/device.h | 4 1 file changed, 4 insertions(+) diff --git a/include/dm/device.h b/include/dm/device.h index 0a9718a5b81a..33b09a836f06 100644 --

Re: [PATCH] cmd: sf: Support unaligned flash updates with 'sf update'

2021-09-30 Thread Simon Glass
Hi Frieder, On Thu, 30 Sept 2021 at 10:20, Frieder Schrempf wrote: > > From: Frieder Schrempf > > Currently 'sf update' supports only offsets that are aligned to the > erase block size of the serial flash. Unaligned offsets result in > something like: > > => sf update ${kernel_addr_r} 0x400 ${fi

[RFC 10/22] efi_loader: disk: use udevice instead of blk_desc

2021-09-30 Thread AKASHI Takahiro
In most of all usages, we can avoid using blk_desc which is expected to be data private to the device not be accessed outside device drivers. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_disk.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git

[RFC 10/22] dm: blk: add read/write interfaces with udevice

2021-09-30 Thread AKASHI Takahiro
In include/blk.h, Simon suggested: ===> /* * These functions should take struct udevice instead of struct blk_desc, * but this is convenient for migration to driver model. Add a 'd' prefix * to the function operations, so that blk_read(), etc. can be reserved for * functions with the correct ar

[RFC 09/22] dm: blk: add read/write interfaces with udevice

2021-09-30 Thread AKASHI Takahiro
In include/blk.h, Simon suggested: ===> /* * These functions should take struct udevice instead of struct blk_desc, * but this is convenient for migration to driver model. Add a 'd' prefix * to the function operations, so that blk_read(), etc. can be reserved for * functions with the correct ar

[RFC 09/22] dm: blk: add a device-probe hook for scanning disk partitions

2021-09-30 Thread AKASHI Takahiro
Now that all the block device drivers have enable a probe hook, we will call blk_create_partitions() to enumerate all the partitions and create associated udevices when a block device is detected. Signed-off-by: AKASHI Takahiro --- drivers/block/blk-uclass.c | 15 +++ 1 file changed,

[RFC 08/22] dm: blk: add a device-probe hook for scanning disk partitions

2021-09-30 Thread AKASHI Takahiro
Now that all the block device drivers have enable a probe hook, we will call blk_create_partitions() to enumerate all the partitions and create associated udevices when a block device is detected. Signed-off-by: AKASHI Takahiro --- drivers/block/blk-uclass.c | 15 +++ 1 file changed,

[RFC 08/22] dm: blk: add UCLASS_PARTITION

2021-09-30 Thread AKASHI Takahiro
UCLASS_PARTITION device will be created as a child node of UCLASS_BLK device. Signed-off-by: AKASHI Takahiro --- drivers/block/blk-uclass.c | 111 + include/blk.h | 9 +++ include/dm/uclass-id.h | 1 + 3 files changed, 121 insertions(+) d

[RFC 07/22] dm: blk: add UCLASS_PARTITION

2021-09-30 Thread AKASHI Takahiro
UCLASS_PARTITION device will be created as a child node of UCLASS_BLK device. Signed-off-by: AKASHI Takahiro --- drivers/block/blk-uclass.c | 111 + include/blk.h | 9 +++ include/dm/uclass-id.h | 1 + 3 files changed, 121 insertions(+) d

[RFC 07/22] block: ide: call device_probe() after scanning

2021-09-30 Thread AKASHI Takahiro
Every time an ide bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro --- drive

[RFC 06/22] sata: call device_probe() after scanning

2021-09-30 Thread AKASHI Takahiro
Every time a sata bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro --- drive

[RFC 06/22] block: ide: call device_probe() after scanning

2021-09-30 Thread AKASHI Takahiro
Every time an ide bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro --- drive

[RFC 05/22] sata: call device_probe() after scanning

2021-09-30 Thread AKASHI Takahiro
Every time a sata bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro --- drive

[RFC 05/22] nvme: call device_probe() after scanning

2021-09-30 Thread AKASHI Takahiro
Every time a nvme bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro --- drive

[RFC 04/22] nvme: call device_probe() after scanning

2021-09-30 Thread AKASHI Takahiro
Every time a nvme bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro --- drive

[RFC 04/22] mmc: call device_probe() after scanning

2021-09-30 Thread AKASHI Takahiro
Every time a mmc bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro --- driver

[RFC 03/22] usb: storage: call device_probe() after scanning

2021-09-30 Thread AKASHI Takahiro
Every time a usb bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro --- common

[RFC 03/22] mmc: call device_probe() after scanning

2021-09-30 Thread AKASHI Takahiro
Every time a mmc bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro --- driver

[RFC 02/22] usb: storage: call device_probe() after scanning

2021-09-30 Thread AKASHI Takahiro
Every time a usb bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro --- common

[RFC 01/22] scsi: call device_probe() after scanning

2021-09-30 Thread AKASHI Takahiro
Every time a scsi bus/port is scanned and a new block device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro ---

[RFC 02/22] scsi: call device_probe() after scanning

2021-09-30 Thread AKASHI Takahiro
Every time a scsi bus/port is scanned and a new block device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro ---

[RFC 01/22] part: call part_init() in blk_get_device_by_str() only for MMC

2021-09-30 Thread AKASHI Takahiro
In blk_get_device_by_str(), the comment says: "Updates the partition table for the specified hw partition." Since hw partition is supported only on MMC, it makes no sense to do so for other devices. Signed-off-by: AKASHI Takahiro --- disk/part.c | 3 ++- 1 file changed, 2 insertions(+), 1 deleti

[RFC 00/22] efi_loader: more tightly integrate UEFI disks to device model

2021-09-30 Thread AKASHI Takahiro
The purpose of this RPC is to reignite the discussion about how UEFI subystem would best be integrated into U-Boot device model. In the past, I poposed a couple of patch series, the latest one[1], while Heinrich revealed his idea[2], and the approach taken here is something between them, with a foc

Re: [PATCH u-boot-marvell v3 00/39] kwboot higher baudrate

2021-09-30 Thread Stefan Roese
Hi Pali, On 30.09.21 20:14, Pali Rohár wrote: Hello! Could you test or review this patch series? It's on my list. It is a big improvement for kwboot as it allows to transfer u-boot over uart into mvebu platforms much faster. Very much appreciated. I'll try to find some time today to revie

Re: Driver model at UEFI runtime

2021-09-30 Thread Michael Walle
Am 2021-10-01 00:20, schrieb François Ozog: Le ven. 1 oct. 2021 à 00:00, Michael Walle a écrit : With SystemReady, DT from distros are ignored. Err? Is this really true, I know about some incompatible changes to the device tree which prevents you from using usb (or even a kernel panic) wit

Re: Driver model at UEFI runtime

2021-09-30 Thread François Ozog
Le ven. 1 oct. 2021 à 00:00, Michael Walle a écrit : > > With SystemReady, DT from distros are ignored. > > Err? Is this really true, I know about some incompatible changes > to the device tree which prevents you from using usb (or even a > kernel panic) with the imx8mm an

Re: Driver model at UEFI runtime

2021-09-30 Thread Michael Walle
With SystemReady, DT from distros are ignored. Err? Is this really true, I know about some incompatible changes to the device tree which prevents you from using usb (or even a kernel panic) with the imx8mm and I know that on the ls1028a flexspi wont work if the devicetree doesn't match the kerne

Re: Status of the various RISC-V specification and policy

2021-09-30 Thread Palmer Dabbelt
On Thu, 30 Sep 2021 10:38:02 PDT (-0700), markhimelst...@riscv.org wrote: The following is the extension lifecycle. It includes the official names going forward for each phase. We are trying to resolve any confusion naming and numbering and are still in progress of this evolution: https://docs.g

Re: [PATCH] cmd: sf: Support unaligned flash updates with 'sf update'

2021-09-30 Thread Michael Walle
Am 2021-09-30 18:19, schrieb Frieder Schrempf: From: Frieder Schrempf Currently 'sf update' supports only offsets that are aligned to the erase block size of the serial flash. Unaligned offsets result in something like: => sf update ${kernel_addr_r} 0x400 ${filesize} device 0 offset 0x400, siz

Re: [PATCH] cmd: sf: Support unaligned flash updates with 'sf update'

2021-09-30 Thread Michael Walle
Am 2021-09-30 19:17, schrieb Frieder Schrempf: On 30.09.21 18:35, Michael Walle wrote: Am 2021-09-30 18:19, schrieb Frieder Schrempf: In order to support unaligned updates, we simply read the first full block and check only the requested part of the block for changes. If necessary, the block is

Re: CI and ca-certificates packages

2021-09-30 Thread Tom Rini
On Thu, Sep 30, 2021 at 11:34:11AM -0400, Tom Rini wrote: > Hey all, > > Due to the combination of the Let's Encrypt root certificate change and > the CI images not ending up with a new enough ca-certificates package, > CI is currently failing. It looks like the best fix for this, sadly, is > to

Re: [GIT PULL] xilinx patches for v2022.01-rc1

2021-09-30 Thread Tom Rini
On Thu, Sep 30, 2021 at 04:50:11PM +0200, Michal Simek wrote: > Hi Tom, > > I want to clean my queue for next version that's why please merge these > patches to your tree. > > Thanks, > Michal > > > The following changes since commit 67ae2897235e516d8fa9ab3f296a1caf40f6ebee: > > Merge tag '

Re: [PATCH u-boot-marvell v3 00/39] kwboot higher baudrate

2021-09-30 Thread Pali Rohár
Hello! Could you test or review this patch series? It is a big improvement for kwboot as it allows to transfer u-boot over uart into mvebu platforms much faster. On Friday 24 September 2021 23:06:37 Marek Behún wrote: > From: Marek Behún > > Hello Stefan and others, > > here's v3 of series ad

Re: [PATCH] acpi: Use U-Boot version for OEM_REVISION

2021-09-30 Thread Tom Rini
On Wed, Sep 29, 2021 at 10:08:58PM -0600, Simon Glass wrote: > Hi Pali, > > On Sun, 12 Sept 2021 at 15:30, Pali Rohár wrote: > > > > On Tuesday 20 July 2021 12:32:46 Simon Glass wrote: > > > On Sat, 10 Jul 2021 at 05:10, Pali Rohár wrote: > > > > > > > > OEM_REVISION is 32-bit unsigned number. I

Re: Status of the various RISC-V specification and policy

2021-09-30 Thread Mark Himelstein
The following is the extension lifecycle. It includes the official names going forward for each phase. We are trying to resolve any confusion naming and numbering and are still in progress of this evolution: https://docs.google.com/presentation/d/1nQ5uFb39KA6gvUi5SReWfIQSiRN7hp6z7ZPfctE4mKk/edit?u

Re: Status of the various RISC-V specification and policy

2021-09-30 Thread Palmer Dabbelt
On Thu, 30 Sep 2021 08:06:42 PDT (-0700), markhimelst...@riscv.org wrote: Palmer, Thank you for your input. Our strong intention is to not change specs once frozen. I speak for the committees here and say that, in our opinion, declaring something frozen sets a very high bar for making any c

Re: [PATCH] cmd: sf: Support unaligned flash updates with 'sf update'

2021-09-30 Thread Frieder Schrempf
On 30.09.21 18:35, Michael Walle wrote: > Am 2021-09-30 18:19, schrieb Frieder Schrempf: >> In order to support unaligned updates, we simply read the first full >> block and check only the requested part of the block for changes. If >> necessary, the block is erased, the first (unchanged) part of t

Re: Driver model at UEFI runtime

2021-09-30 Thread François Ozog
On Thu, 30 Sept 2021 at 18:25, Michael Walle wrote: > Am 2021-09-30 17:47, schrieb François Ozog: > > On Thu, 30 Sept 2021 at 17:12, Michael Walle wrote: > > > >> [adding Vladimir, because he showed interest in this, too] > >> > >> Am 2021-09-30 15:56, schrieb François Ozog: > >>> On Thu, 30 Sep

Re: [PATCH] cmd: sf: Support unaligned flash updates with 'sf update'

2021-09-30 Thread Michael Walle
Am 2021-09-30 18:19, schrieb Frieder Schrempf: In order to support unaligned updates, we simply read the first full block and check only the requested part of the block for changes. If necessary, the block is erased, the first (unchanged) part of the block is written back together with the second

Re: Driver model at UEFI runtime

2021-09-30 Thread Michael Walle
Am 2021-09-30 17:47, schrieb François Ozog: On Thu, 30 Sept 2021 at 17:12, Michael Walle wrote: [adding Vladimir, because he showed interest in this, too] Am 2021-09-30 15:56, schrieb François Ozog: On Thu, 30 Sept 2021 at 14:07, Michael Walle wrote: Am 2021-09-30 12:50, schrieb Heinric

  1   2   >