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
Unknown Object (File)
Mon, Feb 16, 12:59 PM
Unknown Object (File)
Mon, Feb 16, 11:25 AM
Unknown Object (File)
Mon, Feb 16, 8:59 AM
Unknown Object (File)
Mon, Feb 16, 3:00 AM
Unknown Object (File)
Sat, Feb 14, 5:58 PM
Unknown Object (File)
Sat, Feb 14, 7:08 AM
Unknown Object (File)
Sat, Feb 14, 6:55 AM
Unknown Object (File)
Sat, Feb 14, 6:55 AM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 70338
Build 67221: arc lint + arc unit

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.