1 /********************************************************************************/ 2 /* */ 3 /* Get Capability for TPM 1.2 */ 4 /* Written by Ken Goldman */ 5 /* IBM Thomas J. Watson Research Center */ 6 /* */ 7 /* (c) Copyright IBM Corporation 2018. */ 8 /* */ 9 /* All rights reserved. */ 10 /* */ 11 /* Redistribution and use in source and binary forms, with or without */ 12 /* modification, are permitted provided that the following conditions are */ 13 /* met: */ 14 /* */ 15 /* Redistributions of source code must retain the above copyright notice, */ 16 /* this list of conditions and the following disclaimer. */ 17 /* */ 18 /* Redistributions in binary form must reproduce the above copyright */ 19 /* notice, this list of conditions and the following disclaimer in the */ 20 /* documentation and/or other materials provided with the distribution. */ 21 /* */ 22 /* Neither the names of the IBM Corporation nor the names of its */ 23 /* contributors may be used to endorse or promote products derived from */ 24 /* this software without specific prior written permission. */ 25 /* */ 26 /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ 27 /* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ 28 /* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */ 29 /* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ 30 /* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ 31 /* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */ 32 /* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ 33 /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */ 34 /* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ 35 /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */ 36 /* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 37 /********************************************************************************/ 38 39 #ifndef GETCAPABILITY12_FP_H 40 #define GETCAPABILITY12_FP_H 41 42 typedef struct { 43 TPM_CAPABILITY_AREA capArea; 44 UINT32 subCapSize; 45 uint8_t subCap[MAX_RESPONSE_SIZE]; 46 } GetCapability12_In; 47 48 #define RC_GetCapability12_capArea (TPM_RC_P + TPM_RC_1) 49 #define RC_GetCapability12_subCapSize (TPM_RC_P + TPM_RC_2) 50 #define RC_GetCapability12_subcap (TPM_RC_P + TPM_RC_3) 51 52 typedef struct { 53 UINT32 respSize; 54 uint8_t resp[MAX_RESPONSE_SIZE]; 55 } GetCapability12_Out; 56 57 58 TPM_RC 59 TPM2_GetCapability12( 60 GetCapability12_In *in, // IN: input parameter list 61 GetCapability12_Out *out // OUT: output parameter list 62 ); 63 64 65 #endif 66