Commit graph

26 commits

Author SHA1 Message Date
fef
f8a85a1541
happy new year 2022 uwu
May it be slightly less exhausting than 2021.
2022-01-01 03:49:33 +01:00
fef
56767c59ed
x86/ktrace: improve traceability 2021-12-31 00:02:00 +01:00
fef
c6c92ac39f
x86/trap: fix trap frame layout 2021-11-22 20:01:26 +01:00
fef
2e32e299d2
mm: rewrite slab allocator
This is the final part of the major mm subsystem
refactor (for now).  The new and improved slab
allocator can do *proper* poisoning, with pretty
accurate out-of-bounds and use-after-free
detection.
vm_page_t has also been restructured; its flags
and order are now combined into one atomic field.
2021-11-22 04:23:31 +01:00
fef
36d53093d4
ktrace: don't unwind past ISR entry points 2021-11-21 20:02:20 +01:00
fef
7f92690f84
panic: print stack trace when panicking 2021-11-21 06:57:24 +01:00
fef
5a5135f416
update license terms
As of now, everything except the code imported
from FreeBSD is proprietary.  Of course, it won't
be like this for long, only until we have decided
which license we like to use.  The rationale is
that releasing everything under a copyleft license
later is always easier than doing so immediately
and then changing it afterwards.
Naturally, any changes made before this commit are
still subject to the terms of the CNPL.
2021-11-15 19:23:22 +01:00
fef
52ac282ac8
x86: move common setup checks to shared file
This should also kind of fix the build.
I don't know whether that's actually the case
because i haven't tried tho lmao.
2021-11-15 17:50:00 +01:00
fef
24ae60225f
amd64: add base 64-bit support files
This has been brewing for quite some time now, and
it still is nowhere near finished, but at least it
compiles now.  A lot has changed, and it's still
quite messy (i386 is almost certainly broken now,
i haven't even checked)
2021-11-12 06:13:10 +01:00
fef
14630c86bf
x86: remove unnecessary standalone port functions 2021-11-09 22:14:20 +01:00
fef
03f31df67f
x86: better separation for i386 specific code
That's it, nothing major is gonna happen anymore
until i get amd64 support working and deprecate
the entire i386 branch.  32-bit just adds so many
extra complications to memory management that i
don't want to waste any more energy on this
platform which is obsolete anyway.
2021-11-09 20:25:10 +01:00
fef
24c6e9504d
add kernel panic utility
This also includes some minor rearrangements in
terms of which header files define what.
2021-10-31 02:00:10 +02:00
fef
c36b03d97c
mutex: avoid wait queue lock if possible
This also tidies up the atomic operations a little
and adds a new atom_cmp_xchg() as well as the same
APIs for longs and pointers.
2021-10-28 17:01:13 +02:00
fef
45ab27e738
x86/atom: add pause in spin loops 2021-10-21 22:12:37 +02:00
fef
d464135ff4
x86: prevent IRQs from firing during init 2021-10-21 22:02:35 +02:00
fef
3fee893f21
x86: begin preparations for amd64 support
This is a huge commit, but it mainly just moves
some files around and doesn't change their
contents much.
A lot of stuff works the same on amd64 as it does
on i386, so i'm moving the parts that are specific
to the latter into separate subdirectories while
the rest can be shared with the amd64 codebase.
2021-10-21 05:27:42 +02:00
fef
4e770a6e58
x86/port: add delay wrappers for x86_io_wait() 2021-10-21 04:39:29 +02:00
fef
6865864444
x86/atom: use neg instead of not/inc
The x86 apparently has a dedicated instruction for
finding the 2's complement.
2021-10-16 21:30:13 +02:00
fef
ea89961ed2
x86/atom: use correct names in asm, improve docs 2021-10-16 18:39:03 +02:00
fef
582758e868
x86: add atomic primitives 2021-10-16 03:27:53 +02:00
fef
b2fccf1ecd
sched: add base for scheduling and task switching 2021-10-15 00:01:47 +02:00
fef
4679b7cee5
x86: add irq support 2021-10-07 19:16:21 +02:00
fef
89f3393b8b
x86: move page fault handler to where it belongs 2021-10-05 01:09:13 +02:00
fef
bc917d8651
x86: inline I/O port functions 2021-10-04 05:56:44 +02:00
fef
d69fd0d2aa
x86: refactor traps, add register dump support 2021-10-04 05:55:03 +02:00
fef
613c28a965
x86: add basic interrupt support
This commit also fixes the fun little size bug in
segment.S where i subtracted the end from the
start address of the GDT instead of the other way
round which resulted in a gigantic overflow :)
2021-10-02 00:08:54 +02:00