Crate sbi_rt

Source
Expand description

Simple RISC-V SBI runtime primitives.

Structs§

Base
RISC-V SBI Base extension.
ColdReboot
Cold reboot as a reset type.
Console
Debug Console extension.
Cppc
SBI CPPC extension.
ExtensionInfo
Information about an SBI extension.
Fence
Remote Fence extension.
HartMask
Hart mask structure in SBI function calls.
Hsm
Hart State Monitor extension.
Ipi
Inter-processor Interrupt extension.
Nacl
Nested Acceleration extension.
NoReason
No reason as a reset reason.
NonRetentive
Default non-retentive hart suspension.
Physical
Physical slice wrapper with type annotation.
Pmu
Performance Monitoring Unit extension.
Reset
System Reset extension.
Retentive
Default retentive hart suspension.
SbiRet
SBI functions return type.
SharedPtr
Shared memory physical address raw pointer with type annotation.
Shutdown
Shutdown as a reset type.
Sta
Steal-time Accounting extension.
Suspend
System Suspend extension.
SuspendToRam
Suspend to RAM as sleep type.
SystemFailure
System failure as a reset reason.
Timer
Timer programmer extension.
Version
SBI specification version.
WarmReboot
Warm reboot as a reset type.

Traits§

ConfigFlags
Flags to configure performance counter.
Extension
An SBI extension.
ResetReason
A valid reason for system reset.
ResetType
A valid type for system reset.
SleepType
A valid sleep type for system suspend.
StartFlags
Flags to start performance counter.
StopFlags
Flags to stop performance counter.
SuspendType
A valid suspend type for hart state monitor.

Functions§

console_read
Read bytes from the debug console into an output memory.
console_write
Write bytes to the debug console from input memory.
console_write_byte
Write a single byte to the debug console.
cppc_probe
Probe whether the CPPC register is implemented or not by the platform.
cppc_read
Read the CPPC register identified by given cppc_reg_id.
cppc_read_hi
Read the upper 32-bit value of the CPPC register identified by cppc_reg_id.
cppc_write
Write 64-bit value to the CPPC register identified by given cppc_reg_id.
get_marchid
Return value of marchid register in the current environment.
get_mimpid
Return value of mimpid register in the current environment.
get_mvendorid
Return the value of mvendorid register in the current environment.
get_sbi_impl_id
Return the current SBI implementation ID.
get_sbi_impl_version
Return the current SBI implementation version.
get_spec_version
Return the current SBI specification version.
hart_get_status
Get the current status (or HSM state id) of the given hart.
hart_start
Start executing the given hart at specified address in supervisor-mode.
hart_stop
Stop executing the calling hart in supervisor-mode.
hart_suspend
Put the calling hart into suspend or platform specific lower power states.
nacl_probe_feature
Probe a nested acceleration feature.
nacl_set_shmem
Set and enable the shared memory for nested acceleration on the calling hart.
nacl_sync_csr
Synchronize CSRs in the nested acceleration shared memory.
nacl_sync_hfence
Synchronize HFENCEs in the nested acceleration shared memory.
nacl_sync_sret
Synchronize CSRs and HFENCEs in the NACL shared memory and emulate the SRET instruction.
pmu_counter_config_matching
Find and configure a counter from a set of counters.
pmu_counter_fw_read
Provide the current value of a firmware counter.
pmu_counter_fw_read_hi
Provide the upper 32 bits from the value of a firmware counter.
pmu_counter_get_info
Get details about the specified counter.
pmu_counter_start
Start or enable a set of counters on the calling hart with the specified initial value.
pmu_counter_stop
Stop or disable a set of counters on the calling hart.
pmu_num_counters
Returns the number of counters, both hardware and firmware.
probe_extension
Probe information about one SBI extension from the current environment.
remote_fence_i
Execute FENCE.I instruction on remote harts.
remote_hfence_gvma
Execute HFENCE.GVMA instructions for all virtual machines on remote harts.
remote_hfence_gvma_vmid
Execute virtual machine id based HFENCE.GVMA instructions on remote harts.
remote_hfence_vvma
Execute HFENCE.VVMA for all address spaces in the current virtual machine on remote harts.
remote_hfence_vvma_asid
Execute address space based HFENCE.VVMA for current virtual machine on remote harts.
remote_sfence_vma
Execute SFENCE.VMA instructions for all address spaces on remote harts.
remote_sfence_vma_asid
Execute address-space-based SFENCE.VMA instructions on remote harts.
send_ipi
Send an inter-processor interrupt to all harts defined in hart mask.
set_timer
Programs the clock for the next event after an absolute time.
sta_set_shmem
Prepare shared memory for steal-time accounting feature.
system_reset
Reset the system based on provided reset_type and reset_reason.
system_suspend
Suspend the system based on provided sleep_type.