mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 11:39:43 +00:00
Kernel: Ensure that we don't use a hard-disabled IRQController
This commit is contained in:
parent
893d4a41c2
commit
c2c0e9fb04
Notes:
sideshowbarker
2024-07-19 08:09:32 +09:00
Author: https://github.com/supercomputer7
Commit: c2c0e9fb04
Pull-request: https://github.com/SerenityOS/serenity/pull/1361
Reviewed-by: https://github.com/awesomekling
2 changed files with 6 additions and 6 deletions
|
@ -245,6 +245,7 @@ int IOAPIC::find_redirection_entry_by_vector(u8 vector) const
|
|||
void IOAPIC::disable(u8 interrupt_vector)
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
ASSERT(!is_hard_disabled());
|
||||
int index = find_redirection_entry_by_vector(interrupt_vector);
|
||||
if (index == (-1)) {
|
||||
map_interrupt_redirection(interrupt_vector);
|
||||
|
@ -257,6 +258,7 @@ void IOAPIC::disable(u8 interrupt_vector)
|
|||
void IOAPIC::enable(u8 interrupt_vector)
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
ASSERT(!is_hard_disabled());
|
||||
int index = find_redirection_entry_by_vector(interrupt_vector);
|
||||
if (index == (-1)) {
|
||||
map_interrupt_redirection(interrupt_vector);
|
||||
|
@ -269,6 +271,7 @@ void IOAPIC::enable(u8 interrupt_vector)
|
|||
void IOAPIC::eoi(u8) const
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
ASSERT(!is_hard_disabled());
|
||||
APIC::eoi();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue