All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus driver
@ 2019-04-10 12:46 Lukas Auer
  2019-04-10 13:03 ` Bin Meng
  2019-04-22  2:38 ` sjg at google.com
  0 siblings, 2 replies; 7+ messages in thread
From: Lukas Auer @ 2019-04-10 12:46 UTC (permalink / raw)
  To: u-boot

Boards such as qemu-riscv, which receive their device tree at runtime,
for example from QEMU or firmware, are unable to add the appropriate
device tree properties to make devices available pre relocation.
Instead, they must rely on the DM_FLAG_PRE_RELOC flag to be set for the
required drivers.

Add the DM_FLAG_PRE_RELOC flag to the simple-bus driver to make devices
under it with drivers that have set the flag as well available pre
relocation for these boards.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
---

 drivers/core/simple-bus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/core/simple-bus.c b/drivers/core/simple-bus.c
index e16d8a9ff4..7fc23ef82d 100644
--- a/drivers/core/simple-bus.c
+++ b/drivers/core/simple-bus.c
@@ -60,4 +60,5 @@ U_BOOT_DRIVER(simple_bus_drv) = {
 	.name	= "generic_simple_bus",
 	.id	= UCLASS_SIMPLE_BUS,
 	.of_match = generic_simple_bus_ids,
+	.flags	= DM_FLAG_PRE_RELOC,
 };
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus driver
  2019-04-10 12:46 [U-Boot] [PATCH] simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus driver Lukas Auer
@ 2019-04-10 13:03 ` Bin Meng
  2019-04-22  2:38 ` sjg at google.com
  1 sibling, 0 replies; 7+ messages in thread
From: Bin Meng @ 2019-04-10 13:03 UTC (permalink / raw)
  To: u-boot

On Wed, Apr 10, 2019 at 8:46 PM Lukas Auer
<lukas.auer@aisec.fraunhofer.de> wrote:
>
> Boards such as qemu-riscv, which receive their device tree at runtime,
> for example from QEMU or firmware, are unable to add the appropriate
> device tree properties to make devices available pre relocation.
> Instead, they must rely on the DM_FLAG_PRE_RELOC flag to be set for the
> required drivers.
>
> Add the DM_FLAG_PRE_RELOC flag to the simple-bus driver to make devices
> under it with drivers that have set the flag as well available pre
> relocation for these boards.
>
> Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
> ---
>
>  drivers/core/simple-bus.c | 1 +
>  1 file changed, 1 insertion(+)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Tested on QEMU RISC-V 'virt' target with 2 cores, M-mode
Tested-by: Bin Meng <bmeng.cn@gmail.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus driver
  2019-04-10 12:46 [U-Boot] [PATCH] simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus driver Lukas Auer
  2019-04-10 13:03 ` Bin Meng
@ 2019-04-22  2:38 ` sjg at google.com
  2019-04-29  9:40   ` Heiko Schocher
  1 sibling, 1 reply; 7+ messages in thread
From: sjg at google.com @ 2019-04-22  2:38 UTC (permalink / raw)
  To: u-boot

On Wed, Apr 10, 2019 at 8:46 PM Lukas Auer
<lukas.auer@aisec.fraunhofer.de> wrote:
>
> Boards such as qemu-riscv, which receive their device tree at runtime,
> for example from QEMU or firmware, are unable to add the appropriate
> device tree properties to make devices available pre relocation.
> Instead, they must rely on the DM_FLAG_PRE_RELOC flag to be set for the
> required drivers.
>
> Add the DM_FLAG_PRE_RELOC flag to the simple-bus driver to make devices
> under it with drivers that have set the flag as well available pre
> relocation for these boards.
>
> Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
> ---
>
>  drivers/core/simple-bus.c | 1 +
>  1 file changed, 1 insertion(+)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Tested on QEMU RISC-V 'virt' target with 2 cores, M-mode
Tested-by: Bin Meng <bmeng.cn@gmail.com>

Applied to u-boot-dm, thanks!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus driver
  2019-04-22  2:38 ` sjg at google.com
@ 2019-04-29  9:40   ` Heiko Schocher
  2019-04-29 16:11     ` Auer, Lukas
  0 siblings, 1 reply; 7+ messages in thread
From: Heiko Schocher @ 2019-04-29  9:40 UTC (permalink / raw)
  To: u-boot

Hello Simon,

Am 22.04.2019 um 04:38 schrieb sjg at google.com:
> On Wed, Apr 10, 2019 at 8:46 PM Lukas Auer
> <lukas.auer@aisec.fraunhofer.de> wrote:
>>
>> Boards such as qemu-riscv, which receive their device tree at runtime,
>> for example from QEMU or firmware, are unable to add the appropriate
>> device tree properties to make devices available pre relocation.
>> Instead, they must rely on the DM_FLAG_PRE_RELOC flag to be set for the
>> required drivers.
>>
>> Add the DM_FLAG_PRE_RELOC flag to the simple-bus driver to make devices
>> under it with drivers that have set the flag as well available pre
>> relocation for these boards.
>>
>> Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
>> ---
>>
>>   drivers/core/simple-bus.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
> 
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> 
> Tested on QEMU RISC-V 'virt' target with 2 cores, M-mode
> Tested-by: Bin Meng <bmeng.cn@gmail.com>
> 
> Applied to u-boot-dm, thanks!

I just tested current mainline U-Boot:

* 6aebc0d11a - (origin/master, origin/HEAD) Revert "fs: btrfs: fix false negatives in ROOT_ITEM 
search" (vor 2 Tagen) <Tom Rini>

on a not yet mainlined imx6ull port, and after SPL loaded U-Boot
into RAM I see no more output. After git bisect session, this
commit was found as the reason for breaking U-Boot.

After reverting this commit, board boots fine again...

Any Idea what could be wrong ?

Thanks!

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus driver
  2019-04-29  9:40   ` Heiko Schocher
@ 2019-04-29 16:11     ` Auer, Lukas
  2019-05-06 11:25       ` Auer, Lukas
  0 siblings, 1 reply; 7+ messages in thread
From: Auer, Lukas @ 2019-04-29 16:11 UTC (permalink / raw)
  To: u-boot

Hello Heiko,

On Mon, 2019-04-29 at 11:40 +0200, Heiko Schocher wrote:
> Hello Simon,
> 
> Am 22.04.2019 um 04:38 schrieb sjg at google.com:
> > On Wed, Apr 10, 2019 at 8:46 PM Lukas Auer
> > <lukas.auer@aisec.fraunhofer.de> wrote:
> > > Boards such as qemu-riscv, which receive their device tree at runtime,
> > > for example from QEMU or firmware, are unable to add the appropriate
> > > device tree properties to make devices available pre relocation.
> > > Instead, they must rely on the DM_FLAG_PRE_RELOC flag to be set for the
> > > required drivers.
> > > 
> > > Add the DM_FLAG_PRE_RELOC flag to the simple-bus driver to make devices
> > > under it with drivers that have set the flag as well available pre
> > > relocation for these boards.
> > > 
> > > Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
> > > ---
> > > 
> > >   drivers/core/simple-bus.c | 1 +
> > >   1 file changed, 1 insertion(+)
> > > 
> > 
> > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> > 
> > Tested on QEMU RISC-V 'virt' target with 2 cores, M-mode
> > Tested-by: Bin Meng <bmeng.cn@gmail.com>
> > 
> > Applied to u-boot-dm, thanks!
> 
> I just tested current mainline U-Boot:
> 
> * 6aebc0d11a - (origin/master, origin/HEAD) Revert "fs: btrfs: fix false negatives in ROOT_ITEM 
> search" (vor 2 Tagen) <Tom Rini>
> 
> on a not yet mainlined imx6ull port, and after SPL loaded U-Boot
> into RAM I see no more output. After git bisect session, this
> commit was found as the reason for breaking U-Boot.
> 
> After reverting this commit, board boots fine again...
> 
> Any Idea what could be wrong ?
> 
> Thanks!
> 
> bye,
> Heiko

Can you attach a debugger to the system?

I can't think of anything apparent that this patch might have
broken. Is U-Boot perhaps using a different serial console, which was
not available without this patch?

Thanks,
Lukas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus driver
  2019-04-29 16:11     ` Auer, Lukas
@ 2019-05-06 11:25       ` Auer, Lukas
  2019-05-06 12:54         ` Heiko Schocher
  0 siblings, 1 reply; 7+ messages in thread
From: Auer, Lukas @ 2019-05-06 11:25 UTC (permalink / raw)
  To: u-boot

Hello Heiko,

On Mon, 2019-04-29 at 16:11 +0000, Auer, Lukas wrote:
> Hello Heiko,
> 
> On Mon, 2019-04-29 at 11:40 +0200, Heiko Schocher wrote:
> > Hello Simon,
> > 
> > Am 22.04.2019 um 04:38 schrieb sjg at google.com:
> > > On Wed, Apr 10, 2019 at 8:46 PM Lukas Auer
> > > <lukas.auer@aisec.fraunhofer.de> wrote:
> > > > Boards such as qemu-riscv, which receive their device tree at runtime,
> > > > for example from QEMU or firmware, are unable to add the appropriate
> > > > device tree properties to make devices available pre relocation.
> > > > Instead, they must rely on the DM_FLAG_PRE_RELOC flag to be set for the
> > > > required drivers.
> > > > 
> > > > Add the DM_FLAG_PRE_RELOC flag to the simple-bus driver to make devices
> > > > under it with drivers that have set the flag as well available pre
> > > > relocation for these boards.
> > > > 
> > > > Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
> > > > ---
> > > > 
> > > >   drivers/core/simple-bus.c | 1 +
> > > >   1 file changed, 1 insertion(+)
> > > > 
> > > 
> > > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> > > 
> > > Tested on QEMU RISC-V 'virt' target with 2 cores, M-mode
> > > Tested-by: Bin Meng <bmeng.cn@gmail.com>
> > > 
> > > Applied to u-boot-dm, thanks!
> > 
> > I just tested current mainline U-Boot:
> > 
> > * 6aebc0d11a - (origin/master, origin/HEAD) Revert "fs: btrfs: fix false negatives in ROOT_ITEM 
> > search" (vor 2 Tagen) <Tom Rini>
> > 
> > on a not yet mainlined imx6ull port, and after SPL loaded U-Boot
> > into RAM I see no more output. After git bisect session, this
> > commit was found as the reason for breaking U-Boot.
> > 
> > After reverting this commit, board boots fine again...
> > 
> > Any Idea what could be wrong ?
> > 
> > Thanks!
> > 
> > bye,
> > Heiko
> 
> Can you attach a debugger to the system?
> 
> I can't think of anything apparent that this patch might have
> broken. Is U-Boot perhaps using a different serial console, which was
> not available without this patch?
> 

