Commit graph

219 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
f293c6661e
enable debug features by default if DEBUG is on 2022-10-10 08:20:34 +02:00
fef
4177931774
arch/at91sam3x8e: fix vector_table const decl 2022-09-26 15:36:59 +02:00
fef
e80a6cb630
update placeholder name in comment 2022-09-26 13:06:19 +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
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.
2022-09-26 12:59:37 +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
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.
2021-08-12 16:31:59 +02:00
fef
2ea850cead
init: use correct mm init function name 2021-08-12 14:35:06 +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
040b5af5d6
malloc: poison heap when DEBUG is defined 2021-08-11 23:12:10 +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
75d2fb4470
vscode: fix debug config file location 2021-08-10 22:09:40 +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
fb49965e95
atomic_enter: actually mask interrupts 2021-08-10 17:48:23 +02:00
fef
279397167a
config: set CONFIG_SERIAL_BAUD min to 1200 2021-08-10 13:29:56 +02:00
fef
1bc2448c91
arch: move build related files to subdirectory 2021-08-10 00:55:03 +02:00
fef
d4411fd6b6
mutex: add wait queue and spinlocks 2021-08-10 00:44:36 +02:00
fef
faa99622df
malloc: check for underflow in blk_slice 2021-08-09 23:06:50 +02:00
fef
1d30394cec
sched: add idle task entry i forgot to commit 2021-08-09 22:51:35 +02:00
fef
c79fadaf06
sched: set PendSV priority, fix _leave routine 2021-08-09 19:26:49 +02:00
fef
f5590becd3
syscall: add sleep system call 2021-08-09 19:20:40 +02:00
fef
02ed1b5779
malloc: mask flags for neighbor offset 2021-08-09 19:18:26 +02:00
fef
f85006f224
malloc: remove obsolete assert statements
A relict of debugging on my host.
2021-08-09 04:05:07 +02:00
fef
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.
2021-08-09 04:03:54 +02:00
fef
83ee9603e7
file: add file kevent and i/o wait support 2021-08-08 20:58:54 +02:00
fef
364290f192
arch: add files i fucking forgot to commit 2021-08-08 20:52:44 +02:00
fef
59db5471ed
malloc: rewrite with atomic support 2021-08-08 20:49:42 +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
b122e54ec8
handle_fault: fix hex stringification algo 2021-08-05 20:50:45 +02:00
fef
e96ee14e68
sched: make sleeping actually work 2021-08-05 18:52:51 +02:00
fef
b4046795c8
list: fix shit 2021-08-05 17:11:54 +02:00
fef
c24b183c60
init: fix init array pointer dereference bullshit 2021-08-05 16:29:18 +02:00
fef
6287cb79be
stdint.h: now even less POSIX-noncompliant! 2021-08-05 16:16:16 +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
0e6d0057a8
arch: call init and preinit array 2021-08-05 16:08:09 +02:00
fef
4359f43b0e
kevent: refactor callback system 2021-08-04 15:46:51 +02:00
fef
30404f60d4
kevent: initialize kevents during boot 2021-08-04 03:31:21 +02:00
fef
b053cc3279
list: fix list_for_each_entry_safe 2021-08-04 03:30:29 +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