Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1.  /*
  2.  * Copyright © 2007 Intel Corporation
  3.  *
  4.  * Permission is hereby granted, free of charge, to any person obtaining a
  5.  * copy of this software and associated documentation files (the "Software"),
  6.  * to deal in the Software without restriction, including without limitation
  7.  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8.  * and/or sell copies of the Software, and to permit persons to whom the
  9.  * Software is furnished to do so, subject to the following conditions:
  10.  *
  11.  * The above copyright notice and this permission notice (including the next
  12.  * paragraph) shall be included in all copies or substantial portions of the
  13.  * Software.
  14.  *
  15.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  18.  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19.  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  20.  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  21.  * IN THE SOFTWARE.
  22.  *
  23.  * Authors:
  24.  *    Eric Anholt <eric@anholt.net>
  25.  *
  26.  */
  27.  
  28. #define PCI_CHIP_I810                   0x7121
  29. #define PCI_CHIP_I810_DC100             0x7123
  30. #define PCI_CHIP_I810_E                 0x7125
  31. #define PCI_CHIP_I815                   0x1132
  32.  
  33. #define PCI_CHIP_I830_M                 0x3577
  34. #define PCI_CHIP_845_G                  0x2562
  35. #define PCI_CHIP_I855_GM                0x3582
  36. #define PCI_CHIP_I865_G                 0x2572
  37.  
  38. #define PCI_CHIP_I915_G                 0x2582
  39. #define PCI_CHIP_E7221_G                0x258A
  40. #define PCI_CHIP_I915_GM                0x2592
  41. #define PCI_CHIP_I945_G                 0x2772
  42. #define PCI_CHIP_I945_GM                0x27A2
  43. #define PCI_CHIP_I945_GME               0x27AE
  44.  
  45. #define PCI_CHIP_Q35_G                  0x29B2
  46. #define PCI_CHIP_G33_G                  0x29C2
  47. #define PCI_CHIP_Q33_G                  0x29D2
  48.  
  49. #define PCI_CHIP_IGD_GM                 0xA011
  50. #define PCI_CHIP_IGD_G                  0xA001
  51.  
  52. #define IS_IGDGM(devid) (devid == PCI_CHIP_IGD_GM)
  53. #define IS_IGDG(devid)  (devid == PCI_CHIP_IGD_G)
  54. #define IS_IGD(devid) (IS_IGDG(devid) || IS_IGDGM(devid))
  55.  
  56. #define PCI_CHIP_I965_G                 0x29A2
  57. #define PCI_CHIP_I965_Q                 0x2992
  58. #define PCI_CHIP_I965_G_1               0x2982
  59. #define PCI_CHIP_I946_GZ                0x2972
  60. #define PCI_CHIP_I965_GM                0x2A02
  61. #define PCI_CHIP_I965_GME               0x2A12
  62.  
  63. #define PCI_CHIP_GM45_GM                0x2A42
  64.  
  65. #define PCI_CHIP_IGD_E_G                0x2E02
  66. #define PCI_CHIP_Q45_G                  0x2E12
  67. #define PCI_CHIP_G45_G                  0x2E22
  68. #define PCI_CHIP_G41_G                  0x2E32
  69. #define PCI_CHIP_B43_G                  0x2E42
  70. #define PCI_CHIP_B43_G1                 0x2E92
  71.  
  72. #define PCI_CHIP_ILD_G                  0x0042
  73. #define PCI_CHIP_ILM_G                  0x0046
  74.  
  75. #define PCI_CHIP_SANDYBRIDGE_GT1        0x0102  /* Desktop */
  76. #define PCI_CHIP_SANDYBRIDGE_GT2        0x0112
  77. #define PCI_CHIP_SANDYBRIDGE_GT2_PLUS   0x0122
  78. #define PCI_CHIP_SANDYBRIDGE_M_GT1      0x0106  /* Mobile */
  79. #define PCI_CHIP_SANDYBRIDGE_M_GT2      0x0116
  80. #define PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS 0x0126
  81. #define PCI_CHIP_SANDYBRIDGE_S          0x010A  /* Server */
  82.  
  83. #define PCI_CHIP_IVYBRIDGE_GT1          0x0152  /* Desktop */
  84. #define PCI_CHIP_IVYBRIDGE_GT2          0x0162
  85. #define PCI_CHIP_IVYBRIDGE_M_GT1        0x0156  /* Mobile */
  86. #define PCI_CHIP_IVYBRIDGE_M_GT2        0x0166
  87. #define PCI_CHIP_IVYBRIDGE_S_GT1        0x015a  /* Server */
  88. #define PCI_CHIP_IVYBRIDGE_S_GT2        0x016a
  89.  
  90. #define PCI_CHIP_BAYTRAIL_M_1           0x0F31
  91. #define PCI_CHIP_BAYTRAIL_M_2           0x0F32
  92. #define PCI_CHIP_BAYTRAIL_M_3           0x0F33
  93. #define PCI_CHIP_BAYTRAIL_M_4           0x0157
  94. #define PCI_CHIP_BAYTRAIL_D             0x0155
  95.  
  96. #define PCI_CHIP_HASWELL_GT1            0x0402 /* Desktop */
  97. #define PCI_CHIP_HASWELL_GT2            0x0412
  98. #define PCI_CHIP_HASWELL_GT3            0x0422
  99. #define PCI_CHIP_HASWELL_M_GT1          0x0406 /* Mobile */
  100. #define PCI_CHIP_HASWELL_M_GT2          0x0416
  101. #define PCI_CHIP_HASWELL_M_GT3          0x0426
  102. #define PCI_CHIP_HASWELL_S_GT1          0x040A /* Server */
  103. #define PCI_CHIP_HASWELL_S_GT2          0x041A
  104. #define PCI_CHIP_HASWELL_S_GT3          0x042A
  105. #define PCI_CHIP_HASWELL_SDV_GT1        0x0C02 /* Desktop */
  106. #define PCI_CHIP_HASWELL_SDV_GT2        0x0C12
  107. #define PCI_CHIP_HASWELL_SDV_GT3        0x0C22
  108. #define PCI_CHIP_HASWELL_SDV_M_GT1      0x0C06 /* Mobile */
  109. #define PCI_CHIP_HASWELL_SDV_M_GT2      0x0C16
  110. #define PCI_CHIP_HASWELL_SDV_M_GT3      0x0C26
  111. #define PCI_CHIP_HASWELL_SDV_S_GT1      0x0C0A /* Server */
  112. #define PCI_CHIP_HASWELL_SDV_S_GT2      0x0C1A
  113. #define PCI_CHIP_HASWELL_SDV_S_GT3      0x0C2A
  114. #define PCI_CHIP_HASWELL_ULT_GT1        0x0A02 /* Desktop */
  115. #define PCI_CHIP_HASWELL_ULT_GT2        0x0A12
  116. #define PCI_CHIP_HASWELL_ULT_GT3        0x0A22
  117. #define PCI_CHIP_HASWELL_ULT_M_GT1      0x0A06 /* Mobile */
  118. #define PCI_CHIP_HASWELL_ULT_M_GT2      0x0A16
  119. #define PCI_CHIP_HASWELL_ULT_M_GT3      0x0A26
  120. #define PCI_CHIP_HASWELL_ULT_S_GT1      0x0A0A /* Server */
  121. #define PCI_CHIP_HASWELL_ULT_S_GT2      0x0A1A
  122. #define PCI_CHIP_HASWELL_ULT_S_GT3      0x0A2A
  123. #define PCI_CHIP_HASWELL_CRW_GT1        0x0D02 /* Desktop */
  124. #define PCI_CHIP_HASWELL_CRW_GT2        0x0D12
  125. #define PCI_CHIP_HASWELL_CRW_GT3        0x0D22
  126. #define PCI_CHIP_HASWELL_CRW_M_GT1      0x0D06 /* Mobile */
  127. #define PCI_CHIP_HASWELL_CRW_M_GT2      0x0D16
  128. #define PCI_CHIP_HASWELL_CRW_M_GT3      0x0D26
  129. #define PCI_CHIP_HASWELL_CRW_S_GT1      0x0D0A /* Server */
  130. #define PCI_CHIP_HASWELL_CRW_S_GT2      0x0D1A
  131. #define PCI_CHIP_HASWELL_CRW_S_GT3      0x0D2A
  132.  
  133. #define IS_MOBILE(devid)        (devid == PCI_CHIP_I855_GM || \
  134.                                  devid == PCI_CHIP_I915_GM || \
  135.                                  devid == PCI_CHIP_I945_GM || \
  136.                                  devid == PCI_CHIP_I945_GME || \
  137.                                  devid == PCI_CHIP_I965_GM || \
  138.                                  devid == PCI_CHIP_I965_GME || \
  139.                                  devid == PCI_CHIP_GM45_GM || \
  140.                                  IS_IGD(devid) || \
  141.                                  devid == PCI_CHIP_ILM_G)
  142.  
  143. #define IS_G45(devid)           (devid == PCI_CHIP_IGD_E_G || \
  144.                                  devid == PCI_CHIP_Q45_G || \
  145.                                  devid == PCI_CHIP_G45_G || \
  146.                                  devid == PCI_CHIP_G41_G || \
  147.                                  devid == PCI_CHIP_B43_G || \
  148.                                  devid == PCI_CHIP_B43_G1)
  149. #define IS_GM45(devid)          (devid == PCI_CHIP_GM45_GM)
  150. #define IS_G4X(devid)           (IS_G45(devid) || IS_GM45(devid))
  151.  
  152. #define IS_ILD(devid)           (devid == PCI_CHIP_ILD_G)
  153. #define IS_ILM(devid)           (devid == PCI_CHIP_ILM_G)
  154. #define IS_GEN5(devid)          (IS_ILD(devid) || IS_ILM(devid))
  155.  
  156. #define IS_915(devid)           (devid == PCI_CHIP_I915_G || \
  157.                                  devid == PCI_CHIP_E7221_G || \
  158.                                  devid == PCI_CHIP_I915_GM)
  159.  
  160. #define IS_945(devid)           (devid == PCI_CHIP_I945_G || \
  161.                                  devid == PCI_CHIP_I945_GM || \
  162.                                  devid == PCI_CHIP_I945_GME || \
  163.                                  devid == PCI_CHIP_G33_G || \
  164.                                  devid == PCI_CHIP_Q33_G || \
  165.                                  devid == PCI_CHIP_Q35_G || IS_IGD(devid))
  166.  
  167. #define IS_GEN4(devid)          (devid == PCI_CHIP_I965_G || \
  168.                                  devid == PCI_CHIP_I965_Q || \
  169.                                  devid == PCI_CHIP_I965_G_1 || \
  170.                                  devid == PCI_CHIP_I965_GM || \
  171.                                  devid == PCI_CHIP_I965_GME || \
  172.                                  devid == PCI_CHIP_I946_GZ || \
  173.                                  IS_G4X(devid))
  174.  
  175. /* Compat macro for intel_decode.c */
  176. #define IS_IRONLAKE(devid)      IS_GEN5(devid)
  177.  
  178. #define IS_SNB_GT1(devid)       (devid == PCI_CHIP_SANDYBRIDGE_GT1 || \
  179.                                  devid == PCI_CHIP_SANDYBRIDGE_M_GT1 || \
  180.                                  devid == PCI_CHIP_SANDYBRIDGE_S)
  181.  
  182. #define IS_SNB_GT2(devid)       (devid == PCI_CHIP_SANDYBRIDGE_GT2 || \
  183.                                  devid == PCI_CHIP_SANDYBRIDGE_GT2_PLUS || \
  184.                                  devid == PCI_CHIP_SANDYBRIDGE_M_GT2 || \
  185.                                  devid == PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS)
  186.  
  187. #define IS_GEN6(devid)          (IS_SNB_GT1(devid) || IS_SNB_GT2(devid))
  188.  
  189. #define IS_IVB_GT1(devid)       (devid == PCI_CHIP_IVYBRIDGE_GT1 || \
  190.                                  devid == PCI_CHIP_IVYBRIDGE_M_GT1 || \
  191.                                  devid == PCI_CHIP_IVYBRIDGE_S_GT1)
  192.  
  193. #define IS_IVB_GT2(devid)       (devid == PCI_CHIP_IVYBRIDGE_GT2 || \
  194.                                  devid == PCI_CHIP_IVYBRIDGE_M_GT2 || \
  195.                                  devid == PCI_CHIP_IVYBRIDGE_S_GT2)
  196.  
  197. #define IS_IVYBRIDGE(devid)     (IS_IVB_GT1(devid) || IS_IVB_GT2(devid))
  198.  
  199. #define IS_BAYTRAIL(devid)      (devid == PCI_CHIP_BAYTRAIL_M_1 || \
  200.                                  devid == PCI_CHIP_BAYTRAIL_M_2 || \
  201.                                  devid == PCI_CHIP_BAYTRAIL_M_3 || \
  202.                                  devid == PCI_CHIP_BAYTRAIL_M_4 || \
  203.                                  devid == PCI_CHIP_BAYTRAIL_D)
  204.  
  205. #define IS_GEN7(devid)          (IS_IVYBRIDGE(devid) || \
  206.                                  IS_BAYTRAIL(devid) || \
  207.                                  IS_HASWELL(devid))
  208.  
  209. #define IS_HSW_GT1(devid)       (devid == PCI_CHIP_HASWELL_GT1 || \
  210.                                  devid == PCI_CHIP_HASWELL_M_GT1 || \
  211.                                  devid == PCI_CHIP_HASWELL_S_GT1 || \
  212.                                  devid == PCI_CHIP_HASWELL_SDV_GT1 || \
  213.                                  devid == PCI_CHIP_HASWELL_SDV_M_GT1 || \
  214.                                  devid == PCI_CHIP_HASWELL_SDV_S_GT1 || \
  215.                                  devid == PCI_CHIP_HASWELL_ULT_GT1 || \
  216.                                  devid == PCI_CHIP_HASWELL_ULT_M_GT1 || \
  217.                                  devid == PCI_CHIP_HASWELL_ULT_S_GT1 || \
  218.                                  devid == PCI_CHIP_HASWELL_CRW_GT1 || \
  219.                                  devid == PCI_CHIP_HASWELL_CRW_M_GT1 || \
  220.                                  devid == PCI_CHIP_HASWELL_CRW_S_GT1)
  221. #define IS_HSW_GT2(devid)       (devid == PCI_CHIP_HASWELL_GT2 || \
  222.                                  devid == PCI_CHIP_HASWELL_M_GT2 || \
  223.                                  devid == PCI_CHIP_HASWELL_S_GT2 || \
  224.                                  devid == PCI_CHIP_HASWELL_SDV_GT2 || \
  225.                                  devid == PCI_CHIP_HASWELL_SDV_M_GT2 || \
  226.                                  devid == PCI_CHIP_HASWELL_SDV_S_GT2 || \
  227.                                  devid == PCI_CHIP_HASWELL_ULT_GT2 || \
  228.                                  devid == PCI_CHIP_HASWELL_ULT_M_GT2 || \
  229.                                  devid == PCI_CHIP_HASWELL_ULT_S_GT2 || \
  230.                                  devid == PCI_CHIP_HASWELL_CRW_GT2 || \
  231.                                  devid == PCI_CHIP_HASWELL_CRW_M_GT2 || \
  232.                                  devid == PCI_CHIP_HASWELL_CRW_S_GT2)
  233. #define IS_HSW_GT3(devid)       (devid == PCI_CHIP_HASWELL_GT3 || \
  234.                                  devid == PCI_CHIP_HASWELL_M_GT3 || \
  235.                                  devid == PCI_CHIP_HASWELL_S_GT3 || \
  236.                                  devid == PCI_CHIP_HASWELL_SDV_GT3 || \
  237.                                  devid == PCI_CHIP_HASWELL_SDV_M_GT3 || \
  238.                                  devid == PCI_CHIP_HASWELL_SDV_S_GT3 || \
  239.                                  devid == PCI_CHIP_HASWELL_ULT_GT3 || \
  240.                                  devid == PCI_CHIP_HASWELL_ULT_M_GT3 || \
  241.                                  devid == PCI_CHIP_HASWELL_ULT_S_GT3 || \
  242.                                  devid == PCI_CHIP_HASWELL_CRW_GT3 || \
  243.                                  devid == PCI_CHIP_HASWELL_CRW_M_GT3 || \
  244.                                  devid == PCI_CHIP_HASWELL_CRW_S_GT3)
  245.  
  246. #define IS_HASWELL(devid)       (IS_HSW_GT1(devid) || \
  247.                                  IS_HSW_GT2(devid) || \
  248.                                  IS_HSW_GT3(devid))
  249.  
  250. #define IS_965(devid)           (IS_GEN4(devid) || \
  251.                                  IS_G4X(devid) || \
  252.                                  IS_GEN5(devid) || \
  253.                                  IS_GEN6(devid) || \
  254.                                  IS_GEN7(devid))
  255.  
  256. #define IS_9XX(devid)           (IS_915(devid) || \
  257.                                  IS_945(devid) || \
  258.                                  IS_965(devid))
  259.  
  260. #define IS_GEN3(devid)          (IS_915(devid) ||       \
  261.                                  IS_945(devid))
  262.  
  263. #define IS_GEN2(devid)          (devid == PCI_CHIP_I830_M || \
  264.                                  devid == PCI_CHIP_845_G ||  \
  265.                                  devid == PCI_CHIP_I855_GM ||   \
  266.                                  devid == PCI_CHIP_I865_G)
  267.