1 /* Microsoft Reference Implementation for TPM 2.0 2 * 3 * The copyright in this software is being made available under the BSD License, 4 * included below. This software may be subject to other third party and 5 * contributor rights, including patent rights, and no such rights are granted 6 * under this license. 7 * 8 * Copyright (c) Microsoft Corporation 9 * 10 * All rights reserved. 11 * 12 * BSD License 13 * 14 * Redistribution and use in source and binary forms, with or without modification, 15 * are permitted provided that the following conditions are met: 16 * 17 * Redistributions of source code must retain the above copyright notice, this list 18 * of conditions and the following disclaimer. 19 * 20 * Redistributions in binary form must reproduce the above copyright notice, this 21 * list of conditions and the following disclaimer in the documentation and/or 22 * other materials provided with the distribution. 23 * 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 28 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 29 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 31 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 33 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 */ 35 36 /*** 37 * TpmSal.h provides a set of #defines that allow SymCrypt to be built 38 * in VS. 39 * 40 ****/ 41 42 #ifndef _TPM_SAL_H_ 43 #define _TPM_SAL_H_ 44 45 #ifndef _Out_writes_bytes_ 46 47 #define _Out_writes_( cbData ) 48 #define _Out_writes_bytes_( cbData ) 49 #define _Out_writes_opt_( cbData ) 50 #define _Out_writes_to_(n, c) 51 #define _In_reads_( cbBytes ) 52 #define _In_reads_opt_( cbAuthData ) 53 #define _In_reads_bytes_(size) 54 #define _Inout_updates_( nStates ) 55 #define _Inout_updates_bytes_(size) 56 #define _Field_size_( size ) 57 #define _Field_range_( min, max ) 58 #define _Writable_elements_(c) 59 #define _Ret_writes_bytes_to_(n, c) 60 61 #define _Analysis_assume_(x) 62 #define _Analysis_noreturn_ 63 64 #define _Use_decl_annotations_ 65 66 #define __success(x) 67 68 #define __assume 69 #define __analysis_assume 70 #define _In_ 71 #define _Out_ 72 #define __in 73 #define __in_opt 74 #define __in_bcount(x) 75 #define __in_bcount_opt(x) 76 #define __in_ecount(x) 77 #define __in_ecount_opt(x) 78 #define __in_xcount(x) 79 #define __out 80 #define __out_ecount(x) 81 #define __out_ecount_opt(x) 82 #define __out_ecount_full(x) 83 #define __out_ecount_part(x, y) 84 #define __out_bcount(x) 85 #define __out_bcount_part_opt(x, y) 86 #define __out_bcount_full(x) 87 #define __out_xcount(x) 88 #define __out_xcount_opt(x) 89 #define __out_ecount_part(x, y) 90 #define __out_ecount_part_opt(x, y) 91 #define __out_opt 92 #define __inout_ecount(x) 93 #define __inout_bcount(x) 94 #define __bound 95 #define __inout 96 #define __inout_opt 97 #define __inout_ecount_opt(x) 98 #define __deref_out_ecount(x) 99 #define __deref_opt_out_ecount(x) 100 #define __field_ecount(x) 101 #define _Post_invalid_ 102 #define _Pre_maybenull_ 103 #define __checkReturn 104 #define _In_bytecount_(x) 105 106 #endif /* no SAL macros defined */ 107 108 #ifndef _Interlocked_operand_ 109 110 #define _Interlocked_operand_ 111 112 #endif 113 114 115 #endif 116