mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:27:45 +00:00
Kernel: Move bar0_space_size declaration out of arch-specific ifdefs
This change allows this file to be built for aarch64.
This commit is contained in:
parent
97f1fa7d8f
commit
f661f1a674
1 changed files with 1 additions and 1 deletions
|
@ -45,9 +45,9 @@ 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,
|
// 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.
|
// 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(I386) || ARCH(X86_64)
|
||||||
bool virtual_box_hardware = (pci_device_identifier.hardware_id().vendor_id == 0x80ee && pci_device_identifier.hardware_id().device_id == 0xbeef);
|
bool virtual_box_hardware = (pci_device_identifier.hardware_id().vendor_id == 0x80ee && pci_device_identifier.hardware_id().device_id == 0xbeef);
|
||||||
auto bar0_space_size = PCI::get_BAR_space_size(pci_device_identifier.address(), PCI::HeaderType0BaseRegister::BAR0);
|
|
||||||
if (pci_device_identifier.revision_id().value() == 0x0 || virtual_box_hardware) {
|
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);
|
m_display_connector = BochsDisplayConnector::must_create(PhysicalAddress(PCI::get_BAR0(pci_device_identifier.address()) & 0xfffffff0), bar0_space_size, virtual_box_hardware);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue