aarch64 haskell: simplify checkIRQ
We are on an Arm board, where <= maxIRQ implies != irqInvalid, so use original ARM version. Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
This commit is contained in:
parent
103d7cfa12
commit
92745f3e5b
|
@ -81,7 +81,8 @@ maskIrqSignal _ = return ()
|
|||
initInterruptController :: Kernel ()
|
||||
initInterruptController = error "Unimplemented. Init code."
|
||||
|
||||
-- This check takes a different form on architectures where the invalid IRQ is
|
||||
-- in the [minIRQ,maxIRQ] range. On Arm platforms, irqInvalid is outside
|
||||
-- that range, hence the rangeCheck implicitly checks for irqInvalid
|
||||
checkIRQ :: Word -> KernelF SyscallError ()
|
||||
checkIRQ irqW = when (irqW > fromIntegral (fromEnum maxIRQ) ||
|
||||
irqW == fromIntegral (fromEnum irqInvalid)) $
|
||||
throw $ RangeError 1 (fromIntegral (fromEnum maxIRQ))
|
||||
checkIRQ irq = rangeCheck irq (fromEnum minIRQ) (fromEnum maxIRQ)
|
||||
|
|
Loading…
Reference in New Issue