1-- Copyright 2018, Data61, CSIRO 2-- 3-- This software may be distributed and modified according to the terms of 4-- the GNU General Public License version 2. Note that NO WARRANTY is provided. 5-- See "LICENSE_GPLv2.txt" for details. 6-- 7-- @TAG(DATA61_GPL) 8 9-- This module defines the machine-specific interrupt handling routines. 10 11{-# LANGUAGE CPP #-} 12 13module SEL4.Object.Interrupt.RISCV64 where 14 15import Prelude hiding (Word) 16import SEL4.Machine 17import SEL4.Model 18import SEL4.Object.Structures 19import SEL4.API.Failures 20import SEL4.API.Types 21import SEL4.API.InvocationLabels 22import SEL4.API.Invocation.RISCV64 as ArchInv 23import SEL4.API.InvocationLabels.RISCV64 as ArchLabels 24import {-# SOURCE #-} SEL4.Object.CNode 25import {-# SOURCE #-} SEL4.Kernel.CSpace 26import {-# SOURCE #-} SEL4.Object.Interrupt 27import qualified SEL4.Machine.Hardware.RISCV64 as Arch 28 29-- at this time, interrupts don't really exist on the target platform 30decodeIRQControlInvocation :: Word -> [Word] -> PPtr CTE -> [Capability] -> 31 KernelF SyscallError ArchInv.IRQControlInvocation 32decodeIRQControlInvocation label args srcSlot extraCaps = 33 throw IllegalOperation 34 35performIRQControl :: ArchInv.IRQControlInvocation -> KernelP () 36performIRQControl = error "Unreachable due to no IRQControl decode on this arch." 37 38handleReservedIRQ :: IRQ -> Kernel () 39handleReservedIRQ _ = return () 40 41initInterruptController :: Kernel () 42initInterruptController = error "Unimplemented. Init code." 43 44checkIRQ :: Word -> KernelF SyscallError () 45checkIRQ irq = throw IllegalOperation 46