Commit graph

49 commits

Author SHA1 Message Date
fef
65899b35f1
x86: minor page management refactor
Even Uranium-223 ages better than my code
2021-10-13 20:55:35 +02:00
fef
d8e7939093
fix build yet again
(i am too stupid to include all relevant changes
in my commits, mostly due to the fact that my
local diffs are almost always tremendous)
2021-10-13 18:00:22 +02:00
fef
e14bc3ce1e
x86: inline x86_io_wait() 2021-10-12 23:25:11 +02:00
fef
904584ccc0
libc: refactor a couple of string routines
This is just a minor overhaul of several utility
functions, in part because it kept bothering me
and in part because i was bored.
2021-10-12 23:24:17 +02:00
fef
afbb3743d5
refactor type and cdefs headers 2021-10-12 01:31:49 +02:00
fef
e6e3f90d08
libc: oops i forgot yet another one
it's almost 6 AM, i'm tired okay?
2021-10-10 05:44:06 +02:00
fef
3f0e7dd0b5
libc: oops i forgot one 2021-10-10 05:42:44 +02:00
fef
0f9e9f91a6
libc: port FreeBSD string library routines
Oh my fucking god this was by far the most awful
and boring and tedious day in my entire life.

Also, dear FreeBSD people: please don't sue me.
I tried really hard to comply with all the
copyright stuff, but it is absolutely possible i
made a mistake.  Just DM me and i'll do everything
in my power to fix it, even if that means
releasing entire portions of GayBSD under the BSD
license.  I don't care, i just want stuff to work.

(i'm including this message to use it as possible
evidence in case i get sued to show my good will)
2021-10-10 05:41:16 +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
16b6924beb
kmalloc: fix comments affected by auto rename
Just VS Code things
2021-10-04 05:56:11 +02:00
fef
d69fd0d2aa
x86: refactor traps, add register dump support 2021-10-04 05:55:03 +02:00
fef
3e43ec5491
kprintf: minor refactor, fix stupid offset bugs 2021-10-03 18:59:06 +02:00
fef
d475429639
kprintf: implement "full" format sequence support
So this was painful.  kprintf() supports most of
the format specifiers from BSD now, except for the
$ sequence.  It has gotten a general overhaul and
is significantly more sophisticated, bloated and
slower now.  There is also some minor stuff i
forgot about, like the 't' length modifier, but
that isn't so important right now and will be
fixed later(TM).
2021-10-03 04:31:28 +02:00
fef
c31149c6cc
cmake: "fix" compiler stuff
I have no idea if i've made things better or worse
with these changes, but tbh i don't really care.
It didn't compile (with the upcoming changes to
kprintf(), that is) before, it does compile now.
End of story.
2021-10-03 04:21:21 +02:00
fef
9e89be2eab
clion: add project configuration files 2021-10-02 03:22:16 +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
fef
347bb5cc9c
kmalloc: bugfixes and performance improvements 2021-09-30 00:32:07 +02:00
fef
d4ee4e5953
clang: make code submissive and debuggable 2021-09-29 04:54:19 +02:00
fef
5c0fa715a4
kmalloc: add actual memory allocator
Now that memory allocation finally kind of works,
we can finally start focusing on the core system
architecture.  This commit also fixes some bugs in
get_page() and friends, as well as performance
improvements because the page map is addressed as
unsigned longs rather than individual bytes.
2021-09-29 01:10:41 +02:00
fef
f1922723f0
types.h: fix uintptr_t sign 2021-09-28 16:58:43 +02:00
fef
7c4819e5fd
clist: corrupt removed entry pointers if DEBUG 2021-09-28 01:25:19 +02:00
fef
3f73072153
types.h: use rust-style naming scheme, add bools 2021-09-28 01:24:43 +02:00
fef
3e2bf39ff5
x86: remove unnecessary c flag
All i really wanted to do is prevent accidentally
using floats, but the -mgeneral-regs-only option
seemed a little overkill and clang ignored it
anyway, so there is little use for it other than
emitting noisy compile warnings.
2021-09-28 01:23:25 +02:00
fef
8129518640
mm: replace GRUB's GDT with our own 2021-09-28 00:48:19 +02:00
fef
66a1f8726e
add README 2021-09-23 21:00:43 +02:00
fef
3d6258a06e
mm: implement runtime page mapping 2021-09-23 20:51:12 +02:00
fef
17320f2571
boot: enable paging in boot sequence 2021-09-22 03:50:55 +02:00
fef
d436d9b203
mm: add page frame allocator 2021-09-21 18:25:54 +02:00
fef
2a0ed8121a
util: refactor misc utility stuff 2021-09-21 17:34:27 +02:00
fef
623daf58ed
arch: disable cpu extensions
we don't use that in kernel mode to speed up
context switching, and noone needs floats and
such in the kernel anyway.
2021-09-21 03:34:25 +02:00
fef
8fb2f7987c
kprintf: fix vararg bug
Turns out you can't pass a va_list to subroutines
as per the C standard, even though it worked
perfectly fine on ARM.  Well then, the entire
kprintf thing needs to be refactored anyway at
some point in the future, so that more formatting
options are supported.
2021-09-20 18:02:13 +02:00
fef
25e00354ec
x86/boot: move multiboot code to arch 2021-09-20 17:59:15 +02:00
fef
89e7a4eb47
clist: add circular list api 2021-09-20 02:03:01 +02:00
fef
a34fd6caaa
config: include version and git revision 2021-09-19 16:39:05 +02:00
fef
6ac206051a
kernel: add main 2021-09-19 04:58:48 +02:00
fef
4bf2c2505f
boot: display rainbow on boot 2021-09-19 04:50:48 +02:00
fef
2af5fad52f
kernel: add kprintf() api 2021-09-19 04:50:24 +02:00
fef
2bcb3242da
add misc utility headers 2021-09-19 04:48:40 +02:00
fef
dda4dde950
libc: add string operations for libc 2021-09-19 04:48:20 +02:00
fef
70b970e275
x86: forgot data section in linker script 2021-09-19 04:46:35 +02:00
fef
27c516b896
boot: remove framebuffer tag, fix bug
We will only work in raw character mode for now,
it's probably gonna take a *lot* of time until
we have an actual VGA driver qwq
2021-09-19 04:45:32 +02:00
fef
3a8887ad51
vscode: update c config and add settings 2021-09-19 04:15:48 +02:00
fef
8f54584493
boot: use correct align for mb2 header 2021-09-18 16:58:17 +02:00
fef
c7eb58b930
boot: add basic multiboot support
Turns out writing your own bootloader from scratch
is something you probably don't wanna be bothered
with when your main goal is writing an entire
operating system.  Blessed be the souls of the
maniacs who gave us GRUB, and punched be their
faces for writing such inconsistent documentation.
2021-09-18 16:48:46 +02:00
fef
8f2b378f7c
add template config for vs code 2021-09-17 19:50:21 +02:00
fef
55e5ad90f6
fix license url 2021-09-14 21:51:46 +02:00
fef
6c44a66b55
initial commit uwu 2021-09-13 18:51:51 +02:00