genode/repos/pc/run/intel_fb.run

301 lines
9.4 KiB
Plaintext
Raw Normal View History

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 use_fb_controller 0
if {$use_fb_controller} {
set apply_on_hotplug "no"
} else {
set apply_on_hotplug "yes"
}
set build_components {
core lib/ld init timer
driver/acpi
driver/platform
app/pci_decode
driver/framebuffer/intel/pc
test/framebuffer
server/report_rom
server/vfs lib/vfs lib/vfs_import
server/fs_rom
}
append_if $use_gpu build_components { driver/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="100">
<resource name="RAM" quantum="2M"/>
<provides>
<service name="ROM" />
<service name="Report" />
</provides>
<config>
2024-05-30 13:46:57 +00:00
<policy label="pci_decode -> system" report="acpi -> acpi"/>
<policy label="intel_fb -> intel_opregion" report="acpi -> intel_opregion"/>
<policy label="platform -> 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>
2024-05-30 13:46:57 +00:00
<start name="acpi" caps="250">
<resource name="RAM" quantum="6M"/>
<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="2M"/>
<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>
2024-05-30 13:46:57 +00:00
<start name="platform" caps="100" managing_system="yes">
<resource name="RAM" quantum="2M"/>
<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>
<service name="Timer"> <child name="timer"/> </service>
</route>
<config>
2024-05-30 13:46:57 +00:00
<policy label_prefix="intel_fb" info="yes">
<pci class="VGA"/>
<pci class="ISABRIDGE"/>
</policy>
2024-05-30 13:46:57 +00:00
<policy label_prefix="intel_gpu" 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>
2024-05-30 13:46:57 +00:00
<service name="Platform"> <child name="platform" label="intel_fb"/> </service>
<service name="ROM" label="intel_fb -> intel_opregion">
<child name="report_rom" label="intel_fb -> 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"/>
<route>
<service name="TRACE"> <parent label=""/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</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">
2024-05-30 13:46:57 +00:00
<policy label="intel_fb_controller -> connectors" report="intel_fb -> 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>
2024-05-30 13:46:57 +00:00
<inline name="fb.config">
<config ld_verbose="yes" apply_on_hotplug="} $apply_on_hotplug {">
<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 {
2024-05-30 13:46:57 +00:00
<start name="intel_gpu" caps="2000">
<resource name="RAM" quantum="90M"/>
<provides>
<service name="Gpu"/>
<service name="Platform"/>
</provides>
<config max_framebuffer_memory="64M">
<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)"/>
2022-12-20 11:06:37 +00:00
<device vendor="0x8086" device="0x9a49" generation="12" platform="tigerlake" description="Iris Xe Graphics (Tiger Lake, Xe)"/>
</config>
<route>
<service name="Platform"> <parent/> </service>
<any-service> <parent /> <any-child/> </any-service>
</route>
</start>}
append config {
2024-05-30 13:46:57 +00:00
<start name="intel_fb" caps="1000">
<binary name="pc_intel_fb"/>
<resource name="RAM" quantum="90M"/>
<route>}
append_if $use_gpu config {
2024-05-30 13:46:57 +00:00
<service name="Platform"> <child name="intel_gpu"/> </service>}
append config {
<service name="ROM" label="config">
2024-05-30 13:46:57 +00:00
<child name="config_rom" label="fb.config"/> </service>
<service name="Report"> <child name="report_rom"/> </service>
<any-service> <parent/> <any-child /> </any-service>
</route>
</start>}
append_if $use_fb_controller config {
<start name="intel_fb_controller" priority="-1">
<resource name="RAM" quantum="1M"/>
<config>
<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>}
append config {
<start name="test-framebuffer" priority="-1">
<resource name="RAM" quantum="10M"/>
<provides> <service name="Capture"/> </provides>
<config/>
</start>
</config>
</start>
</config>}
install_config $config
build_boot_image [build_artifacts]
if { [get_cmd_switch --autopilot] } {
run_genode_until {\[init -\> init_dynamic -\> intel_fb\] HDMI-A-3: enable.*} 30
run_genode_until {\</connectors\>} 20 [output_spawn_id]
run_genode_until {green} 30 [output_spawn_id]
} else {
run_genode_until forever
}