Chameleon

Chameleon Commit Details

Date:2010-12-20 15:23:57 (8 years 6 months ago)
Author:valv
Commit:683
Parents: 682
Message:bsd pngs (thanks to blackosx); minor changes to SMBios defaults ; nvidia 0x10DE10C3; pre-TstatesGenerator
Changes:
M/branches/valv/i386/libsaio/nvidia.c
M/branches/valv/artwork/themes/default/device_freebsd.png
M/branches/valv/artwork/themes/default/device_openbsd.png
M/branches/valv/i386/libsaio/acpi_patcher.c
M/branches/valv/i386/libsaio/smbios_patcher.c
M/branches/valv/revision

File differences

branches/valv/i386/libsaio/acpi_patcher.c
560560
561561
562562
563
563
564564
565565
566566
......
572572
573573
574574
575
576
577
578
579
580
581
575
576
577
578
579
580
581
582582
583583
584584
......
672672
673673
674674
675
675
676676
677677
678678
......
962962
963963
964964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
965989
966990
967991
......
12031227
12041228
12051229
1206
1230
12071231
12081232
12091233
......
12111235
12121236
12131237
1214
1238
12151239
12161240
12171241
......
12431267
12441268
12451269
1270
1271
1272
12461273
12471274
12481275
......
12711298
12721299
12731300
1274
1301
12751302
12761303
12771304
......
15681595
15691596
15701597
1571
1598
1599
1600
1601
1602
1603
1604
1605
15721606
15731607
15741608
......
19071941
19081942
19091943
1910
1944
1945
1946
1947
1948
1949
1950
1951
19111952
19121953
19131954
}
struct acpi_2_ssdt *generate_pss_ssdt(struct acpi_2_dsdt* dsdt)
{
{
char ssdt_header[] =
{
0x53, 0x53, 0x44, 0x54, 0x7E, 0x00, 0x00, 0x00, /* SSDT.... */
char ssdt_pct[] =
{
0x08, 0x5F, 0x50, 0x43, 0x54, 0x12, 0x2C,/* 00000030 "0._PCT.," */
0x02, 0x11, 0x14, 0x0A, 0x11, 0x82, 0x0C, 0x00,/* 00000038 "........" */
0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,/* 00000040 "........" */
0x00, 0x00, 0x00, 0x00, 0x79, 0x00, 0x11, 0x14,/* 00000048 "....y..." */
0x0A, 0x11, 0x82, 0x0C, 0x00, 0x7F, 0x00, 0x00,/* 00000050 "........" */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,/* 00000058 "........" */
0x00, 0x79, 0x00
0x08, 0x5F, 0x50, 0x43, 0x54, 0x12, 0x2C, 0x02,/* 0._PCT., */
0x11, 0x14, 0x0A, 0x11, 0x82, 0x0C, 0x00, 0x7F,/* ........ */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */
0x00, 0x00, 0x00, 0x79, 0x00, 0x11, 0x14, 0x0A, /* ....y... */
0x11, 0x82, 0x0C, 0x00, 0x7F, 0x00, 0x00, 0x00, /* ........ */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */
0x79, 0x00
};
if (Platform.CPU.Vendor != 0x756E6547) {
msr = rdmsr64(MSR_IA32_PERF_CONTROL);
wrmsr64(MSR_IA32_PERF_CONTROL, (msr & 0xFFFFFFFFFFFF0000ULL) | (minimum.FID << 8) | i);
intel_waitforsts();
minimum.VID = rdmsr64(MSR_IA32_PERF_STATUS) & 0x3F;
minimum.VID = rdmsr64(MSR_IA32_PERF_STATUS) & 0x3F;
delay(1);
}
return NULL;
}
/*valv: to be uncommented when finished ;)
struct acpi_2_ssdt *generate_tss_ssdt(struct acpi_2_dsdt* dsdt)
{
char ssdt_header[] =
{
0x53, 0x53, 0x44, 0x54, 0xE7, 0x00, 0x00, 0x00,
0x01, 0x17, 0x50, 0x6D, 0x52, 0x65, 0x66, 0x42,
0x43, 0x70, 0x75, 0x54, 0x73, 0x74, 0x00, 0x00,
0x00, 0x10, 0x00, 0x00, 0x49, 0x4E, 0x54, 0x4C,
0x31, 0x03, 0x10, 0x20
};
char ssdt_ptc[] =
{
0x08, 0x5F, 0x50, 0x54, 0x43, 0x12, 0x2C, 0x02,
0x11, 0x14, 0x0A, 0x11, 0x82, 0x0C, 0x00, 0x7F,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x79, 0x00, 0x11, 0x14, 0x0A,
0x11, 0x82, 0x0C, 0x00, 0x7F, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x79, 0x00
};
}*/
void *loadSSDTTable(int ssdt_number)
{
void *tableAddr;
int version;
void *new_dsdt=NULL, *new_hpet=NULL, *new_sbst=NULL, *new_ecdt=NULL, *new_asft=NULL, *new_dmar=NULL, *new_apic=NULL, *new_mcfg=NULL;//, *new_ssdt[14];
struct acpi_2_ssdt *new_ssdt[16]; // 2 additional tables for pss & cst
struct acpi_2_ssdt *new_ssdt[16]; // 2 additional tables for pss/tss & cst
struct acpi_2_fadt *fadt; // will be used in CST generator
bool oem_dsdt=false, oem_ssdt=false, oem_hpet=false, oem_sbst=false, oem_ecdt=false, oem_asft=false, oem_dmar=false, oem_apic=false, oem_mcfg=false;
bool update_acpi=false, gen_xsdt=false;
bool hpet_replaced=false, sbst_replaced=false, ecdt_replaced=false, asft_replaced=false, dmar_replaced=false, apic_replaced=false, mcfg_replaced=false;
bool hpet_added=false, sbst_added=false, ecdt_added=false, asft_added=false, dmar_added=false, apic_added=false, mcfg_added=false;
bool gen_cst=false, gen_pss=false;
bool gen_cst=false, gen_pss=false;//, gen_tss=false;
int curssdt=0, loadtotssdt=0, totssdt=0, newtotssdt=0;
| (getBoolForKey(kEnableC6State, &tmpval6, &bootInfo->bootConfig)&&tmpval6);
gen_pss = getBoolForKey(kGeneratePStates, &tmpval, &bootInfo->bootConfig)&&tmpval;
//gen_tss = getBoolForKey(kGenerateTStates, &tmpval, &bootInfo->bootConfig)&&tmpval;
update_acpi = getBoolForKey(kUpdateACPI, &tmpval, &bootInfo->bootConfig)&&tmpval;
}
if (!oem_mcfg)
new_mcfg=loadACPITable(kMCFG);
if (gen_cst || gen_pss) oem_ssdt = false;
if (gen_cst || gen_pss/* || gen_tss*/) oem_ssdt = false;
if (!oem_ssdt)
{
gen_pss= false;
loadtotssdt++;
}
}
/*
// Generating _TSS SSDT
else if (gen_tss && (new_ssdt[loadtotssdt] = generate_tss_ssdt((void*)fadt_mod->DSDT)))
{
gen_tss= false;
loadtotssdt++;
}
*/}
continue;
}
gen_pss= false;
loadtotssdt++;
}
}
/*
// Generating _TSS SSDT
else if (gen_tss && (new_ssdt[loadtotssdt] = generate_tss_ssdt((void*)fadt_mod->DSDT)))
{
gen_tss= false;
loadtotssdt++;
}
*/}
continue;
}
branches/valv/i386/libsaio/smbios_patcher.c
3030
3131
3232
33
34
33
34
3535
3636
3737
3838
3939
4040
41
42
41
42
4343
44
44
4545
4646
47
47
4848
4949
5050
5151
5252
5353
54
55
54
55
5656
5757
5858
......
6060
6161
6262
63
63
6464
6565
6666
6767
68
68
6969
7070
7171
......
9494
9595
9696
97
97
9898
9999
100100
......
102102
103103
104104
105
105
106106
107107
108108
109109
110
110
111111
112112
113113
......
134134
135135
136136
137
138
139
140
137
138
139
140
141141
142142
143143
144144
145145
146
147
148
149
146
147
148
149
150150
151151
152152
......
156156
157157
158158
159
160
159
160
161161
162162
163163
164164
165165
166
166
167167
168
169
168
169
170170
171171
172172
// defaults for a MacBook
static const SMStrEntryPair const sm_macbook_defaults[]={
{"SMbiosvendor","Apple Inc."},
{"SMbiosversion","MB41.88Z.0073.B00.0809221748"},
{"SMbiosdate","04/01/2008"},
{"SMbiosversion","MB41.88Z.00C1.B00.0802091535"},
{"SMbiosdate","02/09/08"},
{"SMmanufacter","Apple Inc."},
{"SMproductname","MacBook4,1"},
{"SMsystemversion","1.0"},
{"SMserial","SOMESRLNMBR"},
{"SMfamily","MacBook"},
{"SMboardmanufacter","Apple Inc."},
{"SMboardproduct","Mac-F42D89C8"},
{"SMboardversion","MacBook4,1"},
{"SMboardproduct","Mac-F22788A9"},
{"SMboardversion","PVT"},
{"SMchassismanufacter","Apple Inc."},
{"SMchassisversion","Mac-F42D89C8"},
{"SMchassisversion","Mac-F22788A9"},
{"SMchassisserial","SOMESRLNMBR"},
/*{"SMSKU","System SKU#"},*/
{"SMboardserial","Base Board Serial#"},
{"SMboardserial","1"},
{ "",""}
};
// defaults for a MacBook Pro
static const SMStrEntryPair const sm_macbookpro_defaults[]={
{"SMbiosvendor","Apple Inc."},
{"SMbiosversion","MBP41.88Z.0073.B00.0809221748"},
{"SMbiosdate","04/01/2008"},
{"SMbiosversion","MBP41.88Z.00C1.B03.0802271651"},
{"SMbiosdate","02/27/08"},
{"SMmanufacter","Apple Inc."},
{"SMproductname","MacBookPro4,1"},
{"SMsystemversion","1.0"},
{"SMfamily","MacBook Pro"},
{"SMboardmanufacter","Apple Inc."},
{"SMboardproduct","Mac-F42D89C8"},
{"SMboardversion","MacBookPro4,1"},
{"SMboardversion","PVT"},
{"SMchassismanufacter","Apple Inc."},
{"SMchassisversion","Mac-F42D89C8"},
{"SMchassisserial","SOMESRLNMBR"},
/*{"SMSKU","System SKU#"},*/
{"SMboardserial","Base Board Serial#"},
{"SMboardserial","1"},
{ "",""}
};
static const SMStrEntryPair const sm_macmini_defaults[]={
{"SMbiosvendor","Apple Inc."},
{"SMbiosversion","MM21.88Z.009A.B00.0706281359"},
{"SMbiosdate","04/01/2008"},
{"SMbiosdate","06/28/08"},
{"SMmanufacter","Apple Inc."},
{"SMproductname","Macmini2,1"},
{"SMsystemversion","1.0"},
{"SMfamily","Napa Mac"},
{"SMboardmanufacter","Apple Inc."},
{"SMboardproduct","Mac-F4208EAA"},
{"SMboardversion","Macmini2,1"},
{"SMboardversion","PVT"},
{"SMchassismanufacter","Apple Inc."},
{"SMchassisversion","Mac-F4208EAA"},
{"SMchassisserial","SOMESRLNMBR"},
/*{"SMSKU","System SKU#"},*/
{"SMboardserial","Base Board Serial#"},
{"SMboardserial","1"},
{ "",""}
};
// defaults for a Mac Pro
static const SMStrEntryPair const sm_macpro_defaults[]={
{"SMbiosvendor","Apple Computer, Inc."},
{"SMbiosversion","MP31.88Z.006C.B05.0802291410"},
{"SMbiosdate","04/01/2008"},
{"SMmanufacter","Apple Computer, Inc."},
{"SMbiosvendor","Apple Inc."},
{"SMbiosversion","MP31.88Z.006C.B02.0801021250"},
{"SMbiosdate","01/02/08"},
{"SMmanufacter","Apple Inc."},
{"SMproductname","MacPro3,1"},
{"SMsystemversion","1.0"},
{"SMserial","SOMESRLNMBR"},
{"SMfamily","MacPro"},
{"SMboardmanufacter","Apple Computer, Inc."},
{"SMboardproduct","Mac-F4208DC8"},
{"SMboardversion","MacPro3,1"},
{"SMchassismanufacter","Apple Computer, Inc."},
{"SMchassisversion","Mac-F4208DC8"},
{"SMboardproduct","Mac-F42C88C8"},
{"SMboardversion","Proto1"},
{"SMchassismanufacter","Apple Inc."},
{"SMchassisversion","Mac-F42C88C8"},
{"SMchassisserial","SOMESRLNMBR"},
/*{"SMSKU","System SKU#"},*/
{"SMboardserial","Base Board Serial#"},
// defaults for an iMac11,1 core i3/i5/i7
static const SMStrEntryPair const sm_imac_core_defaults[]={
{"SMbiosvendor","Apple Inc."},
{"SMbiosversion","IM111.88Z.0034.B00.0802091538"},
{"SMbiosdate","06/01/2009"},
{"SMbiosversion","IM111.88Z.0034.B00.0910301727"},
{"SMbiosdate","10/30/09"},
{"SMmanufacter","Apple Inc."},
{"SMproductname","iMac11,1"},
{"SMsystemversion","1.0"},
{"SMserial","SOMESRLNMBR"},
{"SMfamily","iMac"},
{"SMboardmanufacter","Apple Computer, Inc."},
{"SMboardmanufacter","Apple Inc."},
{"SMboardproduct","Mac-F2268DAE"},
{"SMboardversion","iMac11,1"},
{"SMchassismanufacter","Apple Computer, Inc."},
{"SMboardversion","Not Specified"},
{"SMchassismanufacter","Apple Inc."},
{"SMchassisversion","Mac-F2268DAE"},
{"SMchassisserial","SOMESRLNMBR"},
/*{"SMSKU","System SKU#"},*/
branches/valv/i386/libsaio/nvidia.c
464464
465465
466466
467
467
468
468469
469470
470471
{ 0x10DE0DF0, "GeForce GT 425M" },
{ 0x10DE0E22, "GeForce GTX 460" },
{ 0x10DE0E24, "GeForce GTX 460" },
{ 0x10DE1080, "GeForce GTX 580" }
{ 0x10DE1080, "GeForce GTX 580" },
{ 0x10DE10C3, "GeForce 8400 GS" }
};
static uint16_t swap16(uint16_t x)
branches/valv/revision
1
1
164:530
665

Archive Download the corresponding diff file

Revision: 683