Page MenuHomeFreeBSD

arm64: Add a new CPU feature framework
Needs ReviewPublic

Authored by andrew on Wed, Nov 27, 6:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 11, 8:37 AM
Unknown Object (File)
Wed, Dec 4, 8:44 AM
Unknown Object (File)
Sat, Nov 30, 2:36 PM
Unknown Object (File)
Thu, Nov 28, 5:03 AM
Unknown Object (File)
Thu, Nov 28, 5:00 AM
Unknown Object (File)
Thu, Nov 28, 4:37 AM
Subscribers

Details

Reviewers
manu
Group Reviewers
ARM
Summary

This will be used to enable features that are discoverable on boot. It
has support to check if a feature needs to be enabled, and if there is
any errata associated with the feature that mean it shouldn't be
enabled. It can also be used to enable errata workarounds that aren't
associated with a specific feature, e.g. where we need to trap access
to a register in userspace to emulate it.

As some features need to be enabled early, while others can wait there
are two options for when to enable a feature:

  • CPU_FEAT_EARLY_BOOT: The feature will be enabled early in the boot. On the boot CPU this is in initarm, while on secondary CPUs this is before signalling the CPU has started.
  • CPU_FEAT_AFTER_DEV: The feature will be enabled after devices have attached but before interrupts are enabled.

There are also two scopes for where to enable the feature:

  • CPU_FEAT_PER_CPU: The feature will be checked and enabled on all CPU cores.
  • CPU_FEAT_SYSTEM: The feature will only be checked and enabled on a single core.

It is expected the former will be used for most features, while the
latter is for features that set a global variable to be checked.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 61113
Build 57997: arc lint + arc unit