Skip to content

v0.6.0: M-mode Firmware, MMU A/D Bits, Counter Access Control

Choose a tag to compare

@quantumnic quantumnic released this 18 Feb 07:36
· 87 commits to main since this release

What's New

M-mode Firmware Boot ROM

The boot ROM now acts as a minimal OpenSBI replacement:

  • Sets up PMP for full memory access
  • Delegates exceptions and interrupts to S-mode (medeleg/mideleg)
  • Configures MCOUNTEREN/SCOUNTEREN for counter access
  • Drops to S-mode via MRET

This is a critical milestone toward Linux boot — the kernel will now start in Supervisor mode with proper privilege separation.

MMU Accessed/Dirty Bit Management

The Sv39 page table walker now automatically sets A (Accessed) and D (Dirty) bits on PTEs. Linux requires hardware A/D management and would repeatedly page-fault without it.

Counter Access Control

User and supervisor mode access to CYCLE, TIME, and INSTRET CSRs is now gated by MCOUNTEREN and SCOUNTEREN registers. Unauthorized access properly traps with an illegal instruction exception.

Other Improvements

  • Superpage alignment checks (misaligned mega/gigapages properly fault)
  • 57 tests passing (up from 52)

What's Next

  • Linux early boot testing with a minimal kernel image
  • Proper initramfs/rootfs support
  • UART input improvements for interactive console