xref: /linux/drivers/misc/mei/hw-me-regs.h (revision 1fa55b4e0e161b3d16b52f5bab1b39b39607bc27)
19dc64d6aSTomas Winkler /******************************************************************************
29dc64d6aSTomas Winkler  * Intel Management Engine Interface (Intel MEI) Linux driver
39dc64d6aSTomas Winkler  * Intel MEI Interface Header
49dc64d6aSTomas Winkler  *
59dc64d6aSTomas Winkler  * This file is provided under a dual BSD/GPLv2 license.  When using or
69dc64d6aSTomas Winkler  * redistributing this file, you may do so under either license.
79dc64d6aSTomas Winkler  *
89dc64d6aSTomas Winkler  * GPL LICENSE SUMMARY
99dc64d6aSTomas Winkler  *
109dc64d6aSTomas Winkler  * Copyright(c) 2003 - 2012 Intel Corporation. All rights reserved.
119dc64d6aSTomas Winkler  *
129dc64d6aSTomas Winkler  * This program is free software; you can redistribute it and/or modify
139dc64d6aSTomas Winkler  * it under the terms of version 2 of the GNU General Public License as
149dc64d6aSTomas Winkler  * published by the Free Software Foundation.
159dc64d6aSTomas Winkler  *
169dc64d6aSTomas Winkler  * This program is distributed in the hope that it will be useful, but
179dc64d6aSTomas Winkler  * WITHOUT ANY WARRANTY; without even the implied warranty of
189dc64d6aSTomas Winkler  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
199dc64d6aSTomas Winkler  * General Public License for more details.
209dc64d6aSTomas Winkler  *
219dc64d6aSTomas Winkler  * You should have received a copy of the GNU General Public License
229dc64d6aSTomas Winkler  * along with this program; if not, write to the Free Software
239dc64d6aSTomas Winkler  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
249dc64d6aSTomas Winkler  * USA
259dc64d6aSTomas Winkler  *
269dc64d6aSTomas Winkler  * The full GNU General Public License is included in this distribution
279dc64d6aSTomas Winkler  * in the file called LICENSE.GPL.
289dc64d6aSTomas Winkler  *
299dc64d6aSTomas Winkler  * Contact Information:
309dc64d6aSTomas Winkler  *	Intel Corporation.
319dc64d6aSTomas Winkler  *	linux-mei@linux.intel.com
329dc64d6aSTomas Winkler  *	http://www.intel.com
339dc64d6aSTomas Winkler  *
349dc64d6aSTomas Winkler  * BSD LICENSE
359dc64d6aSTomas Winkler  *
369dc64d6aSTomas Winkler  * Copyright(c) 2003 - 2012 Intel Corporation. All rights reserved.
379dc64d6aSTomas Winkler  * All rights reserved.
389dc64d6aSTomas Winkler  *
399dc64d6aSTomas Winkler  * Redistribution and use in source and binary forms, with or without
409dc64d6aSTomas Winkler  * modification, are permitted provided that the following conditions
419dc64d6aSTomas Winkler  * are met:
429dc64d6aSTomas Winkler  *
439dc64d6aSTomas Winkler  *  * Redistributions of source code must retain the above copyright
449dc64d6aSTomas Winkler  *    notice, this list of conditions and the following disclaimer.
459dc64d6aSTomas Winkler  *  * Redistributions in binary form must reproduce the above copyright
469dc64d6aSTomas Winkler  *    notice, this list of conditions and the following disclaimer in
479dc64d6aSTomas Winkler  *    the documentation and/or other materials provided with the
489dc64d6aSTomas Winkler  *    distribution.
499dc64d6aSTomas Winkler  *  * Neither the name Intel Corporation nor the names of its
509dc64d6aSTomas Winkler  *    contributors may be used to endorse or promote products derived
519dc64d6aSTomas Winkler  *    from this software without specific prior written permission.
529dc64d6aSTomas Winkler  *
539dc64d6aSTomas Winkler  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
549dc64d6aSTomas Winkler  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
559dc64d6aSTomas Winkler  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
569dc64d6aSTomas Winkler  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
579dc64d6aSTomas Winkler  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
589dc64d6aSTomas Winkler  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
599dc64d6aSTomas Winkler  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
609dc64d6aSTomas Winkler  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
619dc64d6aSTomas Winkler  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
629dc64d6aSTomas Winkler  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
639dc64d6aSTomas Winkler  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
649dc64d6aSTomas Winkler  *
659dc64d6aSTomas Winkler  *****************************************************************************/
669dc64d6aSTomas Winkler #ifndef _MEI_HW_MEI_REGS_H_
679dc64d6aSTomas Winkler #define _MEI_HW_MEI_REGS_H_
689dc64d6aSTomas Winkler 
699dc64d6aSTomas Winkler /*
709dc64d6aSTomas Winkler  * MEI device IDs
719dc64d6aSTomas Winkler  */
729dc64d6aSTomas Winkler #define MEI_DEV_ID_82946GZ    0x2974  /* 82946GZ/GL */
739dc64d6aSTomas Winkler #define MEI_DEV_ID_82G35      0x2984  /* 82G35 Express */
749dc64d6aSTomas Winkler #define MEI_DEV_ID_82Q965     0x2994  /* 82Q963/Q965 */
759dc64d6aSTomas Winkler #define MEI_DEV_ID_82G965     0x29A4  /* 82P965/G965 */
769dc64d6aSTomas Winkler 
779dc64d6aSTomas Winkler #define MEI_DEV_ID_82GM965    0x2A04  /* Mobile PM965/GM965 */
789dc64d6aSTomas Winkler #define MEI_DEV_ID_82GME965   0x2A14  /* Mobile GME965/GLE960 */
799dc64d6aSTomas Winkler 
809dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_82Q35 0x29B4  /* 82Q35 Express */
819dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_82G33 0x29C4  /* 82G33/G31/P35/P31 Express */
829dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_82Q33 0x29D4  /* 82Q33 Express */
839dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_82X38 0x29E4  /* 82X38/X48 Express */
849dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_3200  0x29F4  /* 3200/3210 Server */
859dc64d6aSTomas Winkler 
869dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_6     0x28B4  /* Bearlake */
879dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_7     0x28C4  /* Bearlake */
889dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_8     0x28D4  /* Bearlake */
899dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_9     0x28E4  /* Bearlake */
909dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_10    0x28F4  /* Bearlake */
919dc64d6aSTomas Winkler 
929dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9M_1    0x2A44  /* Cantiga */
939dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9M_2    0x2A54  /* Cantiga */
949dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9M_3    0x2A64  /* Cantiga */
959dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9M_4    0x2A74  /* Cantiga */
969dc64d6aSTomas Winkler 
979dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH10_1    0x2E04  /* Eaglelake */
989dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH10_2    0x2E14  /* Eaglelake */
999dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH10_3    0x2E24  /* Eaglelake */
1009dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH10_4    0x2E34  /* Eaglelake */
1019dc64d6aSTomas Winkler 
1029dc64d6aSTomas Winkler #define MEI_DEV_ID_IBXPK_1    0x3B64  /* Calpella */
1039dc64d6aSTomas Winkler #define MEI_DEV_ID_IBXPK_2    0x3B65  /* Calpella */
1049dc64d6aSTomas Winkler 
1059dc64d6aSTomas Winkler #define MEI_DEV_ID_CPT_1      0x1C3A  /* Couger Point */
1069dc64d6aSTomas Winkler #define MEI_DEV_ID_PBG_1      0x1D3A  /* C600/X79 Patsburg */
1079dc64d6aSTomas Winkler 
1089dc64d6aSTomas Winkler #define MEI_DEV_ID_PPT_1      0x1E3A  /* Panther Point */
1099dc64d6aSTomas Winkler #define MEI_DEV_ID_PPT_2      0x1CBA  /* Panther Point */
1109dc64d6aSTomas Winkler #define MEI_DEV_ID_PPT_3      0x1DBA  /* Panther Point */
1119dc64d6aSTomas Winkler 
11276a96359STomas Winkler #define MEI_DEV_ID_LPT_H      0x8C3A  /* Lynx Point H */
113838b3a6dSTomas Winkler #define MEI_DEV_ID_LPT_W      0x8D3A  /* Lynx Point - Wellsburg */
1149dc64d6aSTomas Winkler #define MEI_DEV_ID_LPT_LP     0x9C3A  /* Lynx Point LP */
11576a96359STomas Winkler #define MEI_DEV_ID_LPT_HR     0x8CBA  /* Lynx Point H Refresh */
11676a96359STomas Winkler 
11776a96359STomas Winkler #define MEI_DEV_ID_WPT_LP     0x9CBA  /* Wildcat Point LP */
118d238a0ecSAlexander Usyskin #define MEI_DEV_ID_WPT_LP_2   0x9CBB  /* Wildcat Point LP 2 */
1195e6533a6STomas Winkler 
1209dc64d6aSTomas Winkler /*
1219dc64d6aSTomas Winkler  * MEI HW Section
1229dc64d6aSTomas Winkler  */
1239dc64d6aSTomas Winkler 
124edca5ea3SAlexander Usyskin /* Host Firmware Status Registers in PCI Config Space */
125edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_1         0x40
126bb9f4d26SAlexander Usyskin #  define PCI_CFG_HFS_1_D0I3_MSK     0x80000000
127edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_2         0x48
128edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_3         0x60
129edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_4         0x64
130edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_5         0x68
131edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_6         0x6C
132edca5ea3SAlexander Usyskin 
1339dc64d6aSTomas Winkler /* MEI registers */
1349dc64d6aSTomas Winkler /* H_CB_WW - Host Circular Buffer (CB) Write Window register */
1359dc64d6aSTomas Winkler #define H_CB_WW    0
1369dc64d6aSTomas Winkler /* H_CSR - Host Control Status register */
1379dc64d6aSTomas Winkler #define H_CSR      4
1389dc64d6aSTomas Winkler /* ME_CB_RW - ME Circular Buffer Read Window register (read only) */
1399dc64d6aSTomas Winkler #define ME_CB_RW   8
1409dc64d6aSTomas Winkler /* ME_CSR_HA - ME Control Status Host Access register (read only) */
1419dc64d6aSTomas Winkler #define ME_CSR_HA  0xC
142ad4d355bSTomas Winkler /* H_HGC_CSR - PGI register */
143ad4d355bSTomas Winkler #define H_HPG_CSR  0x10
14411830486STomas Winkler /* H_D0I3C - D0I3 Control  */
14511830486STomas Winkler #define H_D0I3C    0x800
1469dc64d6aSTomas Winkler 
1479dc64d6aSTomas Winkler /* register bits of H_CSR (Host Control Status register) */
1489dc64d6aSTomas Winkler /* Host Circular Buffer Depth - maximum number of 32-bit entries in CB */
1499dc64d6aSTomas Winkler #define H_CBD             0xFF000000
1509dc64d6aSTomas Winkler /* Host Circular Buffer Write Pointer */
1519dc64d6aSTomas Winkler #define H_CBWP            0x00FF0000
1529dc64d6aSTomas Winkler /* Host Circular Buffer Read Pointer */
1539dc64d6aSTomas Winkler #define H_CBRP            0x0000FF00
1549dc64d6aSTomas Winkler /* Host Reset */
1559dc64d6aSTomas Winkler #define H_RST             0x00000010
1569dc64d6aSTomas Winkler /* Host Ready */
1579dc64d6aSTomas Winkler #define H_RDY             0x00000008
1589dc64d6aSTomas Winkler /* Host Interrupt Generate */
1599dc64d6aSTomas Winkler #define H_IG              0x00000004
1609dc64d6aSTomas Winkler /* Host Interrupt Status */
1619dc64d6aSTomas Winkler #define H_IS              0x00000002
1629dc64d6aSTomas Winkler /* Host Interrupt Enable */
1639dc64d6aSTomas Winkler #define H_IE              0x00000001
16411830486STomas Winkler /* Host D0I3 Interrupt Enable */
16511830486STomas Winkler #define H_D0I3C_IE        0x00000020
16611830486STomas Winkler /* Host D0I3 Interrupt Status */
16711830486STomas Winkler #define H_D0I3C_IS        0x00000040
1689dc64d6aSTomas Winkler 
169*1fa55b4eSAlexander Usyskin /* H_CSR masks */
170*1fa55b4eSAlexander Usyskin #define H_CSR_IE_MASK     (H_IE | H_D0I3C_IE)
171*1fa55b4eSAlexander Usyskin #define H_CSR_IS_MASK     (H_IS | H_D0I3C_IS)
172*1fa55b4eSAlexander Usyskin 
1739dc64d6aSTomas Winkler /* register bits of ME_CSR_HA (ME Control Status Host Access register) */
1749dc64d6aSTomas Winkler /* ME CB (Circular Buffer) Depth HRA (Host Read Access) - host read only
1759dc64d6aSTomas Winkler access to ME_CBD */
1769dc64d6aSTomas Winkler #define ME_CBD_HRA        0xFF000000
1779dc64d6aSTomas Winkler /* ME CB Write Pointer HRA - host read only access to ME_CBWP */
1789dc64d6aSTomas Winkler #define ME_CBWP_HRA       0x00FF0000
1799dc64d6aSTomas Winkler /* ME CB Read Pointer HRA - host read only access to ME_CBRP */
1809dc64d6aSTomas Winkler #define ME_CBRP_HRA       0x0000FF00
181ad4d355bSTomas Winkler /* ME Power Gate Isolation Capability HRA  - host ready only access */
182ad4d355bSTomas Winkler #define ME_PGIC_HRA       0x00000040
1839dc64d6aSTomas Winkler /* ME Reset HRA - host read only access to ME_RST */
1849dc64d6aSTomas Winkler #define ME_RST_HRA        0x00000010
1859dc64d6aSTomas Winkler /* ME Ready HRA - host read only access to ME_RDY */
1869dc64d6aSTomas Winkler #define ME_RDY_HRA        0x00000008
1879dc64d6aSTomas Winkler /* ME Interrupt Generate HRA - host read only access to ME_IG */
1889dc64d6aSTomas Winkler #define ME_IG_HRA         0x00000004
1899dc64d6aSTomas Winkler /* ME Interrupt Status HRA - host read only access to ME_IS */
1909dc64d6aSTomas Winkler #define ME_IS_HRA         0x00000002
1919dc64d6aSTomas Winkler /* ME Interrupt Enable HRA - host read only access to ME_IE */
1929dc64d6aSTomas Winkler #define ME_IE_HRA         0x00000001
1939dc64d6aSTomas Winkler 
194ad4d355bSTomas Winkler 
19511830486STomas Winkler /* H_HPG_CSR register bits */
196ad4d355bSTomas Winkler #define H_HPG_CSR_PGIHEXR 0x00000001
197ad4d355bSTomas Winkler #define H_HPG_CSR_PGI     0x00000002
198ad4d355bSTomas Winkler 
19911830486STomas Winkler /* H_D0I3C register bits */
20011830486STomas Winkler #define H_D0I3C_CIP      0x00000001
20111830486STomas Winkler #define H_D0I3C_IR       0x00000002
20211830486STomas Winkler #define H_D0I3C_I3       0x00000004
20311830486STomas Winkler #define H_D0I3C_RR       0x00000008
20411830486STomas Winkler 
2059dc64d6aSTomas Winkler #endif /* _MEI_HW_MEI_REGS_H_ */
206