summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Duje Mihanović [Sun, 8 May 2022 12:40:49 +0000 (14:40 +0200)]
Remove unneeded "informational" strings from stage3
Duje Mihanović [Sun, 8 May 2022 11:28:47 +0000 (13:28 +0200)]
Delete the old bootloader
The new FAT32 bootloader has reached feature parity with the old bootloader (can
actually load the kernel). The new bootloader also brings some nice improvements
over the old bootloader such as loading the kernel at 1MB (fixing the potential
issue that when the kernel grows large enough it will overwrite the EBDA and
upper RAM before it ever happened) and automatically adapting to the kernel
size, and as such I believe that there is no reason to keep the old bootloader
in the source tree.
Duje Mihanović [Sun, 8 May 2022 11:23:58 +0000 (13:23 +0200)]
Add installer script
This script installs the OS to a real disk drive.
Duje Mihanović [Sat, 7 May 2022 14:11:19 +0000 (16:11 +0200)]
Refactor Makefile, linker script, properly set up stack
Duje Mihanović [Fri, 6 May 2022 18:31:25 +0000 (20:31 +0200)]
Align all sections in kernel binary to page size
Duje Mihanović [Fri, 6 May 2022 17:33:45 +0000 (19:33 +0200)]
Rehaul the memory map
This was done when I realized that not enough space is allocated to load
clusters. The current map is as follows (all numbers in hex):
* 600-800: MBR
* ee00-fe00: stack
* fe00-10000: VBR
* 800-1800: temporary FAT sector
* 10000-18000: temporary cluster
* 1800-fe00: LOADER.BIN
Duje Mihanović [Fri, 6 May 2022 16:46:48 +0000 (18:46 +0200)]
FAT32 bootloader boots the kernel
Also did a fair share of refactoring in the makefiles.
Duje Mihanović [Sat, 30 Apr 2022 20:23:40 +0000 (22:23 +0200)]
Separate loading clusters and cluster chains
This will be crucial for stage 3 loading the kernel, because we will need to
relocate each cluster to 0x100000 (or somewhere after that) manually, and we
can't just do that in the driver as it's also used by the VBR which does not run
in unreal mode.
Duje Mihanović [Sat, 30 Apr 2022 14:35:18 +0000 (16:35 +0200)]
Fixes and improvements to FAT32 driver
* Fix issue where multiple clusters would be loaded 0x800 apart rather than
contiguously.
* Get rid of some global variables, saving space.
* si points to the start LBA address rather than the partition table entry,
saving a bit of space as we no longer need to use offsets.
* In read_cluster_chain, drop push/popad as they in fact do not
save the upper 16 bytes of the registers. Instead, just push
and pops the registers that are used.
Duje Mihanović [Wed, 27 Apr 2022 15:47:44 +0000 (17:47 +0200)]
WIP: Add new FAT32 bootloader
Loads a LOADER.BIN which currently prints a hello message.
TODO: Make it actually load the kernel.
Duje Mihanović [Sun, 20 Mar 2022 13:51:56 +0000 (14:51 +0100)]
Remove unused protected-mode print routine
Duje Mihanović [Sun, 20 Mar 2022 11:43:11 +0000 (12:43 +0100)]
Slim down print.s
Duje Mihanović [Sat, 12 Mar 2022 12:28:35 +0000 (13:28 +0100)]
Fix keyboard interrupts
Duje Mihanović [Sun, 17 Oct 2021 11:19:52 +0000 (13:19 +0200)]
Simplify Makefile
Duje Mihanović [Wed, 22 Sep 2021 20:15:40 +0000 (22:15 +0200)]
Handle interrupts
Currently handles exception 8 and IRQ 1. EXC8 is double fault, and IRQ1 is
keyboard. EXC8 handler puts out a ':(' on the top left corner of the screen and
halts the machine, while IRQ1 puts out a string on the screen. However, it will
only do so once, and I have yet to figure out why.
Duje Mihanović [Thu, 16 Sep 2021 17:38:34 +0000 (19:38 +0200)]
More features in VGA driver
Now supports color (specify color when using kprint) and moves the VGA cursor as
it prints.
Duje Mihanović [Thu, 16 Sep 2021 14:48:26 +0000 (16:48 +0200)]
Also compile kernel as ELF for easier disassembly
Duje Mihanović [Thu, 16 Sep 2021 14:41:24 +0000 (16:41 +0200)]
Enable A20 gate
Duje Mihanović [Thu, 9 Sep 2021 09:13:53 +0000 (11:13 +0200)]
Restructure the bootloader
Duje Mihanović [Thu, 9 Sep 2021 08:27:18 +0000 (10:27 +0200)]
kprint can accept a const string
Duje Mihanović [Wed, 8 Sep 2021 08:43:37 +0000 (10:43 +0200)]
Better gitignore and tidier string
Duje Mihanović [Wed, 8 Sep 2021 08:04:10 +0000 (10:04 +0200)]
Enable generation of debug symbols for C source files
Duje Mihanović [Tue, 7 Sep 2021 20:05:14 +0000 (22:05 +0200)]
Add linker script and partial VGA driver
Duje Mihanović [Tue, 7 Sep 2021 18:33:39 +0000 (20:33 +0200)]
Document the code
Duje Mihanović [Tue, 7 Sep 2021 09:25:40 +0000 (11:25 +0200)]
A new beginning
This boots into protected mode, prints a string from assembly and then prints an
A from a minimal C kernel.
Duje Mihanović [Sat, 21 Aug 2021 15:06:36 +0000 (17:06 +0200)]
Allow controlling (no) newline when printing and listen to keystrokes
Duje Mihanović [Sat, 21 Aug 2021 11:00:34 +0000 (13:00 +0200)]
Add Makefile
Can compile, clean and run the boot sector.
Duje Mihanović [Sat, 21 Aug 2021 10:56:47 +0000 (12:56 +0200)]
Add print function with some examples
Duje Mihanović [Sat, 21 Aug 2021 10:00:08 +0000 (12:00 +0200)]
Can now print hexadecimal numbers
Duje Mihanović [Fri, 20 Aug 2021 14:46:08 +0000 (16:46 +0200)]
Add basic bootsector
It prints out "Gotta start somewhere". Tested on QEMU and even on real hardware
with success.