Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: Emulated in the Web Browser

2024-01-20 Thread Alan C. Assis
Really cool Lup! Kudos!!!

Actually booting NuttX from a floppy drive should be really nice too.

BR,

Alan

On Sat, Jan 20, 2024 at 8:43 PM Lee, Lup Yuen  wrote:

> In olden times we had Computer Games (plus Operating Systems) on 5.25-inch
> Floppy Disks. And we’d boot the Floppy Disks (clackety-clack) on Apple II
> Computers with 64 KB RAM.
>
> Today (40 years later) we boot microSD Cards (clickety-click) on Ox64 BL808
> RISC-V Single-Board Computers with 64 MB RAM.
>
> What if we could turn it into a Virtual Ox64 SBC that boots in our Web
> Browser? Exactly like an Emulated Apple II!
>
> In this article we…
> (1) Take NuttX precompiled for Ox64 (Without any modifications)
> (2) Boot it on the TinyEMU RISC-V Emulator
> (3) Create our own Emulator for Ox64 SBC (With minor tweaks to TinyEMU)
> (4) And run everything in our Web Browser (Thanks to WebAssembly)
>
> Here's the article: https://lupyuen.codeberg.page/articles/tinyemu2.html
>
> Lup
>


Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: Emulated in the Web Browser

2024-01-20 Thread Tomek CEDRO
On Sun, Jan 21, 2024 at 12:43 AM Lee, Lup Yuen wrote:
> In olden times we had Computer Games (plus Operating Systems) on 5.25-inch
> Floppy Disks. And we’d boot the Floppy Disks (clackety-clack) on Apple II
> Computers with 64 KB RAM.
>
> Today (40 years later) we boot microSD Cards (clickety-click) on Ox64 BL808
> RISC-V Single-Board Computers with 64 MB RAM.
>
> What if we could turn it into a Virtual Ox64 SBC that boots in our Web
> Browser? Exactly like an Emulated Apple II!
>
> In this article we…
> (1) Take NuttX precompiled for Ox64 (Without any modifications)
> (2) Boot it on the TinyEMU RISC-V Emulator
> (3) Create our own Emulator for Ox64 SBC (With minor tweaks to TinyEMU)
> (4) And run everything in our Web Browser (Thanks to WebAssembly)
>
> Here's the article: https://lupyuen.codeberg.page/articles/tinyemu2.html

8-BIT CROWD CHEERING WITH JOY! =)

--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info


[Article] NuttX on Ox64 BL808 RISC-V SBC: Emulated in the Web Browser

2024-01-20 Thread Lee, Lup Yuen
In olden times we had Computer Games (plus Operating Systems) on 5.25-inch
Floppy Disks. And we’d boot the Floppy Disks (clackety-clack) on Apple II
Computers with 64 KB RAM.

Today (40 years later) we boot microSD Cards (clickety-click) on Ox64 BL808
RISC-V Single-Board Computers with 64 MB RAM.

What if we could turn it into a Virtual Ox64 SBC that boots in our Web
Browser? Exactly like an Emulated Apple II!

In this article we…
(1) Take NuttX precompiled for Ox64 (Without any modifications)
(2) Boot it on the TinyEMU RISC-V Emulator
(3) Create our own Emulator for Ox64 SBC (With minor tweaks to TinyEMU)
(4) And run everything in our Web Browser (Thanks to WebAssembly)

Here's the article: https://lupyuen.codeberg.page/articles/tinyemu2.html

Lup


Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: Nim Programming Language

2024-01-01 Thread Alan C. Assis
Happy New Year NuttXers,

Really cool Lup! Kudos!!!

BR,

Alan

On Sun, Dec 31, 2023 at 9:22 PM Lee, Lup Yuen  wrote:

> Happy New Year! 2024 is here and we’re running NuttX on Single-Board
> Computers with plenty of RAM. Like Pine64 Ox64 BL808 SBC with 64 MB RAM!
>
> In this article, we create a Blinky LED app with a Python-like,
> Garbage-Collected Language that compiles to C: Nim Programming Language.
>
> Garbage-Collected Languages (like Nim) require a bit more RAM than
> Low-Level Languages (like C). Perfect for our roomy (and vroomy) SBC!
>
> (1) We test NuttX + Nim Blinky on QEMU Emulator for 64-bit RISC-V (minus
> the blinkenlight)
>
> (2) Then we run NuttX + Nim Blinky on the Ox64 BL808 RISC-V SBC (with a
> real LED)
>
> Check out the article here:
> https://lupyuen.codeberg.page/articles/nim.html
>
> Lup
>


Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: Nim Programming Language

2023-12-31 Thread MIGUEL ALEXANDRE WISINTAINER
Happy new year

Enviado do meu iPhone

> Em 31 de dez. de 2023, à(s) 21:39, Tomek CEDRO  escreveu:
> 
> HAPPY NEW YEAR FOLKS!! LET ALL OUR GOOD NUTTX DREAMS COME TRUE!! :-)
> 
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info


Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: Nim Programming Language

2023-12-31 Thread Tomek CEDRO
HAPPY NEW YEAR FOLKS!! LET ALL OUR GOOD NUTTX DREAMS COME TRUE!! :-)

--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info


[Article] NuttX on Ox64 BL808 RISC-V SBC: Nim Programming Language

2023-12-31 Thread Lee, Lup Yuen
Happy New Year! 2024 is here and we’re running NuttX on Single-Board
Computers with plenty of RAM. Like Pine64 Ox64 BL808 SBC with 64 MB RAM!

In this article, we create a Blinky LED app with a Python-like,
Garbage-Collected Language that compiles to C: Nim Programming Language.

Garbage-Collected Languages (like Nim) require a bit more RAM than
Low-Level Languages (like C). Perfect for our roomy (and vroomy) SBC!

(1) We test NuttX + Nim Blinky on QEMU Emulator for 64-bit RISC-V (minus
the blinkenlight)

(2) Then we run NuttX + Nim Blinky on the Ox64 BL808 RISC-V SBC (with a
real LED)

Check out the article here: https://lupyuen.codeberg.page/articles/nim.html

Lup


Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: Bare Metal Experiments

2023-12-17 Thread Lee, Lup Yuen
Thanks Greg, Wireless 802.15.4 on NuttX sounds very interesting!

It might run on Ox64 BL808, but the WiFi / BLE / Zigbee parts of BL808 SoC
are closed source. Hopefully Bouffalo Lab will reveal the wireless
internals someday.

Right now NuttX runs on the 64-bit Core (D0) of the BL808 SoC, and it isn't
connected to WiFi / BLE / Zigbee. In future we might port NuttX to the
32-bit Core (M0), so we can have the wireless features.

Here's a pic of the BL808 Cores:
https://lupyuen.github.io/images/ox64-cores.jpg

Lup

On Sun, Dec 17, 2023 at 7:59 AM Gregory Nutt  wrote:

> The Zigbee support is interesting.  NuttX does not have a Zigbee stack,
> but does have IEEE 802.15.4 which works with the same physical radio.
>
> The IEEE 802.15.4 logic is quite an accomplishment.  The original
> development was done by  Anthony Merlino and Sebasiten Lorquet.  I see
> that there have been many recent commits for Xiaomi folks too.
>
> When Anthony used the xbee which is a native Zigbee radio, he had to
> re-flash the part for use with IEEE 802.14.5
>
> I also ported/re-implemented 6LoWPAN for use with IEEE 802.14.5. That is
> a very powerful solution.
>
> I had intended to support 6LoWPAN with Bluetooth radios too, but never
> got around to it.
>
> On 12/16/2023 5:03 PM, Lee, Lup Yuen wrote:
> > Pine64 Ox64 BL808 (64-bit RISC-V SBC) is now supported in NuttX Mainline!
> > (Many thanks to my reviewers)
> >
> > Ox64 BL808 is an affordable $8 SBC with:
> > - 3 x RISC-V Cores (T-Head 64-bit / 32-bit)
> > - Networking: Ethernet, WiFi, Bluetooth LE, Zigbee
> > - Peripheral Interfaces: UART (Serial), I2C, SPI, USB, MIPI CSI
> > - Interrupt Controller: CLINT and PLIC
> > - Memory Management: Sv39 MMU
> > - OpenSBI Supervisor Binary Interface and U-Boot Bootloader
> > - Bootable microSD: Boot NuttX and Linux
> >
> > But there's a catch:
> > - Limited RAM (64 MB): It's not for gaming and servers
> > - Flash Memory is Empty: Needs a One-Time Flashing (via a USB Serial
> > Adapter)
> > - Barebones Form Factor: Fits on a Breadboard, Ethernet is optional
> >
> > In this article we walk through the steps to:
> > (1) Flash into Ox64 the U-Boot Bootloader and OpenSBI
> > (2) Boot Linux on a microSD Card
> > (3) Do the same to boot NuttX RTOS
> > (4) Run some Bare Metal Experiments inside the NuttX Kernel
> >
> > Check out the article here:
> >
> https://www.hackster.io/lupyuen/8-risc-v-sbc-on-a-real-time-operating-system-ox64-nuttx-474358
> >
> > Lup
> >
>


Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: Bare Metal Experiments

2023-12-16 Thread Gregory Nutt
The Zigbee support is interesting.  NuttX does not have a Zigbee stack, 
but does have IEEE 802.15.4 which works with the same physical radio.


The IEEE 802.15.4 logic is quite an accomplishment.  The original 
development was done by  Anthony Merlino and Sebasiten Lorquet.  I see 
that there have been many recent commits for Xiaomi folks too.


When Anthony used the xbee which is a native Zigbee radio, he had to 
re-flash the part for use with IEEE 802.14.5


I also ported/re-implemented 6LoWPAN for use with IEEE 802.14.5. That is 
a very powerful solution.


I had intended to support 6LoWPAN with Bluetooth radios too, but never 
got around to it.


On 12/16/2023 5:03 PM, Lee, Lup Yuen wrote:

Pine64 Ox64 BL808 (64-bit RISC-V SBC) is now supported in NuttX Mainline!
(Many thanks to my reviewers)

Ox64 BL808 is an affordable $8 SBC with:
- 3 x RISC-V Cores (T-Head 64-bit / 32-bit)
- Networking: Ethernet, WiFi, Bluetooth LE, Zigbee
- Peripheral Interfaces: UART (Serial), I2C, SPI, USB, MIPI CSI
- Interrupt Controller: CLINT and PLIC
- Memory Management: Sv39 MMU
- OpenSBI Supervisor Binary Interface and U-Boot Bootloader
- Bootable microSD: Boot NuttX and Linux

But there's a catch:
- Limited RAM (64 MB): It's not for gaming and servers
- Flash Memory is Empty: Needs a One-Time Flashing (via a USB Serial
Adapter)
- Barebones Form Factor: Fits on a Breadboard, Ethernet is optional

In this article we walk through the steps to:
(1) Flash into Ox64 the U-Boot Bootloader and OpenSBI
(2) Boot Linux on a microSD Card
(3) Do the same to boot NuttX RTOS
(4) Run some Bare Metal Experiments inside the NuttX Kernel

Check out the article here:
https://www.hackster.io/lupyuen/8-risc-v-sbc-on-a-real-time-operating-system-ox64-nuttx-474358

Lup



Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: Bare Metal Experiments

2023-12-16 Thread Tomek CEDRO
Congratulations Lup!! :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info


[Article] NuttX on Ox64 BL808 RISC-V SBC: Bare Metal Experiments

2023-12-16 Thread Lee, Lup Yuen
Pine64 Ox64 BL808 (64-bit RISC-V SBC) is now supported in NuttX Mainline!
(Many thanks to my reviewers)

Ox64 BL808 is an affordable $8 SBC with:
- 3 x RISC-V Cores (T-Head 64-bit / 32-bit)
- Networking: Ethernet, WiFi, Bluetooth LE, Zigbee
- Peripheral Interfaces: UART (Serial), I2C, SPI, USB, MIPI CSI
- Interrupt Controller: CLINT and PLIC
- Memory Management: Sv39 MMU
- OpenSBI Supervisor Binary Interface and U-Boot Bootloader
- Bootable microSD: Boot NuttX and Linux

But there's a catch:
- Limited RAM (64 MB): It's not for gaming and servers
- Flash Memory is Empty: Needs a One-Time Flashing (via a USB Serial
Adapter)
- Barebones Form Factor: Fits on a Breadboard, Ethernet is optional

In this article we walk through the steps to:
(1) Flash into Ox64 the U-Boot Bootloader and OpenSBI
(2) Boot Linux on a microSD Card
(3) Do the same to boot NuttX RTOS
(4) Run some Bare Metal Experiments inside the NuttX Kernel

Check out the article here:
https://www.hackster.io/lupyuen/8-risc-v-sbc-on-a-real-time-operating-system-ox64-nuttx-474358

Lup


Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: Fixed the UART Interruptand Platform-Level Interrupt Controller

2023-12-11 Thread Lee, Lup Yuen
Thanks yf! I believe T-Head C908 and other C9xx RISC-V Cores will need the
T-Head Errata for Strongly-Ordered Memory Type, according to this Linux
Patch:

https://patchwork.kernel.org/project/linux-riscv/patch/20210911092139.79607-3-guo...@kernel.org/#24450685

The post suggests that T-Head will switch to the new RISC-V Svpbmt
Extension for newer RISC-V Cores. But I don't believe Svpbmt is used by any
RISC-V Core yet.

Lup

On Mon, Dec 11, 2023 at 8:30 PM yfliu2008  wrote:

> Congratulations!
>
>
> Do you know if T-Head C908 needs the errata?
>
>
>
> Regards,
> yf
>
>
>
>
> Original
>
>
>
> From:"Lee, Lup Yuen"< lu...@appkaki.com ;
>
> Date:2023/12/10 7:11
>
> To:"dev"< dev@nuttx.apache.org ;
>
> Subject:[Article] NuttX on Ox64 BL808 RISC-V SBC: Fixed the UART
> Interruptand Platform-Level Interrupt Controller
>
>
> Last week we walked through the Serial Console for Pine64 Ox64 BL808 64-bit
> RISC-V Single-Board Computer. And we hit some illogical impossible problems
> on NuttX for Ox64:
>
> (1) Console Input is always empty. (Can’t enter any Console Commands)
> (2) Interrupt Claim is forever 0. (Ox64 won’t tell us which Interrupt was
> fired!)
> (3) Leaky Writes are mushing up adjacent Interrupt Registers. (Or maybe
> Leaky Reads?)
>
> Today we discover the One Single Culprit behind all this rowdy mischief:
> Weak Ordering in the MMU! (Memory Management Unit)
>
> Here’s how we solved the baffling mystery:
> https://lupyuen.codeberg.page/articles/plic3.html
>
> Lup


Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: Fixed the UART Interrupt and Platform-Level Interrupt Controller

2023-12-10 Thread Lee, Lup Yuen
Thanks Alan! Nope sorry I haven't tested on Sipeed M1s, I should get it
someday.

I'm preparing a PR that will extend the RISC-V MMU Flags from 32-bit to
64-bit, because:

(1) T-Head C906 (BL808) needs us to set Bits 59 to 63 in a Leaf Page Table
Entry to configure the Memory Type: Cacheable / Bufferable /
Strongly-Ordered

(2) Newer RISC-V Cores will use the Svpbmt Extension (Bits 61 to 62) to
configure the Memory Type (Cacheable / Strongly-Ordered)

More about Svpbmt:
https://github.com/riscv/riscv-isa-manual/blob/main/src/supervisor.adoc#svpbmt

Lup

On Sun, Dec 10, 2023 at 10:04 PM Alan C. Assis  wrote:

> Hi Lup,
>
> Nice to know you found the issue (and Linux errata for T-Head C906 helped),
> that BUG is really strange.
>
> Probably a similar issue could exist on MILK-V board too.
>
> Did you test NuttX on Sipeed M1s Dock AI + IoT BL808 RISC-V?
>
> Unfortunately Pine 0x64 doesn't ship to Brazil (probably many buyers let
> the boards return after getting notified of higher taxes from Brazilian
> Customs).
>
> Best Regards,
>
> Alan
>
> On Sat, Dec 9, 2023 at 8:11 PM Lee, Lup Yuen  wrote:
>
> > Last week we walked through the Serial Console for Pine64 Ox64 BL808
> 64-bit
> > RISC-V Single-Board Computer. And we hit some illogical impossible
> problems
> > on NuttX for Ox64:
> >
> > (1) Console Input is always empty. (Can’t enter any Console Commands)
> > (2) Interrupt Claim is forever 0. (Ox64 won’t tell us which Interrupt was
> > fired!)
> > (3) Leaky Writes are mushing up adjacent Interrupt Registers. (Or maybe
> > Leaky Reads?)
> >
> > Today we discover the One Single Culprit behind all this rowdy mischief:
> > Weak Ordering in the MMU! (Memory Management Unit)
> >
> > Here’s how we solved the baffling mystery:
> > https://lupyuen.codeberg.page/articles/plic3.html
> >
> > Lup
> >
>


Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: Fixed the UART Interrupt and Platform-Level Interrupt Controller

2023-12-10 Thread Alan C. Assis
Hi Lup,

Nice to know you found the issue (and Linux errata for T-Head C906 helped),
that BUG is really strange.

Probably a similar issue could exist on MILK-V board too.

Did you test NuttX on Sipeed M1s Dock AI + IoT BL808 RISC-V?

Unfortunately Pine 0x64 doesn't ship to Brazil (probably many buyers let
the boards return after getting notified of higher taxes from Brazilian
Customs).

Best Regards,

Alan

On Sat, Dec 9, 2023 at 8:11 PM Lee, Lup Yuen  wrote:

> Last week we walked through the Serial Console for Pine64 Ox64 BL808 64-bit
> RISC-V Single-Board Computer. And we hit some illogical impossible problems
> on NuttX for Ox64:
>
> (1) Console Input is always empty. (Can’t enter any Console Commands)
> (2) Interrupt Claim is forever 0. (Ox64 won’t tell us which Interrupt was
> fired!)
> (3) Leaky Writes are mushing up adjacent Interrupt Registers. (Or maybe
> Leaky Reads?)
>
> Today we discover the One Single Culprit behind all this rowdy mischief:
> Weak Ordering in the MMU! (Memory Management Unit)
>
> Here’s how we solved the baffling mystery:
> https://lupyuen.codeberg.page/articles/plic3.html
>
> Lup
>


[Article] NuttX on Ox64 BL808 RISC-V SBC: Fixed the UART Interrupt and Platform-Level Interrupt Controller

2023-12-09 Thread Lee, Lup Yuen
Last week we walked through the Serial Console for Pine64 Ox64 BL808 64-bit
RISC-V Single-Board Computer. And we hit some illogical impossible problems
on NuttX for Ox64:

(1) Console Input is always empty. (Can’t enter any Console Commands)
(2) Interrupt Claim is forever 0. (Ox64 won’t tell us which Interrupt was
fired!)
(3) Leaky Writes are mushing up adjacent Interrupt Registers. (Or maybe
Leaky Reads?)

Today we discover the One Single Culprit behind all this rowdy mischief:
Weak Ordering in the MMU! (Memory Management Unit)

Here’s how we solved the baffling mystery:
https://lupyuen.codeberg.page/articles/plic3.html

Lup


Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: UART Interrupt and Platform-Level Interrupt Controller (PLIC)

2023-12-02 Thread Alan C. Assis
Very cool!

Your graphics are very didact too!

It could be useful for the Milk-V port as well!

Best Regards,

Alan

On Sat, Dec 2, 2023 at 8:06 PM Lee, Lup Yuen  wrote:

