mirror of
https://github.com/RGBCube/serenity
synced 2025-07-08 17:47:35 +00:00
Kernel: Clear pending interrupts before enabling IRQs of IDE Channel
Calling detect_disks() can generate interrupts, so we must clear it to allow proper function when booting with kernel argument smp=on.
This commit is contained in:
parent
f2faf11d61
commit
865aade42b
2 changed files with 10 additions and 0 deletions
|
@ -142,9 +142,17 @@ IDEChannel::IDEChannel(const IDEController& controller, IOAddressGroup io_group,
|
|||
|
||||
initialize(force_pio);
|
||||
detect_disks();
|
||||
|
||||
// Note: calling to detect_disks could generate an interrupt, clear it if that's the case
|
||||
clear_pending_interrupts();
|
||||
enable_irq();
|
||||
}
|
||||
|
||||
void IDEChannel::clear_pending_interrupts() const
|
||||
{
|
||||
m_io_group.io_base().offset(ATA_REG_STATUS).in<u8>();
|
||||
}
|
||||
|
||||
IDEChannel::~IDEChannel()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue