Chameleon

Chameleon Commit Details

Date:2013-09-02 18:03:40 (1 year 1 month ago)
Author:ErmaC
Commit:2262
Parents: 2261
Message:Add from Enoch, IVY Bridge and Haswell gfx cards support. www.insanelymac.com/forum/topic/288241-intel-hd4000-and-haswell-injec t-aaplig-platform-id Special credits for test and suggestion to Micky1979 and bcc9.
Changes:
M/trunk/i386/libsaio/gma.c
M/trunk/i386/libsaio/gma.h
M/trunk/CHANGES

File differences

trunk/i386/libsaio/gma.c
11
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
228
329
430
531
32
33
634
735
836
......
2553
2654
2755
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
5085
5186
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
52135
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
69152
70153
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
88172
89173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
90192
91193
92194
......
112214
113215
114216
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
143348
144349
145
350
351
352
353
354
355
356
146357
358
147359
148
360
149361
150
151
362
363
364
365
366
367
152368
153
369
370
371
154372
155373
156374
......
160378
161379
162380
381
382
163383
164
165
384
385
386
166387
167388
168389
169390
170391
171
172
392
173393
174
175
394
395
396
397
398
176399
177400
178401
......
192415
193416
194417
195
196
418
419
197420
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
421
422
423
424
425
426
427
428
429
430
431
309432
310
311
312
313
314
315
316
317
318
319
320
321
322
323
433
434
435
436
437
438
439
440
324441
325
326
327
328
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
329686
330687
331688
......
336693
337694
338695
696
339697
340698
341699
/*
* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
* All Rights Reserved.
* Copyright © 2010 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
/*
Original patch by Nawcom
http://forum.voodooprojects.org/index.php/topic,1029.0.html
Original Intel HDx000 code from valv
Intel Ivy Bridge and Haswell code from ErmaC:
- http://www.insanelymac.com/forum/topic/288241-intel-hd4000-inject-aaplig-platform-id/
*/
#include "libsa.h"
#define DBG(x...)
#endif
uint8_t GMAX3100_vals[22][4] = {
{ 0x01,0x00,0x00,0x00 },
{ 0x01,0x00,0x00,0x00 },
{ 0x01,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x08 },
{ 0x64,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x08 },
{ 0x01,0x00,0x00,0x00 },
{ 0x20,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x01,0x00,0x00,0x00 },
{ 0x20,0x03,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x08,0x52,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x01,0x00,0x00,0x00 },
{ 0x01,0x00,0x00,0x00 },
{ 0x3B,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 }
static uint8_t default_aapl_ivy[]={ 0x05,0x00,0x62,0x01 }; // ivy_bridge_ig_vals[5]
#define AAPL_LEN_IVY ( sizeof(default_aapl_ivy) / sizeof(uint8_t) )
static uint8_t default_aapl_haswell[]={ 0x00,0x00,0x26,0x0c }; // haswell_ig_vals[7]
#define AAPL_LEN_HSW ( sizeof(default_aapl_haswell) / sizeof(uint8_t) )
uint8_t GMAX3100_vals[23][4] = {
{ 0x01,0x00,0x00,0x00 },//0 "AAPL,HasPanel"
{ 0x01,0x00,0x00,0x00 },//1 "AAPL,SelfRefreshSupported"
{ 0x01,0x00,0x00,0x00 },//2 "AAPL,aux-power-connected"
{ 0x00,0x00,0x00,0x08 },//3 "AAPL,backlight-control"
{ 0x64,0x00,0x00,0x00 },//4 "AAPL00,blackscreen-preferences"
{ 0x00,0x00,0x00,0x08 },//5 "AAPL01,BacklightIntensity"
{ 0x01,0x00,0x00,0x00 },//6 "AAPL01,blackscreen-preferences"
{ 0x20,0x00,0x00,0x00 },//7 "AAPL01,DataJustify"
{ 0x00,0x00,0x00,0x00 },//8 "AAPL01,Depth"
{ 0x01,0x00,0x00,0x00 },//9 "AAPL01,Dither"
{ 0x20,0x03,0x00,0x00 },//10 "AAPL01,DualLink"
{ 0x00,0x00,0x00,0x00 },//11 "AAPL01,Height"
{ 0x00,0x00,0x00,0x00 },//12 "AAPL01,Interlace"
{ 0x00,0x00,0x00,0x00 },//13 "AAPL01,Inverter"
{ 0x08,0x52,0x00,0x00 },//14 "AAPL01,InverterCurrent"
{ 0x00,0x00,0x00,0x00 },//15 "AAPL01,InverterCurrency"
{ 0x00,0x00,0x00,0x00 },//16 "AAPL01,LinkFormat"
{ 0x01,0x00,0x00,0x00 },//17 "AAPL01,LinkType"
{ 0x01,0x00,0x00,0x00 },//18 "AAPL01,Pipe"
{ 0x3B,0x00,0x00,0x00 },//19 "AAPL01,PixelFormat"
{ 0x00,0x00,0x00,0x00 },//20 "AAPL01,Refresh"
{ 0x6B,0x10,0x00,0x00 },//21 "AAPL01,Stretch"
{ 0xc8,0x95,0x00,0x00 },//22 "AAPL01,InverterFrequency"
};
uint8_t ivy_bridge_ig_vals[12][4] = {
{ 0x00,0x00,0x66,0x01 },//0 "AAPL,ig-platform-id" //FB: 96MB, Pipes: 3, Ports: 4, FBMem: 3
{ 0x01,0x00,0x66,0x01 },//1 "AAPL,ig-platform-id" //FB: 96MB, Pipes: 3, Ports: 4, FBMem: 3
{ 0x02,0x00,0x66,0x01 },//2 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 3, Ports: 1, FBMem: 1
{ 0x03,0x00,0x66,0x01 },//3 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 2, Ports: 2, FBMem: 2
{ 0x04,0x00,0x66,0x01 },//4 "AAPL,ig-platform-id" //FB: 32MB, Pipes: 3, Ports: 1, FBMem: 1
{ 0x05,0x00,0x62,0x01 },//5 "AAPL,ig-platform-id" //FB: 32MB, Pipes: 2, Ports: 3, FBMem: 2
{ 0x06,0x00,0x62,0x01 },//6 "AAPL,ig-platform-id" //FB: 0MB, Pipes: 0, Ports: 0, FBMem: 0
{ 0x07,0x00,0x62,0x01 },//7 "AAPL,ig-platform-id" //FB: 0MB, Pipes: 0, Ports: 0, FBMem: 0
{ 0x08,0x00,0x66,0x01 },//8 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 3, Ports: 3, FBMem: 3
{ 0x09,0x00,0x66,0x01 },//9 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 3, Ports: 3, FBMem: 3
{ 0x0a,0x00,0x66,0x01 },//10 "AAPL,ig-platform-id" //FB: 32MB, Pipes: 2, Ports: 3, FBMem: 2
{ 0x0b,0x00,0x66,0x01 }//11 "AAPL,ig-platform-id" //FB: 32MB, Pipes: 2, Ports: 3, FBMem: 2
};
uint8_t haswell_ig_vals[16][4] = { /* - TESTING DATA --*/
{ 0x00,0x00,0x06,0x04 },// 0 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 3, Ports: 3, FBMem: 3 - mobile GT1
{ 0x00,0x00,0x06,0x0c },// 1 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 3, Ports: 3, FBMem: 3 - SDV mobile GT1
{ 0x00,0x00,0x16,0x04 },// 2 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 3, Ports: 3, FBMem: 3 - mobile GT2
{ 0x00,0x00,0x16,0x0a },// 3 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 3, Ports: 3, FBMem: 3 - ULT mobile GT2
{ 0x00,0x00,0x16,0x0c },// 4 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 3, Ports: 3, FBMem: 3 - SDV mobile GT2
{ 0x00,0x00,0x26,0x04 },// 5 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 3, Ports: 3, FBMem: 3 - mobile GT3
{ 0x00,0x00,0x26,0x0a },// 6 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 3, Ports: 3, FBMem: 3 - ULT mobile GT3
{ 0x00,0x00,0x26,0x0c },// 7 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 3, Ports: 3, FBMem: 3 - SDV mobile GT3
{ 0x00,0x00,0x26,0x0d }, // 8 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 3, Ports: 3, FBMem: 3 - CRW mobile GT3
{ 0x02,0x00,0x16,0x04 },// 9 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 1, Ports: 1, FBMem: 1 - mobile GT2
{ 0x03,0x00,0x22,0x0d }, // 10 "AAPL,ig-platform-id" //FB: 0MB, Pipes: 0, Ports: 0, FBMem: 0 - CRW Desktop GT3
{ 0x05,0x00,0x26,0x0a },// 11 "AAPL,ig-platform-id" //FB: 32MB, Pipes: 3, Ports: 3, FBMem: 3 - ULT mobile GT3
{ 0x06,0x00,0x26,0x0a },// 12 "AAPL,ig-platform-id" //FB: 32MB, Pipes: 3, Ports: 3, FBMem: 3 - ULT mobile GT3
{ 0x07,0x00,0x26,0x0d }, // 13 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 3, Ports: 4, FBMem: 3 - CRW mobile GT3
{ 0x08,0x00,0x26,0x0a },// 14 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 3, Ports: 3, FBMem: 3 - ULT mobile GT3
{ 0x08,0x00,0x2e,0x0a },// 15 "AAPL,ig-platform-id" //FB: 64MB, Pipes: 3, Ports: 3, FBMem: 3 - ULT reserved GT3
};
/*
platform-Id
00 00 06 04//Intel Haswell Mobile (GT1)
00 00 16 04//Intel Haswell Mobile (GT2)
00 00 26 04//Intel Haswell Mobile (GT3)
00 00 16 0A//Intel Haswell ULT Mobile (GT2)
00 00 26 0A//Intel Haswell ULT Mobile (GT3)
00 00 26 0D//Intel Haswell CRW Mobile (GT3) - ???
00 00 26 0C//Intel Haswell SDV Mobile (GT3) - Software Development Vehicle
00 00 16 0C//Intel Haswell SDV Mobile HD 4600 (GT2) - Software Development Vehicle
00 00 06 0C//Intel Haswell SDV Mobile (GT1) - Software Development Vehicle
00 00 26 0A//Intel Haswell ULT Mobile (GT3)
*/
uint8_t HD2000_vals[16][4] = {
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x14,0x00,0x00,0x00 },
{ 0xfa,0x00,0x00,0x00 },
{ 0x2c,0x01,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x14,0x00,0x00,0x00 },
{ 0xf4,0x01,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x01,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 }, //0 "AAPL00,PixelFormat"
{ 0x00,0x00,0x00,0x00 }, //1 "AAPL00,T1"
{ 0x14,0x00,0x00,0x00 }, //2 "AAPL00,T2"
{ 0xfa,0x00,0x00,0x00 }, //3 "AAPL00,T3"
{ 0x2c,0x01,0x00,0x00 }, //4 "AAPL00,T4"
{ 0x00,0x00,0x00,0x00 }, //5 "AAPL00,T5"
{ 0x14,0x00,0x00,0x00 }, //6 "AAPL00,T6"
{ 0xf4,0x01,0x00,0x00 }, //7 "AAPL00,T7"
{ 0x00,0x00,0x00,0x00 }, //8 "AAPL00,LinkType"
{ 0x00,0x00,0x00,0x00 }, //9 "AAPL00,LinkFormat"
{ 0x00,0x00,0x00,0x00 }, //10 "AAPL00,DualLink"
{ 0x00,0x00,0x00,0x00 }, //11 "AAPL00,Dither"
{ 0x00,0x00,0x00,0x00 }, //12 "AAPL00,DataJustify"
{ 0x00,0x00,0x00,0x00 }, //13 "graphic-options"
{ 0x00,0x00,0x00,0x00 }, //14
{ 0x01,0x00,0x00,0x00 } //15
};
uint8_t HD3000_vals[16][4] = {
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x14,0x00,0x00,0x00 },
{ 0xfa,0x00,0x00,0x00 },
{ 0x2c,0x01,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x14,0x00,0x00,0x00 },
{ 0xf4,0x01,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x00,0x00,0x00,0x00 },
{ 0x01,0x00,0x00,0x00 },
uint8_t HD3000_vals[17][4] = {
{ 0x00,0x00,0x00,0x00 }, //0 "AAPL00,PixelFormat"
{ 0x00,0x00,0x00,0x00 }, //1 "AAPL00,T1"
{ 0x14,0x00,0x00,0x00 }, //2 "AAPL00,T2"
{ 0xfa,0x00,0x00,0x00 }, //3 "AAPL00,T3"
{ 0x2c,0x01,0x00,0x00 }, //4 "AAPL00,T4"
{ 0x00,0x00,0x00,0x00 }, //5 "AAPL00,T5"
{ 0x14,0x00,0x00,0x00 }, //6 "AAPL00,T6"
{ 0xf4,0x01,0x00,0x00 }, //7 "AAPL00,T7"
{ 0x00,0x00,0x00,0x00 }, //8 "AAPL00,LinkType"
{ 0x00,0x00,0x00,0x00 }, //9 "AAPL00,LinkFormat"
{ 0x00,0x00,0x00,0x00 }, //10 "AAPL00,DualLink"
{ 0x00,0x00,0x00,0x00 }, //11 "AAPL00,Dither"
{ 0x00,0x00,0x00,0x00 }, //12 "AAPL00,DataJustify"
{ 0x00,0x00,0x00,0x00 }, //13 "graphic-options"
{ 0x00,0x00,0x00,0x00 }, //14
{ 0x01,0x00,0x00,0x00 }, //15
{ 0x00,0x00,0x01,0x00 } //16 AAPL,snb-platform-id
};
uint8_t HD4000_vals[15][4] = {
{ 0x00,0x00,0x00,0x00 }, //0 "AAPL00,PixelFormat"
{ 0x00,0x00,0x00,0x00 }, //1 "AAPL00,T1"
{ 0x01,0x00,0x00,0x00 }, //2 "AAPL00,T2"
{ 0xc8,0x00,0x00,0x00 }, //3 "AAPL00,T3"
{ 0xc8,0x00,0x00,0x00 }, //4 "AAPL00,T4"
{ 0x01,0x00,0x00,0x00 }, //5 "AAPL00,T5"
{ 0x00,0x00,0x00,0x00 }, //6 "AAPL00,T6"
{ 0x90,0x01,0x00,0x00 }, //7 "AAPL00,T7"
{ 0x01,0x00,0x00,0x00 }, //8 "AAPL00,LinkType"
{ 0x00,0x00,0x00,0x00 }, //9 "AAPL00,LinkFormat"
{ 0x01,0x00,0x00,0x00 }, //10 "AAPL00,DualLink"
{ 0x00,0x00,0x00,0x00 }, //11 "AAPL00,Dither"
{ 0xc3,0x8c,0x64,0x00 }, //12 "AAPL,gray-value"
{ 0x01,0x00,0x00,0x00 }, //13 "AAPL,gray-page"
{ 0x0c,0x00,0x00,0x00 } //14 "graphics-options"
};
uint8_t HD2000_tbl_info[18] = {
0x30,0x44,0x02,0x02,0x02,0x02,0x00,0x00,0x00,
0x00,0x01,0x02,0x02,0x02,0x00,0x01,0x02,0x02
uint8_t reg_TRUE[]= { 0x01, 0x00, 0x00, 0x00 };
uint8_t reg_FALSE[] = { 0x00, 0x00, 0x00, 0x00 };
static struct gma_gpu_t KnownGPUS[] = {
{ 0x00000000, "Unknown"},
{ 0x808627A2, "Mobile GMA950"},
{ 0x808627AE, "Mobile GMA950"},
{ 0x808627A6, "Mobile GMA950"},
{ 0x8086A011, "Mobile GMA3150"},
{ 0x8086A012, "Mobile GMA3150"},
{ 0x80862772, "Desktop GMA950"},
{ 0x80862776, "Desktop GMA950"},
//{ 0x8086A001, "Desktop GMA3150" },
{ 0x8086A001, "Mobile GMA3150"},
{ 0x8086A002, "Desktop GMA3150" },
{ 0x80862A02, "GMAX3100"},
{ 0x80862A03, "GMAX3100"},
{ 0x80862A12, "GMAX3100"},
{ 0x80862A13, "GMAX3100"},
{ 0x80862A42, "GMAX3100"},
{ 0x80862A43, "GMAX3100"},
{ 0x80860102, "HD Graphics 2000"},
{ 0x80860106, "HD Graphics 2000 Mobile"},
{ 0x80860152, "Intel HD Graphics 2500" },
{ 0x80860156, "Intel HD Graphics 2500 Mobile"},
{ 0x80860112, "HD Graphics 3000"},
{ 0x80860116, "HD Graphics 3000 Mobile"},
{ 0x80860122, "HD Graphics 3000"},
{ 0x80860126, "HD Graphics 3000 Mobile"},
{ 0x80860162, "HD Graphics 4000" },
{ 0x80860166, "HD Graphics 4000 Mobile" },
// https://en.wikipedia.org/wiki/Comparison_of_Intel_graphics_processing_units#Seventh_generation
/* http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/tree/src/intel_module.c */
static intel_gfx_info_t intel_gfx_chipsets[] = {
{GMA_I810, "i810"},
{GMA_I810_DC100, "i810-dc100"},
{GMA_I810_E, "i810e"},
{GMA_I815, "i815"},
{GMA_I830_M, "i830M"},
{GMA_845_G, "845G"},
{GMA_I854, "854"},
{GMA_I855_GM, "852GM/855GM"},
{GMA_I865_G, "865G"},
{GMA_I915_G, "915G"},
{GMA_E7221_G, "E7221 (i915)"},
{GMA_I915_GM, "915GM"},
{GMA_I945_G, "945G"},
// 2776 /* Desktop GMA950 */
// 2782 /* GMA 915 */
// 2792 /* Mobile GMA915 */
{GMA_I945_GM, "945GM"},
{GMA_I945_GME, "945GME"},
// 27A6 /* Mobile GMA950 */
// 29C3 /* Desktop GMA3100 */
{GMA_PINEVIEW_M, "Pineview GM"},
{GMA_GMA3150_M, "Pineview GM"},// A012 /* Mobile GMA3150 */
{GMA_PINEVIEW_G, "Pineview G"},
{GMA_GMA3150_D, "Desktop GMA3150"}, // A002 /* Desktop GMA3150 */
{GMA_I965_G, "965G"},
{GMA_G35_G, "G35"},
{GMA_I965_Q, "965Q"},
{GMA_I946_GZ, "946GZ"},
{GMA_I965_GM, "965GM"},
{GMA_I965_GME, "965GME/GLE"},
{GMA_G33_G, "G33"},
// 2A13 /* GMAX3100 */
// 2A43 /* GMAX3100 */
{GMA_Q35_G, "Q35"},
{GMA_Q33_G, "Q33"},
{GMA_GM45_GM, "GM45"},
{GMA_G45_E_G, "4 Series"},
{GMA_G45_G, "G45/G43"},
{GMA_Q45_G, "Q45/Q43"},
{GMA_G41_G, "G41"},
{GMA_B43_G, "B43"},
{GMA_B43_G1, "B43"},
/**/
{GMA_IRONLAKE_D_G, HD_GRAPHICS},
{GMA_IRONLAKE_M_G, HD_GRAPHICS},
// 004A /* HD2000 */
/* Sandy */
{GMA_SANDYBRIDGE_GT1, HD_GRAPHICS_2000 },
{GMA_SANDYBRIDGE_GT2, HD_GRAPHICS_3000 },
{GMA_SANDYBRIDGE_GT2_PLUS,HD_GRAPHICS_3000 },
{GMA_SANDYBRIDGE_M_GT1,HD_GRAPHICS_2000 },
{GMA_SANDYBRIDGE_M_GT2,HD_GRAPHICS_3000 },
{GMA_SANDYBRIDGE_M_GT2_PLUS,HD_GRAPHICS_3000 },
{GMA_SANDYBRIDGE_S_GT, HD_GRAPHICS },
// 010B /* ??? */
// 010E /* ??? */
/* Ivy */
{GMA_IVYBRIDGE_M_GT1, HD_GRAPHICS_2500 },
{GMA_IVYBRIDGE_M_GT2, HD_GRAPHICS_4000 },
{GMA_IVYBRIDGE_D_GT1, HD_GRAPHICS_2500 },
{GMA_IVYBRIDGE_D_GT2, HD_GRAPHICS_4000 },
{GMA_IVYBRIDGE_S_GT1, HD_GRAPHICS },
// 015E /* ??? */
{GMA_IVYBRIDGE_S_GT2, "HD Graphics P4000" },
// 0172 /* HD Graphics 2500 Mobile */
// 0176 /* HD Graphics 2500 Mobile */
/* Haswell */
// 0090 /* ??? */
// 0091 /* ??? */
// 0092 /* ??? */
{GMA_HASWELL_D_GT1, HD_GRAPHICS },
{GMA_HASWELL_D_GT2, HD_GRAPHICS_4600 },
{GMA_HASWELL_D_GT3, HD_GRAPHICS_5000 }, /* ??? */
{GMA_HASWELL_M_GT1, HD_GRAPHICS },
{GMA_HASWELL_M_GT2, HD_GRAPHICS_4600 },
{GMA_HASWELL_M_GT3, HD_GRAPHICS_5000 }, /* ??? */
{GMA_HASWELL_S_GT1, HD_GRAPHICS },
{GMA_HASWELL_S_GT2, "HD Graphics P4600/P4700" },
{GMA_HASWELL_S_GT3, HD_GRAPHICS_5000 }, /* ??? */
{GMA_HASWELL_B_GT1, HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_B_GT2, HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_B_GT3, HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_E_GT1, HD_GRAPHICS },
{GMA_HASWELL_E_GT2, HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_E_GT3, HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_ULT_D_GT1,HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_ULT_D_GT2,HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_ULT_D_GT3,IRIS_5100 },
{GMA_HASWELL_ULT_M_GT1,HD_GRAPHICS },
{GMA_HASWELL_ULT_M_GT2,"HD Graphics 4400" },
{GMA_HASWELL_ULT_M_GT3,HD_GRAPHICS_5000 },
{GMA_HASWELL_ULT_S_GT1,HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_ULT_S_GT2,HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_ULT_S_GT3,IRIS_5100 },
{GMA_HASWELL_ULT_B_GT1,HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_ULT_B_GT2,HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_ULT_B_GT3,IRIS_5100 },
{GMA_HASWELL_ULT_E_GT1,HD_GRAPHICS },
{GMA_HASWELL_ULT_E_GT2,"HD Graphics 4200" },
// 0A2A /* ??? */
{GMA_HASWELL_ULT_E_GT3,IRIS_5100 },
// 0C02 /* Intel Haswell HD Graphics - GTL */
// 0C04 /* ??? */
// 0C06 /* Intel Haswell HD Graphics - GTL */
// 0C12 /* Intel Haswell HD Graphics - GTM */
// 0C16 /* Intel Haswell HD Graphics - GTH */
// 0C22 /* Intel Haswell HD Graphics - GTH */
// 0C26 /* Intel Haswell HD Graphics - GTH */
{GMA_HASWELL_CRW_D_GT1,HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_CRW_D_GT2,HD_GRAPHICS_4600 },
{GMA_HASWELL_CRW_D_GT3,IRIS_5200 },
{GMA_HASWELL_CRW_M_GT1,HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_CRW_M_GT2,HD_GRAPHICS_4600 },
{GMA_HASWELL_CRW_M_GT3,IRIS_5200 },
{GMA_HASWELL_CRW_S_GT1,HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_CRW_S_GT2,HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_CRW_S_GT3,IRIS_5200 },
{GMA_HASWELL_CRW_B_GT1,HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_CRW_B_GT2,HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_CRW_B_GT3,IRIS_5200 },
{GMA_HASWELL_CRW_E_GT1,HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_CRW_E_GT2,HD_GRAPHICS }, /* ??? */
{GMA_HASWELL_CRW_E_GT3,IRIS_5200 }
};
char *get_gma_model(uint32_t id) {
#define GFX_DEVICES_LEN (sizeof(intel_gfx_chipsets) / sizeof(intel_gfx_chipsets[0]))
/* END http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/tree/src/intel_module.c */
/* Get Intel GFX device name */
static char *get_gma_controller_name(uint16_t device_id, uint16_t vendor_id)
{
int i = 0;
static char desc[128];
for (i = 0; i < (sizeof(KnownGPUS) / sizeof(KnownGPUS[0])); i++)
for (i = 0; i < GFX_DEVICES_LEN; i++)
{
if (KnownGPUS[i].device == id)
return KnownGPUS[i].name;
if (intel_gfx_chipsets[i].model == ((device_id << 16) | vendor_id))
{
sprintf(desc, "%s %s", INTEL_NAME, intel_gfx_chipsets[i].label_info);
desc[sizeof(desc) - 1] = '\0';
return desc;
}
}
return KnownGPUS[0].name;
sprintf(desc, "Unknown %s Graphics card", INTEL_NAME);
desc[sizeof(desc) - 1] = '\0';
return desc;
}
bool setup_gma_devprop(pci_dt_t *gma_dev)
uint32_tbar[7];
char*model = NULL;
uint8_t BuiltIn =0x00;
uint16_tvendor_id = gma_dev->vendor_id;
uint16_tdevice_id = gma_dev->device_id;
uint8_t ClassFix[4] = { 0x00, 0x00, 0x03, 0x00 };
unsigned intdevice_id;
intn_igs = 0;
intlen;
const char*value;
devicepath = get_pci_dev_path(gma_dev);
bar[0] = pci_config_read32(gma_dev->dev.addr, 0x10);
regs = (uint8_t *) (bar[0] & ~0x0f);
model = get_gma_model((gma_dev->vendor_id << 16) | gma_dev->device_id);
device_id = gma_dev->device_id;
model = get_gma_controller_name(device_id, vendor_id);
verbose("Intel %s [%04x:%04x] :: %s\n",
model, gma_dev->vendor_id, gma_dev->device_id, devicepath);
verbose("---------------------------------------------\n");
verbose("------------ INTEL DEVICE INFO --------------\n");
verbose("---------------------------------------------\n");
verbose("Class code: [%04x]\n%s [%04x:%04x] (rev %02x)\nSubsystem: [%04x:%04x] :: %s\n",
gma_dev->class_id, model, gma_dev->vendor_id, gma_dev->device_id, gma_dev->revision_id, gma_dev->subsys_id.subsys.vendor_id, gma_dev->subsys_id.subsys.device_id, devicepath);
if (!string)
{
devprop_add_value(device, "model", (uint8_t*)model, (strlen(model) + 1));
devprop_add_value(device, "device_type", (uint8_t*)"display", 8);
if ((model == (char *)&"Mobile GMA950")
|| (model == (char *)&"Mobile GMA3150"))
switch ((device_id << 16) | vendor_id)
{
devprop_add_value(device, "AAPL,HasPanel", reg_TRUE, 4);
devprop_add_value(device, "built-in", &BuiltIn, 1);
devprop_add_value(device, "class-code", ClassFix, 4);
}
else if ((model == (char *)&"Desktop GMA950")
|| (model == (char *)&"Desktop GMA3150"))
{
BuiltIn = 0x01;
devprop_add_value(device, "built-in", &BuiltIn, 1);
devprop_add_value(device, "class-code", ClassFix, 4);
}
else if (model == (char *)&"GMAX3100")
{
devprop_add_value(device, "AAPL,HasPanel",GMAX3100_vals[0], 4);
devprop_add_value(device, "AAPL,SelfRefreshSupported",GMAX3100_vals[1], 4);
devprop_add_value(device, "AAPL,aux-power-connected",GMAX3100_vals[2], 4);
devprop_add_value(device, "AAPL,backlight-control",GMAX3100_vals[3], 4);
devprop_add_value(device, "AAPL00,blackscreen-preferences", GMAX3100_vals[4], 4);
devprop_add_value(device, "AAPL01,BacklightIntensity",GMAX3100_vals[5], 4);
devprop_add_value(device, "AAPL01,blackscreen-preferences", GMAX3100_vals[6], 4);
devprop_add_value(device, "AAPL01,DataJustify",GMAX3100_vals[7], 4);
devprop_add_value(device, "AAPL01,Depth",GMAX3100_vals[8], 4);
devprop_add_value(device, "AAPL01,Dither",GMAX3100_vals[9], 4);
devprop_add_value(device, "AAPL01,DualLink",GMAX3100_vals[10], 4);
devprop_add_value(device, "AAPL01,Height",GMAX3100_vals[11], 4);
devprop_add_value(device, "AAPL01,Interlace",GMAX3100_vals[12], 4);
devprop_add_value(device, "AAPL01,Inverter",GMAX3100_vals[13], 4);
devprop_add_value(device, "AAPL01,InverterCurrent",GMAX3100_vals[14], 4);
devprop_add_value(device, "AAPL01,InverterCurrency",GMAX3100_vals[15], 4);
devprop_add_value(device, "AAPL01,LinkFormat",GMAX3100_vals[16], 4);
devprop_add_value(device, "AAPL01,LinkType",GMAX3100_vals[17], 4);
devprop_add_value(device, "AAPL01,Pipe",GMAX3100_vals[18], 4);
devprop_add_value(device, "AAPL01,PixelFormat",GMAX3100_vals[19], 4);
devprop_add_value(device, "AAPL01,Refresh",GMAX3100_vals[20], 4);
devprop_add_value(device, "AAPL01,Stretch",GMAX3100_vals[21], 4);
devprop_add_value(device, "class-code",ClassFix, 4);
}
else if (model == (char *)&"HD Graphics 2000 Mobile")
{
devprop_add_value(device, "class-code", ClassFix, 4);
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL00,PixelFormat", HD2000_vals[0], 4);
devprop_add_value(device, "AAPL00,T1", HD2000_vals[1], 4);
devprop_add_value(device, "AAPL00,T2", HD2000_vals[2], 4);
devprop_add_value(device, "AAPL00,T3", HD2000_vals[3], 4);
devprop_add_value(device, "AAPL00,T4", HD2000_vals[4], 4);
devprop_add_value(device, "AAPL00,T5", HD2000_vals[5], 4);
devprop_add_value(device, "AAPL00,T6", HD2000_vals[6], 4);
devprop_add_value(device, "AAPL00,T7", HD2000_vals[7], 4);
devprop_add_value(device, "AAPL00,LinkType", HD2000_vals[8], 4);
devprop_add_value(device, "AAPL00,LinkFormat", HD2000_vals[9], 4);
devprop_add_value(device, "AAPL00,DualLink", HD2000_vals[10], 4);
devprop_add_value(device, "AAPL00,Dither", HD2000_vals[11], 4);
devprop_add_value(device, "AAPL00,DataJustify", HD3000_vals[12], 4);
devprop_add_value(device, "graphic-options", HD2000_vals[13], 4);
devprop_add_value(device, "AAPL,tbl-info", HD2000_tbl_info, 18);
devprop_add_value(device, "AAPL,os-info", HD2000_os_info, 20);
}
else if (model == (char *)&"HD Graphics 3000 Mobile")
{
devprop_add_value(device, "class-code", ClassFix, 4);
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL00,PixelFormat", HD3000_vals[0], 4);
devprop_add_value(device, "AAPL00,T1", HD3000_vals[1], 4);
devprop_add_value(device, "AAPL00,T2", HD3000_vals[2], 4);
devprop_add_value(device, "AAPL00,T3", HD3000_vals[3], 4);
devprop_add_value(device, "AAPL00,T4", HD3000_vals[4], 4);
devprop_add_value(device, "AAPL00,T5", HD3000_vals[5], 4);
devprop_add_value(device, "AAPL00,T6", HD3000_vals[6], 4);
devprop_add_value(device, "AAPL00,T7", HD3000_vals[7], 4);
devprop_add_value(device, "AAPL00,LinkType", HD3000_vals[8], 4);
devprop_add_value(device, "AAPL00,LinkFormat", HD3000_vals[9], 4);
devprop_add_value(device, "AAPL00,DualLink", HD3000_vals[10], 4);
devprop_add_value(device, "AAPL00,Dither", HD3000_vals[11], 4);
devprop_add_value(device, "AAPL00,DataJustify", HD3000_vals[12], 4);
devprop_add_value(device, "graphic-options", HD3000_vals[13], 4);
devprop_add_value(device, "AAPL,tbl-info", HD3000_tbl_info, 18);
devprop_add_value(device, "AAPL,os-info", HD3000_os_info, 20);
}
else if (model == (char *)&"HD Graphics 2000")
{
devprop_add_value(device, "built-in", &BuiltIn, 1);
devprop_add_value(device, "class-code", ClassFix, 4);
devprop_add_value(device, "device-id", (uint8_t*)&device_id, sizeof(device_id));
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL,tbl-info", HD2000_tbl_info, 18);
devprop_add_value(device, "AAPL,os-info", HD2000_os_info, 20);
}
else if (model == (char *)&"HD Graphics 3000")
{
devprop_add_value(device, "built-in", &BuiltIn, 1);
devprop_add_value(device, "class-code", ClassFix, 4);
device_id = 0x00000126;// Inject a valid mobile GPU device id instead of patching kexts
devprop_add_value(device, "device-id", (uint8_t*)&device_id, sizeof(device_id));
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL,tbl-info", HD3000_tbl_info, 18);
devprop_add_value(device, "AAPL,os-info", HD3000_os_info, 20);
}
else if(model == (char*)&"HD Graphics 4000" ||
model == (char*)&"HD Graphics 4000 Mobile" ||
model == (char*)&"Intel HD Graphics 2500" ||
model == (char*)&"Intel HD Graphics 2500 Mobile")
{
uint32_t ram = (((getVBEVideoRam() + 512) / 1024) + 512) / 1024;
uint32_t ig_platform_id;
switch (ram)
{
case 96:
ig_platform_id = 0x01660000; // 96mb
break;
/* 27A2, 27AE, 27A6, A001, A011, A012, */
case GMA_I945_GM: // Mobile GMA950 Mobile GMA3150
case GMA_I945_GME:
//case GMA_945GM:
case GMA_PINEVIEW_G:
case GMA_PINEVIEW_M:
case GMA_GMA3150_M:
devprop_add_value(device, "AAPL,HasPanel", reg_TRUE, 4);
devprop_add_value(device, "built-in", &BuiltIn, 1);
devprop_add_value(device, "class-code", ClassFix, 4);
break;
case 64:
ig_platform_id = 0x01660009; // 64mb
break;
case 32:
ig_platform_id = 0x01620005; // 32mb
break;
default:
printf("Please specify 96, 64, or 32MB RAM for the HD4000 in the bios.\n"
"The selected %dMB RAM configuration is not supported for the HD4000.\n", ram);
pause();
return false;// Exit early before the AAPL,ig-platform-id property is set.
break;
}
/* 2772 ,2776, A002 */
case GMA_I945_G: // Desktop GMA950 Desktop GMA3150
//case GMA_82945G:
case GMA_GMA3150_D:
BuiltIn = 0x01;
devprop_add_value(device, "built-in", &BuiltIn, 1);
devprop_add_value(device, "class-code", ClassFix, 4);
break;
devprop_add_value(device, "built-in", &BuiltIn, 1);
devprop_add_value(device, "class-code", ClassFix, 4);
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL,ig-platform-id", (uint8_t*)&ig_platform_id, 4);
/* 2A02, 2A12, 2A13, 2A42, 2A43 */
case GMA_I965_GM: // GMAX3100
case GMA_I965_GME:
//case 0x80862A13:
case GMA_GM45_GM:
//case GMA_GM45_GM2:
devprop_add_value(device, "AAPL,HasPanel", GMAX3100_vals[0], 4);
devprop_add_value(device, "AAPL,SelfRefreshSupported",GMAX3100_vals[1], 4);
devprop_add_value(device, "AAPL,aux-power-connected",GMAX3100_vals[2], 4);
devprop_add_value(device, "AAPL,backlight-control", GMAX3100_vals[3], 4);
devprop_add_value(device, "AAPL00,blackscreen-preferences",GMAX3100_vals[4], 4);
devprop_add_value(device, "AAPL01,BacklightIntensity",GMAX3100_vals[5], 4);
devprop_add_value(device, "AAPL01,blackscreen-preferences",GMAX3100_vals[6], 4);
devprop_add_value(device, "AAPL01,DataJustify", GMAX3100_vals[7], 4);
devprop_add_value(device, "AAPL01,Depth", GMAX3100_vals[8], 4);
devprop_add_value(device, "AAPL01,Dither", GMAX3100_vals[9], 4);
devprop_add_value(device, "AAPL01,DualLink", GMAX3100_vals[10], 4);
devprop_add_value(device, "AAPL01,Height", GMAX3100_vals[11], 4);
devprop_add_value(device, "AAPL01,Interlace", GMAX3100_vals[12], 4);
devprop_add_value(device, "AAPL01,Inverter", GMAX3100_vals[13], 4);
devprop_add_value(device, "AAPL01,InverterCurrent", GMAX3100_vals[14], 4);
devprop_add_value(device, "AAPL01,InverterCurrency",GMAX3100_vals[15], 4);
devprop_add_value(device, "AAPL01,LinkFormat", GMAX3100_vals[16], 4);
devprop_add_value(device, "AAPL01,LinkType", GMAX3100_vals[17], 4);
devprop_add_value(device, "AAPL01,Pipe", GMAX3100_vals[18], 4);
devprop_add_value(device, "AAPL01,PixelFormat", GMAX3100_vals[19], 4);
devprop_add_value(device, "AAPL01,Refresh", GMAX3100_vals[20], 4);
devprop_add_value(device, "AAPL01,Stretch", GMAX3100_vals[21], 4);
//devprop_add_value(device, "AAPL01,InverterFrequency",GMAX3100_vals[22], 4);
devprop_add_value(device, "class-code", ClassFix, 4);
break;
/* 0106 */
case GMA_SANDYBRIDGE_M_GT1: // HD Graphics 2000 Mobile
devprop_add_value(device, "class-code", ClassFix, 4);
devprop_add_value(device, "hda-gfx",(uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL00,PixelFormat",HD2000_vals[0], 4);
devprop_add_value(device, "AAPL00,T1",HD2000_vals[1], 4);
devprop_add_value(device, "AAPL00,T2",HD2000_vals[2], 4);
devprop_add_value(device, "AAPL00,T3",HD2000_vals[3], 4);
devprop_add_value(device, "AAPL00,T4",HD2000_vals[4], 4);
devprop_add_value(device, "AAPL00,T5",HD2000_vals[5], 4);
devprop_add_value(device, "AAPL00,T6",HD2000_vals[6], 4);
devprop_add_value(device, "AAPL00,T7",HD2000_vals[7], 4);
devprop_add_value(device, "AAPL00,LinkType",HD2000_vals[8], 4);
devprop_add_value(device, "AAPL00,LinkFormat",HD2000_vals[9], 4);
devprop_add_value(device, "AAPL00,DualLink",HD2000_vals[10], 4);
devprop_add_value(device, "AAPL00,Dither",HD2000_vals[11], 4);
devprop_add_value(device, "AAPL00,DataJustify",HD3000_vals[12], 4);
devprop_add_value(device, "graphic-options",HD2000_vals[13], 4);
devprop_add_value(device, "AAPL,tbl-info",HD2000_tbl_info, 18);
devprop_add_value(device, "AAPL,os-info",HD2000_os_info, 20);
break;
/* 0116, 0126 */
case GMA_SANDYBRIDGE_M_GT2: // HD Graphics 3000 Mobile
case GMA_SANDYBRIDGE_M_GT2_PLUS:
devprop_add_value(device, "class-code",ClassFix, 4);
devprop_add_value(device, "hda-gfx",(uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL00,PixelFormat",HD3000_vals[0], 4);
devprop_add_value(device, "AAPL00,T1",HD3000_vals[1], 4);
devprop_add_value(device, "AAPL00,T2",HD3000_vals[2], 4);
devprop_add_value(device, "AAPL00,T3",HD3000_vals[3], 4);
devprop_add_value(device, "AAPL00,T4",HD3000_vals[4], 4);
devprop_add_value(device, "AAPL00,T5",HD3000_vals[5], 4);
devprop_add_value(device, "AAPL00,T6",HD3000_vals[6], 4);
devprop_add_value(device, "AAPL00,T7",HD3000_vals[7], 4);
devprop_add_value(device, "AAPL00,LinkType",HD3000_vals[8], 4);
devprop_add_value(device, "AAPL00,LinkFormat",HD3000_vals[9], 4);
devprop_add_value(device, "AAPL00,DualLink",HD3000_vals[10], 4);
devprop_add_value(device, "AAPL00,Dither",HD3000_vals[11], 4);
devprop_add_value(device, "AAPL00,DataJustify",HD3000_vals[12], 4);
devprop_add_value(device, "graphic-options",HD3000_vals[13], 4);
devprop_add_value(device, "AAPL,tbl-info",HD3000_tbl_info, 18);
devprop_add_value(device, "AAPL,os-info",HD3000_os_info, 20);
devprop_add_value(device, "AAPL,snb-platform-id",HD3000_vals[16], 4);// previusly commented
break;
/* 0102 */
case GMA_SANDYBRIDGE_GT1: // HD Graphics 2000
devprop_add_value(device, "built-in",&BuiltIn, 1);
devprop_add_value(device, "class-code",ClassFix, 4);
devprop_add_value(device, "device-id",(uint8_t*)&device_id, sizeof(device_id));
devprop_add_value(device, "hda-gfx",(uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL,tbl-info",HD2000_tbl_info, 18);
devprop_add_value(device, "AAPL,os-info",HD2000_os_info, 20);
break;
/* Sandy Bridge */ /* 0112, 0122 */
case GMA_SANDYBRIDGE_GT2: // HD Graphics 3000
case GMA_SANDYBRIDGE_GT2_PLUS:
devprop_add_value(device, "built-in",&BuiltIn, 1);
devprop_add_value(device, "class-code",ClassFix, 4);
device_id = 0x00000126;// Inject a valid mobile GPU device id instead of patching kexts
devprop_add_value(device, "device-id",(uint8_t*)&device_id, sizeof(device_id));
devprop_add_value(device, "hda-gfx",(uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL,tbl-info",HD3000_tbl_info, 18);
devprop_add_value(device, "AAPL,os-info",HD3000_os_info, 20);
break;
/* Ivy Bridge */ /* 0152, 0156, 015a, 015e, 0162, 0166, 016a, 0172, 0176 */
case GMA_IVYBRIDGE_D_GT1: // HD Graphics 4000, HD Graphics 4000 Mobile, HD Graphics P4000, HD Graphics 2500 HD, Graphics 2500 Mobile
case GMA_IVYBRIDGE_M_GT1:
case GMA_IVYBRIDGE_S_GT1:
//case 0x8086015e:
case GMA_IVYBRIDGE_D_GT2:
case GMA_IVYBRIDGE_M_GT2:
case GMA_IVYBRIDGE_S_GT2:
//case 0x80860172:
//case 0x80860176:
if (getValueForKey(kAAPLCustomIG, &value, &len, &bootInfo->chameleonConfig) && len == AAPL_LEN_IVY * 2)
{
uint8_t new_aapl0[AAPL_LEN_IVY];
if (hex2bin(value, new_aapl0, AAPL_LEN_IVY) == 0)
{
memcpy(default_aapl_ivy, new_aapl0, AAPL_LEN_IVY);
verbose("Using user supplied AAPL,ig-platform-id\n");
verbose("AAPL,ig-platform-id: %02x%02x%02x%02x\n",
default_aapl_ivy[0], default_aapl_ivy[1], default_aapl_ivy[2], default_aapl_ivy[3]);
}
devprop_add_value(device, "AAPL,ig-platform-id", default_aapl_ivy, AAPL_LEN_IVY);
}
else if (getIntForKey(kIntelCapriFB, &n_igs, &bootInfo->chameleonConfig))
{
if ((n_igs >= 0) || (n_igs <= 11))
{
verbose("AAPL,ig-platform-id was set in org.chameleon.Boot.plist with value %d\n", n_igs);
devprop_add_value(device, "AAPL,ig-platform-id", ivy_bridge_ig_vals[n_igs], 4);
}
else
{
verbose("AAPL,ig-platform-id was set in org.chameleon.Boot.plist with bad value please choose a number between 0 and 11.\n");
}
}
else
{
uint32_t ig_platform_id;
uint32_t ram = (((getVBEVideoRam() + 512) / 1024) + 512) / 1024;
switch (ram)
{
case 96:
ig_platform_id = 0x01660000; // 96mb Mobile
break;
case 64:
ig_platform_id = 0x01660009; // 64mb Mobile
break;
case 32:
ig_platform_id = 0x01620005; // 32mb Desktop
break;
default:
printf("Please specify 96, 64, or 32MB RAM for the HD4000 in the bios.\n"
"The selected %dMB RAM configuration is not supported for the HD4000.\n", ram);
pause();
return false;// Exit early before the AAPL,ig-platform-id property is set.
break;
}
devprop_add_value(device, "AAPL,ig-platform-id", (uint8_t *)&ig_platform_id, 4);
}
devprop_add_value(device, "AAPL00,DualLink", HD4000_vals[10], 4);
devprop_add_value(device, "built-in", &BuiltIn, 1);
devprop_add_value(device, "class-code", ClassFix, 4);
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
break;
/* Haswell */ // HD Graphics 5000, HD Graphics 5000 Mobile, HD Graphics P5000, HD Graphics 4600, HD Graphics 4600 Mobile
//case 0x80860090:
//case 0x80860091:
//case 0x80860092:
case GMA_HASWELL_D_GT1: // 0402
case GMA_HASWELL_M_GT1: // 0406
case GMA_HASWELL_S_GT1: // 040a
case GMA_HASWELL_D_GT2: // 0412
case GMA_HASWELL_M_GT2: // 0416
case GMA_HASWELL_S_GT2: // 041a
case GMA_HASWELL_D_GT3: // 0422
case GMA_HASWELL_M_GT3: // 0426
case GMA_HASWELL_S_GT3: // 042a
case GMA_HASWELL_ULT_M_GT1: // 0a06
case GMA_HASWELL_ULT_E_GT1: // 0a0e
case GMA_HASWELL_ULT_M_GT2: // 0a16
case GMA_HASWELL_ULT_E_GT2: // 0a1e
case GMA_HASWELL_ULT_D_GT3: // 0a22
case GMA_HASWELL_ULT_M_GT3: // 0a26
case GMA_HASWELL_ULT_S_GT3: // 0a2a
case GMA_HASWELL_ULT_E_GT3: // 0a2e
//case GMA_HASWELL_SDV_D_GT1_IG: // 0c02
//case GMA_HASWELL_SDV_M_GT1_IG: // 0c06
//case GMA_HASWELL_SDV_D_GT2_IG: // 0c12
//case GMA_HASWELL_SDV_M_GT2_IG: // 0c16
//case GMA_HASWELL_SDV_D_GT2_PLUS_IG: // 0c22
//case GMA_HASWELL_SDV_M_GT2_PLUS_IG: // 0c26
case GMA_HASWELL_CRW_D_GT2: // 0d12
case GMA_HASWELL_CRW_D_GT3: // 0d22
case GMA_HASWELL_CRW_M_GT2: // 0d16
case GMA_HASWELL_CRW_M_GT3: // 0d26
//case GMA_HASWELL_CRW_M_GT2_PLUS_IG: // 0d36
if (getValueForKey(kAAPLCustomIG, &value, &len, &bootInfo->chameleonConfig) && len == AAPL_LEN_HSW * 2)
{
uint8_t new_aapl0[AAPL_LEN_HSW];
if (hex2bin(value, new_aapl0, AAPL_LEN_HSW) == 0)
{
memcpy(default_aapl_haswell, new_aapl0, AAPL_LEN_HSW);
verbose("Using user supplied AAPL,ig-platform-id\n");
verbose("AAPL,ig-platform-id: %02x%02x%02x%02x\n",
default_aapl_haswell[0], default_aapl_haswell[1], default_aapl_haswell[2], default_aapl_haswell[3]);
}
devprop_add_value(device, "AAPL,ig-platform-id", default_aapl_haswell, AAPL_LEN_HSW);
}
else if (getIntForKey(kIntelAzulFB, &n_igs, &bootInfo->chameleonConfig))
{
if ((n_igs >= 0) || (n_igs <= 15))
{
verbose("AAPL,ig-platform-id was set in org.chameleon.Boot.plist with value %d\n", n_igs);
devprop_add_value(device, "AAPL,ig-platform-id", haswell_ig_vals[n_igs], 4);
}
else
{
verbose("AAPL,ig-platform-id was set in org.chameleon.Boot.plist with bad value please choose a number between 0 and 15.\n");
}
}
else
{
uint32_t ig_platform_id = 0x0000260c; // set the default platform ig
devprop_add_value(device, "AAPL,ig-platform-id", (uint8_t *)&ig_platform_id, 4);
}
devprop_add_value(device, "AAPL00,DualLink", HD4000_vals[10], 4);
devprop_add_value(device, "built-in", &BuiltIn, 1);
devprop_add_value(device, "class-code", ClassFix, 4);
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
break;
default:
break;
}
stringdata = malloc(sizeof(uint8_t) * string->length);
return false;
}
verbose("---------------------------------------------\n");
memcpy(stringdata, (uint8_t*)devprop_generate_string(string), string->length);
stringlength = string->length;
trunk/i386/libsaio/gma.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
134
235
336
......
336
437
5
6
7
8
38
39
40
41
42
943
1044
1145
1246
1347
48
49
50
1451
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
15237
/*
* Copyright 2013 Intel Corporation
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/*
Original patch by Nawcom
http://forum.voodooprojects.org/index.php/topic,1029.0.html
Original Intel HDx000 code from valv
Intel HD4xx and HD5xx code by ErmaC http://www.insanelymac.com/forum/topic/288241-intel-hd4000-inject-aaplig-platform-id/
*/
#ifndef __LIBSAIO_GMA_H
#define __LIBSAIO_GMA_H
bool setup_gma_devprop(pci_dt_t *gma_dev);
struct gma_gpu_t {
unsigned device;
char *name;
};
struct intel_gfx_info_t;
typedef struct{
uint32_tmodel;
char*label_info;
}intel_gfx_info_t;
#define REG8(reg)((volatile uint8_t *)regs)[(reg)]
#define REG16(reg)((volatile uint16_t *)regs)[(reg) >> 1]
#define REG32(reg)((volatile uint32_t *)regs)[(reg) >> 2]
/****************************************************************************
* Miscellanious defines
****************************************************************************/
/* Intel gfx Controller models */
#define GFX_MODEL_CONSTRUCT(vendor, model) (((uint32_t)(model) << 16) | ((vendor##_VENDORID) & 0xffff))
/* Intel */
#define INTEL_NAME "Intel"
#define HD_GRAPHICS "HD Graphics"
#define HD_GRAPHICS_2000 "HD Graphics 2000"
#define HD_GRAPHICS_2500 "HD Graphics 2500"
#define HD_GRAPHICS_3000 "HD Graphics 3000"
#define HD_GRAPHICS_4000 "HD Graphics 4000"
#define HD_GRAPHICS_4600 "HD Graphics 4600"
#define HD_GRAPHICS_5000 "HD Graphics 5000"
#define IRIS_5100 "Iris(TM) Graphics 5100"
#define IRIS_5200 "Iris(TM) Pro Graphics 5200"
#define INTEL_VENDORID0x8086
/* http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/tree/src/intel_driver.h */
/* http://people.redhat.com/agk/patches/linux/patches-3.6/git-update1.patch */
#define GMA_I810 GFX_MODEL_CONSTRUCT(INTEL, 0x7121)
#define GMA_I810_DC100 GFX_MODEL_CONSTRUCT(INTEL, 0x7123)
#define GMA_I810_E GFX_MODEL_CONSTRUCT(INTEL, 0x7125)
#define GMA_I815 GFX_MODEL_CONSTRUCT(INTEL, 0x1132)
/* ==================================== */
#define GMA_I830_M GFX_MODEL_CONSTRUCT(INTEL, 0x3577)
#define GMA_845_G GFX_MODEL_CONSTRUCT(INTEL, 0x2562)
#define GMA_I854 GFX_MODEL_CONSTRUCT(INTEL, 0x358E)
#define GMA_I855_GM GFX_MODEL_CONSTRUCT(INTEL, 0x3582)
#define GMA_I865_G GFX_MODEL_CONSTRUCT(INTEL, 0x2572)
/* ==================================== */
#define GMA_I915_G GFX_MODEL_CONSTRUCT(INTEL, 0x2582) // GMA 915
#define GMA_I915_GM GFX_MODEL_CONSTRUCT(INTEL, 0x2592) // GMA 915
#define GMA_E7221_G GFX_MODEL_CONSTRUCT(INTEL, 0x258A)
#define GMA_I945_G GFX_MODEL_CONSTRUCT(INTEL, 0x2772) // Desktop GMA950
//#define GMA_82945G GFX_MODEL_CONSTRUCT(INTEL, 2776) // Desktop GMA950
//#define GMA_82915G GFX_MODEL_CONSTRUCT(INTEL, 2782) // GMA 915
//#define GMA_038000 GFX_MODEL_CONSTRUCT(INTEL, 2792) // Mobile GMA915
#define GMA_I945_GM GFX_MODEL_CONSTRUCT(INTEL, 0x27A2) // Mobile GMA950
#define GMA_I945_GME GFX_MODEL_CONSTRUCT(INTEL, 0x27AE) // Mobile GMA950
//#define GMA_945GM GFX_MODEL_CONSTRUCT(INTEL, 27A6) // Mobile GMA950
//#define GMA_PINEVIEW_M_HB GFX_MODEL_CONSTRUCT(INTEL, 0xA010)
#define GMA_PINEVIEW_M GFX_MODEL_CONSTRUCT(INTEL, 0xA011) // Mobile GMA3150
#define GMA_GMA3150_M GFX_MODEL_CONSTRUCT(INTEL, 0xA012) // Mobile GMA3150
//#define GMA_PINEVIEW_HB GFX_MODEL_CONSTRUCT(INTEL, 0xA000)
#define GMA_PINEVIEW_G GFX_MODEL_CONSTRUCT(INTEL, 0xA001) // Mobile GMA3150
#define GMA_GMA3150_D GFX_MODEL_CONSTRUCT(INTEL, 0xA002) // Desktop GMA3150
#define GMA_Q35_G GFX_MODEL_CONSTRUCT(INTEL, 0x29B2)
#define GMA_G33_G GFX_MODEL_CONSTRUCT(INTEL, 0x29C2) // Desktop GMA3100
// 29C3 // Desktop GMA3100
#define GMA_Q33_G GFX_MODEL_CONSTRUCT(INTEL, 0x29D2)
/* ==================================== */
#define GMA_G35_G GFX_MODEL_CONSTRUCT(INTEL, 0x2982)
#define GMA_I965_Q GFX_MODEL_CONSTRUCT(INTEL, 0x2992)
#define GMA_I965_G GFX_MODEL_CONSTRUCT(INTEL, 0x29A2)
#define GMA_I946_GZ GFX_MODEL_CONSTRUCT(INTEL, 0x2972)
#define GMA_I965_GM GFX_MODEL_CONSTRUCT(INTEL, 0x2A02) // GMAX3100
#define GMA_I965_GME GFX_MODEL_CONSTRUCT(INTEL, 0x2A12) // GMAX3100
#define GMA_GM45_GM GFX_MODEL_CONSTRUCT(INTEL, 0x2A42) // GMAX3100
//#define GMA_GM45_GM2 GFX_MODEL_CONSTRUCT(INTEL, 0x2A43) // GMAX3100
#define GMA_G45_E_G GFX_MODEL_CONSTRUCT(INTEL, 0x2E02)
#define GMA_G45_G GFX_MODEL_CONSTRUCT(INTEL, 0x2E22)
#define GMA_Q45_G GFX_MODEL_CONSTRUCT(INTEL, 0x2E12)
#define GMA_G41_G GFX_MODEL_CONSTRUCT(INTEL, 0x2E32)
#define GMA_B43_G GFX_MODEL_CONSTRUCT(INTEL, 0x2E42)
#define GMA_B43_G1 GFX_MODEL_CONSTRUCT(INTEL, 0x2E92)
#define GMA_IRONLAKE_D_G GFX_MODEL_CONSTRUCT(INTEL, 0x0042) // HD2000
#define GMA_IRONLAKE_M_G GFX_MODEL_CONSTRUCT(INTEL, 0x0046) // HD2000
/*
#define GMA_IRONLAKE_D_HB GFX_MODEL_CONSTRUCT(INTEL, 0x0040)
#define GMA_IRONLAKE_D2_HB GFX_MODEL_CONSTRUCT(INTEL, 0x0069)
#define GMA_IRONLAKE_M_HB GFX_MODEL_CONSTRUCT(INTEL, 0x0044)
#define GMA_IRONLAKE_MA_HB GFX_MODEL_CONSTRUCT(INTEL, 0x0062)
#define GMA_IRONLAKE_MC2_HB GFX_MODEL_CONSTRUCT(INTEL, 0x006a)
*/
// 004A // HD2000
/* ==================================== */
/* ========== Sandy Bridge ============ */
//#define GMA_SANDYBRIDGE_HB GFX_MODEL_CONSTRUCT(INTEL, 0x0100) /* Desktop */
#define GMA_SANDYBRIDGE_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x0102) // HD Graphics 2000
//#define GMA_SANDYBRIDGE_M_HB GFX_MODEL_CONSTRUCT(INTEL, 0x0104) /* Mobile */
#define GMA_SANDYBRIDGE_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x0112) // HD Graphics 3000
#define GMA_SANDYBRIDGE_GT2_PLUSGFX_MODEL_CONSTRUCT(INTEL, 0x0122) // HD Graphics 3000
#define GMA_SANDYBRIDGE_M_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x0106) // HD Graphics 2000 Mobile
#define GMA_SANDYBRIDGE_M_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x0116) // HD Graphics 3000 Mobile
#define GMA_SANDYBRIDGE_M_GT2_PLUSGFX_MODEL_CONSTRUCT(INTEL, 0x0126) // HD Graphics 3000 Mobile
//#define GMA_SANDYBRIDGE_S_HB GFX_MODEL_CONSTRUCT(INTEL, 0x0108) /* Server */
#define GMA_SANDYBRIDGE_S_GT GFX_MODEL_CONSTRUCT(INTEL, 0x010A) // HD Graphics
// 010B // ??
// 010E // ??
/* ==================================== */
/* ========== Ivy Bridge ============== */
//#define GMA_IVYBRIDGE_HB GFX_MODEL_CONSTRUCT(INTEL, 0x0150) /* Desktop */
//#define GMA_IVYBRIDGE_M_HB GFX_MODEL_CONSTRUCT(INTEL, 0x0154) /* Mobile */
#define GMA_IVYBRIDGE_M_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x0156) // HD Graphics 2500 Mobile
#define GMA_IVYBRIDGE_M_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x0166) // HD Graphics 4000 Mobile
#define GMA_IVYBRIDGE_D_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x0152) // HD Graphics 2500
#define GMA_IVYBRIDGE_D_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x0162) // HD Graphics 4000
//#define GMA_IVYBRIDGE_S_HB GFX_MODEL_CONSTRUCT(INTEL, 0x0158) /* Server */
#define GMA_IVYBRIDGE_S_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x015A) // HD Graphics 4000
// 015E // ??
#define GMA_IVYBRIDGE_S_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x016A) // HD Graphics P4000
// 0172 // HD Graphics 2500 Mobile
// 0176 // HD Graphics 2500 Mobile
/* ==================================== */
//#define GMA_VALLEYVIEW_HB GFX_MODEL_CONSTRUCT(INTEL, 0x0F00) /* VLV1 */
//#define GMA_VALLEYVIEW_IG GFX_MODEL_CONSTRUCT(INTEL, 0x0F30)
/* ============ Haswell =============== */
// 0090 // AppleIntelHD5000Graphics.kext
// 0091 // AppleIntelHD5000Graphics.kext
// 0092 // AppleIntelHD5000Graphics.kext
//#define GMA_HASWELL_HB GFX_MODEL_CONSTRUCT(INTEL, 0x0400) /* Desktop */
#define GMA_HASWELL_D_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x0402) //
#define GMA_HASWELL_D_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x0412) // AppleIntelHD5000Graphics.kext
#define GMA_HASWELL_D_GT3 GFX_MODEL_CONSTRUCT(INTEL, 0x0422) //
//#define GMA_HASWELL_M_HB GFX_MODEL_CONSTRUCT(INTEL, 0x0404) /* Mobile */
#define GMA_HASWELL_M_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x0406) // AppleIntelHD5000Graphics.kext
#define GMA_HASWELL_M_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x0416) // AppleIntelHD5000Graphics.kext
#define GMA_HASWELL_M_GT3 GFX_MODEL_CONSTRUCT(INTEL, 0x0426) // AppleIntelHD5000Graphics.kext
#define GMA_HASWELL_S_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x040A) //
//#define GMA_HASWELL_S_HB GFX_MODEL_CONSTRUCT(INTEL, 0x0408) /* Server */
#define GMA_HASWELL_S_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x041A) //
#define GMA_HASWELL_S_GT3 GFX_MODEL_CONSTRUCT(INTEL, 0x042A) //
#define GMA_HASWELL_B_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x040B)
#define GMA_HASWELL_B_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x041B)
#define GMA_HASWELL_B_GT3 GFX_MODEL_CONSTRUCT(INTEL, 0x042B)
#define GMA_HASWELL_E_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x040E)
#define GMA_HASWELL_E_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x041E)
#define GMA_HASWELL_E_GT3 GFX_MODEL_CONSTRUCT(INTEL, 0x042E)
#define GMA_HASWELL_ULT_D_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x0A02)
#define GMA_HASWELL_ULT_D_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x0A12)
#define GMA_HASWELL_ULT_D_GT3 GFX_MODEL_CONSTRUCT(INTEL, 0x0A22) //
#define GMA_HASWELL_ULT_M_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x0A06) //
#define GMA_HASWELL_ULT_M_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x0A16) // AppleIntelHD5000Graphics.kext
#define GMA_HASWELL_ULT_M_GT3 GFX_MODEL_CONSTRUCT(INTEL, 0x0A26) // AppleIntelHD5000Graphics.kext
#define GMA_HASWELL_ULT_S_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x0A0A)
#define GMA_HASWELL_ULT_S_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x0A1A)
#define GMA_HASWELL_ULT_S_GT3 GFX_MODEL_CONSTRUCT(INTEL, 0x0A2A)
#define GMA_HASWELL_ULT_B_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x0A0B)
#define GMA_HASWELL_ULT_B_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x0A1B)
#define GMA_HASWELL_ULT_B_GT3 GFX_MODEL_CONSTRUCT(INTEL, 0x0A2B)
#define GMA_HASWELL_ULT_E_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x0A0E) //
#define GMA_HASWELL_ULT_E_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x0A1E) // AppleIntelHD5000Graphics.kext
#define GMA_HASWELL_ULT_E_GT3 GFX_MODEL_CONSTRUCT(INTEL, 0x0A2E) // AppleIntelHD5000Graphics.kext
//#define GMA_HASWELL_SDV_D_GT1_IG GFX_MODEL_CONSTRUCT(INTEL, 0C02)
//#define GMA_HASWELL_E_HB GFX_MODEL_CONSTRUCT(INTEL, 0C04)
//#define GMA_HASWELL_SDV_M_GT1_IG GFX_MODEL_CONSTRUCT(INTEL, 0C06) // AppleIntelHD5000Graphics.kext
//#define GMA_HASWELL_SDV_D_GT2_IG GFX_MODEL_CONSTRUCT(INTEL, 0C12)
//#define GMA_HASWELL_SDV_M_GT2_IG GFX_MODEL_CONSTRUCT(INTEL, 0C16) // AppleIntelHD5000Graphics.kext
//#define GMA_HASWELL_SDV_D_GT2_PLUS_IG GFX_MODEL_CONSTRUCT(INTEL, 0C22) // AppleIntelHD5000Graphics.kext
//#define GMA_HASWELL_SDV_M_GT2_PLUS_IG GFX_MODEL_CONSTRUCT(INTEL, 0C26) // AppleIntelHD5000Graphics.kext
//#define GMA_HASWELL_SDV_S_GT1_IGGFX_MODEL_CONSTRUCT(INTEL, 0x0C0A)
//#define GMA_HASWELL_SDV_S_GT2_IGGFX_MODEL_CONSTRUCT(INTEL, 0x0C1A)
//#define GMA_HASWELL_SDV_S_GT2_PLUS_IGGFX_MODEL_CONSTRUCT(INTEL, 0x0C2A)
#define GMA_HASWELL_CRW_D_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x0D02)
#define GMA_HASWELL_CRW_D_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x0D12) //
#define GMA_HASWELL_CRW_D_GT3 GFX_MODEL_CONSTRUCT(INTEL, 0x0D22) //
//#define GMA_HASWELL_CRW_D_GT2_PLUS_IGGFX_MODEL_CONSTRUCT(INTEL, 0x0D32)
#define GMA_HASWELL_CRW_M_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x0D06)
#define GMA_HASWELL_CRW_M_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x0D16) //
#define GMA_HASWELL_CRW_M_GT3 GFX_MODEL_CONSTRUCT(INTEL, 0x0D26) // AppleIntelHD5000Graphics.kext
#define GMA_HASWELL_CRW_S_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x0D0A)
#define GMA_HASWELL_CRW_S_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x0D1A)
#define GMA_HASWELL_CRW_S_GT3 GFX_MODEL_CONSTRUCT(INTEL, 0x0D2A)
#define GMA_HASWELL_CRW_B_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x0D0B)
#define GMA_HASWELL_CRW_B_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x0D1B)
#define GMA_HASWELL_CRW_B_GT3 GFX_MODEL_CONSTRUCT(INTEL, 0x0D2B)
#define GMA_HASWELL_CRW_E_GT1 GFX_MODEL_CONSTRUCT(INTEL, 0x0D0E)
#define GMA_HASWELL_CRW_E_GT2 GFX_MODEL_CONSTRUCT(INTEL, 0x0D1E)
#define GMA_HASWELL_CRW_E_GT3 GFX_MODEL_CONSTRUCT(INTEL, 0x0D2E)
//#define GMA_HASWELL_CRW_M_GT2_PLUS_IG GFX_MODEL_CONSTRUCT(INTEL, 0x0D36)
//#define GMA_HASWELL_CRW_S_GT2_PLUS_IG GFX_MODEL_CONSTRUCT(INTEL, 0x0D3A)
/* END */
#endif /* !__LIBSAIO_GMA_H */
trunk/CHANGES
1
12
23
34
- ErmaC: Port from Enoch the support for IVY Bridge and Haswell Intel Graphics cards. http://www.insanelymac.com/forum/topic/288241-intel-hd4000-and-haswell-inject-aaplig-platform-id/
- 2255: ErmaC add Skip flag key for Intel/nVidia/ATi from Enoch
- 2252: revert define processors name to match with xnu kernel name
- 2252: Merge from Enoch the Geoff Seeley patch http://forge.voodooprojects.org/p/chameleon/issues/59/

Archive Download the corresponding diff file

Revision: 2262