Chameleon

Chameleon Commit Details

Date:2011-12-06 20:32:35 (8 years 11 months ago)
Author:ErmaC
Commit:1713
Parents: 1712
Message:sync with trunk
Changes:
M/branches/ErmaC/Trunk/i386/boot2/boot.c
M/branches/ErmaC/Modules/i386/boot2/boot.c
M/branches/ErmaC/Trunk/package/Resources/fr.lproj/Description.html
M/branches/ErmaC/Trunk/i386/libsaio/ati.c
M/branches/ErmaC/Trunk/i386/boot2/options.c
M/branches/ErmaC/Trunk/i386/libsaio/stringTable.c
M/branches/ErmaC/Modules/package/Resources/fr.lproj/Description.html
M/branches/ErmaC/Modules/i386/boot2/options.c
M/branches/ErmaC/Modules/i386/libsaio/stringTable.c
M/branches/ErmaC/Modules/i386/modules/AMDGraphicsEnabler/ati.c

File differences

branches/ErmaC/Trunk/i386/libsaio/ati.c
1414
1515
1616
17
18
17
18
1919
2020
2121
......
4444
4545
4646
47
4847
4948
5049
......
5857
5958
6059
60
61
62
63
64
6165
6266
6367
......
9498
9599
96100
101
102
103
104
105
97106
98107
99108
......
105114
106115
107116
108
117
109118
110
119
111120
112121
113122
......
116125
117126
118127
119
128
120129
121130
122131
123132
124133
125
134
126135
127
128
129
136
137
138
130139
131140
132141
......
135144
136145
137146
138
139
147
148
140149
141
142
150
151
143152
144153
145154
146155
147156
148157
149
150
158
159
151160
152161
153162
......
202211
203212
204213
205
206
214
215
207216
208
217
209218
210219
211220
......
491500
492501
493502
503
504
494505
495506
496507
......
543554
544555
545556
557
558
546559
547560
548561
......
725738
726739
727740
741
742
728743
729744
730745
#define OFFSET_TO_GET_ATOMBIOS_STRINGS_START 0x6e
#define Reg32(reg)(*(volatile uint32_t *)(card->mmio + reg))
#define RegRead32(reg)(Reg32(reg))
#define Reg32(reg)(*(volatile uint32_t *)(card->mmio + reg))
#define RegRead32(reg)(Reg32(reg))
#define RegWrite32(reg, value)(Reg32(reg) = value)
typedef enum {
CHIP_FAMILY_RV710,
CHIP_FAMILY_RV730,
CHIP_FAMILY_RV740,
CHIP_FAMILY_RV772,
CHIP_FAMILY_RV770,
CHIP_FAMILY_RV790,
/* Evergreen */
CHIP_FAMILY_CAICOS,
CHIP_FAMILY_CAYMAN,
CHIP_FAMILY_TURKS,
/* Southern Islands */
//"TAITI"
//"THAMES"
//"LOMBOK"
//"NEW_ZEALAND"
CHIP_FAMILY_LAST
} chip_family_t;
"Caicos",
"Cayman",
"Turks",
/* Southern Islands */
//"Tahiti"
//"Thames"
//"Lombok"
//"New_Zealand"
""
};
static card_config_t card_configs[] = {
{NULL,0},
{"Alopias",2},
{"Alouatta",4},
{"Alouatta",4},
{"Baboon",3},
{"Cardinal",2},
{"Cardinal",2},
{"Caretta",1},
{"Colobus",2},
{"Douc",2},
{"Galago",2},
{"Gliff",3},
{"Hoolock",3},
{"Hypoprion",2},
{"Hypoprion",2},
{"Iago",2},
{"Kakapo",3},
{"Kipunji",4},
{"Lamna",2},
{"Langur",3},
{"Megalodon",3},
{"Megalodon",3},
{"Motmot",2},
{"Nomascus",5},
{"Orangutan",2},
{"Peregrine",2},
{"Nomascus",5},
{"Orangutan",2},
{"Peregrine",2},
{"Quail",3},
{"Raven",3},
{"Shrike",3},
{"Uakari",4},
{"Vervet",4},
{"Zonalis",6},
{"Pithecia",3},
{"Bulrushes",6},
{"Pithecia",3},
{"Bulrushes",6},
{"Cattail",4},
{"Hydrilla",5},
{"Duckweed",4},
{"Hydrilla",5},
{"Duckweed",4},
{"Fanwort",4},
{"Elodea",5},
{"Kudzu",2},
{"Gibba",5},
{"Lotus",3},
{"Ipomoea",3},
{"Mangabey",2},
{"Muskgrass",4},
{"Mangabey",2},
{"Muskgrass",4},
{"Juncus",4}
};
} config_name_t;
typedef struct {
uint16_tdevice_id;
uint32_tsubsys_id;
uint16_tdevice_id;
uint32_tsubsys_id;
chip_family_tchip_family;
const char*model_name;
const char*model_name;
config_name_tcfg_name;
} radeon_card_info_t;
{ 0x68B8,0x00CF106B, CHIP_FAMILY_JUNIPER,"ATI Radeon HD 5770",kHoolock},
{ 0x68B8,0x145821f6, CHIP_FAMILY_JUNIPER,"GigaByte HD5770 R577SL-1GD",kVervet}, // ErmaC
{ 0x68B8,0x29901682, CHIP_FAMILY_JUNIPER,"ATI Radeon HD 5770",kVervet},
{ 0x68B8,0x29911682, CHIP_FAMILY_JUNIPER,"ATI Radeon HD 5770",kVervet},
{ 0x68E1,0x1426103C, CHIP_FAMILY_CEDAR,"ATI Radeon HD 5430M",kEulemur},
{ 0x68F9,0x03741043, CHIP_FAMILY_CEDAR,"ASUS EAH5450",kNull}, // ErmaC
{ 0x68F9,0x5470174B, CHIP_FAMILY_CEDAR,"ATI Radeon HD 5470",kNull},
{ 0x68F9,0x5490174B, CHIP_FAMILY_CEDAR,"ATI Radeon HD 5490",kNull},
{ 0x68F9,0x5530174B, CHIP_FAMILY_CEDAR,"ATI Radeon HD 5530",kNull},
{ 0x6770,0x00000000, CHIP_FAMILY_CAICOS,"AMD Radeon HD 6400 Series",kNull},
{ 0x6779,0x00000000, CHIP_FAMILY_CAICOS,"AMD Radeon HD 6450 Series",kBulrushes},
/* Southen Islands */
{ 0x0000,0x00000000, CHIP_FAMILY_UNKNOW,NULL,kNull}
};
branches/ErmaC/Trunk/i386/libsaio/stringTable.c
498498
499499
500500
501
501
502502
503503
504504
......
635635
636636
637637
638
639
640
641638
642639
643640
641
644642
643
644
645
646
645647
646648
647649
ret = getValueForConfigTableKey(config, key, val, size);
// Try to find alternate keys in bootInfo->overrideConfig
// Try to find alternate keys in bootInfo->chameleonConfig (if config can be overriden)
// and prefer its values with the exceptions for
// "Kernel"="mach_kernel" and "Kernel Flags"="".
sysConfigValid = true;
ret=0;
// enable canOverride flag
config->canOverride = true;
break;
}
}
if(ret == -1) ret = loadHelperConfig(config);
// Always enable canOverride flag (for SystemConfig)
config->canOverride = true;
return ret;
}
branches/ErmaC/Trunk/i386/boot2/boot.c
164164
165165
166166
167
167
168
168169
169170
170171
......
181182
182183
183184
184
185
186
187
188
189
190
191
192
193
194
185
195186
196187
197188
......
206197
207198
208199
209
200
201
202
203
210204
211205
212206
213207
214208
209
210
211
215212
216213
217214
md0Ramdisk();
verbose("Starting Darwin %s\n",( archCpuType == CPU_TYPE_I386 ) ? "x86" : "x86_64");
verbose("Boot Args: %s\n", bootArgs->CommandLine);
// Cleanup the PXE base code.
if ( (gBootFileType == kNetworkDeviceType) && gUnloadPXEOnExit ) {
}
usb_loop();
// Notify modules that the kernel is about to be started
if (checkOSVersion("10.7"))
{
execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgs, NULL, NULL);
}
else
{
execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgsPreLion, NULL, NULL);
}
// If we were in text mode, switch to graphics mode.
// This will draw the boot graphics unless we are in
// verbose mode.
// Jump to kernel's entry point. There's no going back now.
if (checkOSVersion("10.7")) {
// Notify modules that the kernel is about to be started
execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgs, NULL, NULL);
// Masking out so that Lion doesn't doublefault
startprog( kernelEntry, bootArgs );
}
else {
// Notify modules that the kernel is about to be started
execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgsPreLion, NULL, NULL);
startprog( kernelEntry, bootArgsPreLion );
}
branches/ErmaC/Trunk/i386/boot2/options.c
12141214
12151215
12161216
1217
1217
12181218
12191219
12201220
cntRemaining = BOOT_STRING_LEN - 2; // save 1 for NULL, 1 for space
argP = bootArgs->CommandLine;
// Get config table kernel flags, if not ignored.
// Get config kernel flags, if not ignored.
if (getValueForBootKey(cp, kIgnoreBootFileFlag, &val, &cnt) ||
!getValueForKey( kKernelFlagsKey, &val, &cnt, &bootInfo->bootConfig )) {
val = "";
branches/ErmaC/Trunk/package/Resources/fr.lproj/Description.html
2525
2626
2727
28
28
2929
3030
3131
3232
3333
34
34
3535
3636
3737
3838
3939
4040
41
41
4242
4343
<p class="p1">- Prise en charge d'un SMBIOS modifié. Permet d'outrepasser le SMBIOS d'origine de votre machine.</p>
<p class="p1">- Prise en charge d'un DSDT modifié. Permet d'appliquer un DSDT patché et résoudre beaucoup de problèmes.</p>
<p class="p1">- Injection des propriétés de périphériques via une chaîne de caractère "device-properties".</p>
<p class="p1">- Fichiers boot0 et boot1h hybrides. Permet l'utilisation de disques partitionés via MBR ou GPT.</p>
<p class="p1">- Fichiers boot0 et boot1h hybrides. Permet l'utilisation de disques partitionés en MBR ou GPT.</p>
<p class="p1">- Detection automatique du FSB, même pour les processeurs AMD récents.</p>
<p class="p1">- Support du RAID Logiciel d'Apple.</p>
<p class="p1">- Activateur graphique Nvidia &amp; ATI/AMD intégré.</p>
<p class="p1">- Support de modules (extensions de Chameleon).</p>
<p class="p1">- Détection mémoire adaptée de memtest86 : <a href="http://www.memtest.org/"><span class="s1">http://www.memtest.org</span></a></p>
<p class="p1">- Génaration automatique des P-State &amp; C-State pour une gestion de l'alimentation native.</p>
<p class="p1">- Génération automatique des P-State &amp; C-State pour une gestion de l'alimentation native.</p>
<p class="p1">- Journalisation des messages console.</p>
<p class="p3"><br></p>
<p class="p3"><br></p>
<p class="p1">Le code est publié sous la version 2 de la licence GPL (Gnu Public License).</p>
<p class="p4"><span class="s2"><a href="http://forge.voodooprojects.org/p/chameleon/">http://forge.voodooprojects.org/p/chameleon</a></span></p>
<p class="p2"><br></p>
<p class="p4"><span class="s3">Question fréquentes (en anglais): <a href="http://forum.voodooprojects.org/index.php/topic,754.0.html"><span class="s2">http://forum.voodooprojects.org/index.php/topic,754.0.html</span></a></span></p>
<p class="p4"><span class="s3">Questions fréquentes (en anglais): <a href="http://forum.voodooprojects.org/index.php/topic,754.0.html"><span class="s2">http://forum.voodooprojects.org/index.php/topic,754.0.html</span></a></span></p>
</body>
</html>
branches/ErmaC/Modules/i386/libsaio/stringTable.c
498498
499499
500500
501
501
502502
503503
504504
......
635635
636636
637637
638
639
640
641638
642639
643640
641
644642
643
644
645
646
645647
646648
647649
ret = getValueForConfigTableKey(config, key, val, size);
// Try to find alternate keys in bootInfo->overrideConfig
// Try to find alternate keys in bootInfo->chameleonConfig (if config can be overriden)
// and prefer its values with the exceptions for
// "Kernel"="mach_kernel" and "Kernel Flags"="".
sysConfigValid = true;
ret=0;
// enable canOverride flag
config->canOverride = true;
break;
}
}
if(ret == -1) ret = loadHelperConfig(config);
// Always enable canOverride flag (for SystemConfig)
config->canOverride = true;
return ret;
}
branches/ErmaC/Modules/i386/boot2/boot.c
164164
165165
166166
167
167
168
168169
169170
170171
......
181182
182183
183184
184
185
186
187
188
189
190
191
192
193
194
185
195186
196187
197188
......
206197
207198
208199
209
200
201
202
203
210204
211205
212206
213207
214208
209
210
211
215212
216213
217214
md0Ramdisk();
verbose("Starting Darwin %s\n",( archCpuType == CPU_TYPE_I386 ) ? "x86" : "x86_64");
verbose("Boot Args: %s\n", bootArgs->CommandLine);
// Cleanup the PXE base code.
if ( (gBootFileType == kNetworkDeviceType) && gUnloadPXEOnExit ) {
}
usb_loop();
// Notify modules that the kernel is about to be started
if (checkOSVersion("10.7"))
{
execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgs, NULL, NULL);
}
else
{
execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgsPreLion, NULL, NULL);
}
// If we were in text mode, switch to graphics mode.
// This will draw the boot graphics unless we are in
// verbose mode.
// Jump to kernel's entry point. There's no going back now.
if (checkOSVersion("10.7")) {
// Notify modules that the kernel is about to be started
execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgs, NULL, NULL);
// Masking out so that Lion doesn't doublefault
startprog( kernelEntry, bootArgs );
}
else {
// Notify modules that the kernel is about to be started
execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgsPreLion, NULL, NULL);
startprog( kernelEntry, bootArgsPreLion );
}
branches/ErmaC/Modules/i386/boot2/options.c
12141214
12151215
12161216
1217
1217
12181218
12191219
12201220
cntRemaining = BOOT_STRING_LEN - 2; // save 1 for NULL, 1 for space
argP = bootArgs->CommandLine;
// Get config table kernel flags, if not ignored.
// Get config kernel flags, if not ignored.
if (getValueForBootKey(cp, kIgnoreBootFileFlag, &val, &cnt) ||
!getValueForKey( kKernelFlagsKey, &val, &cnt, &bootInfo->bootConfig )) {
val = "";
branches/ErmaC/Modules/i386/modules/AMDGraphicsEnabler/ati.c
6464
6565
6666
67
68
69
70
71
6772
6873
6974
......
100105
101106
102107
108
109
110
111
112
103113
104114
105115
......
111121
112122
113123
114
124
115125
116
126
117127
118128
119129
......
122132
123133
124134
125
135
126136
127137
128138
129139
130140
131
141
132142
133
134
135
143
144
145
136146
137147
138148
......
141151
142152
143153
144
145
154
155
146156
147
148
157
158
149159
150160
151161
152162
153163
154164
155
156
165
166
157167
158168
159169
......
208218
209219
210220
211
212
221
222
213223
214
224
215225
216
226
217227
218228
219229
......
498508
499509
500510
511
512
501513
502514
503515
......
550562
551563
552564
565
566
553567
554568
555569
......
732746
733747
734748
749
750
735751
736752
737753
CHIP_FAMILY_CAICOS,
CHIP_FAMILY_CAYMAN,
CHIP_FAMILY_TURKS,
/* Southern Islands */
//"TAITI"
//"THAMES"
//"LOMBOK"
//"NEW_ZEALAND"
CHIP_FAMILY_LAST
} chip_family_t;
"Caicos",
"Cayman",
"Turks",
/* Southern Islands */
//"Tahiti"
//"Thames"
//"Lombok"
//"New_Zealand"
""
};
static card_config_t card_configs[] = {
{NULL,0},
{"Alopias",2},
{"Alouatta",4},
{"Alouatta",4},
{"Baboon",3},
{"Cardinal",2},
{"Cardinal",2},
{"Caretta",1},
{"Colobus",2},
{"Douc",2},
{"Galago",2},
{"Gliff",3},
{"Hoolock",3},
{"Hypoprion",2},
{"Hypoprion",2},
{"Iago",2},
{"Kakapo",3},
{"Kipunji",4},
{"Lamna",2},
{"Langur",3},
{"Megalodon",3},
{"Megalodon",3},
{"Motmot",2},
{"Nomascus",5},
{"Orangutan",2},
{"Peregrine",2},
{"Nomascus",5},
{"Orangutan",2},
{"Peregrine",2},
{"Quail",3},
{"Raven",3},
{"Shrike",3},
{"Uakari",4},
{"Vervet",4},
{"Zonalis",6},
{"Pithecia",3},
{"Bulrushes",6},
{"Pithecia",3},
{"Bulrushes",6},
{"Cattail",4},
{"Hydrilla",5},
{"Duckweed",4},
{"Hydrilla",5},
{"Duckweed",4},
{"Fanwort",4},
{"Elodea",5},
{"Kudzu",2},
{"Gibba",5},
{"Lotus",3},
{"Ipomoea",3},
{"Mangabey",2},
{"Muskgrass",4},
{"Mangabey",2},
{"Muskgrass",4},
{"Juncus",4}
};
} config_name_t;
typedef struct {
uint16_tdevice_id;
uint32_tsubsys_id;
uint16_tdevice_id;
uint32_tsubsys_id;
chip_family_tchip_family;
const char*model_name;
const char*model_name;
config_name_tcfg_name;
uint8_tmax_ports;
uint8_tmax_ports;
} radeon_card_info_t;
static radeon_card_info_t radeon_cards[] = {
{ 0x68B8,0x00CF106B, CHIP_FAMILY_JUNIPER,"ATI Radeon HD 5770",kHoolock, 0 },
{ 0x68B8,0x145821f6, CHIP_FAMILY_JUNIPER,"GigaByte HD5770 R577SL-1GD",kVervet, 0 }, // ErmaC
{ 0x68B8,0x29901682, CHIP_FAMILY_JUNIPER,"ATI Radeon HD 5770",kVervet, 0 },
{ 0x68B8,0x29911682, CHIP_FAMILY_JUNIPER,"ATI Radeon HD 5770",kVervet, 0 },
{ 0x68E1,0x1426103C, CHIP_FAMILY_CEDAR,"ATI Radeon HD 5430M",kEulemur, 0 },
{ 0x68F9,0x03741043, CHIP_FAMILY_CEDAR,"ASUS EAH5450",kNull, 0 }, // ErmaC
{ 0x68F9,0x5470174B, CHIP_FAMILY_CEDAR,"ATI Radeon HD 5470",kNull, 0 },
{ 0x68F9,0x5490174B, CHIP_FAMILY_CEDAR,"ATI Radeon HD 5490",kNull, 0 },
{ 0x68F9,0x5530174B, CHIP_FAMILY_CEDAR,"ATI Radeon HD 5530",kNull, 0 },
{ 0x6770,0x00000000, CHIP_FAMILY_CAICOS,"AMD Radeon HD 6400 Series",kNull, 0 },
{ 0x6779,0x00000000, CHIP_FAMILY_CAICOS,"AMD Radeon HD 6450 Series",kBulrushes, 0 },
/* Southen Islands */
};
typedef struct {
branches/ErmaC/Modules/package/Resources/fr.lproj/Description.html
2525
2626
2727
28
28
2929
3030
3131
3232
3333
34
34
3535
3636
3737
3838
3939
4040
41
41
4242
4343
<p class="p1">- Prise en charge d'un SMBIOS modifié. Permet d'outrepasser le SMBIOS d'origine de votre machine.</p>
<p class="p1">- Prise en charge d'un DSDT modifié. Permet d'appliquer un DSDT patché et résoudre beaucoup de problèmes.</p>
<p class="p1">- Injection des propriétés de périphériques via une chaîne de caractère "device-properties".</p>
<p class="p1">- Fichiers boot0 et boot1h hybrides. Permet l'utilisation de disques partitionés via MBR ou GPT.</p>
<p class="p1">- Fichiers boot0 et boot1h hybrides. Permet l'utilisation de disques partitionés en MBR ou GPT.</p>
<p class="p1">- Detection automatique du FSB, même pour les processeurs AMD récents.</p>
<p class="p1">- Support du RAID Logiciel d'Apple.</p>
<p class="p1">- Activateur graphique Nvidia &amp; ATI/AMD intégré.</p>
<p class="p1">- Support de modules (extensions de Chameleon).</p>
<p class="p1">- Détection mémoire adaptée de memtest86 : <a href="http://www.memtest.org/"><span class="s1">http://www.memtest.org</span></a></p>
<p class="p1">- Génaration automatique des P-State &amp; C-State pour une gestion de l'alimentation native.</p>
<p class="p1">- Génération automatique des P-State &amp; C-State pour une gestion de l'alimentation native.</p>
<p class="p1">- Journalisation des messages console.</p>
<p class="p3"><br></p>
<p class="p3"><br></p>
<p class="p1">Le code est publié sous la version 2 de la licence GPL (Gnu Public License).</p>
<p class="p4"><span class="s2"><a href="http://forge.voodooprojects.org/p/chameleon/">http://forge.voodooprojects.org/p/chameleon</a></span></p>
<p class="p2"><br></p>
<p class="p4"><span class="s3">Question fréquentes (en anglais): <a href="http://forum.voodooprojects.org/index.php/topic,754.0.html"><span class="s2">http://forum.voodooprojects.org/index.php/topic,754.0.html</span></a></span></p>
<p class="p4"><span class="s3">Questions fréquentes (en anglais): <a href="http://forum.voodooprojects.org/index.php/topic,754.0.html"><span class="s2">http://forum.voodooprojects.org/index.php/topic,754.0.html</span></a></span></p>
</body>
</html>

Archive Download the corresponding diff file

Revision: 1713