[U-Boot] [PATCH] arm: disable alignment fault checking with EFI_LOADER

2017-08-07 Thread Rob Clark
least dtrt on armv7 (and aarch64 which already doesn't enable alignment faults). Probably we can skip clearing the bit when EFI_LOADER is enabled, since '0' is the reset value. But I guess safest to clear it just in case an early stage in the boot chain set it. Signed-off-by: Rob

Re: [U-Boot] [PATCH] arm: disable alignment fault checking with EFI_LOADER

2017-08-07 Thread Rob Clark
On Mon, Aug 7, 2017 at 9:16 AM, Alexander Graf wrote: > > >> Am 07.08.2017 um 13:19 schrieb Rob Clark : >> >> Device-path structures in UEFI are only byte aligned, which can result >> in unaligned access faults (either in u-boot or the efi payload which is >>

Re: [U-Boot] [PATCH v0 13/20] efi_loader: use proper device-paths for partitions

2017-08-07 Thread Rob Clark
On Mon, Aug 7, 2017 at 11:47 AM, Jonathan Gray wrote: > On Sun, Aug 06, 2017 at 11:34:15AM -0400, Rob Clark wrote: >> On Sun, Aug 6, 2017 at 10:45 AM, Rob Clark wrote: >> > >> > I've started trying to hack up test_efi_loader.py to add a test that >> > loa

Re: [U-Boot] [PATCH v0 21/20] efi_loader: hack for archs that cannot do unaligned accesses

2017-08-07 Thread Rob Clark
On Sat, Aug 5, 2017 at 1:06 PM, Rob Clark wrote: > On Sat, Aug 5, 2017 at 12:52 PM, Heinrich Schuchardt > wrote: >> On 08/05/2017 06:16 PM, Rob Clark wrote: >>> On Sat, Aug 5, 2017 at 12:12 PM, Heinrich Schuchardt >>> wrote: >>>> On 08/05/2017 05:58 P

Re: [U-Boot] [PATCH v0 01/20] fs: add fs_readdir()

2017-08-07 Thread Rob Clark
On Mon, Aug 7, 2017 at 2:19 PM, Brüns, Stefan wrote: > On Freitag, 4. August 2017 21:31:43 CEST Rob Clark wrote: >> Needed to support efi file protocol. The fallback.efi loader wants >> to be able to read the contents of the /EFI directory to find an OS >> to boot. >

[U-Boot] [PATCH v4] usb: kbd: don't fail with iomux

2017-08-07 Thread Rob Clark
on dragonboard410c with distro- bootcmd, where stdin is not set (so stdinname is null). Signed-off-by: Rob Clark --- v2: address Bin's review comments v3: fix fail with free()ing if usbkbd is already in stdin env variable pointed out by Simon v4: use if (CONFIG_IS_ENABLED(CONSOL

[U-Boot] [PATCH v2] dm: core: also parse chosen node

2017-08-07 Thread Rob Clark
This is the node that would contain, for example, the framebuffer setup by an earlier stage. Signed-off-by: Rob Clark --- v2: simplify a bit (and fix incorrect handling of pre_reloc_only) by calling dm_scan_fdt_node() recursively to handle chosen node; add to sandbox tests as suggested

Re: [U-Boot] [PATCH v0 21/20] efi_loader: hack for archs that cannot do unaligned accesses

2017-08-07 Thread Rob Clark
On Mon, Aug 7, 2017 at 5:14 PM, Mark Kettenis wrote: >> From: Alexander Graf >> Date: Mon, 7 Aug 2017 21:19:37 +0100 >> >> On 05.08.17 21:31, Rob Clark wrote: >> > On Sat, Aug 5, 2017 at 4:05 PM, Heinrich Schuchardt >> > wrote: >> >> On 08

Re: [U-Boot] [PATCH v0 21/20] efi_loader: hack for archs that cannot do unaligned accesses

2017-08-08 Thread Rob Clark
On Tue, Aug 8, 2017 at 2:52 AM, Alexander Graf wrote: > > >> Am 07.08.2017 um 23:18 schrieb Rob Clark : >> >> On Mon, Aug 7, 2017 at 5:14 PM, Mark Kettenis >> wrote: >>>> From: Alexander Graf >>>> Date: Mon, 7 Aug 2017 21:19:37 +0100 >&g

Re: [U-Boot] [PATCH v4] usb: kbd: don't fail with iomux

2017-08-08 Thread Rob Clark
On Tue, Aug 8, 2017 at 6:42 AM, Bin Meng wrote: > Hi Rob, > > On Tue, Aug 8, 2017 at 3:51 AM, Rob Clark wrote: >> stdin might not be set, which would cause iomux_doenv() to fail >> therefore causing probe_usb_keyboard() to fail. Furthermore if we do >> have iomux enab

Re: [U-Boot] [PATCH v0 21/20] efi_loader: hack for archs that cannot do unaligned accesses

2017-08-08 Thread Rob Clark
On Tue, Aug 8, 2017 at 7:32 AM, Leif Lindholm wrote: > On Tue, Aug 08, 2017 at 09:11:14AM +0100, Ard Biesheuvel wrote: >> On 8 August 2017 at 07:52, Alexander Graf wrote: >> > >> > >> >> Am 07.08.2017 um 23:18 schrieb Rob Clark : >> >> >&g

Re: [U-Boot] [PATCH v0 21/20] efi_loader: hack for archs that cannot do unaligned accesses

2017-08-08 Thread Rob Clark
On Tue, Aug 8, 2017 at 8:26 AM, Mark Kettenis wrote: >> From: Rob Clark >> Date: Mon, 7 Aug 2017 18:18:50 -0400 >> >> On Mon, Aug 7, 2017 at 5:14 PM, Mark Kettenis >> wrote: >> >> From: Alexander Graf >> >> Date: Mon, 7 Aug 2017 21:19

Re: [U-Boot] [PATCH v0 21/20] efi_loader: hack for archs that cannot do unaligned accesses

2017-08-08 Thread Rob Clark
On Tue, Aug 8, 2017 at 9:33 AM, Mark Kettenis wrote: >> From: Rob Clark >> Date: Tue, 8 Aug 2017 08:54:26 -0400 >> >> On Tue, Aug 8, 2017 at 8:26 AM, Mark Kettenis >> wrote: >> >> From: Rob Clark >> >> Date: Mon, 7 Aug 2017 18:18:50

Re: [U-Boot] [PATCH v0 21/20] efi_loader: hack for archs that cannot do unaligned accesses

2017-08-08 Thread Rob Clark
On Tue, Aug 8, 2017 at 10:03 AM, Rob Clark wrote: > I suppose special case handling in efi_load_image() wouldn't be too > bad. It won't fix every theoretical problem on armv7 without > unaligned access disabled. > s/disabled/enabled/ BR, -R ___

Re: [U-Boot] [PATCH] vsprintf.c: add GUID printing

2017-08-08 Thread Rob Clark
On Tue, Aug 8, 2017 at 12:56 PM, Heinrich Schuchardt wrote: > On 08/06/2017 01:39 PM, Rob Clark wrote: >> This works (roughly) the same way as linux's, but we currently always >> print lower-case (ie. we just keep %pUB and %pUL for compat with linux), >> mostly

Re: [U-Boot] [PATCH v0 21/20] efi_loader: hack for archs that cannot do unaligned accesses

2017-08-08 Thread Rob Clark
On Tue, Aug 8, 2017 at 10:03 AM, Rob Clark wrote: > On Tue, Aug 8, 2017 at 9:33 AM, Mark Kettenis wrote: >>> From: Rob Clark >>> Date: Tue, 8 Aug 2017 08:54:26 -0400 >>> >>> On Tue, Aug 8, 2017 at 8:26 AM, Mark Kettenis >>> wrote: >>>

Re: [U-Boot] [U-Boot, v0, 07/20] vsprintf.c: add wide string (%ls) support

2017-08-08 Thread Rob Clark
On Tue, Aug 8, 2017 at 6:03 PM, Heinrich Schuchardt wrote: > On 08/04/2017 09:31 PM, Rob Clark wrote: >> This is convenient for efi_loader which deals a lot with utf16. >> >> Signed-off-by: Rob Clark > > Please, put this patch together with > [PATCH] vsprint

Re: [U-Boot] [U-Boot, v0, 07/20] vsprintf.c: add wide string (%ls) support

2017-08-08 Thread Rob Clark
On Tue, Aug 8, 2017 at 6:03 PM, Heinrich Schuchardt wrote: > On 08/04/2017 09:31 PM, Rob Clark wrote: >> This is convenient for efi_loader which deals a lot with utf16. >> >> Signed-off-by: Rob Clark > > Please, put this patch together with > [PATCH] vsprint

Re: [U-Boot] [U-Boot, v0, 06/20] common: add some utf16 handling helpers

2017-08-08 Thread Rob Clark
On Tue, Aug 8, 2017 at 6:50 PM, Heinrich Schuchardt wrote: > On 08/04/2017 09:31 PM, Rob Clark wrote: >> We'll eventually want these in a few places in efi_loader, and also >> vsprintf. >> >> Signed-off-by: Rob Clark >> --- >> common/Makef

Re: [U-Boot] [U-Boot, v0, 07/20] vsprintf.c: add wide string (%ls) support

2017-08-08 Thread Rob Clark
On Tue, Aug 8, 2017 at 7:08 PM, Heinrich Schuchardt wrote: > On 08/09/2017 12:44 AM, Rob Clark wrote: >> On Tue, Aug 8, 2017 at 6:03 PM, Heinrich Schuchardt >> wrote: >>> On 08/04/2017 09:31 PM, Rob Clark wrote: >>>> This is convenient for efi

Re: [U-Boot] [U-Boot, v0, 07/20] vsprintf.c: add wide string (%ls) support

2017-08-08 Thread Rob Clark
On Tue, Aug 8, 2017 at 7:55 PM, Alexander Graf wrote: > > > On 09.08.17 00:39, Rob Clark wrote: >> >> On Tue, Aug 8, 2017 at 7:08 PM, Heinrich Schuchardt >> wrote: >>> >>> On 08/09/2017 12:44 AM, Rob Clark wrote: >>>> >>>

Re: [U-Boot] [U-Boot, v0, 07/20] vsprintf.c: add wide string (%ls) support

2017-08-08 Thread Rob Clark
On Tue, Aug 8, 2017 at 8:14 PM, Rob Clark wrote: > On Tue, Aug 8, 2017 at 7:55 PM, Alexander Graf wrote: >> >> >> On 09.08.17 00:39, Rob Clark wrote: >>> >>> On Tue, Aug 8, 2017 at 7:08 PM, Heinrich Schuchardt >>> wrote: >>>> >>&

Re: [U-Boot] [U-Boot, v0, 07/20] vsprintf.c: add wide string (%ls) support

2017-08-09 Thread Rob Clark
On Tue, Aug 8, 2017 at 6:03 PM, Heinrich Schuchardt wrote: > On 08/04/2017 09:31 PM, Rob Clark wrote: >> >> @@ -528,8 +549,13 @@ repeat: >> continue; >> >> case 's': >> -

Re: [U-Boot] [U-Boot, v0, 07/20] vsprintf.c: add wide string (%ls) support

2017-08-09 Thread Rob Clark
On Wed, Aug 9, 2017 at 9:48 AM, Alexander Graf wrote: > > >> Am 09.08.2017 um 14:38 schrieb Rob Clark : >> >>> On Tue, Aug 8, 2017 at 6:03 PM, Heinrich Schuchardt >>> wrote: >>>> On 08/04/2017 09:31 PM, Rob Clark wrote: >>>> >>

Re: [U-Boot] [PATCH 1/1] efi_loader: attribute EFIAPI of efi_locate handle()

2017-08-09 Thread Rob Clark
On Wed, Aug 9, 2017 at 2:55 PM, Heinrich Schuchardt wrote: > efi_locate_handle is called internally so it should not be > marked as EFIAPI. > > The external function is efi_locate_handle_ext. > > Signed-off-by: Heinrich Schuchardt Reviewed-by: Rob Clark > --- > @Alex &

[U-Boot] [PATCH 0/5] vsprintf and short-wchar for EFI_LOADER

2017-08-09 Thread Rob Clark
com/robclark/u-boot.git enough-uefi-for-shim-2 I'll resend the enought-uefi-for-shim-2 patchset after I have a chance to figure out fs-test.sh and add tests for fs_readdir(). Rob Clark (5): Kconfig: add option to build with -fshort-wchar lib: add some utf16 handling helpers vsp

[U-Boot] [PATCH 1/5] Kconfig: add option to build with -fshort-wchar

2017-08-09 Thread Rob Clark
UEFI expects strings to be UTF-16. So add an option so that when EFI_LOADER is enabled, we can use the expected unicode string size. Signed-off-by: Rob Clark --- Kconfig| 8 Makefile | 4 lib/efi_loader/Kconfig | 1 + 3 files changed, 13 insertions

[U-Boot] [PATCH 3/5] vsprintf.c: add UTF-16 string (%ls) support

2017-08-09 Thread Rob Clark
This is convenient for efi_loader which deals a lot with UTF-16. Only enabled with CC_SHORT_WCHAR, leaving room to add a UTF-32 version when CC_SHORT_WCHAR is not enabled. Signed-off-by: Rob Clark --- examples/api/Makefile | 1 + lib/vsprintf.c| 31 +-- 2

[U-Boot] [PATCH 2/5] lib: add some utf16 handling helpers

2017-08-09 Thread Rob Clark
We'll eventually want these in a few places in efi_loader, and also vsprintf. Signed-off-by: Rob Clark --- include/charset.h| 55 ++ lib/Makefile | 1 + lib/charset.c| 81

[U-Boot] [PATCH 4/5] vsprintf.c: add GUID printing

2017-08-09 Thread Rob Clark
e0f10 It will be used by a later efi_loader paths for efi variables and for device-path-to-text protocol, and also quite useful for debug prints of protocol GUIDs. Signed-off-by: Rob Clark --- examples/api/Makefile | 1 + include/config_fallbacks.h | 1 + lib/vsprintf.c

[U-Boot] [PATCH 5/5] examples: add fallback memcpy

2017-08-09 Thread Rob Clark
+lib/uuid.c:197: undefined reference to `memcpy' +lib/uuid.c:199: undefined reference to `memcpy' +make[3]: *** [examples/api/demo] Error 1 +make[2]: *** [examples/api] Error 2 +make[1]: *** [examples] Error 2 +make: *** [sub-make] Error 2 13301 /134sheevaplug

Re: [U-Boot] [PATCH v0 00/20] enough UEFI for standard distro boot

2017-08-10 Thread Rob Clark
On Wed, Aug 9, 2017 at 9:32 PM, Tom Rini wrote: > On Fri, Aug 04, 2017 at 03:31:42PM -0400, Rob Clark wrote: > >> This patchset fleshes out EFI_LOADER enough to support booting an >> upstream \EFI\BOOT\bootaa64.efi (which then loads fallback.efi and >> then eventually

Re: [U-Boot] [RFC] efi_loader: Add test to boot OpenBSD's efi bootloader

2017-08-10 Thread Rob Clark
On Wed, Aug 9, 2017 at 11:43 PM, Jonathan Gray wrote: > On Sun, Aug 06, 2017 at 03:06:17PM -0400, Rob Clark wrote: >> On Sun, Aug 6, 2017 at 2:54 PM, Mark Kettenis >> wrote: >> >> From: Rob Clark >> >> Date: Sun, 6 Aug 2017 12:10:28 -04

Re: [U-Boot] [PATCH] fs: add fs_readdir()

2017-08-10 Thread Rob Clark
On Sun, Aug 6, 2017 at 1:16 AM, Simon Glass wrote: > Hi Rob, > > On 3 August 2017 at 13:36, Rob Clark wrote: >> On Thu, Aug 3, 2017 at 3:10 PM, Brüns, Stefan >> wrote: >>> On Donnerstag, 3. August 2017 18:54:30 CEST Rob Clark wrote: >>>> Needed to su

[U-Boot] [PATCH v1 00/15] enough UEFI for standard distro boot

2017-08-10 Thread Rob Clark
set * various fixes Peter Jones (2): part: extract MBR signature from partitions efi: add some more device path structures Rob Clark (13): fs: add fs_readdir() fs/fat: implement readdir efi_loader: add device-path utils efi_loader: drop redundant efi_device_path_protocol efi_loader:

[U-Boot] [PATCH v1 01/15] fs: add fs_readdir()

2017-08-10 Thread Rob Clark
Needed to support efi file protocol. The fallback.efi loader wants to be able to read the contents of the /EFI directory to find an OS to boot. Also included is an ls2 command which implements ls on top of fs_readdir(), to more easily test the readdir functionality. Signed-off-by: Rob Clark

[U-Boot] [PATCH v1 02/15] fs/fat: implement readdir

2017-08-10 Thread Rob Clark
Yes, this is super-hacky. The FAT code is quite ugly, and this doesn't improve things. But it doesn't make it significantly worse either. The better option would be a massive FAT re-write to get rid of the hacky way that fat_file_ls() works. Volunteers welcome. Signed-off-by:

[U-Boot] [PATCH v1 04/15] efi: add some more device path structures

2017-08-10 Thread Rob Clark
From: Peter Jones Signed-off-by: Peter Jones Signed-off-by: Rob Clark --- include/efi_api.h | 62 +++ 1 file changed, 58 insertions(+), 4 deletions(-) diff --git a/include/efi_api.h b/include/efi_api.h index ec1b321e8e..b761cf4822 100644

[U-Boot] [PATCH v1 03/15] part: extract MBR signature from partitions

2017-08-10 Thread Rob Clark
-off-by: Rob Clark --- disk/part_dos.c| 12 +--- disk/part_efi.c| 20 include/blk.h | 15 +++ include/efi.h | 4 include/part.h | 3 ++- include/part_efi.h | 4 6 files changed, 50 insertions(+), 8 deletions(-) diff --git

[U-Boot] [PATCH v1 12/15] efi_loader: support load_image() from a file-path

2017-08-10 Thread Rob Clark
Previously we only supported the case when the EFI application loaded the image into memory for us. But fallback.efi does not do this. Signed-off-by: Rob Clark --- lib/efi_loader/efi_boottime.c | 83 +++ 1 file changed, 68 insertions(+), 15 deletions

[U-Boot] [PATCH v1 06/15] efi_loader: drop redundant efi_device_path_protocol

2017-08-10 Thread Rob Clark
This is really the same thing as the efi_device_path struct. Signed-off-by: Rob Clark --- include/efi_api.h| 12 ++-- lib/efi_loader/efi_device_path_to_text.c | 13 - 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/include/efi_api.h b

[U-Boot] [PATCH v1 05/15] efi_loader: add device-path utils

2017-08-10 Thread Rob Clark
, but slightly more convincingly. Signed-off-by: Rob Clark --- include/efi_api.h| 10 + include/efi_loader.h | 20 ++ lib/efi_loader/Makefile | 2 +- lib/efi_loader/efi_device_path.c | 489 +++ 4 files changed, 520 inser

[U-Boot] [PATCH v1 15/15] efi_loader: add bootmgr

2017-08-10 Thread Rob Clark
en if that fails (ie. first boot or corrupted EFI variables) it would fallback to loading bootaa64.efi. (Which would then load fallback.efi which would look for \EFI\*\boot.csv and populate BootOrder and Boot based on what it found.) Signed-off-by: Rob Clark --- cmd/bootefi.c

[U-Boot] [PATCH v1 07/15] efi_loader: flesh out device-path to text

2017-08-10 Thread Rob Clark
extra copy won't hurt, and is saner than the alternative. Signed-off-by: Rob Clark --- include/efi_api.h| 1 + include/efi_loader.h | 2 + lib/efi_loader/efi_device_path_to_text.c | 241 +++ 3 files changed

[U-Boot] [PATCH v1 09/15] efi_loader: use proper device-paths for net

2017-08-10 Thread Rob Clark
Signed-off-by: Rob Clark --- lib/efi_loader/efi_net.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c index 0b949d86e8..aa0618fd3a 100644 --- a/lib/efi_loader/efi_net.c +++ b/lib/efi_loader/efi_net.c

[U-Boot] [PATCH v1 14/15] efi_loader: efi variable support

2017-08-10 Thread Rob Clark
red type is one of: + utf8 - raw utf8 string + blob - arbitrary length hex string Signed-off-by: Rob Clark --- cmd/bootefi.c | 4 + include/efi.h | 19 +++ include/efi_loader.h | 10 ++ lib/efi_loader/Makefile | 2 +- lib/efi_loade

[U-Boot] [PATCH v1 08/15] efi_loader: use proper device-paths for partitions

2017-08-10 Thread Rob Clark
nally from Peter Jones, but re-worked to use efi_device_path, so it doesn't much resemble the original. Signed-off-by: Rob Clark --- lib/efi_loader/efi_disk.c | 54 +++ 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/lib/efi_loader/efi

[U-Boot] [PATCH v1 10/15] efi_loader: refactor boot device and loaded_image handling

2017-08-10 Thread Rob Clark
things in properly to the loaded_image. In a following patch we'll want to re-use this in efi_load_image() to handle the case of loading an image from a file_path. Signed-off-by: Rob Clark --- cmd/bootefi.c | 201 +- include/efi_loa

[U-Boot] [PATCH v1 13/15] efi_loader: make pool allocations cacheline aligned

2017-08-10 Thread Rob Clark
This avoids printf() spam about file reads (such as loading an image) into unaligned buffers (and the associated memcpy()). And generally seems like a good idea. Signed-off-by: Rob Clark --- lib/efi_loader/efi_memory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a

[U-Boot] [PATCH v1 11/15] efi_loader: add file/filesys support

2017-08-10 Thread Rob Clark
fallback.efi (and probably other things) use UEFI's simple-file-system protocol and file support to search for OS's to boot. Signed-off-by: Rob Clark --- fs/fs.c | 21 ++ include/efi.h | 2 + include/efi_api.h

[U-Boot] [RFC/WIP 1/2] fs/fat: split out helper to init fsdata

2017-08-11 Thread Rob Clark
Want to re-use this in fat dirent iterator in next patch. --- fs/fat/fat.c | 75 +++ include/fat.h | 1 + 2 files changed, 45 insertions(+), 31 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 3d5dde0d9e..68db36ebd7 100644 --- a

[U-Boot] [RFC/WIP 2/2] fs/fat: introduce new dirent iterator

2017-08-11 Thread Rob Clark
Untangle the directory traversal. Eventually if this replaced do_fat_read_at() and get_dentfromdir(), it would remove a lot of code. Only tested with a grand total of one fat fs img. Although it actually seems to fix some bugs with existing traversal (I noticed some files in the root directory t

Re: [U-Boot] [PATCH v1 13/15] efi_loader: make pool allocations cacheline aligned

2017-08-11 Thread Rob Clark
On Fri, Aug 11, 2017 at 12:58 PM, Heinrich Schuchardt wrote: > On 08/10/2017 08:29 PM, Rob Clark wrote: >> This avoids printf() spam about file reads (such as loading an image) >> into unaligned buffers (and the associated memcpy()). And generally >> seems like a good idea

Re: [U-Boot] [PATCH v1 03/15] part: extract MBR signature from partitions

2017-08-11 Thread Rob Clark
gt; > Best regards > > Heinrich > > On 08/10/2017 08:29 PM, Rob Clark wrote: >> From: Peter Jones >> >> EFI client programs need the signature information from the partition >> table to determine the disk a partition is on, so we need to fill that >> in he

Re: [U-Boot] [PATCH v1 13/15] efi_loader: make pool allocations cacheline aligned

2017-08-11 Thread Rob Clark
On Fri, Aug 11, 2017 at 1:47 PM, Heinrich Schuchardt wrote: > On 08/11/2017 07:27 PM, Rob Clark wrote: >> On Fri, Aug 11, 2017 at 12:58 PM, Heinrich Schuchardt >> wrote: >>> On 08/10/2017 08:29 PM, Rob Clark wrote: >>>> This avoids printf() spam about

Re: [U-Boot] [PATCH v1 13/15] efi_loader: make pool allocations cacheline aligned

2017-08-11 Thread Rob Clark
On Fri, Aug 11, 2017 at 2:10 PM, Heinrich Schuchardt wrote: > On 08/11/2017 07:27 PM, Rob Clark wrote: >> On Fri, Aug 11, 2017 at 12:58 PM, Heinrich Schuchardt >> wrote: >>> On 08/10/2017 08:29 PM, Rob Clark wrote: >>>> This avoids printf() spam about

Re: [U-Boot] [PATCH v1 02/15] fs/fat: implement readdir

2017-08-12 Thread Rob Clark
On Sat, Aug 12, 2017 at 8:17 AM, Alexander Graf wrote: > > > On 10.08.17 20:29, Rob Clark wrote: >> >> Yes, this is super-hacky. The FAT code is quite ugly, and this doesn't >> improve things. But it doesn't make it significantly worse either. The >&

Re: [U-Boot] [PATCH v1 15/15] efi_loader: add bootmgr

2017-08-12 Thread Rob Clark
On Sat, Aug 12, 2017 at 9:10 AM, Alexander Graf wrote: > > > On 10.08.17 20:29, Rob Clark wrote: >> >> Similar to a "real" UEFI implementation, the bootmgr looks at the >> BootOrder and Boot variables to try to find an EFI payload to load >> a

Re: [U-Boot] [PATCH v1 08/15] efi_loader: use proper device-paths for partitions

2017-08-12 Thread Rob Clark
On Sat, Aug 12, 2017 at 8:36 AM, Alexander Graf wrote: > > > On 10.08.17 20:29, Rob Clark wrote: >> >> Also, create disk objects for the disk itself, in addition to the >> partitions. (UEFI terminology is a bit confusing, a "disk" object is >> rea

Re: [U-Boot] [PATCH v1 14/15] efi_loader: efi variable support

2017-08-12 Thread Rob Clark
On Sat, Aug 12, 2017 at 9:01 AM, Alexander Graf wrote: > > > On 10.08.17 20:29, Rob Clark wrote: >> >> Add EFI variable support, mapping to u-boot environment variables. >> Variables are pretty important for setting up boot order, among other >> things. If th

Re: [U-Boot] [PATCH v1 14/15] efi_loader: efi variable support

2017-08-12 Thread Rob Clark
On Sat, Aug 12, 2017 at 1:28 PM, Alexander Graf wrote: > > >> Am 12.08.2017 um 16:39 schrieb Rob Clark : >> >>> On Sat, Aug 12, 2017 at 9:01 AM, Alexander Graf wrote: >>> >>> >>>> On 10.08.17 20:29, Rob Clark wrote: >>>> &

[U-Boot] [PATCH 0/8] fs/fat: cleanups + readdir implementation

2017-08-13 Thread Rob Clark
eally been tested with a wide variaty of different fat filesystems (if someone has a collection of disk images to test with somewhere, let me know), but it seems at least not worse than what it is replacing. Rob Clark (8): fs/fat: split out helper to init fsdata fs/fat: introduce new dir

[U-Boot] [PATCH 1/8] fs/fat: split out helper to init fsdata

2017-08-13 Thread Rob Clark
Want to re-use this in fat dirent iterator in next patch. Signed-off-by: Rob Clark --- fs/fat/fat.c | 73 +++ include/fat.h | 1 + 2 files changed, 44 insertions(+), 30 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index

[U-Boot] [PATCH 4/8] fs: add fs_readdir()

2017-08-13 Thread Rob Clark
tream"), to avoid re-traversing of the directory structure at each step. The directory stream must be released with closedir() when it is no longer needed. Signed-off-by: Rob Clark --- fs/fs.c | 88 include

[U-Boot] [PATCH 2/8] fs/fat: introduce new director iterators

2017-08-13 Thread Rob Clark
Untangle directory traversal into a simple iterator, to replace the existing multi-purpose do_fat_read_at() + get_dentfromdir(). Signed-off-by: Rob Clark --- fs/fat/fat.c | 326 +++ 1 file changed, 326 insertions(+) diff --git a/fs/fat

[U-Boot] [PATCH 3/8] fat/fs: convert to directory iterators

2017-08-13 Thread Rob Clark
And drop a whole lot of ugly code! Signed-off-by: Rob Clark --- fs/fat/fat.c | 723 ++ include/fat.h | 6 - 2 files changed, 75 insertions(+), 654 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 69fa7f4cab..a50a10ba47

[U-Boot] [PATCH 5/8] fs/fat: implement opendir/readdir/closedir

2017-08-13 Thread Rob Clark
Implement the readdir interface using the directory iterators. Signed-off-by: Rob Clark --- fs/fat/fat.c | 56 1 file changed, 56 insertions(+) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index a50a10ba47..fe5819315b 100644 --- a/fs/fat

[U-Boot] [PATCH 8/8] fs/fat: fix case for FAT shortnames

2017-08-13 Thread Rob Clark
Noticed when comparing our output to linux. There are some lcase bits which control whether filename and/or extension should be downcase'd. Signed-off-by: Rob Clark --- fs/fat/fat.c | 11 --- fs/fat/fat_write.c | 4 ++-- include/fat.h | 3 +++ 3 files change

[U-Boot] [PATCH 7/8] fat/fs: move ls to generic implementation

2017-08-13 Thread Rob Clark
Add a generic implementation of 'ls' using opendir/readdir/closedir, and replace fat's custom implementation. Other filesystems should move to the generic implementation after they add opendir/readdir/closedir support. Signed-off-by: Rob Clark --- fs/

[U-Boot] [PATCH 6/8] fat/fs: remove a bunch of dead code

2017-08-13 Thread Rob Clark
Spotted by chance, when trying to remove file_fat_ls(), I noticed there were some dead users of the API. Signed-off-by: Rob Clark --- fs/fat/Makefile | 4 -- fs/fat/file.c | 183 include/fat.h | 20 --- 3 files changed, 207

Re: [U-Boot] [PATCH 0/8] fs/fat: cleanups + readdir implementation

2017-08-13 Thread Rob Clark
On Sun, Aug 13, 2017 at 7:28 AM, Heinrich Schuchardt wrote: > On 08/13/2017 12:45 PM, Rob Clark wrote: >> Introduce directory traversal iterators, and implement fs_readdir() >> which is needed by EFI_LOADER. >> >> The part re-working fat.c to use the directory iterator

Re: [U-Boot] [PATCH 8/8] fs/fat: fix case for FAT shortnames

2017-08-13 Thread Rob Clark
On Sun, Aug 13, 2017 at 7:25 AM, Stefan Bruens wrote: > On Sonntag, 13. August 2017 12:45:28 CEST Rob Clark wrote: >> Noticed when comparing our output to linux. There are some lcase bits >> which control whether filename and/or extension should be downcase'd. >> &

Re: [U-Boot] [PATCH] usb: kbd: don't fail with iomux (v3)

2017-08-13 Thread Rob Clark
On Sun, Aug 13, 2017 at 11:35 AM, Simon Glass wrote: > Hi Rob, > > On 6 August 2017 at 05:58, Rob Clark wrote: >> >> On Sun, Aug 6, 2017 at 1:16 AM, Simon Glass wrote: >> > On 4 August 2017 at 07:16, Bin Meng wrote: >> >> Hi Rob, >> >>

[U-Boot] [PATCH v2 8/8] fs/fat: fix case for FAT shortnames

2017-08-13 Thread Rob Clark
Noticed when comparing our output to linux. There are some lcase bits which control whether filename and/or extension should be downcase'd. Signed-off-by: Rob Clark --- fs/fat/fat.c | 17 - fs/fat/fat_write.c | 4 ++-- include/fat.h | 3 +++ 3 files change

Re: [U-Boot] [PATCH 0/8] fs/fat: cleanups + readdir implementation

2017-08-13 Thread Rob Clark
On Sun, Aug 13, 2017 at 5:13 PM, Tom Rini wrote: > On Sun, Aug 13, 2017 at 06:45:20AM -0400, Rob Clark wrote: > >> Introduce directory traversal iterators, and implement fs_readdir() >> which is needed by EFI_LOADER. >> >> The part re-working fat.c to use the

Re: [U-Boot] [PATCH 0/8] fs/fat: cleanups + readdir implementation

2017-08-14 Thread Rob Clark
On Sun, Aug 13, 2017 at 5:59 PM, Tom Rini wrote: > On Sun, Aug 13, 2017 at 05:50:39PM -0400, Rob Clark wrote: >> On Sun, Aug 13, 2017 at 5:13 PM, Tom Rini wrote: >> > On Sun, Aug 13, 2017 at 06:45:20AM -0400, Rob Clark wrote: >> > >> >> Introduce direc

[U-Boot] [PATCH v2 1/8] fs/fat: split out helper to init fsdata

2017-08-14 Thread Rob Clark
Want to re-use this in fat dirent iterator in next patch. Signed-off-by: Rob Clark --- fs/fat/fat.c | 73 +++ include/fat.h | 1 + 2 files changed, 44 insertions(+), 30 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index

[U-Boot] [PATCH v2 0/8] fs/fat: cleanups + readdir implementation

2017-08-14 Thread Rob Clark
ssing fs_closedir() in generic ls implementation Rob Clark (8): fs/fat: split out helper to init fsdata fs/fat: introduce new director iterators fat/fs: convert to directory iterators fs: add fs_readdir() fs/fat: implement opendir/readdir/closedir fat/fs: remove a bunch of dead code f

[U-Boot] [PATCH v2 2/8] fs/fat: introduce new director iterators

2017-08-14 Thread Rob Clark
Untangle directory traversal into a simple iterator, to replace the existing multi-purpose do_fat_read_at() + get_dentfromdir(). Signed-off-by: Rob Clark --- fs/fat/fat.c | 326 +++ 1 file changed, 326 insertions(+) diff --git a/fs/fat

[U-Boot] [PATCH v2 5/8] fs/fat: implement opendir/readdir/closedir

2017-08-14 Thread Rob Clark
Implement the readdir interface using the directory iterators. Signed-off-by: Rob Clark --- fs/fat/fat.c | 56 1 file changed, 56 insertions(+) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index a50a10ba47..fe5819315b 100644 --- a/fs/fat

[U-Boot] [PATCH v2 3/8] fat/fs: convert to directory iterators

2017-08-14 Thread Rob Clark
And drop a whole lot of ugly code! Signed-off-by: Rob Clark --- fs/fat/fat.c | 723 ++ include/fat.h | 6 - 2 files changed, 75 insertions(+), 654 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 69fa7f4cab..a50a10ba47

[U-Boot] [PATCH v2 4/8] fs: add fs_readdir()

2017-08-14 Thread Rob Clark
tream"), to avoid re-traversing of the directory structure at each step. The directory stream must be released with closedir() when it is no longer needed. Signed-off-by: Rob Clark --- disk/part.c| 31 fs/fs.c

[U-Boot] [PATCH v2 7/8] fat/fs: move ls to generic implementation

2017-08-14 Thread Rob Clark
Add a generic implementation of 'ls' using opendir/readdir/closedir, and replace fat's custom implementation. Other filesystems should move to the generic implementation after they add opendir/readdir/closedir support. Signed-off-by: Rob Clark --- fs/

[U-Boot] [PATCH v2 6/8] fat/fs: remove a bunch of dead code

2017-08-14 Thread Rob Clark
Spotted by chance, when trying to remove file_fat_ls(), I noticed there were some dead users of the API. Signed-off-by: Rob Clark Acked-by: Stefan Brüns --- fs/fat/Makefile | 4 -- fs/fat/file.c | 183 include/fat.h | 20

[U-Boot] [PATCH v2 8/8] fs/fat: fix case for FAT shortnames

2017-08-14 Thread Rob Clark
Noticed when comparing our output to linux. There are some lcase bits which control whether filename and/or extension should be downcase'd. Signed-off-by: Rob Clark --- fs/fat/fat.c | 17 - fs/fat/fat_write.c | 4 ++-- include/fat.h | 3 +++ 3 files change

Re: [U-Boot] [PATCH v2 3/8] fat/fs: convert to directory iterators

2017-08-14 Thread Rob Clark
On Mon, Aug 14, 2017 at 9:47 AM, Brüns, Stefan wrote: > On Montag, 14. August 2017 15:16:15 CEST Rob Clark wrote: >> And drop a whole lot of ugly code! >> >> Signed-off-by: Rob Clark >> --- >> fs/fat/fat.c | 723 >> ++---

Re: [U-Boot] [PATCH v2 3/8] fat/fs: convert to directory iterators

2017-08-14 Thread Rob Clark
On Mon, Aug 14, 2017 at 10:39 AM, Rob Clark wrote: > On Mon, Aug 14, 2017 at 9:47 AM, Brüns, Stefan > wrote: > >> Have you checked this case still works? AFAICS this is not covered in fs- >> test.sh. Examples of suitables sandbox commands are given in the commit >>

Re: [U-Boot] [PATCH 1/1] efi_loader: allow return value in EFI_CALL

2017-08-17 Thread Rob Clark
On Tue, Aug 15, 2017 at 3:42 PM, Heinrich Schuchardt wrote: > Macro EFI_CALL was introduced to call an UEFI function. > Unfortunately is did not support return values. > Most UEFI functions have a return value. > > So let's rename EFI_CALL to EFI_CALL_VOID and introduce a > new EFI_CALL macro that

Re: [U-Boot] [PATCH 1/1] efi_loader: allow return value in EFI_CALL

2017-08-17 Thread Rob Clark
On Thu, Aug 17, 2017 at 12:57 PM, Heinrich Schuchardt wrote: > On 08/17/2017 01:49 PM, Rob Clark wrote: >> On Tue, Aug 15, 2017 at 3:42 PM, Heinrich Schuchardt >> wrote: >>> Macro EFI_CALL was introduced to call an UEFI function. >>> Unfortunately is did not sup

Re: [U-Boot] [RFC] efi_loader: frame buffers in EFI GOP and DM_VIDEO

2017-11-06 Thread Rob Clark
On Wed, Oct 25, 2017 at 3:45 PM, Heinrich Schuchardt wrote: > Hello Alex, hello Simon, > > I have just been reading through efi_gop and video_uclass.c and there seems > to be something missing in the support of video modes. > > U-Boot configuration knows the following color models: > > 16-color >

Re: [U-Boot] [PATCH v2 01/18] efi_loader: efi_bootmgr: do not make hidden assignments

2017-11-17 Thread Rob Clark
On Sun, Nov 12, 2017 at 9:02 AM, Heinrich Schuchardt wrote: > Assignments should not be made in the middle of nowhere. > > Signed-off-by: Heinrich Schuchardt > --- > v2 > Call efi_dp_str in debug mode only. > --- > lib/efi_loader/efi_bootmgr.c | 6 -- > 1 file changed, 4 insertions(+

Re: [U-Boot] [PATCH v2 01/18] efi_loader: efi_bootmgr: do not make hidden assignments

2017-11-17 Thread Rob Clark
On Fri, Nov 17, 2017 at 12:46 PM, Heinrich Schuchardt wrote: > On 11/17/2017 03:04 PM, Rob Clark wrote: >> >> On Sun, Nov 12, 2017 at 9:02 AM, Heinrich Schuchardt >> wrote: >>> >>> Assignments should not be made in the middle of nowhere. >>> >&g

[U-Boot] [PATCH] efi_loader: add missing breaks

2017-11-30 Thread Rob Clark
Otherwise with GUID partition types you would end up with things like: .../HD(Part0,Sig6252c819-4624-4995-8d16-abc9cd5d4130)/HD(Part0,MBRType=02,SigType=02) Signed-off-by: Rob Clark --- Reported by 'ykaukab' on IRC. Not sure if someone already sent a similar patch. lib/

Re: [U-Boot] [PATCH] efi_loader: initialise partition_signature memory

2017-11-30 Thread Rob Clark
s a problem where the loaded image protocol would not return a > device path with MEDIA_DEVICE causing the OpenBSD bootloader to fail > on rpi_3 and other targets. > > Signed-off-by: Jonathan Gray Reviewed-by: Rob Clark > --- > lib/efi_loader/efi_device_path.c | 3 +++ > 1 fi

Re: [U-Boot] [PATCH v4 1/1] efi_loader: write protocol GUID in OpenProtocol

2017-08-24 Thread Rob Clark
On Wed, Aug 23, 2017 at 5:44 PM, Heinrich Schuchardt wrote: > On 08/18/2017 05:45 PM, Heinrich Schuchardt wrote: >> To understand what is happening in OpenProtocol or LocateProtocol >> it is necessary to know the protocol interface GUID. >> Let's write a debug me

Re: [U-Boot] [PATCH 1/1] efi_loader: call __efi_exit_check in efi_exit

2017-08-26 Thread Rob Clark
thout the patch. > > Signed-off-by: Heinrich Schuchardt Thanks, Reviewed-by: Rob Clark > --- > lib/efi_loader/efi_boottime.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c > index 5444b32530..e

Re: [U-Boot] [PATCH 00/23] efi_loader implement missing functions

2017-08-29 Thread Rob Clark
On Tue, Aug 29, 2017 at 7:45 AM, Alexander Graf wrote: > On 08/29/2017 12:52 PM, Heinrich Schuchardt wrote: >> >> On 08/27/2017 10:10 PM, Simon Glass wrote: >>> >>> Hi Heinrich, >>> >>> On 26 August 2017 at 16:51, Heinrich Schuchardt >>> wrote: This patch sequence contains all patches n

Re: [U-Boot] [PATCH 00/23] efi_loader implement missing functions

2017-08-29 Thread Rob Clark
On Tue, Aug 29, 2017 at 8:57 AM, Leif Lindholm wrote: > On Tue, Aug 29, 2017 at 02:26:48PM +0200, Alexander Graf wrote: >> > > > I would add command >> > > > bootefi selftest.efi >> > > > to run the tests and provide the python wrapper code to add it to the >> > > > test suite. >> > > >> > > I thi

Re: [U-Boot] [PATCH 00/23] efi_loader implement missing functions

2017-09-01 Thread Rob Clark
On Thu, Aug 31, 2017 at 10:45 AM, Leif Lindholm wrote: > On Wed, Aug 30, 2017 at 08:59:31AM +0100, Leif Lindholm wrote: >> On Wed, Aug 30, 2017 at 12:03:16AM +0200, Heinrich Schuchardt wrote: >> > I am able to provide a test application that will cover the API >> > functions that I have focused on

Re: [U-Boot] [PATCH 00/23] efi_loader implement missing functions

2017-09-01 Thread Rob Clark
On Thu, Aug 31, 2017 at 10:45 AM, Leif Lindholm wrote: > On Wed, Aug 30, 2017 at 08:59:31AM +0100, Leif Lindholm wrote: >> On Wed, Aug 30, 2017 at 12:03:16AM +0200, Heinrich Schuchardt wrote: >> > I am able to provide a test application that will cover the API >> > functions that I have focused on

<    1   2   3   4   5   6   >