All of lore.kernel.org
 help / color / mirror / Atom feed
* reserved memory from devicetree definition
@ 2021-03-04 23:45 jorge courett
  2021-03-05  1:04 ` Bin Meng
  0 siblings, 1 reply; 4+ messages in thread
From: jorge courett @ 2021-03-04 23:45 UTC (permalink / raw)
  To: u-boot

Hi!
Is there any way to use a reserved memory definition in the device tree to
avoid that u-boot could use that SDRAM memory region? Or the only way is by
compiler configuration?

Thanks

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

* reserved memory from devicetree definition
  2021-03-04 23:45 reserved memory from devicetree definition jorge courett
@ 2021-03-05  1:04 ` Bin Meng
  2021-03-05  2:01   ` Sean Anderson
  0 siblings, 1 reply; 4+ messages in thread
From: Bin Meng @ 2021-03-05  1:04 UTC (permalink / raw)
  To: u-boot

On Fri, Mar 5, 2021 at 8:26 AM jorge courett <jorge.courett@gmail.com> wrote:
>
> Hi!
> Is there any way to use a reserved memory definition in the device tree to
> avoid that u-boot could use that SDRAM memory region? Or the only way is by
> compiler configuration?

The use case you pointed out is not supported by U-Boot. U-Boot
currently only supports insert /reserved-memory node on some boards.

Patches are welcome to support the new use case :)

Regards,
Bin

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

* reserved memory from devicetree definition
  2021-03-05  1:04 ` Bin Meng
@ 2021-03-05  2:01   ` Sean Anderson
  2021-03-05 18:01     ` jorge courett
  0 siblings, 1 reply; 4+ messages in thread
From: Sean Anderson @ 2021-03-05  2:01 UTC (permalink / raw)
  To: u-boot

On 3/4/21 8:04 PM, Bin Meng wrote:
> On Fri, Mar 5, 2021 at 8:26 AM jorge courett <jorge.courett@gmail.com> wrote:
>>
>> Hi!
>> Is there any way to use a reserved memory definition in the device tree to
>> avoid that u-boot could use that SDRAM memory region? Or the only way is by
>> compiler configuration?
> 
> The use case you pointed out is not supported by U-Boot. U-Boot
> currently only supports insert /reserved-memory node on some boards.
> 
> Patches are welcome to support the new use case :)
> 
> Regards,
> Bin

In the general case you can do this if your arch/board's dram_init calls
fdtdec_setup_mem_size_base. Though there are numerous ways to override
these values, so see setup_dest_addr for details. Do note that many
memory addresses are set via several different methods, depending on the
board. So you might need to have some compile-time modification anyway.

--Sean

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

* reserved memory from devicetree definition
  2021-03-05  2:01   ` Sean Anderson
@ 2021-03-05 18:01     ` jorge courett
  0 siblings, 0 replies; 4+ messages in thread
From: jorge courett @ 2021-03-05 18:01 UTC (permalink / raw)
  To: u-boot

Thanks Ben and Sean!!

I was trying to reserve the first 512K DDR memory, so due to uBoot
relocation at the end of the DRR, it can be a guarantee that uBoot does not
overlap to this section (2 G mem).
For Linux, I am already using memory reserved node as described in
https://www.kernel.org/doc/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt

Indeed  It could be better in uBoot if It could use the same
devicetree configuration. As you say, implementing/changing the dram_init
into the board.

Thanks again !!!
Regards
Jorge



On Thu, Mar 4, 2021 at 11:01 PM Sean Anderson <seanga2@gmail.com> wrote:

> On 3/4/21 8:04 PM, Bin Meng wrote:
> > On Fri, Mar 5, 2021 at 8:26 AM jorge courett <jorge.courett@gmail.com>
> wrote:
> >>
> >> Hi!
> >> Is there any way to use a reserved memory definition in the device tree
> to
> >> avoid that u-boot could use that SDRAM memory region? Or the only way
> is by
> >> compiler configuration?
> >
> > The use case you pointed out is not supported by U-Boot. U-Boot
> > currently only supports insert /reserved-memory node on some boards.
> >
> > Patches are welcome to support the new use case :)
> >
> > Regards,
> > Bin
>
> In the general case you can do this if your arch/board's dram_init calls
> fdtdec_setup_mem_size_base. Though there are numerous ways to override
> these values, so see setup_dest_addr for details. Do note that many
> memory addresses are set via several different methods, depending on the
> board. So you might need to have some compile-time modification anyway.
>
> --Sean
>

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

end of thread, other threads:[~2021-03-05 18:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 23:45 reserved memory from devicetree definition jorge courett
2021-03-05  1:04 ` Bin Meng
2021-03-05  2:01   ` Sean Anderson
2021-03-05 18:01     ` jorge courett

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.