mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
Kernel: Create BXVGA device if found in the PCI bus
This commit is contained in:
parent
4d44a3bdfe
commit
9bb4a6ecf6
Notes:
sideshowbarker
2024-07-19 07:45:59 +09:00
Author: https://github.com/supercomputer7
Commit: 9bb4a6ecf6
Pull-request: https://github.com/SerenityOS/serenity/pull/1720
Issue: https://github.com/SerenityOS/serenity/issues/1719
1 changed files with 17 additions and 7 deletions
|
@ -169,14 +169,24 @@ 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 {
|
} else {
|
||||||
if (multiboot_info_ptr->framebuffer_type == 1 || multiboot_info_ptr->framebuffer_type == 2) {
|
bool bxvga_found = false;
|
||||||
new MBVGADevice(
|
PCI::enumerate_all([&](const PCI::Address&, PCI::ID id) {
|
||||||
PhysicalAddress((u32)(multiboot_info_ptr->framebuffer_addr)),
|
if (id.vendor_id == 0x1234 && id.device_id == 0x1111)
|
||||||
multiboot_info_ptr->framebuffer_pitch,
|
bxvga_found = true;
|
||||||
multiboot_info_ptr->framebuffer_width,
|
});
|
||||||
multiboot_info_ptr->framebuffer_height);
|
|
||||||
} else {
|
if (bxvga_found) {
|
||||||
new BXVGADevice;
|
new BXVGADevice;
|
||||||
|
} else {
|
||||||
|
if (multiboot_info_ptr->framebuffer_type == 1 || multiboot_info_ptr->framebuffer_type == 2) {
|
||||||
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue