diff --git a/src/system/kernel/arch/arm64/Jamfile b/src/system/kernel/arch/arm64/Jamfile index ce924d38dc..fd739be6f1 100644 --- a/src/system/kernel/arch/arm64/Jamfile +++ b/src/system/kernel/arch/arm64/Jamfile @@ -23,7 +23,7 @@ KernelMergeObject kernel_arch_arm64.o : arch_real_time_clock.cpp arch_platform.cpp arch_asm.S - + arch_int_gicv2.cpp soc.cpp VMSAv8TranslationMap.cpp diff --git a/src/system/kernel/arch/arm64/arch_int.cpp b/src/system/kernel/arch/arm64/arch_int.cpp index 20b718ac4c..7d8fab405b 100644 --- a/src/system/kernel/arch/arm64/arch_int.cpp +++ b/src/system/kernel/arch/arm64/arch_int.cpp @@ -24,6 +24,7 @@ #include #include "soc.h" +#include "arch_int_gicv2.h" #define TRACE_ARCH_INT #ifdef TRACE_ARCH_INT @@ -36,12 +37,18 @@ void arch_int_enable_io_interrupt(int irq) { + InterruptController *ic = InterruptController::Get(); + if (ic != NULL) + ic->EnableInterrupt(irq); } void arch_int_disable_io_interrupt(int irq) { + InterruptController *ic = InterruptController::Get(); + if (ic != NULL) + ic->DisableInterrupt(irq); } @@ -64,6 +71,16 @@ arch_int_init(kernel_args *args) status_t arch_int_init_post_vm(kernel_args *args) { + InterruptController *ic = NULL; + if (strcmp(args->arch_args.interrupt_controller.kind, INTC_KIND_GICV2) == 0) { + ic = new(std::nothrow) GICv2InterruptController( + args->arch_args.interrupt_controller.regs1.start, + args->arch_args.interrupt_controller.regs2.start); + } + + if (ic == NULL) + return B_ERROR; + return B_OK; }