1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

Kernel: Move Kernel mapping to 0xc0000000

The kernel is now no longer identity mapped to the bottom 8MiB of
memory, and is now mapped at the higher address of `0xc0000000`.

The lower ~1MiB of memory (from GRUB's mmap), however is still
identity mapped to provide an easy way for the kernel to get
physical pages for things such as DMA etc. These could later be
mapped to the higher address too, as I'm not too sure how to
go about doing this elegantly without a lot of address subtractions.
This commit is contained in:
Jesse Buhagiar 2019-11-21 16:08:11 +11:00 committed by Andreas Kling
parent 61ba19f031
commit bd33c66273
13 changed files with 132 additions and 64 deletions

View file

@ -1,10 +1,10 @@
#include "VirtualConsole.h"
#include "IO.h"
#include "StdLib.h"
#include <Kernel/Heap/kmalloc.h>
#include <AK/String.h>
#include <Kernel/Arch/i386/CPU.h>
#include <Kernel/Devices/KeyboardDevice.h>
#include <Kernel/Heap/kmalloc.h>
static u8* s_vga_buffer;
static VirtualConsole* s_consoles[6];
@ -32,7 +32,7 @@ void VirtualConsole::flush_vga_cursor()
void VirtualConsole::initialize()
{
s_vga_buffer = (u8*)0xb8000;
s_vga_buffer = (u8*)(kernel_virtual_base + 0xb8000);
memset(s_consoles, 0, sizeof(s_consoles));
s_active_console = -1;
}