ia64/xen-unstable

changeset 7613:89030fab2c3f

The attached patch to 1) fix a 64-bit bug with some of the data packing,
and 2) adds a workaround for an Infineon TPM hardware bug.

Signed-off-by: Vinnie Scarlata, Joseph Cihula (@intel.com)
author kaf24@firebug.cl.cam.ac.uk
date Wed Nov 02 11:21:46 2005 +0100 (2005-11-02)
parents 03d51c0b0546
children 4ec05d64f202
files tools/vtpm_manager/manager/vtpm_manager.c tools/vtpm_manager/manager/vtsp.c tools/vtpm_manager/util/buffer.h tools/vtpm_manager/util/tcg.h
line diff
     1.1 --- a/tools/vtpm_manager/manager/vtpm_manager.c	Wed Nov 02 11:19:48 2005 +0100
     1.2 +++ b/tools/vtpm_manager/manager/vtpm_manager.c	Wed Nov 02 11:21:46 2005 +0100
     1.3 @@ -140,12 +140,15 @@ TPM_RESULT VTPM_Create_Service(){
     1.4    TPM_AUTHDATA sharedsecret;
     1.5    
     1.6    TPMTRYRETURN( VTSP_OSAP(vtpm_globals->manager_tcs_handle,
     1.7 -			  TPM_ET_SRK,
     1.8 -			  0, 
     1.9 +			  TPM_ET_KEYHANDLE,
    1.10 +			  TPM_SRK_KEYHANDLE, 
    1.11  			  (const TPM_AUTHDATA*)&vtpm_globals->srk_usage_auth,
    1.12  			  &sharedsecret, 
    1.13  			  &osap) ); 
    1.14 -  
    1.15 +
    1.16 +  osap.fContinueAuthSession = FALSE;
    1.17 + 
    1.18 + 
    1.19    TPMTRYRETURN( VTSP_CreateWrapKey( vtpm_globals->manager_tcs_handle,
    1.20  				    TPM_KEY_BIND,
    1.21  				    (const TPM_AUTHDATA*)&vtpm_globals->storage_key_usage_auth,
     2.1 --- a/tools/vtpm_manager/manager/vtsp.c	Wed Nov 02 11:19:48 2005 +0100
     2.2 +++ b/tools/vtpm_manager/manager/vtsp.c	Wed Nov 02 11:21:46 2005 +0100
     2.3 @@ -180,8 +180,8 @@ TPM_RESULT VTSP_OSAP(const TCS_CONTEXT_H
     2.4    Crypto_GetRandom((BYTE *) &nonceOddOSAP, sizeof(TPM_NONCE) ); 
     2.5    
     2.6    TPMTRYRETURN( TCSP_OSAP(    hContext,
     2.7 -			      TPM_ET_SRK,
     2.8 -			      0, 
     2.9 +			      entityType,
    2.10 +			      entityValue, 
    2.11  			      nonceOddOSAP,
    2.12  			      &auth->AuthHandle, 
    2.13  			      &auth->NonceEven, 
     3.1 --- a/tools/vtpm_manager/util/buffer.h	Wed Nov 02 11:19:48 2005 +0100
     3.2 +++ b/tools/vtpm_manager/util/buffer.h	Wed Nov 02 11:21:46 2005 +0100
     3.3 @@ -37,18 +37,6 @@
     3.4  #include <stddef.h>             // for pointer NULL
     3.5  #include "tcg.h"
     3.6  
     3.7 -// structure to enable use of FMT_SIZE32_DATA in BSG_Unpack
     3.8 -typedef struct pack_buf_t {
     3.9 -  UINT32 size;
    3.10 -  BYTE * data;
    3.11 -} pack_buf_t;
    3.12 -
    3.13 -// and a const version for Pack
    3.14 -typedef struct pack_constbuf_t {
    3.15 -  UINT32 size;
    3.16 -  const BYTE* data;
    3.17 -} pack_constbuf_t;
    3.18 -
    3.19  typedef UINT32 tpm_size_t;
    3.20  
    3.21  // first version, probably will be expanded...
     4.1 --- a/tools/vtpm_manager/util/tcg.h	Wed Nov 02 11:19:48 2005 +0100
     4.2 +++ b/tools/vtpm_manager/util/tcg.h	Wed Nov 02 11:21:46 2005 +0100
     4.3 @@ -191,6 +191,20 @@ typedef struct TCS_AUTH {
     4.4    TPM_AUTHDATA  HMAC;
     4.5  } TCS_AUTH;
     4.6  
     4.7 +// structures for dealing with sizes followed by buffers in all the
     4.8 +// TCG structure.
     4.9 +typedef struct pack_buf_t {
    4.10 +  UINT32 size;
    4.11 +  BYTE * data;
    4.12 +} pack_buf_t;
    4.13 +
    4.14 +typedef struct pack_constbuf_t {
    4.15 +  UINT32 size;
    4.16 +  const BYTE* data;
    4.17 +} pack_constbuf_t;
    4.18 +
    4.19 +
    4.20 +
    4.21  // **************************** CONSTANTS *********************************
    4.22  
    4.23  // BOOL values