> Our article today is all about RISC-V Interrupts on the tiny adorable
> Pine64 Ox64 BL808 64-bit Single-Board Computer (based on Bouffalo Lab BL808
> SoC)…
>
> (1) What’s inside the Platform-Level Interrupt Controller (PLIC)
> (2) Setting up the PLIC at startup
> (3) Enabling the PLIC Interrupt for Serial Console
> (4) Handling PLIC Interrupts for UART Input
>
> We’ll walk through the steps with our work-in-progress NuttX on Ox64. But
> we’ll hit a bumpy journey…
>
> (5) Leaky Writes seem to affect adjacent PLIC Registers
> (6) Interrupt Claim doesn’t seem to work right
>
> Check out the article: https://lupyuen.codeberg.page/articles/plic2.html
>
> Lup
>


[Article] NuttX on Ox64 BL808 RISC-V SBC: UART Interrupt and Platform-Level Interrupt Controller (PLIC)

2023-12-02 Thread Lee, Lup Yuen
Our article today is all about RISC-V Interrupts on the tiny adorable
Pine64 Ox64 BL808 64-bit Single-Board Computer (based on Bouffalo Lab BL808
SoC)…

(1) What’s inside the Platform-Level Interrupt Controller (PLIC)
(2) Setting up the PLIC at startup
(3) Enabling the PLIC Interrupt for Serial Console
(4) Handling PLIC Interrupts for UART Input

We’ll walk through the steps with our work-in-progress NuttX on Ox64. But
we’ll hit a bumpy journey…

(5) Leaky Writes seem to affect adjacent PLIC Registers
(6) Interrupt Claim doesn’t seem to work right

Check out the article: https://lupyuen.codeberg.page/articles/plic2.html

Lup


Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: NuttX Apps and Initial RAM Disk

2023-11-25 Thread Tomek CEDRO
On Sun, Nov 26, 2023 at 12:42 AM Lee, Lup Yuen wrote:
> (..)
> Check out the article: https://lupyuen.codeberg.page/articles/app.html

Whoah! You are a Cyborg Lup :-) :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info


[Article] NuttX on Ox64 BL808 RISC-V SBC: NuttX Apps and Initial RAM Disk

2023-11-25 Thread Lee, Lup Yuen
In Asia the wise folks say: “One can hide on a certain day but cannot hide
for a long time / 躲过初一,躲不过十五”

In other words: “Transformers? More than meets the eye!”

In this article, we go behind the shadow puppetry (wayang kulit) and
deceptive simplicity of NuttX Applications inside Apache NuttX RTOS for
Pine64 Ox64 BL808 64-bit RISC-V SBC:

(1) What’s inside the simplest NuttX App
(2) How NuttX Apps make RISC-V System Calls to NuttX Kernel
(3) Virtual Memory for NuttX Apps
(4) Loading of ELF Executables by NuttX Kernel
(5) Bundling of NuttX Apps into the Initial RAM Disk
(6) How we found the right spot to park our Initial RAM Disk

Check out the article: https://lupyuen.codeberg.page/articles/app.html

Lup


Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: Sv39 Memory Management Unit

2023-11-19 Thread Lee, Lup Yuen
Thanks Ken! Yep you read my mind, I'll write about NuttX Apps in the next
article:

(1) What's inside the simplest "Hello World" app
(2) How NuttX Apps call NuttX Kernel with "ecall"
(3) Bundling the NuttX Apps into the Initial RAM Disk (initrd) for Ox64
BL808 SBC. (We'll append the initrd to the NuttX Kernel for easier booting
with U-Boot. It's kinda messy right now for Star64 JH7110, as you have
discovered)

Stay tuned :-)

Lup

On Mon, Nov 20, 2023 at 2:47 AM  wrote:

> Lup,
>
> Another great article!
>
>
> One suggestion.
>
> In section 10 "Swap the SATP Register"
>
> You mention:
>
> "Huh? Our Applications can meddle with the I/O Memory?
>
> Nope they can’t, because the “U” User Permission is denied. Therefore
> we’re all safe and well protected!
> "
>
> I may have missed the reference, but this might be a place to introduce
> the idea that Kernel trampoline, eCalls, and so forth make use of kernel
> memory being mapped and available in all User address spaces so the
> Kernel's handling code does not have to immediately swap SATP to access
> its data structures.
>
> I know this is a large topic on its own, but am important trick to
> learn.
>
> Again, great article!  Thanks!!
> -KenD
>


Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: Sv39 Memory Management Unit

