diff --git a/BM/topology/cpu_topology.sh b/BM/topology/cpu_topology.sh index d568b71f..4fc057cc 100755 --- a/BM/topology/cpu_topology.sh +++ b/BM/topology/cpu_topology.sh @@ -14,6 +14,8 @@ LL3_VALUE="" DIE_VALUE="" SNC_VALUE="" LL3_PER_SOCKET="" +CXL_DEVICE="" +CXL_MEM="" : "${CASE_NAME:=""}" @@ -25,6 +27,12 @@ usage() { __EOF } +CXL_DEVICE=$(lspci | grep CXL 2>&1) +[[ -n "$CXL_DEVICE" ]] && test_print_trc "CXL device is available." + +CXL_MEM=$(grep CXL /proc/iomem 2>&1) +[[ -n "$CXL_MEM" ]] && test_print_trc "CXL memory is available." + # cpuid tool is required to run cases if which cpuid 1>/dev/null 2>&1; then cpuid 1>/dev/null || block_test "Failed to run cpuid tool, @@ -225,6 +233,8 @@ socket_num() { [[ $numa_num -eq $snc_enabled_pkg_num_two ]] || [[ $numa_num -eq $snc_enabled_pkg_num_three ]] then test_print_trc "SNC is enabled, sockets and NUMA Nodes number is expected." + elif [[ -n "$CXL_DEVICE" ]] && [[ -n "$CXL_MEM" ]]; then + test_print_trc "CXL device is available, sockets and NUMA Nodes number is expected." else die "socket number is not aligned between lspci and sysfs" fi