## Summary

Get supported hardware capabilities.

## Declaration

    #include <zircon/syscalls.h>

    zx_status_t zx_system_get_features(uint32_t kind, uint32_t* features);

## Description

`zx_system_get_features()` populates *features* with a bit mask of
hardware-specific features. *kind* indicates the specific type of features
to retrieve, e.g. `ZX_FEATURE_KIND_CPU`. The supported kinds and the meaning
of individual feature bits is hardware-dependent. `ZX_FEATURE_KIND_VM` is not
hardware-dependent and returns a bitset currently the only meaningful bit
is `ZX_VM_FEATURE_CAN_MAP_XOM` which is 1 if the system can map pages with
execute only permission.

`ZX_FEATURE_KIND_CPU_SVE` reports the arm64 SVE subfeatures
(`ZX_ARM64_FEATURE_ISA_SVE2`, `ZX_ARM64_FEATURE_ISA_SVEBF16`, ...) that are
supported by every CPU in the system. Its bits are only set when
`ZX_FEATURE_KIND_CPU` reports `ZX_ARM64_FEATURE_ISA_SVE`; on other
architectures, or when SVE is not supported, it returns `ZX_OK` with no
bits set.

## Rights

TODO(https://fxbug.dev/42107318)

## Return value

`zx_system_get_features()` returns `ZX_OK` on success.

## Errors

`ZX_ERR_NOT_SUPPORTED` The requested feature kind is not available on this
platform.

## Notes

Refer to [Install Fuchsia on a device](https://fuchsia.dev/docs/development/hardware/README)
for supported processor architectures.

Refer to [zircon/features.h](https://fuchsia.dev/zircon/system/public/zircon/features.h) for kinds
of features and individual feature bits.

## See also

- [`zx_system_get_num_cpus()`](https://fuchsia.dev/reference/syscalls/system_get_num_cpus)
- [`zx_system_get_physmem()`](https://fuchsia.dev/reference/syscalls/system_get_physmem)