mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:47:35 +00:00
Kernel: Remove i686 support
This commit is contained in:
parent
32270dcd20
commit
5ff318cf3a
75 changed files with 142 additions and 895 deletions
|
@ -7,7 +7,7 @@
|
|||
#include <AK/Atomic.h>
|
||||
#include <AK/Checked.h>
|
||||
#include <AK/Try.h>
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
# include <Kernel/Arch/x86/Hypervisor/BochsDisplayConnector.h>
|
||||
#endif
|
||||
#include <Kernel/Bus/PCI/API.h>
|
||||
|
@ -46,7 +46,7 @@ UNMAP_AFTER_INIT ErrorOr<void> BochsGraphicsAdapter::initialize_adapter(PCI::Dev
|
|||
// Note: In non x86-builds, we should never encounter VirtualBox hardware nor Pure Bochs VBE graphics,
|
||||
// so just assume we can use the QEMU BochsVBE-compatible graphics adapter only.
|
||||
auto bar0_space_size = PCI::get_BAR_space_size(pci_device_identifier.address(), PCI::HeaderType0BaseRegister::BAR0);
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
bool virtual_box_hardware = (pci_device_identifier.hardware_id().vendor_id == 0x80ee && pci_device_identifier.hardware_id().device_id == 0xbeef);
|
||||
if (pci_device_identifier.revision_id().value() == 0x0 || virtual_box_hardware) {
|
||||
m_display_connector = BochsDisplayConnector::must_create(PhysicalAddress(PCI::get_BAR0(pci_device_identifier.address()) & 0xfffffff0), bar0_space_size, virtual_box_hardware);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <AK/Singleton.h>
|
||||
#include <Kernel/Arch/Delay.h>
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
# include <Kernel/Arch/x86/Hypervisor/BochsDisplayConnector.h>
|
||||
#endif
|
||||
#include <Kernel/Bus/PCI/API.h>
|
||||
|
@ -44,7 +44,7 @@ UNMAP_AFTER_INIT GraphicsManagement::GraphicsManagement()
|
|||
|
||||
void GraphicsManagement::disable_vga_emulation_access_permanently()
|
||||
{
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
if (!m_vga_arbiter)
|
||||
return;
|
||||
m_vga_arbiter->disable_vga_emulation_access_permanently({});
|
||||
|
@ -53,7 +53,7 @@ void GraphicsManagement::disable_vga_emulation_access_permanently()
|
|||
|
||||
void GraphicsManagement::enable_vga_text_mode_console_cursor()
|
||||
{
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
if (!m_vga_arbiter)
|
||||
return;
|
||||
m_vga_arbiter->enable_vga_text_mode_console_cursor({});
|
||||
|
@ -62,7 +62,7 @@ void GraphicsManagement::enable_vga_text_mode_console_cursor()
|
|||
|
||||
void GraphicsManagement::disable_vga_text_mode_console_cursor()
|
||||
{
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
if (!m_vga_arbiter)
|
||||
return;
|
||||
m_vga_arbiter->disable_vga_text_mode_console_cursor({});
|
||||
|
@ -71,7 +71,7 @@ void GraphicsManagement::disable_vga_text_mode_console_cursor()
|
|||
|
||||
void GraphicsManagement::set_vga_text_mode_cursor([[maybe_unused]] size_t console_width, [[maybe_unused]] size_t x, [[maybe_unused]] size_t y)
|
||||
{
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
if (!m_vga_arbiter)
|
||||
return;
|
||||
m_vga_arbiter->set_vga_text_mode_cursor({}, console_width, x, y);
|
||||
|
@ -195,7 +195,7 @@ UNMAP_AFTER_INIT bool GraphicsManagement::initialize()
|
|||
}
|
||||
}
|
||||
});
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
m_vga_arbiter = VGAIOArbiter::must_create({});
|
||||
#endif
|
||||
|
||||
|
@ -210,7 +210,7 @@ UNMAP_AFTER_INIT bool GraphicsManagement::initialize()
|
|||
// Otherwise we risk using the Bochs VBE driver on a wrong physical address
|
||||
// for the framebuffer.
|
||||
if (PCI::Access::is_hardware_disabled() && !(graphics_subsystem_mode == CommandLine::GraphicsSubsystemMode::Limited && !multiboot_framebuffer_addr.is_null() && multiboot_framebuffer_type == MULTIBOOT_FRAMEBUFFER_TYPE_RGB)) {
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
auto vga_isa_bochs_display_connector = BochsDisplayConnector::try_create_for_vga_isa_connector();
|
||||
if (vga_isa_bochs_display_connector) {
|
||||
dmesgln("Graphics: Using a Bochs ISA VGA compatible adapter");
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <AK/Platform.h>
|
||||
#include <AK/Types.h>
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
# include <Kernel/Arch/x86/VGA/IOArbiter.h>
|
||||
#endif
|
||||
#include <Kernel/Bus/PCI/Definitions.h>
|
||||
|
@ -65,7 +65,7 @@ private:
|
|||
unsigned m_current_minor_number { 0 };
|
||||
|
||||
SpinlockProtected<IntrusiveList<&DisplayConnector::m_list_node>> m_display_connector_nodes { LockRank::None };
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
#if ARCH(X86_64)
|
||||
OwnPtr<VGAIOArbiter> m_vga_arbiter;
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue