]> git.dujemihanovic.xyz Git - nameless-os.git/log
nameless-os.git
2 years agoUse `git describe --long` as revision number 0.1.0
Duje Mihanović [Sun, 8 May 2022 13:44:13 +0000 (15:44 +0200)]
Use `git describe --long` as revision number

2 years agoFix interrupt trap gates
Duje Mihanović [Sun, 8 May 2022 12:47:14 +0000 (14:47 +0200)]
Fix interrupt trap gates

Until now the code would set the most significant bit in the type part
of the IDT descriptor for trap gates as a result of my error, causing a
triple fault when trying to handle a double fault. A less significant, but still
noteworthy change is that the double fault handler has been slightly revamped to
print out :( on a red background and no longer spits out a warning because I
accidentally wrote a string there, not a char.

2 years agoRemove unneeded "informational" strings from stage3
Duje Mihanović [Sun, 8 May 2022 12:40:49 +0000 (14:40 +0200)]
Remove unneeded "informational" strings from stage3

2 years agoDelete the old bootloader
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.

2 years agoAdd installer script
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.

2 years agoRefactor Makefile, linker script, properly set up stack
Duje Mihanović [Sat, 7 May 2022 14:11:19 +0000 (16:11 +0200)]
Refactor Makefile, linker script, properly set up stack

2 years agoAlign all sections in kernel binary to page size
Duje Mihanović [Fri, 6 May 2022 18:31:25 +0000 (20:31 +0200)]
Align all sections in kernel binary to page size

2 years agoRehaul the memory map
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

2 years agoFAT32 bootloader boots the kernel
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.

2 years agoSeparate loading clusters and cluster chains
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.

2 years agoFixes and improvements to FAT32 driver
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.

2 years agoWIP: Add new FAT32 bootloader
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.

2 years agoRemove unused protected-mode print routine
Duje Mihanović [Sun, 20 Mar 2022 13:51:56 +0000 (14:51 +0100)]
Remove unused protected-mode print routine

2 years agoSlim down print.s
Duje Mihanović [Sun, 20 Mar 2022 11:43:11 +0000 (12:43 +0100)]
Slim down print.s

2 years agoFix keyboard interrupts
Duje Mihanović [Sat, 12 Mar 2022 12:28:35 +0000 (13:28 +0100)]
Fix keyboard interrupts

3 years agoSimplify Makefile
Duje Mihanović [Sun, 17 Oct 2021 11:19:52 +0000 (13:19 +0200)]
Simplify Makefile

3 years agoHandle interrupts
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.

3 years agoMore features in VGA driver
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.

3 years agoAlso compile kernel as ELF for easier disassembly
Duje Mihanović [Thu, 16 Sep 2021 14:48:26 +0000 (16:48 +0200)]
Also compile kernel as ELF for easier disassembly

3 years agoEnable A20 gate
Duje Mihanović [Thu, 16 Sep 2021 14:41:24 +0000 (16:41 +0200)]
Enable A20 gate

3 years agoRestructure the bootloader
Duje Mihanović [Thu, 9 Sep 2021 09:13:53 +0000 (11:13 +0200)]
Restructure the bootloader

3 years agokprint can accept a const string
Duje Mihanović [Thu, 9 Sep 2021 08:27:18 +0000 (10:27 +0200)]
kprint can accept a const string

3 years agoBetter gitignore and tidier string
Duje Mihanović [Wed, 8 Sep 2021 08:43:37 +0000 (10:43 +0200)]
Better gitignore and tidier string

3 years agoEnable generation of debug symbols for C source files
Duje Mihanović [Wed, 8 Sep 2021 08:04:10 +0000 (10:04 +0200)]
Enable generation of debug symbols for C source files

3 years agoAdd linker script and partial VGA driver
Duje Mihanović [Tue, 7 Sep 2021 20:05:14 +0000 (22:05 +0200)]
Add linker script and partial VGA driver

3 years agoDocument the code
Duje Mihanović [Tue, 7 Sep 2021 18:33:39 +0000 (20:33 +0200)]
Document the code

3 years agoA new beginning
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.

3 years agoAllow controlling (no) newline when printing and listen to keystrokes
Duje Mihanović [Sat, 21 Aug 2021 15:06:36 +0000 (17:06 +0200)]
Allow controlling (no) newline when printing and listen to keystrokes

3 years agoAdd Makefile
Duje Mihanović [Sat, 21 Aug 2021 11:00:34 +0000 (13:00 +0200)]
Add Makefile

Can compile, clean and run the boot sector.

3 years agoAdd print function with some examples
Duje Mihanović [Sat, 21 Aug 2021 10:56:47 +0000 (12:56 +0200)]
Add print function with some examples

3 years agoCan now print hexadecimal numbers
Duje Mihanović [Sat, 21 Aug 2021 10:00:08 +0000 (12:00 +0200)]
Can now print hexadecimal numbers

3 years agoAdd basic bootsector
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.