2 * Jailhouse, a Linux-based partitioning hypervisor
4 * Copyright (c) ARM Limited, 2014
7 * Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
16 static irq_handler_t irq_handler = (irq_handler_t)NULL;
17 static __attribute__((aligned(0x1000))) u32 irq_stack[1024];
19 /* Replaces the weak reference in header.S */
25 irqn = gic_read_ack();
32 } while (irqn != 0x3ff);
35 void gic_setup(irq_handler_t handler)
38 irq_handler = handler;
40 asm volatile (".arch_extension virt\n");
41 asm volatile ("msr SP_irq, %0\n" : : "r" (irq_stack));
42 asm volatile ("cpsie i\n");
45 void gic_enable_irq(unsigned int irq)