1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:57:45 +00:00

Kernel/Graphics: Move x86-specific support for VGA to Arch/x86 directory

The new VGAIOArbiter class is now responsible to conduct x86-specific
instructions to control VGA hardware from the old ISA ports. This allows
us to ensure the GraphicsManagement code doesn't use x86-specific code,
thus allowing it to be compiled within non-x86 kernel builds.
This commit is contained in:
Liav A 2022-09-23 11:06:14 +03:00 committed by Linus Groh
parent 8b9c056c5a
commit 48f3d762af
5 changed files with 154 additions and 30 deletions

View file

@ -7,7 +7,11 @@
#pragma once
#include <AK/NonnullOwnPtr.h>
#include <AK/Platform.h>
#include <AK/Types.h>
#if ARCH(I386) || ARCH(X86_64)
# include <Kernel/Arch/x86/VGA/IOArbiter.h>
#endif
#include <Kernel/Bus/PCI/Definitions.h>
#include <Kernel/Graphics/Console/Console.h>
#include <Kernel/Graphics/DisplayConnector.h>
@ -61,9 +65,9 @@ private:
unsigned m_current_minor_number { 0 };
SpinlockProtected<IntrusiveList<&DisplayConnector::m_list_node>> m_display_connector_nodes { LockRank::None };
RecursiveSpinlock m_main_vga_lock { LockRank::None };
bool m_vga_access_is_disabled { false };
#if ARCH(I386) || ARCH(X86_64)
OwnPtr<VGAIOArbiter> m_vga_arbiter;
#endif
};
}