HomeFreeBSD

Add support for building Book-E kernels with clang/lld.

Description

Add support for building Book-E kernels with clang/lld.

This involved several changes:

  • Since lld does not like text relocations, replace SMP boot page text relocs

in booke/locore.S with position-independent math, and track the virtual base
in the SMP boot page header.

  • As some SPRs are interpreted differently on clang due to the way it handles

platform-specific SPRs, switch m*dear and m*esr mnemonics out for regular
m*spr. Add both forms of SPR_DEAR to spr.h so the correct encoding is selected.

  • Change some hardcoded 32 bit things in the boot page to be pointer-sized, and

fix alignment.

  • Fix 64-bit build of booke/pmap.c when enabling pmap debugging.

Additionally, I took the opportunity to document how the SMP boot page works.

Approved by: jhibbits (mentor)
Differential Revision: https://reviews.freebsd.org/D21999

Details

Provenance
bdragonAuthored on
Differential Revision
D21999: [PowerPC] Book-E clang support
Parents
rS354265: r354253 did miss the fact that libzpool is built as fake kernel
Branches
Unknown
Tags
Unknown