Commit Graph

26 Commits

Author SHA1 Message Date
5051b8903c Divided the kernel into seperate distinct phases
The first stage after GRUB will be Pre-Kernel. This stage will organize the
information we receive from the bootloader. (in our case that will be grub)

The second stage is for now called early_main. The program will at this
point already be running in virtual higher-half / higher-quarter address space.
The goal of the second stage is to set up the kernel in such a way that we are
ready to jump in to usermode.

The third stage is for now called kernel_main. This stage will jump us into
usermode and load the startup programs.

- Added a GRUB entry for tests
- Started writing the pre-kernel stage
- Removed knowledge of multiboot from early_main
- Edited the linkerscript to link variables in pre-kernel to
	lower address space. ( from 1MB and up)
2022-08-22 21:16:34 +02:00
0f0fc9f252 Adding a skeleton for the memory management code
Moved the PMM away from being object orientated as it is just plain annoying
renamed src folder to source
Set timeout to 5 seconds in the grub config
2022-08-21 21:18:53 +02:00
e70f56a005 Improving the memory mapping boot code
Removed the need to map the extra MBI structure in as a seperate pagetable
Renaming / Restructuring the memory folder
2022-08-21 21:15:15 +02:00
d280aa0584 Page faults and protetion faults will now hang with a helpful message
to explain what is going on.

I removed previously set barriers from the code to load
the kernel further.
2022-08-19 00:44:52 +02:00
7d6c823d79 Basic Launch of Higher half kernel
We now can launch the kernel at 0xC0000000 (or 3 GiB mark) with paging enabled.
A lot of early main is currently not executed to keep debugging as simple as possible
during the initial testing of higher half kernel loading.

A lot of the implementation is straight from wiki.osdev.org/Higher_Half_x86_Bare_Bones. Thanks to all the folks
who keep that wiki updated, its really resourceful.
2022-08-18 01:26:49 +02:00
bbfea39c23 Fixing include paths for new structure
Removed non-sensical libc folder from project
2022-08-17 14:57:50 +02:00
23c68d9863 Setup paging function signatures... Ready to be implemented. 2022-03-18 22:09:04 +01:00
b4cff3e667 Basic block allocation for physical memory allocation.
- 1 block = 4096 bytes : because this will make page fault handling possibly
somewhat easier

- 1 byte in the bitmap = 8 blocks of physical memory

unsure if the allocation is perfect ... guess i'll find out some day if this is actually correct.

The bitmap needs 16kb to keep track of 2gb of physical memory. Seems a decent percentage to me.
2022-02-26 20:55:34 +01:00
97606dbf71 Clean up of debugging logs and new commands.
As this project grows it becomes important to keep things properly organised.
In this commit I've put some effort into making the kernel.cpp file more consise and thus improve its
readability.
Certain parts of the code have gotten their own definition file where before it
was only a header file.

- Moving the Supervisor Terminal into its own definition file.
- Subtracting debugging messages with preprocessor ifdef's
- Time and Date is now not just a header but has its own proper definition file
- Banner is displayed when booting up
- Terminal has a couple new commands

	Commmand		Description
	=================|||||===================================================
	DATE (was TIME)		Displays the curren time, date and ticks
	VERSION			Displays system version information
	MEMORY			Displays memory information
2021-12-29 16:15:18 +01:00
0d8ef065e0 Interactive supervisor mode
To ease the pain of debuggin I can now interact with the system through a
very simplistic terminal. Hopefully things can be tested more easily by activating
the piece through a simple command. The max characters for a command is 10.

To achieve this I have had to make the following changes.
- Changed IRQ to update a global status variable
- Added a standalone keyboard driver with getKey functions
- Changed the main kernel loop to display a prompt
- Added a strncmp function to the clib/string file
2021-12-28 19:52:48 +01:00
88cc1d75bb Re-enabled interrupts from keyboard, Enabled and configured the PIT to throw interrupts at a regular interval 2021-12-20 21:53:57 +01:00
ba043ef31b Small improvements on Makefile, TODO.md has been renamed to features.md 2021-11-22 20:01:12 +01:00
3a87b74224 Renaming/Moving stuff into a different file structure 2021-11-16 13:57:15 +01:00
32909aaed9 GDT is running again 2021-11-06 21:56:42 +01:00
5fb55367ca Implementation of simplistic physical memory manager 2021-11-06 16:27:13 +01:00
d79fc6e8e2 Split up boot.s into multiple assembly definitions, Started page frame allocator implementation, kterm definition is now considered c plus plus 2021-11-06 14:05:29 +01:00
bdcf9e66f8 Small adjustment in directory structure of memory and bootloader files in kernel 2021-11-02 21:15:00 +01:00
c9b789ed7b Added a bunch of new stuff no time to figure out what's what, No longer any compiler warnings 2021-11-02 21:03:11 +01:00
092c5d520d Added option to create an iso 2021-10-23 12:26:15 +01:00
643f2d708b Added emulator options, Added header for VBE driver, Added CPUID function, Added demodisk.img as drive 2021-07-22 22:14:58 +01:00
f2c8b8ac5c Improved multiboot compliance 2021-07-22 20:02:47 +01:00
592db0ebcf More work on interrupt handling, Started timer interrupt implementation, PIC remapped hopefully successfull 2021-05-16 15:53:14 +01:00
nigel
28ac6a05af Interrupts are working.. processor no longer resets 2021-05-12 20:43:15 -04:00
5e668f5e67 Basics for an proper GDT and IDT 2021-05-12 23:03:00 +01:00
b41f6a380e Implemented serial for basic debugging, Added MMU enable to kernel main 2021-05-10 21:33:25 +01:00
nigel
b44f6761f1 New directory structure 2021-05-02 15:23:50 -04:00