-- SPDX-License-Identifier: CC0-1.0 let Genode = env:DHALL_GENODE let Prelude = Genode.Prelude let XML = Prelude.XML let Init = Genode.Init let Child = Init.Child let Resources = Init.Resources let ServiceRoute = Init.ServiceRoute let reportRomRoute = λ(service : Text) → λ(label : Text) → ServiceRoute.childLabel service "report_rom" (Some label) (None Text) let reportRomReport = reportRomRoute "Report" let reportRomROM = reportRomRoute "ROM" let drivers = Init::{ , services = [ ServiceRoute.child "Framebuffer" "dynamic" , ServiceRoute.child "Block" "dynamic" , ServiceRoute.child "Usb" "usb_drv" , ServiceRoute.child "Platform" "platform_drv" , ServiceRoute.child "Input" "input_filter" , ServiceRoute.child "Rtc" "rtc" ] , children = toMap { rtc = Child.flat Child.Attributes::{ , binary = "rtc_drv" , provides = [ "Rtc" ] , routes = [ ServiceRoute.parent "IO_PORT" , ServiceRoute.parent "IO_MEM" ] } , report_rom = Child.flat Child.Attributes::{ , binary = "report_rom" , resources = Resources::{ ram = Genode.units.MiB 2 } , provides = [ "ROM", "Report" ] , config = Init.Config::{ , content = [ XML.text '' '' ] } } , rom_reporter = Child.flat Child.Attributes::{ , binary = "rom_reporter" , config = Init.Config::{ , content = [ XML.text '' '' ] } , routes = let routeReportToParent = λ(label : Text) → ServiceRoute.parentLabel "Report" (Some label) (Some label) in [ reportRomROM "acpi" , reportRomROM "pci_devices" , reportRomROM "usb_devices" , routeReportToParent "acpi" , routeReportToParent "pci_devices" , routeReportToParent "usb_devices" ] } , acpi_drv = Child.flat Child.Attributes::{ , binary = "acpi_drv" , priority = 1 , resources = Resources::{ caps = 350, ram = Genode.units.MiB 4 } , routes = [ ServiceRoute.parent "IO_MEM" , reportRomReport "acpi" , ServiceRoute.parentLabel "Report" (Some "smbios_table") (Some "smbios_table") ] } , platform_drv = Child.flat Child.Attributes::{ , binary = "platform_drv" , resources = Resources::{ , caps = 400 , ram = Genode.units.MiB 4 , constrainPhys = True } , provides = [ "Acpi", "Platform" ] , routes = [ ServiceRoute.parent "IRQ" , ServiceRoute.parent "IO_MEM" , ServiceRoute.parent "IO_PORT" , ServiceRoute.parent "Timer" , ServiceRoute.parentLabel "ROM" (Some "system") (Some "system") , reportRomROM "acpi" , reportRomReport "pci" ] , config = Init.Config::{ , attributes = toMap { system = "yes" } , content = [ XML.text '' '' ] } } , usb_drv = Child.flat Child.Attributes::{ , binary = "usb_drv" , priority = 1 , resources = Resources::{ caps = 200, ram = Genode.units.MiB 16 } , provides = [ "Input", "Usb" ] , routes = [ ServiceRoute.child "Platform" "platform_drv" , reportRomROM "config" , reportRomReport "devices" , ServiceRoute.parentLabel "Report" (Some "config") (Some "usb_active_config") , ServiceRoute.parent "Timer" ] } , ps2_drv = Child.flat Child.Attributes::{ , binary = "ps2_drv" , provides = [ "Input" ] , routes = [ ServiceRoute.child "Platform" "platform_drv" , ServiceRoute.parent "Timer" ] } , input_filter = Child.flat Child.Attributes::{ , binary = "input_filter" , priority = 1 , resources = Resources::{ ram = Genode.units.MiB 2 } , provides = [ "Input" ] , routes = [ ServiceRoute.parent "Timer" , ServiceRoute.parentLabel "ROM" (Some "config") (Some "input_filter.config") , ServiceRoute.childLabel "Input" "ps2_drv" (Some "ps2") (None Text) , ServiceRoute.childLabel "Input" "usb_drv" (Some "usb") (None Text) ] } , driver_manager = Child.flat Child.Attributes::{ , binary = "driver_manager" , priority = 1 , routes = [ reportRomReport "init.config" , reportRomReport "usb_drv.config" , ServiceRoute.parentLabel "Report" (Some "block_devices") (Some "block_devices") , reportRomROM "usb_devices" , reportRomROM "pci_devices" , reportRomROM "ahci_ports" , reportRomROM "nvme_ns" , ServiceRoute.parentLabel "ROM" (Some "usb_policy") (Some "usb_policy") ] } , dynamic = Child.flat Child.Attributes::{ , binary = "init" , priority = 1 , resources = Resources::{ caps = 1400, ram = Genode.units.MiB 64 } , provides = [ "Framebuffer", "Block" ] , routes = [ ServiceRoute.child "Platform" "platform_drv" , reportRomReport "ahci_ports" , reportRomReport "nvme_ns" , ServiceRoute.child "Usb" "usb_drv" , reportRomROM "config" , ServiceRoute.parent "Timer" , ServiceRoute.parent "Report" , ServiceRoute.parent "IO_MEM" , ServiceRoute.parent "IO_PORT" ] } } } in drivers