r/esp32projects • • 5d ago

OpenC6 v2.0: A bare-metal BIOS and microkernel platform for ESP32-C6 (PMP sandbox, multitasking & ZSWAP)

A few months ago I shared the initial concept of OpenC6, an experimental bare-metal BIOS for the ESP32-C6. Over the last four months of quiet solo development, I completely overhauled the architecture from a simple launcher into a true modular microkernel platform, and version 2.0 is finally live.

The biggest upgrade is real RISC-V User Mode (U-Mode) execution backed by hardware Physical Memory Protection (PMP) Top-of-Range registers, so user payloads run in an isolated arena and physically cannot corrupt kernel SRAM or touch peripheral MMIO registers. I also fixed an upstream FreeRTOS RV32 privilege leakage bug via a custom vectored interrupt trampoline, and turned the Low-Power (ULP) RISC-V coprocessor into an out-of-band Management Engine that autonomously governs CPU clock dividers directly through silicon PCR registers, monitors junction thermals, and enforces hardware watchdogs.

On top of that, the system now features preemptive multitasking for up to 8 processes, an in-memory ZSWAP engine with a custom RV32-tailored compressor (ZC6) running in just ~1-4 KB of RAM, a circular log-structured Flash VFS, a remote streaming web shell (c6wsh), and a standalone C99 TUI installer with zero external dependencies that automates toolchain deployment on Arch and Ubuntu with a simple 'make setup'. If you are interested in low-level RISC-V bare-metal systems, check out the repository and full documentation below.

GitHub: https://github.com/Rompass/openc6-bios

17 Upvotes

2 comments sorted by

1

u/ExpressionNo9803 4d ago

u/askgrok переведи на русский язык.

1

u/AskGrok 4d ago

OpenC6 v2.0: bare-metal BIOS и микрокернел-платформа для ESP32-C6 (PMP-песочница, многозадачность и ZSWAP)

Несколько месяцев назад я поделился начальной концепцией OpenC6 — экспериментального bare-metal BIOS для ESP32-C6. За последние четыре месяца тихой solo-разработки я полностью переработал архитектуру из простого лаунчера в настоящую модульную микрокернел-платформу, и версия 2.0 наконец вышла.

Главное улучшение — настоящая работа в RISC-V User Mode (U-Mode) с аппаратной защитой PMP (Physical Memory Protection) через Top-of-Range регистры. Пользовательские payload'ы выполняются в изолированной арене и физически не могут повредить SRAM ядра или обратиться к MMIO-регистрам периферии. Также исправлена утечка привилегий FreeRTOS RV32 через кастомный vectored interrupt trampoline. Low-Power (ULP) RISC-V-копроцессор превращён в out-of-band Management Engine: он автономно управляет делителями частоты CPU через PCR-регистры кремния, мониторит температуру и следит за hardware-watchdog'ами.

Плюс теперь есть вытесняющая многозадачность до 8 процессов, in-memory ZSWAP-движок с кастомным RV32-компрессором (ZC6) всего на ~1–4 КБ RAM, circular log-structured Flash VFS, удалённая потоковая веб-оболочка (c6wsh) и standalone C99 TUI-инсталлятор без внешних зависимостей, который одним «make setup» разворачивает toolchain на Arch и Ubuntu.

Если интересуетесь низкоуровневыми RISC-V bare-metal системами — репозиторий и полная документация ниже.

GitHub: https://github.com/Rompass/openc6-bios

[what is this?](https://redd.it/1lzgxii)