Files
xen/docs/misc/riscv/booting.txt
T
Oleksii Kurochko 1e6cd4155d xen/riscv: introduce extension support check by compiler
Currently, RISC-V requires two extensions: _zbb and _zihintpause.

This patch introduces a compiler check to check if these extensions
are supported.
Additionally, it introduces the riscv/booting.txt file, which contains
information about the extensions that should be supported by the platform.

In the future, a feature will be introduced to check whether an extension
is supported at runtime.
However, this feature requires functionality for parsing device tree
source (DTS), which is not yet available.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2024-04-04 12:00:17 +02:00

17 lines
644 B
Plaintext

System requirements
===================
The following extensions are expected to be supported by a system on which
Xen is run:
- Zbb:
RISC-V doesn't have a CLZ instruction in the base ISA.
As a consequence, __builtin_ffs() emits a library call to ffs() on GCC,
or a de Bruijn sequence on Clang.
Zbb extension adds a CLZ instruction, after which __builtin_ffs() emits
a very simple sequence.
The similar issue occurs with other __builtin_<bitop>, so it is needed to
provide a generic version of bitops in RISC-V bitops.h
- Zihintpause:
On a system that doesn't have this extension, cpu_relax() should be
implemented properly.