Commit graph

101 commits

Author SHA1 Message Date
fef
e86ef2acbd
fix atomics (finally) 2022-10-12 13:53:46 +02:00
fef
3e35afcfa9
atom: redesign API 2022-10-10 09:30:53 +02:00
fef
4177931774
arch/at91sam3x8e: fix vector_table const decl 2022-09-26 15:36:59 +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
104578d072
sched: add thread management syscalls 2021-08-12 19:05:38 +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
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
fb49965e95
atomic_enter: actually mask interrupts 2021-08-10 17:48:23 +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
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
364290f192
arch: add files i fucking forgot to commit 2021-08-08 20:52:44 +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
c24b183c60
init: fix init array pointer dereference bullshit 2021-08-05 16:29:18 +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
f89aa9dc4e
sched: add idle task 2021-08-04 03:25:04 +02:00
fef
5ffa784b77
arch: make exclusive stores fail after interrupts 2021-08-03 21:19:09 +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
05662bc39e
arch: add fault handlers, rename exceptions 2021-08-03 14:41:36 +02:00
fef
33439b2e37
debug: add sam3x8e svd file 2021-08-03 00:05:23 +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
c36c2182d7
sched: minor refactor 2021-08-01 23:32:12 +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
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
f54a4a0fa9
mutex: use uint8_t instead of int for lock value 2021-08-01 16:48:19 +02:00
fef
9ca76d71ad
mutex: add mutex imlementation 2021-08-01 03:25:28 +02:00
fef
adce3f3ed7
arch/at91sam3x8e: update struct reg_sw_snapshot
With my discovery of how to actually use thumb2
instructions in assembly files, the layout of
register snapshot has changed because they are
now pushed in consecutive order.
2021-08-01 02:25:34 +02:00
fef
c2538b4516
build: parameterize STACK_SIZE in linker script 2021-08-01 01:26:16 +02:00
fef
8f424d49e8
asm: refactor to use thumb2 instructions 2021-08-01 01:16:13 +02:00
fef
a78a8ba59b
atom: reimplement in pure assembly 2021-08-01 00:11:13 +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
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
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