Skip to content

AmberCrafter/rustos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rustos

Experimental OS base on

Goal: Get into the user space and run the syscall

Learn in this project:

  • Kernel structure
  • Memory layout
  • Interrupt and Trap
  • Context and context switch
  • Kernel and User space
  • Framebuffer rendering
  • Syscall

User shell

Date: 2022-10-30 UserShell


Install

  1. install toolchain
./init.sh
  1. build user programe
cd user
make
  1. build and run kernel
cd os
cargo clean && cargo krun

TODO LIST && Known BUG:

    • Convert TSS table into implementation with memory allocator
    • Fix render overflow
    • Make textrenderer support cursor
    • Package TextWriter as editor and console
      • Document it!
      • Editor
      • Console
      • Support Del?
    • Setup kernel process
    • print and println not work, need to check framebuffer and textwritter
    • clean warning

Note.

  1. Leave the Qemu: ctrl+a x (-serial mon:stdio)
  2. keyboard interrupt only work on graphic mode currently

Future works

  • TextWriter: Support console like input
  • Make cargo ktest work
  • Implement APIC (current use 8259 PIC)
  • Learn E820 (memory controller?)
  • Waiting for new version of osdev/bootloader and rewrite

ChangeLog

[2022-10-30]

  1. BUGFIX: Context switch will be arbitrary crushed, due to idt overflow

Add a guard stack when step up tss table

  1. BUGFIX -- STDIN: children process framebuffer render not work

Add framebuffer memory_set copy into memory.page.mod.kernel_mapped_new_page_table

  1. BUGFIX: framebuffer writer will crash at last byte

Fix cursor render

  1. BUGFIX: Print key typing in framebuffer
  2. MODIFY: user_shell improve

[2022-10-29]

  1. Implement process and context switch
  2. BUG: STDIN

[2022-10-27]

  1. Error: syscall jmp to 0x0H in user mode

[2022-09-28]

  1. enter user mode
  2. syscall/sysretq

[2022-09-26]

  1. Setup syscall software interrupt
  2. Learn on ext2 filesystem

[2022-08-31]

  1. Finished async implement

[2022-08-25]

  1. Finished keyboard interrupt
  2. Update TextEditor: Support cursor, Bugfix

[2022-08-24]

  1. Solve ireqt double fault exception

[2022-08-23]

  1. Setup interrupt handler: breakpoint, doubl_fault

[2022-08-22]

  1. Modulize unittest, qemu, panic handler
  2. Fix ktest error: rust-lang/cargo#7359

[2022-08-21]

  1. Change module name: render -> renderer
  2. Make document for renderer
  3. Append features: change fore/background color for TextWriter

[2022-08-20]

  1. Due to make the screen output interface consistent on both bios and uefi, VGA_Buffer no longer to use.
  2. Package the screen print interface from bootloader logger as library/render.

[2022-08-19]

  1. Initialization this project.
  2. bootloader Config setting: https://docs.rs/bootloader/latest/bootloader/struct.Config.html#structfield.kernel_stack_size

About

Experimental OS base on blog_os

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages