1 2 /* 3 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 21 22 #ifndef _TLV_HDR_H_ 23 24 #define _TLV_HDR_H_ 25 26 #if !defined(__ASSEMBLER__) 27 28 #endif 29 30 struct tlv_usr_16_hdr { 31 32 volatile uint16_t tlv_cflg_reserved : 1, 33 34 tlv_tag : 5, 35 36 tlv_len : 4, 37 38 tlv_usrid : 6; 39 40 }; 41 42 struct tlv_16_hdr { 43 44 volatile uint16_t tlv_cflg_reserved : 1, 45 46 tlv_tag : 5, 47 48 tlv_len : 4, 49 50 tlv_reserved : 6; 51 52 }; 53 54 struct tlv_usr_32_hdr { 55 56 volatile uint32_t tlv_cflg_reserved : 1, 57 58 tlv_tag : 9, 59 60 tlv_len : 16, 61 62 tlv_usrid : 6; 63 64 }; 65 66 struct tlv_32_hdr { 67 68 volatile uint32_t tlv_cflg_reserved : 1, 69 70 tlv_tag : 9, 71 72 tlv_len : 16, 73 74 tlv_reserved : 6; 75 76 }; 77 78 struct tlv_usr_42_hdr { 79 80 volatile uint64_t tlv_compression : 1, 81 82 tlv_tag : 9, 83 84 tlv_len : 16, 85 86 tlv_usrid : 6, 87 88 tlv_reserved : 10, 89 90 pad_42to64_bit : 22; 91 92 }; 93 94 struct tlv_42_hdr { 95 96 volatile uint64_t tlv_compression : 1, 97 98 tlv_tag : 9, 99 100 tlv_len : 16, 101 102 tlv_reserved : 16, 103 104 pad_42to64_bit : 22; 105 106 }; 107 108 struct tlv_usr_c_42_hdr { 109 110 volatile uint64_t tlv_compression : 1, 111 112 tlv_ctag : 3, 113 114 tlv_usrid : 6, 115 116 tlv_cdata : 32, 117 118 pad_42to64_bit : 22; 119 120 }; 121 122 #endif 123 124