87 Commits (104578d0720b2b19907097c758049049f1bac24b)

Author SHA1 Message Date
anna 104578d072
sched: add thread management syscalls 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 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 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 d4411fd6b6
mutex: add wait queue and spinlocks 3 years ago
anna f5590becd3
syscall: add sleep system call 3 years ago
anna 83ee9603e7
file: add file kevent and i/o wait 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 e96ee14e68
sched: make sleeping actually work 3 years ago
anna 6d886d7252
syscall: refactor names 3 years ago
anna 6e269e0217
sched: refactor and implement sleep 3 years ago
anna 4359f43b0e
kevent: refactor callback system 3 years ago
anna 203c167822
kevent: add device kevent 3 years ago
anna f89aa9dc4e
sched: add idle task 3 years ago
anna e291a51d2f
kevent: add event system 3 years ago
anna 7fa55c8dab
mutex: return -EAGAIN if trylock fails 3 years ago
anna c36c2182d7
sched: minor refactor 3 years ago
anna 4db1702078
stdio: refactor printk to printf and friends 3 years ago
anna caefad25a8
build: parameterize serial config macros 3 years ago
anna d20da423ec
fs: implement file abstraction 3 years ago
anna 3ab358310c
build: ensure all symbols are included 3 years ago
anna 643d3ed251
build: migrate to CMake 3 years ago
anna fc63785ca6
kent: simplify structure 3 years ago
anna 8b3a5fd68d
sched: integrate into kent hierarchy
This is an initial, rudimentary attempt at integrating the scheduler
into the kent hierarchy.  There are likely gonna be drastic changes
in the future, and i haven't even tried running the whole thing.

But hey, the code compiles again now!
3 years ago
anna f0dc3a3433
kiss capitalism goodbye for good
The CNPL will make sure that absolutely no corporation is going to get
anywhere near Ardix -- exactly as it should be.  Fuck you, corporations!
3 years ago
anna 6f6be12e83
printk: introduce temporary buffer
This is just a proof of concept for now, i am perfectly aware of the
fact that this will cause buffer overruns if the line gets too long.
3 years ago
anna dca3e716ca
serial: add zero-copy dma i/o api 3 years ago
anna ec3b64d232
string: move header to standard location
Anything that implements POSIX should also be where POSIX defines
it to be, otherwise it would be pretty useless lol
3 years ago
anna af8210da4a
piss off capitalism
Ardix is being relicensed to GPL v3 or later. I have no idea whether you
can just do this if you feel like it or if it has any consequences, but
i kinda don't really care that much about it.  Any changes made after
this commit will definitely fall under the GPL though, and considering
that only few things are really working yet anyways this is good enough
for me.
3 years ago
anna 4349420217
kent: redesign api
This also got the dmabuf refcount hard fault issue resolved somehow.
Don't ask how or why, i'm just glad it works now.
3 years ago
anna 5fa7639ce8
syscall: c syntax do be hard tho 3 years ago
anna b7abbf1cf7
kent: change param order of kent_init 3 years ago
anna a658a7c8b3
sched: yes but what if i weren't stupid? 3 years ago
anna 9b1eef8a64
sched: fix accidental double ptr bug 3 years ago
Felix Kopp c4717d8fce
dma: add abstraction layer for dma 3 years ago
Felix Kopp 256b49b529
device: add base abstraction for all devices 3 years ago
Felix Kopp 56c76d8b4b
sched: use proper UNIX® terminology 3 years ago
Felix Kopp 61ebad5231
fs: actually include read.c in Makefile 3 years ago
Felix Kopp d60f57f8de
fs: implement read syscall 3 years ago
Felix Kopp 50928211ca
minor fixes and improvements 3 years ago
Felix Kopp 9c1b546b16
user: i can't do this anymore
Living as a sheep herder on a lonely island is becoming an increasingly
appealing option the more i am exposed to my stupidity and inability
to memorize the return values of basic libc functions that i even
implemented myself two fucking months ago.
3 years ago
Felix Kopp 44f45c71bc
write: didn't mean to commit that 3 years ago
Felix Kopp 4a3e33dc05
sycall: conform to POSIX 3 years ago
Felix Kopp 5555a3d56d
cleanup and fix warnings 3 years ago
Felix Kopp 63ccd87112
arch/at91sam3x8e: finalize entry routine 3 years ago