| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
This commit adds support for `riscv_hwprobe` on the Linux kernel 6.15.
It adds feature detection of 8 extensions (4 of them are new in this).
Existing RISC-V Extensions:
1. "Zicntr"
2. "Zihpm"
3. "Zalrsc"
4. "Zaamo"
New RISC-V Extensions:
5. "Zicbom"
6. "Zfbfmin"
7. "Zvfbfmin"
8. "Zvfbfwma"
|
|
|
|
|
|
|
|
|
|
Until in-kernel feature detection is implemented, runtime detection of
privileged extensions is temporally removed along with features themselves
since none of such privileged features are stable.
Co-Authored-By: Taiki Endo <te316e89@gmail.com>
Co-Authored-By: Amanieu d'Antras <amanieu@gmail.com>
|
|
This commit implements `riscv_hwprobe`-based feature detection as available
on newer versions of the Linux kernel. It also queries whether the vector
extensions are enabled using `prctl` but this is not supported on QEMU's
userland emulator (as of version 9.2.3) and use the auxiliary vector
as a fallback.
Currently, all extensions discoverable from the Linux kernel version 6.14
and related extension groups (except "Supm", which reports the existence of
`prctl`-based pointer masking control and too OS-dependent) are implemented.
Co-Authored-By: Taiki Endo <te316e89@gmail.com>
|
|
This is ported from Taiki Endo's branch and sorted by the `@FEATURE` order
as in `src/detect/arch/riscv.rs`.
Co-Authored-By: Taiki Endo <te316e89@gmail.com>
|
|
|
|
|
|
|
|
|
|
Add feature detection for aarch64 FEAT_PAuth_LR.
There is currently no Linux cpuinfo support so the OS-specific lines are
commented out.
|
|
LLVM 20 split out what used to be called b16b16 and correspond to aarch64
FEAT_SVE_B16B16 into sve-b16b16 and sme-b16b16.
Add sme-b16b16 as an explicit feature and update the detection accordingly.
|
|
|
|
Tested in the simulator and on the device I had lying around, a 1st
generation iPad Mini (which isn't Aarch64, but shows that the
`sysctlbyname` calls still work even there, even if they return false).
`sysctlbyname` _should_ be safe to use without causing rejections from
the app store, as its usage is documented in:
https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics
Also, the standard library will use these soon anyhow, so this shouldn't
affect the situation:
https://github.com/rust-lang/rust/pull/129019
|
|
Add detection for SME features supported by LLVM and the Linux Kernel.
Include commented-out hwcap fields for features supported by Linux but not by LLVM.
This commit adds feature detection for the following features:
- FEAT_SME
- FEAT_SME_F16F16
- FEAT_SME_F64F64
- FEAT_SME_F8F16
- FEAT_SME_F8F32
- FEAT_SME_FA64
- FEAT_SME_I16I64
- FEAT_SME_LUTv2
- FEAT_SME2
- FEAT_SME2p1
- FEAT_SSVE_FP8DOT2
- FEAT_SSVE_FP8DOT4
- FEAT_SSVE_FP8FMA
Linux features: https://github.com/torvalds/linux/blob/master/arch/arm64/include/uapi/asm/hwcap.h
LLVM features: llvm-project/llvm/lib/Target/AArch64/AArch64.td
|
|
Add detection for various aarch64 CPU features already supported by LLVM and Linux.
This commit adds feature detection for the following features:
- FEAT_CSSC
- FEAT_ECV
- FEAT_FAMINMAX
- FEAT_FLAGM2
- FEAT_FP8
- FEAT_FP8DOT2
- FEAT_FP8DOT4
- FEAT_FP8FMA
- FEAT_HBC
- FEAT_LSE128
- FEAT_LUT
- FEAT_MOPS
- FEAT_LRCPC3
- FEAT_SVE_B16B16
- FEAT_SVE2p1
- FEAT_WFxT
It also adds feature detection for FEAT_FPMR. It is somewhat of a
special case because FPMR only exists as a feature in LLVM 18, it has
been removed from the LLVM upstream. On that account the intention is
for it to be detectable at runtime through stdarch but not have a
corresponding compile-time Rust target feature.
Linux features: https://github.com/torvalds/linux/blob/master/arch/arm64/include/uapi/asm/hwcap.h
LLVM features: llvm-project/llvm/lib/Target/AArch64/AArch64.td
|
|
|
|
Cannot do a `cupid` test because they don't support `amx`.
|
|
Cannot cross-verify with `cupid` because they do not have these features yet.
|
|
Expanded the cache size to 93 (we will need this in near future)
Fixed detection of VAES, GFNI and VPCLMULQDQ
Could not test with `cupid` because they do not support these yet
|
|
|
|
Signed-off-by: usamoi <usamoi@outlook.com>
|
|
|
|
More fallout from #1486
|
|
|
|
|
|
|
|
|
|
|
|
Note that the feature detection requires a recent Linux kernel (v6.2).
|
|
|
|
|
|
|
|
According to google/cpu_features, IsProcessorFeaturePresent(PF_ARM_VFP_32_REGISTERS_AVAILABLE)
returns whether fp is available.
https://github.com/google/cpu_features/blob/a6bf4f9031ec601f905660b8cef82d7478b33d64/src/impl_aarch64_windows.c#L112-L113
|
|
Except for the recently added `x86_deprecated` test,
`core_arch/tests/cpu-detection.rs` is a subset of
`std_detect/tests/cpu-detection.rs`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|