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

2017-07-03 Thread Rob Clark
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 enabled, the sensible thing (in terms of user experience) would be to simply add ourselves to the list of stdin devices. Signed-off-by: Rob Clark

[U-Boot] [PATCH] video: add config option to skip framebuffer clear

2017-07-04 Thread Rob Clark
The use-case is that the thing that loaded u-boot already put a splash image on screen. And we want to preserve that until grub boot menu takes over. Signed-off-by: Rob Clark --- drivers/video/Kconfig| 8 drivers/video/cfb_console.c | 2 ++ drivers/video/video-uclass.c | 2

Re: [U-Boot] [PATCH 4/5] efi_loader: gop: fixes for CONFIG_DM_VIDEO without CONFIG_LCD

2017-07-19 Thread Rob Clark
gt;> Hi, >>>> >>>> On 12 July 2017 at 05:52, Alexander Graf wrote: >>>>> >>>>> >>>>> On 25.06.17 01:05, Rob Clark wrote: >>>>>> >>>>>> Signed-off-by: Rob Clark >>>>>> Cc:

Re: [U-Boot] [RFC] efi: variable support

2017-07-19 Thread Rob Clark
On Wed, Jul 12, 2017 at 8:57 AM, Alexander Graf wrote: > > > On 25.06.17 00:29, Rob Clark wrote: >> >> Mapping from EFI variables to grub variables. Still almost as many >> TODOs as lines of code, but just figured I'd send out an early version >> for com

Re: [U-Boot] [PATCH 0/5] db410c: updates for grub + gfxterm

2017-07-19 Thread Rob Clark
On Thu, Jul 6, 2017 at 8:02 AM, Mateusz Kulikowski wrote: > Hi Rob, > > On 25.06.2017 01:05, Rob Clark wrote: >> In particular, support for display setup by lk. This introduces a >> simplefb display driver that uses the framebuffer fdt node populated >> by the fir

Re: [U-Boot] [PATCH] dm: core: don't fail to iterate if first one fails to probe

2017-07-19 Thread Rob Clark
On Thu, Jul 13, 2017 at 3:10 PM, Simon Glass wrote: > Hi Rob, > > On 21 June 2017 at 04:52, Rob Clark wrote: >> On Wed, Jun 21, 2017 at 6:23 AM, Peter Robinson wrote: >>> On Tue, Jun 20, 2017 at 10:49 PM, Rob Clark wrote: >>>> efi_disk_register() would try

Re: [U-Boot] [PATCH 0/5] db410c: updates for grub + gfxterm

2017-07-19 Thread Rob Clark
On Wed, Jul 19, 2017 at 12:49 PM, Rob Clark wrote: > On Thu, Jul 6, 2017 at 8:02 AM, Mateusz Kulikowski > wrote: >> Hi Rob, >> >> On 25.06.2017 01:05, Rob Clark wrote: >>> In particular, support for display setup by lk. This introduces a >>> simplefb di

[U-Boot] [PATCH] efi_loader: workaround for grub lsefi bug

2017-07-20 Thread Rob Clark
Patch has also been sent to fix grub to not ignore the error returned and treat protocol_buffer_count as valid. But that that might take a while to trickle into distro's, so this workaround might be useful. Signed-off-by: Rob Clark --- lib/efi_loader/efi_boottime.c | 1 + 1 file chang

Re: [U-Boot] [PATCH 4/5] efi_loader: gop: fixes for CONFIG_DM_VIDEO without CONFIG_LCD

2017-07-21 Thread Rob Clark
gt;> Hi, >>>> >>>> On 12 July 2017 at 05:52, Alexander Graf wrote: >>>>> >>>>> >>>>> On 25.06.17 01:05, Rob Clark wrote: >>>>>> >>>>>> Signed-off-by: Rob Clark >>>>>> Cc:

Re: [U-Boot] [PATCH 4/5] efi_loader: gop: fixes for CONFIG_DM_VIDEO without CONFIG_LCD

2017-07-21 Thread Rob Clark
On Fri, Jul 21, 2017 at 11:58 AM, Tom Rini wrote: > On Fri, Jul 21, 2017 at 04:48:23AM -0600, Simon Glass wrote: >> Hi Rob, >> >> On 19 July 2017 at 09:24, Rob Clark wrote: >> > On Tue, Jul 18, 2017 at 11:06 AM, Alexander Graf wrote: >> >>

[U-Boot] [PATCH 0/4] efi_loader: fix disk objects + device-paths

2017-07-21 Thread Rob Clark
d previously and tried to minimize the ifdeffery, but things will get much cleaner when legacy support is removed. Peter Jones (1): efi: add some more device path structures Rob Clark (3): efi_loader: add udevice to EFI device-path mapping efi_loader: make disk objects for partitions efi_loade

[U-Boot] [PATCH 3/4] efi_loader: make disk objects for partitions

2017-07-21 Thread Rob Clark
usb-eth dongle (config issue?) so I haven't been able to test the net-boot path.. so it likely needs some work. Cc: Peter Jones Signed-off-by: Rob Clark --- lib/efi_loader/efi_disk.c | 73 ++- 1 file changed, 53 insertions(+), 20 deletions(-) diff --

[U-Boot] [PATCH 2/4] efi_loader: add udevice to EFI device-path mapping

2017-07-21 Thread Rob Clark
Initially just supports "disk" type devices, but a real UEFI implementation would expose input/output/display/etc with device-paths as well, so we may eventually want to expand this for other uses. Signed-off-by: Rob Clark --- include/efi_loader.h | 9 +++ lib/efi_loade

[U-Boot] [PATCH 1/4] efi: add some more device path structures

2017-07-21 Thread Rob Clark
From: Peter Jones Signed-off-by: Peter Jones --- include/efi_api.h | 49 +++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/include/efi_api.h b/include/efi_api.h index f071b36b53..e1b3f11c6d 100644 --- a/include/efi_api.h +++ b/inclu

[U-Boot] [PATCH 4/4] efi_loader: use efi_devpath to get correct boot device-path

2017-07-21 Thread Rob Clark
This way grub can properly match up the loaded_image device-path to a partition device object, so it can locate it's grub.cfg. Signed-off-by: Rob Clark --- cmd/bootefi.c | 31 ++- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/cmd/bootefi.c

[U-Boot] [PATCH] efi_loader: gop: fixes for CONFIG_DM_VIDEO without CONFIG_LCD

2017-07-21 Thread Rob Clark
Make EFI GOP support work with DM_VIDEO but without legacy LCD. Signed-off-by: Rob Clark Cc: Alexander Graf --- cmd/bootefi.c| 2 +- lib/efi_loader/Makefile | 1 + lib/efi_loader/efi_gop.c | 7 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cmd/bootefi.c b

[U-Boot] [PATCH 0/3] video patches

2017-07-21 Thread Rob Clark
1/3 unchanged, 2/3 updated to use fdtdec_get_addr_size_auto_parent() to properly parse reg node based on #address-cells and #size-cells, and 3/3 updated to change kconfig name and slight cleanup. Rob Clark (3): dm: core: also parse chosen node video: simplefb video: add config option to

[U-Boot] [PATCH 1/3] dm: core: also parse chosen node

2017-07-21 Thread Rob Clark
This is the node that would contain, for example, the framebuffer setup by an earlier stage. Signed-off-by: Rob Clark --- drivers/core/root.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/core/root.c b/drivers/core/root.c index d691d6ff94

[U-Boot] [PATCH 2/3] video: simplefb

2017-07-21 Thread Rob Clark
Not really qcom specific, but for now qcom/lk is the one firmware that is (afaiu) setting up the appropriate dt node for pre-configured display. Uses the generic simple-framebuffer DT bindings so this should be useful on other platforms. Signed-off-by: Rob Clark --- drivers/video/Kconfig

[U-Boot] [PATCH 3/3] video: add config option to skip framebuffer clear

2017-07-21 Thread Rob Clark
The use-case is that the thing that loaded u-boot already put a splash image on screen. And we want to preserve that until grub boot menu takes over. Signed-off-by: Rob Clark --- drivers/video/Kconfig| 8 drivers/video/cfb_console.c | 3 ++- drivers/video/video-uclass.c | 4

[U-Boot] [PATCH 0/5] dragonboard 410c patches

2017-07-21 Thread Rob Clark
Rob Clark (5): Makefile: also build fdt for snapdragon db410c: use fdt passed from lk db410c: add reserved-memory node to dts db410c: on aarch64 the fdtfile is in per-vendor subdirectory db410c: config updates Makefile | 6 arch/arm/Kconfig

[U-Boot] [PATCH 2/5] db410c: use fdt passed from lk

2017-07-21 Thread Rob Clark
lk patches the fdt to set some device's MAC addresses and more importantly to patch in the simple-framebuffer node that we want u-boot to see. Signed-off-by: Rob Clark --- board/qualcomm/dragonboard410c/Makefile | 1 + board/qualcomm/dragonboard410c/dragonboard410c.c

[U-Boot] [PATCH 1/5] Makefile: also build fdt for snapdragon

2017-07-21 Thread Rob Clark
Snapdragon is a bit of a funny case, where we want to build the fdt to pass to lk, which loads us, but otherwise want to treat it as OF_BOARD, since lk will patch the fdt (for example, to insert simple-framebuffer node). Signed-off-by: Rob Clark --- Makefile | 6 ++ 1 file changed, 6

[U-Boot] [PATCH 3/5] db410c: add reserved-memory node to dts

2017-07-21 Thread Rob Clark
If lk lights up display and populates simple-framebuffer node, it will also setup a reserved-memory node (needed by simplefb on linux). But it isn't clever enough to cope when the reserved-memory node is not present. Signed-off-by: Rob Clark --- arch/arm/dts/dragonboard410c.dts | 7 +

[U-Boot] [PATCH 4/5] db410c: on aarch64 the fdtfile is in per-vendor subdirectory

2017-07-21 Thread Rob Clark
Signed-off-by: Rob Clark --- include/configs/dragonboard410c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h index 11c842d952..8e742d82ce 100644 --- a/include/configs/dragonboard410c.h +++ b/include

