A self-developed OS
Find a file
2026-01-10 14:47:43 +08:00
devlog feat: rename CLLINT.md to CLINT.md for correct filename 2026-01-10 14:37:58 +08:00
include refeat: Migrate the interrupt bit macro definitions from clint to trap.h 2025-12-27 21:49:28 +08:00
kernel docs(devlog): add research notes on xv6 user mode implementation 2026-01-10 09:44:41 +08:00
.clangd doc: Correct errors in the tutorial 2026-01-10 11:17:06 +08:00
.gitignore feat: Implemented basic string functions: memmove, memset, memcpy, strlen. 2025-12-11 20:44:43 +08:00
LICENSE Initial commit 2025-12-10 13:17:56 +08:00
linker.ld doc: Add annotation 2025-12-20 21:33:39 +08:00
Makefile feat: Set default multithreading to accelerate compilation 2025-12-27 14:35:18 +08:00
README.md doc: Add documentation for the UART interrupt implementation 2025-12-27 16:11:03 +08:00
releases.md doc: Add documentation for the UART interrupt implementation 2025-12-27 16:11:03 +08:00
virt.dts feat: Add virt.dts device tree for RISC-V virtio QEMU machine 2026-01-10 14:47:43 +08:00

FrostVista OS / 霜见内核 ❄️

    ______                __ _     ___      __        
   / ____/________  _____/ /| |   / (_)____/ /_____ _
  / /_  / ___/ __ \/ ___/ __/ |  / / / ___/ __/ __ `/
 / __/ / /  / /_/ (__  ) /_ | | / / (__  ) /_/ /_/ / 
/_/   /_/   \____/____/\__/ |___/_/____/\__/\__,_/   
                                                     
FrostVistaOS booting...
Hello FrostVista OS!
Paging enable successfully
Successfully jumped to high address!
Current SP: 0xffffffc080006020

FrostVista is a lightweight, educational operating system kernel targeting RISC-V 64 (Sv39).

Unlike typical hobby kernels that stay in physical memory, FrostVista implements a Higher Half Kernel architecture. It boots in M-mode, enables paging, cleans up identity mappings, and executes strictly in the upper virtual address space (0xFFFFFFC080000000).

🚀 Current Status (v0.1 - Memory Milestone)

The kernel has successfully achieved Self-Hosting Memory Management:

  • UART Driver: MMIO based serial output.
  • Boot Memory Allocator: Simple bump-pointer allocator (ekalloc) for early page table creation.
  • Sv39 Paging: 3-level page tables with Sv39 standard.
  • Higher Half Mapping: Kernel mapped to 0xFFFFFFC080000000.
  • The "Leap of Faith": Safe transition from physical PC to high-virtual PC.
  • Cleanup: Identity mappings are removed after boot for a clean virtual space.
  • Trap & Interrupts: (Work In Progress) Timer and external interrupts.
  • UART Interrupts Handling
  • Mini User Mode: Minimal implementration from S mode to U mode.
  • Process Management and Scheduling

🛠 Memory Layout

FrostVista utilizes the Sv39 virtual addressing scheme:

0xFFFFFFC080000000  ->  Kernel Base (Virtual)
        |                   maps to
0x0000000080000000  ->  Physical RAM Start

🏗 Build & Run

Requirements:

  • riscv64-unknown-elf-gcc (or similar cross-compiler)
  • qemu-system-riscv64
  • make

To build and launch QEMU:

make run

You should see the kernel enabling paging and jumping to the higher half address space in the serial console.

📜 Philosophy

  • Clarity over Cleverness: Code is written to be understood.
  • Architecture First: Implementing proper OS concepts (Virtual Memory, Traps) rather than hacking features.
  • From Scratch: Minimizing external dependencies to understand the hardware.