This issue is fixed with the following patch [1]. The issue was that
the default value of CONFIG_SYS_MALLOC_F_LEN for i.MX was too low,
increasing it fixes the problem.

Thanks,
Lukas

[1]: https://patchwork.ozlabs.org/patch/1094974/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus driver
  2019-05-06 11:25       ` Auer, Lukas
@ 2019-05-06 12:54         ` Heiko Schocher
  0 siblings, 0 replies; 7+ messages in thread
From: Heiko Schocher @ 2019-05-06 12:54 UTC (permalink / raw)
  To: u-boot

Hello Lukas,

Am 06.05.2019 um 13:25 schrieb Auer, Lukas:
> Hello Heiko,
> 
> On Mon, 2019-04-29 at 16:11 +0000, Auer, Lukas wrote:
>> Hello Heiko,
>>
>> On Mon, 2019-04-29 at 11:40 +0200, Heiko Schocher wrote:
>>> Hello Simon,
>>>
>>> Am 22.04.2019 um 04:38 schrieb sjg at google.com:
>>>> On Wed, Apr 10, 2019 at 8:46 PM Lukas Auer
>>>> <lukas.auer@aisec.fraunhofer.de> wrote:
>>>>> Boards such as qemu-riscv, which receive their device tree at runtime,
>>>>> for example from QEMU or firmware, are unable to add the appropriate
>>>>> device tree properties to make devices available pre relocation.
>>>>> Instead, they must rely on the DM_FLAG_PRE_RELOC flag to be set for the
>>>>> required drivers.
>>>>>
>>>>> Add the DM_FLAG_PRE_RELOC flag to the simple-bus driver to make devices
>>>>> under it with drivers that have set the flag as well available pre
>>>>> relocation for these boards.
>>>>>
>>>>> Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
>>>>> ---
>>>>>
>>>>>    drivers/core/simple-bus.c | 1 +
>>>>>    1 file changed, 1 insertion(+)
>>>>>
>>>>
>>>> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
>>>>
>>>> Tested on QEMU RISC-V 'virt' target with 2 cores, M-mode
>>>> Tested-by: Bin Meng <bmeng.cn@gmail.com>
>>>>
>>>> Applied to u-boot-dm, thanks!
>>>
>>> I just tested current mainline U-Boot:
>>>
>>> * 6aebc0d11a - (origin/master, origin/HEAD) Revert "fs: btrfs: fix false negatives in ROOT_ITEM
>>> search" (vor 2 Tagen) <Tom Rini>
>>>
>>> on a not yet mainlined imx6ull port, and after SPL loaded U-Boot
>>> into RAM I see no more output. After git bisect session, this
>>> commit was found as the reason for breaking U-Boot.
>>>
>>> After reverting this commit, board boots fine again...
>>>
>>> Any Idea what could be wrong ?
>>>
>>> Thanks!
>>>
>>> bye,
>>> Heiko
>>
>> Can you attach a debugger to the system?
>>
>> I can't think of anything apparent that this patch might have
>> broken. Is U-Boot perhaps using a different serial console, which was
>> not available without this patch?
>>
> 
> This issue is fixed with the following patch [1]. The issue was that
> the default value of CONFIG_SYS_MALLOC_F_LEN for i.MX was too low,
> increasing it fixes the problem.

Indeed! This fixes my problem.

Thanks!

bye,
Heiko
> 
> Thanks,
> Lukas
> 
> [1]: https://patchwork.ozlabs.org/patch/1094974/
> 

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-06 12:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-10 12:46 [U-Boot] [PATCH] simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus driver Lukas Auer
2019-04-10 13:03 ` Bin Meng
2019-04-22  2:38 ` sjg at google.com
2019-04-29  9:40   ` Heiko Schocher
2019-04-29 16:11     ` Auer, Lukas
2019-05-06 11:25       ` Auer, Lukas
2019-05-06 12:54         ` Heiko Schocher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.