genode/tool/run/bender.inc
Roman Iten 5ebcf36d69 tool/run: introduce '[have_]cmd_arg'-procs
Renaming 'get_cmd_switch' and 'get_cmd_arg' to 'have_cmd_arg' and
'cmd_arg' respectively blends in nicely with the now omnipresent pattern
with 'have_[spec|board|installed|include]'.

This commit deprecates 'get_cmd_switch' and 'get_cmd_arg', which will be
removed in a later commit.

Issue #5432
2025-02-24 16:39:20 +01:00

29 lines
945 B
PHP

#
# Return Bender option that configures Bender's Intel HWP plugin
#
# \param --bender-intel-hwp-mode Run the Intel HWP plugin of Bender in the
# given mode. Valid argument values are
# "off",
# "performance",
# "balanced", and
# "power_saving"
# The argument value defaults to
# "performance".
#
proc bender_intel_hwp_mode_option { } {
set opt [cmd_arg_first --bender-intel-hwp-mode "performance"]
if {$opt == "off"} {
return "intel_hwp_off"
} elseif {$opt == "performance"} {
return "intel_hwp_performance"
} elseif {$opt == "balanced"} {
return "intel_hwp_balanced"
} elseif {$opt == "power_saving"} {
return "intel_hwp_power_saving"
} else {
return "intel_hwp_performance"
}
}