Commit graph

192 commits

Author SHA1 Message Date
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
fef
e291a51d2f
kevent: add event system 2021-08-03 22:44:28 +02:00
fef
5ffa784b77
arch: make exclusive stores fail after interrupts 2021-08-03 21:19:09 +02:00
fef
1b1e48e54b
printf: simplify address expressions 2021-08-03 21:15:28 +02:00
fef
528785d40e
malloc: track memory usage and clarify docs 2021-08-03 17:35:58 +02:00
fef
711970ae10
README: clarify what architectures are supported 2021-08-03 17:35:08 +02:00
fef
a8295db11b
vscode: update C settings to match CMake 2021-08-03 17:34:13 +02:00
fef
c806c21936
arch: move vector table to separate file 2021-08-03 17:33:35 +02:00
fef
4f9423efbb
arch: declare registers volatile 2021-08-03 14:42:24 +02:00
fef
86c95f3fff
gitignore: ignore hidden files in .vscode 2021-08-03 14:41:58 +02:00
fef
05662bc39e
arch: add fault handlers, rename exceptions 2021-08-03 14:41:36 +02:00
fef
7fa55c8dab
mutex: return -EAGAIN if trylock fails 2021-08-03 00:07:39 +02:00
fef
33439b2e37
debug: add sam3x8e svd file 2021-08-03 00:05:23 +02:00
fef
552688b9a0
atom: fix stupid memory leak 2021-08-02 17:21:56 +02:00
fef
57fb52dc1e
syscall: fix call source detection 2021-08-02 00:37:01 +02:00
fef
aa722fc34f
serial_write_dma: prevent memory leak when busy 2021-08-01 23:51:19 +02:00
fef
7bee3f694b
add config for openocd with atmel-ice 2021-08-01 23:32:59 +02:00
fef
c36c2182d7
sched: minor refactor 2021-08-01 23:32:12 +02:00
fef
5a220eee5d
fix build (once again) 2021-08-01 23:29:04 +02:00
fef
7ef26f26e9
syscall: add config option to check syscall source 2021-08-01 23:28:25 +02:00
fef
930cbc26e1
syscall: i am so stupid it physically hurts 2021-08-01 22:54:59 +02:00
fef
8422ab0d56
debug: add breakpoint macro 2021-08-01 22:53:47 +02:00
fef
0eea347421
build: actually use linker scripts 2021-08-01 22:53:05 +02:00
fef
c81ea7e7fd
printf: don't ignore return value of last write() 2021-08-01 19:04:03 +02:00
fef
4db1702078
stdio: refactor printk to printf and friends 2021-08-01 18:53:22 +02:00
fef
474974b779
startup: rename do_bootstrap to main 2021-08-01 17:19:53 +02:00
fef
5fabe9db3f
vscode: use CMake plugin for IntelliSense 2021-08-01 17:16:16 +02:00
fef
2bb39cf1c5
update readme with new config system 2021-08-01 17:12:03 +02:00