1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:27:34 +00:00

Kernel: Much improved BochsVGA (BXVGA) support.

Instead of cowboy-calling the VESA BIOS in the bootloader, find the emulator
VGA adapter by scanning the PCI bus. Then set up the desired video mode by
sending device commands.
This commit is contained in:
Andreas Kling 2019-02-06 10:17:26 +01:00
parent e9f6508ada
commit 731fc5a7c8
16 changed files with 298 additions and 114 deletions

25
Kernel/BochsVGADevice.h Normal file
View file

@ -0,0 +1,25 @@
#pragma once
#include <AK/Types.h>
#include <AK/AKString.h>
#include <Kernel/types.h>
// FIXME: This should be a BlockDevice once we have BlockDevice.
class BochsVGADevice {
AK_MAKE_ETERNAL
public:
static BochsVGADevice& the();
static void initialize_statics();
BochsVGADevice();
PhysicalAddress framebuffer_address() const { return m_framebuffer_address; }
void set_resolution(int width, int height);
private:
void set_register(word index, word value);
dword find_framebuffer_address();
PhysicalAddress m_framebuffer_address;
};