[PATCH 01/11] [POWERPC] bootwrapper: Allow specifying of image physical offset

Kumar Gala galak at kernel.crashing.org
Thu Apr 3 00:14:26 EST 2008


On Apr 1, 2008, at 7:58 PM, Paul Mackerras wrote:
> Kumar Gala writes:
>
>> Hmm, need to think about that.  But my initial reaction is two fold.
>> One I don't think this information would be around and two don't we
>> already have this problem with a kdump kernel?
>
> I'm just concerned that we have two things that have to match up - the
> compiled-in physical address that the kernel assumes it is running at,
> and the physical address where it is actually loaded.  While those two
> things were both always 0 for embedded processors, there wasn't a
> problem, but now we can have a situation where a kernel binary has to
> be loaded at some nonzero address to work correctly, but there is no
> way to work out what that address is for an existing vmlinux binary.
> Or have I missed something?

Nope, that sums up the situation pretty well.

> For a kdump kernel, at least for 64-bit, the physical address has to
> be 32MB.  There is no other choice, so there is no possibility of
> confusion.

But how do you know a vmlinux image is for kdump or not?

> For 85xx, would it be possible to have the kernel figure out what
> physical address it has been loaded at, and use that as the base
> address, rather than having the base address set at compile time?

Yes, that is what CONFIG_RELOCATABLE is all about.

> That would solve my objection since it would mean that there would no
> longer be two things that had to be kept in sync.  You could pass any
> value to wrapper/mkimage (subject to constraints such as it has to be
> a multiple of 256M) and it would work.  That value could even come
> from a config option in the case where wrapper is invoked as part of
> the kernel build, but that config option shouldn't affect anything at
> all in the vmlinux.

Ok, but I still think the issues exists when we config PHYSICAL_START  
to non-zero and CONFIG_RELOCATABLE=n.  Ideally we get set the phys  
address the PHDR, but I'm not sure how to get the linker to do that.

- k




More information about the Linuxppc-dev mailing list