Skip to content

Commit

Permalink
Improve OPP table parsing on Allwinner/Qualcomm
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasKaiser committed Oct 2, 2022
1 parent ff34630 commit 2782c55
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Results.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ So do **not** rely on collected numbers unless you carefully read through all th
* *kH/s* is a **multi threaded** cpuminer score showing the board's performance when executing NEON optimized code. To get the performance difference between big and little cores click the links in the left column
* The Akaso M8S and Tronsmart MXIII Plus numbers may be representative for other Amlogic S812 devices (quad Cortex-A9 @ 1.2/1.55 GHz), Tronsmart S82 for other S802 devices (quad Cortex-A9 @ 1.6 GHz)
* The Amazon a1.xlarge numbers represent a 1st gen Graviton CPU (64-bit 'ARM Neoverse') limited to four A72 cores and 8GB memory.
* Cubietruck and 'LeMaker Banana Pi' numbers are more or less representative for all other Allwinner A20 devices, same with Lime for Allwinner A10, Olimex Teres-I for Allwinner A64, Orange Pi "PC Plus" and "Plus 2" for Allwinner H2+/H3 and NanoPi K1 Plus, Orange Pi "PC 2" and Prime for Allwinner H5, MangoPi Mcore for Allwinner H616. AMedia X96 Max+ numbers represent Amlogic S905X3 devices.
* Cubietruck and 'LeMaker Banana Pi' numbers are more or less representative for all other Allwinner A20 devices, same with Lime for Allwinner A10, Olimex Teres-I for Allwinner A64, Orange Pi "PC Plus" and "Plus 2" for Allwinner H2+/H3 and NanoPi K1 Plus, Orange Pi "PC 2" and Prime for Allwinner H5, MangoPi Mcore for Allwinner H616 (though clocked 300 MHz higher than usual). AMedia X96 Max+ numbers represent Amlogic S905X3 devices.
* Honeycomb LX2 numbers (based on SolidRun's CEx7 LX2160A COM) might vary somewhat with memory configuration but are more or less representative for LX2160A in general.
* Clearfog Pro and Helios4 use exactly same SoC (Armada 385), kernel and clockspeeds and the only reason why OpenSSL numbers differ is since Helios4 numbers were made using [Marvell's CESA crypto accelerator via cryptodev](https://forum.armbian.com/topic/7763-benchmarking-cpus/?do=findComment&comment=59569) which provides nice speed improvements with larger block sizes but also some initialization overhead with tiny block sizes. Also CPU utilization is way lower so the SoC is free for other stuff while performing better at the same time.
* EspressoBin's boot BLOB claims to run at up to 1GHz while real clockspeeds are lower maxing out with this setting at 790MHz (obviously a kernel bug -- see [details](https://forum.armbian.com/topic/4089-espressobin-support-development-efforts/?do=findComment&comment=60082))
Expand Down
1 change: 1 addition & 0 deletions results/ARMv8-Crypto-Extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Crawling through [sbc-bench results collection](../Results.md) comparing +30 dif
| [i.MX8M Quad](http://ix.io/44Lq) | 1800 | 839321 | 466 |
| [RK3399](http://ix.io/2ICt) | 1800| 839360 | 466 |
| [Allwinner H6](http://ix.io/26Ph) | 1800 | 839870 | 466 |
| [Allwinner H616](http://ix.io/4bSf) | 1800 | 840275 | 467 |
| [A311D](http://ix.io/3VfL) | 2010 | 940425 | 467 |
| [A311D2](http://ix.io/3Wq0) | 2010 | 941040 | 468 |
| Cortex-A55 | | | |
Expand Down
24 changes: 21 additions & 3 deletions sbc-bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,9 @@ CheckLoadAndDmesg() {
grep -q -E '] Booting Linux|] Linux version ' <<<"${DMESG}"
case $? in
1)
if [ "X${MODE}" != "Xunattended" ]; then
grep -q sunxi <<<"${DMESG}"
if [ "X${MODE}" != "Xunattended" -a $? -ne 0 ]; then
# print warning on other platforms than Allwinner and if MODE != unattended
echo -e "${LRED}${BOLD}WARNING: dmesg output does not contain early boot messages which\nhelp in identifying hardware details.${NC}\n"
echo -e "It is recommended to reboot now and then execute the benchmarks.\nPress ${BOLD}[ctrl]-[c]${NC} to stop or ${BOLD}[enter]${NC} to continue.\c"
read
Expand Down Expand Up @@ -1493,8 +1495,24 @@ ParseOPPTables() {
echo -e "\n ${OPPTableName}:"
find "${OPPTable}" -type d -name "opp*" | grep "${OPPTableName}/" | sort | while read ; do
[ -f "${REPLY}/opp-hz" ] && OPPHz="$(printf "%d\n" 0x$(od --endian=big -x <"${REPLY}/opp-hz" | cut -c9- | tr -d ' ') | sed 's/000000$//')" || OPPHz=""
[ -f "${REPLY}/opp-microvolt" ] && OPPVolt="$(printf "%d\n" 0x$(od --endian=big -x <"${REPLY}/opp-microvolt" | cut -c9- | tr -d ' ' | cut -c-8 | head -n1))" || OPPVolt=""
[ "X${OPPHz}" != "X" ] && printf "%10s MHz %7s mV\n" ${OPPHz} $(awk '{printf ("%0.1f",$1/1000); }' <<<"${OPPVolt}")
if [ -f "${REPLY}/opp-microvolt" ]; then
OPPVolt="$(printf "%d\n" 0x$(od --endian=big -x <"${REPLY}/opp-microvolt" | cut -c9- | tr -d ' ' | cut -c-8 | head -n1))"
if [ -f "${REPLY}/opp-supported-hw" ]; then
OPPSupportedHW="0x$(od --endian=big -x <"${REPLY}/opp-supported-hw" | cut -c9- | tr -d ' ' | sed 's/^00*//' | head -n1)"
[ "X${OPPHz}" != "X" ] && printf "%10s MHz %8s mV (%s)\n" ${OPPHz} $(awk '{printf ("%0.1f",$1/1000); }' <<<"${OPPVolt}") "${OPPSupportedHW}"
else
[ "X${OPPHz}" != "X" ] && printf "%10s MHz %8s mV\n" ${OPPHz} $(awk '{printf ("%0.1f",$1/1000); }' <<<"${OPPVolt}")
fi
elif [ -f "${REPLY}/opp-microvolt-speed0" ]; then
printf "%10s MHz " ${OPPHz}
for SpeedBin in $(ls "${REPLY}"/opp-microvolt-speed* | sort -n) ; do
OPPVolt="$(printf "%d\n" 0x$(od --endian=big -x <"${SpeedBin}" | cut -c9- | tr -d ' ' | cut -c-8 | head -n1))"
[ "X${OPPHz}" != "X" ] && printf "%8s mV" $(awk '{printf ("%0.1f",$1/1000); }' <<<"${OPPVolt}")
done
echo ""
else
printf "%10s MHz unknown\n" ${OPPHz}
fi
done | sort -n
done
} # ParseOPPTables
Expand Down

0 comments on commit 2782c55

Please sign in to comment.