Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thor: I/O APIC IRQs don't start off masked #450

Open
64 opened this issue May 16, 2022 · 5 comments
Open

thor: I/O APIC IRQs don't start off masked #450

64 opened this issue May 16, 2022 · 5 comments

Comments

@64
Copy link
Member

64 commented May 16, 2022

This causes some spurious unacknowledged IRQs on my PC.

We should start IRQs masked here:

_chip->_storeRegister(kIoApicInts + _index * 2 + 1,
static_cast<uint32_t>(pin_word2::destination(0)));
_chip->_storeRegister(kIoApicInts + _index * 2,
static_cast<uint32_t>(pin_word1::vector(_vector)
| pin_word1::deliveryMode(0) | pin_word1::levelTriggered(_levelTriggered)
| pin_word1::activeLow(_activeLow)));

Then the driver responsible can unmask it when it's ready. For PCI devices, it makes sense to do this in enableIrq(), but for non-PCI devices I'm not sure.

@circutrider21
Copy link

I thought limine left all IRQs masked, since afaik, it's in the stivale spec. Were you using multiboot by any chance?

@qookei
Copy link
Member

qookei commented Jul 17, 2022

Were you using multiboot by any chance?

We use multiboot 1/2.

@circutrider21
Copy link

Ahh, that explains it then

@ArsenArsen
Copy link
Member

isn't stivale gone anyway

@qookei
Copy link
Member

qookei commented Oct 7, 2023

Then the driver responsible can unmask it when it's ready. For PCI devices, it makes sense to do this in enableIrq(), but for non-PCI devices I'm not sure.

Once we get around to reporting all devices via the HW protocol, it could be done in the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants