Minimal ARM Operating System for the Raspberry Pi 4, supporting aarch64 architectures.
Lines of code:
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
C 14 191 263 765
C/C++ Header 24 152 353 326
Assembly 6 61 163 208
Markdown 1 4 0 61
make 1 19 12 54
-------------------------------------------------------------------------------
SUM: 46 427 791 1414
-------------------------------------------------------------------------------
Support for:
- Raspberry Pi 4
- Basic Directory Structure
- Register Addresses
- GPIO
- AUX
- mini UART
- Kernel printing info on start up
-
printk
-
string.h
functions-
strlen
,strcmp
,strcpy
,strcat
,strrev
-
memset
,memcpy
-
-
stdlib.h
functions-
itoa
-
atoi
-
-
stdbool
-
true
,false
-
- Exception Levels (ARMv8-a)
-
armstub
starts kernel at EL3 - Kernel starts at EL3
- Print EL
- Change from EL3 to EL1
-
- Interrupts - IRQ
- Initialize vector table
- Enable / Disable interrupts
- IRQ registers
- Handle mini UART interrupts
- Handle Timer interrupts
- Timer
- System Timer 1 init (set interval from param)
- System Timer 1 handler
- System Timer 1 stop
- Sleep (msec)
- GPIO
- Functions for set/clear pins
- Function for seting Alt Func to GPIO pins
- Console
- prompt
- Take users input
- Command parser
- Handle Commands
- Commands
- help
- halt
- create_procs
- run_procs
- Processes
- Scheduler
- Context Switch
- Fork
- Process initialization
- Parameterize processes:
- Number
- Argument
- Kill process
A screenshots where, we create 4 processes, run them and kill them: