Page MenuHomeFreeBSD

arm64: add inline functions for FEAT_WFxT instructions
ClosedPublic

Authored by harry.moulton_arm.com on Tue, Jan 21, 3:21 PM.

Details

Summary

This adds inline functions for WFET/WFIT instructions introduced with
ARMv8.7 FEAT_WFxT. These instructions allow for regular WFE/WFI
instructions to be bound by a timeout. Once the value of CNTVCT_EL0
reaches, or exceeds, that of the timeout value, the WFE/WFI state will
be exited and the PE will continue.

These instructions are implemented as inline functions, with a write to
the corresponding system register acting as an alias for the two
instructions. Writing to these registers is only valid on ARMv8.7 and
above, therefore the use of these functions must be guarded by a feature
check.

Sponsored By: Arm Ltd
Signed-off-by: Harry Moulton <harry.moulton@arm.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/arm64/include/cpufunc.h
169

Do you need the cast here? val is already a uint64_t

Cast to uint64_t not needed, removed.

This revision is now accepted and ready to land.Tue, Jan 21, 5:41 PM