diff --git a/BM/isst/tests b/BM/isst/tests index 1fcf2463..4b34b9be 100755 --- a/BM/isst/tests +++ b/BM/isst/tests @@ -2,6 +2,9 @@ # here assume the platform supports SST perf profile level 0,3,4 # user can adjust the case lists based on the actual SUT SST # perf profile level support status +# @hw_dep: +# @other_dep: +# @other_warn: intel_sst.sh -t isst_pp_config_enable_status diff --git a/BM/pt/tests b/BM/pt/tests index ed57785f..9fa8400d 100644 --- a/BM/pt/tests +++ b/BM/pt/tests @@ -1,4 +1,7 @@ #This file collects the basic test cases for Intel® Processor Trace feature +# @hw_dep: +# @other_dep: +# @other_warn: # Verify to filter MTC (Mini Time Counter) and TSC (Time-Stamp Counter) package perf_tests.sh -t fp diff --git a/BM/sdsi/intel_sdsi.sh b/BM/sdsi/intel_sdsi.sh index 1dafc3eb..b1b91cf9 100755 --- a/BM/sdsi/intel_sdsi.sh +++ b/BM/sdsi/intel_sdsi.sh @@ -205,6 +205,49 @@ read_meter_tele() { done } +# Reading current meter by intel_sdsi tool +# The current_meter is the unattested snapshot of the current metering information +read_meter_current() { + local meter_current + + for ((j = 1; j <= "$SOCKET_NUM"; j++)); do + id=$(ls /sys/bus/auxiliary/devices | grep sdsi | awk -F "/" '{print $NF}' | sed -n "$j,1p" | awk -F "." '{print $NF}' 2>&1) + [[ -n "$id" ]] || block_test "SDSI device $id is not available." + test_print_trc "Reading SDSi meter current for socket $id" + if ! meter_current=$(intel_sdsi -d "$id" -C); then + die "Failed to read SDSi meter current for socket $id: $meter_current" + else + test_print_trc "$meter_current" + fi + done +} + +# Function to check if meter_current updates for any 2 times reading +meter_current_update() { + local sdsi_device + local meter_current_bf + local meter_current_af + + for ((j = 1; j <= "$SOCKET_NUM"; j++)); do + sdsi_device=$(ls /sys/bus/auxiliary/devices | grep sdsi | sed -n "$j,1p") + [[ -n $sdsi_device ]] || block_test "SDSI device is not available." + test_print_trc "Dump meter_current_bf content:" + meter_current_bf=$(xxd /sys/bus/auxiliary/devices/"$sdsi_device"/meter_current) + test_print_trc "$meter_current_bf" + sleep 1 + test_print_trc "Dump meter_current_af content:" + meter_current_af=$(xxd /sys/bus/auxiliary/devices/"$sdsi_device"/meter_current) + test_print_trc "$meter_current_af" + if [[ -z "$meter_current_bf" ]] && [[ -z "$meter_current_af" ]]; then + block_test "$sdsi_device meter_current content is empty" + elif [[ "$meter_current_bf" = "$meter_current_af" ]]; then + die "$sdsi_device meter_current content does not change in two times reading." + else + test_print_trc "$sdsi_device meter_current content changes in two times reading." + fi + done +} + stress_read_reg() { local read_reg test_print_trc "Repeat reading SDSi register for 30 cycles:" @@ -254,6 +297,21 @@ stress_read_tele() { test_print_trc "$read_tele" } +stress_read_cur_meter() { + local read_cur + test_print_trc "Repeat reading SDSi current metering for 30 cycles:" + for ((j = 0; j < "$SOCKET_NUM"; j++)); do + for ((i = 1; i <= 30; i++)); do + if ! read_cur=$(intel_sdsi -d "$j" -C); then + die "Repeat reading SDSi current metering for socket $j cycle $i Fails" + else + test_print_trc "Repeat reading current metering for socket $j cycle $i PASS" + fi + done + done + test_print_trc "$read_cur" +} + intel_sdsi_test() { case $TEST_SCENARIO in driver_unbind_bind) @@ -274,6 +332,9 @@ intel_sdsi_test() { sysfs_telemetry_attri) sdsi_sysfs_attribute meter_certificate ;; + sysfs_current_meter_attri) + sdsi_sysfs_attribute meter_current + ;; sdsi_devices) available_sdsi_devices ;; @@ -289,6 +350,12 @@ intel_sdsi_test() { read_meter_telemetry) read_meter_tele ;; + read_meter_current) + read_meter_current + ;; + verify_meter_current_update) + meter_current_update + ;; stress_reading_reg) stress_read_reg ;; @@ -298,6 +365,9 @@ intel_sdsi_test() { stress_reading_tele) stress_read_tele ;; + stress_reading_cur_meter) + stress_read_cur_meter + ;; esac return 0 } diff --git a/BM/sdsi/sdsi_fms_list b/BM/sdsi/sdsi_fms_list new file mode 100644 index 00000000..bc79cd3c --- /dev/null +++ b/BM/sdsi/sdsi_fms_list @@ -0,0 +1,3 @@ +# Family 06 CPUs from arch/x86/include/asm/intel-family.h +# SPR EMR GNR_X GNR_D +06:8f cf ad ae diff --git a/BM/sdsi/tests b/BM/sdsi/tests index b59ced0c..c43d44a7 100755 --- a/BM/sdsi/tests +++ b/BM/sdsi/tests @@ -1,5 +1,8 @@ # This file collects basic cases which can run against sdsi driver # on Intel® Architecture-based server platforms. +# @hw_dep: general_test.sh -t fms -p "sdsi_fms_list" @ CPU Model doesn't support sdsi +# @other_dep: general_test.sh -t kconfig -k "CONFIG_INTEL_SDSI=m" +# @other_warn: intel_sdsi.sh -t driver_unbind_bind intel_sdsi.sh -t sdsi_sysfs @@ -7,11 +10,15 @@ intel_sdsi.sh -t sdsi_per_socket intel_sdsi.sh -t sysfs_register_attri intel_sdsi.sh -t sysfs_certificate_attri intel_sdsi.sh -t sysfs_telemetry_attri +intel_sdsi.sh -t sysfs_current_meter_attri intel_sdsi.sh -t sdsi_devices intel_sdsi.sh -t sdsi_ppin intel_sdsi.sh -t nvram_content_err_check intel_sdsi.sh -t enable_status intel_sdsi.sh -t read_meter_telemetry +intel_sdsi.sh -t verify_meter_current_update +intel_sdsi.sh -t read_meter_current intel_sdsi.sh -t stress_reading_reg intel_sdsi.sh -t stress_reading_lic intel_sdsi.sh -t stress_reading_tele +intel_sdsi.sh -t stress_reading_cur_meter \ No newline at end of file diff --git a/BM/tpmi/tests b/BM/tpmi/tests index 164785e0..323bf8cd 100755 --- a/BM/tpmi/tests +++ b/BM/tpmi/tests @@ -1,5 +1,8 @@ # This file collects the test cases which can run against intel_tpmi driver # on Intel® Architecture-based server platforms. +# @hw_dep: general_test.sh -t fms -p "tpmi_fms_list" @ CPU Model doesn't support tpmi +# @other_dep: general_test.sh -t kconfig -k "CONFIG_INTEL_TPMI=m" +# @other_warn: # Encoding of TPMI_ID(hex): # 0x0: RAPL - Socket RAPL, DRAM RAPL, Platform RAPL, etc. # 0x1: PEM - Power and Performance Excursion Monitors diff --git a/BM/tpmi/tpmi_fms_list b/BM/tpmi/tpmi_fms_list new file mode 100755 index 00000000..d4ca301c --- /dev/null +++ b/BM/tpmi/tpmi_fms_list @@ -0,0 +1,3 @@ +# Family 06 CPUs from arch/x86/include/asm/intel-family.h +# GNR_X GNR_D SRF +06:ad ae af diff --git a/BM/ufs/tests b/BM/ufs/tests index 0ddcb455..3afc4b2b 100755 --- a/BM/ufs/tests +++ b/BM/ufs/tests @@ -1,6 +1,9 @@ # This file collects basic cases which can run against # TPMI UFS (Uncore Frequency Scaling) driver # on Intel® GRANITERAPIDS and further server platforms. +# @hw_dep: general_test.sh -t fms -p "ufs_fms_list" @ CPU Model doesn't support tpmi_ufs +# @other_dep: general_test.sh -t kconfig -k "CONFIG_INTEL_TPMI=m" +# @other_warn: tpmi_ufs.sh -t check_ufs_unbind_bind tpmi_ufs.sh -t check_ufs_device diff --git a/BM/ufs/ufs_fms_list b/BM/ufs/ufs_fms_list new file mode 100755 index 00000000..d4ca301c --- /dev/null +++ b/BM/ufs/ufs_fms_list @@ -0,0 +1,3 @@ +# Family 06 CPUs from arch/x86/include/asm/intel-family.h +# GNR_X GNR_D SRF +06:ad ae af