Chameleon

Chameleon Commit Details

Date:2015-10-26 03:49:06 (3 years 9 months ago)
Author:ErmaC
Commit:2781
Parents: 2780
Message:Merge gma changes from Enoch branch, typo.
Changes:
M/trunk/i386/libsaio/gma.c
M/trunk/i386/libsaio/efi.h
M/trunk/i386/libsaio/fake_efi.c
M/trunk/i386/libsaio/gma.h
M/trunk/i386/libsaio/disk.c
M/trunk/i386/boot2/boot.h
M/trunk/i386/libsaio/device_inject.c
M/trunk/i386/boot2/options.c

File differences

trunk/i386/libsaio/efi.h
145145
146146
147147
148
148
149149
150150
151
151
152
152153
153154
154
155
156
155157
156158
157159
#define EFI_GLOBAL_VARIABLE_GUID \
{0x8BE4DF61, 0x93CA, 0x11D2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C} }
#define SMBIOS_TABLE_GUID \
#define EFI_SMBIOS_TABLE_GUID \
{0xEB9D2D31, 0x2D88, 0x11D3, {0x9A, 0x16, 0x0, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
#define ACPI_TABLE_GUID \
// ACPI 1.0 Table GUID in EFI System Table
#define EFI_ACPI_TABLE_GUID \
{0xEB9D2D30, 0x2D88, 0x11D3, {0x9A, 0x16, 0x0, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
#define ACPI_20_TABLE_GUID \
// ACPI 2.0 Table GUID in EFI System Table
#define EFI_ACPI_20_TABLE_GUID \
{0x8868E871, 0xE4f1, 0x11D3, {0xBC, 0x22, 0x0, 0x80, 0xC7, 0x3C, 0x88, 0x81} }
typedef union {
trunk/i386/libsaio/gma.c
4848
4949
5050
51
52
53
54
5155
5256
5357
......
6872
6973
7074
75
76
77
7178
7279
7380
......
127134
128135
129136
137
138
130139
131140
132
141
133142
134143
135144
......
148157
149158
150159
151
160
161
152162
153163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
154179
155180
156181
......
298323
299324
300325
301
326
302327
303328
304329
......
409434
410435
411436
412
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
413460
414461
415462
......
667714
668715
669716
670
717
718
719
720
721
722
723
724
725
726
727
671728
672
673729
674730
675731
......
776832
777833
778834
779
835
780836
781837
782838
783839
784840
785
841
786842
787843
788844
......
880936
881937
882938
883
939
884940
885941
886942
......
909965
910966
911967
912
968
913969
914970
915971
916972
917973
918974
919
975
920976
921977
922978
923979
924
980
981
982
983
984
985
986
987
988
925989
926990
927991
......
931995
932996
933997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
9341059
9351060
9361061
#define DEBUG_GMA 0
#endif
#ifndef REPLACE_DEVICE_ID
#define REPLACE_DEVICE_ID 0
#endif
#if DEBUG_GMA
#define DBG(x...)printf(x)
#else
static uint8_t default_aapl_broadwell[]={ 0x00,0x00,0x1e,0x16 }; // broadwell_ig_vals[2]
#define AAPL_LEN_BDW ( sizeof(default_aapl_broadwell) / sizeof(uint8_t) )
static uint8_t default_aapl_skylake[]={ 0x00,0x00,0x16,0x19 }; // skylike_ig_vals[2]
#define AAPL_LEN_SKL ( sizeof(default_aapl_skylake) / sizeof(uint8_t) )
uint8_t GMAX3100_vals[23][4] = {
{ 0x01,0x00,0x00,0x00 },//0 "AAPL,HasPanel"
{ 0x01,0x00,0x00,0x00 },//1 "AAPL,SelfRefreshSupported"
{ 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
{ 0x04,0x00,0x12,0x04 }// 16 "AAPL,ig-platform-id" //FB: 32MB, Pipes: 3, Ports: 3, FBMem: 3 - ULT mobile GT3
//0x0412000b
//0x0d260009
};
uint8_t broadwell_ig_vals[19][4] = {
uint8_t broadwell_ig_vals[20][4] = {
{ 0x00,0x00,0x06,0x16 },// 0 - 16060000 Broadwell GT1 (Intel HD Graphics)
{ 0x00,0x00,0x0e,0x16 },// 1 - 160e0000 Broadwell GT1 (Intel HD Graphics)
{ 0x00,0x00,0x16,0x16 },// 2 - 16160000 Broadwell GT2 (Intel HD Graphics 5500)
{ 0x04,0x00,0x2b,0x16 },// 15 - 162b0004 Broadwell GT3 (MacBook Pro) (Intel Iris Graphics 6100)
{ 0x04,0x00,0x26,0x16 },// 16 - 16260004 Broadwell GT3 (MacBook Air) (Intel HD Graphics 6000)
{ 0x05,0x00,0x26,0x16 },// 17 - 16260005 Broadwell GT3 (MacBook Air) (Intel HD Graphics 6000)
{ 0x06,0x00,0x26,0x16 }// 18 - 16260006 Broadwell GT3 (MacBook Air) (Intel HD Graphics 6000)
{ 0x06,0x00,0x26,0x16 },// 18 - 16260006 Broadwell GT3 (MacBook Air) (Intel HD Graphics 6000)
{ 0x07,0x00,0x22,0x16 }// 19 - 16260006 Broadwell GT3 (iMac Retina 21") (Intel Iris Pro 6200)
};
uint8_t skylake_ig_vals[12][4] = {
{ 0x00,0x00,0xe0,0x19 }, // 0 - 191e0000 – Skylake ULX GT2
{ 0x00,0x00,0x16,0x19 }, // 1 - 19160000 – Skylake ULT GT2
{ 0x00,0x00,0x26,0x19 }, // 2 - 19260000 – Skylake ULT GT3
{ 0x00,0x00,0x1b,0x19 }, // 3 - 191b0000 – Skylake HALO GT2
{ 0x00,0x00,0x12,0x19 }, // 4 - 19120000 – Skylake Desktop GT2
{ 0x01,0x00,0x02,0x19 }, // 5 - 19020001 – Skylake Desktop GT1
{ 0x01,0x00,0x17,0x19 }, // 6 - 19170001 – Skylake Desktop GT1.5
{ 0x01,0x00,0x12,0x19 }, // 7 - 19120001 – Skylake Desktop GT2
{ 0x01,0x00,0x32,0x19 }, // 8 - 19320001 – Skylake Desktop GT4
{ 0x02,0x00,0x16,0x19 }, // 9 - 19160002 – Skylake ULT GT2
{ 0x02,0x00,0x26,0x19 }, // 10 - 19260002 – Skylake ULT GT3
{ 0x03,0x00,0x1e,0x19 } // 11 - 191e0003 – Skylake ULX GT2
};
uint8_t HD2000_vals[16][4] = {
{ 0x00,0x00,0x00,0x00 }, //0 "AAPL00,PixelFormat"
{ 0x00,0x00,0x00,0x00 }, //1 "AAPL00,T1"
{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 },
{GMA_SANDYBRIDGE_S_GT,"HD Graphics P3000" }, /* 010a */
// 010B /* ??? */
// 010E /* ??? */
{GMA_BROADWELL_BDW_163B,HD_GRAPHICS },/* 163b */
{GMA_BROADWELL_BDW_163A,HD_GRAPHICS },/* 163a */
{GMA_BROADWELL_BDW_163D,HD_GRAPHICS },/* 163d */
{GMA_BROADWELL_BDW_163E,HD_GRAPHICS }/* 163e */
{GMA_BROADWELL_BDW_163E,HD_GRAPHICS },/* 163e */
/* Skylake */
{GMA_SKYLAKE_ULT_GT1,HD_GRAPHICS_510 },/* 1906 */
{GMA_SKYLAKE_ULT_GT15,HD_GRAPHICS_510 },/* 1913 */
{GMA_SKYLAKE_ULT_GT2,HD_GRAPHICS_520 },/* 1916 */
{GMA_SKYLAKE_ULX_GT1,HD_GRAPHICS },/* 190E */
{GMA_SKYLAKE_ULX_GT2,HD_GRAPHICS_515 },/* 191E */
{GMA_SKYLAKE_DT_GT2,HD_GRAPHICS_530 },/* 1912 */
{GMA_SKYLAKE_1921,HD_GRAPHICS_520 },/* 1921 */
{GMA_SKYLAKE_ULT_GT3_E,IRIS_540 },/* 1926 */
{GMA_SKYLAKE_ULT_GT3,HD_GRAPHICS_535 },/* 1923 */
{GMA_SKYLAKE_ULT_GT3_28W,HD_GRAPHICS_550 },/* 1927 */
{GMA_SKYLAKE_DT_GT15,HD_GRAPHICS_530 },/* 1917 */
{GMA_SKYLAKE_DT_GT1,HD_GRAPHICS_510 },/* 1902 */
{GMA_SKYLAKE_DT_GT4,IRIS_570_580 },/* 1932 */
{GMA_SKYLAKE_GT4,IRIS_580 },/* 193B */
{GMA_SKYLAKE_GT3_FE,IRIS },/* 192B */
{GMA_SKYLAKE_GT2,HD_GRAPHICS_530 },/* 191B */
{GMA_SKYLAKE_192A,IRIS_P580 },/* 192A */
{GMA_SKYLAKE_SRW_GT4,IRIS_P580 },/* 193A */
{GMA_SKYLAKE_WS_GT2,HD_GRAPHICS_P530 },/* 191D */
{GMA_SKYLAKE_WS_GT4,IRIS_P580 }/* 193D */
};
#define GFX_DEVICES_LEN (sizeof(intel_gfx_chipsets) / sizeof(intel_gfx_chipsets[0]))
devprop_add_value(device, "built-in",&BuiltIn, 1);
devprop_add_value(device, "class-code",ClassFix, 4);
devprop_add_value(device, "vendor-id",(uint8_t *)INTEL_VENDORID, 4);
// patch by ikunikun for i3-2125 and i5-2500K to enable HD3000.
if(((device_id << 16) | vendor_id) != GMA_SANDYBRIDGE_GT2)
{
devprop_add_value(device, "vendor-id",(uint8_t *)INTEL_VENDORID, 4);
}
else
{
device_id = 0x00000126;
devprop_add_value(device, "device-id", (uint8_t *)&device_id, sizeof(device_id));
verbose("\tInjeting done: was [%04x:%04x] now is [%04x:%04x]\n", gma_dev->vendor_id, gma_dev->device_id, gma_dev->vendor_id, device_id);
}
devprop_add_value(device, "AAPL,tbl-info",HD3000_tbl_info, 18);
devprop_add_value(device, "AAPL,os-info",HD3000_os_info, 20);
case GMA_HASWELL_E_GT2: // 041e
case GMA_HASWELL_ULT_M_GT2: // 0a16
case GMA_HASWELL_ULT_E_GT2: // 0a1e
#if REPLACE_DEVICE_ID
verbose("\tInjecting a valid desktop GPU device id (0x0412) instead of patching kexts.\n");
device_id = 0x00000412;// Inject a valid desktop GPU device id (0x0412) instead of patching kexts
devprop_add_value(device, "vendor-id",(uint8_t *)INTEL_VENDORID, 4);
devprop_add_value(device, "device-id",(uint8_t *)&device_id, sizeof(device_id));
verbose("\tInjeting done: was [%04x:%04x] now is [%04x:%04x]\n", gma_dev->vendor_id, gma_dev->device_id, gma_dev->vendor_id, device_id);
#endif // REPLACE_DEVICE_ID
case GMA_HASWELL_D_GT1: // 0402
case GMA_HASWELL_M_GT1: // 0406
case GMA_HASWELL_S_GT1: // 040a
case GMA_BROADWELL_BDW_161A: // 161a
case GMA_BROADWELL_BDW_161D: // 161d
case GMA_BROADWELL_BDW_Y_GT2: // 161e (MacBook) Intel HD Graphics 5300
case GMA_BROADWELL_BDW_1622: // 1622
case GMA_BROADWELL_BDW_1622: // 1622 (iMac 21") Intel Iris Pro 6200
case GMA_BROADWELL_BDW_U_GT3: // 1626 (MacBook Air) Intel HD Graphics 6000
case GMA_BROADWELL_BDW_162A: // 162a
case GMA_BROADWELL_BDW_U_GT3_2: // 162b (MacBook Pro) Intel Iris Graphics 6100
}
else if (getIntForKey(kIntelBdwFB, &n_igs, &bootInfo->chameleonConfig))
{
if ((n_igs >= 0) || (n_igs <= 19))
if ((n_igs >= 0) || (n_igs <= 20))
{
verbose("\tAAPL,ig-platform-id was set in org.chameleon.Boot.plist with value %d\n", n_igs);
devprop_add_value(device, "AAPL,ig-platform-id", broadwell_ig_vals[n_igs], 4);
}
else
{
verbose("\tAAPL,ig-platform-id was set in org.chameleon.Boot.plist with bad value please choose a number between 0 and 18.\n");
verbose("\tAAPL,ig-platform-id was set in org.chameleon.Boot.plist with bad value please choose a number between 0 and 19.\n");
}
}
else
{
uint32_t ig_platform_id = 0x16160000; // set the default platform ig
uint32_t ig_platform_id;
if ( ( (device_id << 16) | vendor_id ) == GMA_BROADWELL_BDW_1622 )
{
ig_platform_id = 0x16220007; // Iris Pro 6200 (i5 5675C & i7 5775C)
}
else
{
ig_platform_id = 0x16160000; // set the default platform ig
}
devprop_add_value(device, "AAPL,ig-platform-id", (uint8_t *)&ig_platform_id, 4);
}
break;
/* Skylake */
/* HD Graphics */
case GMA_SKYLAKE_ULT_GT1:// 1906
case GMA_SKYLAKE_ULT_GT15:// 1913
case GMA_SKYLAKE_ULT_GT2:// 1916 *
case GMA_SKYLAKE_ULX_GT1:// 190E
case GMA_SKYLAKE_ULX_GT2:// 191E *
case GMA_SKYLAKE_DT_GT2:// 1912 *
case GMA_SKYLAKE_1921:// 1921
case GMA_SKYLAKE_ULT_GT3_E:// 1926 *
case GMA_SKYLAKE_ULT_GT3:// 1923
case GMA_SKYLAKE_ULT_GT3_28W:// 1927
case GMA_SKYLAKE_DT_GT15:// 1917 *
case GMA_SKYLAKE_DT_GT1:// 1902 *
case GMA_SKYLAKE_DT_GT4:// 1932
case GMA_SKYLAKE_GT4:// 193B
case GMA_SKYLAKE_GT3_FE:// 192B
case GMA_SKYLAKE_GT2:// 191B *
case GMA_SKYLAKE_192A:// 192A
case GMA_SKYLAKE_SRW_GT4:// 193A
case GMA_SKYLAKE_WS_GT2:// 191D
case GMA_SKYLAKE_WS_GT4:// 193D
if (getValueForKey(kAAPLCustomIG, &value, &len, &bootInfo->chameleonConfig) && len == AAPL_LEN_SKL * 2)
{
uint8_t new_aapl0[AAPL_LEN_SKL];
if (hex2bin(value, new_aapl0, AAPL_LEN_SKL) == 0)
{
memcpy(default_aapl_skylake, new_aapl0, AAPL_LEN_SKL);
verbose("\tUsing user supplied AAPL,ig-platform-id\n");
verbose("\tAAPL,ig-platform-id: %02x%02x%02x%02x\n",
default_aapl_skylake[0], default_aapl_skylake[1], default_aapl_skylake[2], default_aapl_skylake[3]);
}
devprop_add_value(device, "AAPL,ig-platform-id", default_aapl_skylake, AAPL_LEN_SKL);
}
else if (getIntForKey(kIntelSklFB, &n_igs, &bootInfo->chameleonConfig))
{
if ((n_igs >= 0) || (n_igs <= 12))
{
verbose("\tAAPL,ig-platform-id was set in org.chameleon.Boot.plist with value %d\n", n_igs);
devprop_add_value(device, "AAPL,ig-platform-id", skylake_ig_vals[n_igs], 4);
}
else
{
verbose("\tAAPL,ig-platform-id was set in org.chameleon.Boot.plist with bad value please choose a number between 0 and 12.\n");
}
}
else
{
uint32_t ig_platform_id = 0x19260000; // 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);
break;
default:
break;
}
trunk/i386/libsaio/gma.h
7474
7575
7676
77
78
79
80
81
82
83
84
85
86
87
88
7789
7890
7991
......
8496
8597
8698
99
100
101
102
103
87104
105
106
88107
89108
90109
......
171190
172191
173192
174
193
175194
176
177
178
179
180
181
182
195
196
197
198
199
200
201
183202
184203
185204
......
283302
284303
285304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
286327
287328
288329
#define IRIS_6100 "Iris Graphics 6100"
#define IRIS_6200 "Iris Pro Graphics 6200"
#define IRIS_6300 "Iris Pro Graphics P6300"
#define HD_GRAPHICS_510 "HD Graphics 510"
#define HD_GRAPHICS_515 "HD Graphics 515"
#define HD_GRAPHICS_520 "HD Graphics 520"
#define HD_GRAPHICS_P530 "HD Graphics P530"
#define HD_GRAPHICS_530 "HD Graphics 530"
#define HD_GRAPHICS_535 "HD Graphics 535"
#define HD_GRAPHICS_550 "HD Graphics 550"
#define IRIS_540 "Iris(TM) Graphics 540"
#define IRIS_570_580 "Iris(TM) Pro Graphics 570/580"
#define IRIS_580 "Iris(TM) Pro Graphics 580"
#define IRIS "Iris(TM) Graphics"
#define IRIS_P580 "Iris(TM) Pro Graphics P580"
#define INTEL_VENDORID PCI_VENDOR_ID_INTEL
/* http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/tree/src/intel_driver.h */
#define GMA_I810_E GFX_MODEL_CONSTRUCT(INTEL, 0x7125)
#define GMA_I815 GFX_MODEL_CONSTRUCT(INTEL, 0x1132)
/* ==================================== */
// Cherryview (Braswell, Cherry Trail)
// #define GMA_ GFX_MODEL_CONSTRUCT(INTEL, 0x22B0) // Intel(R) HD Graphics
// #define GMA_ GFX_MODEL_CONSTRUCT(INTEL, 0x22B1) // Intel(R) HD Graphics
// #define GMA_ GFX_MODEL_CONSTRUCT(INTEL, 0x22B2) // Intel(R) HD Graphics
// #define GMA_ GFX_MODEL_CONSTRUCT(INTEL, 0x22B3) // Intel(R) HD Graphics
/* ==================================== */
#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_IVYBRIDGE_S_GT5 GFX_MODEL_CONSTRUCT(INTEL, 0x0176) // HD Graphics 2500 Mobile // 3rd Gen Core processor Graphics Controller
/* ==================================== */
/* ====== Valleyview (Baytail) ======= */
/* ====== Valleyview (Bay Trail) ======= */
//#define GMA_VALLEYVIEW_HB GFX_MODEL_CONSTRUCT(INTEL, 0x0F00) /* VLV1 */
//#define GMA_VALLEYVIEW_IG GFX_MODEL_CONSTRUCT(INTEL, 0x0F30) /* "HD Graphics" */
//#define GMA_VALLEYVIEW_?? GFX_MODEL_CONSTRUCT(INTEL, 0x0F31) /* "HD Graphics" */
//#define GMA_VALLEYVIEW_?? GFX_MODEL_CONSTRUCT(INTEL, 0x0F32) /* "HD Graphics" */
//#define GMA_VALLEYVIEW_?? GFX_MODEL_CONSTRUCT(INTEL, 0x0F33) /* "HD Graphics" */
//#define GMA_VALLEYVIEW_?? GFX_MODEL_CONSTRUCT(INTEL, 0x0155) /* "HD Graphics" */
//#define GMA_VALLEYVIEW_?? GFX_MODEL_CONSTRUCT(INTEL, 0x0157) /* "HD Graphics" */
//#define GMA_VALLEYVIEW_0F00 GFX_MODEL_CONSTRUCT(INTEL, 0x0F00) /* VLV1 */
//#define GMA_VALLEYVIEW_0F30 GFX_MODEL_CONSTRUCT(INTEL, 0x0F30) /* "HD Graphics" */
//#define GMA_VALLEYVIEW_0F31 GFX_MODEL_CONSTRUCT(INTEL, 0x0F31) /* "HD Graphics" */
//#define GMA_VALLEYVIEW_0F32 GFX_MODEL_CONSTRUCT(INTEL, 0x0F32) /* "HD Graphics" */
//#define GMA_VALLEYVIEW_0F33 GFX_MODEL_CONSTRUCT(INTEL, 0x0F33) /* "HD Graphics" */
//#define GMA_VALLEYVIEW_0155 GFX_MODEL_CONSTRUCT(INTEL, 0x0155) /* "HD Graphics" */
//#define GMA_VALLEYVIEW_0157 GFX_MODEL_CONSTRUCT(INTEL, 0x0157) /* "HD Graphics" */
/* ==================================== */
/* ============ Haswell =============== */
#define GMA_BROADWELL_BDW_163D GFX_MODEL_CONSTRUCT(INTEL, 0x163D) // Broadwell-U Integrated Graphics // AppleIntelBDWGraphics.kext
#define GMA_BROADWELL_BDW_163E GFX_MODEL_CONSTRUCT(INTEL, 0x163E) // Broadwell-U Integrated Graphics // AppleIntelBDWGraphics.kext
/* Skylake */
#define GMA_SKYLAKE_ULT_GT1GFX_MODEL_CONSTRUCT(INTEL, 0x1906) // Intel(R) HD Graphics 510
#define GMA_SKYLAKE_ULT_GT15GFX_MODEL_CONSTRUCT(INTEL, 0x1913) // Intel(R) HD Graphics 510
#define GMA_SKYLAKE_ULT_GT2GFX_MODEL_CONSTRUCT(INTEL, 0x1916) // Intel(R) HD Graphics 520
#define GMA_SKYLAKE_ULX_GT1GFX_MODEL_CONSTRUCT(INTEL, 0x190E) // Intel(R) HD Graphics
#define GMA_SKYLAKE_ULX_GT2GFX_MODEL_CONSTRUCT(INTEL, 0x191E) // Intel(R) HD Graphics 515
#define GMA_SKYLAKE_DT_GT2GFX_MODEL_CONSTRUCT(INTEL, 0x1912) // Intel(R) HD Graphics 530
#define GMA_SKYLAKE_1921GFX_MODEL_CONSTRUCT(INTEL, 0x1921) // Intel(R) HD Graphics 520
#define GMA_SKYLAKE_ULT_GT3_EGFX_MODEL_CONSTRUCT(INTEL, 0x1926) // Intel(R) Iris(TM) Graphics 540
#define GMA_SKYLAKE_ULT_GT3GFX_MODEL_CONSTRUCT(INTEL, 0x1923) // Intel(R) HD Graphics 535
#define GMA_SKYLAKE_ULT_GT3_28WGFX_MODEL_CONSTRUCT(INTEL, 0x1927) // Intel(R) Iris(TM) Graphics 550
#define GMA_SKYLAKE_DT_GT15GFX_MODEL_CONSTRUCT(INTEL, 0x1917) // Intel(R) HD Graphics 530
#define GMA_SKYLAKE_DT_GT1GFX_MODEL_CONSTRUCT(INTEL, 0x1902) // Intel(R) HD Graphics 510
#define GMA_SKYLAKE_DT_GT4GFX_MODEL_CONSTRUCT(INTEL, 0x1932) // Intel(R) Iris(TM) Pro Graphics 570/580
#define GMA_SKYLAKE_GT4GFX_MODEL_CONSTRUCT(INTEL, 0x193B) // Intel(R) Iris(TM) Pro Graphics 580
#define GMA_SKYLAKE_GT3_FEGFX_MODEL_CONSTRUCT(INTEL, 0x192B) // Intel(R) Iris(TM) Graphics
#define GMA_SKYLAKE_GT2GFX_MODEL_CONSTRUCT(INTEL, 0x191B) // Intel(R) HD Graphics 530
#define GMA_SKYLAKE_192AGFX_MODEL_CONSTRUCT(INTEL, 0x192A) // Intel(R) Iris(TM) Pro Graphics P580
#define GMA_SKYLAKE_SRW_GT4GFX_MODEL_CONSTRUCT(INTEL, 0x193A) // Intel(R) Iris(TM) Pro Graphics P580
#define GMA_SKYLAKE_WS_GT2GFX_MODEL_CONSTRUCT(INTEL, 0x191D) // Intel(R) HD Graphics P530
#define GMA_SKYLAKE_WS_GT4GFX_MODEL_CONSTRUCT(INTEL, 0x193D) // Intel(R) Iris(TM) Pro Graphics P580
/* END */
#endif /* !__LIBSAIO_GMA_H */
trunk/i386/libsaio/device_inject.c
5858
5959
6060
61
61
6262
6363
6464
......
231231
232232
233233
234
234
235235
236236
237237
......
291291
292292
293293
294
295
294
295
296296
297297
298298
*/
if (!getValueForKey(kDeviceProperties, &val, &cnt, &bootInfo->chameleonConfig) && string)
{
val = (const char*)string;
val = (const char *)string;
cnt = strlength * 2;
}
memset(data, 0, length);
uint32_t off = 0;
data[off+1] = ((strlen(nm) * 2) + 6) >> 8;
data[off+1] = (uint8_t)(((strlen(nm) * 2) + 6) >> 8);
data[off] = ((strlen(nm) * 2) + 6) & 0x00FF;
off += 4;
// devprop_generate_string optimized by cparm
char *devprop_generate_string(DevPropString *string)
{
int len = string->length * 2 + 1;
char *buffer = (char*)malloc(len);
int len = ((string->length * 2) + 1);
char *buffer = (char *)malloc(len);
char *ptr = buffer;
if(!buffer)
trunk/i386/libsaio/disk.c
103103
104104
105105
106
107106
108107
109108
110109
111110
111
112112
113113
114114
......
141141
142142
143143
144
144145
145146
146147
......
152153
153154
154155
156
155157
156158
157159
......
180182
181183
182184
183
184185
185186
186
187
187
188188
189189
190190
......
231231
232232
233233
234
235
234
236235
237236
238237
......
249248
250249
251250
252
253
251
254252
255253
256254
......
393391
394392
395393
396
397394
398395
399396
400397
401398
402399
403
404
400
405401
406402
407403
......
438434
439435
440436
441
442437
443438
444439
......
461456
462457
463458
464
465459
466460
467461
......
552546
553547
554548
555
556549
557550
558551
......
646639
647640
648641
649
650642
651643
652644
......
743735
744736
745737
746
747738
748739
749740
......
842833
843834
844835
845
836
846837
847838
848839
......
943934
944935
945936
946
947937
948938
949939
......
12521242
12531243
12541244
1255
1256
1245
12571246
12581247
12591248
......
13761365
13771366
13781367
1379
13801368
13811369
13821370
......
13861374
13871375
13881376
1389
1390
1377
13911378
13921379
13931380
......
17081695
17091696
17101697
1711
17121698
17131699
17141700
......
18351821
18361822
18371823
1838
18391824
18401825
18411826
......
18871872
18881873
18891874
1890
1875
18911876
18921877
18931878
......
19011886
19021887
19031888
1904
19051889
19061890
19071891
......
19171901
19181902
19191903
1920
19211904
19221905
19231906
......
19511934
19521935
19531936
1954
19551937
19561938
19571939
......
19691951
19701952
19711953
1972
1973
1954
19741955
19751956
19761957
......
20192000
20202001
20212002
2022
20232003
20242004
20252005
......
20382018
20392019
20402020
2041
20422021
20432022
20442023
......
21642143
21652144
21662145
2167
21682146
21692147
21702148
......
21972175
21982176
21992177
2200
2201
2178
22022179
22032180
22042181
......
22422219
22432220
22442221
2245
22462222
22472223
22482224
22492225
2250
2251
2226
22522227
22532228
22542229
......
23022277
23032278
23042279
2305
23062280
23072281
23082282
......
23752349
23762350
23772351
2378
23792352
2380
23812353
23822354
23832355
......
24082380
24092381
24102382
2411
24122383
24132384
24142385
2415
24162386
24172387
24182388
......
24532423
24542424
24552425
2456
24572426
24582427
2459
24602428
24612429
24622430
24632431
24642432
24652433
2466
24672434
24682435
2469
24702436
24712437
24722438
24732439
24742440
24752441
2476
24772442
24782443
24792444
......
25212486
25222487
25232488
2524
25252489
25262490
25272491
......
25662530
25672531
25682532
2569
25702533
25712534
25722535
......
25792542
25802543
25812544
2582
25832545
25842546
25852547
//==========================================================================
// Maps (E)BIOS return codes to message strings.
struct NamedValue {
unsigned char value;
const char *name;
};
// =========================================================================
/*
* Map a disk drive to bootable volumes contained within.
*/
static bool getOSVersion(BVRef bvr, char *str);
static bool cache_valid = false;
// =============================================================================
static const struct NamedValue bios_errors[] =
{
{ 0x10, "Media error" },
{ 0x00, NULL }
};
// =============================================================================
static const struct NamedValue fdiskTypes[] =
{
{ FDISK_DOS12,"DOS_FAT_12" }, // 0x01
};
//==============================================================================
extern void spinActivityIndicator(int sectors);
//==========================================================================
//==============================================================================
static int getDriveInfo( int biosdev, struct driveInfo *dip )
{
static struct driveInfo cached_di;
return 0;
}
//==========================================================================
//==============================================================================
static const char *getNameForValue( const struct NamedValue *nameTable, unsigned char value )
{
const struct NamedValue *np;
}
//==============================================================================
static const char * bios_error(int errnum)
static const char *bios_error(int errnum)
{
static char errorstr[] = "Error 0x00";
const char * errname;
}
//==============================================================================
int testBiosread(int biosdev, unsigned long long secno)
{
return Biosread(biosdev, secno);
}
//==============================================================================
static int readBytes(int biosdev, unsigned long long blkno, unsigned int byteoff, unsigned int byteCount, void * buffer)
static int readBytes(int biosdev, unsigned long long blkno, unsigned int byteoff, unsigned int byteCount, void *buffer)
{
// ramdisks require completely different code for reading.
if(p_ramdiskReadBytes != NULL && biosdev >= 0x100)
}
//==============================================================================
static int isExtendedFDiskPartition( const struct fdisk_part *part )
{
static unsigned char extParts[] =
}
//==============================================================================
static int getNextFDiskPartition( int biosdev, int *partno, const struct fdisk_part **outPart )
{
static int sBiosdev = -1;
}
//==============================================================================
/*
* Trying to figure out the filsystem type of a given partition.
* X = fdisk partition type
}
//==============================================================================
static BVRef newFDiskBVRef( int biosdev,
int partno,
unsigned int blkoff,
}
//==============================================================================
static BVRef newAPMBVRef( int biosdev, int partno, unsigned int blkoff,
const DPME * part,
FSInit initFunc, FSLoadFile loadFunc,
//EFI_GUID const GPT_RAID_OFFLINE_GUID= { 0x52414944, 0x5f4f, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; // 0xAF02 "Apple RAID offline"
//EFI_GUID const GPT_LABEL_GUID= { 0x4C616265, 0x6C00, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; // 0xAF03 "Apple label"
//EFI_GUID const GPT_APPLETV_GUID= { 0x5265636F, 0x7665, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; // 0xAF04 "Apple TV recovery"
//EFI_GUID const GPT_CORESTORAGE_GUID= { 0x53746F72, 0x6167, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; // 0xAF05 "Apple Core storage"
EFI_GUID const GPT_CORESTORAGE_GUID= { 0x53746F72, 0x6167, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; // 0xAF05 "Apple Core storage"
// same as Apple ZFS
//EFI_GUID const GPT_ZFS_GUID= { 0x6A898CC3, 0x1DD2, 0x11B2, { 0x99, 0xA6, 0x08, 0x00, 0x20, 0x73, 0x66, 0x31 } }; // 0xBF01 "Solaris /usr & Apple ZFS
* So, for example, if you have two primary partitions and
* one extended partition they will be numbered 1, 2, 5.
*/
static BVRef diskScanFDiskBootVolumes( int biosdev, int *countPtr )
{
const struct fdisk_part*part;
}
//==============================================================================
static BVRef diskScanAPMBootVolumes( int biosdev, int * countPtr )
static BVRef diskScanAPMBootVolumes( int biosdev, int *countPtr )
{
struct DiskBVMap*map;
struct Block0*block0_p;
}
//==============================================================================
static bool isPartitionUsed(gpt_ent * partition)
{
}
//==============================================================================
static BVRef diskScanGPTBootVolumes(int biosdev, int * countPtr)
static BVRef diskScanGPTBootVolumes(int biosdev, int *countPtr)
{
verbose("\tAttempting to scan GPT boot volumes [biosdev=%02Xh]:\n", biosdev);
}
//==============================================================================
static bool getOSVersion(BVRef bvr, char *str)
{
bool valid = false;
}
//==============================================================================
static void scanFSLevelBVRSettings(BVRef chain)
{
BVRef bvr;
}
}
// Check for SystemVersion.plist or ServerVersion.plist to determine if a volume hosts an installed system.
// Check for SystemVersion.plist or ServerVersion.plist or com.apple.boot.plist to determine if a volume hosts an installed system.
if (bvr->flags & kBVFlagNativeBoot)
{
}
//==============================================================================
void rescanBIOSDevice(int biosdev)
{
struct DiskBVMap *oldMap = diskResetBootVolumes(biosdev);
}
//==============================================================================
struct DiskBVMap* diskResetBootVolumes(int biosdev)
{
struct DiskBVMap * map;
}
//==============================================================================
// Frees a DiskBVMap and all of its BootVolume's
void diskFreeMap(struct DiskBVMap *map)
{
}
//==============================================================================
BVRef diskScanBootVolumes(int biosdev, int * countPtr)
BVRef diskScanBootVolumes(int biosdev, int *countPtr)
{
struct DiskBVMap *map;
BVRef bvr;
}
//==============================================================================
BVRef getBVChainForBIOSDev(int biosdev)
{
BVRef chain = NULL;
}
//==============================================================================
BVRef newFilteredBVChain(int minBIOSDev, int maxBIOSDev, unsigned int allowFlags, unsigned int denyFlags, int *count)
{
BVRef chain = NULL;
}
//==============================================================================
int freeFilteredBVChain(const BVRef chain)
{
int ret = 1;
}
//==============================================================================
bool matchVolumeToString( BVRef bvr, const char* match, long matchLen)
bool matchVolumeToString( BVRef bvr, const char *match, long matchLen)
{
char testStr[128];
}
//==============================================================================
/* If Rename Partition has defined an alias, then extract it for description purpose.
* The format for the rename string is the following:
* hd(x,y)|uuid|"label" "alias";hd(m,n)|uuid|"label" "alias"; etc...
*/
static bool getVolumeLabelAlias(BVRef bvr, char* str, long strMaxLen)
static bool getVolumeLabelAlias(BVRef bvr, char *str, long strMaxLen)
{
char *aliasList, *entryStart, *entryNext;
}
//==============================================================================
void getBootVolumeDescription( BVRef bvr, char *str, long strMaxLen, bool useDeviceDescription )
{
unsigned char type;
strncpy(bvr->label, p, sizeof(bvr->label) );
}
//==============================================================================
int readBootSector(int biosdev, unsigned int secno, void *buffer)
{
int error;
}
//==============================================================================
/*
* Format of boot1f32 block.
*/
#define BOOT1F32_MAGIC "BOOT "
#define BOOT1F32_MAGICLEN 11
return 0;
}
//==============================================================================
// Handle seek request from filesystem modules.
void diskSeek(BVRef bvr, long long position)
{
bvr->fs_boff = position / BPS;
bvr->fs_byteoff = position % BPS;
}
//==============================================================================
// Handle read request from filesystem modules.
int diskRead(BVRef bvr, long addr, long length)
{
return readBytes(bvr->biosdev, bvr->fs_boff + bvr->part_boff, bvr->fs_byteoff, length, (void *) addr);
}
//==============================================================================
int rawDiskRead( BVRef bvr, unsigned int secno, void *buffer, unsigned int len )
{
int secs;
}
//==============================================================================
int rawDiskWrite( BVRef bvr, unsigned int secno, void *buffer, unsigned int len )
{
int secs;
}
//==============================================================================
int diskIsCDROM(BVRef bvr)
{
struct driveInfo di;
}
//==============================================================================
int biosDevIsCDROM(int biosdev)
{
struct driveInfo di;
trunk/i386/libsaio/fake_efi.c
441441
442442
443443
444
444
445445
446446
447447
......
449449
450450
451451
452
453
452
453
454454
455455
456456
......
661661
662662
663663
664
665664
666665
667666
*/
/* From Foundation/Efi/Guid/Smbios/SmBios.c */
EFI_GUID const gEfiSmbiosTableGuid = SMBIOS_TABLE_GUID;
EFI_GUID const gEfiSmbiosTableGuid = EFI_SMBIOS_TABLE_GUID;
#define SMBIOS_RANGE_START0x000F0000
#define SMBIOS_RANGE_END0x000FFFFF
/* '_SM_' in little endian: */
#define SMBIOS_ANCHOR_UINT32_LE 0x5f4d535f
EFI_GUID gEfiAcpiTableGuid = ACPI_TABLE_GUID;
EFI_GUID gEfiAcpi20TableGuid = ACPI_20_TABLE_GUID;
EFI_GUID gEfiAcpiTableGuid = EFI_ACPI_TABLE_GUID;
EFI_GUID gEfiAcpi20TableGuid = EFI_ACPI_20_TABLE_GUID;
/*==========================================================================
/*
* Populate the chosen node
*/
void setupChosenNode()
{
Node *chosenNode;
trunk/i386/boot2/boot.h
179179
180180
181181
182
182183
183184
184185
......
235236
236237
237238
238
239
239240
240241
241242
#define kIntelCapriFB"IntelCapriFB"/* gma.c was HD4K-ig */
#define kIntelAzulFB"IntelAzulFB"/* gma.c was HD5K-ig */
#define kIntelBdwFB"IntelBdwFB"/* gma.c */
#define kIntelSklFB"IntelSklFB"/* gma.c */
#define kAAPLCustomIG"InjectIntel-ig"/* gma.c */
#define kHDAEnabler"HDAEnabler"/* pci_setup.c */
#define kHDEFLayoutID"HDEFLayoutID"/* hda.c */
extern void initialize_runtime();
extern void common_boot(int biosdev);
extern bool checkOSVersion(const char * version);
extern bool checkOSVersion(const char *version);
extern uint32_t getMacOSVerCurrent();
/*
trunk/i386/boot2/options.c
389389
390390
391391
392
392
393393
394
394
395395
396
397
398
399
396
397
398
399
400
401
402
403
400404
401
405
402406
403407
404408
......
665669
666670
667671
668
672
669673
670674
671675
......
13361340
13371341
13381342
1339
13401343
13411344
13421345
......
13821385
13831386
13841387
1385
1388
13861389
1390
13871391
13881392
13891393
static int gMenuStart;
static int gMenuEnd;
static void printMenuItem( const MenuItem * item, int highlight )
static void printMenuItem( const MenuItem *item, int highlight )
{
printf(" ");
printf(" ");
if ( highlight )
putca(' ', 0x70, strlen(item->name) + 4);
else
putca(' ', 0x07, 40);
if ( highlight )
{
putca(' ', 0x70, strlen(item->name) + 4);
}
else
{
putca(' ', 0x07, 40);
}
printf(" %40s\n", item->name);
printf(" %40s\n", item->name);
}
//==========================================================================
//==========================================================================
static const char * extractKernelName( char ** cpp )
static const char *extractKernelName( char ** cpp )
{
char * kn = *cpp;
char * cp = *cpp;
}
else
{
// Load org.chameleon.Boot.plist from the selected volume
// and use its contents to override default bootConfig.
}
// Ermac : Inject "kext-dev-mode=1" if OS X 10.10 is detected
if ( MacOSVerCurrent == MacOSVer2Int("10.10") ) // OS X is 10.10
if ( (gMacOSVersion[3] == '1') && (gMacOSVersion[4] == '0') ) // OS X is 10.10
{
verbose("Added: kext-dev-mode=1\n");
addBootArg("kext-dev-mode=1");
}

Archive Download the corresponding diff file

Revision: 2781