From e56ecbc4b718254b5906b58bd83b0145367e6884 Mon Sep 17 00:00:00 2001 From: rdiaz Date: Mon, 11 May 2026 20:19:31 +0000 Subject: [PATCH] Updated TPM service logging level to lower the verbosity of the logs during TPM communication. --- ec-service-lib/src/services/tpm.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ec-service-lib/src/services/tpm.rs b/ec-service-lib/src/services/tpm.rs index 66a140b..05fcafa 100644 --- a/ec-service-lib/src/services/tpm.rs +++ b/ec-service-lib/src/services/tpm.rs @@ -12,7 +12,7 @@ #![allow(dead_code, unused_imports, unused_variables)] use crate::{Result, Service}; -use log::{error, info}; +use log::{error, info, trace}; use odp_ffa::HasRegisterPayload; use odp_ffa::{DirectMessagePayload, ErrorCode, MsgSendDirectReq2, MsgSendDirectResp2}; use uuid::{uuid, Uuid}; @@ -362,7 +362,7 @@ impl TpmService { // Check the cmdReady bit in the CrbControlRequest register to see if we need to // transition to the READY state, otherwise, deny the request. if crb.crb_control_request & PTP_CRB_CONTROL_AREA_REQUEST_COMMAND_READY != 0 { - info!("IDLE State - Handle TPM Command cmdReady Request"); + trace!("IDLE State - Handle TPM Command cmdReady Request"); status = self.sst.cmd_ready(self.active_locality); if status == ErrorCode::Ok { self.current_state = TpmState::Ready; @@ -378,7 +378,7 @@ impl TpmService { // Check the goIdle bit in the CrbControlRequest register to see if we need to // transition back to the IDLE state. if crb.crb_control_request & PTP_CRB_CONTROL_AREA_REQUEST_GO_IDLE != 0 { - info!("READY State - Handle TPM Command goIdle Request"); + trace!("READY State - Handle TPM Command goIdle Request"); status = self.sst.go_idle(self.active_locality); if status == ErrorCode::Ok { self.current_state = TpmState::Idle; @@ -386,12 +386,12 @@ impl TpmService { // Check the cmdReady bit in the CrbControlRequest register, clear it if it has been // set again. } else if crb.crb_control_request & PTP_CRB_CONTROL_AREA_REQUEST_COMMAND_READY != 0 { - info!("READY State - Handle TPM Command cmdReady Request"); + trace!("READY State - Handle TPM Command cmdReady Request"); status = self.sst.cmd_ready(self.active_locality); // Check the CrbControlStart register to see if we need to start executing a command. // Once the command completes, transition to the COMPLETE state. } else if crb.crb_control_start & PTP_CRB_CONTROL_START != 0 { - info!("READY State - Handle TPM Command Start Request"); + trace!("READY State - Handle TPM Command Start Request"); status = self.sst.start(self.active_locality, crb as *mut PtpCrbRegisters); if status == ErrorCode::Ok { self.current_state = TpmState::Complete; @@ -408,7 +408,7 @@ impl TpmService { // Check the goIdle bit in the CrbControlRequest register to see if we need to // transition to the IDLE state. if crb.crb_control_request & PTP_CRB_CONTROL_AREA_REQUEST_GO_IDLE != 0 { - info!("COMPLETE State - Handle TPM Command goIdle Request"); + trace!("COMPLETE State - Handle TPM Command goIdle Request"); status = self.sst.go_idle(self.active_locality); if status == ErrorCode::Ok { self.current_state = TpmState::Idle; @@ -417,7 +417,7 @@ impl TpmService { // Check the cmdReady bit in the CrbControlRequest register to see if we need to // transition back to the READY state. } else if crb.crb_control_request & PTP_CRB_CONTROL_AREA_REQUEST_COMMAND_READY != 0 { - info!("COMPLETE State - Handle TPM Command cmdReady Request"); + trace!("COMPLETE State - Handle TPM Command cmdReady Request"); if self.sst.is_idle_bypass_supported() { status = self.sst.cmd_ready(self.active_locality); if status == ErrorCode::Ok { @@ -427,7 +427,7 @@ impl TpmService { } // Check the CrbControlStart register to see if we need to execute another command. } else if crb.crb_control_start & PTP_CRB_CONTROL_START != 0 { - info!("COMPLETE State - Handle TPM Command Start Request"); + trace!("COMPLETE State - Handle TPM Command Start Request"); // Execution of another command from COMPLETE is only supported if TPM_CapCRBIdleBypass // is 1. if self.sst.is_idle_bypass_supported() {