2
0
Fork 0
genodepkgs/tests/pci.dhall

106 lines
3.7 KiB
Plaintext

-- SPDX-License-Identifier: CC0-1.0
let Genode = env:DHALL_GENODE
let XML = Genode.Prelude.XML
let Init = Genode.Init
let Child = Init.Child
let Resources = Init.Resources
let ServiceRoute = Init.ServiceRoute
in { config =
Init::{
, verbose = True
, children =
toMap
{ test-pci =
Child.flat
Child.Attributes::{
, binary = "test-pci"
, exitPropagate = True
, resources = Resources::{ ram = Genode.units.MiB 3 }
, routes = [ ServiceRoute.child "Platform" "platform_drv" ]
}
, acpi_report_rom =
Child.flat
Child.Attributes::{
, binary = "report_rom"
, provides = [ "ROM", "Report" ]
, config =
Init.Config::{
, content =
[ XML.text
''
<policy label="smbios_decoder -> smbios_table" report="acpi_drv -> smbios_table"/>
<policy label="platform_drv -> acpi" report="acpi_drv -> acpi"/>
''
]
}
}
, acpi_drv =
Child.flat
Child.Attributes::{
, binary = "acpi_drv"
, resources =
Resources::{
, caps = 400
, ram = Genode.units.MiB 4
, constrainPhys = True
}
, provides = [ "Platform", "Acpi" ]
, routes =
[ ServiceRoute.child "Report" "acpi_report_rom"
, ServiceRoute.parent "IRQ"
, ServiceRoute.parent "IO_MEM"
, ServiceRoute.parent "IO_PORT"
]
}
, platform_drv =
Child.flat
Child.Attributes::{
, binary = "platform_drv"
, resources =
Resources::{
, caps = 800
, ram = Genode.units.MiB 4
, constrainPhys = True
}
, provides = [ "Platform", "Acpi" ]
, routes =
[ ServiceRoute.parent "Timer"
, ServiceRoute.parent "IRQ"
, ServiceRoute.parent "IO_MEM"
, ServiceRoute.parent "IO_PORT"
, ServiceRoute.childLabel
"ROM"
"acpi_report_rom"
(Some "acpi")
(None Text)
]
, config =
Init.Config::{
, content =
[ XML.text
''
<policy label_prefix="test-pci"> <pci class="ALL"/> </policy>
''
]
}
}
}
}
, rom =
let manifest = env:MANIFEST
in Genode.Boot.toRomPaths
[ manifest.drivers.bin.acpi_drv
, manifest.drivers.bin.platform_drv
, manifest.os.bin.report_rom
, manifest.genode-tests.bin.test-pci
]
}