[U-Boot] [PATCH 5/5] db410c: config updates

2017-07-21 Thread Rob Clark
Signed-off-by: Rob Clark --- arch/arm/Kconfig | 2 +- configs/dragonboard410c_defconfig | 8 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f7b44392ac..db6a325ee1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm

[U-Boot] [PATCH 2/2] usb: kbd: add missing \n

2017-07-21 Thread Rob Clark
Signed-off-by: Rob Clark --- common/usb_kbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/usb_kbd.c b/common/usb_kbd.c index 72cf78abd4..615f8f88cd 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -654,7 +654,7 @@ static int usb_kbd_remove(struct udevice

[U-Boot] [PATCH 1/2] usb: kbd: don't fail with iomux

2017-07-21 Thread Rob Clark
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 enabled, the sensible thing (in terms of user experience) would be to simply add ourselves to the list of stdin devices. Signed-off-by: Rob Clark

[U-Boot] [PATCH] db410c: enable r8152 usb eth

2017-07-21 Thread Rob Clark
Signed-off-by: Rob Clark --- I figured out why I was having no luck getting my usb ethernet dongle to work ;-) include/configs/dragonboard410c.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h index 8e742d82ce

Re: [U-Boot] [PATCH 1/5] Makefile: also build fdt for snapdragon

2017-07-21 Thread Rob Clark
On Fri, Jul 21, 2017 at 6:18 PM, Tom Rini wrote: > On Fri, Jul 21, 2017 at 03:10:10PM -0400, Rob Clark wrote: > >> Snapdragon is a bit of a funny case, where we want to build the fdt to >> pass to lk, which loads us, but otherwise want to treat it as OF_BOARD, >> since lk

Re: [U-Boot] [PATCH 5/5] db410c: config updates

2017-07-21 Thread Rob Clark
On Fri, Jul 21, 2017 at 6:20 PM, Tom Rini wrote: > On Fri, Jul 21, 2017 at 03:10:14PM -0400, Rob Clark wrote: >> Signed-off-by: Rob Clark >> --- >> arch/arm/Kconfig | 2 +- >> configs/dragonboard410c_defconfig | 8 +++- >> 2 files chan

Re: [U-Boot] [U-Boot, 3/4] efi_loader: make disk objects for partitions

2017-07-23 Thread Rob Clark
On Sun, Jul 23, 2017 at 6:25 AM, Heinrich Schuchardt wrote: > On 07/21/2017 08:43 PM, Rob Clark wrote: >> Normally a EFI application, like grub2, is going to expect to see > > %s/a/an/ > >> block-io devices for both the actual disk and for each partition >> (with t

Re: [U-Boot] [PATCH v2 01/12] efi_loader: refactor efi_open_protocol

2017-07-24 Thread Rob Clark
On Tue, Jul 11, 2017 at 4:06 PM, Heinrich Schuchardt wrote: > efi_open_protocol was implemented to call a protocol specific open > function to retrieve the protocol interface. > > The UEFI specification does not know of such a function. > > It is not possible to implement InstallProtocolInterface

[U-Boot] [PATCH] efi_loader: EFI file paths should be DOS style

2017-07-24 Thread Rob Clark
shim.efi, for example, actually tries to parse this, but is expecting backslashes. Signed-off-by: Rob Clark --- cmd/bootefi.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/bootefi.c b/cmd/bootefi.c index b6d5047301..689eb09942 100644 --- a/cmd/bootefi.c +++ b/cmd

[U-Boot] [PATCH] efi_loader: log EFI return values too

2017-07-24 Thread Rob Clark
Turns out this is rather useful to tracking down where things fail. Signed-off-by: Rob Clark --- I've been carrying this around locally for a while.. but I find it useful and I expect others would too. include/efi_loader.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --

[U-Boot] [PATCH] efi_loader: move guidcmp to header

2017-07-24 Thread Rob Clark
Want to re-use this for file protocol, which I'm working on. Signed-off-by: Rob Clark --- include/efi_loader.h | 5 + lib/efi_loader/efi_boottime.c | 5 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index 73940

Re: [U-Boot] [PATCH] efi_loader: log EFI return values too

2017-07-24 Thread Rob Clark
On Mon, Jul 24, 2017 at 8:36 AM, Alexander Graf wrote: > > > On 24.07.17 13:59, Rob Clark wrote: >> >> Turns out this is rather useful to tracking down where things fail. >> >> Signed-off-by: Rob Clark >> --- >> I've been carrying this around l

[U-Boot] [PATCH] efi_loader: log EFI return values too

2017-07-24 Thread Rob Clark
Turns out this is rather useful to tracking down where things fail. Signed-off-by: Rob Clark --- v2: use EFI_ERROR_MASK include/efi_loader.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index 40e0f1dbd7..a8df44fdb6 100644

[U-Boot] [PATCH] efi_loader: add back optional efi_handler::open()

2017-07-24 Thread Rob Clark
"old way" are, and which do not need this extra complexity, are rebased. Signed-off-by: Rob Clark --- include/efi_loader.h | 9 - lib/efi_loader/efi_boottime.c | 7 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/include/efi_loader.h b/include/

[U-Boot] [PATCH 1/2] efi_loader: add helper macro to construct protocol objects

2017-07-24 Thread Rob Clark
dle that LocateHandle() returns.. See LibLocateProtocol() in gnu-efi. It does LocateHandle() to find all the handles, and then loops over them calling HandleProtocol() with the GUID of the protocol it is trying to find. Signed-off-by: Rob Clark --- include/efi_loader.h | 8 1 file chan

[U-Boot] [PATCH 2/2] efi_loader: expose protocols via GUID

2017-07-24 Thread Rob Clark
shim.efi (or rather gnu-efi's LibLocateProtocol() which shim.efi uses) resolves protocols via efi_locate_handle() so the console protocols need to be added to the efi object list. Signed-off-by: Rob Clark --- include/efi_api.h| 9 + include/efi_loader.h | 1 +

Re: [U-Boot] [PATCH v2 01/12] efi_loader: refactor efi_open_protocol

2017-07-24 Thread Rob Clark
On Mon, Jul 24, 2017 at 1:11 PM, Heinrich Schuchardt wrote: > On 07/24/2017 11:48 AM, Rob Clark wrote: >> On Tue, Jul 11, 2017 at 4:06 PM, Heinrich Schuchardt >> wrote: >>> efi_open_protocol was implemented to call a protocol specific open >>> function t

Re: [U-Boot] efi_loader: workaround for grub lsefi bug

2017-07-24 Thread Rob Clark
On Mon, Jul 24, 2017 at 2:31 PM, Heinrich Schuchardt wrote: > On 07/20/2017 01:59 PM, Rob Clark wrote: >> Patch has also been sent to fix grub to not ignore the error returned >> and treat protocol_buffer_count as valid. But that that might take a >> while to trickle i

[U-Boot] [PATCH] efi_loader: allow efi_loader code to call EFI interfaces

2017-07-24 Thread Rob Clark
interfaces to be recursive, since this greatly simplifies things. (And hypothetically this would be needed anyways to allow grub to call into interfaces installed by something outside of grub.) Signed-off-by: Rob Clark --- lib/efi_loader/efi_boottime.c | 5 + 1 file changed, 5 insertions(+) diff

Re: [U-Boot] [PATCH] efi_loader: allow efi_loader code to call EFI interfaces

2017-07-25 Thread Rob Clark
On Tue, Jul 25, 2017 at 4:10 AM, Alexander Graf wrote: > > > On 25.07.17 01:47, Rob Clark wrote: >> >> To implement efi_load_image() for the case of loading an image from a >> device path rather than image already loaded into source_buffer, it is >> convenient

Re: [U-Boot] [PATCH] efi_loader: allow efi_loader code to call EFI interfaces

2017-07-25 Thread Rob Clark
On Tue, Jul 25, 2017 at 7:17 AM, Alexander Graf wrote: > > > On 25.07.17 13:10, Rob Clark wrote: >> >> On Tue, Jul 25, 2017 at 4:10 AM, Alexander Graf wrote: >>> >>> >>> >>> On 25.07.17 01:47, Rob Clark wrote: >>>> >>&g

[U-Boot] [PATCH] efi_loader: add back optional efi_handler::open()

2017-07-25 Thread Rob Clark
"old way" are, and which do not need this extra complexity, are rebased. Signed-off-by: Rob Clark --- v2: also handle this properly in locate_protocol as agraf pointed out Note that I might be misunderstanding what the EFI application expects when looking up device-path on a file handle

Re: [U-Boot] [PATCH] efi_loader: allow efi_loader code to call EFI interfaces

2017-07-25 Thread Rob Clark
On Tue, Jul 25, 2017 at 8:16 AM, Alexander Graf wrote: > > > On 25.07.17 14:08, Rob Clark wrote: >> >> On Tue, Jul 25, 2017 at 7:17 AM, Alexander Graf wrote: >>> >>> >>> >>> On 25.07.17 13:10, Rob Clark wrote: >>>

Re: [U-Boot] [RFC] efi: variable support

2017-07-25 Thread Rob Clark
On Tue, Jul 25, 2017 at 5:38 AM, Alexander Graf wrote: > > > On 19.07.17 18:38, Rob Clark wrote: >> >> On Wed, Jul 12, 2017 at 8:57 AM, Alexander Graf wrote: >>> >>> >>> >>> On 25.06.17 00:29, Rob Clark wrote: >>>> >>

Re: [U-Boot] [PATCH 2/4] efi_loader: add udevice to EFI device-path mapping

2017-07-25 Thread Rob Clark
es. Sound semi-reasonable? I'm not sure if this intersects too badly with other stuff Heinrich is working on? (Also, small logistical question.. anyone know how to do "obj-$(!CONFIG_DM) += efi_boot_device_legacy.o"?) BR, -R On Fri, Jul 21, 2017 at 2:43 PM, Rob Clark wrote: > I

Re: [U-Boot] [RFC] efi: variable support

2017-07-25 Thread Rob Clark
On Tue, Jul 25, 2017 at 10:25 AM, Alexander Graf wrote: > > > On 25.07.17 14:47, Rob Clark wrote: >> >> On Tue, Jul 25, 2017 at 5:38 AM, Alexander Graf wrote: >>> >>> I agree :). We still want to have overriding mechanisms. And we do have >>> the

Re: [U-Boot] [PATCH] efi_loader: allow efi_loader code to call EFI interfaces

2017-07-25 Thread Rob Clark
On Tue, Jul 25, 2017 at 10:28 AM, Alexander Graf wrote: > > > On 25.07.17 14:28, Rob Clark wrote: >> >> On Tue, Jul 25, 2017 at 8:16 AM, Alexander Graf wrote: >> >>> I personally think having _ext functions in anything exposed to UEFI >>> payloads

Re: [U-Boot] [PATCH] efi_loader: add back optional efi_handler::open()

2017-07-25 Thread Rob Clark
On Tue, Jul 25, 2017 at 12:39 PM, Heinrich Schuchardt wrote: > On 07/25/2017 02:21 PM, Rob Clark wrote: >> In some cases it is useful to defer creation of the protocol interface >> object. So add back an optional ->open() hook that is used if >> protcol_interface is N

Re: [U-Boot] [RFC] efi: variable support

2017-07-25 Thread Rob Clark
On Tue, Jul 25, 2017 at 12:55 PM, Alexander Graf wrote: > > > On 25.07.17 17:47, Rob Clark wrote: >> >> On Tue, Jul 25, 2017 at 10:25 AM, Alexander Graf wrote: >>> >>> >>> >>> On 25.07.17 14:47, Rob Clark wrote: >>>

Re: [U-Boot] [RFC] efi: variable support

2017-07-25 Thread Rob Clark
On Tue, Jul 25, 2017 at 1:29 PM, Alexander Graf wrote: > > >> Am 25.07.2017 um 19:23 schrieb Rob Clark : >> >>> On Tue, Jul 25, 2017 at 12:55 PM, Alexander Graf wrote: >>> >>> >>>> On 25.07.17 17:47, Rob Clark wrote: >>&

Re: [U-Boot] [PATCH] efi_loader: allow efi_loader code to call EFI interfaces

2017-07-25 Thread Rob Clark
On Tue, Jul 25, 2017 at 12:56 PM, Heinrich Schuchardt wrote: > On 07/25/2017 04:28 PM, Alexander Graf wrote: >> >> >> On 25.07.17 14:28, Rob Clark wrote: >>> On Tue, Jul 25, 2017 at 8:16 AM, Alexander Graf wrote: >>>> >>>> >>>> On

Re: [U-Boot] [PATCH] efi_loader: allow efi_loader code to call EFI interfaces

2017-07-25 Thread Rob Clark
On Tue, Jul 25, 2017 at 3:12 PM, Heinrich Schuchardt wrote: > On 07/25/2017 07:52 PM, Rob Clark wrote: >> On Tue, Jul 25, 2017 at 12:56 PM, Heinrich Schuchardt >> wrote: >>> On 07/25/2017 04:28 PM, Alexander Graf wrote: >>>> >>>> >>>&

Re: [U-Boot] [PATCH] efi_loader: allow efi_loader code to call EFI interfaces

2017-07-25 Thread Rob Clark
On Tue, Jul 25, 2017 at 5:01 PM, Heinrich Schuchardt wrote: > On 07/25/2017 09:42 PM, Rob Clark wrote: >> On Tue, Jul 25, 2017 at 3:12 PM, Heinrich Schuchardt >> wrote: >>> On 07/25/2017 07:52 PM, Rob Clark wrote: >>>> On Tue, Jul 25, 2017 at 12:56 PM, Heinr

Re: [U-Boot] [PATCH] efi_loader: allow efi_loader code to call EFI interfaces

2017-07-25 Thread Rob Clark
On Tue, Jul 25, 2017 at 5:42 PM, Alexander Graf wrote: > > > On 25.07.17 23:26, Rob Clark wrote: >> >> On Tue, Jul 25, 2017 at 5:01 PM, Heinrich Schuchardt >> wrote: >>> >>> On 07/25/2017 09:42 PM, Rob Clark wrote: >>>> >>>

Re: [U-Boot] [PATCH] efi_loader: allow efi_loader code to call EFI interfaces

2017-07-25 Thread Rob Clark
On Tue, Jul 25, 2017 at 6:10 PM, Alexander Graf wrote: > > > On 26.07.17 00:01, Rob Clark wrote: >> >> On Tue, Jul 25, 2017 at 5:42 PM, Alexander Graf wrote: >>> >>> >>> >>> On 25.07.17 23:26, Rob Clark wrote: >>>> >>&g

[U-Boot] [PATCH] efi_loader: remove double EFI_EXIT() with efi_unsupported

2017-07-25 Thread Rob Clark
Probably this went unnoticed before, but it causes problems with addition of 804b1d73 ("efi_loader: log EFI return values too") Signed-off-by: Rob Clark --- lib/efi_loader/efi_boottime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/efi_loader/efi_bootti

[U-Boot] [PATCH] efi_loader: remove more double EFI_EXIT() in efi_disk.c

2017-07-25 Thread Rob Clark
Signed-off-by: Rob Clark --- lib/efi_loader/efi_disk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index adf906b7dd..4bde2287b4 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -72,7

[U-Boot] [PATCH 1/3] efi_loader: Add an EFI_CALL() macro

2017-07-26 Thread Rob Clark
Rather than open-coding EFI_EXIT() + callback + EFI_ENTRY(), introduce an EFI_CALL() macro. This makes callbacks into UEFI world (of which there will be more in the future) more concise and easier to locate in the code. Signed-off-by: Rob Clark --- include/efi_loader.h | 17

[U-Boot] [PATCH 3/3] efi_loader: indent entry/exit prints to show nesting level

2017-07-26 Thread Rob Clark
This should make it easier to see when a callback back to UEFI world calls back in to the u-boot world, and generally match up EFI_ENTRY() and EFI_EXIT() calls. Signed-off-by: Rob Clark --- include/efi_loader.h | 12 lib/efi_loader/efi_boottime.c | 28

[U-Boot] [PATCH 2/3] efi_loader: add checking for incorrect use of EFI_ENTRY/EXIT

2017-07-26 Thread Rob Clark
Missing an EFI_ENTRY() or doubling up EFI_EXIT() leads to non-obvious crashes. Let's add some error checking. Signed-off-by: Rob Clark --- include/efi_loader.h | 5 + lib/efi_loader/efi_boottime.c | 13 + 2 files changed, 18 insertions(+) diff --git a/in

Re: [U-Boot] [PATCH 2/3] efi_loader: add checking for incorrect use of EFI_ENTRY/EXIT

2017-07-26 Thread Rob Clark
On Wed, Jul 26, 2017 at 11:25 AM, Alexander Graf wrote: > > > On 26.07.17 15:55, Rob Clark wrote: >> >> Missing an EFI_ENTRY() or doubling up EFI_EXIT() leads to non-obvious >> crashes. Let's add some error checking. >> >> Signed-off-by: Rob Clark &g

[U-Boot] [PATCH] efi_loader: fix bug in efi_get_memory_map

2017-07-26 Thread Rob Clark
When booting shim -> fallback -> shim -> grub -> linux the memory map is a bit larger than the size linux passes in on the first call. But in the EFI_BUFFER_TOO_SMALL case we were not passing back the updated size to linux so it would loop forever. Signed-off-by: Rob Clark --- li

[U-Boot] [PATCH] efi_loader: only evaluate EFI_EXIT()'s ret once

2017-07-26 Thread Rob Clark
There are a couple spots doing things like: return EFI_EXIT(some_fxn(...)); which I handn't noticed before. With addition of printing return value in the EFI_EXIT() macro, now the fxn call was getting evaluated twice. Which we didn't really want. Signed-off-by: Rob Clark --- I

Re: [U-Boot] [PATCH] efi_loader: fix bug in efi_get_memory_map

2017-07-26 Thread Rob Clark
On Wed, Jul 26, 2017 at 4:10 PM, Alexander Graf wrote: > > > On 26.07.17 20:34, Rob Clark wrote: >> >> When booting shim -> fallback -> shim -> grub -> linux the memory map is >> a bit larger than the size linux passes in on the first call. But in >&

Re: [U-Boot] [PATCH 2/3] efi_loader: add checking for incorrect use of EFI_ENTRY/EXIT

2017-07-26 Thread Rob Clark
On Wed, Jul 26, 2017 at 4:12 PM, Alexander Graf wrote: > > > On 26.07.17 18:41, Rob Clark wrote: >> >> On Wed, Jul 26, 2017 at 11:25 AM, Alexander Graf wrote: >>> >>> >>> >>> On 26.07.17 15:55, Rob Clark wrote: >>>> >>&g

[U-Boot] [PATCH 1/4] efi_loader: only evaluate EFI_EXIT()'s ret once

2017-07-27 Thread Rob Clark
There are a couple spots doing things like: return EFI_EXIT(some_fxn(...)); which I handn't noticed before. With addition of printing return value in the EFI_EXIT() macro, now the fxn call was getting evaluated twice. Which we didn't really want. Signed-off-by: Rob Clark --

[U-Boot] [PATCH 2/4] efi_loader: Add an EFI_CALL() macro

2017-07-27 Thread Rob Clark
Rather than open-coding EFI_EXIT() + callback + EFI_ENTRY(), introduce an EFI_CALL() macro. This makes callbacks into UEFI world (of which there will be more in the future) more concise and easier to locate in the code. Signed-off-by: Rob Clark --- include/efi_loader.h | 17

[U-Boot] [PATCH 3/4] efi_loader: add checking for incorrect use of EFI_ENTRY/EXIT

2017-07-27 Thread Rob Clark
Missing an EFI_ENTRY() or doubling up EFI_EXIT() leads to non-obvious crashes. Let's add some error checking. Signed-off-by: Rob Clark --- include/efi_loader.h | 17 +--- lib/efi_loader/efi_boottime.c | 45 +-- 2 files change

[U-Boot] [PATCH 4/4] efi_loader: indent entry/exit prints to show nesting level

2017-07-27 Thread Rob Clark
This should make it easier to see when a callback back to UEFI world calls back in to the u-boot world, and generally match up EFI_ENTRY() and EFI_EXIT() calls. Signed-off-by: Rob Clark --- include/efi_loader.h | 12 lib/efi_loader/efi_boottime.c | 25

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

2017-07-27 Thread Rob Clark
Signed-off-by: Rob Clark --- Just noticed that there didn't seem to be quite enough break's. Pretty sure the intention wasn't to fall-thru lib/efi_loader/efi_device_path_to_text.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/efi_loader/efi_device_path_to_text.c b

[U-Boot] [RFC 00/10] efi_loader: bunch of EFI work for distro boot

2017-07-27 Thread Rob Clark
en finally loads the first distro's shim.efi or grubaa64.efi. (Once I have support to write variables and saveenv in ExitBootServices then it should only hit fallback.efi on first boot.) Peter Jones (2): efi: fill in disk signature bits of hard drive device path. efi: add some m

[U-Boot] [RFC 01/10] efi_loader: add back optional efi_handler::open()

2017-07-27 Thread Rob Clark
"old way" are, and which do not need this extra complexity, are rebased. Signed-off-by: Rob Clark --- include/efi_loader.h | 12 +++- lib/efi_loader/efi_boottime.c | 30 -- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/incl

[U-Boot] [RFC 04/10] fs: add fs_readdir()

2017-07-27 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. Currently only implemented for FAT, but that is all that UEFI is required to support. Signed-off-by: Rob Clark --- fs/fat/fat.c | 59

[U-Boot] [RFC 03/10] efi: add some more device path structures

2017-07-27 Thread Rob Clark
From: Peter Jones Signed-off-by: Peter Jones --- include/efi_api.h | 49 +++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/include/efi_api.h b/include/efi_api.h index ec1b321e8e..85afbeb72b 100644 --- a/include/efi_api.h +++ b/inclu

[U-Boot] [RFC 07/10] efi_loader: use proper device-paths for net

2017-07-27 Thread Rob Clark
Signed-off-by: Rob Clark --- include/efi_loader.h | 2 +- lib/efi_loader/efi_net.c | 24 +++- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index f09d0a8003..c5cc15fc4c 100644 --- a/include/efi_loader.h +++ b

[U-Boot] [RFC 05/10] efi_loader: add device-path utils

2017-07-27 Thread Rob Clark
, but slightly more convincingly. Signed-off-by: Rob Clark --- include/efi_loader.h | 17 ++ lib/efi_loader/Makefile | 2 +- lib/efi_loader/efi_device_path.c | 408 +++ 3 files changed, 426 insertions(+), 1 deletion(-) create mode 10064

[U-Boot] [RFC 09/10] efi_loader: add file/filesys support

2017-07-27 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 02/10] efi: fill in disk signature bits of hard drive device path.

2017-07-27 Thread Rob Clark
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 here. Signed-off-by: Peter Jones --- disk/part_dos.c| 12 +--- disk/part_efi.c| 20 include/blk

[U-Boot] [PATCH 1/2] board/db410c: add missing linker map entries for efi

2017-06-20 Thread Rob Clark
Otherwise the loaded image would miss the efi_runtime sections, and fall over hard when grub (for example) tried to call runtime services located in this section. Signed-off-by: Rob Clark --- board/qualcomm/dragonboard410c/u-boot.lds | 16 1 file changed, 16 insertions(+) diff

[U-Boot] [PATCH 2/2] board/db410c: fix fdt address

2017-06-20 Thread Rob Clark
Signed-off-by: Rob Clark --- Maybe there is a better way to not hardcode this? But at least with the build of lk that I have, the fdt table is at 0x81e0. I guess there must be a more robust way to do this, since presumably lk when booting the linux kernel directly somehow passes the fdt

[U-Boot] [PATCH] dm: core: don't fail to iterate if first one fails to probe

2017-06-20 Thread Rob Clark
efi_disk_register() would try to iterate all the blk devices. But if the first one in the list failed to probe, uclass_first_device() would return NULL and no attempt would be made to register the remaining devices. Also uclass_next_device() needs the same fix. Signed-off-by: Rob Clark

