]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Sync RPA note in zImage with kernel's RPA note
authorPaul Mackerras <paulus@samba.org>
Wed, 8 Oct 2008 14:03:29 +0000 (14:03 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 10 Oct 2008 04:55:19 +0000 (15:55 +1100)
commit19064a0e3ec1460edaaae078f9676ddba8225b95
tree180192f6f8d2b97c332d970fc07278010287f3f5
parenta87e7ef23da5a8f0974b14e77d045dfc48fd5d8d
powerpc: Sync RPA note in zImage with kernel's RPA note

Commit a1b430f4cc294ed0cecb87ffa0d41885f3b5cce9 ("powerpc: Change the
default link address for pSeries zImage kernels") changed the
real-base value in the CHRP note added by the addnote program from
12MB to 32MB to give more space for Open Firmware to load the zImage.
(The real-base value says where we want OF to position itself in
memory.)  However, this change was ineffective on most pSeries
machines, because the RPA note added by addnote has the "ignore me"
flag set to 1.  This was intended to tell OF to ignore just the RPA
note, but has the side effect of also making OF ignore the CHRP note
(at least on most pSeries machines).

To solve this we have to set the "ignore me" flag to 0 in the RPA
note.  (We can't just omit the RPA note because that is equivalent to
having an RPA note with default values, and the default values are not
what we want.)  However, then we have to make sure the values in the
zImage's RPA note match up with the values that the kernel supplies
later in prom_init.c with either the ibm,client-architecture-support
call or the process-elf-header call in prom_send_capabilities().

So this sets the "ignore me" flag in the RPA note in addnote to 0, and
adjusts the RPA note values in addnote.c and in prom_init.c to be
consistent with each other and with the values in ibm_architecture_vec.

However, since the wrapper is independent of the kernel, this doesn't
ensure that the notes will stay consistent.  To ensure that, this adds
code to addnote.c so that it can extract the kernel's RPA note from
the kernel binary and put that in the zImage.  To that end, we put the
kernel's fake ELF header (which contains the kernel's RPA note) into
its own section, and arrange for wrapper to pull out that section with
objcopy and pass it to addnote, which then extracts the RPA note from
it and transfers it to the zImage.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/boot/addnote.c
arch/powerpc/boot/wrapper
arch/powerpc/kernel/prom_init.c
arch/powerpc/kernel/vmlinux.lds.S