No description
  • C 84.3%
  • Assembly 13.1%
  • Makefile 2.1%
  • Shell 0.5%
Find a file
2022-11-30 22:03:10 +01:00
example Ajout documentations 2022-11-30 21:25:24 +01:00
include add examples 2020-08-21 18:29:21 +09:00
src Ajout documentations 2022-11-30 21:25:24 +01:00
.clang-format apply clang-format 2020-08-07 18:50:17 +09:00
.gitignore add examples 2020-08-21 18:29:21 +09:00
documentation_sur_les_hyperviseurs.md Documentation 'How to make a hypervisor' avec liens Google Translate 2022-11-30 22:03:10 +01:00
documentation_traduite.md Ajout documentations 2022-11-30 21:25:24 +01:00
go_64bits Ajout documentations 2022-11-30 21:25:24 +01:00
LICENSE Create LICENSE 2020-08-21 19:13:40 +09:00
Makefile Ajout documentations 2022-11-30 21:25:24 +01:00
pour_compiler.md Ajout documentations 2022-11-30 21:25:24 +01:00
README.md Update README.md 2020-09-05 17:26:38 +09:00
resultat_execution_raspi_reel.md Ajout documentations 2022-11-30 21:25:24 +01:00

raspvisor

A simple type-1 hypervisor on Raspberry Pi 3 (aarch64)

Article about raspvisor is here (Japanese).

Warning: This is a hobby project and not for practical use.

Setup

First, write a Raspberry Pi OS (previously called Raspbian) image to your SD card to make partitions and install firmwares. Execute following commands to build. (GNU toolchain for aarch64-linux-gnu is required.)

$ export SD_BOOT_DIR=/path/to/bootpartiton/on/sdcard
$ export SD_ROOTFS_DIR=/path/to/rootfspartiton/on/sdcard
$ make install

Programs runs on a hypervisor startup are hard-coded in src/main.c. I confirmed that programs in example directory can be run on this hypervisor. In example directory, following programs are found.

  • test_binary : issues hypervisor call once.
  • echo : Mini-UART echo back (based on raspberry-pi-os/lesson02)
  • mini-os : a simple operating system which has a process scheduler, interrupt handling and virtual memory support (based on raspberry-pi-os/lesson06)

Enter each directory and make to build. Then copy *.bin file to SD_BOOT_DIR.

Usage

UART is assigned to the hypervisor's console. Connect your cable to the GPIO 14/15 pins.

  • ? + l : show the list of VMs
  • ? + 1-9 : switch to the console of VM 1-9

Features

  • Enabling stage 2 translation
  • Memory-mapped IO emulation
    • BCM2837 Interrupt Controller
    • BCM2837 System Timer (inacculate)
    • BCM2837 Mini-UART
  • IRQ virtualization by using virtual IRQs
  • Trapping access of some system register
  • Trapping WFI/WFE instruction

Links

License

This software is licensed under the MIT license.