Chameleon

Chameleon Commit Details

Date:2011-07-21 13:11:33 (8 years 2 months ago)
Author:Sergey Slice
Commit:1199
Parents: 1198
Message:PCI->SMBIOS->ACPI dependencies
Changes:
M/branches/slice/trunkM/revision
M/branches/slice/trunkM/i386/boot2/boot.c
M/branches/slice/trunkM/Chameleon.xcodeproj/slice.mode1v3
M/branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/decls.pbxbtree
M/branches/slice/trunkM/i386/boot2/boot.h
M/branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/imports.pbxbtree
M/branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/cdecls.pbxbtree
M/branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/pbxindex.header
M/branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/symbols0.pbxsymbols
M/branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/refs.pbxbtree
M/branches/slice/trunkM/Makefile
M/branches/slice/trunkM/Chameleon.xcodeproj/slice.pbxuser
M/branches/slice/trunkM/i386/libsaio/acpi_patcher.c
M/branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/strings.pbxstrings/control
M/branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/files.pbxbtree
M/branches/slice/trunkM/i386/libsaio/cpu.c
M/branches/slice/trunkM/i386/libsaio/smbios_getters.c
M/branches/slice/trunkM/i386/libsaio/platform.h
M/branches/slice/trunkM/i386/libsaio/fake_efi.c
M/branches/slice/trunkM/i386/libsaio/pci_setup.c
M/branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/strings.pbxstrings/strings
M/branches/slice/trunkM/i386/libsaio/smbios.c
M/branches/slice/trunkM/i386/libsaio/cpu.h
M/branches/slice/trunkM/i386/libsaio/smbios_getters.h

File differences

branches/slice/trunkM/Chameleon.xcodeproj/slice.pbxuser
22
33
44
5
6
7
5
6
7
88
99
1010
1111
12
13
14
12
13
14
1515
1616
1717
1818
19
20
21
19
20
21
2222
2323
2424
2525
26
27
28
26
27
28
2929
3030
3131
......
6363
6464
6565
66
67
66
67
6868
6969
7070
7171
72
73
7472
7573
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
7691
77
78
7992
80
8193
8294
8395
8496
85
8697
87
8898
89
9099
91100
92101
......
114123
115124
116125
117
118
119
120
121
122
123
124
126
125127
126128
127129
128130
129131
130132
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152133
153134
154135
......
183164
184165
185166
186
167
187168
188
189
190
191
169
170
171
172
192173
193
194
174
175
195176
196
177
197178
198
199
179
180
181
182
183
184
185
186
187
188
189
190
200191
201
192
202193
203
204
194
195
205196
206
197
207198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
208289
209
290
291
292
293
294
295
296
297
298
299
300
210301
211
302
212303
213
214
304
305
215306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
216344
217345
218346
......
223351
224352
225353
226
227
228
229
230
231
232
233
234
235
236354
237355
238356
......
273391
274392
275393
276
277
278
279
280
281
282
283
284
285
286394
287395
288396
......
293401
294402
295403
296
297
298
299
300
301
302
303
304
305
306404
307405
308406
......
313411
314412
315413
316
317
318
319
320
321
322
323
324
325
326414
327415
328416
......
352440
353441
354442
355
356
357
443
444
445
358446
359447
360448
361449
362
363
364
450
451
452
365453
366454
367455
......
378466
379467
380468
469
470
471
472
473
474
475
381476
382477
383
384
385
478
479
480
386481
387482
388483
484
485
486
487
488
489
490
389491
390492
391493
......
437539
438540
439541
440
441
442
542
543
544
443545
444546
445547
......
458560
459561
460562
461
563
462564
463
565
464566
465567
466568
467569
468
469
470
570
571
572
471573
472574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
473596
474597
475598
......
493616
494617
495618
496
497
498
619
620
621
499622
500623
501624
{
012E60F8137AC68F00E35218 /* smbios_decode.c */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {887, 3120}}";
sepNavSelRange = "{9653, 17}";
sepNavVisRange = "{4743, 2018}";
sepNavIntBoundsRect = "{{0, 0}, {887, 3029}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 810}";
};
};
012E60F9137AC68F00E35218 /* smbios_getters.c */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1454, 7046}}";
sepNavSelRange = "{13718, 7}";
sepNavVisRange = "{13285, 923}";
sepNavIntBoundsRect = "{{0, 0}, {1454, 6851}}";
sepNavSelRange = "{13684, 0}";
sepNavVisRange = "{6233, 612}";
};
};
012E60FA137AC68F00E35218 /* smbios_getters.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {782, 650}}";
sepNavSelRange = "{1045, 0}";
sepNavVisRange = "{522, 899}";
sepNavIntBoundsRect = "{{0, 0}, {877, 663}}";
sepNavSelRange = "{1357, 0}";
sepNavVisRange = "{362, 1171}";
};
};
012E60FB137AC68F00E35218 /* smbios.c */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1076, 10712}}";
sepNavSelRange = "{27109, 14}";
sepNavVisRange = "{27026, 1014}";
sepNavIntBoundsRect = "{{0, 0}, {877, 12376}}";
sepNavSelRange = "{27806, 9}";
sepNavVisRange = "{27294, 696}";
sepNavWindowFrame = "{{15, 60}, {889, 813}}";
};
};
PBXFileDataSource_Target_ColumnID,
);
};
PBXPerProjectTemplateStateSaveDate = 332860018;
PBXWorkspaceStateSaveDate = 332860018;
PBXPerProjectTemplateStateSaveDate = 332935263;
PBXWorkspaceStateSaveDate = 332935263;
};
perUserProjectItems = {
1208BED013D70B8900694228 /* PBXTextBookmark */ = 1208BED013D70B8900694228 /* PBXTextBookmark */;
1208BED513D710A600694228 /* PBXTextBookmark */ = 1208BED513D710A600694228 /* PBXTextBookmark */;
1208BED613D710A600694228 /* PBXTextBookmark */ = 1208BED613D710A600694228 /* PBXTextBookmark */;
1208BED813D710A600694228 /* PBXTextBookmark */ = 1208BED813D710A600694228 /* PBXTextBookmark */;
122A5BCA1375C49300795FF0 /* PBXTextBookmark */ = 122A5BCA1375C49300795FF0 /* PBXTextBookmark */;
122A5BCB1375C49300795FF0 /* PBXTextBookmark */ = 122A5BCB1375C49300795FF0 /* PBXTextBookmark */;
1237521013D814370027F8A5 /* PBXTextBookmark */ = 1237521013D814370027F8A5 /* PBXTextBookmark */;
1237560213D81EE60027F8A5 /* PBXTextBookmark */ = 1237560213D81EE60027F8A5 /* PBXTextBookmark */;
1237560313D81EE60027F8A5 /* PBXTextBookmark */ = 1237560313D81EE60027F8A5 /* PBXTextBookmark */;
1237560613D81EE60027F8A5 /* PBXTextBookmark */ = 1237560613D81EE60027F8A5 /* PBXTextBookmark */;
1237560713D81EE60027F8A5 /* PBXTextBookmark */ = 1237560713D81EE60027F8A5 /* PBXTextBookmark */;
1237560813D81EE60027F8A5 /* PBXTextBookmark */ = 1237560813D81EE60027F8A5 /* PBXTextBookmark */;
1237560913D81EE60027F8A5 /* PBXTextBookmark */ = 1237560913D81EE60027F8A5 /* PBXTextBookmark */;
1237560A13D81EE60027F8A5 /* PBXTextBookmark */ = 1237560A13D81EE60027F8A5 /* PBXTextBookmark */;
1237560B13D81EE60027F8A5 /* PBXTextBookmark */ = 1237560B13D81EE60027F8A5 /* PBXTextBookmark */;
1237560C13D81EE60027F8A5 /* PBXTextBookmark */ = 1237560C13D81EE60027F8A5 /* PBXTextBookmark */;
1237560D13D81EE60027F8A5 /* PBXTextBookmark */ = 1237560D13D81EE60027F8A5 /* PBXTextBookmark */;
1237561D13D823130027F8A5 /* PBXTextBookmark */ = 1237561D13D823130027F8A5 /* PBXTextBookmark */;
12375A1613D82F2C0027F8A5 /* PBXTextBookmark */ = 12375A1613D82F2C0027F8A5 /* PBXTextBookmark */;
12375A2913D82FD80027F8A5 /* PBXTextBookmark */ = 12375A2913D82FD80027F8A5 /* PBXTextBookmark */;
12375A3C13D831AB0027F8A5 /* PBXTextBookmark */ = 12375A3C13D831AB0027F8A5 /* PBXTextBookmark */;
12375A3D13D831AB0027F8A5 /* PBXTextBookmark */ = 12375A3D13D831AB0027F8A5 /* PBXTextBookmark */;
12375A3E13D831AB0027F8A5 /* PBXTextBookmark */ = 12375A3E13D831AB0027F8A5 /* PBXTextBookmark */;
1284EEE713D6F35E00A6BE87 /* PBXTextBookmark */ = 1284EEE713D6F35E00A6BE87 /* PBXTextBookmark */;
1284EEE913D6F35E00A6BE87 /* PBXTextBookmark */ = 1284EEE913D6F35E00A6BE87 /* PBXTextBookmark */;
1284EEF713D6F95000A6BE87 /* PBXTextBookmark */ = 1284EEF713D6F95000A6BE87 /* PBXTextBookmark */;
1284EEF913D6F95000A6BE87 /* PBXTextBookmark */ = 1284EEF913D6F95000A6BE87 /* PBXTextBookmark */;
1284EF1113D6FD4500A6BE87 /* PBXTextBookmark */ = 1284EF1113D6FD4500A6BE87 /* PBXTextBookmark */;
128EB70A13D31D3900E0DA4B /* PBXTextBookmark */ = 128EB70A13D31D3900E0DA4B /* PBXTextBookmark */;
128EB70B13D31D3900E0DA4B /* PBXTextBookmark */ = 128EB70B13D31D3900E0DA4B /* PBXTextBookmark */;
128EC26913D3427400E0DA4B /* PBXTextBookmark */ = 128EC26913D3427400E0DA4B /* PBXTextBookmark */;
128EC27313D3442900E0DA4B /* PBXTextBookmark */ = 128EC27313D3442900E0DA4B /* PBXTextBookmark */;
128EC27413D3442900E0DA4B /* PBXTextBookmark */ = 128EC27413D3442900E0DA4B /* PBXTextBookmark */;
12BFD73713D6E2DD00065808 /* PBXTextBookmark */ = 12BFD73713D6E2DD00065808 /* PBXTextBookmark */;
12BFD73813D6E2DD00065808 /* PBXTextBookmark */ = 12BFD73813D6E2DD00065808 /* PBXTextBookmark */;
12D15FC013D35DFB00ABAAF4 /* PBXTextBookmark */ = 12D15FC013D35DFB00ABAAF4 /* PBXTextBookmark */;
12D15FC213D35DFB00ABAAF4 /* PBXTextBookmark */ = 12D15FC213D35DFB00ABAAF4 /* PBXTextBookmark */;
12D15FE813D3634F00ABAAF4 /* PBXTextBookmark */ = 12D15FE813D3634F00ABAAF4 /* PBXTextBookmark */;
12EDC2D91376FCB300937D70 /* PBXTextBookmark */ = 12EDC2D91376FCB300937D70 /* PBXTextBookmark */;
};
vrLen = 799;
vrLoc = 2489;
};
1208BED613D710A600694228 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 1208BED713D710A600694228 /* AppleSMBIOS.cpp */;
rLen = 0;
rLoc = 9223372036854775807;
rType = 0;
};
1208BED713D710A600694228 /* AppleSMBIOS.cpp */ = {
1208BED913D710A600694228 /* AppleSMBIOS.cpp */ = {
isa = PBXFileReference;
lastKnownFileType = sourcecode.cpp.cpp;
name = AppleSMBIOS.cpp;
path = "/Users/slice/Projects/Apple/AppleSMBIOS-41/AppleSMBIOS.cpp";
sourceTree = "<absolute>";
};
1208BED813D710A600694228 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 1208BED913D710A600694228 /* AppleSMBIOS.cpp */;
name = "AppleSMBIOS.cpp: 333";
rLen = 36;
rLoc = 8807;
rType = 0;
vrLen = 1074;
vrLoc = 5057;
};
1208BED913D710A600694228 /* AppleSMBIOS.cpp */ = {
isa = PBXFileReference;
name = AppleSMBIOS.cpp;
path = "/Users/slice/Projects/Apple/AppleSMBIOS-41/AppleSMBIOS.cpp";
sourceTree = "<absolute>";
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {877, 16107}}";
sepNavSelRange = "{8807, 36}";
sepNavVisRange = "{5057, 1074}";
};
};
122A5BB51375B61C00795FF0 /* Source Control */ = {
isa = PBXSourceControlManager;
fallbackIsa = XCSourceControlManager;
vrLen = 604;
vrLoc = 1448;
};
1284EEE713D6F35E00A6BE87 /* PBXTextBookmark */ = {
1237521013D814370027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056D6111F3868000754B65 /* platform.h */;
name = "platform.h: 139";
rLen = 12;
rLoc = 4643;
fRef = 1208BED913D710A600694228 /* AppleSMBIOS.cpp */;
name = "AppleSMBIOS.cpp: 333";
rLen = 36;
rLoc = 8807;
rType = 0;
vrLen = 1184;
vrLoc = 3805;
vrLen = 1052;
vrLoc = 5057;
};
1284EEE913D6F35E00A6BE87 /* PBXTextBookmark */ = {
1237560213D81EE60027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 012E60FA137AC68F00E35218 /* smbios_getters.h */;
name = "smbios_getters.h: 44";
fRef = B0056D2711F3868000754B65 /* acpi_patcher.h */;
name = "acpi_patcher.h: 12";
rLen = 8;
rLoc = 238;
rType = 0;
vrLen = 570;
vrLoc = 0;
};
1237560313D81EE60027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 012E60F8137AC68F00E35218 /* smbios_decode.c */;
name = "smbios_decode.c: 1";
rLen = 0;
rLoc = 1290;
rLoc = 0;
rType = 0;
vrLen = 1154;
vrLoc = 310;
vrLen = 810;
vrLoc = 0;
};
1284EEF713D6F95000A6BE87 /* PBXTextBookmark */ = {
1237560613D81EE60027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056D5B11F3868000754B65 /* pci.c */;
name = "pci.c: 132";
rLen = 0;
rLoc = 2891;
rType = 0;
vrLen = 482;
vrLoc = 0;
};
1237560713D81EE60027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056D5D11F3868000754B65 /* pci_root.c */;
name = "pci_root.c: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 667;
vrLoc = 1620;
};
1237560813D81EE60027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056D5E11F3868000754B65 /* pci_root.h */;
name = "pci_root.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 192;
vrLoc = 0;
};
1237560913D81EE60027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056D5C11F3868000754B65 /* pci.h */;
name = "pci.h: 28";
rLen = 8;
rLoc = 388;
rType = 0;
vrLen = 575;
vrLoc = 276;
};
1237560A13D81EE60027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056CF611F3868000754B65 /* boot.c */;
name = "boot.c: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1039;
vrLoc = 3039;
};
1237560B13D81EE60027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 012E60F9137AC68F00E35218 /* smbios_getters.c */;
name = "smbios_getters.c: 497";
rLen = 0;
rLoc = 13684;
rType = 0;
vrLen = 612;
vrLoc = 6233;
};
1237560C13D81EE60027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056D5F11F3868000754B65 /* pci_setup.c */;
name = "pci_setup.c: 24";
rLen = 19;
rLoc = 470;
rType = 0;
vrLen = 829;
vrLoc = 160;
};
1237560D13D81EE60027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056CF711F3868000754B65 /* boot.h */;
name = "boot.h: 167";
rLen = 0;
rLoc = 5686;
rType = 0;
vrLen = 637;
vrLoc = 5182;
};
1237561D13D823130027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056D2511F3868000754B65 /* acpi.h */;
name = "acpi.h: 36";
rLen = 11;
rLoc = 880;
rType = 0;
vrLen = 774;
vrLoc = 477;
};
12375A1613D82F2C0027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056D2611F3868000754B65 /* acpi_patcher.c */;
name = "acpi_patcher.c: 736";
name = "acpi_patcher.c: 823";
rLen = 19;
rLoc = 28073;
rType = 0;
vrLen = 987;
vrLoc = 27547;
};
12375A2913D82FD80027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 012E60FA137AC68F00E35218 /* smbios_getters.h */;
name = "smbios_getters.h: 45";
rLen = 0;
rLoc = 24837;
rLoc = 1357;
rType = 0;
vrLen = 1102;
vrLoc = 24291;
vrLen = 1171;
vrLoc = 362;
};
12375A3C13D831AB0027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056D3F11F3868000754B65 /* fake_efi.c */;
name = "fake_efi.c: 502";
rLen = 9;
rLoc = 21173;
rType = 0;
vrLen = 1037;
vrLoc = 20605;
};
12375A3D13D831AB0027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 012E60FB137AC68F00E35218 /* smbios.c */;
rLen = 9;
rLoc = 27806;
rType = 0;
};
12375A3E13D831AB0027F8A5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 012E60FB137AC68F00E35218 /* smbios.c */;
name = "smbios.c: 836";
rLen = 9;
rLoc = 27806;
rType = 0;
vrLen = 696;
vrLoc = 27294;
};
1284EEE713D6F35E00A6BE87 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056D6111F3868000754B65 /* platform.h */;
name = "platform.h: 139";
rLen = 12;
rLoc = 4643;
rType = 0;
vrLen = 1184;
vrLoc = 3805;
};
1284EEF913D6F95000A6BE87 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056D6011F3868000754B65 /* platform.c */;
vrLen = 1026;
vrLoc = 786;
};
1284EF1113D6FD4500A6BE87 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056D3F11F3868000754B65 /* fake_efi.c */;
name = "fake_efi.c: 740";
rLen = 0;
rLoc = 28686;
rType = 0;
vrLen = 645;
vrLoc = 28553;
};
128EB70A13D31D3900E0DA4B /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056D6A11F3868000754B65 /* stringTable.c */;
vrLen = 1382;
vrLoc = 997;
};
128EC27413D3442900E0DA4B /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 012E60F8137AC68F00E35218 /* smbios_decode.c */;
name = "smbios_decode.c: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1349;
vrLoc = 7003;
};
12BFD73713D6E2DD00065808 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056D6811F3868000754B65 /* spd.c */;
vrLen = 496;
vrLoc = 8297;
};
12BFD73813D6E2DD00065808 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 012E60FB137AC68F00E35218 /* smbios.c */;
name = "smbios.c: 26";
rLen = 1;
rLoc = 487;
rType = 0;
vrLen = 1356;
vrLoc = 347;
};
12D15FC013D35DFB00ABAAF4 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056D4011F3868000754B65 /* fake_efi.h */;
vrLen = 571;
vrLoc = 66;
};
12D15FC213D35DFB00ABAAF4 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 012E60F9137AC68F00E35218 /* smbios_getters.c */;
name = "smbios_getters.c: 493";
rLen = 7;
rLoc = 13692;
rType = 0;
vrLen = 587;
vrLoc = 13520;
};
12D15FE813D3634F00ABAAF4 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B0056D6511F3868000754B65 /* SMBIOS.h */;
};
B0056CF611F3868000754B65 /* boot.c */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1160, 9841}}";
sepNavSelRange = "{13406, 0}";
sepNavVisRange = "{22628, 768}";
sepNavIntBoundsRect = "{{0, 0}, {880, 10192}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{3039, 1039}";
};
};
B0056CF711F3868000754B65 /* boot.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {877, 3653}}";
sepNavSelRange = "{5659, 0}";
sepNavVisRange = "{5084, 630}";
sepNavIntBoundsRect = "{{0, 0}, {877, 3692}}";
sepNavSelRange = "{5686, 0}";
sepNavVisRange = "{5182, 637}";
};
};
B0056D0611F3868000754B65 /* options.c */ = {
sepNavVisRange = "{0, 1312}";
};
};
B0056D2511F3868000754B65 /* acpi.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {782, 2067}}";
sepNavSelRange = "{1851, 18}";
sepNavVisRange = "{1683, 831}";
};
};
B0056D2611F3868000754B65 /* acpi_patcher.c */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {922, 17745}}";
sepNavSelRange = "{24837, 0}";
sepNavVisRange = "{24291, 1102}";
sepNavIntBoundsRect = "{{0, 0}, {877, 17485}}";
sepNavSelRange = "{28073, 19}";
sepNavVisRange = "{27547, 987}";
sepNavWindowFrame = "{{15, 60}, {889, 813}}";
};
};
B0056D2711F3868000754B65 /* acpi_patcher.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {877, 520}}";
sepNavSelRange = "{238, 8}";
sepNavVisRange = "{0, 570}";
};
};
B0056D2A11F3868000754B65 /* ati.c */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {877, 17433}}";
};
B0056D3F11F3868000754B65 /* fake_efi.c */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {877, 10972}}";
sepNavSelRange = "{28686, 0}";
sepNavVisRange = "{28553, 645}";
sepNavIntBoundsRect = "{{0, 0}, {873, 11167}}";
sepNavSelRange = "{28916, 0}";
sepNavVisRange = "{30020, 333}";
};
};
B0056D4011F3868000754B65 /* fake_efi.h */ = {
};
B0056D5B11F3868000754B65 /* pci.c */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {782, 2574}}";
sepNavIntBoundsRect = "{{0, 0}, {877, 2626}}";
sepNavSelRange = "{2891, 0}";
sepNavVisRange = "{2501, 585}";
sepNavVisRange = "{0, 482}";
};
};
B0056D5C11F3868000754B65 /* pci.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {782, 12519}}";
sepNavSelRange = "{2084, 4}";
sepNavVisRange = "{1847, 805}";
sepNavIntBoundsRect = "{{0, 0}, {877, 12545}}";
sepNavSelRange = "{388, 8}";
sepNavVisRange = "{276, 575}";
};
};
B0056D5D11F3868000754B65 /* pci_root.c */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {877, 1508}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{1620, 667}";
};
};
B0056D5E11F3868000754B65 /* pci_root.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {877, 394}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 192}";
};
};
B0056D5F11F3868000754B65 /* pci_setup.c */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {877, 1300}}";
sepNavSelRange = "{470, 19}";
sepNavVisRange = "{160, 829}";
};
};
B0056D6011F3868000754B65 /* platform.c */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {873, 975}}";
};
B0056D6511F3868000754B65 /* SMBIOS.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {782, 6292}}";
sepNavSelRange = "{14307, 17}";
sepNavVisRange = "{13924, 957}";
sepNavIntBoundsRect = "{{0, 0}, {782, 6318}}";
sepNavSelRange = "{14808, 14}";
sepNavVisRange = "{14080, 936}";
};
};
B0056D6811F3868000754B65 /* spd.c */ = {
branches/slice/trunkM/Chameleon.xcodeproj/slice.mode1v3
272272
273273
274274
275
275
276276
277277
278278
279279
280280
281281
282
282
283283
284284
285285
......
316316
317317
318318
319
319
320320
321321
322322
......
324324
325325
326326
327
327
328328
329329
330330
331
331
332332
333333
334334
......
338338
339339
340340
341
342341
343
344342
345343
346
347344
348
349
350345
351
352346
353347
354
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
355364
356365
357366
......
363372
364373
365374
366
375
367376
368377
369378
370379
371380
372381
373
382
374383
375384
376385
......
383392
384393
385394
386
395
387396
388397
389398
390399
391400
392401
393
402
394403
395404
396405
......
409418
410419
411420
412
421
413422
414
423
415424
416425
417426
......
631640
632641
633642
634
643
635644
636645
637646
......
764773
765774
766775
776
777
767778
768779
769780
770781
771782
772
783
773784
774785
775786
......
778789
779790
780791
781
792
782793
783794
784795
......
790801
791802
792803
793
794
795804
796805
797806
......
804813
805814
806815
807
816
808817
809818
810819
......
827836
828837
829838
830
831
839
840
832841
833842
834843
835844
836
845
837846
838847
839848
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
<integer>46</integer>
<integer>85</integer>
<integer>11</integer>
<integer>3</integer>
<integer>0</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
<string>{{0, 334}, {186, 600}}</string>
<string>{{0, 1021}, {186, 600}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
<key>PBXProjectModuleGUID</key>
<string>1CE0B20306471E060097A5F4</string>
<key>PBXProjectModuleLabel</key>
<string>AppleSMBIOS.cpp</string>
<string>smbios.c</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<key>PBXProjectModuleGUID</key>
<string>1CE0B20406471E060097A5F4</string>
<key>PBXProjectModuleLabel</key>
<string>AppleSMBIOS.cpp</string>
<string>smbios.c</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
<string>1208BED813D710A600694228</string>
<string>12375A3E13D831AB0027F8A5</string>
<key>history</key>
<array>
<string>122A5BCA1375C49300795FF0</string>
<string>128EB70B13D31D3900E0DA4B</string>
<string>128EC26913D3427400E0DA4B</string>
<string>128EC27313D3442900E0DA4B</string>
<string>128EC27413D3442900E0DA4B</string>
<string>12D15FC013D35DFB00ABAAF4</string>
<string>12D15FC213D35DFB00ABAAF4</string>
<string>12D15FE813D3634F00ABAAF4</string>
<string>12BFD73713D6E2DD00065808</string>
<string>12BFD73813D6E2DD00065808</string>
<string>1284EEE713D6F35E00A6BE87</string>
<string>1284EEE913D6F35E00A6BE87</string>
<string>1284EEF713D6F95000A6BE87</string>
<string>1284EEF913D6F95000A6BE87</string>
<string>1284EF1113D6FD4500A6BE87</string>
<string>1208BED013D70B8900694228</string>
<string>1208BED513D710A600694228</string>
<string>1208BED613D710A600694228</string>
<string>1237521013D814370027F8A5</string>
<string>1237560213D81EE60027F8A5</string>
<string>1237560313D81EE60027F8A5</string>
<string>1237560613D81EE60027F8A5</string>
<string>1237560713D81EE60027F8A5</string>
<string>1237560813D81EE60027F8A5</string>
<string>1237560913D81EE60027F8A5</string>
<string>1237560A13D81EE60027F8A5</string>
<string>1237560B13D81EE60027F8A5</string>
<string>1237560C13D81EE60027F8A5</string>
<string>1237560D13D81EE60027F8A5</string>
<string>1237561D13D823130027F8A5</string>
<string>12375A1613D82F2C0027F8A5</string>
<string>12375A2913D82FD80027F8A5</string>
<string>12375A3C13D831AB0027F8A5</string>
<string>12375A3D13D831AB0027F8A5</string>
</array>
</dict>
<key>SplitCount</key>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {938, 432}}</string>
<string>{{0, 0}, {938, 399}}</string>
<key>RubberWindowFrame</key>
<string>294 219 1146 659 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>432pt</string>
<string>399pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 437}, {938, 181}}</string>
<string>{{0, 404}, {938, 214}}</string>
<key>RubberWindowFrame</key>
<string>294 219 1146 659 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
<key>Proportion</key>
<string>181pt</string>
<string>214pt</string>
</dict>
</array>
<key>Proportion</key>
</array>
<key>TableOfContents</key>
<array>
<string>1208BED313D70B8900694228</string>
<string>12375A3F13D831AB0027F8A5</string>
<string>1CE0B1FE06471DED0097A5F4</string>
<string>1208BED413D70B8900694228</string>
<string>12375A4013D831AB0027F8A5</string>
<string>1CE0B20306471E060097A5F4</string>
<string>1CE0B20506471E060097A5F4</string>
</array>
<key>TableOfContents</key>
<array>
<string>122A5BB81375BA4700795FF0</string>
<string>1208BEC713D70B8600694228</string>
<string>12375A3513D831A70027F8A5</string>
<string>1CD0528F0623707200166675</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CDD528C0622207200134675</string>
<key>PBXProjectModuleLabel</key>
<string>bootstruct.c</string>
<string>fake_efi.c</string>
<key>StatusBarVisibility</key>
<true/>
</dict>
<key>Frame</key>
<string>{{0, 0}, {843, 431}}</string>
<key>RubberWindowFrame</key>
<string>526 109 843 689 0 0 1440 878 </string>
<string>574 74 843 689 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<string>431pt</string>
</dict>
<dict>
<key>BecomeActive</key>
<true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<key>Frame</key>
<string>{{0, 436}, {843, 212}}</string>
<key>RubberWindowFrame</key>
<string>526 109 843 689 0 0 1440 878 </string>
<string>574 74 843 689 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>TableOfContents</key>
<array>
<string>1C530D57069F1CE1000CFCEE</string>
<string>1208BECE13D70B8600694228</string>
<string>1208BECF13D70B8600694228</string>
<string>12375A3A13D831A70027F8A5</string>
<string>12375A3B13D831A70027F8A5</string>
<string>1CDD528C0622207200134675</string>
<string>1CD0528E0623707200166675</string>
</array>
<key>WindowString</key>
<string>526 109 843 689 0 0 1440 878 </string>
<string>574 74 843 689 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C530D57069F1CE1000CFCEE</string>
<key>WindowToolIsVisible</key>
branches/slice/trunkM/i386/libsaio/smbios_getters.h
4242
4343
4444
45
4546
4647
4748
extern SMBStructHeader* FindNextDmiTableOfType(int type, int minlength);
extern void getSmbiosProductName();
extern void getSmbiosMacModel(void);
extern void getSmbiosTableStructure(struct SMBEntryPoint *smbios);
SMBEntryPoint *getAddressOfSmbiosTable(void);
const char * smbiosStringAtIndex(SMBStructHeader* smHeader, int index, int* length);
branches/slice/trunkM/i386/libsaio/acpi_patcher.c
926926
927927
928928
929
930
931
932
933
934
935
936
937
938
929939
930940
931941
......
10741084
10751085
10761086
1087
1088
1089
1090
1091
1092
1093
10771094
10781095
10791096
// Load replacement DSDT
new_dsdt = loadACPITable(dirSpec);
struct acpi_2_dsdt* dsdt = (struct acpi_2_dsdt*)new_dsdt;
if (new_dsdt) {
msglog("DSDT.aml loaded from %s\n", dirSpec);
strncpy(dsdt->OEMID, "Apple ", 6);
strncpy(dsdt->OEMTableId, MacModel, 8);
dsdt->OEMRevision = ModelRev;
dsdt->Checksum=0;
dsdt->Checksum=256-checksum8(new_dsdt,dsdt->Length);
}
// Mozodojo: going to patch FACP and load SSDT's even if DSDT.aml is not present
/*if (!new_dsdt)
{
//Now I want to replace DSDT in place
// it is only way to patch DSDT on some platform
old_dsdt = (char *)fadt->DSDT;
//it's impossible because the memory of old_dsdt is read_only?
/*strncpy((struct acpi_2_dsdt*)old_dsdt->OEMID, "Apple ", 6);
strncpy((struct acpi_2_dsdt*)old_dsdt->OEMTableId, MacModel, 8);
(struct acpi_2_dsdt*)old_dsdt->OEMRevision = ModelRev;
(struct acpi_2_dsdt*)old_dsdt->Checksum=0;
(struct acpi_2_dsdt*)old_dsdt->Checksum = 256-checksum8(old_dsdt,(struct acpi_2_dsdt*)old_dsdt->Length);
*/
if(!old_dsdt || !tableSign(old_dsdt, "DSDT")){
if(fadt_mod->Length > 140) old_dsdt = (char *)(uint32_t)fadt_mod->X_DSDT;
if(!old_dsdt || !tableSign(old_dsdt, "DSDT")) old_dsdt = (char *)new_dsdt;
branches/slice/trunkM/i386/libsaio/cpu.c
8585
8686
8787
88
8889
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
89197
90198
91199
......
114222
115223
116224
117
225
226
227
228
229
118230
119231
232
233
120234
121235
122236
......
138252
139253
140254
141
255
142256
143257
144258
145
259
260
146261
147262
148263
149
264
265
266
267
268
269
270
271
150272
151273
152274
......
215337
216338
217339
218
340
219341
220342
221343
......
231353
232354
233355
234
235
356
357
236358
237359
238360
239
361
240362
241363
242364
......
250372
251373
252374
253
375
254376
255377
256378
......
295417
296418
297419
298
299
420
421
300422
301
423
302424
303
425
304426
305427
306428
307429
308
430
309431
310432
311433
......
357479
358480
359481
360
361
362
363
364
365
366
367
368
369
370
371
372
373
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
374514
375
376
377
378
379
380
381
382
383
384
385
386
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
387531
388
389
390
391
392
393
394
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
395554
396555
397556
return retval;
}
#if 0
/*
* DFE: Measures the Max Performance Frequency in Hz (64-bit)
*/
static uint64_t measure_mperf_frequency(void)
{
uint64_t mperfStart;
uint64_t mperfEnd;
uint64_t mperfDelta = 0xffffffffffffffffULL;
unsigned long pollCount;
uint64_t retval = 0;
int i;
/* Time how many MPERF ticks elapse in 30 msec using the 8254 PIT
* counter 2. We run this loop 3 times to make sure the cache
* is hot and we take the minimum delta from all of the runs.
* That is to say that we're biased towards measuring the minimum
* number of MPERF ticks that occur while waiting for the timer to
* expire.
*/
for(i = 0; i < 10; ++i)
{
enable_PIT2();
set_PIT2_mode0(CALIBRATE_LATCH);
mperfStart = rdmsr64(MSR_AMD_MPERF);
pollCount = poll_PIT2_gate();
mperfEnd = rdmsr64(MSR_AMD_MPERF);
/* The poll loop must have run at least a few times for accuracy */
if(pollCount <= 1)
continue;
/* The MPERF must increment at LEAST once every millisecond. We
* should have waited exactly 30 msec so the MPERF delta should
* be >= 30. Anything less and the processor is way too slow.
*/
if((mperfEnd - mperfStart) <= CALIBRATE_TIME_MSEC)
continue;
// tscDelta = MIN(tscDelta, (tscEnd - tscStart))
if( (mperfEnd - mperfStart) < mperfDelta )
mperfDelta = mperfEnd - mperfStart;
}
/* mperfDelta is now the least number of MPERF ticks the processor made in
* a timespan of 0.03 s (e.g. 30 milliseconds)
*/
if(mperfDelta > (1ULL<<32))
retval = 0;
else
{
retval = mperfDelta * 1000 / 30;
}
disable_PIT2();
return retval;
}
#endif
/*
* Measures the Actual Performance Frequency in Hz (64-bit)
*/
static uint64_t measure_aperf_frequency(void)
{
uint64_t aperfStart;
uint64_t aperfEnd;
uint64_t aperfDelta = 0xffffffffffffffffULL;
unsigned long pollCount;
uint64_t retval = 0;
int i;
/* Time how many APERF ticks elapse in 30 msec using the 8254 PIT
* counter 2. We run this loop 3 times to make sure the cache
* is hot and we take the minimum delta from all of the runs.
* That is to say that we're biased towards measuring the minimum
* number of APERF ticks that occur while waiting for the timer to
* expire.
*/
for(i = 0; i < 10; ++i)
{
enable_PIT2();
set_PIT2_mode0(CALIBRATE_LATCH);
aperfStart = rdmsr64(MSR_AMD_APERF);
pollCount = poll_PIT2_gate();
aperfEnd = rdmsr64(MSR_AMD_APERF);
/* The poll loop must have run at least a few times for accuracy */
if(pollCount <= 1)
continue;
/* The TSC must increment at LEAST once every millisecond. We
* should have waited exactly 30 msec so the APERF delta should
* be >= 30. Anything less and the processor is way too slow.
*/
if((aperfEnd - aperfStart) <= CALIBRATE_TIME_MSEC)
continue;
// tscDelta = MIN(tscDelta, (tscEnd - tscStart))
if( (aperfEnd - aperfStart) < aperfDelta )
aperfDelta = aperfEnd - aperfStart;
}
/* mperfDelta is now the least number of MPERF ticks the processor made in
* a timespan of 0.03 s (e.g. 30 milliseconds)
*/
if(aperfDelta > (1ULL<<32))
retval = 0;
else
{
retval = aperfDelta * 1000 / 30;
}
disable_PIT2();
return retval;
}
/*
* Calculates the FSB and CPU frequencies using specific MSRs for each CPU
* - multi. is read from a specific MSR. In the case of Intel, there is:
* a max multi. (used to calculate the FSB freq.),
do_cpuid(0x00000003, p->CPU.CPUID[CPUID_3]);
do_cpuid2(0x00000004, 0, p->CPU.CPUID[CPUID_4]);
do_cpuid(0x80000000, p->CPU.CPUID[CPUID_80]);
if ((p->CPU.CPUID[CPUID_80][0] & 0x0000000f) >= 1) {
if ((p->CPU.CPUID[CPUID_80][0] & 0x0000000f) >= 8) {
do_cpuid(0x80000008, p->CPU.CPUID[CPUID_88]);
do_cpuid(0x80000001, p->CPU.CPUID[CPUID_81]);
}
else if ((p->CPU.CPUID[CPUID_80][0] & 0x0000000f) >= 1) {
do_cpuid(0x80000001, p->CPU.CPUID[CPUID_81]);
}
#if DEBUG_CPU
{
inti;
p->CPU.Model += (p->CPU.ExtModel << 4);
if (p->CPU.Vendor == 0x756E6547 /* Intel */ &&
if (p->CPU.Vendor == CPUID_VENDOR_INTEL &&
p->CPU.Family == 0x06 &&
p->CPU.Model >= CPUID_MODEL_NEHALEM &&
p->CPU.Model != CPUID_MODEL_ATOM // MSR is *NOT* available on the Intel Atom CPU
){
)
{
msr = rdmsr64(MSR_CORE_THREAD_COUNT);// Undocumented MSR in Nehalem and newer CPUs
p->CPU.NoCores= bitfield((uint32_t)msr, 31, 16);// Using undocumented MSR to get actual values
p->CPU.NoThreads= bitfield((uint32_t)msr, 15, 0);// Using undocumented MSR to get actual values
} else {
}
else if (p->CPU.Vendor == CPUID_VENDOR_AMD)
{
p->CPU.NoThreads= bitfield(p->CPU.CPUID[CPUID_1][1], 23, 16);
p->CPU.NoCores= bitfield(p->CPU.CPUID[CPUID_88][2], 7, 0) + 1;
}
else
{
p->CPU.NoThreads= bitfield(p->CPU.CPUID[CPUID_1][1], 23, 16);// Use previous method for Cores and Threads
p->CPU.NoCores= bitfield(p->CPU.CPUID[CPUID_4][0], 31, 26) + 1;
}
fsbFrequency = 0;
cpuFrequency = 0;
if ((p->CPU.Vendor == 0x756E6547 /* Intel */) && ((p->CPU.Family == 0x06) || (p->CPU.Family == 0x0f))) {
if ((p->CPU.Vendor == CPUID_VENDOR_INTEL) && ((p->CPU.Family == 0x06) || (p->CPU.Family == 0x0f))) {
int intelCPU = p->CPU.Model;
if ((p->CPU.Family == 0x06 && p->CPU.Model >= 0x0c) || (p->CPU.Family == 0x0f && p->CPU.Model >= 0x03)) {
/* Nehalem CPU model */
msr = rdmsr64(MSR_PLATFORM_INFO);
DBG("msr(0x%04x): platform_info %08x-%08x\n", MSR_PLATFORM_INFO,
(msr >> 32) & 0xffffffff, msr & 0xffffffff);
bus_ratio_max = (msr >> 8) & 0xff;
bus_ratio_min = (msr >> 40) & 0xff; //valv: not sure about this one (Remarq.1)
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);
DBG("msr(0x%04x): flex_ratio %08x\n", MSR_FLEX_RATIO, msr & 0xffffffff);
if ((msr >> 16) & 0x01) {
flex_ratio = (msr >> 8) & 0xff;
flex_ratio = bitfield(msr, 14, 8);
/* bcc9: at least on the gigabyte h67ma-ud2h,
where the cpu multipler can't be changed to
allow overclocking, the flex_ratio msr has unexpected (to OSX)
presence bit) */
wrmsr64(MSR_FLEX_RATIO, (msr & 0xFFFFFFFFFFFEFFFFULL));
msr = rdmsr64(MSR_FLEX_RATIO);
verbose("Unusable flex ratio detected. Patched MSR now %08x\n", msr & 0xffffffff);
verbose("Unusable flex ratio detected. Patched MSR now %08x\n", bitfield(msr, 31, 0));
} else {
if (bus_ratio_max > flex_ratio) {
bus_ratio_max = flex_ratio;
currcoef = bus_ratio_max;
} else {
msr = rdmsr64(MSR_IA32_PERF_STATUS);
DBG("msr(0x%x): ia32_perf_stat 0x%08x\n", __LINE__, msr & 0xffffffff);
currcoef = (msr >> 8) & 0x1f;
DBG("msr(0x%x): ia32_perf_stat 0x%08x\n", __LINE__, bitfield(msr, 31, 0));
currcoef = bitfield(msr, 12, 8);
/* Non-integer bus ratio for the max-multi*/
maxdiv = (msr >> 46) & 0x01;
maxdiv = bitfield(msr, 46, 46);
/* Non-integer bus ratio for the current-multi (undocumented)*/
currdiv = (msr >> 14) & 0x01;
currdiv = bitfield(msr, 14, 14);
if ((p->CPU.Family == 0x06 && p->CPU.Model >= 0x0e) || (p->CPU.Family == 0x0f)) // This will always be model >= 3
{
/* On these models, maxcoef defines TSC freq */
maxcoef = (msr >> 40) & 0x1f;
maxcoef = bitfield(msr, 44, 40);
} else {
/* On lower models, currcoef defines TSC freq */
/* XXX */
DBG("CPU is %s\n", p->CPU.Mobile?"Mobile":"Desktop");
}
#if 0
else if((p->CPU.Vendor == 0x68747541 /* AMD */) && (p->CPU.Family == 0x0f)) {
if(p->CPU.ExtFamily == 0x00 /* K8 */) {
msr = rdmsr64(K8_FIDVID_STATUS);
currcoef = (msr & 0x3f) / 2 + 4;
currdiv = (msr & 0x01) * 2;
} else if(p->CPU.ExtFamily >= 0x01 /* K10+ */) {
msr = rdmsr64(K10_COFVID_STATUS);
if(p->CPU.ExtFamily == 0x01 /* K10 */)
currcoef = (msr & 0x3f) + 0x10;
else /* K11+ */
currcoef = (msr & 0x3f) + 0x08;
currdiv = (2 << ((msr >> 6) & 0x07));
}
else if((p->CPU.Vendor == CPUID_VENDOR_AMD) && (p->CPU.Family == 0x0f))
{
switch(p->CPU.ExtFamily)
{
case 0x00: /* K8 */
msr = rdmsr64(K8_FIDVID_STATUS);
maxcoef = bitfield(msr, 21, 16) / 2 + 4;
currcoef = bitfield(msr, 5, 0) / 2 + 4;
break;
case 0x01: /* K10 */
msr = rdmsr64(K10_COFVID_STATUS);
do_cpuid2(0x00000006, 0, p->CPU.CPUID[CPUID_6]);
if(bitfield(p->CPU.CPUID[CPUID_6][2], 0, 0) == 1) // EffFreq: effective frequency interface
{
//uint64_t mperf = measure_mperf_frequency();
uint64_t aperf = measure_aperf_frequency();
cpuFrequency = aperf;
}
// NOTE: tsc runs at the maccoeff (non turbo)
// *not* at the turbo frequency.
maxcoef = bitfield(msr, 54, 49) / 2 + 4;
currcoef = bitfield(msr, 5, 0) + 0x10;
currdiv = 2 << bitfield(msr, 8, 6);
break;
case 0x05: /* K14 */
msr = rdmsr64(K10_COFVID_STATUS);
currcoef = (bitfield(msr, 54, 49) + 0x10) << 2;
currdiv = (bitfield(msr, 8, 4) + 1) << 2;
currdiv += bitfield(msr, 3, 0);
if (currcoef) {
if (currdiv) {
fsbFrequency = ((tscFrequency * currdiv) / currcoef);
DBG("%d.%d\n", currcoef / currdiv, ((currcoef % currdiv) * 100) / currdiv);
} else {
fsbFrequency = (tscFrequency / currcoef);
DBG("%d\n", currcoef);
}
fsbFrequency = (tscFrequency / currcoef);
cpuFrequency = tscFrequency;
}
}
break;
case 0x02: /* K11 */
// not implimented
break;
}
if (maxcoef)
{
if (currdiv)
{
if(!currcoef) currcoef = maxcoef;
if(!cpuFrequency)
fsbFrequency = ((tscFrequency * currdiv) / currcoef);
else
fsbFrequency = ((cpuFrequency * currdiv) / currcoef);
if (!fsbFrequency) {
fsbFrequency = (DEFAULT_FSB * 1000);
cpuFrequency = tscFrequency;
DBG("0 ! using the default value for FSB !\n");
}
#endif
DBG("%d.%d\n", currcoef / currdiv, ((currcoef % currdiv) * 100) / currdiv);
} else {
if(!cpuFrequency)
fsbFrequency = (tscFrequency / maxcoef);
else
fsbFrequency = (cpuFrequency / maxcoef);
DBG("%d\n", currcoef);
}
}
else if (currcoef)
{
if (currdiv)
{
fsbFrequency = ((tscFrequency * currdiv) / currcoef);
DBG("%d.%d\n", currcoef / currdiv, ((currcoef % currdiv) * 100) / currdiv);
} else {
fsbFrequency = (tscFrequency / currcoef);
DBG("%d\n", currcoef);
}
}
if(!cpuFrequency) cpuFrequency = tscFrequency;
}
p->CPU.MaxCoef = maxcoef;
p->CPU.MaxDiv = maxdiv;
p->CPU.CurrCoef = currcoef;
branches/slice/trunkM/i386/libsaio/platform.h
1414
1515
1616
17
17
1818
1919
2020
21
22
23
2124
2225
2326
......
2528
2629
2730
28
29
30
31
32
33
34
35
3136
3237
3338
extern void dumpPhysAddr(const char * title, void * a, int len);
extern void scan_cpu();
#define bit(n)(1UL << (n))
#define bit(n)(1ULL << (n))
#define bitmask(h,l)((bit(h)|(bit(h)-1)) & ~(bit(l)-1))
#define bitfield(x,h,l)(((x) & bitmask(h,l)) >> l)
/* CPUID Vendor */
#define CPUID_VENDOR_INTEL 0x756E6547
#define CPUID_VENDOR_AMD 0x68747541
/* CPUID index into cpuid_raw */
#define CPUID_00
#define CPUID_22
#define CPUID_33
#define CPUID_44
#define CPUID_805
#define CPUID_816
#define CPUID_MAX7
#define CPUID_65
#define CPUID_806
#define CPUID_817
#define CPUID_888
#define CPUID_MAX9
#define CPU_MODEL_PENTIUM_M0x0D
#define CPU_MODEL_YONAH0x0E// Sossaman, Yonah
branches/slice/trunkM/i386/libsaio/pci_setup.c
2121
2222
2323
24
25
2426
2527
2628
......
5456
5557
5658
57
59
60
61
5862
5963
6064
......
6872
6973
7074
75
7176
7277
7378
extern pci_dt_t *dram_controller_dev;
uint16_t vgaVendor;
void setup_pci_devs(pci_dt_t *pci_dt)
{
char *devicepath;
case PCI_CLASS_DISPLAY_VGA:
DBG("GraphicsEnabler %s enabled\n", do_gfx_devprop?"":"no");
if (do_gfx_devprop)
switch (current->vendor_id)
{
vgaVendor = current->vendor_id;
switch (vgaVendor)
{
case PCI_VENDOR_ID_ATI:
setup_ati_devprop(current);
setup_nvidia_devprop(current);
break;
}
}
break;
case PCI_CLASS_SERIAL_USB:
branches/slice/trunkM/i386/libsaio/cpu.h
3333
3434
3535
36
37
38
39
3640
3741
3842
#define K8_FIDVID_STATUS0xC0010042
#define K10_COFVID_STATUS0xC0010071
#define MSR_AMD_MPERF 0x000000E7
#define MSR_AMD_APERF 0x000000E8
#define DEFAULT_FSB100000 /* for now, hardcoding 100MHz for old CPUs */
// DFE: This constant comes from older xnu:
branches/slice/trunkM/i386/libsaio/smbios.c
1111
1212
1313
14
14
1515
1616
1717
18
18
1919
20
20
2121
2222
2323
......
110110
111111
112112
113
113
114114
115115
116116
......
123123
124124
125125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
126175
127176
128177
......
298347
299348
300349
301
350
302351
303352
304353
......
812861
813862
814863
815
864
816865
817866
818867
......
822871
823872
824873
874
825875
826876
827877
......
854904
855905
856906
857
907
858908
859909
860910
#include "smbios_getters.h"
#ifndef DEBUG_SMBIOS
#define DEBUG_SMBIOS 0
#define DEBUG_SMBIOS 1
#endif
#if DEBUG_SMBIOS
#define DBG(x...)printf(x)
#define DBG(x...)verbose(x)
#else
#define DBG(x...)msglog(x)
#define DBG(x...)
#endif
#define SMBPlist&bootInfo->smbiosConfig
#define kDefaultMacProWestmereBIOSVersion" MP51.88Z.007F.B00.1008031144"
#define kDefaulMacProWestmereBIOSReleaseDate"08/03/10"
//-------------------------------------------------------------------------------------------------------------------------
#define MAX_DMI_TABLES 96
#define MAX_DMI_TABLES 255
typedef struct DmiNumAssocTag {
SMBStructHeader* dmi;
uint8_t type;
#define getFieldOffset(struct, field)((uint8_t)(uint32_t)&(((struct *)0)->field))
/**
* Get a table structure entry from a type specification and a smbios address
* return NULL if table is not found
*/
void getSmbiosTableStructure(struct SMBEntryPoint *smbios)
{
SMBStructHeader* dmihdr=NULL;
SMBByte* p;
int i;
if (ftTablePairInit && smbios!=NULL) {
ftTablePairInit = false;
#if DEBUG_SMBIOS
verbose(">>> SMBIOSAddr=0x%08x\n", smbios);
verbose(">>> DMI: addr=0x%08x, len=%d, count=%d\n", smbios->dmi.tableAddress,
smbios->dmi.tableLength, smbios->dmi.structureCount);
#endif
p = (SMBByte *) smbios->dmi.tableAddress;
for (i=0;
i < smbios->dmi.structureCount &&
p + 4 <= (SMBByte *)smbios->dmi.tableAddress + smbios->dmi.tableLength;
i++) {
dmihdr = (SMBStructHeader *) p;
#if DEBUG_SMBIOS
// verbose(">>>>>> DMI(%d): type=0x%02x, len=0x%d\n",i,dmihdr->type,dmihdr->length);
#endif
if (dmihdr->length < 4 || dmihdr->type == 127 /* EOT */) break;
if (DmiTablePairCount < MAX_DMI_TABLES) {
DmiTablePair[DmiTablePairCount].dmi = dmihdr;
DmiTablePair[DmiTablePairCount].type = dmihdr->type;
DmiTablePairCount++;
}
else {
verbose("DMI table entries list is full! Next entries won't be stored.\n");
}
#if DEBUG_SMBIOS
verbose("DMI header found for table type %d, length = %d\n", dmihdr->type, dmihdr->length);
#endif
p = p + dmihdr->length;
while ((p - (SMBByte *)smbios->dmi.tableAddress + 1 < smbios->dmi.tableLength) && (p[0] != 0x00 || p[1] != 0x00)) {
p++;
}
p += 2;
}
}
}
typedef struct {
SMBStructHeader *orig;
SMBStructHeader *new;
if (Platform->Type == 2)//platformCPUFeature(CPU_FEATURE_MOBILE))
{
if (Platform->CPU.NoCores > 1) //Slice - it is wrong but we have no criteria to choose from
if (vgaVendor != PCI_VENDOR_ID_INTEL) //Slice
{
defaultBIOSInfo.version= kDefaultMacBookProBIOSVersion;
defaultSystemInfo.productName= kDefaultMacBookPro;
{
int i;
if (ftTablePairInit) getSmbios(SMBIOS_ORIGINAL);
// if (ftTablePairInit) getSmbios(SMBIOS_ORIGINAL);
for (i=current_pos; i < DmiTablePairCount; i++) {
if (type == DmiTablePair[i].type &&
return DmiTablePair[i].dmi;
}
}
DBG("SMBIOS table type %d not found\n", type);
return NULL; // not found
};
// do not need in complex MSR calculation
case kSMBTypeProcessorInformation:
tmp = ((SMBProcessorInformation *)structHeader)->externalClock;
Platform->CPU.FSBFrequency = tmp * MEGA + (tmp & 7) * 110000; //According to Intel
Platform->CPU.FSBFrequency = tmp * MEGA + (tmp & 7) * 110000; //According to Intel 133->133.33MHz
tmp = ((SMBProcessorInformation *)structHeader)->currentClock;
Platform->CPU.CPUFrequency = tmp * MEGA + (tmp & 7) * 110000;
break;
branches/slice/trunkM/i386/libsaio/fake_efi.c
740740
741741
742742
743
744
743
744
745
745746
746747
747748
verbose("2:Platform=%x root_pci=%x\n", Platform, root_pci_dev);
#endif
setup_pci_devs(root_pci_dev);
readSMBIOSInfo(getSmbios(SMBIOS_ORIGINAL));
smbios_p = (EFI_PTR32)getSmbios(SMBIOS_ORIGINAL);
getSmbiosTableStructure((void*)(EFI_PTR32)smbios_p);
readSMBIOSInfo((void*)(EFI_PTR32)smbios_p);
// load smbios.plist file if any
setupSmbiosConfigFile("smbios.plist");
branches/slice/trunkM/i386/libsaio/smbios_getters.c
442442
443443
444444
445
445
446446
447447
448448
......
494494
495495
496496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
}
//Slice
//#define MEGA 1000000LL - now in mem.h
//#define MEGA 1000000LL - now in platform.h
void scan_cpu_DMI(void) //PlatformInfo_t *p)
{
// int i=0;
return;
}
/*
//Slice - check other DMI info
bool scanDMI(void)
{
SMBStructHeader * dmihdr = NULL;
SMBSystemEnclosure* encInfo; // Type 3
for (dmihdr = FindFirstDmiTableOfType(3, 13); dmihdr; dmihdr = FindNextDmiTableOfType(3, 13))
{
encInfo = (SMBSystemEnclosure*)dmihdr;
msglog("DMI Chassis Info:\n Type=%x\n Boot-up State=%x\n Power Supply=%x Thermal State=%x\n", encInfo->type, encInfo->bootupState, encInfo->powerSupplyState, encInfo->thermalState);
switch (encInfo->type) {
case 1:
case 2:
return FALSE;
case 3:
case 4:
case 6:
case 7:
Platform->CPU.Mobile = FALSE;
break;
case 8:
case 9:
case 0x0A:
case 0x0B:
case 0x0E:
Platform->CPU.Mobile = TRUE;
break;
default:
break;
}
return TRUE;
}
return FALSE;
}
*/
branches/slice/trunkM/i386/boot2/boot.c
585585
586586
587587
588
588
589589
590590
591591
if (ret == 0 && kerneltime > exttime) {
exttime = kerneltime;
}
if (ret == 0 && cachetime != (exttime + 1)) {
if (ret == 0 && cachetime < exttime) {
trycache = 0;
break;
}
branches/slice/trunkM/i386/boot2/boot.h
164164
165165
166166
167
167168
168169
169170
extern void *gRootPCIDev;
extern void* gPlatform;
extern void* gBootOrder;
extern uint16_t vgaVendor;;
/*
* Boot Modes
branches/slice/trunkM/revision
1
1
1191
1198
branches/slice/trunkM/Makefile
9393
9494
9595
96
96
9797
9898
9999
......
114114
115115
116116
117
117
118118
119119
120120
fi; \
done
dist image: all
dist image:
@echo "================= Distrib ================="
@echo "\t[RM] ${IMGROOT}"
@rm -rf ${IMGROOT}
@cp -f ${SRCROOT}/artwork/themes/default/* ${IMGROOT}/Extra/Themes/Default
@cp -f ${SYMROOT}/i386/boot ${IMGROOT}/usr/standalone/i386
@cp -f ${SYMROOT}/i386/boot0 ${IMGROOT}/usr/standalone/i386
@cp -f ${SYMROOT}/i386/boot0hfs ${IMGROOT}/usr/standalone/i386
#@cp -f ${SYMROOT}/i386/boot0hfs ${IMGROOT}/usr/standalone/i386
@cp -f ${SYMROOT}/i386/boot0md ${IMGROOT}/usr/standalone/i386
@cp -f ${SYMROOT}/i386/boot1h ${IMGROOT}/usr/standalone/i386
@cp -f ${SYMROOT}/i386/boot1f32 ${IMGROOT}/usr/standalone/i386

Archive Download the corresponding diff file

Revision: 1199