2023-11-19 Thread ken . dickey

Lup,

Another great article!


One suggestion.

In section 10 "Swap the SATP Register"

You mention:

"Huh? Our Applications can meddle with the I/O Memory?

Nope they can’t, because the “U” User Permission is denied. Therefore 
we’re all safe and well protected!

"

I may have missed the reference, but this might be a place to introduce 
the idea that Kernel trampoline, eCalls, and so forth make use of kernel 
memory being mapped and available in all User address spaces so the 
Kernel's handling code does not have to immediately swap SATP to access 
its data structures.


I know this is a large topic on its own, but am important trick to 
learn.


Again, great article!  Thanks!!
-KenD


Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: Sv39 Memory Management Unit

2023-11-18 Thread Tomek CEDRO
On Sun, Nov 19, 2023 at 12:42 AM Lee, Lup Yuen wrote:
> Memory Management Unit (MMU) is the hardware inside our Single-Board
> Computer (SBC) that implements Memory Protection and Virtual Memory.
> (..)
> Check out the article: https://lupyuen.codeberg.page/articles/mmu.html

Amazing read Lup.. as always! Thank You and Congratulations! :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info


[Article] NuttX on Ox64 BL808 RISC-V SBC: Sv39 Memory Management Unit

2023-11-18 Thread Lee, Lup Yuen
Memory Management Unit (MMU) is the hardware inside our Single-Board
Computer (SBC) that implements Memory Protection and Virtual Memory.

Sv39 is the RISC-V MMU inside the Pine64 Ox64 SBC, based on Bouffalo Lab
BL808 SoC.

In this article, we boot NuttX on Ox64 SBC to find out how Sv39 MMU works
with:
(1) Memory Protection (for our Kernel)
(2) Virtual Memory (for the Applications)
As we record everything that happens when NuttX configures the Sv39 MMU.

Check out the article: https://lupyuen.codeberg.page/articles/mmu.html

Lup


Re: [Article] NuttX on Ox64 BL808 RISC-V SBC

2023-11-04 Thread Tomek CEDRO
wow! :-)

--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info


Re: [Article] NuttX on Ox64 BL808 RISC-V SBC

2023-11-04 Thread MIGUEL ALEXANDRE WISINTAINER
Nice! I have here some units. I will test!

Enviado do meu iPhone

> Em 4 de nov. de 2023, à(s) 10:40, Lee, Lup Yuen  escreveu:
> 
> Pine64 Ox64 is an affordable RISC-V SBC ($8) based on Bouffalo Lab BL808
> SoC with 3 (Asymmetric) RISC-V Cores:
> 
> (1) D0 Multimedia Core: 64-bit T-Head C906 with MIPI CSI, Neural Processing
> Unit
> (2) M0 Wireless Core: 32-bit T-Head E907 with WiFi, Bluetooth LE, Zigbee,
> Audio, USB, Ethernet
> (3) Low Power Core: 32-bit T-Head E902
> 
> In this article we explore how NuttX might run on Ox64 (with OpenSBI and
> U-Boot Bootloader).
> 
> Check out the article: https://lupyuen.codeberg.page/articles/ox64.html
> 
> Lup


[Article] NuttX on Ox64 BL808 RISC-V SBC

2023-11-04 Thread Lee, Lup Yuen
Pine64 Ox64 is an affordable RISC-V SBC ($8) based on Bouffalo Lab BL808
SoC with 3 (Asymmetric) RISC-V Cores:

(1) D0 Multimedia Core: 64-bit T-Head C906 with MIPI CSI, Neural Processing
Unit
(2) M0 Wireless Core: 32-bit T-Head E907 with WiFi, Bluetooth LE, Zigbee,
Audio, USB, Ethernet
(3) Low Power Core: 32-bit T-Head E902

In this article we explore how NuttX might run on Ox64 (with OpenSBI and
U-Boot Bootloader).

Check out the article: https://lupyuen.codeberg.page/articles/ox64.html

Lup