Chameleon

Chameleon Commit Details

Date:2014-11-29 17:32:43 (5 years 5 months ago)
Author:ErmaC
Commit:2506
Parents: 2505
Message:Add UseIntelHDMI for (hda-gfx=onboard-1 or onboard-2) that vale will be injected into the GFX0 and HDEF devices, credits Clover Team
Changes:
M/branches/ErmaC/Enoch/CHANGES
M/branches/ErmaC/Enoch/i386/libsaio/ati.c
M/branches/ErmaC/Enoch/i386/libsaio/gma.c
M/branches/ErmaC/Enoch/package/OptionalSettings/Audio.txt
M/branches/ErmaC/Enoch/i386/libsaio/nvidia.c
M/branches/ErmaC/Enoch/i386/boot2/boot.h

File differences

branches/ErmaC/Enoch/i386/libsaio/gma.c
5353
5454
5555
56
5657
5758
5859
......
403404
404405
405406
407
408
409
410
411
412
413
414
406415
407416
408417
......
410419
411420
412421
413
422
414423
415424
416425
......
469478
470479
471480
472
481
473482
474483
475484
......
492501
493502
494503
495
504
496505
497506
498507
......
519528
520529
521530
522
531
523532
524533
525534
......
532541
533542
534543
535
544
536545
537546
538547
......
606615
607616
608617
609
618
610619
611620
612621
......
697706
698707
699708
700
709
701710
702711
703712
#define DBG(x...)
#endif
static booldoit= false;
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]
devprop_add_value(device, "model", (uint8_t *)model, (strlen(model) + 1));
devprop_add_value(device, "device_type", (uint8_t *)"display", 8);
if (getBoolForKey(kUseIntelHDMI, &doit, &bootInfo->chameleonConfig) && doit)
{
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
}
else
{
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-2", 10);
}
switch ((device_id << 16) | vendor_id)
{
case GMA_IRONLAKE_M_G: // 0046
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, "hda-gfx",(uint8_t *)"onboard-1", 10);
devprop_add_value(device, "AAPL,os-info",HDx000_os_info, 20);
break;
/* 27A2, 27AE, 27A6, A001, A011, A012, */
/* 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, "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);
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, "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, "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, "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;
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, "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;
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);
//devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
break;
/* Haswell */
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);
//devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
break;
default:
branches/ErmaC/Enoch/i386/libsaio/nvidia.c
7777
7878
7979
80
80
81
8182
8283
8384
......
17601761
17611762
17621763
1763
1764
1764
1765
1766
1767
17651768
1766
1769
1770
1771
17671772
17681773
17691774
......
17761781
17771782
17781783
1779
1780
1784
1785
1786
1787
17811788
17821789
17831790
17841791
17851792
1786
1793
1794
17871795
17881796
1789
1790
1797
1798
1799
1800
17911801
17921802
17931803
......
17951805
17961806
17971807
1798
1799
1800
1808
1809
1810
1811
1812
1813
18011814
18021815
18031816
18041817
18051818
18061819
1807
1808
1809
1810
1811
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
18121830
18131831
18141832
......
18261844
18271845
18281846
1829
1847
1848
18301849
18311850
18321851
18331852
18341853
1835
1854
1855
18361856
18371857
18381858
......
18491869
18501870
18511871
1872
18521873
1874
1875
18531876
1877
18541878
1879
1880
18551881
1882
18561883
1884
1885
18571886
1887
18581888
1889
1890
18591891
1892
18601893
1894
1895
18611896
1897
18621898
1863
1899
1900
1901
1902
18641903
1904
18651905
1866
1906
1907
1908
1909
18671910
1911
18681912
1913
18691914
18701915
18711916
......
19281973
19291974
19301975
1931
1976
19321977
19331978
19341979
......
19451990
19461991
19471992
1948
1949
1993
1994
1995
1996
19501997
19511998
1952
1999
2000
2001
19532002
19542003
19552004
1956
2005
2006
2007
19572008
19582009
19592010
......
19852036
19862037
19872038
1988
19892039
19902040
19912041
......
20082058
20092059
20102060
2011
2061
2062
20122063
20132064
2014
2065
2066
2067
20152068
20162069
20172070
20182071
2019
2072
2073
2074
20202075
20212076
20222077
......
20292084
20302085
20312086
2032
2087
2088
20332089
20342090
2035
2091
2092
2093
20362094
20372095
20382096
......
20402098
20412099
20422100
2043
2101
2102
20442103
20452104
2046
2105
2106
2107
20472108
20482109
20492110
20502111
2051
2112
2113
20522114
20532115
2054
2116
2117
2118
20552119
20562120
20572121
20582122
20592123
20602124
2061
2125
2126
20622127
20632128
20642129
......
20672132
20682133
20692134
2070
2071
2135
2136
2137
2138
20722139
20732140
20742141
20752142
20762143
20772144
2078
2145
2146
2147
20792148
20802149
20812150
......
20862155
20872156
20882157
2089
2158
2159
20902160
20912161
20922162
20932163
20942164
20952165
2096
2097
2166
2167
2168
20982169
20992170
2100
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
21012182
21022183
21032184
......
21122193
21132194
21142195
2115
2116
2196
2197
2198
2199
21172200
21182201
2119
2202
2203
21202204
21212205
2122
2206
2207
21232208
2124
2209
2210
21252211
21262212
21272213
2128
2214
2215
21292216
21302217
21312218
......
21412228
21422229
21432230
2144
2231
2232
21452233
21462234
2147
2235
2236
21482237
21492238
21502239
21512240
21522241
2153
2242
2243
21542244
21552245
2156
2246
2247
21572248
21582249
21592250
......
21622253
21632254
21642255
2165
2256
2257
21662258
21672259
2168
2260
2261
21692262
21702263
21712264
......
21952288
21962289
21972290
2198
2291
2292
21992293
22002294
22012295
......
22072301
22082302
22092303
2210
2304
2305
22112306
22122307
22132308
......
22162311
22172312
22182313
2219
2314
2315
22202316
2221
2317
22222318
2223
2224
2319
2320
22252321
22262322
22272323
2228
2324
2325
22292326
22302327
22312328
#define WRITE_LE_SHORT(data) (((data) << 8 & 0xff00) | ((data) >> 8 & 0x00ff ))
#define WRITE_LE_INT(data) (WRITE_LE_SHORT(data) << 16 | WRITE_LE_SHORT(data >> 16))
static bool showGeneric = false;
static boolshowGeneric= false;
static booldoit= false;
char generic_name[128];
extern uint32_t devices_number;
default_NVCAP[8] = channel2;
// patching HEADS
for (i = 0; i < num_outputs; i++) {
if (channel1 & (1 << i)) {
for (i = 0; i < num_outputs; i++)
{
if (channel1 & (1 << i))
{
*entries[i].heads = 1;
} else if(channel2 & (1 << i)) {
}
else if(channel2 & (1 << i))
{
*entries[i].heads = 2;
}
}
// First check in the plist, (for e.g this can override any hardcoded devices)
cardList_t * nvcard = FindCardWithIds(device_id, subsys_id);
if (nvcard) {
if (nvcard->model) {
if (nvcard)
{
if (nvcard->model)
{
return nvcard->model;
}
}
//ErmaC added selector for Chameleon "old" style in System Profiler
if (getBoolForKey(kNvidiaGeneric, &showGeneric, &bootInfo->chameleonConfig)) {
if (getBoolForKey(kNvidiaGeneric, &showGeneric, &bootInfo->chameleonConfig))
{
verbose("NvidiaGeneric = Yes\n");
for (i = 1; i < (sizeof(nvidia_card_generic) / sizeof(nvidia_card_generic[0])); i++) {
if (nvidia_card_generic[i].device == device_id) {
for (i = 1; i < (sizeof(nvidia_card_generic) / sizeof(nvidia_card_generic[0])); i++)
{
if (nvidia_card_generic[i].device == device_id)
{
return nvidia_card_generic[i].name;
}
}
}
// Then check the exceptions table
if (subsys_id) {
for (i = 0; i < (sizeof(nvidia_card_exceptions) / sizeof(nvidia_card_exceptions[0])); i++) {
if ((nvidia_card_exceptions[i].device == device_id) && (nvidia_card_exceptions[i].subdev == subsys_id)){
if (subsys_id)
{
for (i = 0; i < (sizeof(nvidia_card_exceptions) / sizeof(nvidia_card_exceptions[0])); i++)
{
if ((nvidia_card_exceptions[i].device == device_id) && (nvidia_card_exceptions[i].subdev == subsys_id))
{
return nvidia_card_exceptions[i].name;
}
}
}
// At last try the generic names
for (i = 1; i < (sizeof(nvidia_card_generic) / sizeof(nvidia_card_generic[0])); i++) {
if (nvidia_card_generic[i].device == device_id) {
if (subsys_id) {
for (j = 0; j < (sizeof(nvidia_card_vendors) / sizeof(nvidia_card_vendors[0])); j++) {
if (nvidia_card_vendors[j].device == (subsys_id & 0xffff0000)) {
for (i = 1; i < (sizeof(nvidia_card_generic) / sizeof(nvidia_card_generic[0])); i++)
{
if (nvidia_card_generic[i].device == device_id)
{
if (subsys_id)
{
for (j = 0; j < (sizeof(nvidia_card_vendors) / sizeof(nvidia_card_vendors[0])); j++)
{
if (nvidia_card_vendors[j].device == (subsys_id & 0xffff0000))
{
snprintf(generic_name, 128, "%s %s", // sizeof(generic_name), "%s %s",
nvidia_card_vendors[j].name, nvidia_card_generic[i].name);
return &generic_name[0];
int fd;
int size;
if ((fd = open_bvdev("bt(0,0)", filename, 0)) < 0) {
if ((fd = open_bvdev("bt(0,0)", filename, 0)) < 0)
{
return 0;
}
size = file_size(fd);
if (size) {
if (size)
{
*buf = malloc(size);
size = read(fd, (char *)buf, size);
}
return 0;
if (!DP_ADD_TEMP_VAL(device, nvidia_compatible_0))
{
return 0;
}
if (!DP_ADD_TEMP_VAL(device, nvidia_device_type_0))
{
return 0;
}
if (!DP_ADD_TEMP_VAL(device, nvidia_name_0))
{
return 0;
}
if (!DP_ADD_TEMP_VAL(device, nvidia_compatible_1))
{
return 0;
}
if (!DP_ADD_TEMP_VAL(device, nvidia_device_type_1))
{
return 0;
}
if (!DP_ADD_TEMP_VAL(device, nvidia_name_1))
{
return 0;
if (devices_number == 1) {
}
if (devices_number == 1)
{
if (!DP_ADD_TEMP_VAL(device, nvidia_device_type_parent))
{
return 0;
} else {
}
}
else
{
if (!DP_ADD_TEMP_VAL(device, nvidia_device_type_child))
{
return 0;
}
}
// Rek : Dont use sprintf return, it does not WORK !! our custom sprintf() always return 0!
// 10DE0F0014583544 2GB VRAM
//if (((nvda_dev->subsys_id.subsys.vendor_id << 16) | nvda_dev->subsys_id.subsys.device_id) == 0x14583544 )
//{
vram_size = -2147483648UL;//2147483648;
vram_size = -2147483648UL; // 2147483648;
//}
break;
case 0x11C6:// GTX650TI 11C6
break;
}
if (!vram_size){ // Finally, if vram_size still not set do the calculation with our own method
if (nvCardType < NV_ARCH_50) {
if (!vram_size)
{ // Finally, if vram_size still not set do the calculation with our own method
if (nvCardType < NV_ARCH_50)
{
vram_size = REG32(NV04_PFB_FIFO_DATA);
vram_size &= NV10_PFB_FIFO_DATA_RAM_AMOUNT_MB_MASK;
} else if (nvCardType < NV_ARCH_C0) {
}
else if (nvCardType < NV_ARCH_C0)
{
vram_size = REG32(NV04_PFB_FIFO_DATA);
vram_size |= (vram_size & 0xff) << 32;
vram_size &= 0xffffffff00ll;
} else { // >= NV_ARCH_C0
}
else
{ // >= NV_ARCH_C0
vram_size = REG32(NVC0_MEM_CTRLR_RAM_AMOUNT) << 20;
vram_size *= REG32(NVC0_MEM_CTRLR_COUNT);
}
charkNVCAP[12];
char*model = NULL;
const char*value;
booldoit;
fill_card_list();
verbose("Looking for nvidia video bios file %s\n", nvFilename);
nvBiosOveride = load_nvidia_bios_file(nvFilename, &rom);
if (nvBiosOveride > 0) {
if (nvBiosOveride > 0)
{
verbose("Using nVidia Video BIOS File %s (%d Bytes)\n", nvFilename, nvBiosOveride);
DBG("%s Signature 0x%02x%02x %d bytes\n", nvFilename, rom[0], rom[1], nvBiosOveride);
} else {
}
else
{
printf("ERROR: unable to open nVidia Video BIOS File %s\n", nvFilename);
free(rom);
return false;
}
} else {
}
else
{
uint8_t*nvRom;
rom = malloc(NVIDIA_ROM_SIZE);
// Otherwise read bios from card
nvRom = (uint8_t*)&regs[NV_PROM_OFFSET];
// Valid Signature ?
if (checkNvRomSig(nvRom)) {
if (checkNvRomSig(nvRom))
{
bcopy((uint8_t *)nvRom, rom, NVIDIA_ROM_SIZE);
DBG("PROM Address 0x%x Signature 0x%02x%02x\n", nvRom, rom[0], rom[1]);
} else {
}
else
{
// disable PROM access
(REG32(NV_PBUS_PCI_NV_20)) = NV_PBUS_PCI_NV_20_ROM_SHADOW_ENABLED;
//PRAM next
nvRom = (uint8_t*)&regs[NV_PRAMIN_OFFSET];
if(checkNvRomSig(nvRom)) {
if(checkNvRomSig(nvRom))
{
bcopy((uint32_t *)nvRom, rom, NVIDIA_ROM_SIZE);
DBG("PRAM Address 0x%x Signature 0x%02x%02x\n", nvRom, rom[0], rom[1]);
} else {
}
else
{
// 0xC0000 last
bcopy((char *)0xc0000, rom, NVIDIA_ROM_SIZE);
// Valid Signature ?
if (!checkNvRomSig(rom)) {
if (!checkNvRomSig(rom))
{
printf("ERROR: Unable to locate nVidia Video BIOS\n");
return false;
} else {
}
else
{
DBG("ROM Address 0x%x Signature 0x%02x%02x\n", nvRom, rom[0], rom[1]);
}
}//end PRAM check
}//end PROM check
}//end load rom from bios
if ((nvPatch = patch_nvidia_rom(rom)) == PATCH_ROM_FAILED) {
if ((nvPatch = patch_nvidia_rom(rom)) == PATCH_ROM_FAILED)
{
printf("ERROR: nVidia ROM Patching Failed!\n");
free(rom);
return false;
rom_pci_header = (option_rom_pci_header_t*)(rom + *(uint16_t *)&rom[24]);
// check for 'PCIR' sig
if (rom_pci_header->signature == 0x50434952) {
if (rom_pci_header->device_id != nvda_dev->device_id) {
if (rom_pci_header->signature == 0x50434952)
{
if (rom_pci_header->device_id != nvda_dev->device_id)
{
// Get Model from the OpROM
model = get_nvidia_model(((rom_pci_header->vendor_id << 16) | rom_pci_header->device_id), 0);
// Get VRAM again
videoRam = mem_detect(regs, nvCardType, nvda_dev, ((rom_pci_header->vendor_id << 16) | rom_pci_header->device_id), 0);
} else {
}
else
{
printf("nVidia incorrect PCI ROM signature: 0x%x\n", rom_pci_header->signature);
}
}
nvda_dev->subsys_id.subsys.vendor_id, nvda_dev->subsys_id.subsys.device_id,
devicepath, devices_number);
if (!string) {
if (!string)
{
string = devprop_create_string();
}
device = devprop_add_device(string, devicepath);
/* FIXME: for primary graphics card only */
boot_display = 1;
if (devices_number == 1) {
devprop_add_value(device, "@0,AAPL,boot-display", (uint8_t*)&boot_display, 4);
if (devices_number == 1)
{
devprop_add_value(device, "@0,AAPL,boot-display", (uint8_t *)&boot_display, 4);
}
if (nvPatch == PATCH_ROM_SUCCESS_HAS_LVDS) {
if (getBoolForKey(kUseIntelHDMI, &doit, &bootInfo->chameleonConfig) && doit)
{
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-2", 10);
}
else
{
devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10);
}
if (nvPatch == PATCH_ROM_SUCCESS_HAS_LVDS)
{
uint8_t built_in = 0x01;
devprop_add_value(device, "@0,built-in", &built_in, 1);
}
int crlf_count = 0;
// only search the first 384 bytes
for (i = 0; i < 0x180; i++) {
if (rom[i] == 0x0D && rom[i+1] == 0x0A) {
for (i = 0; i < 0x180; i++)
{
if (rom[i] == 0x0D && rom[i+1] == 0x0A)
{
crlf_count++;
// second 0x0D0A was found, extract bios version
if (crlf_count == 2) {
if (crlf_count == 2)
{
if (rom[i-1] == 0x20) i--; // strip last " "
for (version_start = i; version_start > (i-MAX_BIOS_VERSION_LENGTH); version_start--) {
for (version_start = i; version_start > (i-MAX_BIOS_VERSION_LENGTH); version_start--)
{
// find start
if (rom[version_start] == 0x00) {
if (rom[version_start] == 0x00)
{
version_start++;
// strip "Version "
if (strncmp((const char*)rom+version_start, "Version ", 8) == 0) {
if (strncmp((const char*)rom+version_start, "Version ", 8) == 0)
{
version_start += 8;
}
snprintf(biosVersion, sizeof(biosVersion), "%s", (nvBiosOveride > 0) ? nvFilename : version_str);
snprintf(kNVCAP, sizeof(kNVCAP), "NVCAP_%04x", nvda_dev->device_id);
if (getValueForKey(kNVCAP, &value, &len, &bootInfo->chameleonConfig) && len == NVCAP_LEN * 2) {
if (getValueForKey(kNVCAP, &value, &len, &bootInfo->chameleonConfig) && len == NVCAP_LEN * 2)
{
uint8_t new_NVCAP[NVCAP_LEN];
if (hex2bin(value, new_NVCAP, NVCAP_LEN) == 0) {
if (hex2bin(value, new_NVCAP, NVCAP_LEN) == 0)
{
verbose("Using user supplied NVCAP for %s :: %s\n", model, devicepath);
memcpy(default_NVCAP, new_NVCAP, NVCAP_LEN);
}
}
if (getValueForKey(kDcfg0, &value, &len, &bootInfo->chameleonConfig) && len == DCFG0_LEN * 2) {
if (getValueForKey(kDcfg0, &value, &len, &bootInfo->chameleonConfig) && len == DCFG0_LEN * 2)
{
uint8_t new_dcfg0[DCFG0_LEN];
if (hex2bin(value, new_dcfg0, DCFG0_LEN) == 0) {
if (hex2bin(value, new_dcfg0, DCFG0_LEN) == 0)
{
memcpy(default_dcfg_0, new_dcfg0, DCFG0_LEN);
verbose("Using user supplied @0,display-cfg\n");
}
}
if (getValueForKey(kDcfg1, &value, &len, &bootInfo->chameleonConfig) && len == DCFG1_LEN * 2) {
if (getValueForKey(kDcfg1, &value, &len, &bootInfo->chameleonConfig) && len == DCFG1_LEN * 2)
{
uint8_t new_dcfg1[DCFG1_LEN];
if (hex2bin(value, new_dcfg1, DCFG1_LEN) == 0) {
if (hex2bin(value, new_dcfg1, DCFG1_LEN) == 0)
{
memcpy(default_dcfg_1, new_dcfg1, DCFG1_LEN);
verbose("Using user supplied @1,display-cfg\n");
/******************** Added Marchrius.**********************/
// For the AppleBacklightDisplay //
/***********************************************************/
if (getBoolForKey(kEnableBacklight, &doit, &bootInfo->chameleonConfig) && doit){
if (getBoolForKey(kEnableBacklight, &doit, &bootInfo->chameleonConfig) && doit)
{
uint8_t AAPL_value[] = {0x01, 0x00, 0x00, 0x00}; //Is the same for all
devprop_add_value(device, "AAPL,HasPanel", AAPL_value, 4);
devprop_add_value(device, "AAPL,Haslid", AAPL_value, 4);
/***********************************************************/
// For the DualLink //
/***********************************************************/
if (getBoolForKey(kEnableDualLink, &doit, &bootInfo->chameleonConfig) && doit) {
if (getBoolForKey(kEnableDualLink, &doit, &bootInfo->chameleonConfig) && doit)
{
uint8_t AAPL00_value[] = {0x01, 0x00, 0x00, 0x00};
devprop_add_value(device, "AAPL00,DualLink", AAPL00_value, 4);
}
/************************ HDMI Audio ***********************/
doit = false;
//http://forge.voodooprojects.org/p/chameleon/issues/67/
if(getBoolForKey(kEnableHDMIAudio, &doit, &bootInfo->chameleonConfig) && doit) {
if(getBoolForKey(kEnableHDMIAudio, &doit, &bootInfo->chameleonConfig) && doit)
{
static uint8_t connector_type_1[]= {0x00, 0x08, 0x00, 0x00};
devprop_add_value(device, "@0,connector-type",connector_type_1, 4);
//devprop_add_value(device, "@0,connector-type",connector_type_1, 4);
devprop_add_value(device, "@1,connector-type",connector_type_1, 4);
devprop_add_value(device, "@2,connector-type",connector_type_1, 4);
devprop_add_value(device, "@3,connector-type",connector_type_1, 4);
//devprop_add_value(device, "@2,connector-type",connector_type_1, 4);
//devprop_add_value(device, "@3,connector-type",connector_type_1, 4);
}
/************************ End Audio *************************/
if (getBoolForKey(kVBIOS, &doit, &bootInfo->chameleonConfig) && doit) {
if (getBoolForKey(kVBIOS, &doit, &bootInfo->chameleonConfig) && doit)
{
devprop_add_value(device, "vbios", rom, (nvBiosOveride > 0) ? nvBiosOveride : (rom[2] * 512));
}
branches/ErmaC/Enoch/i386/libsaio/ati.c
99
1010
1111
12
1213
1314
1415
......
15671568
15681569
15691570
1571
1572
1573
1574
1575
1576
1577
1578
1579
15701580
15711581
15721582
static value_t aty_name;
static value_t aty_nameparent;
static booldoit= false;
card_t *card;
card_config_t card_configs[] = {
}
// -------------------------------------------------
if (getBoolForKey(kUseIntelHDMI, &doit, &bootInfo->chameleonConfig) && doit)
{
devprop_add_value(card->device, "hda-gfx", (uint8_t *)"onboard-2", 10);
}
else
{
devprop_add_value(card->device, "hda-gfx", (uint8_t *)"onboard-1", 10);
}
#if 0
uint64_t fb= (uint32_t)card->fb;
uint64_t mmio= (uint32_t)card->mmio;
branches/ErmaC/Enoch/i386/boot2/boot.h
124124
125125
126126
127
128
127
128
129
129130
130131
131132
/* Slice: added this */
#define kPS2RestartFix"PS2RestartFix"/* acpi_patcher.c */
#define kInjectEDID"InjectEDID"/* ati.c*/
#define kCustomEDID"CustomEDID"/* ati.c*/
//#define kInjectEDID"InjectEDID"/* ati.c */
//#define kCustomEDID"CustomEDID"/* ati.c */
#define kUseIntelHDMI"UseIntelHDMI"/* ati.c && nvidia.c && gma.c */
/* Signal64: added this key */
#define kLegacyOff"USBLegacyOff"/* usb.c */
branches/ErmaC/Enoch/package/OptionalSettings/Audio.txt
2626
2727
2828
29
2930
# Note: There must be a carriage return at end of last line
# ---------------------------------------------
#Bool@HDAEnabler:HDAEnabler=Yes
#Bool@UseIntelHDMI:UseIntelHDMI=Yes
Bool@EnableHDMIAudio:EnableHDMIAudio=Yes
branches/ErmaC/Enoch/CHANGES
1
2
13
4
25
36
47
- ErmaC : Add UseIntelHDMI for hda-gfx = onboard-1 or 2 that vale will be injected into the GFX0 and HDEF devices. credits Clover Team
- ErmaC : Improve gma detection for HD4600
- cparm : Merge (security, stability, bugs fixes) improvements.
- ErmaC : C6 & C7 States credits to Clover Team.
- Zenith432 : Completed patch for ExFAT support ( http://www.insanelymac.com/forum/topic/302938-exfat-volume-boot-record-for-chameleon )
- Zenith432 : add EXFAT boot support by Zenith432
- zenith432 : Merge patch from issue 386 (boot2 does not know how to read files from FAT partitions on GPT)

Archive Download the corresponding diff file

Revision: 2506