Learning Risc-V through OS Dev
-
RISC-V ISA and Assembly Basics
- Register set, instruction formats
- Basic arithmetic, logic operations
- Memory access patterns
- Build: Simple calculator program
-
Memory and Stack Management
- Stack operations, calling conventions
- Memory layout, sections
- Build: Function call framework with parameter passing
-
Bare Metal Programming
- Boot sequence
- CSR manipulation
- UART initialization
- Build: Bootloader with UART output
-
Privilege Levels and Exceptions
- M/S/U modes
- Trap handling
- CSR programming
- Build: Exception handler framework
-
Memory Management Unit
- Page tables setup
- Virtual memory mapping
- TLB management
- Build: Basic virtual memory system
-
Device Discovery
- Device tree parsing
- MMIO handling
- PCI enumeration
- Build: Hardware discovery subsystem
-
Interrupt Controller
- PLIC/CLINT setup
- IRQ handling
- Timer configuration
- Build: Interrupt management system
-
Process Management
- Context switching
- Process states
- Scheduling algorithms
- Build: Cooperative multitasking
-
Device Drivers Framework
- Driver model
- Device abstraction
- Resource management
- Build: Driver registration system
-
GPU/Graphics Discovery
- Graphics hardware detection
- Framebuffer setup
- Basic acceleration probing
- Build: Graphics subsystem initialization
-
AI Accelerator Integration
- Neural engine detection
- Acceleration interfaces
- Resource allocation
- Build: AI hardware abstraction layer
-
Custom Hardware Support
- Custom MMIO handling
- Hardware-specific drivers
- Extension discovery
- Build: Custom hardware integration framework
-
C/Rust Integration
- FFI interfaces
- ABI compatibility
- Memory models
- Build: Language runtime support
-
Package Management
- Package format
- Dependency resolution
- Version management
- Build: Basic package manager
-
Dynamic Loading
- ELF parsing
- Dynamic linking
- Symbol resolution
- Build: Dynamic loader
-
System Calls
- Syscall interface
- Parameter passing
- Return handling
- Build: Syscall framework
-
Networking Stack
- Protocol integration
- Network device management
- Custom protocol support
- Build: Network subsystem
-
Filesystem Integration
- VFS layer
- Custom FS support
- Buffer management
- Build: Filesystem framework
-
Resource Management
- Memory pools
- Device sharing
- Power management
- Build: Resource manager
-
System Integration
- Component integration
- Boot sequence
- Configuration
- Build: Complete OS
Each lesson includes:
- Theory component
- Hands-on implementation
- Testing framework
- Integration with previous components
- Documentation requirements
Final project combines all components into a functional OS with:
- Hardware discovery
- Resource management
- Language support
- Package management
- Custom protocol handling
- Graphics/AI acceleration support