]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
riscv: make use of SBI legacy replacement extensions
authormhorne <mhorne@FreeBSD.org>
Mon, 26 Oct 2020 19:13:22 +0000 (19:13 +0000)
committermhorne <mhorne@FreeBSD.org>
Mon, 26 Oct 2020 19:13:22 +0000 (19:13 +0000)
commita395d120061d990a21852b3a144998a285e2b906
treecd9e8f448eceaa313f9f3a03c7512eb2b25cfff2
parentecf99ae8052405428f95066ce74ba1e15b689144
riscv: make use of SBI legacy replacement extensions

Version 0.2 of the SBI specification [1] marked the existing SBI
functions as "legacy" in order to move to a newer calling convention. It
also introduced a set of replacement extensions for some of the legacy
functionality. In particular, the TIME, IPI, and RFENCE extensions
implement and extend the semantics of their legacy counterparts, while
conforming to the newer version of the spec.

Update our SBI code to use the new replacement extensions when
available, and fall back to the legacy ones. These will eventually be
dropped, when support for version 0.2 is ubiquitous.

[1] https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc

Submitted by: Danjel Q. <danq1222@gmail.com>
Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D26953
sys/riscv/include/sbi.h
sys/riscv/riscv/sbi.c