Commit graph

92 commits

Author SHA1 Message Date
fef
e86ef2acbd
fix atomics (finally) 2022-10-12 13:53:46 +02:00
fef
5d2539fc4a
kent: avoid recursion 2022-10-10 14:32:29 +02:00
fef
3e35afcfa9
atom: redesign API 2022-10-10 09:30:53 +02:00
fef
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.
2022-09-26 13:03:56 +02:00
fef
c767d551d3
initd: implement simple test init daemon 2021-08-12 19:11:26 +02:00
fef
104578d072
sched: add thread management syscalls 2021-08-12 19:05:38 +02:00
fef
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.
2021-08-12 14:34:18 +02:00
fef
8293d9372b
mutex: don't rely on malloc for waitqueue 2021-08-11 22:49:53 +02:00
fef
b7e9187740
main: move kernel start routine to kernel/ 2021-08-10 22:30:11 +02:00
fef
60ec99692c
serial: "fix" buffer truncation bug
DMA just uses one buffer rather than two now lmao
2021-08-10 22:08:44 +02:00
fef
d1805c2f00
dma: make memory allocations atomic 2021-08-10 18:07:55 +02:00
fef
10e8b00fb0
sched: avoid memory allocation for kernel task 2021-08-10 17:49:29 +02:00
fef
4287759c46
mutex_init: remove force inline 2021-08-10 17:48:53 +02:00
fef
d4411fd6b6
mutex: add wait queue and spinlocks 2021-08-10 00:44:36 +02:00
fef
f5590becd3
syscall: add sleep system call 2021-08-09 19:20:40 +02:00
fef
83ee9603e7
file: add file kevent and i/o wait support 2021-08-08 20:58:54 +02:00
fef
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.
2021-08-08 20:48:55 +02:00
fef
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.
2021-08-07 14:30:09 +02:00
fef
e96ee14e68
sched: make sleeping actually work 2021-08-05 18:52:51 +02:00
fef
6d886d7252
syscall: refactor names 2021-08-05 16:15:35 +02:00
fef
6e269e0217
sched: refactor and implement sleep 2021-08-05 16:14:18 +02:00
fef
4359f43b0e
kevent: refactor callback system 2021-08-04 15:46:51 +02:00
fef
203c167822
kevent: add device kevent 2021-08-04 03:29:52 +02:00
fef
f89aa9dc4e
sched: add idle task 2021-08-04 03:25:04 +02:00
fef
e291a51d2f
kevent: add event system 2021-08-03 22:44:28 +02:00
fef
7fa55c8dab
mutex: return -EAGAIN if trylock fails 2021-08-03 00:07:39 +02:00
fef
c36c2182d7
sched: minor refactor 2021-08-01 23:32:12 +02:00
fef
4db1702078
stdio: refactor printk to printf and friends 2021-08-01 18:53:22 +02:00
fef
caefad25a8
build: parameterize serial config macros 2021-08-01 16:51:06 +02:00
fef
d20da423ec
fs: implement file abstraction 2021-08-01 04:22:09 +02:00
fef
3ab358310c
build: ensure all symbols are included 2021-07-31 22:07:38 +02:00
fef
643d3ed251
build: migrate to CMake 2021-07-31 19:39:51 +02:00
fef
fc63785ca6
kent: simplify structure 2021-07-31 15:58:29 +02:00
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!
2021-05-11 14:31:05 +02:00
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!
2021-05-10 16:19:38 +02:00
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.
2021-03-01 16:09:30 +01:00
dca3e716ca
serial: add zero-copy dma i/o api 2021-03-01 16:08:01 +01:00
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
2021-02-28 18:27:43 +01:00
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.
2021-02-28 02:18:39 +01:00
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.
2021-02-28 01:28:07 +01:00
5fa7639ce8
syscall: c syntax do be hard tho 2021-02-27 21:24:26 +01:00
b7abbf1cf7
kent: change param order of kent_init 2021-02-17 15:01:15 +01:00
a658a7c8b3
sched: yes but what if i weren't stupid? 2021-02-17 14:13:19 +01:00
9b1eef8a64
sched: fix accidental double ptr bug 2021-02-17 14:08:43 +01:00
Felix Kopp
c4717d8fce
dma: add abstraction layer for dma 2021-02-03 04:30:46 +01:00
Felix Kopp
256b49b529
device: add base abstraction for all devices 2021-02-03 04:01:27 +01:00
Felix Kopp
56c76d8b4b
sched: use proper UNIX® terminology 2021-02-01 00:07:45 +01:00
Felix Kopp
61ebad5231
fs: actually include read.c in Makefile 2021-01-07 19:11:45 +01:00
Felix Kopp
d60f57f8de
fs: implement read syscall 2021-01-07 19:05:29 +01:00
Felix Kopp
50928211ca
minor fixes and improvements 2021-01-07 19:04:52 +01:00