Re: [RESEND PATCH v3 21/29] arm64: Import some ESR and SPSR defines from Linux

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 05:18:37PM -0400, Sean Anderson wrote: > This imports some defines for esr and spsr from Linux v5.16. I have > modified the includes and fixed some indentation nits but otherwise it > is the same. There are a lot more defines than we need, but it doesn't > hurt. > > Signed

Re: [RESEND PATCH v3 19/29] arm64: Save esr in pt_regs

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 05:17:35PM -0400, Sean Anderson wrote: > To avoid passing around an extra register everywhere, save esr in > pt_regs like the rest. For proper alignment we need to have a second > (unused) register. All the printfs have to be adjusted, since > it's now an unsigned long and

Re: [RESEND PATCH v3 18/29] ls1046ardb: Add support for JTAG boot

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 05:16:05PM -0400, Sean Anderson wrote: > This adds support for booting entirely from JTAG while using a > hard-coded RCW. With these steps, it is not necessary to program a > "good" RCW using CodeWarrior. The method here can be performed with any > JTAG adapter supported by

Re: [PATCH v3 26/29] serial: dm: Add support for puts

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:34PM -0400, Sean Anderson wrote: > Some serial drivers can be vastly more efficient when printing multiple > characters at once. Non-DM serial has had a puts option for these sorts > of drivers; implement it for DM serial as well. > > Because we have to add carriage

Re: [PATCH v3 25/29] arm64: ls1046a: Support semihosting fallback

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:33PM -0400, Sean Anderson wrote: > Use the semihosting_enabled function to determine whether or not to > enable semihosting devices. This allows for graceful fallback in the > event a debugger is not attached. > > Signed-off-by: Sean Anderson Applied to u-boot/next

Re: [PATCH v3 24/29] serial: smh: Initialize serial only if semihosting is enabled

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:32PM -0400, Sean Anderson wrote: > If semihosting is disabled, then the user has no debugger attached, and > will not see any messages. Don't create a serial device in this > instance, to (hopefully) fall back on another working serial device. > > Signed-off-by: Sean

Re: [PATCH v3 23/29] arm64: Catch non-emulated semihosting calls

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:31PM -0400, Sean Anderson wrote: > If a debugger is not attached to U-Boot, semihosting calls will raise a > synchronous abort exception. Try to catch this and disable semihosting > so we can e.g. use another uart if one is available. In the immediate > case, we retur

Re: [PATCH v3 22/29] arm: smh: Add option to detect semihosting

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:30PM -0400, Sean Anderson wrote: > These functions are intended to support detecting semihosting and > falling back gracefully to alternative implementations. The test starts > by making semihosting call. SYS_ERRNO is chosen because it should not > mutate any state. I

Re: [PATCH v3 20/29] arm64: Save spsr in pt_regs

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:28PM -0400, Sean Anderson wrote: > This register holds "pstate" which includes (among other things) the > instruction mode the CPU was in when the exception was taken. This is > necessary to correctly interpret instructions at elr. > > Signed-off-by: Sean Anderson

Re: [PATCH v3 17/29] doc: smh: Update semihosting documentation

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:25PM -0400, Sean Anderson wrote: > This documents how to use semihosting, the new semihosting features, and > how to migrate from smhload. > > Signed-off-by: Sean Anderson Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v3 16/29] serial: Add semihosting driver

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:24PM -0400, Sean Anderson wrote: > This adds a serial driver which uses semihosting calls to read and write > to the host's console. For convenience, if CONFIG_DM_SERIAL is enabled, > we will instantiate a serial driver. This allows users to enable this > driver (whic

Re: [PATCH v3 15/29] arm: smh: Add some functions for working with the host console

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:23PM -0400, Sean Anderson wrote: > This adds three wrappers around the semihosting commands for reading and > writing to the host console. We use the more standard getc/putc/puts > names instead of readc/writec/write0 for familiarity. > > Signed-off-by: Sean Anderson

Re: [PATCH v3 14/29] arm: smh: Remove smhload command

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:22PM -0400, Sean Anderson wrote: > This command's functionality is now completely implemented by the > standard fs load command. Convert the vexpress64 boot command (which is > the only user) and remove the implementation. > > Signed-off-by: Sean Anderson Applied t

Re: [PATCH v3 13/29] cmd: fdt: Use start/size for chosen instead of start/end

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:21PM -0400, Sean Anderson wrote: > Most U-Boot command deal with start/size instead of start/end. Convert > the "fdt chosen" command to use these semantics as well. The only user > of this subcommand is vexpress, so convert the smhload command to use > this as well. W

