HomeFreeBSD

D23057: [PowerPC] Fix offset calculations in bridge mode

Description

D23057: [PowerPC] Fix offset calculations in bridge mode

In rS354701, I replaced text relocations with offsets from &generictrap.

Unfortunately, the magic variable I was using doesn't actually mean the
address of &generictrap, in bridge mode it actually means &generictrap64.

So, for bridge mode to work, it is necessary to differentiate between
"where do we need to branch to to handle a trap" and "where is &generictrap
for purposes of doing relative math".

Introduce a new TRAP_ENTRY and use it instead of TRAP_GENTRAP for doing
actual calls to the generic trap handler.

Reported by: Mark Millard <marklmi@yahoo.com>
Reviewed by: jhibbits
Sponsored by: Tag1 Consulting, Inc.
Differential Revision: https://reviews.freebsd.org/D23057

Description of fields to fill in above: 76 columns --|
PR: If and which Problem Report is related.
Submitted by: If someone else sent in the change.
Reported by: If someone else reported the issue.
Reviewed by: If someone else reviewed your modification.
Approved by: If you needed approval for this commit.
Obtained from: If the change is from a third party.
MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email.
MFH: Ports tree branch name. Request approval for merge.
Relnotes: Set to 'yes' for mention in release notes.
Security: Vulnerability reference (one per line) or description.
Sponsored by: If the change was sponsored by an organization (each collaborator).
Differential Revision: https://reviews.freebsd.org/D### (*full* phabric URL needed).
Empty fields above will be automatically removed.

M sys/powerpc/aim/aim_machdep.c
M sys/powerpc/aim/trap_subr32.S
M sys/powerpc/aim/trap_subr64.S
M sys/powerpc/include/trap.h

Details