111 lines
3.9 KiB
Plaintext
111 lines
3.9 KiB
Plaintext
|
-- SPDX-License-Identifier: CC0-1.0
|
||
|
|
||
|
let drivers = env:drivers ? ../compositions/pc-drivers.dhall
|
||
|
|
||
|
let Genode = env:DHALL_GENODE
|
||
|
|
||
|
let Init = Genode.Init
|
||
|
|
||
|
let Child = Init.Child
|
||
|
|
||
|
let Resources = Init.Resources
|
||
|
|
||
|
let ServiceRoute = Init.ServiceRoute
|
||
|
|
||
|
let parentRomRoute =
|
||
|
λ(from : Text)
|
||
|
→ λ(to : Text)
|
||
|
→ ServiceRoute.parentLabel "ROM" (Some from) (Some to)
|
||
|
|
||
|
let childRomRoute =
|
||
|
λ(child : Text)
|
||
|
→ λ(from : Text)
|
||
|
→ ServiceRoute.childLabel "ROM" child (Some from) (None Text)
|
||
|
|
||
|
in Init::{
|
||
|
, verbose = True
|
||
|
, children =
|
||
|
toMap
|
||
|
{ report_rom =
|
||
|
Child.flat
|
||
|
Child.Attributes::{
|
||
|
, binary = "report_rom"
|
||
|
, provides = [ "ROM", "Report" ]
|
||
|
, config =
|
||
|
Init.Config::{
|
||
|
, attributes = toMap { verbose = "yes" }
|
||
|
, content =
|
||
|
[ Genode.Prelude.XML.text
|
||
|
''
|
||
|
<policy label="test-driver_manager -> block_devices" report="drivers -> block_devices"/>
|
||
|
''
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
, drivers =
|
||
|
Init.toChild
|
||
|
drivers
|
||
|
Init.Attributes::{
|
||
|
, provides = [ "Block", "Framebuffer", "Input" ]
|
||
|
, resources = Init.Resources::{ ram = Genode.units.MiB 4 }
|
||
|
, routes =
|
||
|
[ parentRomRoute
|
||
|
"managed/input_filter"
|
||
|
"input_filter.config"
|
||
|
, parentRomRoute " numlock_remap" "numlock_remap.config"
|
||
|
, childRomRoute "dynamic_rom" "capslock"
|
||
|
, childRomRoute "dynamic_rom" "numlock"
|
||
|
, childRomRoute "dynamic_rom" "system"
|
||
|
, ServiceRoute.child "Report" "report_rom"
|
||
|
, ServiceRoute.parent "Timer"
|
||
|
, Genode.Init.ServiceRoute.parent "IRQ"
|
||
|
, Genode.Init.ServiceRoute.parent "IO_MEM"
|
||
|
, Genode.Init.ServiceRoute.parent "IO_PORT"
|
||
|
]
|
||
|
}
|
||
|
, dynamic_rom =
|
||
|
Child.flat
|
||
|
Child.Attributes::{
|
||
|
, binary = "dynamic_rom"
|
||
|
, resources = Resources::{ ram = Genode.units.MiB 4 }
|
||
|
, provides = [ "ROM" ]
|
||
|
, config =
|
||
|
Genode.Init.Config::{
|
||
|
, content =
|
||
|
[ Genode.Prelude.XML.text
|
||
|
''
|
||
|
<rom name="system">
|
||
|
<inline>
|
||
|
<system state=""/>
|
||
|
</inline>
|
||
|
<sleep milliseconds="10000"/>
|
||
|
</rom>
|
||
|
''
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
, test-driver_manager =
|
||
|
Child.flat
|
||
|
Child.Attributes::{
|
||
|
, binary = "test-driver_manager"
|
||
|
, config =
|
||
|
Init.Config::{
|
||
|
, content =
|
||
|
[ Genode.Prelude.XML.text
|
||
|
''
|
||
|
<check_ahci_block_device label="ahci-1" block_count="65536" block_size="512" model="QEMU HARDDISK"/>
|
||
|
<check_input/>
|
||
|
<check_framebuffer/>
|
||
|
''
|
||
|
]
|
||
|
}
|
||
|
, routes =
|
||
|
[ childRomRoute "report_rom" "block_devices"
|
||
|
, ServiceRoute.child "Block" "drivers"
|
||
|
, ServiceRoute.child "Framebuffer" "drivers"
|
||
|
, ServiceRoute.child "Input" "drivers"
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
}
|