Re: [U-Boot] [PATCH] dm: core: don't fail to iterate if first one fails to probe

2017-06-21 Thread Rob Clark
On Wed, Jun 21, 2017 at 6:23 AM, Peter Robinson wrote: > On Tue, Jun 20, 2017 at 10:49 PM, Rob Clark wrote: >> efi_disk_register() would try to iterate all the blk devices. But if >> the first one in the list failed to probe, uclass_first_device() would >> return NULL an

Re: [U-Boot] [U-Boot,2/2] board/db410c: fix fdt address

2017-06-23 Thread Rob Clark
On Fri, Jun 23, 2017 at 10:32 AM, Tom Rini wrote: > On Tue, Jun 20, 2017 at 05:55:25PM -0400, Rob Clark wrote: > >> Signed-off-by: Rob Clark >> --- >> Maybe there is a better way to not hardcode this? But at least with >> the build of lk that I have, the fdt ta

Re: [U-Boot] [U-Boot,2/2] board/db410c: fix fdt address

2017-06-23 Thread Rob Clark
On Fri, Jun 23, 2017 at 4:24 PM, Rob Clark wrote: > On Fri, Jun 23, 2017 at 10:32 AM, Tom Rini wrote: >> On Tue, Jun 20, 2017 at 05:55:25PM -0400, Rob Clark wrote: >> >>> Signed-off-by: Rob Clark >>> --- >>> Maybe there is a better way to not hardcode

