summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaptor Engineering Development Team <support@raptorengineering.com>2018-06-04 04:02:11 -0500
committerRaptor Engineering Development Team <support@raptorengineering.com>2018-06-04 04:02:11 -0500
commit9c318691fa9f6d710cdc240eaa7184c0933495e9 (patch)
treea27f814e6fd77737529a978a6bb6e535b12876ac
parenta9caa69e978247d69f27353b8ec27e835adf9c9b (diff)
downloadvpdtools-9c318691fa9f6d710cdc240eaa7184c0933495e9.tar.gz
vpdtools-9c318691fa9f6d710cdc240eaa7184c0933495e9.zip
Update WoFerClock to apply voltage offset where needed
-rwxr-xr-xwoferclock/copy_buckets9
-rwxr-xr-xwoferclock/update_poundv_buckets13
-rwxr-xr-xwoferclock/woferclock_cpu29
3 files changed, 42 insertions, 9 deletions
diff --git a/woferclock/copy_buckets b/woferclock/copy_buckets
index 863aabf..11d29cd 100755
--- a/woferclock/copy_buckets
+++ b/woferclock/copy_buckets
@@ -6,9 +6,10 @@
set -e
NEW_ULTRATURBO_MHZ="$1"
-INDIR="$2"
-INFILE="$3"
-OUTFILE="$4"
+VOLTAGE_RATIO="$2"
+INDIR="$3"
+INFILE="$4"
+OUTFILE="$5"
SOURCE_BUCKET=2
DEST_BUCKET=5
@@ -25,7 +26,7 @@ cp ${INDIR}/${INFILE}.bin ${OUTFILE}.bin
for i in `seq 0 5`; do
POUND_V=$(./extract_buckets_from_tvpd "#V" bucket_copy/${INFILE}-LRP${i}.tvpd)
if [[ "$POUND_V" != "" ]]; then
- ./update_poundv_buckets ${SOURCE_BUCKET} ${DEST_BUCKET} ${NEW_NEST_FREQUENCY} ${NEW_ULTRATURBO_MHZ} ${POUND_V}
+ ./update_poundv_buckets ${SOURCE_BUCKET} ${DEST_BUCKET} ${NEW_NEST_FREQUENCY} ${NEW_ULTRATURBO_MHZ} ${VOLTAGE_RATIO} ${POUND_V}
./find_replace_binary_string ${OUTFILE}.bin search.bin replace.bin
fi
done
diff --git a/woferclock/update_poundv_buckets b/woferclock/update_poundv_buckets
index 6ae0a26..b14cb8a 100755
--- a/woferclock/update_poundv_buckets
+++ b/woferclock/update_poundv_buckets
@@ -51,7 +51,8 @@ source_bucket = int(sys.argv[1]) - 1
destination_bucket = int(sys.argv[2]) - 1
new_powerbus_mhz = int(sys.argv[3])
new_ultraturbo_mhz = int(sys.argv[4])
-raw_data = sys.argv[5]
+voltage_multiplier = float(sys.argv[5])
+raw_data = sys.argv[6]
if (source_bucket < 0) or (source_bucket > 5):
print "[ERROR] Invalid source bucket specified"
@@ -120,6 +121,16 @@ turbo[0] = format(int(int(turbo[0], 16) * ultraturbo_ratio), '04x')
nominal[0] = format(int(int(nominal[0], 16) * ultraturbo_ratio), '04x')
powersave[0] = format(int(int(powersave[0], 16) * ultraturbo_ratio), '04x')
powerbus[0] = format(new_powerbus_mhz, '04x')
+ultraturbo[1] = format(int(voltage_multiplier * int(ultraturbo[1], 16)), '04x')
+turbo[1] = format(int(voltage_multiplier * int(turbo[1], 16)), '04x')
+nominal[1] = format(int(voltage_multiplier * int(nominal[1], 16)), '04x')
+powersave[1] = format(int(voltage_multiplier * int(powersave[1], 16)), '04x')
+powerbus[1] = format(int(voltage_multiplier * int(powerbus[1], 16)), '04x')
+ultraturbo[2] = format(int(voltage_multiplier * int(ultraturbo[2], 16)), '04x')
+turbo[2] = format(int(voltage_multiplier * int(turbo[2], 16)), '04x')
+nominal[2] = format(int(voltage_multiplier * int(nominal[2], 16)), '04x')
+powersave[2] = format(int(voltage_multiplier * int(powersave[2], 16)), '04x')
+powerbus[2] = format(int(voltage_multiplier * int(powerbus[2], 16)), '04x')
bucket[destination_bucket] = assemble_poundv_bucket(new_id, nominal, powersave, turbo, ultraturbo, powerbus, sortpower)
print "\tModified bucket:\t" + bucket[destination_bucket]
diff --git a/woferclock/woferclock_cpu b/woferclock/woferclock_cpu
index c5b669e..051622c 100755
--- a/woferclock/woferclock_cpu
+++ b/woferclock/woferclock_cpu
@@ -9,8 +9,6 @@
set -e
-NEW_ULTRATURBO_MHZ=4200
-
echo "======================================================================"
echo "Welcome to WoFerClock!"
echo ""
@@ -55,7 +53,30 @@ fi
rm -rf vpd_out
echo "======================================================================"
+read -r -p "Core count of installed CPU(s): " CORE_COUNT
+if [[ "$INPUT" == "" ]]; then
+ CORE_COUNT=24
+fi
+
+# Defaults
+NEW_ULTRATURBO_MHZ=4200
+VOLTAGE_MULTIPLIER=1.00
+
+# Reasonable defaults
+# Partly validated on initial silicon
+# NOT GUARANTEED, starting point ONLY!
+if [[ "$CORE_COUNT" == "18" ]]; then
+ NEW_ULTRATURBO_MHZ=4200
+ VOLTAGE_MULTIPLIER=1.00
+fi
+if [[ "$CORE_COUNT" == "22" ]]; then
+ NEW_ULTRATURBO_MHZ=4200
+ VOLTAGE_MULTIPLIER=1.05
+fi
+
+echo "======================================================================"
echo "Targetting bucket 5 with a new Ultra Turbo frequency of ${NEW_ULTRATURBO_MHZ}MHz"
+echo "Voltage multiplier: ${VOLTAGE_MULTIPLIER}"
echo "======================================================================"
./list_i2c_busses
@@ -77,7 +98,7 @@ if [[ "$I2C_BUS_0" != "" ]]; then
mkdir -p vpd_out
echo "Modifying VPD"
- ./copy_buckets ${NEW_ULTRATURBO_MHZ} `realpath vpd_backup` cpu0 vpd_out/cpu0
+ ./copy_buckets ${NEW_ULTRATURBO_MHZ} ${VOLTAGE_MULTIPLIER} `realpath vpd_backup` cpu0 vpd_out/cpu0
echo "Done!"
fi
@@ -102,7 +123,7 @@ if [[ "$I2C_BUS_1" != "" ]]; then
mkdir -p vpd_out
echo "Modifying VPD"
- ./copy_buckets ${NEW_ULTRATURBO_MHZ} `realpath vpd_backup` cpu1 vpd_out/cpu1
+ ./copy_buckets ${NEW_ULTRATURBO_MHZ} ${VOLTAGE_MULTIPLIER} `realpath vpd_backup` cpu1 vpd_out/cpu1
echo "Done!"
fi
OpenPOWER on IntegriCloud