tool/run: add intel_hwp config to boot_dir/hw

Fixes #5388
This commit is contained in:
Johannes Schlatow 2024-11-26 16:20:22 +01:00 committed by Norman Feske
parent b50bbef303
commit 2c2fb6b70e

View File

@ -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_ld_lib_so { } { return "ld-hw.lib.so" }
proc binary_name_core_a { } { return "core-hw.a" } proc binary_name_core_a { } { return "core-hw.a" }
proc binary_name_timer { } { return "hw_timer" } proc binary_name_timer { } { return "hw_timer" }
@ -102,7 +130,7 @@ proc run_boot_dir {binaries} {
exec mkdir -p [run_dir]/boot exec mkdir -p [run_dir]/boot
exec mv [run_dir]/image-hw.elf [run_dir]/boot/image-hw.elf 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]} { if {[have_include "image/iso"] || [have_include "image/disk"] || [have_include image/uefi]} {
# #