Go to file
2024-05-20 02:35:16 -05:00
.cargo Call Rust from assembly instead, relocate linker script 2024-05-19 20:03:03 -05:00
.vscode Initial commit 2024-05-13 17:31:37 -05:00
lds Update entry code, switch to spin crate for spinlocks 2024-05-20 02:35:16 -05:00
src Update entry code, switch to spin crate for spinlocks 2024-05-20 02:35:16 -05:00
.gitignore Initial commit 2024-05-13 17:31:37 -05:00
20240519-kernel_init_diagram.png Update readme and init 2024-05-19 17:42:50 -05:00
build.rs Call Rust from assembly instead, relocate linker script 2024-05-19 20:03:03 -05:00
Cargo.lock Update entry code, switch to spin crate for spinlocks 2024-05-20 02:35:16 -05:00
Cargo.toml Update entry code, switch to spin crate for spinlocks 2024-05-20 02:35:16 -05:00
README.md Tweak readme 2024-05-19 17:48:59 -05:00
RESOURCES.md Update readme and init 2024-05-19 17:42:50 -05:00

created modified
2024-05-13T14:28:49-05:00 2024-05-19T17:41:01-05:00

kernel

A kernel for RISC-V written in Rust. Currently focused on running on QEMU generic riscv64, advice and assistance welcome & encouraged.

Progress

  • 2024-05-19: As of right now, the basic "stuff" for initializing the kernel is there. The diagram below shows what I'm thinking as far as what the init process should be. This is what I'm currently working on implementing, and I will update this chart (and prettify it) more

Flowchart (tentatively) showing the plan for the kernel's initialization process. On the left is hart 0, the main hardware thread, and on the right is hart 1...n, all other hardware threads. All harts will set the global, stack, and thread pointers, disable paging, and set the mstatus and mepc control status registers, before doing their own independent init processes. Hart 0 will disable interrupts and enter the primary initialization function, kinit, before starting the first user process. Other harts will enable interrupts, do their own init, kinit_hart, then wait for a software inter-processor interrupt.

Research and implement

  • Basics
    • Processes
    • Virtual address spaces, page tables
    • Files, directories
    • Pipes
    • Multitasking, time-slicing
    • Syscalls
  • CPU cache
  • User authentication, login
  • File protection, permissions
  • Mountable file systems
  • Paging to disk
  • Sockets, network support
  • Interprocess communication
  • Device drivers
  • User applications

Resources

See RESOURCES.md