2023-05-04 14:18:04 +00:00
|
|
|
build {
|
|
|
|
core init timer lib/ld
|
|
|
|
server/cpu_balancer app/cpu_burner app/top server/dynamic_rom
|
|
|
|
}
|
2020-07-17 11:21:41 +00:00
|
|
|
|
|
|
|
if {![have_include "power_on/qemu"]} {
|
|
|
|
puts "Run script is not supported on this platform"
|
|
|
|
exit 0
|
|
|
|
}
|
2022-01-05 13:31:19 +00:00
|
|
|
# foc in principle supports migration, but due to bug #4357 foc is not tested
|
|
|
|
if {![have_spec nova] && ![have_spec sel4]} {
|
2020-07-17 11:21:41 +00:00
|
|
|
puts "Run script is not supported on this platform"
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
|
|
|
set cpu_width 4
|
|
|
|
set cpu_height 1
|
|
|
|
set report_config "yes"
|
|
|
|
set use_trace "yes"
|
|
|
|
|
2023-05-04 14:18:04 +00:00
|
|
|
proc report_rom_start_node { } {
|
|
|
|
|
|
|
|
global report_config
|
|
|
|
|
|
|
|
if {$report_config != "yes"} {
|
|
|
|
return { } }
|
|
|
|
|
|
|
|
return {
|
|
|
|
<start name="report_rom">
|
|
|
|
<binary name="report_rom"/>
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides> <service name="Report"/> <service name="ROM"/> </provides>
|
|
|
|
<config verbose="yes"/>
|
|
|
|
<route>
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-17 11:21:41 +00:00
|
|
|
create_boot_directory
|
|
|
|
|
2021-02-25 12:33:19 +00:00
|
|
|
import_from_depot [depot_user]/src/report_rom \
|
|
|
|
[depot_user]/src/shim
|
2020-07-17 11:21:41 +00:00
|
|
|
|
2023-05-04 14:18:04 +00:00
|
|
|
install_config {
|
2021-02-19 16:02:27 +00:00
|
|
|
<config prio_levels="2" verbose="yes">
|
2020-07-17 11:21:41 +00:00
|
|
|
<affinity-space width="} $cpu_width {" height="} $cpu_height {"/>
|
|
|
|
<parent-provides>
|
|
|
|
<service name="LOG"/>
|
|
|
|
<service name="CPU"/>
|
|
|
|
<service name="ROM"/>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="IO_PORT"/> <!-- timer on some kernels -->
|
|
|
|
<service name="IRQ"/> <!-- timer on some kernels -->
|
|
|
|
<service name="TRACE"/>
|
|
|
|
</parent-provides>
|
|
|
|
|
|
|
|
<default-route>
|
|
|
|
<service name="LOG"> <parent/> </service>
|
|
|
|
<service name="PD"> <parent/> </service>
|
|
|
|
<service name="ROM"> <parent/> </service>
|
|
|
|
</default-route>
|
|
|
|
<default caps="100"/>
|
|
|
|
|
|
|
|
<start name="timer">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Timer"/></provides>
|
|
|
|
<route>
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</route>
|
2023-05-04 14:18:04 +00:00
|
|
|
</start>
|
2020-07-17 11:21:41 +00:00
|
|
|
|
2023-05-04 14:18:04 +00:00
|
|
|
} [report_rom_start_node] {
|
2020-07-17 11:21:41 +00:00
|
|
|
|
2021-11-23 09:17:30 +00:00
|
|
|
<start name="dynamic_rom">
|
|
|
|
<resource name="RAM" quantum="4M"/>
|
|
|
|
<provides><service name="ROM"/> </provides>
|
|
|
|
<config verbose="yes">
|
|
|
|
<rom name="cpu_balancer.config">
|
|
|
|
<inline>
|
|
|
|
<config interval_us="2000000"
|
|
|
|
report="} $report_config {"
|
|
|
|
trace="} $use_trace {"
|
|
|
|
verbose="no">
|
|
|
|
<component label="cpu_burner -> " default_policy="none">
|
|
|
|
<!--
|
|
|
|
<thread name="signal handler" policy="pin" xpos="1" ypos="0"/>
|
|
|
|
<thread name="signal handler" policy="max-utilize"/>
|
2023-07-14 09:30:49 +00:00
|
|
|
-->
|
2021-11-23 09:17:30 +00:00
|
|
|
<thread name="burn_0x0" policy="round-robin"/>
|
|
|
|
<thread name="burn_1x0" policy="round-robin"/>
|
|
|
|
</component>
|
|
|
|
</config>
|
|
|
|
</inline>
|
|
|
|
<sleep milliseconds="2000"/>
|
|
|
|
<inline>
|
|
|
|
<config interval_us="2000000"
|
|
|
|
report="} $report_config {"
|
|
|
|
trace="} $use_trace {"
|
|
|
|
verbose="no">
|
|
|
|
<component label="cpu_burner -> " default_policy="none">
|
|
|
|
<thread name="signal handler" policy="pin" xpos="1" ypos="0"/>
|
2023-07-14 09:30:49 +00:00
|
|
|
<!--
|
2021-11-23 09:17:30 +00:00
|
|
|
<thread name="signal handler" policy="max-utilize"/>
|
2023-07-14 09:30:49 +00:00
|
|
|
-->
|
2021-11-23 09:17:30 +00:00
|
|
|
<thread name="burn_0x0" policy="round-robin"/>
|
|
|
|
<thread name="burn_1x0" policy="round-robin"/>
|
|
|
|
<thread name="not_existent" policy="round-robin"/>
|
|
|
|
</component>
|
|
|
|
</config>
|
|
|
|
</inline>
|
|
|
|
<sleep milliseconds="2000"/>
|
|
|
|
</rom>
|
|
|
|
</config>
|
|
|
|
<route>
|
|
|
|
<service name="Timer"> <child name="timer"/> </service>
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</route>
|
2023-05-04 14:18:04 +00:00
|
|
|
</start>
|
2021-11-23 09:17:30 +00:00
|
|
|
|
2021-10-11 09:04:29 +00:00
|
|
|
<start name="cpu_balancer" caps="120">
|
2020-07-17 11:21:41 +00:00
|
|
|
<resource name="RAM" quantum="2M"/>
|
2021-02-19 16:02:27 +00:00
|
|
|
<provides>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="CPU"/>
|
|
|
|
</provides>
|
2020-07-17 11:21:41 +00:00
|
|
|
<route>
|
2021-11-23 09:17:30 +00:00
|
|
|
<service name="ROM" label="config">
|
|
|
|
<child name="dynamic_rom" label="cpu_balancer.config"/>
|
|
|
|
</service>
|
2020-07-17 11:21:41 +00:00
|
|
|
<service name="Timer"> <child name="timer"/> </service>
|
|
|
|
<service name="Report"> <child name="report_rom"/> </service>
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
|
2021-05-20 13:09:31 +00:00
|
|
|
<start name="cpu_burner" priority="-1" caps="120">
|
2021-02-25 12:33:19 +00:00
|
|
|
<binary name="shim"/>
|
2020-07-17 11:21:41 +00:00
|
|
|
<affinity xpos="1" ypos="0" width="2" height="1"/>
|
2021-05-20 13:09:31 +00:00
|
|
|
<resource name="RAM" quantum="3M"/>
|
2023-01-26 13:14:55 +00:00
|
|
|
<config percent="95"/>
|
2020-07-17 11:21:41 +00:00
|
|
|
<route>
|
2021-02-25 12:33:19 +00:00
|
|
|
|
|
|
|
<!-- by shim binary -->
|
|
|
|
<service name="PD" unscoped_label="cpu_burner"> <parent/> </service>
|
|
|
|
<service name="CPU" unscoped_label="cpu_burner"> <parent/> </service>
|
|
|
|
|
|
|
|
<!-- by child of shim -->
|
2021-02-19 16:02:27 +00:00
|
|
|
<service name="PD"> <child name="cpu_balancer"/> </service>
|
2020-07-17 11:21:41 +00:00
|
|
|
<service name="CPU"> <child name="cpu_balancer"/> </service>
|
2021-02-25 12:33:19 +00:00
|
|
|
|
|
|
|
<service name="ROM" label="binary"> <parent label="cpu_burner"/> </service>
|
|
|
|
|
2020-07-17 11:21:41 +00:00
|
|
|
<service name="Timer"> <child name="timer"/> </service>
|
2021-02-25 12:33:19 +00:00
|
|
|
<service name="LOG"> <parent/> </service>
|
|
|
|
<service name="ROM"> <parent/> </service>
|
2020-07-17 11:21:41 +00:00
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
<!--
|
|
|
|
<start name="top">
|
|
|
|
<resource name="RAM" quantum="2M"/>
|
|
|
|
<route>
|
|
|
|
<service name="Timer"> <child name="timer"/> </service>
|
|
|
|
<service name="CPU"> <child name="cpu_balancer"/> </service>
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
-->
|
|
|
|
</config>}
|
|
|
|
|
2023-05-04 14:18:04 +00:00
|
|
|
build_boot_image [build_artifacts]
|
2020-07-17 11:21:41 +00:00
|
|
|
|
|
|
|
append qemu_args " -nographic"
|
|
|
|
append qemu_args " -smp [expr $cpu_width * $cpu_height],cores=$cpu_width,threads=$cpu_height"
|
|
|
|
|
2023-07-14 09:30:49 +00:00
|
|
|
run_genode_until {.*thread xpos="[1-9]" ypos="0" name="signal handler" policy="pin".*\n} 60
|