Re: [PATCH v3 12/29] fs: Add semihosting filesystem

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:20PM -0400, Sean Anderson wrote: > This adds a filesystem which is backed by the host's filesystem. It is > modeled off of sandboxfs, which has very similar aims. Semihosting > doesn't support listing directories (except with SYS_SYSTEM), so neither > do we. it's poss

Re: [PATCH v3 11/29] spl: Add semihosting boot method

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:19PM -0400, Sean Anderson wrote: > This adds a boot method for loading the next stage from the host. It is > mostly modeled off of spl_load_image_ext. I am not really sure why/how > spl_load_image_fat uses three different methods to load the image, but > the simple ca

Re: [PATCH v3 10/29] arm: smh: Add some file manipulation commands

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:18PM -0400, Sean Anderson wrote: > In order to add filesystem support, we will need to be able to seek and > write files. Add the appropriate helper functions. > > Signed-off-by: Sean Anderson Applied to u-boot/next, thanks! -- Tom signature.asc Description: PG

Re: [PATCH v3 08/29] arm: smh: Return errno on error

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:16PM -0400, Sean Anderson wrote: > Instead of printing in what are now library functions, try to return a > numeric error code. This also adjust some functions (such as read) to > behave more similarly to read(2). For example, we now return the number > of bytes read

Re: [PATCH v3 02/29] nxp: ls1046ardb: Convert README to rST

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:10PM -0400, Sean Anderson wrote: > This converts the readme for this board to rST. I have tried not to > change any semantics from the original (though I did convert MB to M). > > Signed-off-by: Sean Anderson Applied to u-boot/next, thanks! -- Tom signature.asc

Re: [PATCH v3 06/29] arm: smh: Export semihosting functions

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:14PM -0400, Sean Anderson wrote: > This exports semihosting functions for use in other files. The header is > in include/ and not arm/include/asm because I anticipate that RISC-V may > want to add their own implementation at some point. > > smh_len_fd has been rename

Re: [PATCH v3 09/29] arm: smh: Document functions in header

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:17PM -0400, Sean Anderson wrote: > This adds some documentation for semihosting functions in the header. > > Signed-off-by: Sean Anderson Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v3 07/29] arm: smh: Use numeric modes for smh_open

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:15PM -0400, Sean Anderson wrote: > There's no point in using string constants for smh_open if we are just > going to have to parse them. Instead, use numeric modes. The user needs > to be a bit careful with these, since they are much closer semantically > to string mo

Re: [PATCH v3 03/29] doc: ls1046ardb: Expand boot mode section

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:11PM -0400, Sean Anderson wrote: > This adds some additional info about booting from different sources, > including the correct switch positions. > > Signed-off-by: Sean Anderson Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v3 04/29] doc: ls1046ardb: Document debug uart

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:12PM -0400, Sean Anderson wrote: > This adds some instructions for enabling the debug uart, including the > correct address and clock rate. > > Signed-off-by: Sean Anderson Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v3 05/29] arm: smh: Add semihosting entry to MAINTAINERS

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:13PM -0400, Sean Anderson wrote: > These files are spread all over the tree, so just use a regex. Orphaned > for now, since this is more of a "one-off" series. Though I'll be happy > to review patches. > > Signed-off-by: Sean Anderson Applied to u-boot/next, thanks

Re: [PATCH v3 01/29] doc: Convert semihosting readme to rST

2022-04-02 Thread Tom Rini
On Tue, Mar 22, 2022 at 04:59:09PM -0400, Sean Anderson wrote: > This converts the semihosting readme to rST. I have tried to make only > cosmetic changes, but I did fix up the first link (which was broken). > > Signed-off-by: Sean Anderson Applied to u-boot/next, thanks! -- Tom signature.a

Re: [PATCH 11/11] vexpress64: Add ARMv8R-64 board variant

2022-04-02 Thread Tom Rini
On Fri, Mar 04, 2022 at 04:30:18PM +, Andre Przywara wrote: > From: Peter Hoyes > > The ARMv8-R64 architecture introduces optional VMSA (paging based MMU) > support in the EL1/0 translation regime, which makes that part mostly > compatible to ARMv8-A. > > Add a new board variant to describe

Re: [PATCH 10/11] vexpress64: pick DRAM size from DT

