genode/repos/pc/run/intel_fb.run
Stefan Kalkowski 5528434fb6 lx_kit & lx_emul: use generic platform API
* Remove wrapper for legacy x86 platform API
* Move PCI configuration space quirks to corresponding driver
  (pc_usb_host_drv, pc_wifi_drv, pc_intel_fb_drv)
* Adapt driver test run-scripts to changed configuration

Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00

301 lines
9.1 KiB
Plaintext

assert_spec x86_64
if {[get_cmd_switch --autopilot] && [have_include "power_on/qemu"]} {
puts "Run script does not support autopilot mode on Qemu"
exit 0
}
if {[get_cmd_switch --autopilot] && [have_board linux]} {
puts "Autopilot mode is not supported on this platform."
exit 0
}
#
# Build
#
set use_gpu 1
set use_top 0
set build_components {
core init timer
drivers/acpi
drivers/platform
app/pci_decode
drivers/framebuffer/intel/pc
test/framebuffer
server/report_rom
server/vfs
server/fs_rom
lib/vfs_import
}
append_if $use_gpu build_components { drivers/gpu/intel }
append_if $use_top build_components { app/top }
build $build_components
create_boot_directory
#
# Generate config
#
append config {
<config verbose="yes" prio_levels="4">
<parent-provides>
<service name="ROM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="TRACE"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="100"/>
<start name="report_rom" caps="70">
<resource name="RAM" quantum="1M"/>
<provides>
<service name="ROM" />
<service name="Report" />
</provides>
<config>
<policy label="pci_decode -> system" report="acpi_drv -> acpi"/>
<policy label="intel_fb_drv -> intel_opregion" report="acpi_drv -> intel_opregion"/>
<policy label="platform_drv -> devices" report="pci_decode -> devices"/>
</config>
<route>
<service name="LOG"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="ROM"> <parent/> </service>
</route>
</start>
<start name="acpi_drv" caps="250">
<resource name="RAM" quantum="4M"/>
<route>
<service name="IO_MEM"> <parent/> </service>
<service name="LOG"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="RM"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="ROM"> <parent/> </service>
<service name="Report"> <child name="report_rom"/> </service>
</route>
</start>
<start name="pci_decode" caps="350">
<resource name="RAM" quantum="1M"/>
<route>
<service name="Report">
<child name="report_rom"/> </service>
<service name="ROM" label="system">
<child name="report_rom"/> </service>
<service name="IO_MEM"> <parent/> </service>
<service name="LOG"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="RM"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="ROM"> <parent/> </service>
</route>
</start>
<start name="platform_drv" caps="100" managing_system="yes">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Platform"/> </provides>
<route>
<service name="ROM" label="devices"> <child name="report_rom"/> </service>
<service name="IRQ"> <parent/> </service>
<service name="IO_MEM"> <parent/> </service>
<service name="IO_PORT"> <parent/> </service>
<service name="ROM"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="LOG"> <parent/> </service>
</route>
<config>
<policy label_prefix="intel_fb_drv" info="yes">
<pci class="VGA"/>
<pci class="ISABRIDGE"/>
</policy>
<policy label_prefix="intel_gpu_drv" info="yes">
<pci class="VGA"/>
<pci class="ISABRIDGE"/>
</policy>
</config>
</start>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
</start>
<start name="init_dynamic" caps="10000">
<binary name="init"/>
<resource name="RAM" quantum="1000M"/>
<route>
<service name="Report"> <child name="report_rom"/> </service>
<service name="Platform"> <child name="platform_drv" label="intel_fb_drv"/> </service>
<service name="ROM" label="intel_fb_drv -> intel_opregion">
<child name="report_rom" label="intel_fb_drv -> intel_opregion"/>
</service>
<any-service> <parent/> <any-child/> </any-service>
</route>
<config prio_levels="2">
<parent-provides>
<service name="ROM"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="TRACE"/>
<service name="Platform"/>
<service name="Timer"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="100"/>
<report init_ram="yes" child_ram="yes" delay_ms="10000"/>}
append_if $use_top config {
<start name="top">
<resource name="RAM" quantum="2M"/>
<config period_ms="40000"/>
</start>}
append config {
<start name="report_rom" priority="-1">
<resource name="RAM" quantum="2M"/>
<provides> <service name="Report" /> <service name="ROM" /> </provides>
<config verbose="yes">
<policy label="intel_fb_controller -> connectors" report="intel_fb_drv -> connectors"/>
</config>
</start>
<start name="config_fs" priority="-1">
<binary name="vfs"/>
<resource name="RAM" quantum="8M"/>
<provides> <service name="File_system"/> </provides>
<config>
<vfs>
<ram/>
<import>
<inline name="fb_drv.config">
<config ld_verbose="yes">
<report connectors="yes"/>
</config>
</inline>
</import>
</vfs>
<policy label_prefix="config_rom" root="/"/>
<policy label_prefix="intel_fb_controller" root="/" writeable="yes"/>
</config>
</start>
<start name="config_rom" priority="-1">
<binary name="fs_rom"/>
<resource name="RAM" quantum="4M"/>
<provides><service name="ROM"/></provides>
<route>
<service name="File_system"> <child name="config_fs" /> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>}
append_if $use_gpu config {
<start name="intel_gpu_drv" caps="2000">
<resource name="RAM" quantum="40M"/>
<provides>
<service name="Gpu"/>
<service name="Platform"/>
</provides>
<config>
<device vendor="0x8086" device="0x1606" generation="8" platform="broadwell" description="HD Graphics (BDW GT1 ULT)"/>
<device vendor="0x8086" device="0x1616" generation="8" platform="broadwell" description="HD Graphics 5500 (BDW GT2 ULT)"/>
<device vendor="0x8086" device="0x1622" generation="8" platform="broadwell" description="Iris Pro Graphics 6200 (BDW GT3e)"/>
<device vendor="0x8086" device="0x1916" generation="9" platform="skylake" description="HD Graphics 520 (Skylake, Gen9)"/>
<device vendor="0x8086" device="0x191b" generation="9" platform="skylake" description="HD Graphics 530 (Skylake, Gen9)"/>
<device vendor="0x8086" device="0x5916" generation="9" platform="kabylake" description="HD Graphics 620 (Kaby Lake, Gen9p5)"/>
<device vendor="0x8086" device="0x5917" generation="9" platform="kabylake" description="UHD Graphics 620 (Kaby Lake, Gen9p5)"/>
<device vendor="0x8086" device="0x591b" generation="9" platform="kabylake" description="HD Graphics 630 (Kaby Lake, Gen9p5)"/>
<device vendor="0x8086" device="0x3ea0" generation="9" platform="whiskeylake" description="UHD Graphics 620 (Whiskey Lake, Gen9p5)"/>
</config>
<route>
<service name="Platform"> <parent/> </service>
<any-service> <parent /> <any-child/> </any-service>
</route>
</start>}
append config {
<start name="intel_fb_drv" caps="1000">
<binary name="pc_intel_fb_drv"/>
<resource name="RAM" quantum="60M"/>
<route>}
append_if $use_gpu config {
<service name="Platform"> <child name="intel_gpu_drv"/> </service>}
append config {
<service name="ROM" label="config">
<child name="config_rom" label="fb_drv.config"/> </service>
<service name="Report"> <child name="report_rom"/> </service>
<any-service> <parent/> <any-child /> </any-service>
</route>
</start>
<start name="intel_fb_controller" priority="-1">
<resource name="RAM" quantum="1M"/>
<config artifical_update_ms="0"> <!-- off -->
<vfs> <fs/> </vfs>
</config>
<route>
<service name="File_system"> <child name="config_fs"/> </service>
<service name="ROM" label="connectors"> <child name="report_rom"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="test-framebuffer" priority="-1">
<resource name="RAM" quantum="10M"/>
<provides> <service name="Capture"/> </provides>
<config/>
</start>
</config>
</start>
</config>}
install_config $config
#
# Boot modules
#
# generic modules
set boot_modules {
core ld.lib.so init timer pc_intel_fb_drv intel_fb_controller
test-framebuffer report_rom fs_rom vfs vfs.lib.so vfs_import.lib.so
platform_drv acpi_drv pci_decode
}
append_if $use_gpu boot_modules { intel_gpu_drv }
append_if $use_top boot_modules { top }
build_boot_image $boot_modules
if { [get_cmd_switch --autopilot] } {
run_genode_until {\[init -\> init_dynamic -\> intel_fb_drv\] HDMI-A-2: enable.*} 30
} else {
run_genode_until forever
}