Skip to content
Snippets Groups Projects
Commit 6e6e4713 authored by Gao Xin's avatar Gao Xin Committed by Gerwin Klein
Browse files

noInitFailure replaces liftE

parent 51222516
No related branches found
No related tags found
No related merge requests found
......@@ -408,24 +408,24 @@ The "mapKernelFrame" helper function is used when mapping the globals frame, ker
> frameSize <- return $ if (isAligned start (pageBitsForSize ARMSection))
> && isAligned end (pageBitsForSize ARMSection)
> then ARMSection else ARMSmallPage
> slotBefore <- gets initSlotPosCur
> slotBefore <- noInitFailure $ gets initSlotPosCur
> (flip mapM_) [start, (start + (bit (pageBitsForSize frameSize))) .. (end - 1)]
> (\f -> do
> frameCap <- createITFrameCap (ptrFromPAddr f) 0 Nothing (frameSize == ARMSection)
> provideCap rootCNodeCap frameCap)
> slotAfter <- gets initSlotPosCur
> slotAfter <- noInitFailure $ gets initSlotPosCur
> let biDeviceRegion = BIDeviceRegion {
> bidrBasePAddr = start,
> bidrFrameSizeBits = fromIntegral $ pageBitsForSize frameSize,
> bidrFrameCaps = SlotRegion (slotBefore, slotAfter) }
> devRegions <- gets (bifDeviceRegions . initBootInfo)
> devRegions <- noInitFailure $ gets (bifDeviceRegions . initBootInfo)
> let devRegions' = devRegions ++ [biDeviceRegion]
> bootInfo <- gets (initBootInfo)
> bootInfo <- noInitFailure $ gets (initBootInfo)
> let bootInfo' = bootInfo { bifDeviceRegions = devRegions' }
> noInitFailure $ modify (\st -> st { initBootInfo = bootInfo' })
> --syncBIFrame
> )
> bInfo <- gets (initBootInfo)
> bInfo <- noInitFailure $ gets (initBootInfo)
> let bInfo' = bInfo { bifNumDeviceRegions = (fromIntegral . length . bifDeviceRegions) bInfo }
> noInitFailure $ modify (\st -> st { initBootInfo = bInfo' })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment