UefiPayloadPkg: Fix TPM1.2 detection
Check the actual TPM1.2 command response to prevent a false positive when talking to a TPM2.0. Tested using a ST33TPHF TPM 2.0. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
This commit is contained in:
		
				
					committed by
					
						
						Jeremy Soller
					
				
			
			
				
	
			
			
			
						parent
						
							83c68bbe1d
						
					
				
				
					commit
					37ec7ab62f
				
			@@ -62,6 +62,12 @@ TestTpm12 (
 | 
			
		||||
    return Status;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if ((SwapBytes16(Response.Hdr.tag) != TPM_TAG_RSP_COMMAND) ||
 | 
			
		||||
      (SwapBytes32(Response.Hdr.returnCode) != TPM_SUCCESS)) {
 | 
			
		||||
    DEBUG ((EFI_D_INFO, "TestTpm12: Response Code error! 0x%08x\r\n", SwapBytes32(Response.Hdr.returnCode)));
 | 
			
		||||
    return EFI_DEVICE_ERROR;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return EFI_SUCCESS;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user