2020-01-17 19:27:04 +01:00
|
|
|
-- SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
|
|
|
let Genode = env:DHALL_GENODE
|
|
|
|
|
2020-01-23 18:15:32 +01:00
|
|
|
let Prelude = Genode.Prelude
|
|
|
|
|
|
|
|
let RomMap = Prelude.Map.Type Text Genode.Boot.Rom
|
|
|
|
|
|
|
|
let Args = { config : Genode.Init.Type, rom : RomMap } : Type
|
2020-01-17 19:27:04 +01:00
|
|
|
|
|
|
|
in λ(args : Args)
|
|
|
|
→ { arch = let Arch = < x86_32 | x86_64 > in Arch.x86_64
|
|
|
|
, config =
|
|
|
|
Genode.Init::{
|
|
|
|
, verbose = True
|
|
|
|
, defaultRoutes =
|
|
|
|
Genode.Init.default.defaultRoutes
|
|
|
|
# [ Genode.ServiceRoute.parent "IO_MEM"
|
|
|
|
, Genode.ServiceRoute.parent "IO_PORT"
|
|
|
|
, Genode.ServiceRoute.parent "IRQ"
|
|
|
|
, Genode.ServiceRoute.child "Timer" "timer"
|
|
|
|
]
|
|
|
|
, children =
|
|
|
|
[ { mapKey = "timer"
|
|
|
|
, mapValue =
|
|
|
|
Genode.Init.Start::{
|
|
|
|
, binary = "nova_timer_drv"
|
|
|
|
, resources = { caps = 96, ram = Genode.units.MiB 1 }
|
|
|
|
, provides = [ "Timer" ]
|
|
|
|
}
|
|
|
|
}
|
2020-01-22 12:48:10 +01:00
|
|
|
, { mapKey = "harness"
|
|
|
|
, mapValue =
|
|
|
|
let child = Genode.Init.toStart args.config
|
|
|
|
|
|
|
|
in Genode.Init.Start::{
|
|
|
|
, binary = "sotest-harness"
|
|
|
|
, exitPropagate = True
|
|
|
|
, resources =
|
|
|
|
{ caps = child.resources.caps + 128
|
|
|
|
, ram = child.resources.ram + Genode.units.MiB 1
|
|
|
|
}
|
|
|
|
, config =
|
|
|
|
Some
|
|
|
|
( Genode.Prelude.XML.element
|
|
|
|
{ name = "config"
|
|
|
|
, attributes =
|
|
|
|
Genode.Prelude.XML.emptyAttributes
|
|
|
|
, content =
|
|
|
|
[ Genode.Init.Start.toXML "init" child ]
|
|
|
|
}
|
|
|
|
)
|
|
|
|
, routes =
|
|
|
|
[ Genode.ServiceRoute.parentLabel
|
|
|
|
"LOG"
|
|
|
|
(Some "SOTEST")
|
|
|
|
(Some "platform")
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2020-01-17 19:27:04 +01:00
|
|
|
]
|
|
|
|
}
|
|
|
|
, rom =
|
2020-01-25 00:17:33 +01:00
|
|
|
let manifest = env:MANIFEST
|
2020-01-22 12:48:10 +01:00
|
|
|
|
2020-01-23 18:15:32 +01:00
|
|
|
in Genode.Boot.toRomPaths
|
|
|
|
[ { mapKey = "ld.lib.so"
|
2020-01-25 00:17:33 +01:00
|
|
|
, mapValue = manifest.base-nova.lib.ld-nova.mapValue
|
2020-01-23 18:15:32 +01:00
|
|
|
}
|
2020-01-25 00:17:33 +01:00
|
|
|
, manifest.base-nova.bin.nova_timer_drv
|
|
|
|
, manifest.os.bin.init
|
|
|
|
, manifest.sotest-producer.bin.sotest-harness
|
2020-01-23 18:15:32 +01:00
|
|
|
]
|
2020-01-22 12:48:10 +01:00
|
|
|
# args.rom
|
2020-01-17 19:27:04 +01:00
|
|
|
}
|