The kernel resides in the higher half, and as of now still identity maps the lower half for compatibility. Will not merge back to master until all the previous features work properly in virtual memory..
Makefile now has VGA=2 to set the QEMU monitor to STDOUT. Nice for
things like memory dumps.
Can now parse the memory and create a bitmap of workable regions.
Allocation soon(tm)
Printf now has long (64-bit), char, and % literal support. I haven't written
anything specific for shorts yet but if you cast it to an int on the way
in, it'll work anyway, so whatever.
Default output variable holds a generic writer, and any output that
isn't really sure where to output to can just output there. Set by the
system early in boot.
Also made some changes to the makefile to support arguments in the "make
run" or "make debug" subset of calls. For now, it's just VGA=1/0 or
SERIAL=1/0 to enable/disable VGA/serial. Defaults are VGA=1, SERIAL=0.
Instead of passing function pointers, we're passing structs with context
now. The idea is the same, I/O functions require some struct with a
function pointer and some generic memory that only the output device
cares about. I/O just calls it.
VGA has been reworked to accomodate this change, as well as default
outputs being created for low-overhead use (such as interrupt handlers).
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.
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.
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.
- 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.
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.