Author: afaerber Date: Thu Nov 25 22:56:23 2010 New Revision: 969 URL: http://tracker.coreboot.org/trac/openbios/changeset/969
Log: ppc: Set up TOC base for ppc64
r2 points to TOC base, __toc_start + 0x8000. This value is stored as part of the function descriptor.
Include some related ELF sections in the linker script.
Cc: Alexander Graf agraf@suse.de Cc: Segher Boessenkool segher@kernel.crashing.org Signed-off-by: Andreas Färber andreas.faerber@web.de
Modified: trunk/openbios-devel/arch/ppc/qemu/start.S trunk/openbios-devel/arch/ppc64/qemu/ldscript
Modified: trunk/openbios-devel/arch/ppc/qemu/start.S ============================================================================== --- trunk/openbios-devel/arch/ppc/qemu/start.S Thu Nov 25 22:53:25 2010 (r968) +++ trunk/openbios-devel/arch/ppc/qemu/start.S Thu Nov 25 22:56:23 2010 (r969) @@ -445,6 +445,13 @@
/* save memory size in stack */
+#ifdef __powerpc64__ + /* set up TOC pointer */ + + LOAD_REG_IMMEDIATE(r2, setup_mmu) + ld r2, 8(r2) +#endif + bl BRANCH_LABEL(setup_mmu) bl BRANCH_LABEL(entry) 1: nop
Modified: trunk/openbios-devel/arch/ppc64/qemu/ldscript ============================================================================== --- trunk/openbios-devel/arch/ppc64/qemu/ldscript Thu Nov 25 22:53:25 2010 (r968) +++ trunk/openbios-devel/arch/ppc64/qemu/ldscript Thu Nov 25 22:56:23 2010 (r969) @@ -41,8 +41,18 @@ _data = .; *(.data) *(.data.*) + *(.toc1) + *(.branch_lt) _edata = .; } + .opd : { + *(.opd) + } + .got : { + __toc_start = .; + *(.got) + *(.toc) + }
.bss ALIGN(4096): { _bss = .;