HomeFreeBSD

[PowerPC] kernel ifunc support for powerpc*, fix ppc64 relocation oddities.

Description

[PowerPC] kernel ifunc support for powerpc*, fix ppc64 relocation oddities.

This is a general cleanup of the relocatable kernel support on powerpc,
needed to enable kernel ifuncs.

  • Fix some relocatable issues in the kernel linker, and change to using a RELOCATABLE_KERNEL #define instead of #ifdef powerpc for parts that other platforms can use in the future if they wish to have ET_DYN kernels.
  • Get rid of the DB_STOFFS hack now that the kernel is relocated to the DMAP properly across the board on powerpc64.
  • Add powerpc64 and powerpc32 ifunc functionality.
  • Allow AIM64 virtual mode OF kernels to run from the DMAP like other AIM64 by implementing a virtual mode restart. This fixes the runtime address on PowerMac G5.
  • Fix symbol relocation problems on post-relocation kernels by relocating the symbol table.
  • Add an undocumented method for supplying kernel symbols on powernv and other powerpc machines using linux-style kernel/initrd loading -- If you pass the kernel in as the initrd as well, the copy resident in initrd will be used as a source for symbols when initializing the debugger. This method is subject to removal once we have a better way of doing this.

Approved by: jhibbits
Relnotes: yes
Sponsored by: Tag1 Consulting, Inc.
Differential Revision: https://reviews.freebsd.org/D23156

Details

Provenance
bdragonAuthored on
Differential Revision
D23156: [PowerPC] IFUNC kernel support, fix relocatable kernel oddities for ppc64
Parents
rS360793: MFC 356481:
Branches
Unknown
Tags
Unknown