[U-Boot] [RFC] efi: variable support

2017-06-24 Thread Rob Clark
a/lib/efi_loader/efi_util.h b/lib/efi_loader/efi_util.h new file mode 100644 index 000..a566e81 --- /dev/null +++ b/lib/efi_loader/efi_util.h @@ -0,0 +1,79 @@ +/* + * EFI utils + * + * Copyright (c) 2017 Rob Clark + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __EFI_UTIL_H_ +#define __E

[U-Boot] [PATCH 0/5] db410c: updates for grub + gfxterm

2017-06-24 Thread Rob Clark
that dm/core is clever enough to notice fdt nodes under "chosen"), config updates, and related fixes. [1] https://github.com/robclark/lk/commits/db410c-display Rob Clark (5): board/db410c: use fdt passed from lk dm: core: also parse chosen node video: simplefb efi_loader:

[U-Boot] [PATCH 3/5] video: simplefb

2017-06-24 Thread Rob Clark
Not really qcom specific, but for now qcom/lk is the one firmware that is (afaiu) setting up the appropriate dt node for pre-configured display. Uses the generic simple-framebuffer DT bindings so this should be useful on other platforms. Signed-off-by: Rob Clark --- drivers/video/Kconfig

[U-Boot] [PATCH 1/5] board/db410c: use fdt passed from lk

2017-06-24 Thread Rob Clark
lk patches the fdt to set some device's MAC addresses and more importantly to patch in the simple-framebuffer node that we want u-boot to see. Signed-off-by: Rob Clark --- board/qualcomm/dragonboard410c/dragonboard410c.c | 16 1 file changed, 16 insertions(+) diff --

[U-Boot] [PATCH 5/5] configs: db410c: config updates

2017-06-24 Thread Rob Clark
Signed-off-by: Rob Clark --- arch/arm/Kconfig | 2 +- configs/dragonboard410c_defconfig | 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index dce4105..879dbc5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig

[U-Boot] [PATCH 4/5] efi_loader: gop: fixes for CONFIG_DM_VIDEO without CONFIG_LCD

2017-06-24 Thread Rob Clark
Signed-off-by: Rob Clark Cc: Alexander Graf --- cmd/bootefi.c| 2 +- lib/efi_loader/Makefile | 1 + lib/efi_loader/efi_gop.c | 7 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cmd/bootefi.c b/cmd/bootefi.c index a6598df..4f11682 100644 --- a/cmd/bootefi.c

[U-Boot] [PATCH 2/5] dm: core: also parse chosen node

2017-06-24 Thread Rob Clark
This is the node that would contain, for example, the framebuffer setup by an earlier stage. Signed-off-by: Rob Clark --- drivers/core/root.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/core/root.c b/drivers/core/root.c index d691d6f

[U-Boot] [PATCH] usb: increase usb delay

2017-06-24 Thread Rob Clark
This makes booting off the USB disks I have go from 50% reliable to 100% reliable. I'm no USB expert so maybe there is a better way. But one way or another we aren't waiting long enough after power-on for the usb device to be ready. Signed-off-by: Rob Clark --- common/usb_storage.c

Re: [U-Boot] [U-Boot,RFC] efi: variable support

2017-06-25 Thread Rob Clark
On Sun, Jun 25, 2017 at 1:06 AM, Heinrich Schuchardt wrote: > On 06/25/2017 12:29 AM, Rob Clark wrote: >> Mapping from EFI variables to grub variables. Still almost as many >> TODOs as lines of code, but just figured I'd send out an early version >> for comments. >&

Re: [U-Boot] [U-Boot,RFC] efi: variable support

2017-06-25 Thread Rob Clark
On Sun, Jun 25, 2017 at 1:16 PM, Heinrich Schuchardt wrote: > On 06/25/2017 02:12 PM, Rob Clark wrote: >> On Sun, Jun 25, 2017 at 1:06 AM, Heinrich Schuchardt >> wrote: >>> On 06/25/2017 12:29 AM, Rob Clark wrote: >>>> Mapping from EFI variables to g

Re: [U-Boot] [U-Boot,RFC] efi: variable support

2017-06-25 Thread Rob Clark
On Sun, Jun 25, 2017 at 5:07 PM, Heinrich Schuchardt wrote: > On 06/25/2017 09:06 PM, Rob Clark wrote: >> On Sun, Jun 25, 2017 at 1:16 PM, Heinrich Schuchardt >> wrote: >>> On 06/25/2017 02:12 PM, Rob Clark wrote: >>>> On Sun, Jun 25, 2017 at 1:06 AM, Heinri

  1   2   3   4   5   6   >