diff --git a/dasharo-security/tpm-support.robot b/dasharo-security/tpm-support.robot index 67cb70b756..4ce3e6c038 100644 --- a/dasharo-security/tpm-support.robot +++ b/dasharo-security/tpm-support.robot @@ -34,7 +34,7 @@ TPM001.001 TPM Support (firmware) Login To Linux Switch To Root User Get Cbmem From Cloud - ${out}= Execute Command In Terminal cbmem -L + ${out}= Execute Command In Terminal cbmem -1 Should Contain Any ${out} TPM2 log TCPA log TPM001.002 TPM Support (Ubuntu) @@ -69,9 +69,7 @@ TPM002.001 Verify TPM version (firmware) Boot System Or From Connected Disk ubuntu Login To Linux Switch To Root User - Get Cbmem From Cloud - ${out}= Execute Command In Terminal cbmem -L - Should Contain Any ${out} TPM2 log TCPA log + Validate Expected TPM In Firmware TPM002.002 Verify TPM version (Ubuntu) [Documentation] This test aims to verify that the TPM version is @@ -82,9 +80,7 @@ TPM002.002 Verify TPM version (Ubuntu) Boot System Or From Connected Disk ubuntu Login To Linux Switch To Root User - ${out}= Execute Command In Terminal cat /sys/class/tpm/tpm0/tpm_version_major - # TPM 2.0 and 1.2 - Should Contain Any ${out} 1 2 + Validate Expected TPM In Linux TPM002.003 Verify TPM version (Windows) [Documentation] This test aims to verify that the TPM version is @@ -153,3 +149,20 @@ Validate Any TPM ELSE Fail No valid TPM version available. END + +Validate Expected TPM In Linux + [Documentation] Checks if major TPM version matches the expected + ... value. + ${tpm_ver}= Execute Command In Terminal cat /sys/class/tpm/tpm0/tpm_version_major + IF '${TPM_EXPECTED_VERSION}' != '${tpm_ver}' Fail + +Validate Expected TPM In Firmware + Get Cbmem From Cloud + ${out}= Execute Command In Terminal cbmem -1 + IF '${TPM_EXPECTED_VERSION}' == '1' + Should Contain ${out} TCPA log + ELSE IF '${TPM_EXPECTED_VERSION}' == '2' + Should Contain ${out} TPM2 log + ELSE + Fail + END diff --git a/platform-configs/include/msi-z690-common.robot b/platform-configs/include/msi-z690-common.robot index 968627d63d..2e594bfb98 100644 --- a/platform-configs/include/msi-z690-common.robot +++ b/platform-configs/include/msi-z690-common.robot @@ -25,6 +25,7 @@ ${POWER_CTRL}= sonoff ${FLASH_VERIFY_METHOD}= none ${WIFI_CARD}= ${TBD} ${MAX_CPU_TEMP}= 80 +${TPM_EXPECTED_VERSION}= 2 ${DMIDECODE_MANUFACTURER}= Micro-Star International Co., Ltd. ${DMIDECODE_VENDOR}= 3mdeb diff --git a/platform-configs/include/optiplex-common.robot b/platform-configs/include/optiplex-common.robot index f6ea525677..fdae6c7fb7 100644 --- a/platform-configs/include/optiplex-common.robot +++ b/platform-configs/include/optiplex-common.robot @@ -16,6 +16,7 @@ ${SETUP_MENU_KEY}= ${F2} ${IPXE_BOOT_ENTRY}= Network Boot and Utilities ${POWER_CTRL}= sonoff ${MAX_CPU_TEMP}= 80 +${TPM_EXPECTED_VERSION}= 1 ${DMIDECODE_VENDOR}= 3mdeb ${DMIDECODE_FAMILY}= N/A diff --git a/platform-configs/include/protectli-vp66xx.robot b/platform-configs/include/protectli-vp66xx.robot index 4a8e8da240..d433e254bd 100644 --- a/platform-configs/include/protectli-vp66xx.robot +++ b/platform-configs/include/protectli-vp66xx.robot @@ -10,6 +10,7 @@ ${DEVICE_AUDIO1}= Alderlake-P HDMI ${DEVICE_AUDIO1_WIN}= High Definition Audio Device ${INITIAL_CPU_FREQUENCY}= 2600 ${MAX_CPU_TEMP}= 82 +${TPM_EXPECTED_VERSION}= 1 ${CPU_P_CORES_MAX}= 2 ${CPU_E_CORES_MAX}= 8