Expand description
Simple RISC-V SBI runtime primitives.
Structs§
- Base
- RISC-V SBI Base extension.
- Cold
Reboot - Cold reboot as a reset type.
- Console
- Debug Console extension.
- Cppc
- SBI CPPC extension.
- Extension
Info - Information about an SBI extension.
- Fence
- Remote Fence extension.
- Hart
Mask - 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.
- Shared
Ptr - Shared memory physical address raw pointer with type annotation.
- Shutdown
- Shutdown as a reset type.
- Sta
- Steal-time Accounting extension.
- Suspend
- System Suspend extension.
- Suspend
ToRam - Suspend to RAM as sleep type.
- System
Failure - System failure as a reset reason.
- Timer
- Timer programmer extension.
- Version
- SBI specification version.
- Warm
Reboot - Warm reboot as a reset type.
Traits§
- Config
Flags - Flags to configure performance counter.
- Extension
- An SBI extension.
- Reset
Reason - A valid reason for system reset.
- Reset
Type - A valid type for system reset.
- Sleep
Type - A valid sleep type for system suspend.
- Start
Flags - Flags to start performance counter.
- Stop
Flags - Flags to stop performance counter.
- Suspend
Type - 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
andreset_reason
. - system_
suspend - Suspend the system based on provided
sleep_type
.