HomeFreeBSD

powerpc64: enforce natural alignment in bcopy

Description

powerpc64: enforce natural alignment in bcopy

POWER architecture CPUs (Book-S) require natural alignment for
cache-inhibited storage accesses. Since we can't know the caching model
for a page ahead of time, always enforce natural alignment in bcopy.
This fixes a SIGBUS when calling the function with misaligned pointers
on POWER7.

Submitted by: Bruno Larsen <bruno.larsen@eldorado.org.br>
Reviewed by: luporl, bdragon (IRC)
MFC after: 1 week
Sponsored by: Eldorado Research Institute (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D28776

(cherry picked from commit 2f561284033c0f53d0911baf9056078e6026a278)

Details

Provenance
luporlAuthored on Mar 25 2021, 2:54 PM
Reviewer
luporl
Differential Revision
D28776: powerpc/powerpc64: Enforce natural alignment in bcopy
Parents
rGe21b6ce854f2: [PowerPC64] Port optimized strcpy to PPC64LE
Branches
Unknown
Tags
Unknown