2022-04-02 Thread Tom Rini
On Fri, Mar 04, 2022 at 04:30:17PM +, Andre Przywara wrote: > So far the DRAM size for both the Juno and the FVP model were hardcoded > in our config header file. For the Juno this is fine, as all models have > 8 GiB of DRAM, but the DRAM size can be configured on the model command > line. >

Re: [PATCH 09/11] vexpress64: generalise page table generation

2022-04-02 Thread Tom Rini
On Fri, Mar 04, 2022 at 04:30:16PM +, Andre Przywara wrote: > In preparation for the ARMv8-R64 FVP support, which has DRAM mapped at > 0x0, generalise the page table generation, by using symbolic names for > the address ranges instead of fixed numbers. > > We already define the base of the DR

Re: [PATCH 08/11] vexpress64: defconfigs: allow default commands

2022-04-02 Thread Tom Rini
On Fri, Mar 04, 2022 at 04:30:15PM +, Andre Przywara wrote: > Right now the defconfig the Arm VExpress64 boards disables quite some > standard commands, for apparently no good reasons (as image size is > hardly a concern here). > > Remove the lines explicitly disabling those features, leaving

Re: [PATCH 06/11] vexpress64: move hardware setting from defconfig to Kconfig

2022-04-02 Thread Tom Rini
On Fri, Mar 04, 2022 at 04:30:13PM +, Andre Przywara wrote: > The defconfigs for the Arm Juno board and the FVP model are quite large, > setting a lot of platform-fixed variables like SYS_TEXT_BASE. > As those values are not really a user choice, let's provide default > values for them in our

Re: [PATCH 05/11] vexpress64: config header: unify environment definition

2022-04-02 Thread Tom Rini
On Fri, Mar 04, 2022 at 04:30:12PM +, Andre Przywara wrote: > The definition of the standard environment variables (kernel_addr_r and > friends) has been improved lately for the FVP model, but the Juno board > is still using some custom scheme. > Since we need to extend this to a third board s

Re: [PATCH 04/11] vexpress64: fvp: enable OF_CONTROL

2022-04-02 Thread Tom Rini
On Fri, Mar 04, 2022 at 04:30:11PM +, Andre Przywara wrote: > The FVP base model is relying on a DT for Linux operation, so there is > no reason we would need to rely on hardcoded information for U-Boot. > Letting U-Boot use a DT will open up the usage of actual peripherals, > beyond the suppor

Re: [PATCH 02/11] vexpress64: Kconfig: move board definitions out of arch/arm

2022-04-02 Thread Tom Rini
On Fri, Mar 04, 2022 at 04:30:09PM +, Andre Przywara wrote: > At the moment we define three "VExpress64" boards in arch/arm/Kconfig, > plus have a second Kconfig file in board/armltd/Kconfig. > One of those three boards is actually bogus (TARGET_VEXPRESS64_AEMV8A), > that stanza looks like bei

Re: [PATCH 03/11] arm: dts: Add Arm FVP Fastmodel RevC .dts files from Linux

2022-04-02 Thread Tom Rini
On Fri, Mar 04, 2022 at 04:30:10PM +, Andre Przywara wrote: > The Arm Fixed Virtual Platform (FVP) is a software model for an > artificial ARM platform, it is available for free on the Arm website[1]. > > Add the devicetree files for the latest RevC version, as we will need > them to enable O

Re: [PATCH 5/6] net: add MV88E61xx DSA driver

2022-04-02 Thread Vladimir Oltean
On Fri, Apr 01, 2022 at 01:24:48PM -0700, Tim Harvey wrote: > > > > Why is mv88e61xx_dsa_xmit() no-op? > > > > > > For DSA dsa-uclass calls the switch master eth device send function > > > after calling the dsa_ops->xmit function so that a dsa driver can add > > > any header/footer if needed. The f

Re: TFTP hangs with fragmented IP packets

2022-04-02 Thread Ramon Fried
On Thu, Mar 31, 2022 at 8:43 AM Ramon Fried wrote: > > On Tue, Mar 29, 2022 at 11:28 PM Laurent Pinchart > wrote: > > > > Hello, > > > > I've banged my head a few days ago trying to debug an issue with a TFTP > > transfer hanging in the middle. > > > > I'm testing U-Boot 2022-rc5 on a Toradex Ver

[PATCH 0/2] powerpc: dts: p2020: Allow to use P2020 DTS files from Linux

2022-04-02 Thread Pali Rohár
This patch series imports device tree include files for comaptibility with P2020 device tree files from upstream Linux kernel. So it allows to share same P2020 board device tree files between Linux kernel and U-Boot. Pali Rohár (2): powerpc: dts: p2020: Add fsl/p2020si-pre.dtsi and fsl/p2020

