1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 17:35:08 +00:00

Kernel: Create BXVGA device if found in the PCI bus

This commit is contained in:
Liav A 2020-04-09 23:57:20 +03:00 committed by Andreas Kling
parent 4d44a3bdfe
commit 9bb4a6ecf6

View file

@ -168,6 +168,15 @@ void init_stage2()
if (kernel_command_line().contains("text_debug")) { if (kernel_command_line().contains("text_debug")) {
dbg() << "Text mode enabled"; dbg() << "Text mode enabled";
} else {
bool bxvga_found = false;
PCI::enumerate_all([&](const PCI::Address&, PCI::ID id) {
if (id.vendor_id == 0x1234 && id.device_id == 0x1111)
bxvga_found = true;
});
if (bxvga_found) {
new BXVGADevice;
} else { } else {
if (multiboot_info_ptr->framebuffer_type == 1 || multiboot_info_ptr->framebuffer_type == 2) { if (multiboot_info_ptr->framebuffer_type == 1 || multiboot_info_ptr->framebuffer_type == 2) {
new MBVGADevice( new MBVGADevice(
@ -179,6 +188,7 @@ void init_stage2()
new BXVGADevice; new BXVGADevice;
} }
} }
}
LoopbackAdapter::the(); LoopbackAdapter::the();