Commit graph

27 commits

Author SHA1 Message Date
4899877cec Changed I/O to be more generic.
instead of stuffing all of the i/o stuff into the "kio" library, i've
decided to rework i/o to be a generic handler that takes in a function
pointer for putc, and does the rest of the logic onto that pointer.
That way, you can pass any function that can take in characters and move
them to buffers.
I'll do a writeup on this at some point to document it.
2025-06-29 01:13:43 -04:00
55d5823bde Added tons of documentation
Still need to document a lot of functions, but I cleaned up and
explained a lot of the code via comments.
2025-06-28 02:11:09 -04:00
4c76d5647a Fixed interrupt handler bug
Table was wrong. Oops. Pointer math got me.
2025-06-28 01:35:35 -04:00
561c7f9fa7 Loaded IDT!
Many code changes, many undocumented. Documentation and cleanup is next.

Fixed a lot of bugs related to IDT structure. Changed the IDT paradigm
to be dynamically written isntead of statically to account for nobits on
that section.
Also added a gdb remote debugger automatic script, for simplicity in
debugging.
2025-06-28 00:14:42 -04:00
fbef354410 Small IDT work, gotta go hiking lol 2025-06-17 20:13:09 -04:00
8c51b7010e Interrupt Descriptors implemented
Now just need to populate the IDT, then debug the whole thing.
2025-06-16 22:40:02 -04:00
623b9e339f Removing the tables header. Moving its contents to table headers. 2025-06-16 00:52:05 -04:00
d32c1fab63 dude PLEASE i dont want to implement ISRs dude PLEASEEEEE
I did set up all of the stuff around it tho. Gotta implement some
handlers.
2025-06-12 01:19:59 -04:00
3b2503a187 Updated the readme for better usage. 2025-06-11 00:39:51 -04:00
978fd36490 Definitely plan on using more assembly for... assorted assembly related
tasks, so I'm doing some housekeeping.

gdt structure and related pointers go to gdt.structure.
multiboot magic numbers go into multiboot.s.
main code routine goes to start.s for bootstrapping C.
2025-06-11 00:27:15 -04:00
8fadee6baf They're calling him "mr has a working custom GDT"
...
...
...I'm sorry they don't call me that.
2025-06-10 23:58:28 -04:00
b127a659bb This underwent some crazy scope creep. Just one more feature...
- Changed primary assembler to NASM. Specifically so I could use -
- Swapped start.s to intel syntax. I find it prettier. Learned a lot
  doing it tbh.
- Changed the name of the multiboot structures in C.
2025-06-10 23:41:51 -04:00
d97ec36f8c Half-baked commit, but i added a struct type for the tss and allocated
some memory for it in bss. Also put some space in for the gdt in rodata.
Need to leave now, so this broken build goes to the repo!
2025-06-10 09:17:21 -04:00
295e622fe1 Moved the kernel to the 1MB boundary in the linker script. Also did some
stuff with ccls for language server stuff.
2025-06-09 18:27:55 -04:00
745cf9045c Moved multiboot structs to kmultiboot.h 2025-06-08 22:44:17 -04:00
8734cd4da6 Added some functions, did some reorganizing.
kttools.h/c is a lib for converting types (only currently contains
i_to_str).

Also added a printf for i/o.
2025-06-08 16:18:06 -04:00
e8a6c514ad kernel tools split into kio (for i/o) and kttools (kernel type tools).
in general, kernel libraries will be marked with "k" in the beginning.
2025-06-08 01:27:41 -04:00
f39627ec51 Forgot to commit some gitignore changes, here. 2025-06-07 18:08:37 -04:00
5efb8d9fbc Moved i/o content to kerno.c
Added function for integer -> string (library pending)
Modified makefile to reflect use of include/ dir
2025-05-28 23:19:50 -04:00
5dd086565f Forgot to link libgcc. oops. That'll do. 2025-05-26 23:25:30 -04:00
7500299684 Refactoring of makefiles is here. Looks like a bit less of a mess,
thankfully.

Also now using `ld` and `as` instead of `gcc` for everything. Seems to
work OK for now - but may bite on the ass later. We'll see!
2025-05-26 22:42:41 -04:00
6423dc4610 Makefile is getting a little messy, i'll rework it later, probably.
Anyway, now:
make iso -> creates iso with bootloader
make run_iso -> runs iso in qemu
make run -> runs kernel without bootloader or img creation
2025-05-26 17:59:56 -04:00
6f0b585bfe Quick addition to the makefile, run_iso will build the ISO image and
then run the full image. As opposed to run, which will just run the
kernel from QEMU.
2025-05-26 17:46:55 -04:00
0831fb86e4 Added some framework to create a bootable ISO with grub as the
bootloader. Eventually the bootloader will be a submodule of this dir -
but for now GRUB works for boot.
2025-05-26 17:42:00 -04:00
1de036ad09 Updated readme. 2025-05-23 01:24:17 -04:00
aa4f5f070b First content commit. Added sample code hello world with personal
comments for study

Also made a makefile that can build and run the thing. Current run
method is directly from QEMU - but the makefile will later make an image
with a given bootloader.
2025-05-23 01:18:12 -04:00
4a25828031 Initial commit 2025-05-21 19:22:01 +00:00