#
# Test to trigger periodically ACPI suspend and resume and periodically
# trying to restart graphic driver.
#
# The pc_intel_fb_drv is restarting on X201 successfully after resume.
# On Qemu the restart of vesa_fb_drv after resume does not work up to now.
#
# Intel AMT SOL most the time does not work after resume.
# PCMCIA Serial card worked reliable on X201 after resume.
#
assert_spec x86
if {
![have_spec hw] &&
![have_spec nova]
} {
puts "Platform is unsupported."
exit 0
}
if {[have_spec nova]} {
proc kernel_output { } { return "novga logmem" }
}
# non Intel machines have no GPU support, e.g. Qemu and AMD
set board_non_intel [expr [have_include "power_on/qemu"]]
set use_gpu_client 1
set use_gpe "no"
proc priority_timer { } { return {priority="0"} }
proc priority_base { } { return {priority="-1"} }
proc priority_config { } { return {priority="-1"} }
proc priority_gui { } { return {priority="-1"} }
proc priority_wm { } { return {priority="-2"} }
proc priority_log { } { return {priority="-2"} }
proc priority_drivers { } { return {priority="-2"} }
proc priority_scenario { } { return {priority="-3"} }
proc display_config { } {
global board_non_intel
if {$board_non_intel} {
return {
}
return $return_display
}
return {
}
}
proc gui_config { } {
set return_gui ""
append return_gui {
}
return $return_gui
}
proc input_config { } {
return {
}
}
proc log_output { } {
set return_log ""
append return_log {
}
append_if [have_spec nova] return_log {
}
return $return_log
}
proc gpu_config { } {
global board_non_intel
if {$board_non_intel} return
set return_gpu ""
append return_gpu {
}
return $return_gpu
}
proc gpu_client { } {
global board_non_intel
global use_gpu_client
if { $board_non_intel || !$use_gpu_client } return
set return_gpu ""
append return_gpu {
}
return $return_gpu
}
build {
core timer init lib/ld
server/report_rom
server/dynamic_rom
server/rom_filter
drivers/acpi
drivers/platform
drivers/framebuffer/intel/pc
drivers/framebuffer/vesa
drivers/framebuffer/boot
drivers/gpu/intel
app/acpica
app/pci_decode
test/suspend
}
create_boot_directory
import_from_depot [depot_user]/src/init \
[depot_user]/src/nitpicker \
[depot_user]/src/ps2_drv \
[depot_user]/pkg/themed_wm \
[depot_user]/pkg/terminal \
[depot_user]/src/terminal_log \
[depot_user]/src/event_filter \
[depot_user]/raw/drivers_interactive-pc \
[depot_user]/src/report_rom \
[depot_user]/src/dynamic_rom \
[depot_user]/src/nano3d \
[depot_user]/src/log_core
if {$use_gpu_client} {
import_from_depot [depot_user]/pkg/glmark2
}
set config ""
append config {
} [ gpu_config] {
} [ gui_config] {
} [ log_output] {
} [ gpu_client] {
}
install_config $config
build_boot_image [build_artifacts]
# qemu machine model q35 and multiple CPUs don't work with NOVA kernel
#
# src/lapic.cpp Acpi::delay(2) spins on PM_TMR forever
#
# According to qemu monitor "info mtree",
#
# address-space: I/O
# 0000000000000000-000000000000ffff (prio 0, i/o): io
# ...
# 0000000000000600-000000000000067f (prio 0, i/o): ich9-pm
# 0000000000000600-0000000000000603 (prio 0, i/o): acpi-evt
# 0000000000000604-0000000000000605 (prio 0, i/o): acpi-cnt
# 0000000000000608-000000000000060b (prio 0, i/o): acpi-tmr
# 0000000000000620-000000000000062f (prio 0, i/o): acpi-gpe0
# 0000000000000630-0000000000000637 (prio 0, i/o): acpi-smi
# 0000000000000660-000000000000067f (prio 0, i/o): sm-tco
#
# address-space: I/O
# 0000000000000000-000000000000ffff (prio 0, i/o): io
# 0000000000000000-0000000000000003 (prio 0, i/o): acpi-evt
# 0000000000000004-0000000000000005 (prio 0, i/o): acpi-cnt
# 0000000000000008-000000000000000b (prio 0, i/o): acpi-tmr
# 0000000000000020-000000000000002f (prio 0, i/o): acpi-gpe0
# 0000000000000030-0000000000000037 (prio 0, i/o): acpi-smi
# 0000000000000060-000000000000007f (prio 0, i/o): sm-tco
#
# the "ich9-pm" device behind/attached on a LPC PCI device
#
# ./hw/isa/lpc_ich9.c
# ./hw/acpi/ich9.c: memory_region_init(&pm->io, OBJECT(lpc_pci), "ich9-pm", ICH9_PMIO_SIZE)
#
# is not at the right i/o space right location anymore. It seems that the
# parent of ich9-pm stays disabled ...
#
# Further debugging shows:
#
# qemu/roms/seabios/src/resume.c s3_resume -> pci_resume
# qemu/roms/seabios/src/fw/pciinit.c pci_resume
#
# In pci_resume the mmcfg and q35 and ich9-pm for PCIe is tried to be
# re-enabled, but actually the calls never hit in Qemu.
# It seems that mch_mmconfig_setup should use I/O PCI access in order to
# enable MMIO PCI MMCFG access.
#
append qemu_args "-smp 1"
run_genode_until forever