mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +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:
parent
23b6ef29dd
commit
b957c61e6f
Notes:
sideshowbarker
2024-07-19 12:37:31 +09:00
Author: https://github.com/deoxxa
Commit: b957c61e6f
Pull-request: https://github.com/SerenityOS/serenity/pull/464
5 changed files with 148 additions and 4 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue