1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

Kernel: Implement generic VGA device using multiboot info

This implements a very basic VGA device using the information provided
to us by the bootloader in the multiboot header. This allows Serenity to
boot to the desktop on basically any halfway modern system.
This commit is contained in:
Conrad Pankoff 2019-08-18 14:54:52 +10:00 committed by Andreas Kling
parent 23b6ef29dd
commit b957c61e6f
5 changed files with 148 additions and 4 deletions

View file

@ -17,6 +17,7 @@
#include <Kernel/Devices/FullDevice.h>
#include <Kernel/Devices/KeyboardDevice.h>
#include <Kernel/Devices/MBRPartitionTable.h>
#include <Kernel/Devices/MBVGADevice.h>
#include <Kernel/Devices/NullDevice.h>
#include <Kernel/Devices/PATAChannel.h>
#include <Kernel/Devices/PS2MouseDevice.h>
@ -229,7 +230,16 @@ extern "C" [[noreturn]] void init()
);
});
new BXVGADevice;
if (multiboot_info_ptr->framebuffer_type == 1) {
new MBVGADevice(
PhysicalAddress((u32)(multiboot_info_ptr->framebuffer_addr)),
multiboot_info_ptr->framebuffer_pitch,
multiboot_info_ptr->framebuffer_width,
multiboot_info_ptr->framebuffer_height
);
} else {
new BXVGADevice;
}
auto e1000 = E1000NetworkAdapter::autodetect();