Thanks Nathan! I'm still getting used to NuttX Kernel Mode and RISC-V
Machine / Supervisor Modes, so I thought I might stick with QEMU Kernel
Mode and make it work on Star64.

But you're right, when I'm more familiar with Star64, I ought to explore
more of CONFIG_ARCH_USE_S_MODE and RISC-V Machine Mode :-)

Lup

On Wed, Jul 19, 2023 at 10:25 AM Nathan Hartman <hartman.nat...@gmail.com>
wrote:

> On Tue, Jul 18, 2023 at 7:33 PM Lee, Lup Yuen <lu...@appkaki.com> wrote:
>
> > We’re in the super-early stage of porting NuttX to the Pine64 Star64
> 64-bit
> > RISC-V SBC. (Based on StarFive JH7110 SoC)
> >
> > In this article we’ll talk about the interesting things that we learnt
> > about RISC-V and Star64 JH7110…
> >
> > (1) What are RISC-V Privilege Levels
> >      (And why they make NuttX a little more complicated)
> >
> > (2) What is NuttX Kernel Mode
> >      (And how it differs from Flat Mode)
> >
> > (3) All about JH7110’s UART Registers
> >      (And how they are different from other 16550 UARTs)
> >
> > (4) Why (naively) porting NuttX from QEMU to Star64 might become really
> > challenging!
> >      (Thankfully we have the LiteX Arty-A7 and PolarFire Icicle ports)
> >
> > https://lupyuen.codeberg.page/articles/privilege.html
> >
> > Lup
> >
>
> Beautiful article!
>
> Question: In section 6, "NuttX flat mode becomes kernel mode," isn't it
> possible to set CONFIG_ARCH_USE_S_MODE for the FLAT build as well? Since
> the board's built-in firmware switches from Machine Mode to Supervisor Mode
> before calling U-Boot -> NuttX, I think that all configurations running on
> this board should select CONFIG_ARCH_USE_S_MODE by default. This can be set
> in Kconfig by default whenever this board is selected, so there is no need
> to remember and add it in multiple places/configs; however if someone
> figures out an alternative firmware that lets us boot NuttX on this board
> in Machine Mode, it will be easy to override. Just a thought...
>
> Thanks for a great article as always!
>
> Cheers,
> Nathan
>

Reply via email to