1 /* 2 * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 #ifndef _TLV_HDR_H_ 20 #define _TLV_HDR_H_ 21 #if !defined(__ASSEMBLER__) 22 #endif 23 24 struct tlv_usr_16_hdr { 25 volatile uint16_t tlv_cflg_reserved : 1, 26 tlv_tag : 5, 27 tlv_len : 4, 28 tlv_usrid : 6; 29 }; 30 31 struct tlv_16_hdr { 32 volatile uint16_t tlv_cflg_reserved : 1, 33 tlv_tag : 5, 34 tlv_len : 4, 35 tlv_reserved : 6; 36 }; 37 38 struct tlv_usr_32_hdr { 39 volatile uint32_t tlv_cflg_reserved : 1, 40 tlv_tag : 9, 41 tlv_len : 16, 42 tlv_usrid : 6; 43 }; 44 45 struct tlv_32_hdr { 46 volatile uint32_t tlv_cflg_reserved : 1, 47 tlv_tag : 9, 48 tlv_len : 16, 49 tlv_reserved : 6; 50 }; 51 52 struct tlv_usr_42_hdr { 53 volatile uint64_t tlv_compression : 1, 54 tlv_tag : 9, 55 tlv_len : 16, 56 tlv_usrid : 6, 57 tlv_reserved : 10, 58 pad_42to64_bit : 22; 59 }; 60 61 struct tlv_42_hdr { 62 volatile uint64_t tlv_compression : 1, 63 tlv_tag : 9, 64 tlv_len : 16, 65 tlv_reserved : 16, 66 pad_42to64_bit : 22; 67 }; 68 69 struct tlv_usr_c_42_hdr { 70 volatile uint64_t tlv_compression : 1, 71 tlv_ctag : 3, 72 tlv_usrid : 6, 73 tlv_cdata : 32, 74 pad_42to64_bit : 22; 75 }; 76 77 #endif 78