[PATCH V2 5/6] powerpc/44x: boot wrapper: allow kernel to load into non-zero address

Dave Kleikamp shaggy at linux.vnet.ibm.com
Sat Feb 5 01:44:34 EST 2011


On Fri, 2011-02-04 at 09:07 -0500, Josh Boyer wrote:
> On Tue, Feb 01, 2011 at 12:48:45PM -0600, Dave Kleikamp wrote:
> >+static ibm4xx_memstart;
> >+
> > static void iss_4xx_fixups(void)
> > {
> >-	ibm4xx_sdram_fixup_memsize();
> >+	void *memory;
> >+	u32 reg[3];
> >+
> >+	memory = finddevice("/memory");
> >+	if (!memory)
> >+		fatal("Can't find memory node\n");
> >+	getprop(memory, "reg", reg, sizeof(reg));
> >+	if (reg[1] || reg[2])
> 
> Wouldn't this test allow for a faulty device tree that specified a 0
> size (0x0 in reg[2])?  Maybe just check reg[2] for non-zero instead?

That make sense.

> 
> josh

-- 
Dave Kleikamp
IBM Linux Technology Center



More information about the Linuxppc-dev mailing list