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

Kernel: Add a kernel boot parameter to force PIO mode

Also added an option in the run script to force PIO operation mode with
the IDE controller.
In addition, we're no longer limited to PIIX3 and PIIX4 chipsets for DMA
This commit is contained in:
supercomputer7 2019-11-13 19:29:16 +02:00 committed by Andreas Kling
parent d76fb99403
commit 4fe2ee0221
5 changed files with 32 additions and 23 deletions

View file

@ -35,8 +35,8 @@ public:
};
public:
static OwnPtr<PATAChannel> create(ChannelType type);
explicit PATAChannel(ChannelType);
static OwnPtr<PATAChannel> create(ChannelType type, bool force_pio);
PATAChannel(ChannelType type, bool force_pio);
virtual ~PATAChannel() override;
RefPtr<PATADiskDevice> master_device() { return m_master; };
@ -46,7 +46,7 @@ private:
//^ IRQHandler
virtual void handle_irq() override;
void initialize();
void initialize(bool force_pio);
void detect_disks();
bool wait_for_irq();
@ -67,6 +67,7 @@ private:
RefPtr<PhysicalPage> m_dma_buffer_page;
u16 m_bus_master_base { 0 };
Lockable<bool> m_dma_enabled;
Lockable<bool> m_force_pio;
RefPtr<PATADiskDevice> m_master;
RefPtr<PATADiskDevice> m_slave;