浏览代码

Revert "Kernel/AHCI: Add a boot argument to force AHCI to operate on IRQ 11"

This reverts commit cfc2f33dcba18e2afaeeba6c6158269cb9abea30.

We can't actually change the IRQ line value and expect the device
to work with it (this was my mistake).
That register is R/W so the firmware can figure out IRQ routing and put
the correct value and write it to the Interrupt line register.
Liav A 4 年之前
父节点
当前提交
b25f84daaa
共有 3 个文件被更改,包括 0 次插入13 次删除
  1. 0 5
      Kernel/CommandLine.cpp
  2. 0 1
      Kernel/CommandLine.h
  3. 0 7
      Kernel/Storage/AHCIController.cpp

+ 0 - 5
Kernel/CommandLine.cpp

@@ -113,11 +113,6 @@ UNMAP_AFTER_INIT bool CommandLine::is_mmio_enabled() const
     return lookup("pci_mmio").value_or("off") == "on";
     return lookup("pci_mmio").value_or("off") == "on";
 }
 }
 
 
-UNMAP_AFTER_INIT bool CommandLine::is_forcing_irq_11_for_ahci() const
-{
-    return lookup("force_ahci_irq_11").value_or("off") == "on";
-}
-
 UNMAP_AFTER_INIT bool CommandLine::is_legacy_time_enabled() const
 UNMAP_AFTER_INIT bool CommandLine::is_legacy_time_enabled() const
 {
 {
     return lookup("time").value_or("modern") == "legacy";
     return lookup("time").value_or("modern") == "legacy";

+ 0 - 1
Kernel/CommandLine.h

@@ -73,7 +73,6 @@ public:
     [[nodiscard]] bool is_vmmouse_enabled() const;
     [[nodiscard]] bool is_vmmouse_enabled() const;
     [[nodiscard]] bool is_mmio_enabled() const;
     [[nodiscard]] bool is_mmio_enabled() const;
     [[nodiscard]] bool is_legacy_time_enabled() const;
     [[nodiscard]] bool is_legacy_time_enabled() const;
-    [[nodiscard]] bool is_forcing_irq_11_for_ahci() const;
     [[nodiscard]] bool is_text_mode() const;
     [[nodiscard]] bool is_text_mode() const;
     [[nodiscard]] bool is_force_pio() const;
     [[nodiscard]] bool is_force_pio() const;
     [[nodiscard]] AcpiFeatureLevel acpi_feature_level() const;
     [[nodiscard]] AcpiFeatureLevel acpi_feature_level() const;

+ 0 - 7
Kernel/Storage/AHCIController.cpp

@@ -172,13 +172,6 @@ void AHCIController::initialize()
     hba().control_regs.ghc = 0x80000000; // Ensure that HBA knows we are AHCI aware.
     hba().control_regs.ghc = 0x80000000; // Ensure that HBA knows we are AHCI aware.
     PCI::enable_interrupt_line(pci_address());
     PCI::enable_interrupt_line(pci_address());
     PCI::enable_bus_mastering(pci_address());
     PCI::enable_bus_mastering(pci_address());
-
-    // FIXME: This is a hack for VMWare (and possibly other hardware) that set
-    // the IRQ line to 7 or other weird value. Find a better way to set this
-    // with balancing IRQ sharing in mind.
-    if (kernel_command_line().is_forcing_irq_11_for_ahci())
-        PCI::set_interrupt_line(pci_address(), 11);
-
     enable_global_interrupts();
     enable_global_interrupts();
     m_handlers.append(AHCIPortHandler::create(*this, PCI::get_interrupt_line(pci_address()),
     m_handlers.append(AHCIPortHandler::create(*this, PCI::get_interrupt_line(pci_address()),
         AHCI::MaskedBitField((volatile u32&)(hba().control_regs.pi))));
         AHCI::MaskedBitField((volatile u32&)(hba().control_regs.pi))));