Skip to content

Commit 8165b3b

Browse files
committed
fix: panic if entry not found
1 parent 4edced7 commit 8165b3b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/platform/x86_pc/ioapic.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ namespace x86
106106
}
107107
}
108108

109+
[[noreturn]] static void ioapic_panic(uint32_t entry) {
110+
printf("Entry: %u\n", entry);
111+
assert(0 && "Could not match I/O APIC to entry");
112+
std::abort();
113+
}
114+
109115
inline IOapic& get_ioapic_for(uint32_t entry)
110116
{
111117
uint32_t current = 0;
@@ -115,8 +121,7 @@ namespace x86
115121
}
116122
current += a.entries();
117123
}
118-
printf("Entry: %u\n", entry);
119-
assert(0 && "Could not match I/O APIC to entry");
124+
ioapic_panic(entry);
120125
}
121126

122127
void IOAPIC::enable(uint8_t cpu, const ACPI::override_t& redir)

0 commit comments

Comments
 (0)