Keyboard.h: remove the incorrect use of typedef
PhysicalMemoryManager.cpp:
Map the Bios region as used. This prevents us from allocation the area used by the bios
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)
* Added symbol files to .gitignore
* Improved text in #PG and #GP handlers
* Added the printing of the multiboot structure address and the magic value
* Added page fault screenshot to readme
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.
- Made a special assembly file to put CPU check function in. E.G. functions to get the state of
specific registers
In this case I have created a simple assembly function to get the contents of the CR0 register.
With the help of the c++ preprocessor the value can then be used to check if certains bits are set.
For example to check if the PG (paging) bit is set, indicating that paging is enabled for the
processor.
- 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.
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
Any interrupt thrown for any Intel defined Exception is not only being caught but
displays an appropriate message to the screen.
Changes made in src/kernel/idt/idt.cpp
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