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