xref: /titanic_44/usr/src/uts/common/io/i40e/i40e_xregs.h (revision f2f3bb8f7847d39569aee5885302672c8396952b)
1*f2f3bb8fSRobert Mustacchi /*
2*f2f3bb8fSRobert Mustacchi  * This file and its contents are supplied under the terms of the
3*f2f3bb8fSRobert Mustacchi  * Common Development and Distribution License ("CDDL"), version 1.0.
4*f2f3bb8fSRobert Mustacchi  * You may only use this file in accordance with the terms of version
5*f2f3bb8fSRobert Mustacchi  * 1.0 of the CDDL.
6*f2f3bb8fSRobert Mustacchi  *
7*f2f3bb8fSRobert Mustacchi  * A full copy of the text of the CDDL should have accompanied this
8*f2f3bb8fSRobert Mustacchi  * source.  A copy of the CDDL is also available via the Internet at
9*f2f3bb8fSRobert Mustacchi  * http://www.illumos.org/license/CDDL.
10*f2f3bb8fSRobert Mustacchi  */
11*f2f3bb8fSRobert Mustacchi 
12*f2f3bb8fSRobert Mustacchi /*
13*f2f3bb8fSRobert Mustacchi  * Copyright 2016 Joyent, Inc.
14*f2f3bb8fSRobert Mustacchi  */
15*f2f3bb8fSRobert Mustacchi 
16*f2f3bb8fSRobert Mustacchi #ifndef _I40E_XREGS_H
17*f2f3bb8fSRobert Mustacchi #define	_I40E_XREGS_H
18*f2f3bb8fSRobert Mustacchi 
19*f2f3bb8fSRobert Mustacchi /*
20*f2f3bb8fSRobert Mustacchi  * This file contains extra register definitions and other things that would
21*f2f3bb8fSRobert Mustacchi  * nominally come from the Intel common code, but do not due to bugs, erratum,
22*f2f3bb8fSRobert Mustacchi  * etc. Ideally we'll get to a point where we can remove this file.
23*f2f3bb8fSRobert Mustacchi  */
24*f2f3bb8fSRobert Mustacchi #include "i40e_type.h"
25*f2f3bb8fSRobert Mustacchi 
26*f2f3bb8fSRobert Mustacchi #ifdef __cplusplus
27*f2f3bb8fSRobert Mustacchi extern "C" {
28*f2f3bb8fSRobert Mustacchi #endif
29*f2f3bb8fSRobert Mustacchi 
30*f2f3bb8fSRobert Mustacchi /*
31*f2f3bb8fSRobert Mustacchi  * The MSPDC register is missing from the current datasheet.
32*f2f3bb8fSRobert Mustacchi  */
33*f2f3bb8fSRobert Mustacchi #define	I40E_GLPRT_MSPDC(_i)		(0x00300060 + ((_i) * 8)) /* _i=0...3 */
34*f2f3bb8fSRobert Mustacchi #define	I40E_GLPRT_MSDPC_MAX_INDEX	3
35*f2f3bb8fSRobert Mustacchi #define	I40E_GLPRT_MSPDC_MSPDC_SHIFT	0
36*f2f3bb8fSRobert Mustacchi #define	I40E_GLPRT_MSPDC_MSPDC_MASK	\
37*f2f3bb8fSRobert Mustacchi 	I40E_MASK(0xFFFFFFFF, I40E_GLPRT_MSPDC_MSPDC_SHIFT)
38*f2f3bb8fSRobert Mustacchi 
39*f2f3bb8fSRobert Mustacchi /*
40*f2f3bb8fSRobert Mustacchi  * The RXERR* registers are technically correct from the perspective of their
41*f2f3bb8fSRobert Mustacchi  * addreses; however, the other associated constants are not correct. Instead,
42*f2f3bb8fSRobert Mustacchi  * we have new definitions here in the interim.
43*f2f3bb8fSRobert Mustacchi  */
44*f2f3bb8fSRobert Mustacchi 
45*f2f3bb8fSRobert Mustacchi #define	I40E_X_GL_RXERR1_L(_i)		(0x00318000 + ((_i) * 8))
46*f2f3bb8fSRobert Mustacchi 
47*f2f3bb8fSRobert Mustacchi #define	I40E_X_GL_RXERR2_L(_i)		(0x0031c000 + ((_i) * 8))
48*f2f3bb8fSRobert Mustacchi 
49*f2f3bb8fSRobert Mustacchi #ifdef __cplusplus
50*f2f3bb8fSRobert Mustacchi }
51*f2f3bb8fSRobert Mustacchi #endif
52*f2f3bb8fSRobert Mustacchi 
53*f2f3bb8fSRobert Mustacchi #endif /* _I40E_XREGS_H */
54