[PATCH 2/2] powerpc: dts: p2020: Add serial0 and serial1 via pq3-duart-0.dtsi

2022-04-02 Thread Pali Rohár
Import pq3-duart-0.dtsi device tree include file from upstream Linux kernel for P2020. This allows U-Boot to use P2020 device tree files from upstream Linux kernel which reference serial0 or serial1 devices. Signed-off-by: Pali Rohár --- arch/powerpc/dts/p2020-post.dtsi | 1 + arch/powerpc/dts

[PATCH 1/2] powerpc: dts: p2020: Add fsl/p2020si-pre.dtsi and fsl/p2020si-post.dtsi symlinks

2022-04-02 Thread Pali Rohár
P2020 DTS files in upstream Linux kernel use fsl/p2020si-pre.dtsi and fsl/p2020si-post.dtsi include device tree files. Add symlinks for these include device tree files into U-Boot powerpc directory and points them to U-Boot inline device tree files p2020.dtsi and p2020-post.dtsi. This allows to u

[PATCH] misc: atsha204a: Fix big endian support

2022-04-02 Thread Pali Rohár
Callers of function atsha204a_crc16() expect to return value in host cpu endianity. So remove cpu_to_le16() conversion. Signed-off-by: Pali Rohár --- drivers/misc/atsha204a-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha

[PATCH 3/3] board: freescale: p1_p2_rdb_pc: Allow to compile it without env support

2022-04-02 Thread Pali Rohár
When env support is disabled then usage of env_init() or env_relocate() generates linker errors. So do not compile env_init() or env_relocate() in SPL code when env support is disabled in SPL. Signed-off-by: Pali Rohár --- board/freescale/p1_p2_rdb_pc/spl.c | 4 1 file changed, 4 insertions

[PATCH 1/3] hwconfig: Allow to compile it without env support

2022-04-02 Thread Pali Rohár
When env support is disabled then usage of env_get() generates linker errors. So do not compile env_get() when env support is disabled (for example when disabled only in SPL). Signed-off-by: Pali Rohár --- common/hwconfig.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/hwconfig.c

[PATCH 2/3] ddr: fsl: Allow to compile it without env support

2022-04-02 Thread Pali Rohár
When env support is disabled then usage of env_get_f() generates linker errors. So do not compile env_get_f() when env support is disabled (for example when disabled only in SPL). Signed-off-by: Pali Rohár --- drivers/ddr/fsl/options.c | 4 1 file changed, 4 insertions(+) diff --git a/driv

[PATCH 0/3] powerpc: p2020: Allow to compile it without env support

2022-04-02 Thread Pali Rohár
This patch series allows to compile SPL for P2020 without env support when proper U-Boot has env support enabled. Pali Rohár (3): hwconfig: Allow to compile it without env support ddr: fsl: Allow to compile it without env support board: freescale: p1_p2_rdb_pc: Allow to compile it without en

[PATCH] mmc: mmc_mode_name() is used also when LOGLEVEL >= LOGL_DEBUG

2022-04-02 Thread Pali Rohár
When CONFIG_LOGLEVEL is set to LOGL_DEBUG or higher then linker throws error about undefined symbol mmc_mode_name(). So compile mmc_mode_name() also when CONFIG_LOGLEVEL is set to LOGL_DEBUG or higher. Signed-off-by: Pali Rohár --- drivers/mmc/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH 3/3] mmc: fsl_esdhc_spl: Call mmc_init() before booting from SD card

2022-04-02 Thread Pali Rohár
If env is stored on SD card then U-Boot SPL automatically calls mmc_init() before it is going to load proper U-Boot from SD card. If env is not stored on SD card then U-Boot SPL fails to read proper U-Boot from SD card due to missing mmc_init() call. So add missing mmc_init() call into fsl_esdhc_

[PATCH 2/3] mmc: fsl_esdhc_spl: pre-PBL: fix determining U-Boot size

2022-04-02 Thread Pali Rohár
In pre-PBL header is stored size of code which BootROM copies from SD card to L2/SRAM. This size has upper limit of L2 cache size. In most cases this is size of U-Boot SPL or size of L2 cache. Therefore this size in pre-PBL header cannot be used for determining size of proper U-Boot. So always us

[PATCH 0/3] mmc: fsl_esdhc_spl: Fix booting P2020 from SD card

2022-04-02 Thread Pali Rohár
This patch series contains fixes which makes SPL running on P2020 board to load proper U-Boot from SD card with non-default or non-common configuration. Tested on P2020 based board. Pali Rohár (3): mmc: fsl_esdhc_spl: pre-PBL: check for BOOT signature instead of MBR/DBR mmc: fsl_esdhc_spl:

[PATCH 1/3] mmc: fsl_esdhc_spl: pre-PBL: check for BOOT signature instead of MBR/DBR

2022-04-02 Thread Pali Rohár
Pre-PBL BootROMs (MPC8536E, MPC8569E, P2020, P1011, P1012, P1013, P1020, P1021, P1022) require custom BOOT signature on sector 0 and MBR/DBR signature is not required at all. So add check for BOOT signature and remove check for MBR/DBR. This allows U-Boot SPL to load proper U-Boot on pre-PBL Boot

[PATCH 2/3] powerpc: mpc85xx: Rename _start_e500 symbol to _start

2022-04-02 Thread Pali Rohár
The real entry point is _start_e500. There is no _start symbol at all. So rename _start_e500 to _start for convension that _start symbol is used as entry point. Signed-off-by: Pali Rohár --- arch/powerpc/cpu/mpc85xx/resetvec.S | 2 +- arch/powerpc/cpu/mpc85xx/start.S| 4 ++-- arch/powerpc/cp

[PATCH 3/3] powerpc: mpc85xx: Show e500 core version

2022-04-02 Thread Pali Rohár
Distinguish between e500v1 and e500v2. Signed-off-by: Pali Rohár --- arch/powerpc/cpu/mpc85xx/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index cd32290410f6..261f79e40585 100644 --- a/arch/powerpc/cp

[PATCH 0/3] powerpc: mpc85xx: Cleanup code

2022-04-02 Thread Pali Rohár
This patch series cleanups mpc85xx e500 code. It removes _start symbol together with its content because it is useless and then rename symbol _start_e500 to _start as this is the real entry point. Third patch just show e500 core version. Tested on P2020 board with configuration when BootROM loads

[PATCH 1/3] powerpc: mpc85xx: Drop _start symbol

2022-04-02 Thread Pali Rohár
_start symbol contains only 32-bit data number 0x27051956 despite it is marked as text section. This magic number is IH_MAGIC which is used for marking uboot image header. mpc85xx start.S code does not define valid uboot image header, so IH_MAGIC number in _start symbol is useless there. Moreover

[PATCH 5/5] patman: test_util: Print test stdout/stderr within test summaries

2022-04-02 Thread Alper Nebi Yasak
While running tests for a python tool, the tests' outputs get printed in whatever order they happen to run, without any indication as to which output belongs to which test. Unittest supports capturing these outputs and printing them as part of the test summaries, but when a failure or error occurs

[PATCH 3/5] patman: test_util: Use unittest text runner to print test results

2022-04-02 Thread Alper Nebi Yasak
The python tools' test utilities handle printing test results, but the output is quite bare compared to an ordinary unittest run. Delegate printing the results to a unittest text runner, which gives us niceties like clear separation between each test's result and how long it took to run the test su

[PATCH 4/5] patman: test_util: Customize unittest test results for more info

2022-04-02 Thread Alper Nebi Yasak
By default, unittest test summaries only print extended info about tests that failed or couldn't run due to an error. Use a custom text result class to print info about more cases: skipped tests, expected failures and unexpected successes. Signed-off-by: Alper Nebi Yasak --- This could be squashe

[PATCH 2/5] patman: test_util: Handle nonexistent tests while loading tests

2022-04-02 Thread Alper Nebi Yasak
It's possible to request a specific test to run when trying to run a python tool's tests. If we request a nonexistent test, the unittest loaders generate a fake test that reports this as an error. However, we get these fake tests even when the test exists, because test_util can load tests from mult

[PATCH 1/5] patman: test_util: Fix printing results for failed tests

2022-04-02 Thread Alper Nebi Yasak
When printing a python tool's test results, the entire list of failed tests and their tracebacks are reprinted for every failed test. This makes the test output quite unreadable. Fix the loop to print failures and tracebacks one at a time. Signed-off-by: Alper Nebi Yasak --- tools/patman/test_u

[PATCH 0/5] patman: test_util: Prettify test report outputs for python tools

2022-04-02 Thread Alper Nebi Yasak
These are a few changes to the test utilities shared by binman, patman, buildman and dtoc to make their printed test results cleaner. Simon has sent a patch making test_fdt use these utils [1], this applies on top of that and affects its output as well. [1] dtoc: Update fdt tests to use test_util

[PATCH 3/4] efi_loader: EFI_HII_STRING_PROTOCOL.GetString()

2022-04-02 Thread Heinrich Schuchardt
Use u16_strsize(). Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_hii.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_hii.c b/lib/efi_loader/efi_hii.c index 9f87e95e32..75ff58aafa 100644 --- a/lib/efi_loader/efi_hii.c +++ b/lib/efi_loader/efi_h

[PATCH 2/4] lib: simplify u16_strdup()

2022-04-02 Thread Heinrich Schuchardt
Use u16_strsize() instead of duplicating it. Signed-off-by: Heinrich Schuchardt --- lib/charset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/charset.c b/lib/charset.c index 91cbe87509..de201cf3b9 100644 --- a/lib/charset.c +++ b/lib/charset.c @@ -407,7 +407,7 @@ u16

[PATCH 4/4] efi_loader: simplify efi_serialize_load_option()

2022-04-02 Thread Heinrich Schuchardt
Use u16_strsize(). Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_load_options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_load_options.c b/lib/efi_loader/efi_load_options.c index 68cd85ba2e..71454f0fc6 100644 --- a/lib/efi_loader/efi_load

[PATCH 1/4] lib: convert u16_strlen() into a macro

2022-04-02 Thread Heinrich Schuchardt
The function u16_strlen() can be implemented as call to u16_strnlen(). Signed-off-by: Heinrich Schuchardt --- include/charset.h | 26 ++ lib/charset.c | 12 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/include/charset.h b/include/chars

[PATCH 0/4] efi_loader: simplify string handling

2022-04-02 Thread Heinrich Schuchardt
* convert u16_strlen() into a macro * use u16_size() instead of u16_strlen() to simplify code Heinrich Schuchardt (4): lib: convert u16_strlen() into a macro lib: simplify u16_strdup() efi_loader: EFI_HII_STRING_PROTOCOL.GetString() efi_loader: simplify efi_serialize_load_option() includ

Re: [PATCH v5 5/8] test: capsule: Modify the capsule tests to use GUID values for sandbox

2022-04-02 Thread Heinrich Schuchardt
On 4/1/22 21:17, Sughosh Ganu wrote: The current UEFI capsule updation code uses two GUID values, one for FIT images, and one for raw images across platforms. This logic is being changed to have GUID values per image, per platform. Change the tests for the capsule update code to reflect this chan

Re: [PATCH v5 4/8] efi: Define set_dfu_alt_info() for boards with UEFI capsule update enabled

2022-04-02 Thread Heinrich Schuchardt
On 4/1/22 21:17, Sughosh Ganu wrote: Currently, there are a bunch of boards which enable the UEFI capsule update feature. The actual update of the firmware images is done through the dfu framework which uses the dfu_alt_info environment variable for getting information on the update, like device,

Re: [PATCH v5 1/8] capsule: board: Add information needed for capsule updates

2022-04-02 Thread Heinrich Schuchardt
On 4/1/22 21:17, Sughosh Ganu wrote: Add a structure which defines the information that is needed for executing capsule updates on a platform. Some information in the structure is used for making the update process more robust while some information is used for fixing some issues. Initialise this

Re: [PATCH v4 04/11] menu: always show the menu regardless of the number of entry

2022-04-02 Thread Heinrich Schuchardt
On 3/24/22 14:54, Masahisa Kojima wrote: To make user aware of the menu entry selection, menu always appears regardless of the number of entry. Signed-off-by: Masahisa Kojima --- Newly created in v4 common/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/men

Re: [PATCH v4 03/11] test: unit test for u16_strlcat()

2022-04-02 Thread Heinrich Schuchardt
On 3/24/22 14:54, Masahisa Kojima wrote: Provide a unit test for function u16_strlcat(). Signed-off-by: Masahisa Kojima Reviewed-by: Simon Glass --- No change since v2 Newly created in v2 test/unicode_ut.c | 45 + 1 file changed, 45 insertions(+

Re: [PATCH v4 02/11] lib/charset: add u16_strlcat() function

2022-04-02 Thread Heinrich Schuchardt
On 3/24/22 14:54, Masahisa Kojima wrote: Provide u16 string version of strlcat(). Signed-off-by: Masahisa Kojima Reviewed-by: Simon Glass --- Changes in v4: - add blank line above the return statement Changes in v2: - implement u16_strlcat(with the destination buffer size in argument) inst