xref: /wlan-driver/fw-api/hw/peach/v1/mon_buffer_addr.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for any
5*5113495bSYour Name  * purpose with or without fee is hereby granted, provided that the above
6*5113495bSYour Name  * copyright notice and this permission notice appear in all copies.
7*5113495bSYour Name  *
8*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9*5113495bSYour Name  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10*5113495bSYour Name  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11*5113495bSYour Name  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12*5113495bSYour Name  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13*5113495bSYour Name  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14*5113495bSYour Name  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*5113495bSYour Name  */
16*5113495bSYour Name 
17*5113495bSYour Name 
18*5113495bSYour Name #ifndef _MON_BUFFER_ADDR_H_
19*5113495bSYour Name #define _MON_BUFFER_ADDR_H_
20*5113495bSYour Name 
21*5113495bSYour Name #define NUM_OF_DWORDS_MON_BUFFER_ADDR 3
22*5113495bSYour Name 
23*5113495bSYour Name struct mon_buffer_addr {
24*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
25*5113495bSYour Name              uint32_t buffer_virt_addr_31_0                                   : 32;
26*5113495bSYour Name              uint32_t buffer_virt_addr_63_32                                  : 32;
27*5113495bSYour Name              uint32_t dma_length                                              : 12,
28*5113495bSYour Name                       reserved_2a                                             :  4,
29*5113495bSYour Name                       msdu_continuation                                       :  1,
30*5113495bSYour Name                       truncated                                               :  1,
31*5113495bSYour Name                       reserved_2b                                             : 14;
32*5113495bSYour Name #else
33*5113495bSYour Name              uint32_t buffer_virt_addr_31_0                                   : 32;
34*5113495bSYour Name              uint32_t buffer_virt_addr_63_32                                  : 32;
35*5113495bSYour Name              uint32_t reserved_2b                                             : 14,
36*5113495bSYour Name                       truncated                                               :  1,
37*5113495bSYour Name                       msdu_continuation                                       :  1,
38*5113495bSYour Name                       reserved_2a                                             :  4,
39*5113495bSYour Name                       dma_length                                              : 12;
40*5113495bSYour Name #endif
41*5113495bSYour Name };
42*5113495bSYour Name 
43*5113495bSYour Name #define MON_BUFFER_ADDR_BUFFER_VIRT_ADDR_31_0_OFFSET                                0x00000000
44*5113495bSYour Name #define MON_BUFFER_ADDR_BUFFER_VIRT_ADDR_31_0_LSB                                   0
45*5113495bSYour Name #define MON_BUFFER_ADDR_BUFFER_VIRT_ADDR_31_0_MSB                                   31
46*5113495bSYour Name #define MON_BUFFER_ADDR_BUFFER_VIRT_ADDR_31_0_MASK                                  0xffffffff
47*5113495bSYour Name 
48*5113495bSYour Name #define MON_BUFFER_ADDR_BUFFER_VIRT_ADDR_63_32_OFFSET                               0x00000004
49*5113495bSYour Name #define MON_BUFFER_ADDR_BUFFER_VIRT_ADDR_63_32_LSB                                  0
50*5113495bSYour Name #define MON_BUFFER_ADDR_BUFFER_VIRT_ADDR_63_32_MSB                                  31
51*5113495bSYour Name #define MON_BUFFER_ADDR_BUFFER_VIRT_ADDR_63_32_MASK                                 0xffffffff
52*5113495bSYour Name 
53*5113495bSYour Name #define MON_BUFFER_ADDR_DMA_LENGTH_OFFSET                                           0x00000008
54*5113495bSYour Name #define MON_BUFFER_ADDR_DMA_LENGTH_LSB                                              0
55*5113495bSYour Name #define MON_BUFFER_ADDR_DMA_LENGTH_MSB                                              11
56*5113495bSYour Name #define MON_BUFFER_ADDR_DMA_LENGTH_MASK                                             0x00000fff
57*5113495bSYour Name 
58*5113495bSYour Name #define MON_BUFFER_ADDR_RESERVED_2A_OFFSET                                          0x00000008
59*5113495bSYour Name #define MON_BUFFER_ADDR_RESERVED_2A_LSB                                             12
60*5113495bSYour Name #define MON_BUFFER_ADDR_RESERVED_2A_MSB                                             15
61*5113495bSYour Name #define MON_BUFFER_ADDR_RESERVED_2A_MASK                                            0x0000f000
62*5113495bSYour Name 
63*5113495bSYour Name #define MON_BUFFER_ADDR_MSDU_CONTINUATION_OFFSET                                    0x00000008
64*5113495bSYour Name #define MON_BUFFER_ADDR_MSDU_CONTINUATION_LSB                                       16
65*5113495bSYour Name #define MON_BUFFER_ADDR_MSDU_CONTINUATION_MSB                                       16
66*5113495bSYour Name #define MON_BUFFER_ADDR_MSDU_CONTINUATION_MASK                                      0x00010000
67*5113495bSYour Name 
68*5113495bSYour Name #define MON_BUFFER_ADDR_TRUNCATED_OFFSET                                            0x00000008
69*5113495bSYour Name #define MON_BUFFER_ADDR_TRUNCATED_LSB                                               17
70*5113495bSYour Name #define MON_BUFFER_ADDR_TRUNCATED_MSB                                               17
71*5113495bSYour Name #define MON_BUFFER_ADDR_TRUNCATED_MASK                                              0x00020000
72*5113495bSYour Name 
73*5113495bSYour Name #define MON_BUFFER_ADDR_RESERVED_2B_OFFSET                                          0x00000008
74*5113495bSYour Name #define MON_BUFFER_ADDR_RESERVED_2B_LSB                                             18
75*5113495bSYour Name #define MON_BUFFER_ADDR_RESERVED_2B_MSB                                             31
76*5113495bSYour Name #define MON_BUFFER_ADDR_RESERVED_2B_MASK                                            0xfffc0000
77*5113495bSYour Name 
78*5113495bSYour Name #endif
79