Chameleon

Chameleon Commit Details

Date:2011-08-05 09:46:10 (12 years 7 months ago)
Author:Sergey Slice
Commit:1279
Parents: 1278
Message:cpu debugging
Changes:
M/branches/slice/trunkM/i386/modules/Makefile
M/branches/slice/trunkM/revision
M/branches/slice/trunkM/i386/libsaio/platform.c
M/branches/slice/trunkM/i386/boot2/boot.c
M/branches/slice/trunkM/i386/libsaio/cpu.c
M/branches/slice/trunkM/i386/libsaio/smbios_getters.c
M/branches/slice/trunkM/i386/libsaio/disk.c
M/branches/slice/trunkM/i386/boot2/boot.h
M/branches/slice/trunkM/i386/libsaio/ati.c

File differences

branches/slice/trunkM/i386/libsaio/ati.c
256256
257257
258258
259
260
261259
260
261
262
263
262264
263265
264266
......
357359
358360
359361
362
363
364
360365
361366
362367
......
425430
426431
427432
433
434
428435
429436
430437
......
434441
435442
436443
444
445
446
447
448
449
437450
438451
439452
......
470483
471484
472485
486
487
488
489
473490
474491
475492
......
551568
552569
553570
571
572
554573
555574
556575
......
11411160
11421161
11431162
1163
11441164
11451165
11461166
1147
1167
11481168
11491169
11501170
......
12211241
12221242
12231243
1224
1225
1226
1227
1244
1245
1246
1247
1248
12281249
1250
1251
1252
1253
12291254
12301255
12311256
{ 0x944E,0x30001787, CHIP_FAMILY_RV770,"ATI Radeon HD 4730 Series",kMotmot},
{ 0x944E,0x30101787, CHIP_FAMILY_RV770,"ATI Radeon HD 4810 Series",kMotmot},
{ 0x944E,0x31001787, CHIP_FAMILY_RV770,"ATI Radeon HD 4820",kMotmot},
// Akbar
{ 0x9480,0x3628103C,CHIP_FAMILY_RV730,/*M96*/"ATI Radeon HD 4650M",kShrike}, // hp OK
{ 0x9480,0x3628103C,CHIP_FAMILY_RV730,"ATI Radeon HD 4650M",kGliff},
{ 0x9480,0x9035104D,CHIP_FAMILY_RV730,"ATI Radeon HD 4650M",kGliff},
{ 0x9490,0x20031787, CHIP_FAMILY_RV730,"ATI Radeon HD 4670",kFlicker},
{ 0x9490,0x30501787, CHIP_FAMILY_RV730,"ATI Radeon HD 4710",kNull},
{ 0x9490,0x4710174B, CHIP_FAMILY_RV730,"ATI Radeon HD 4710",kNull},
{ 0x9490,0x300017AF, CHIP_FAMILY_RV730,"ATI Radeon HD 4710",kNull},
{ 0x9552,0x300017AF, CHIP_FAMILY_RV710,"ATI Radeon HD 4300/4500 Series",kNull},
{ 0x9552,0x04341028, CHIP_FAMILY_RV710,"ATI Mobility Radeon 4330",kShrike},
{ 0x9553,0x18751043, CHIP_FAMILY_RV710,"ATI Mobility Radeon HD 4570",kShrike},
{ 0x9553,0x1B321043, CHIP_FAMILY_RV710,"ATI Mobility Radeon HD 4570",kShrike},
{ 0x9581,0x95811002, CHIP_FAMILY_RV630,"ATI Radeon HD 3600 Series",kNull},
{ 0x9581,0x3000148C, CHIP_FAMILY_RV630,"ATI Radeon HD 3600 Series",kNull},
{ 0x689C,0x039E1043, CHIP_FAMILY_HEMLOCK,"ASUS EAH5870 Series",kUakari},
{ 0x689C,0x30201682, CHIP_FAMILY_HEMLOCK,"ATI Radeon HD 5970",kUakari},
{ 0x68A8,0x050E1025,CHIP_FAMILY_CYPRESS,"AMD Radeon HD 6850M",kUakari}, // issue #89
{ 0x68B8,0xE147174B, CHIP_FAMILY_JUNIPER,"ATI Radeon HD 5770",kVervet},
{ 0x68B8,0x21D71458, CHIP_FAMILY_JUNIPER,"ATI Radeon HD 5770",kVervet},
{ 0x68B8,0x1482174B, CHIP_FAMILY_JUNIPER,"ATI Radeon HD 5770",kVervet},
{ 0x68B8,0x22881787, CHIP_FAMILY_JUNIPER,"ATI Radeon HD 5770",kVervet},
{ 0x68B8,0x00CF106B, CHIP_FAMILY_JUNIPER,"ATI Radeon HD 5770",kHoolock},
{ 0x68C0,0x1594103C,CHIP_FAMILY_REDWOOD,"AMD Radeon HD 6570M",kNull}, // issue #91
//Azi: from Slice { 0x100268C0, "ATI Radeon 5670 Series", "Galago"}
// http://www.insanelymac.com/forum/index.php?s=&showtopic=255866&view=findpost&p=1695482
{ 0x68C1,0x033E1025,CHIP_FAMILY_REDWOOD,"ATI Mobility Radeon HD 5650",kNull},
{ 0x68D8,0x301117AF, CHIP_FAMILY_REDWOOD,"ATI Radeon HD 5690",kNull},
{ 0x68D8,0x301017AF, CHIP_FAMILY_REDWOOD,"ATI Radeon HD 5730",kNull},
{ 0x68D8,0x30001787, CHIP_FAMILY_REDWOOD,"ATI Radeon HD 5730",kNull},
{ 0x6739,0x67391002,CHIP_FAMILY_BARTS,"AMD Radeon HD 6850",kDuckweed},
{ 0x6739,0x21F81458,CHIP_FAMILY_BARTS,"AMD Radeon HD 6850",kDuckweed},
{ 0x6741,0x050E1025,CHIP_FAMILY_TURKS,"AMD Radeon HD 6650M",kNull}, // issue 121
{ 0x6741,0x05131025,CHIP_FAMILY_TURKS,"AMD Radeon HD 6650M",kNull}, // Nai22
{ 0x6741,0x1646103C,CHIP_FAMILY_TURKS,"AMD Radeon HD 6750M",kNull}, // issue 88
{ 0x6759,0xE193174B,CHIP_FAMILY_TURKS,"AMD Radeon HD 6570",kNull},
// dickhouse
{ 0x6760,0x1CB21043,CHIP_FAMILY_RV730,"AMD Radeon HD 6470M",kNull},
{ 0x6739,0x00000000,CHIP_FAMILY_BARTS,"AMD Radeon HD 6850 Series",kDuckweed},
{ 0x673E,0x00000000,CHIP_FAMILY_BARTS,"AMD Radeon HD 6790 Series",kNull},
{ 0x6741,0x00000000,CHIP_FAMILY_TURKS,"AMD Radeon HD 6600M/6700M Series",kNull},
{ 0x6758,0x00000000,CHIP_FAMILY_TURKS,"AMD Radeon HD 6670 Series",kNull},
{ 0x6759,0x00000000,CHIP_FAMILY_TURKS,"AMD Radeon HD 6500 Series",kNull},
{ 0x6760,0x00000000,CHIP_FAMILY_TURKS,"AMD Radeon HD 6600 Series",kNull},
static bool init_card(pci_dt_t *pci_dev)
{
booladd_vbios = true;
char name[24];
char name_parent[24];
int i;
bool add_vbios = true;
intn_ports = 0;
card = malloc(sizeof(card_t));
if (!card)
card->ports = card_configs[i].ports;
}
//Azi: http://forum.voodooprojects.org/index.php/topic,1959.msg10402.html#msg10402
// get around this...
if (pci_dev->device_id == 0x9552 && pci_dev->subsys_id.subsys_id == 0x04341028 )
card->ports = 2;
if (card->info->chip_family >= CHIP_FAMILY_CEDAR)
{
card->flags |= EVERGREEN;
card->ports = 3; //Azi: not sure of the usefulness ??
}
getIntForKey(kAtiPorts, &n_ports, &bootInfo->bootConfig);
if (n_ports > 0)
card->ports = n_ports;
sprintf(name, "ATY,%s", card->cfg_name);
aty_name.type = kStr;
aty_name.size = strlen(name) + 1;
branches/slice/trunkM/i386/libsaio/platform.c
6868
6969
7070
71
71
7272
7373
7474
//gBootOrder = (void*)BootOrder;
build_pci_dt();
verbose("1:Platform=%x root_pci=%x\n", gPlatform, gRootPCIDev);
//verbose("1:Platform=%x root_pci=%x\n", gPlatform, gRootPCIDev);
scan_cpu(Platform);
//scan_mem(); Rek: called after pci devs init in fake_efi now ...
}
branches/slice/trunkM/i386/libsaio/cpu.c
311311
312312
313313
314
315
316
317
318
319
320
321
322
323
324
325
326314
327315
328316
......
376364
377365
378366
379
367
368
380369
381370
382371
......
472461
473462
474463
475
476
464
465
477466
478
467
479468
480469
481470
......
578567
579568
580569
570
581571
582572
583573
p->CPU.BrandString[0] = '\0';
}
}
#if DEBUG_CPU
{
inti;
DBG("CPUID Raw Values:\n");
for (i=0; i<CPUID_MAX; i++) {
DBG("%02d: %08x-%08x-%08x-%08x\n", i,
p->CPU.CPUID[i][0], p->CPU.CPUID[i][1],
p->CPU.CPUID[i][2], p->CPU.CPUID[i][3]);
}
}
getchar();
#endif
/* setup features */
if ((bit(23) & p->CPU.CPUID[CPUID_1][3]) != 0) {
(msr >> 32) & 0xffffffff, msr & 0xffffffff);
bus_ratio_max = bitfield(msr, 14, 8);
bus_ratio_min = bitfield(msr, 46, 40); //valv: not sure about this one (Remarq.1)
msr = rdmsr64(MSR_FLEX_RATIO);
//msr = rdmsr64(MSR_FLEX_RATIO);
msr = 0;
DBG("msr(0x%04x): flex_ratio %08x\n", MSR_FLEX_RATIO, msr & 0xffffffff);
if ((msr >> 16) & 0x01) {
flex_ratio = bitfield(msr, 14, 8);
}
}
/* Mobile CPU ? */
//Slice
#if DEBUG_CPU
//Slice - no more needed
#if 0 // DEBUG_CPU
pause();
#endif
msr = rdmsr64(MSR_IA32_PLATFORM_ID);
}
if(!cpuFrequency) cpuFrequency = tscFrequency;
}
#endif
p->CPU.MaxCoef = maxcoef;
p->CPU.MaxDiv = maxdiv;
p->CPU.CurrCoef = currcoef;
branches/slice/trunkM/i386/libsaio/disk.c
16481648
16491649
16501650
1651
1651
16521652
1653
1653
16541654
16551655
16561656
#if DEBUG //Azi: warning - too big for boot-log.. far too big.. i mean HUGE!! :P
for (bvr = chain; bvr; bvr = bvr->next)
{
printf(" bvr: %d, dev: %d, part: %d, flags: %d, vis: %d\n", bvr, bvr->biosdev, bvr->part_no, bvr->flags, bvr->visible);
verbose(" bvr: %d, dev: %d, part: %d, flags: %d, vis: %d\n", bvr, bvr->biosdev, bvr->part_no, bvr->flags, bvr->visible);
}
printf("count: %d\n", bvCount);
verbose("count: %d\n", bvCount);
// getchar();
#endif
branches/slice/trunkM/i386/libsaio/smbios_getters.c
219219
220220
221221
222
222
223
224
223225
224
225226
226227
227228
......
234235
235236
236237
237
238
238239
239240
240241
bool getSMBMemoryDeviceMemorySpeed(returnType *value)
{
static int idx = -1;
//Slice - do not use SPD value for memory speed. DMI has real value.
return false;
/*static int idx = -1;
intmap;
idx++;
if (idx < MAX_RAM_SLOTS)
{
}
}
return false;
return false; */
//value->dword = 800;
//return true;
}
branches/slice/trunkM/i386/boot2/boot.c
488488
489489
490490
491
491492
493
492494
493495
494496
......
614616
615617
616618
617
619
618620
619621
620622
621
623
622624
623625
624626
625
627
626628
627629
628630
break;
if (!forceresume && ((sleeptime+3)<bvr->modTime)) {
#if DEBUG
printf ("Hibernate image is too old by %d seconds. Use ForceWake=y to override\n",bvr->modTime-sleeptime);
#endif
break;
}
bootFile = bootInfo->bootFile;
// Try to load kernel image from alternate locations on boot helper partitions.
sprintf(bootFileSpec, "com.apple.boot.P/%s", bootFile);
sprintf(bootFileSpec, "com.apple.boot.P%s", bootFile);
ret = GetFileInfo(NULL, bootFileSpec, &flags, &time);
if (ret == -1)
{
sprintf(bootFileSpec, "com.apple.boot.R/%s", bootFile);
sprintf(bootFileSpec, "com.apple.boot.R%s", bootFile);
ret = GetFileInfo(NULL, bootFileSpec, &flags, &time);
if (ret == -1)
{
sprintf(bootFileSpec, "com.apple.boot.S/%s", bootFile);
sprintf(bootFileSpec, "com.apple.boot.S%s", bootFile);
ret = GetFileInfo(NULL, bootFileSpec, &flags, &time);
if (ret == -1)
{
branches/slice/trunkM/i386/boot2/boot.h
108108
109109
110110
111
111112
112113
113114
#define kUseAtiROM"UseAtiROM"/* ati.c */
#define kAtiConfig"AtiConfig"/* ati.c */
#define kAtiPorts"AtiPorts"/* ati.c */
#define kATYbinimage"ATYbinimage"/* ati.c */
#define kUseNvidiaROM"UseNvidiaROM"/* nvidia.c */
branches/slice/trunkM/i386/modules/Makefile
1111
1212
1313
14
14
1515
1616
1717
include ${SRCROOT}/Make.rules
# The order of building is important.
SUBDIRS = klibc uClibcxx Resolution KernelPatcher NVRAM
SUBDIRS = klibc uClibcxx Resolution KernelPatcher NVRAM HelloWorld
#HelloWorld Memory NetbookInstaller KextPatcher Networking HPET USBFix RamDiskLoader
branches/slice/trunkM/revision
1
1
1227
1227:1230

Archive Download the corresponding diff file

Revision: 1279