u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* PRAM and reserved memory for Linux
@ 2022-07-13 10:08 Joakim Tjernlund
  2022-07-13 14:21 ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Joakim Tjernlund @ 2022-07-13 10:08 UTC (permalink / raw)
  To: u-boot

I added CONFIG_PRAM 4 and a reserved-memory DTS node for the same space but
now u-boot complains when booting:
  ERROR: reserving fdt memory region failed (addr=703ff000 size=1000)
The error is caused by arch_lmb_reserve() in arm which seem
to reserve command line and board info ? 

If I remove the reserved-memory DTS node I don't get a reserved area in Linux,
don't quite understand how PRAM is supposed to work?

 Jocke

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

* Re: PRAM and reserved memory for Linux
  2022-07-13 10:08 PRAM and reserved memory for Linux Joakim Tjernlund
@ 2022-07-13 14:21 ` Tom Rini
  2022-07-13 16:13   ` Joakim Tjernlund
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2022-07-13 14:21 UTC (permalink / raw)
  To: Joakim Tjernlund; +Cc: u-boot

[-- Attachment #1: Type: text/plain, Size: 782 bytes --]

On Wed, Jul 13, 2022 at 10:08:38AM +0000, Joakim Tjernlund wrote:

> I added CONFIG_PRAM 4 and a reserved-memory DTS node for the same space but
> now u-boot complains when booting:
>   ERROR: reserving fdt memory region failed (addr=703ff000 size=1000)
> The error is caused by arch_lmb_reserve() in arm which seem
> to reserve command line and board info ? 
> 
> If I remove the reserved-memory DTS node I don't get a reserved area in Linux,
> don't quite understand how PRAM is supposed to work?

The first likely problem is that CONFIG_PRAM stuff isn't often used
these days so might be glitchy / buggy, as you've found here.  Next, I
bet that area in arch_lmb_reserve() is about ATAGS/related and should be
guarded with CONFIG_SUPPORT_PASSING_ATAGS.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: PRAM and reserved memory for Linux
  2022-07-13 14:21 ` Tom Rini
@ 2022-07-13 16:13   ` Joakim Tjernlund
  2022-07-13 18:12     ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Joakim Tjernlund @ 2022-07-13 16:13 UTC (permalink / raw)
  To: trini; +Cc: u-boot

On Wed, 2022-07-13 at 10:21 -0400, Tom Rini wrote:
> On Wed, Jul 13, 2022 at 10:08:38AM +0000, Joakim Tjernlund wrote:
> 
> > I added CONFIG_PRAM 4 and a reserved-memory DTS node for the same space but
> > now u-boot complains when booting:
> >   ERROR: reserving fdt memory region failed (addr=703ff000 size=1000)
> > The error is caused by arch_lmb_reserve() in arm which seem
> > to reserve command line and board info ? 
> > 
> > If I remove the reserved-memory DTS node I don't get a reserved area in Linux,
> > don't quite understand how PRAM is supposed to work?
> 
> The first likely problem is that CONFIG_PRAM stuff isn't often used
> these days so might be glitchy / buggy, as you've found here.  Next, I
> bet that area in arch_lmb_reserve() is about ATAGS/related and should be
> guarded with CONFIG_SUPPORT_PASSING_ATAGS.
> 

The  arch_lmb_reserve() comment reads(lots of archs has similar code):
	/*
	 * Booting a (Linux) kernel image
	 *
	 * Allocate space for command line and board info - the
	 * address should be as high as possible within the reach of
	 * the kernel (see CONFIG_SYS_BOOTMAPSZ settings), but in unused
	 * memory, which means far enough below the current stack
	 * pointer.

You still think this cmdline/board info is just for the old ATAGS ?
I have an older boot and it des not have CONFIG_SUPPORT_PASSING_ATAGS but
CMDLINE_TAG etc. is here though.

 Jocke

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

* Re: PRAM and reserved memory for Linux
  2022-07-13 16:13   ` Joakim Tjernlund
@ 2022-07-13 18:12     ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2022-07-13 18:12 UTC (permalink / raw)
  To: Joakim Tjernlund; +Cc: u-boot

[-- Attachment #1: Type: text/plain, Size: 1767 bytes --]

On Wed, Jul 13, 2022 at 04:13:27PM +0000, Joakim Tjernlund wrote:
> On Wed, 2022-07-13 at 10:21 -0400, Tom Rini wrote:
> > On Wed, Jul 13, 2022 at 10:08:38AM +0000, Joakim Tjernlund wrote:
> > 
> > > I added CONFIG_PRAM 4 and a reserved-memory DTS node for the same space but
> > > now u-boot complains when booting:
> > >   ERROR: reserving fdt memory region failed (addr=703ff000 size=1000)
> > > The error is caused by arch_lmb_reserve() in arm which seem
> > > to reserve command line and board info ? 
> > > 
> > > If I remove the reserved-memory DTS node I don't get a reserved area in Linux,
> > > don't quite understand how PRAM is supposed to work?
> > 
> > The first likely problem is that CONFIG_PRAM stuff isn't often used
> > these days so might be glitchy / buggy, as you've found here.  Next, I
> > bet that area in arch_lmb_reserve() is about ATAGS/related and should be
> > guarded with CONFIG_SUPPORT_PASSING_ATAGS.
> > 
> 
> The  arch_lmb_reserve() comment reads(lots of archs has similar code):
> 	/*
> 	 * Booting a (Linux) kernel image
> 	 *
> 	 * Allocate space for command line and board info - the
> 	 * address should be as high as possible within the reach of
> 	 * the kernel (see CONFIG_SYS_BOOTMAPSZ settings), but in unused
> 	 * memory, which means far enough below the current stack
> 	 * pointer.
> 
> You still think this cmdline/board info is just for the old ATAGS ?
> I have an older boot and it des not have CONFIG_SUPPORT_PASSING_ATAGS but
> CMDLINE_TAG etc. is here though.

Yes it is, and SUPPORT_PASSING_ATAGS is somewhat new in that I added it
when converting CMDLINE_TAG, etc, to Kconfig and making it be easier to
say "this platform is new enough to never ever need this".

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

end of thread, other threads:[~2022-07-13 18:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-13 10:08 PRAM and reserved memory for Linux Joakim Tjernlund
2022-07-13 14:21 ` Tom Rini
2022-07-13 16:13   ` Joakim Tjernlund
2022-07-13 18:12     ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).