mirror of
https://github.com/lupyuen/nuttx-star64.git
synced 2025-01-12 20:58:32 +08:00
Clean up
This commit is contained in:
parent
8b5d53cb8b
commit
c604e15b98
1 changed files with 10 additions and 0 deletions
10
README.md
10
README.md
|
@ -1256,6 +1256,8 @@ NuttX runs at Supervisor Level, which [doesn't allow access to Machine-Level CSR
|
|||
|
||||
(The `m` in `mhartid` signifies that it's a Machine-Level Register)
|
||||
|
||||
![RISC-V Privilege Levels](https://lupyuen.github.io/images/nuttx2-privilege.jpg)
|
||||
|
||||
_What runs at Machine Level?_
|
||||
|
||||
[OpenSBI](https://www.thegoodpenguin.co.uk/blog/an-overview-of-opensbi/) (Supervisor Binary Interface) is the first thing that boots on Star64. It runs at Machine Level and starts the U-Boot Bootloader.
|
||||
|
@ -1268,6 +1270,14 @@ U-Boot Bootloader runs at Supervisor Level. And starts NuttX, also at Supervisor
|
|||
|
||||
So OpenSBI is the only thing that runs at Machine Level. And can access the Machine-Level Registers.
|
||||
|
||||
_QEMU doesn't have this problem?_
|
||||
|
||||
Because QEMU runs everything in (super-powerful) __Machine Mode__!
|
||||
|
||||
![NuttX QEMU runs in Machine Mode](https://lupyuen.github.io/images/nuttx2-privilege2.jpg)
|
||||
|
||||
NuttX needs to fetch the Hart ID with a different recipe...
|
||||
|
||||
# Downgrade NuttX to Supervisor Mode
|
||||
|
||||
_How to get the Hart ID from OpenSBI?_
|
||||
|
|
Loading…
Reference in a new issue