Closed plwalsh closed 2 years ago
This is for future use. Bare metal apps are only currently supporting m-mode. The roadmap has addition of s-mode support in the bare metal examples later this year.
Thanks, @mallynch. What exactly do "m-mode", "s-mode", and "u-mode" all mean? I'm a bit new to this type of work.
Hi @plwalsh , modes are a mechanism which facilitates separating software into privilege's levels, m-mode being the most privileged. Follow the following link for an introduction: https://www.five-embeddev.com/riscv-isa-manual/latest/priv-intro.html
Thanks for the link! I'll give it a read through for a better understanding.
The
src/application/inc/common.h
header file in every example contains an enum definition forCOMMAND_TYPE
. For example:https://github.com/polarfire-soc/polarfire-soc-bare-metal-examples/blob/acdddf3a903aa7e7b82961559965466760fa74fd/driver-examples/mss/mpfs-hal/mpfs-hal-simple-demo/src/application/inc/common.h#L21-L26
What is meant by "start hart in u mode or s mode"? And are there any examples of using these commands?