diff --git a/tool/run/boot_dir/hw b/tool/run/boot_dir/hw index 469a90be50..cc1add10e0 100644 --- a/tool/run/boot_dir/hw +++ b/tool/run/boot_dir/hw @@ -1,3 +1,31 @@ +# +# 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 [get_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" + } +} + proc binary_name_ld_lib_so { } { return "ld-hw.lib.so" } proc binary_name_core_a { } { return "core-hw.a" } proc binary_name_timer { } { return "hw_timer" } @@ -102,7 +130,7 @@ proc run_boot_dir {binaries} { exec mkdir -p [run_dir]/boot exec mv [run_dir]/image-hw.elf [run_dir]/boot/image-hw.elf - set options_bender "[boot_output] " + set options_bender "[boot_output] [bender_intel_hwp_mode_option]" if {[have_include "image/iso"] || [have_include "image/disk"] || [have_include image/uefi]} { #