xv6 porting to GAIA architecture
C C++ Assembly Makefile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
include
lib
tools
usr
.dir-locals.el
.gitignore
LICENSE
Makefile
README
README.md
bio.c
buf.h
console.c
contest.bin
defs.h
devicefile.c
entry.c
entryasm.S
exec.c
file.c
fs.c
gaia.h
hello.s
initcode.S
kalloc.c
log.c
main.c
memide.c
memlayout.h
min-rt.c
mmu.h
mp.c
mp.h
pipe.c
proc.c
proc.h
spinlock.c
spinlock.h
string.c
swtch.S
syscall.c
sysfile.c
syshalt.c
sysproc.c
timer.c
trap.c
trapasm.S
traps.h
uart.c
vm.c

README.md

xv6 GAIA port

xv6 port

This is a port of xv6 to GAIA, our own CPU architecture.
We did this at the student experiment at The University of Tokyo.
Rewriting xv6 is mainly done by @nullpo-head, @warelle and @m-hys.
Many improvements are also done by other team members.

To make xv6 work on GAIA, we did

  • Rewrite all x86 dependent codes such as booting, interrupt, peripherals or task switch.
    This was indeed heavy, but not as heavy as expected at first.
  • Support page coloring.
    To handle the cache coherency problem GAIA has at present.

About 1000 lines modifications are needed for these tasks.
For diff, see https://github.com/wasabiz/xv6/compare/6f8ad7a249fc9b47a449f0f35ec79aa0b01b0069...master

There is an experimental online demo of xv6-gaia by Javascript. Try it!.

Original xv6

The original xv6 is a simple Unix like OS for education by MIT, which is targeted at x86.
For more detail, see http://pdos.csail.mit.edu/6.828/2012/v6.html

What we did for porting

Porting needs much more than just rewriting xv6. Here is what we did for porting.

Create toolchain

  • Create the almost C89 compatible compiler
    Maybe this is the biggest task. We made an almost C89 compatible compiler, UCC.
    This is done by @kw-udon, @b-inary and @wasabiz.
    The repository is at https://github.com/kw-udon/ucc/.
  • Create the assembler
    We made a simple but powerful assembler by python. This is done by @b-inary.
    Repository: https://github.com/b-inary/gaia-software
  • Create the linker
    The linking is done by some ruby scripts and makefile. This is done by @nullpo-head

Create CPU simulator

A software CPU simulator is necessary to develop CPU.
@b-inary mainly made this.

Create CPU

  • Design CPU architecture
    @b-inary and @wasabiz designed GAIA architecture.
    @nullpo-head also joined for interruption and MMU.
  • Create CPU by VHDL
    GAIA is implemented on FPGA, Virtex-5.
    @wasabiz wrote all VHDL source by hisself.
    The repositroy is at https://github.com/wasabiz/gaia3

Improvements

We also did some improvements.

  • Add user programs
    pwd, tiny vi clone, sl, 2048 and many user programs are added.
    Try sl at least once!!
  • Clean up the source codes
    We separated kernel and user programs into different directories.
    We also introduced a subset of standard libc. You can include '<stdio.h>', instead of '"user.h"'.

Team members

Xv6 porting is done in 4 months by