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 1201625c7ecSTomas Winkler #define MEI_DEV_ID_SPT 0x9D3A /* Sunrise Point */ 1211625c7ecSTomas Winkler #define MEI_DEV_ID_SPT_2 0x9D3B /* Sunrise Point 2 */ 1221625c7ecSTomas Winkler #define MEI_DEV_ID_SPT_H 0xA13A /* Sunrise Point H */ 1231625c7ecSTomas Winkler #define MEI_DEV_ID_SPT_H_2 0xA13B /* Sunrise Point H 2 */ 124dd16f6cdSTomas Winkler 1259ff2007bSTomas Winkler #define MEI_DEV_ID_LBG 0xA1BA /* Lewisburg (SPT) */ 1269ff2007bSTomas Winkler 127dd16f6cdSTomas Winkler #define MEI_DEV_ID_BXT_M 0x1A9A /* Broxton M */ 128dd16f6cdSTomas Winkler #define MEI_DEV_ID_APL_I 0x5A9A /* Apollo Lake I */ 129dd16f6cdSTomas Winkler 130*f7ee8eadSTomas Winkler #define MEI_DEV_ID_DNV_IE 0x19E5 /* Denverton IE */ 131*f7ee8eadSTomas Winkler 132688cb678STomas Winkler #define MEI_DEV_ID_GLK 0x319A /* Gemini Lake */ 133688cb678STomas Winkler 134ac182e8aSAlexander Usyskin #define MEI_DEV_ID_KBP 0xA2BA /* Kaby Point */ 135ac182e8aSAlexander Usyskin #define MEI_DEV_ID_KBP_2 0xA2BB /* Kaby Point 2 */ 136ac182e8aSAlexander Usyskin 137f8f4aa68SAlexander Usyskin #define MEI_DEV_ID_CNP_LP 0x9DE0 /* Cannon Point LP */ 1382a4ac172STomas Winkler #define MEI_DEV_ID_CNP_LP_4 0x9DE4 /* Cannon Point LP 4 (iTouch) */ 139f8f4aa68SAlexander Usyskin #define MEI_DEV_ID_CNP_H 0xA360 /* Cannon Point H */ 1402a4ac172STomas Winkler #define MEI_DEV_ID_CNP_H_4 0xA364 /* Cannon Point H 4 (iTouch) */ 141f8f4aa68SAlexander Usyskin 1429dc64d6aSTomas Winkler /* 1439dc64d6aSTomas Winkler * MEI HW Section 1449dc64d6aSTomas Winkler */ 1459dc64d6aSTomas Winkler 146edca5ea3SAlexander Usyskin /* Host Firmware Status Registers in PCI Config Space */ 147edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_1 0x40 148bb9f4d26SAlexander Usyskin # define PCI_CFG_HFS_1_D0I3_MSK 0x80000000 149edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_2 0x48 150edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_3 0x60 151edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_4 0x64 152edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_5 0x68 153edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_6 0x6C 154edca5ea3SAlexander Usyskin 1559dc64d6aSTomas Winkler /* MEI registers */ 1569dc64d6aSTomas Winkler /* H_CB_WW - Host Circular Buffer (CB) Write Window register */ 1579dc64d6aSTomas Winkler #define H_CB_WW 0 1589dc64d6aSTomas Winkler /* H_CSR - Host Control Status register */ 1599dc64d6aSTomas Winkler #define H_CSR 4 1609dc64d6aSTomas Winkler /* ME_CB_RW - ME Circular Buffer Read Window register (read only) */ 1619dc64d6aSTomas Winkler #define ME_CB_RW 8 1629dc64d6aSTomas Winkler /* ME_CSR_HA - ME Control Status Host Access register (read only) */ 1639dc64d6aSTomas Winkler #define ME_CSR_HA 0xC 164ad4d355bSTomas Winkler /* H_HGC_CSR - PGI register */ 165ad4d355bSTomas Winkler #define H_HPG_CSR 0x10 16611830486STomas Winkler /* H_D0I3C - D0I3 Control */ 16711830486STomas Winkler #define H_D0I3C 0x800 1689dc64d6aSTomas Winkler 1699dc64d6aSTomas Winkler /* register bits of H_CSR (Host Control Status register) */ 1709dc64d6aSTomas Winkler /* Host Circular Buffer Depth - maximum number of 32-bit entries in CB */ 1719dc64d6aSTomas Winkler #define H_CBD 0xFF000000 1729dc64d6aSTomas Winkler /* Host Circular Buffer Write Pointer */ 1739dc64d6aSTomas Winkler #define H_CBWP 0x00FF0000 1749dc64d6aSTomas Winkler /* Host Circular Buffer Read Pointer */ 1759dc64d6aSTomas Winkler #define H_CBRP 0x0000FF00 1769dc64d6aSTomas Winkler /* Host Reset */ 1779dc64d6aSTomas Winkler #define H_RST 0x00000010 1789dc64d6aSTomas Winkler /* Host Ready */ 1799dc64d6aSTomas Winkler #define H_RDY 0x00000008 1809dc64d6aSTomas Winkler /* Host Interrupt Generate */ 1819dc64d6aSTomas Winkler #define H_IG 0x00000004 1829dc64d6aSTomas Winkler /* Host Interrupt Status */ 1839dc64d6aSTomas Winkler #define H_IS 0x00000002 1849dc64d6aSTomas Winkler /* Host Interrupt Enable */ 1859dc64d6aSTomas Winkler #define H_IE 0x00000001 18611830486STomas Winkler /* Host D0I3 Interrupt Enable */ 18711830486STomas Winkler #define H_D0I3C_IE 0x00000020 18811830486STomas Winkler /* Host D0I3 Interrupt Status */ 18911830486STomas Winkler #define H_D0I3C_IS 0x00000040 1909dc64d6aSTomas Winkler 1911fa55b4eSAlexander Usyskin /* H_CSR masks */ 1921fa55b4eSAlexander Usyskin #define H_CSR_IE_MASK (H_IE | H_D0I3C_IE) 1931fa55b4eSAlexander Usyskin #define H_CSR_IS_MASK (H_IS | H_D0I3C_IS) 1941fa55b4eSAlexander Usyskin 1959dc64d6aSTomas Winkler /* register bits of ME_CSR_HA (ME Control Status Host Access register) */ 1969dc64d6aSTomas Winkler /* ME CB (Circular Buffer) Depth HRA (Host Read Access) - host read only 1979dc64d6aSTomas Winkler access to ME_CBD */ 1989dc64d6aSTomas Winkler #define ME_CBD_HRA 0xFF000000 1999dc64d6aSTomas Winkler /* ME CB Write Pointer HRA - host read only access to ME_CBWP */ 2009dc64d6aSTomas Winkler #define ME_CBWP_HRA 0x00FF0000 2019dc64d6aSTomas Winkler /* ME CB Read Pointer HRA - host read only access to ME_CBRP */ 2029dc64d6aSTomas Winkler #define ME_CBRP_HRA 0x0000FF00 203ad4d355bSTomas Winkler /* ME Power Gate Isolation Capability HRA - host ready only access */ 204ad4d355bSTomas Winkler #define ME_PGIC_HRA 0x00000040 2059dc64d6aSTomas Winkler /* ME Reset HRA - host read only access to ME_RST */ 2069dc64d6aSTomas Winkler #define ME_RST_HRA 0x00000010 2079dc64d6aSTomas Winkler /* ME Ready HRA - host read only access to ME_RDY */ 2089dc64d6aSTomas Winkler #define ME_RDY_HRA 0x00000008 2099dc64d6aSTomas Winkler /* ME Interrupt Generate HRA - host read only access to ME_IG */ 2109dc64d6aSTomas Winkler #define ME_IG_HRA 0x00000004 2119dc64d6aSTomas Winkler /* ME Interrupt Status HRA - host read only access to ME_IS */ 2129dc64d6aSTomas Winkler #define ME_IS_HRA 0x00000002 2139dc64d6aSTomas Winkler /* ME Interrupt Enable HRA - host read only access to ME_IE */ 2149dc64d6aSTomas Winkler #define ME_IE_HRA 0x00000001 2159dc64d6aSTomas Winkler 216ad4d355bSTomas Winkler 21711830486STomas Winkler /* H_HPG_CSR register bits */ 218ad4d355bSTomas Winkler #define H_HPG_CSR_PGIHEXR 0x00000001 219ad4d355bSTomas Winkler #define H_HPG_CSR_PGI 0x00000002 220ad4d355bSTomas Winkler 22111830486STomas Winkler /* H_D0I3C register bits */ 22211830486STomas Winkler #define H_D0I3C_CIP 0x00000001 22311830486STomas Winkler #define H_D0I3C_IR 0x00000002 22411830486STomas Winkler #define H_D0I3C_I3 0x00000004 22511830486STomas Winkler #define H_D0I3C_RR 0x00000008 22611830486STomas Winkler 2279dc64d6aSTomas Winkler #endif /* _MEI_HW_MEI_REGS_H_ */ 228