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:
parent
e9f6508ada
commit
731fc5a7c8
16 changed files with 298 additions and 114 deletions
25
Kernel/BochsVGADevice.h
Normal file
25
Kernel/BochsVGADevice.h
Normal 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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue