Skip to content

Port of the egos-2000 teaching operating system to Allwinner's D1 chip

License

Notifications You must be signed in to change notification settings

cheofusi/egos-2000-d1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This is a port of the awesome egos-2000 teaching operating system to Allwinner's D1 chip, using Sipeed's Lichee RV compute module.

There is no attempt at staying under 2K lines of code. Most of the chip dependent sources were gotten from FlatHeadBro's D1 baremetal programs (to whom I am immensely grateful) and given a facelift.

The port either runs in M-mode, or M S U with Page Tables.

Usages and Documentation

For compiling and running egos-2000-d1, please read this document. The RISC-V instruction set manual, C906 processor manual and D1 chip manual introduce the privileged ISA and memory map. egos.h details the memory layout

Major Changes

  • New memory layout in egos.h and linker scripts
  • New disk layout in disk.h
  • fence.i required after a context switch when running in M-mode only.
  • D1 C906 Sv39 paging
  • trap_entry_vm rewrite to allow for clearing mstatus.MPRV before mret, which the D1 doesn't do.
  • Toggle mstatus.MPRV in timer_reset to allow requesting timer interrupts.
  • Enable mcounteren.TM to allow reading time csr in S-mode

TODO

  • Mem paging
  • User-level threading

About

Port of the egos-2000 teaching operating system to Allwinner's D1 chip

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published