kern: implement SvcCreateInterruptEvent

This commit is contained in:
Michael Scire authored and SciresM committed 2020-07-31 14:50:52 -07:00
1 parent b35380a942
commit 04f325cf5a
8 files changed
+239 -8

No files matched your search

@@ -213,7 +213,7 @@ namespace ams::kern::arch::arm64 {
this->gicc->eoir = irq;
}
bool IsInterruptDefined(s32 irq) {
bool IsInterruptDefined(s32 irq) const {
const s32 num_interrupts = std::min(32 + 32 * (this->gicd->typer & 0x1F), static_cast<u32>(NumInterrupts));
return (0 <= irq && irq < num_interrupts);
}
@@ -67,10 +67,18 @@ namespace ams::kern::arch::arm64 {
NOINLINE void Initialize(s32 core_id);
NOINLINE void Finalize(s32 core_id);
bool IsInterruptDefined(s32 irq) {
bool IsInterruptDefined(s32 irq) const {
return this->interrupt_controller.IsInterruptDefined(irq);
}
bool IsGlobal(s32 irq) const {
return this->interrupt_controller.IsGlobal(irq);
}
bool IsLocal(s32 irq) const {
return this->interrupt_controller.IsLocal(irq);
}
NOINLINE Result BindHandler(KInterruptHandler *handler, s32 irq, s32 core_id, s32 priority, bool manual_clear, bool level);
NOINLINE Result UnbindHandler(s32 irq, s32 core);