[U-Boot] [PATCH 1/4] fs: cbfs: remove wrong header validation

2018-12-22 Thread Bin Meng
From: Christian Gmeiner cbfs_fileheader.len indicates the content size of the file in the cbfs, and it has nothing to do with cbfs_fileheader.offset which is the starting address of the file in the cbfs. Remove such check in file_cbfs_next_file(). Before this change 'cbfsinit' failed with 'Bad C

[U-Boot] [PATCH 4/4] fs: cbfs: Add missing standard CBFS component types

2018-12-22 Thread Bin Meng
Current CBFS component type list is incomplete. Add missing ones. Signed-off-by: Bin Meng --- cmd/cbfs.c | 30 ++ include/cbfs.h | 10 ++ 2 files changed, 40 insertions(+) diff --git a/cmd/cbfs.c b/cmd/cbfs.c index 4d3e006..c118a95 100644 --- a/cmd/cbfs.

[U-Boot] [PATCH 2/4] fs: cbfs: Fix out of bound access during CBFS walking through

2018-12-22 Thread Bin Meng
The call to file_cbfs_fill_cache() is given with the parameter 'start' pointing to the offset by the CBFS base address, but with the parameter 'size' that equals to the whole CBFS size. During CBFS walking through, it checks files one by one and after it pass over the end of the CBFS which is 4GiB

[U-Boot] [PATCH 3/4] fs: cbfs: Make all CBFS_TYPE_xxx macros consistent

2018-12-22 Thread Bin Meng
At present there are 2 macros that are named as CBFS_COMPONENT_xxx. Change them to CBFS_TYPE_xxx for consistency. Signed-off-by: Bin Meng --- cmd/cbfs.c | 4 ++-- include/cbfs.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/cbfs.c b/cmd/cbfs.c index ece790e..4

Re: [U-Boot] [PATCH] fs: cbfs: remove wrong header validation

2018-12-22 Thread Bin Meng
Hi Christian, On Tue, Dec 18, 2018 at 4:57 PM Bin Meng wrote: > > Hi Christian, > > On Tue, Dec 18, 2018 at 4:18 PM Christian Gmeiner > wrote: > > > > Am Mi., 12. Dez. 2018 um 15:27 Uhr schrieb Christian Gmeiner > > : > > > > > > Hi Bin, > > > > > > Finally I have some time to look deeper into t

Re: [U-Boot] [PATCH] fs: cbfs: remove wrong header validation

2018-12-22 Thread Andre Heider
Hi Bin, this patch reminds me of one I sent some time ago: http://patchwork.ozlabs.org/patch/873666/ I forgot about it, so didn't follow up on the comments, but iirc this fixed a 'Bad CBFS file' error for me too. Does that work for you? Regards, Andre On 22/12/2018 10:58, Bin Meng wrote: Hi

Re: [U-Boot] [PATCH] Add support for initializing MMC

2018-12-22 Thread Simon Glass
Hi Tien, On Fri, 21 Dec 2018 at 10:50, Chee, Tien Fong wrote: > > On Fri, 2018-12-21 at 10:16 -0700, Simon Glass wrote: > > Hi, > > > > On Fri, 21 Dec 2018 at 01:25, Chee, Tien Fong > om> wrote: > > > > > > > > > On Fri, 2018-12-14 at 14:53 +0800, tien.fong.c...@intel.com wrote: > > > > > > > >

Re: [U-Boot] [PATCH v2 1/1] avb: add support for named persistent values

2018-12-22 Thread Simon Glass
Hi Igor, On Fri, 14 Dec 2018 at 10:45, Igor Opaniuk wrote: > > AVB version 1.1 introduces support for named persistent values > that must be tamper evident and allows AVB to store arbitrary key-value > pairs [1]. > > Introduce implementation of two additional AVB operations > read_persistent_valu

[U-Boot] SPL debug messages (All of them!) - how?

2018-12-22 Thread Nikolai Zhubr
Hi people, I'm struggling trying to figure how to totally enable all of those nice debug() statements so as to debug a problem in SPL. The CONFIG_LOGLEVEL is set to 7, have also tried to all KCFLAGS=-DDEBUG but apparently it has all no effect for SPL. So I'm asking for advice (and I'd definite

Re: [U-Boot] SPL debug messages (All of them!) - how?

2018-12-22 Thread Nikolai Zhubr
Hi again, 23.12.2018 0:06, I wrote: I'm struggling trying to figure how to totally enable all of those nice debug() statements so as to debug a problem in SPL. The CONFIG_LOGLEVEL is set to 7, have also tried to all KCFLAGS=-DDEBUG but apparently it has all no effect for SPL. So I'm asking for a

Re: [U-Boot] SPL debug messages (All of them!) - how?

2018-12-22 Thread Nikolai Zhubr
Hi again, 23.12.2018 1:06, I wrote: mkimage signature not found - ih_magic = 0 Jumping to U-Boot SPL malloc() used 0x0 bytes (0 KB) loaded - jumping to U-Boot... image entry point: 0x4a00 It looks like SPL loads 0x0 bytes of u-boot and runs it! Hmm, It appears not zero size but rather zer

Re: [U-Boot] [PATCH v2 1/1] efi_loader: efi_add_runtime_mmio()

2018-12-22 Thread Heinrich Schuchardt
On 12/19/18 10:42 PM, Heinrich Schuchardt wrote: > The first parameter of efi_add_runtime_mmio() is a pointer to a > pointer. This should be reflected both in the signature and in the > documentation. > > Signed-off-by: Heinrich Schuchardt > --- > v2 > Correct the commit message and title.

Re: [U-Boot] [PATCH 1/1] distro_bootcmd: add NVME support

2018-12-22 Thread Alexander Graf
On 21.12.18 22:15, Simon Glass wrote: > On Thu, 20 Dec 2018 at 18:18, Heinrich Schuchardt wrote: >> >> Some boards support NVME drives. We should be able to use them as boot >> devices. >> >> NVME access requires running 'nvme scan'. >> >> Signed-off-by: Heinrich Schuchardt >> --- >> include/c

Re: [U-Boot] [PATCH v2 1/1] efi_loader: efi_add_runtime_mmio()

2018-12-22 Thread Alexander Graf
On 23.12.18 00:55, Heinrich Schuchardt wrote: > On 12/19/18 10:42 PM, Heinrich Schuchardt wrote: >> The first parameter of efi_add_runtime_mmio() is a pointer to a >> pointer. This should be reflected both in the signature and in the >> documentation. >> >> Signed-off-by: Heinrich Schuchardt >>

[U-Boot] [PATCH 1/1] efi_loader: efi_add_runtime_mmio()

2018-12-22 Thread Heinrich Schuchardt
The first parameter of efi_add_runtime_mmio() is a pointer to a pointer. This should be reflected in the documentation. Signed-off-by: Heinrich Schuchardt --- v3 only change a comment --- lib/efi_loader/efi_runtime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/l

Re: [U-Boot] [RESEND PATCH v2 2/6] efi_loader: Initial HII database protocols

2018-12-22 Thread Alexander Graf
On 17.12.18 02:16, AKASHI Takahiro wrote: > On Sun, Dec 16, 2018 at 09:36:38PM +0100, Heinrich Schuchardt wrote: >> On 12/14/18 11:10 AM, AKASHI Takahiro wrote: >>> From: Leif Lindholm >>> >>> This patch provides enough implementation of the following protocols to >>> run EDKII's Shell.efi and U

Re: [U-Boot] [PATCH v3 8/8] cmd: env: add "-e" option for handling UEFI variables

2018-12-22 Thread Alexander Graf
On 19.12.18 13:23, Heinrich Schuchardt wrote: > On 12/19/18 2:49 AM, AKASHI Takahiro wrote: >> Heinrich, >> >> On Tue, Dec 18, 2018 at 07:07:02AM +0100, Heinrich Schuchardt wrote: >>> On 12/18/18 6:05 AM, AKASHI Takahiro wrote: "env [print|set] -e" allows for handling uefi variables without

Re: [U-Boot] [PATCH 1/5] efi_loader: bootmgr: support BootNext and BootCurrent variable behavior

2018-12-22 Thread Alexander Graf
On 18.12.18 06:02, AKASHI Takahiro wrote: > See UEFI v2.7, section 3.1.2 for details of the specification. > > With my efishell command[1], you can try as the following: > => efi boot add 1 SHELL ... > => efi boot add 2 HELLO ... > => efi boot order 1 2 > => efi bootmgr > (starting

Re: [U-Boot] [PATCH 2/5] efi_loader: bootmgr: allow for running a given load option

2018-12-22 Thread Alexander Graf
On 18.12.18 06:02, AKASHI Takahiro wrote: > With an extra argument, efi_bootmgr_load() can now load an efi binary > based on a "Boot" variable specified. > > Signed-off-by: AKASHI Takahiro > --- > cmd/bootefi.c| 2 +- > include/efi_loader.h | 3 ++- > lib/efi_loader

Re: [U-Boot] [PATCH 3/5] cmd: bootefi: carve out fdt parameter handling

2018-12-22 Thread Alexander Graf
On 18.12.18 06:02, AKASHI Takahiro wrote: > The current way how command parameters, particularly "fdt addr," are > handled makes it a bit complicated to add a subcommand-specific parameter. > So just refactor the code and extract efi_handle_fdt(). > > This commit is a preparatory change for enha

Re: [U-Boot] [PATCH 4/5] cmd: bootefi: run an EFI application of a specific load option

2018-12-22 Thread Alexander Graf
On 18.12.18 06:02, AKASHI Takahiro wrote: > With this patch applied, we will be able to selectively execute > an EFI application by specifying a load option, say "1" for Boot0001, > "2" for Boot0002 and so on. > > => bootefi bootmgr 1, or > bootefi bootmgr - 1 > > Please note that BootX

Re: [U-Boot] [PATCH 5/5] cmd: run: add "-e" option to run an EFI application

2018-12-22 Thread Alexander Graf
On 18.12.18 06:02, AKASHI Takahiro wrote: > "run -e" allows for executing EFI application with a specific "Boot" > variable. If no "Boot" is specified or "BootOrder" is specified, > it tries to run an EFI application specified in the order of "bootOrder." > > Signed-off-by: AKASHI Takahi

Re: [U-Boot] [PATCH] efi_loader: move efi_init_obj_list() to a new efi_setup.c

2018-12-22 Thread Alexander Graf
On 18.12.18 06:02, AKASHI Takahiro wrote: > The function, efi_init_obj_list(), can be shared in different pseudo efi > applications, like bootefi/bootmgr as well as my efishell. Moreover, it > will be utilized to extend efi initialization, for example, my "removable > disk support" patch and "cap

Re: [U-Boot] [RESEND PATCH 1/2] ARM: qemu-arm: enable usb mass storage in default configuration

2018-12-22 Thread Alexander Graf
On 14.12.18 10:49, AKASHI Takahiro wrote: > This is a preparatory patch so that USB boot will be supported > in distro boot script by default. > > Signed-off-by: AKASHI Takahiro This should already be resolved with commit 4aa7492683f2d ("distro: Imply USB_STORAGE when USB is available"), no?

Re: [U-Boot] [RESEND PATCH 2/2] ARM: qemu-arm: enable USB boot in distro boot with UEFI

2018-12-22 Thread Alexander Graf
On 14.12.18 10:53, AKASHI Takahiro wrote: > With this patch which adds a removable USB mass storage to a list > of bootable devices, USB boot is supported in distro boot if UEFI is > configured. > > Signed-off-by: AKASHI Takahiro Reviewied-by: Alexander Graf Alex > --- > include/configs/q

Re: [U-Boot] [U-Boot, v2] efi_loader: Make RTS relocation more robust

2018-12-22 Thread Alexander Graf
> While changing the RTS alignment to 64KB in commit 7a82c3051c8f > ("efi_loader: Align runtime section to 64kb") the relocation code > started to break. > > The reason for that is that we didn't actually look at the real > relocation data. We merely took the RUNTIME_CODE section as a > hint and s

Re: [U-Boot] [PATCH v2 05/14] cmd: efishell: add devices command

2018-12-22 Thread Alexander Graf
On 03.12.18 08:02, AKASHI Takahiro wrote: > On Mon, Dec 03, 2018 at 12:46:20AM +0100, Alexander Graf wrote: >> >> >> On 05.11.18 10:06, AKASHI Takahiro wrote: >>> "devices" command prints all the uefi variables on the system. >>> => efishell devices >>> Device Name >>> ===

Re: [U-Boot] [PATCH v2 10/14] cmd: bootefi: carve out fdt parameter handling

2018-12-22 Thread Alexander Graf
On 03.12.18 08:33, AKASHI Takahiro wrote: > On Mon, Dec 03, 2018 at 12:50:04AM +0100, Alexander Graf wrote: >> >> >> On 05.11.18 10:06, AKASHI Takahiro wrote: >>> The current way how command parameters, particularly "fdt addr," are >>> handled makes it a bit complicated to add a subcommand-specif

Re: [U-Boot] [PATCH v2 13/14] cmd: efishell: export uefi variable helper functions

2018-12-22 Thread Alexander Graf
On 03.12.18 09:08, AKASHI Takahiro wrote: > On Mon, Dec 03, 2018 at 12:54:44AM +0100, Alexander Graf wrote: >> >> >> On 05.11.18 10:06, AKASHI Takahiro wrote: >>> Those function will be used for integration with 'env' command >>> so as to handle uefi variables. >>> >>> Signed-off-by: AKASHI Takah