Page MenuHomeFreeBSD

arm64: Enable MOPS usage in the kernel
ClosedPublic

Authored by sarah.walker2_arm.com on Thu, Jan 29, 3:47 PM.
Tags
None
Referenced Files
F144936240: D54943.id170733.diff
Sat, Feb 14, 7:08 AM
F144935196: D54943.id170733.diff
Sat, Feb 14, 6:55 AM
F144935193: D54943.id170733.diff
Sat, Feb 14, 6:55 AM
F144909946: D54943.id170699.diff
Sat, Feb 14, 12:39 AM
Unknown Object (File)
Thu, Feb 12, 4:38 AM
Unknown Object (File)
Tue, Feb 10, 8:43 PM
Unknown Object (File)
Tue, Feb 10, 8:43 PM
Unknown Object (File)
Thu, Feb 5, 6:10 PM
Subscribers

Details

Summary

Enable the use of MOPS implementations of memset, memcpy and memmove within
the kernel.

Sponsored by: Arm Ltd

Diff Detail

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

Event Timeline

Do we need to handle EXCP_MOE in the kernel?

Can you split out enabling MOPS & using it into separate changes? There is a risk one of the mem*_early changes is missing & it would be easier to revert a change to add them rather than everything that depends on MOPS.

Can you split out enabling MOPS & using it into separate changes? There is a risk one of the mem*_early changes is missing & it would be easier to revert a change to add them rather than everything that depends on MOPS.

mem* changes now in https://reviews.freebsd.org/D55051

It looks like there is a race between identify_cpu_sysinit setting mops_supported and late_ifunc_resolve that calls the ifunc resolvers that may use it. They are both run at SI_SUB_CONFIGURE, SI_ORDER_ANY so could be run in either order.

The easiest option might be to move the former to SI_ORDER_ANY - 1.

D55103 moves it earlier, along with other cleanups.

Do we need mops_supported? It looks like we could check elf_hwcap2 in the resolver functions.

We could also use get_kernel_reg to get the sanitised register, however it's probably safest to only do so after all CPUs have started as there may be a case where not all CPUs support MOPS, or have errata that means we can't use it.

This revision is now accepted and ready to land.Mon, Feb 9, 5:27 PM
This revision was automatically updated to reflect the committed changes.