219 Commits (main)
 

Author SHA1 Message Date
anna e86ef2acbd
fix atomics (finally) 2 years ago
anna 5d2539fc4a
kent: avoid recursion 2 years ago
anna 3e35afcfa9
atom: redesign API 2 years ago
anna f293c6661e
enable debug features by default if DEBUG is on 2 years ago
anna 4177931774
arch/at91sam3x8e: fix vector_table const decl 2 years ago
anna e80a6cb630
update placeholder name in comment 2 years ago
anna ad76275721
fix remaining compiler warnings
This commit removes all inline annotations that
the compiler does not actually inline, and inserts
pragma directives to selectively disable warnings
where necessary.
2 years ago
anna adccbef80d
arch/at91sam3x8e: fix compile error
Enabling CONFIG_CHECK_SYSCALL_SOURCE resulted in a
compile error because the corresponding code block
used an outdated variable name.  This commit fixes
the issue.
2 years ago
anna c767d551d3
initd: implement simple test init daemon 3 years ago
anna 104578d072
sched: add thread management syscalls 3 years ago
anna a370ef69f6
config: lower default sched freq to 200 Hz
1 kHz was way too much (the CPU could barely get
anything done in a time window of just 1 ms) and
the task can be put to sleep due to system calls
anyway, so this should be fine.
3 years ago
anna 2ea850cead
init: use correct mm init function name 3 years ago
anna fb9ec2a8bc
mm: make malloc and free system calls
This is required because the heap is shared among
all tasks and protected using a mutex which only
works in kernel space.
3 years ago
anna 040b5af5d6
malloc: poison heap when DEBUG is defined 3 years ago
anna 8293d9372b
mutex: don't rely on malloc for waitqueue 3 years ago
anna b7e9187740
main: move kernel start routine to kernel/ 3 years ago
anna 75d2fb4470
vscode: fix debug config file location 3 years ago
anna 60ec99692c
serial: "fix" buffer truncation bug
DMA just uses one buffer rather than two now lmao
3 years ago
anna d1805c2f00
dma: make memory allocations atomic 3 years ago
anna 10e8b00fb0
sched: avoid memory allocation for kernel task 3 years ago
anna 4287759c46
mutex_init: remove force inline 3 years ago
anna fb49965e95
atomic_enter: actually mask interrupts 3 years ago
anna 279397167a
config: set CONFIG_SERIAL_BAUD min to 1200 3 years ago
anna 1bc2448c91
arch: move build related files to subdirectory 3 years ago
anna d4411fd6b6
mutex: add wait queue and spinlocks 3 years ago
anna faa99622df
malloc: check for underflow in blk_slice 3 years ago
anna 1d30394cec
sched: add idle task entry i forgot to commit 3 years ago
anna c79fadaf06
sched: set PendSV priority, fix _leave routine 3 years ago
anna f5590becd3
syscall: add sleep system call 3 years ago
anna 02ed1b5779
malloc: mask flags for neighbor offset 3 years ago
anna f85006f224
malloc: remove obsolete assert statements
A relict of debugging on my host.
3 years ago
anna 8e9678577e
malloc: fix my shit code so it's less shitty
The allocator works now.
At least when i compile it for amd64.
I haven't actually flashed it yet tho lmao.
3 years ago
anna 83ee9603e7
file: add file kevent and i/o wait support 3 years ago
anna 364290f192
arch: add files i fucking forgot to commit 3 years ago
anna 59db5471ed
malloc: rewrite with atomic support 3 years ago
anna 7e6dbad05f
sched: complete rework of context switching
The old strategy was to only do context switching
from within the PendSV handler.  This worked fine
until now because all syscalls were handled either
atomically or just returned -EAGAIN if the
resource was locked or busy.  However, with the
introduction of I/O wait, we need to be able to
sleep directly from within the kernel by moving
the context switching completely into the kernel.
3 years ago
anna 60f1ebea8a
arch: use CMSIS after all
It was inevitable, tbh.  I really wanted to do
everything entirely from scratch, but all those
hardware registers are just too much to be
maintained by a single person.  And since i plan
on supporting different boards at some point in
the future, it would be complete madness to redo
everything for that board.
3 years ago
anna b122e54ec8
handle_fault: fix hex stringification algo 3 years ago
anna e96ee14e68
sched: make sleeping actually work 3 years ago
anna b4046795c8
list: fix shit 3 years ago
anna c24b183c60
init: fix init array pointer dereference bullshit 3 years ago
anna 6287cb79be
stdint.h: now even less POSIX-noncompliant! 3 years ago
anna 6d886d7252
syscall: refactor names 3 years ago
anna 6e269e0217
sched: refactor and implement sleep 3 years ago
anna 0e6d0057a8
arch: call init and preinit array 3 years ago
anna 4359f43b0e
kevent: refactor callback system 3 years ago
anna 30404f60d4
kevent: initialize kevents during boot 3 years ago
anna b053cc3279
list: fix list_for_each_entry_safe 3 years ago
anna 203c167822
kevent: add device kevent 3 years ago
anna f89aa9dc4e
sched: add idle task 3 years ago