Thread (1 message) 1 message, 1 author, 2011-09-21

RE: Passing an initrd to a Linux kernel with Device Tree

From: Nicolas Pitre <hidden>
Date: 2011-09-21 14:25:13

On Wed, 21 Sep 2011, Dave P Martin wrote:
quoted
-----Original Message-----
From:
devicetree-discuss-bounces+dave.martin=arm.com-uLR06cmDAlY8sQ00jmICUQ@public.gmane.org
g [mailto:devicetree-discuss-> bounces+dave.martin=arm.com-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org] On Behalf Of
quoted
Grant Likely
Sent: 20 September 2011 21:11
To: Olivier Martin
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: Passing an initrd to a Linux kernel with Device Tree

On Tue, Sep 20, 2011 at 06:46:22PM +0100, Olivier Martin wrote:
quoted
Hello,

I tried recently to add support in UEFI to pass an initrd
with FDT to
quoted
a Linux kernel. I have searched the Internet but I did not find any
information to do that.

FYI, this is the way it is done in ATAG:
typedef struct {
  UINT32  start;
  UINT32  size;
} LINUX_ATAG_INITRD2;

The boot loader loads the initrd in system memory and passes the
memory region information through ATAG.


Sorry, if it is the wrong mailing-list. In this case, can someone
point me on the right forum for any Linux FDT oriented questions.
Hmmm, it may not be documented (the binding was implemented a
long time ago before we got strict about documenting
bindings).  The magic is two properties in the /chosen node;
"linux,initrd-start" and "linux,initrd-end".  Each contains
the physical start and end addresses of the initrd.
What does "end address" mean here?

It could be read as meaning either:

a) address of the the final byte of the image
b) address of the first byte following the image (0 if the image ends at 4G)
Looking at the code (remember this is always the ultimate 
documentation), end_address = start_address + size.  So (b) would be the 
right answer.

Obviously, it is adviseable not to locate your ramdisk so close to the 
end of memory so that its end precisely matches the end of the address 
space, and that is if your RAM is located at the top too.


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help