From: Wolfgang Denk Date: Wed, 10 Sep 2008 11:03:59 +0200 Subject: [U-Boot] [PATCH][for 1.3.5] Fix handling of mem reserves for ramdisk In-Reply-To: <48C7830B.6010205@denx.de> References: <48C21BBE.3080601@denx.de> <6E892604-9B2A-4338-8DF7-C58688FC5A94@kernel.crashing.org> <20080908141050.B5D76248A5@gemini.denx.de> <5B2093C2-FD97-4F42-8055-04A958FF4DFF@kernel.crashing.org> <48C7830B.6010205@denx.de> Message-ID: <20080910090359.88222248B8@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Heiko Schocher, In message <48C7830B.6010205@denx.de> you wrote: > > [PATCH] powerpc: Fix bootm to boot up again with a Ramdisk Please omit this rom the commit message - it just duplicates the Subject line. Also, it's probably not "[for 1.3.5]" (which will never see the light of this virtuality) but "for 2008.10". > Patch > http://git.denx.de/?p=u-boot.git;a=commitdiff;h=2a1a2cb6e2b87ee550e6f27b647d23331dfd5e1b#patch3 > > didnt remove the dummy mem reservation in fdt_chosen, and > this stopped Linux from booting with a Ramdisk. This patch > fixes this, by deleting the useless dummy mem reservation. > > When booting with a Ramdisk, a fix offset FDT_RAMDISK_OVERHEAD > is now added to of_size, so we dont need anymore a dummy > mem reservation. ... > +/* adding a ramdisk needs 0x44 bytes in version 2008-10 */ 2008.10, not 2008-10. > --- a/lib_ppc/bootm.c > +++ b/lib_ppc/bootm.c > @@ -145,8 +145,9 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) > * if the user wants it (the logic is in the subroutines). > */ > if (of_size) { > - /* pass in dummy initrd info, we'll fix up later */ > - if (fdt_chosen(of_flat_tree, images->rd_start, images->rd_end, 0) < 0) { > + /* we dont have to pass anymore the dummy initrd info! > + we'll add this later, immediately with the right values. */ Incorrect multiline format. But the information is already included with the #define above and the commit message. I suggest to delete the comment completely. > @@ -169,6 +170,9 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) > goto error; > of_size = ret; > > + /* adding a ramdisk needs 0x44 bytes in version 2008-10 */ Ditto - I suggest to delete the redudant information. > + if ((of_flat_tree) && (initrd_start && initrd_end)) > + of_size += FDT_RAMDISK_OVERHEAD; > /* Create a new LMB reservation */ > lmb_reserve(lmb, (ulong)of_flat_tree, of_size); Except for this nitpicking: Acked-by: Wolfgang Denk Kumar, what do you think? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The use of anthropomorphic terminology when dealing with computing systems is a symptom of professional immaturity. -- Edsger Dijkstra