Module user_context

Module user_context 

Source
Expand description

Runtime gating for user-mode FPU / Vector context handling.

This module complements Cargo feature gates (user-fpu, user-vector) with a DTB(FDT)-driven runtime switch. When the relevant Cargo feature is enabled, the kernel will decide at boot whether user-mode access should actually be allowed based on information found in the device tree.

ยงDTB overrides

If present under /chosen, the following properties override auto-detection:

  • scarlet,user-fpu (boolean or u32/u64)
  • scarlet,user-vector (boolean or u32/u64)

When absent, the kernel attempts architecture-specific detection when available (currently implemented for RISC-V via riscv,isa).

Constantsยง

FLAG_USER_FPU ๐Ÿ”’
FLAG_USER_VECTOR ๐Ÿ”’

Staticsยง

FLAGS ๐Ÿ”’
INITIALIZED ๐Ÿ”’

Functionsยง

arch_defaults_from_fdt ๐Ÿ”’
bytes_to_cstr ๐Ÿ”’
init_from_fdt
Initialize runtime user-context switches from the current DTB (FDT).
read_boolish_property ๐Ÿ”’
riscv_extensions_from_fdt ๐Ÿ”’
riscv_extensions_from_isa_extensions ๐Ÿ”’
riscv_extensions_from_isa_string ๐Ÿ”’
riscv_isa_suffix_has_vector_tokens ๐Ÿ”’
riscv_token_is_fpu ๐Ÿ”’
riscv_token_is_vector ๐Ÿ”’
user_fpu_enabled
Returns whether user-mode FPU context handling is enabled (feature + DTB).
user_vector_enabled
Returns whether user-mode Vector context handling is enabled (feature + DTB).